Location
+ Inheritance diagram for Location:

Description

A location.

Immutable:
Cannot be modified via the API.
See also
https://shopify.dev/docs/admin-api/rest/reference/inventory/location

Public Properties

const DIR = 'locations'
 
const TYPE = 'location'
 
- 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 getCountryCode ()
 
magic string getCreatedAt ()
 
InventoryLevel[] getInventoryLevels ()
 
magic string getLocalizedCountryName ()
 
magic string getLocalizedProvinceName ()
 
magic string getName ()
 
magic string getPhone ()
 
magic string getProvince ()
 
magic string getProvinceCode ()
 
magic string getUpdatedAt ()
 
magic string getZip ()
 
magic bool isActive ()
 
magic bool isLegacy ()
 
InventoryLevel newInventoryLevel (InventoryItem $item)
 Factory. More...
 
magic InventoryLevel[] selectInventoryLevels (callable $filter)
 fn( InventoryLevel $level ): bool More...
 
- 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)
 

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=[])
 
- Protected Methods inherited from AbstractEntity
null AbstractEntity _container ()
 The container/owner object, if any. More...
 
mixed _get (string $field)
 Lazy-loads missing fields. More...
 
void _onDelete ()
 
void _onSave ()
 
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...
 

Methods

◆ getAddress1()

magic string getAddress1 ( )
Returns
string

◆ getAddress2()

magic string getAddress2 ( )
Returns
string

◆ getCity()

magic string getCity ( )
Returns
string

◆ getCountryCode()

magic string getCountryCode ( )
Returns
string

◆ getCreatedAt()

magic string getCreatedAt ( )
Returns
string

◆ getInventoryLevels()

InventoryLevel [] getInventoryLevels ( )
Returns
InventoryLevel[]

◆ getLocalizedCountryName()

magic string getLocalizedCountryName ( )
Returns
string

◆ getLocalizedProvinceName()

magic string getLocalizedProvinceName ( )
Returns
string

◆ getName()

magic string getName ( )
Returns
string

◆ getPhone()

magic string getPhone ( )
Returns
string

◆ getProvince()

magic string getProvince ( )
Returns
string

◆ getProvinceCode()

magic string getProvinceCode ( )
Returns
string

◆ getUpdatedAt()

magic string getUpdatedAt ( )
Returns
string

◆ getZip()

magic string getZip ( )
Returns
string

◆ isActive()

magic bool isActive ( )
Returns
bool

◆ isLegacy()

magic bool isLegacy ( )
Returns
bool

◆ newInventoryLevel()

InventoryLevel newInventoryLevel ( InventoryItem  $item)

Factory.

Parameters
InventoryItem$item
Returns
InventoryLevel

◆ selectInventoryLevels()

magic InventoryLevel [] selectInventoryLevels ( callable  $filter)

fn( InventoryLevel $level ): bool

Returns
InventoryLevel[]