Address
+ Inheritance diagram for Address:

Description

Public Properties

const DIR = 'addresses'
 
const TYPE = 'customer_address'
 
- Public Properties inherited from AbstractEntity
const DIR = ''
 All subclasses must redeclare this to match their REST directory (without container). More...
 
const TYPE = ''
 All subclasses must redeclare this to match their types. More...
 
- Public Properties inherited from Data
const MAP = []
 
const PATCH = []
 

Public Methods

magic string getAddress1 ()
 
magic string getAddress2 ()
 
magic string getCity ()
 
magic string getCompany ()
 
magic string getCountry ()
 
magic string getCountryCode ()
 read-only More...
 
magic string getCountryName ()
 
Customer getCustomer ()
 
magic string getCustomerId ()
 injected More...
 
magic string getName ()
 
magic string getPhone ()
 non-unique More...
 
magic string getProvince ()
 
magic string getProvinceCode ()
 read-only More...
 
string getState ()
 Alias for getProvince(). More...
 
string getStateCode ()
 Alias for getProvinceCode(). More...
 
magic string getZip ()
 
magic bool hasPhone ()
 
magic bool isDefault ()
 
magic $this setAddress1 (string $address1)
 
magic $this setAddress2 (string $address2)
 
magic $this setCity (string $city)
 
magic $this setCompany (string $company)
 
magic $this setCountry (string $country)
 
magic $this setCountryName (string $name)
 
$this setDefault ()
 Sets the address as the default. More...
 
magic $this setName (string $name)
 
magic $this setPhone (string $phone)
 
magic $this setProvince (string $province)
 
$this setState (string $state)
 Alias for setProvince(). More...
 
magic $this setZip (string $zip)
 
- Public Methods inherited from AbstractEntity
string __toString ()
 
null string getId ()
 
string[] getPoolKeys ()
 
bool hasId ()
 
$this reload ()
 Fully reloads the entity from Shopify. More...
 
- Public Methods inherited from Data
mixed __call (string $method, array $args)
 
 __construct ($caller, array $data=[])
 
string serialize ()
 Dehydrated JSON encode. More...
 
array toArray ()
 
void unserialize ($serialized)
 
- Public Methods inherited from CreateTrait
$this create ()
 
- Public Methods inherited from DeleteTrait
void delete ()
 
- Public Methods inherited from UpdateTrait
$this update ()
 

Protected Methods

 _container ()
 The container/owner object, if any. More...
 
void _onDelete ()
 
void _onSave ()
 
- Protected Methods inherited from AbstractEntity
mixed _get (string $field)
 Lazy-loads missing fields. More...
 
void _reload (string $field)
 
- Protected Methods inherited from Data
mixed _hydrate (string $class, $item)
 A factory that also hydrates / caches entities. More...
 
array _select ($subject, callable $filter,... $args)
 Magic method: selectField(callable $filter) More...
 
$this _setData (array $data)
 Clears all diffs and sets all data, hydrating mapped fields. More...
 
$this _setField (string $field, $value)
 Sets a value, hydrating if mapped, and clears the diff. More...
 
- Protected Methods inherited from CreateTrait
string _dir ()
 The POST directory. More...
 

Additional Inherited Members

- Protected Properties inherited from Data
Api $api
 
Pool $pool
 
- Public Static Methods inherited from AbstractEntity
static null self load ($caller, string $id, array $query=[])
 
static self[] loadAll ($caller, string $path, array $query=[])
 

Methods

◆ _container()

_container ( )
protected

The container/owner object, if any.

Returns
null|AbstractEntity

Reimplemented from AbstractEntity.

◆ getAddress1()

magic string getAddress1 ( )
Returns
string

◆ getAddress2()

magic string getAddress2 ( )
Returns
string

◆ getCity()

magic string getCity ( )
Returns
string

◆ getCompany()

magic string getCompany ( )
Returns
string

◆ getCountry()

magic string getCountry ( )
Returns
string

◆ getCountryCode()

magic string getCountryCode ( )

read-only

Returns
string

◆ getCountryName()

magic string getCountryName ( )
Returns
string

◆ getCustomer()

Customer getCustomer ( )
Returns
Customer

◆ getCustomerId()

magic string getCustomerId ( )

injected

Returns
string

◆ getName()

magic string getName ( )
Returns
string

◆ getPhone()

magic string getPhone ( )

non-unique

Returns
string

◆ getProvince()

magic string getProvince ( )
Returns
string

◆ getProvinceCode()

magic string getProvinceCode ( )

read-only

Returns
string

◆ getState()

string getState ( )
final

Alias for getProvince().

Returns
string

◆ getStateCode()

string getStateCode ( )
final

Alias for getProvinceCode().

Returns
string

◆ getZip()

magic string getZip ( )
Returns
string

◆ hasPhone()

magic bool hasPhone ( )
Returns
bool

◆ isDefault()

magic bool isDefault ( )
Returns
bool

◆ setAddress1()

magic $this setAddress1 ( string  $address1)
Returns
$this

◆ setAddress2()

magic $this setAddress2 ( string  $address2)
Returns
$this

◆ setCity()

magic $this setCity ( string  $city)
Returns
$this

◆ setCompany()

magic $this setCompany ( string  $company)
Returns
$this

◆ setCountry()

magic $this setCountry ( string  $country)
Returns
$this

◆ setCountryName()

magic $this setCountryName ( string  $name)
Returns
$this

◆ setDefault()

$this setDefault ( )

Sets the address as the default.

Returns
$this

◆ setName()

magic $this setName ( string  $name)
Returns
$this

◆ setPhone()

magic $this setPhone ( string  $phone)
Returns
$this

◆ setProvince()

magic $this setProvince ( string  $province)
Returns
$this

◆ setState()

$this setState ( string  $state)
final

Alias for setProvince().

Parameters
string$state
Returns
$this

◆ setZip()

magic $this setZip ( string  $zip)
Returns
$this