You are here

public function MailchimpEcommerce::getProductVariant in Mailchimp 8

Get information about a specific variant of a specific product.

Parameters

string $store_id: The store ID.

string $product_id: The id for the product of a store.

string $variant_id: The id for the product variant.

array $parameters: An array of optional parameters. See API docs.

Return value

object The API product variant response object.

Throws

\Mailchimp\MailchimpAPIException

See also

http://developer.mailchimp.com/documentation/mailchimp/reference/ecommer...

File

lib/mailchimp-api-php/src/MailchimpEcommerce.php, line 970

Class

MailchimpEcommerce
Mailchimp Ecommerce library.

Namespace

Mailchimp

Code

public function getProductVariant($store_id, $product_id, $variant_id, $parameters = []) {
  $tokens = [
    'store_id' => $store_id,
    'product_id' => $product_id,
    'variant_id' => $variant_id,
  ];
  return $this
    ->request('GET', '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', $tokens, $parameters);
}