MarketingEvent
+ Inheritance diagram for MarketingEvent:

Description

Public Properties

const BUDGET_DAILY = 'daily'
 
const BUDGET_LIFETIME = 'lifetime'
 
const CHANNEL_DISPLAY = 'display'
 
const CHANNEL_EMAIL = 'email'
 
const CHANNEL_REFERRAL = 'referral'
 
const CHANNEL_SEARCH = 'search'
 
const CHANNEL_SOCIAL = 'social'
 
const DIR = 'marketing_events'
 
const MAP
 
const TYPE = 'marketing_event'
 
const TYPE_ABANDONED_CART = 'abandoned_cart'
 
const TYPE_AD = 'ad'
 
const TYPE_AFFILIATE = 'affiliate'
 
const TYPE_LOYALTY = 'loyalty'
 
const TYPE_MESSAGE = 'message'
 
const TYPE_NEWSLETTER = 'newsletter'
 
const TYPE_POST = 'post'
 
const TYPE_RETARGETING = 'retargeting'
 
const TYPE_TRANSACTIONAL = 'transactional'
 
- 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 number getBudget ()
 
magic string getBudgetType ()
 see the budget constants More...
 
magic string getCurrency ()
 
magic string getDescription ()
 
magic string getEndedAt ()
 
magic string getEventType ()
 see the type constants. More...
 
magic string getManageUrl ()
 
magic Resource[] getMarketedResources ()
 
magic string getMarketingChannel ()
 see the channel constants. More...
 
magic string getPreviewUrl ()
 
magic string getReferringDomain ()
 
magic string getRemoteId ()
 
magic string getScheduledToEndAt ()
 
magic string getStartedAt ()
 
magic string getUtmCampaign ()
 
magic string getUtmMedium ()
 
magic string getUtmSource ()
 
magic bool isPaid ()
 
mixed newEngagement ()
 Factory. More...
 
Resource newResource ()
 Factory. More...
 
$this sendEngagements (array $engagements)
 
magic $this setBudget (number $budget)
 
magic $this setBudgetType (string $type)
 see the budget constants More...
 
magic $this setCurrency (string $currency)
 
magic $this setDescription (string $text)
 
magic $this setEndedAt (string $iso8601)
 
magic $this setEventType (string $type)
 
magic $this setManageUrl (string $url)
 
magic $this setMarketedResources (Resource[] $resources)
 
magic $this setMarketingChannel (string $channel)
 
magic $this setPaid (bool $paid)
 
magic $this setPreviewUrl (string $url)
 
magic $this setReferringDomain (string $domain)
 
magic $this setRemoteId (string $id)
 
magic $this setScheduledToEndAt (string $iso8601)
 
magic $this setStartedAt (string $iso8601)
 
magic $this setUtmCampaign (string $campaign)
 
magic $this setUtmMedium (string $medium)
 
magic $this setUtmSource (string $source)
 
- 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 ()
 

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...
 

Properties

◆ MAP

const MAP
Initial value:
= [
'marketed_resources' => [Resource::class]
]

Methods

◆ getBudget()

magic number getBudget ( )
Returns
number

◆ getBudgetType()

magic string getBudgetType ( )

see the budget constants

Returns
string

◆ getCurrency()

magic string getCurrency ( )
Returns
string

◆ getDescription()

magic string getDescription ( )
Returns
string

◆ getEndedAt()

magic string getEndedAt ( )
Returns
string

◆ getEventType()

magic string getEventType ( )

see the type constants.

Returns
string

◆ getManageUrl()

magic string getManageUrl ( )
Returns
string

◆ getMarketedResources()

magic Resource [] getMarketedResources ( )
Returns
Resource[]

◆ getMarketingChannel()

magic string getMarketingChannel ( )

see the channel constants.

Returns
string

◆ getPreviewUrl()

magic string getPreviewUrl ( )
Returns
string

◆ getReferringDomain()

magic string getReferringDomain ( )
Returns
string

◆ getRemoteId()

magic string getRemoteId ( )
Returns
string

◆ getScheduledToEndAt()

magic string getScheduledToEndAt ( )
Returns
string

◆ getStartedAt()

magic string getStartedAt ( )
Returns
string

◆ getUtmCampaign()

magic string getUtmCampaign ( )
Returns
string

◆ getUtmMedium()

magic string getUtmMedium ( )
Returns
string

◆ getUtmSource()

magic string getUtmSource ( )
Returns
string

◆ isPaid()

magic bool isPaid ( )
Returns
bool

◆ newEngagement()

mixed newEngagement ( )

Factory.

Returns
mixed

◆ newResource()

Resource newResource ( )

Factory.

Returns
Resource

◆ sendEngagements()

$this sendEngagements ( array  $engagements)
Parameters
Engagement[]$engagements
Returns
$this

◆ setBudget()

magic $this setBudget ( number  $budget)
Returns
$this

◆ setBudgetType()

magic $this setBudgetType ( string  $type)

see the budget constants

Returns
$this

◆ setCurrency()

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

◆ setDescription()

magic $this setDescription ( string  $text)
Returns
$this

◆ setEndedAt()

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

◆ setEventType()

magic $this setEventType ( string  $type)
Depends:
required, see the type constants.
Returns
$this

◆ setManageUrl()

magic $this setManageUrl ( string  $url)
Returns
$this

◆ setMarketedResources()

magic $this setMarketedResources ( Resource[]  $resources)
Returns
$this

◆ setMarketingChannel()

magic $this setMarketingChannel ( string  $channel)
Depends:
required, see the channel constants.
Returns
$this

◆ setPaid()

magic $this setPaid ( bool  $paid)
Depends:
required
Returns
$this

◆ setPreviewUrl()

magic $this setPreviewUrl ( string  $url)
Returns
$this

◆ setReferringDomain()

magic $this setReferringDomain ( string  $domain)
Returns
$this

◆ setRemoteId()

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

◆ setScheduledToEndAt()

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

◆ setStartedAt()

magic $this setStartedAt ( string  $iso8601)
Depends:
required
Returns
$this

◆ setUtmCampaign()

magic $this setUtmCampaign ( string  $campaign)
Returns
$this

◆ setUtmMedium()

magic $this setUtmMedium ( string  $medium)
Returns
$this

◆ setUtmSource()

magic $this setUtmSource ( string  $source)
Returns
$this