GiftCard
+ Inheritance diagram for GiftCard:

Description

A Shopify+ gift card.

Gift cards cannot be deleted.

See also
https://shopify.dev/docs/admin-api/rest/reference/plus/giftcard

Public Properties

const DIR = 'gift_cards'
 
const SEARCH_STATUS_DISABLED = 'disabled'
 
const SEARCH_STATUS_ENABLED = 'enabled'
 
const TYPE = 'gift_card'
 
- 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 getApiClientId ()
 
magic number getBalance ()
 
magic string getCreatedAt ()
 
magic string getCurrency ()
 
Customer getCustomer ()
 
magic string getCustomerId ()
 
magic string getDisabledAt ()
 
magic null string getExpiresOn ()
 
magic number getInitialValue ()
 
magic string getLastCharacters ()
 read-only More...
 
magic string getLineItemId ()
 
magic string getNote ()
 
Order getOrder ()
 
magic string getOrderId ()
 
magic null string getTemplateSuffix ()
 
magic string getUpdatedAt ()
 
User getUser ()
 
magic string getUserId ()
 
magic $this setApiClientId (string $id)
 
magic $this setBalance (number $balance)
 
magic $this setCode (string $code)
 
magic $this setCreatedAt (string $iso8601)
 
magic $this setCurrency (string $currency)
 
magic $this setCustomerId (string $id)
 
magic $this setDisabledAt (string $iso8601)
 
magic $this setExpiresOn (?string $date)
 
magic $this setInitialValue (number $value)
 
magic $this setLineItemId (string $id)
 
magic $this setNote (string $note)
 
magic $this setOrderId (string $id)
 
magic $this setTemplateSuffix (?string $suffix)
 
magic $this setUpdatedAt (string $iso8601)
 
magic $this setUserId (string $id)
 
- 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 UpdateTrait
$this update ()
 

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...
 
- Protected Methods inherited from CreateTrait
string _dir ()
 The POST directory. More...
 

Methods

◆ getApiClientId()

magic string getApiClientId ( )
Returns
string

◆ getBalance()

magic number getBalance ( )
Returns
number

◆ getCreatedAt()

magic string getCreatedAt ( )
Returns
string

◆ getCurrency()

magic string getCurrency ( )
Returns
string

◆ getCustomer()

Customer getCustomer ( )
Returns
Customer

◆ getCustomerId()

magic string getCustomerId ( )
Returns
string

◆ getDisabledAt()

magic string getDisabledAt ( )
Returns
string

◆ getExpiresOn()

magic null string getExpiresOn ( )
Returns
null|string

◆ getInitialValue()

magic number getInitialValue ( )
Returns
number

◆ getLastCharacters()

magic string getLastCharacters ( )

read-only

Returns
string

◆ getLineItemId()

magic string getLineItemId ( )
Returns
string

◆ getNote()

magic string getNote ( )
Returns
string

◆ getOrder()

Order getOrder ( )
Returns
Order

◆ getOrderId()

magic string getOrderId ( )
Returns
string

◆ getTemplateSuffix()

magic null string getTemplateSuffix ( )
Returns
null|string

◆ getUpdatedAt()

magic string getUpdatedAt ( )
Returns
string

◆ getUser()

User getUser ( )
Returns
User

◆ getUserId()

magic string getUserId ( )
Returns
string

◆ setApiClientId()

magic $this setApiClientId ( string  $id)
Returns
$this

◆ setBalance()

magic $this setBalance ( number  $balance)
Returns
$this

◆ setCode()

magic $this setCode ( string  $code)
Depends:
create-only, write-only
Returns
$this

◆ setCreatedAt()

magic $this setCreatedAt ( string  $iso8601)
Returns
$this

◆ setCurrency()

magic $this setCurrency ( string  $currency)
Returns
$this

◆ setCustomerId()

magic $this setCustomerId ( string  $id)
Returns
$this

◆ setDisabledAt()

magic $this setDisabledAt ( string  $iso8601)
Returns
$this

◆ setExpiresOn()

magic $this setExpiresOn ( ?string  $date)
Returns
$this

◆ setInitialValue()

magic $this setInitialValue ( number  $value)
Depends:
create-only
Returns
$this

◆ setLineItemId()

magic $this setLineItemId ( string  $id)
Returns
$this

◆ setNote()

magic $this setNote ( string  $note)
Returns
$this

◆ setOrderId()

magic $this setOrderId ( string  $id)
Returns
$this

◆ setTemplateSuffix()

magic $this setTemplateSuffix ( ?string  $suffix)
Returns
$this

◆ setUpdatedAt()

magic $this setUpdatedAt ( string  $iso8601)
Returns
$this

◆ setUserId()

magic $this setUserId ( string  $id)
Returns
$this