CrmApiV2
in package
This is the main class to interact with the CRM
Table of Contents
- $apiInterface : ApiInterface
- The Api object that will handle requests and responses
- __construct() : mixed
- getCustomer() : Customer
- Get a customer from its hashcode or email If it does not exists a new instance will be returned. You would have to call its save method later on.
- getCustomerOrNew() : Customer
- Get a customer from its hashcode or email If it does not exists a new instance will be returned. You would have to call its save method later on.
- getQuestions() : Customer
- Get all segmentation questions
- ping() : bool
- Use this the ping the crm and know its current status
- setStatus() : bool
- Set the single optin status for an email
Properties
$apiInterface
The Api object that will handle requests and responses
private
static ApiInterface
$apiInterface
Methods
__construct()
public
__construct() : mixed
Return values
mixed —getCustomer()
Get a customer from its hashcode or email If it does not exists a new instance will be returned. You would have to call its save method later on.
public
getCustomer(string $identification) : Customer
Parameters
- $identification : string
-
The customer hashcode or email
Return values
Customer —getCustomerOrNew()
Get a customer from its hashcode or email If it does not exists a new instance will be returned. You would have to call its save method later on.
public
getCustomerOrNew(string $identification) : Customer
Parameters
- $identification : string
-
The customer hashcode or email
Return values
Customer —getQuestions()
Get all segmentation questions
public
getQuestions(string $identification) : Customer
Parameters
- $identification : string
-
The customer hashcode or email
Return values
Customer —ping()
Use this the ping the crm and know its current status
public
ping() : bool
Return values
bool —setStatus()
Set the single optin status for an email
public
static setStatus(string $email, bool $opt_in) : bool
Parameters
- $email : string
- $opt_in : bool
Tags
Return values
bool —true if succeeded