You are here

public function MailchimpEcommerce::updateProductVariant in Mailchimp 8

Update 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: The data to update the variant in an array.

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 942

Class

MailchimpEcommerce
Mailchimp Ecommerce library.

Namespace

Mailchimp

Code

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