PHP Class MC4WP_API_v3

Afficher le fichier Open project: dannyvankooten/mailchimp-for-wordpress Class Usage Examples

Protected Properties

Свойство Type Description
$client MC4WP_API_v3_Client
$connected Are we able to talk to the MailChimp API?

Méthodes publiques

Méthode Description
__construct ( string $api_key ) Constructor
add_ecommerce_store ( array $args ) : object
add_ecommerce_store_cart ( string $store_id, array $args ) : object
add_ecommerce_store_cart_line ( string $store_id, string $cart_id, array $args ) : object
add_ecommerce_store_customer ( $store_id, array $args ) : object Add OR update a store customer
add_ecommerce_store_order ( string $store_id, array $args ) : object
add_ecommerce_store_order_line ( string $store_id, string $order_id, array $args ) : object
add_ecommerce_store_product ( string $store_id, array $args ) : object Add a product to a store
add_ecommerce_store_product_variant ( string $store_id, string $product_id, array $args ) : object Add OR update a product variant.
add_list_member ( string $list_id, array $args ) : object Add or update (!) a member to a MailChimp list.
add_list_members ( string $list_id, array $args ) : object Batch subscribe / unsubscribe list members.
delete_ecommerce_store ( string $store_id ) : boolean
delete_ecommerce_store_cart ( string $store_id, string $cart_id ) : boolean
delete_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id ) : boolean
delete_ecommerce_store_customer ( string $store_id, string $customer_id ) : boolean
delete_ecommerce_store_order ( string $store_id, string $order_id ) : boolean
delete_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id ) : boolean
delete_ecommerce_store_product ( string $store_id, string $product_id ) : boolean
delete_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id ) : boolean
delete_list_member ( string $list_id, string $email_address ) : boolean
get_ecommerce_store ( string $store_id, array $args = [] ) : object
get_ecommerce_store_cart ( string $store_id, string $cart_id, array $args = [] ) : object
get_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args = [] ) : object
get_ecommerce_store_cart_lines ( string $store_id, string $cart_id, array $args = [] ) : object
get_ecommerce_store_carts ( string $store_id, array $args = [] ) : object
get_ecommerce_store_customer ( string $store_id, string $customer_id, array $args = [] ) : object
get_ecommerce_store_customers ( string $store_id, array $args = [] ) : object
get_ecommerce_store_order ( string $store_id, string $order_id, array $args = [] ) : object
get_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args = [] ) : object
get_ecommerce_store_order_lines ( string $store_id, string $order_id, array $args = [] ) : object
get_ecommerce_store_orders ( string $store_id, array $args = [] ) : object
get_ecommerce_store_product ( string $store_id, string $product_id, array $args = [] ) : object
get_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args = [] ) : object
get_ecommerce_store_product_variants ( string $store_id, string $product_id, array $args = [] ) : object
get_ecommerce_store_products ( string $store_id, array $args = [] ) : object
get_last_response_body ( ) : string
get_last_response_headers ( ) : array
get_list ( string $list_id, array $args = [] ) : object
get_list_activity ( string $list_id ) : array Get recent daily, aggregated activity stats for a list.
get_list_interest_categories ( string $list_id, array $args = [] ) : array Gets the interest categories for a given List
get_list_interest_category_interests ( string $list_id, string $interest_category_id, array $args = [] ) : array
get_list_member ( string $list_id, string $email_address, array $args = [] ) : object
get_list_merge_fields ( string $list_id, array $args = [] ) : array Get merge vars for a given list
get_lists ( array $args = [] ) : array
get_subscriber_hash ( $email_address ) : string
is_connected ( ) : boolean Pings the MailChimp API to see if we're connected
update_ecommerce_store ( string $store_id, array $args ) : object
update_ecommerce_store_cart ( string $store_id, string $cart_id, array $args ) : object
update_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args ) : object
update_ecommerce_store_customer ( string $store_id, string $customer_id, array $args ) : object
update_ecommerce_store_order ( string $store_id, string $order_id, array $args ) : object
update_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args ) : object
update_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args ) : object
update_list_member ( $list_id, $email_address, array $args ) : object

Method Details

__construct() public méthode

Constructor
public __construct ( string $api_key )
$api_key string

add_ecommerce_store_customer() public méthode

Add OR update a store customer
public add_ecommerce_store_customer ( $store_id, array $args ) : object
$store_id
$args array
Résultat object

add_ecommerce_store_product() public méthode

Add a product to a store
public add_ecommerce_store_product ( string $store_id, array $args ) : object
$store_id string
$args array
Résultat object

add_ecommerce_store_product_variant() public méthode

Add OR update a product variant.
public add_ecommerce_store_product_variant ( string $store_id, string $product_id, array $args ) : object
$store_id string
$product_id string
$args array
Résultat object

add_list_member() public méthode

Add or update (!) a member to a MailChimp list.
public add_list_member ( string $list_id, array $args ) : object
$list_id string
$args array
Résultat object

add_list_members() public méthode

Batch subscribe / unsubscribe list members.
public add_list_members ( string $list_id, array $args ) : object
$list_id string
$args array
Résultat object

delete_list_member() public méthode

public delete_list_member ( string $list_id, string $email_address ) : boolean
$list_id string
$email_address string
Résultat boolean

get_ecommerce_store() public méthode

public get_ecommerce_store ( string $store_id, array $args = [] ) : object
$store_id string
$args array
Résultat object

get_ecommerce_store_cart() public méthode

public get_ecommerce_store_cart ( string $store_id, string $cart_id, array $args = [] ) : object
$store_id string
$cart_id string
$args array
Résultat object

get_ecommerce_store_cart_line() public méthode

public get_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args = [] ) : object
$store_id string
$cart_id string
$line_id string
$args array
Résultat object

get_ecommerce_store_customer() public méthode

public get_ecommerce_store_customer ( string $store_id, string $customer_id, array $args = [] ) : object
$store_id string
$customer_id string
$args array
Résultat object

get_ecommerce_store_order() public méthode

public get_ecommerce_store_order ( string $store_id, string $order_id, array $args = [] ) : object
$store_id string
$order_id string
$args array
Résultat object

get_ecommerce_store_order_line() public méthode

public get_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args = [] ) : object
$store_id string
$order_id string
$line_id string
$args array
Résultat object

get_ecommerce_store_product() public méthode

public get_ecommerce_store_product ( string $store_id, string $product_id, array $args = [] ) : object
$store_id string
$product_id string
$args array
Résultat object

get_ecommerce_store_product_variant() public méthode

public get_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args = [] ) : object
$store_id string
$product_id string
$variant_id string
$args array
Résultat object

get_last_response_body() public méthode

public get_last_response_body ( ) : string
Résultat string

get_last_response_headers() public méthode

public get_last_response_headers ( ) : array
Résultat array

get_list() public méthode

public get_list ( string $list_id, array $args = [] ) : object
$list_id string
$args array
Résultat object

get_list_activity() public méthode

Get recent daily, aggregated activity stats for a list.
public get_list_activity ( string $list_id ) : array
$list_id string
Résultat array

get_list_interest_categories() public méthode

Gets the interest categories for a given List
public get_list_interest_categories ( string $list_id, array $args = [] ) : array
$list_id string
$args array
Résultat array

get_list_interest_category_interests() public méthode

public get_list_interest_category_interests ( string $list_id, string $interest_category_id, array $args = [] ) : array
$list_id string
$interest_category_id string
$args array
Résultat array

get_list_member() public méthode

public get_list_member ( string $list_id, string $email_address, array $args = [] ) : object
$list_id string
$email_address string
$args array
Résultat object

get_list_merge_fields() public méthode

Get merge vars for a given list
public get_list_merge_fields ( string $list_id, array $args = [] ) : array
$list_id string
$args array
Résultat array

get_lists() public méthode

public get_lists ( array $args = [] ) : array
$args array
Résultat array

get_subscriber_hash() public méthode

public get_subscriber_hash ( $email_address ) : string
$email_address
Résultat string

is_connected() public méthode

The result is cached to ensure a maximum of 1 API call per page load
public is_connected ( ) : boolean
Résultat boolean

update_ecommerce_store_cart_line() public méthode

public update_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args ) : object
$store_id string
$cart_id string
$line_id string
$args array
Résultat object

update_ecommerce_store_customer() public méthode

public update_ecommerce_store_customer ( string $store_id, string $customer_id, array $args ) : object
$store_id string
$customer_id string
$args array
Résultat object

update_ecommerce_store_order_line() public méthode

public update_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args ) : object
$store_id string
$order_id string
$line_id string
$args array
Résultat object

update_ecommerce_store_product_variant() public méthode

public update_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args ) : object
$store_id string
$product_id string
$variant_id string
$args array
Résultat object

update_list_member() public méthode

public update_list_member ( $list_id, $email_address, array $args ) : object
$list_id
$email_address
$args array
Résultat object

Property Details

$client protected_oe property

protected MC4WP_API_v3_Client $client
Résultat MC4WP_API_v3_Client

$connected protected_oe property

Are we able to talk to the MailChimp API?
protected $connected