pub struct Ecommerce {
    pub client: Client,
}

Fields

client: Client

Implementations

List account orders.

This function performs a GET to the /ecommerce/orders endpoint.

Get information about an account’s orders.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • campaign_id: &str – Restrict results to orders with a specific campaign_id value.
  • outreach_id: &str – Restrict results to orders with a specific outreach_id value.
  • customer_id: &str – Restrict results to orders made by a specific customer.
  • has_outreach: bool – Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.

List stores.

This function performs a GET to the /ecommerce/stores endpoint.

Get information about all stores in the account.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.

Add store.

This function performs a POST to the /ecommerce/stores endpoint.

Add a new store to your Mailchimp account.

Get store info.

This function performs a GET to the /ecommerce/stores/{store_id} endpoint.

Get information about a specific store.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.

Delete store.

This function performs a DELETE to the /ecommerce/stores/{store_id} endpoint.

Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts.

Parameters:

  • store_id: &str – The name of the folder.

Update store.

This function performs a PATCH to the /ecommerce/stores/{store_id} endpoint.

Update a store.

Parameters:

  • store_id: &str – The name of the folder.

List carts.

This function performs a GET to the /ecommerce/stores/{store_id}/carts endpoint.

Get information about a store’s carts.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.

Add cart.

This function performs a POST to the /ecommerce/stores/{store_id}/carts endpoint.

Add a new cart to a store.

Parameters:

  • store_id: &str – The name of the folder.

Get cart info.

This function performs a GET to the /ecommerce/stores/{store_id}/carts/{cart_id} endpoint.

Get information about a specific cart.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.

Delete cart.

This function performs a DELETE to the /ecommerce/stores/{store_id}/carts/{cart_id} endpoint.

Delete a cart.

Parameters:

  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.

Update cart.

This function performs a PATCH to the /ecommerce/stores/{store_id}/carts/{cart_id} endpoint.

Update a specific cart.

Parameters:

  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.

List cart line items.

This function performs a GET to the /ecommerce/stores/{store_id}/carts/{cart_id}/lines endpoint.

Get information about a cart’s line items.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.

Add cart line item.

This function performs a POST to the /ecommerce/stores/{store_id}/carts/{cart_id}/lines endpoint.

Add a new line item to an existing cart.

Parameters:

  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.

Get cart line item.

This function performs a GET to the /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} endpoint.

Get information about a specific cart line item.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.
  • line_id: &str – The id for the line item of a cart.

Delete cart line item.

This function performs a DELETE to the /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} endpoint.

Delete a specific cart line item.

Parameters:

  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.
  • line_id: &str – The id for the line item of a cart.

Update cart line item.

This function performs a PATCH to the /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} endpoint.

Update a specific cart line item.

Parameters:

  • store_id: &str – The name of the folder.
  • cart_id: &str – The name of the folder.
  • line_id: &str – The id for the line item of a cart.

List customers.

This function performs a GET to the /ecommerce/stores/{store_id}/customers endpoint.

Get information about a store’s customers.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.
  • email_address: &str – Restrict the response to customers with the email address.

Add customer.

This function performs a POST to the /ecommerce/stores/{store_id}/customers endpoint.

Add a new customer to a store.

Parameters:

  • store_id: &str – The name of the folder.

Get customer info.

This function performs a GET to the /ecommerce/stores/{store_id}/customers/{customer_id} endpoint.

Get information about a specific customer.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • customer_id: &str – The id for the customer of a store.

Add or update customer.

This function performs a PUT to the /ecommerce/stores/{store_id}/customers/{customer_id} endpoint.

Add or update a customer.

Parameters:

  • store_id: &str – The name of the folder.
  • customer_id: &str – The id for the customer of a store.

Delete customer.

This function performs a DELETE to the /ecommerce/stores/{store_id}/customers/{customer_id} endpoint.

Delete a customer from a store.

Parameters:

  • store_id: &str – The name of the folder.
  • customer_id: &str – The id for the customer of a store.

Update customer.

This function performs a PATCH to the /ecommerce/stores/{store_id}/customers/{customer_id} endpoint.

Update a customer.

Parameters:

  • store_id: &str – The name of the folder.
  • customer_id: &str – The id for the customer of a store.

List promo rules.

This function performs a GET to the /ecommerce/stores/{store_id}/promo-rules endpoint.

Get information about a store’s promo rules.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.

Add promo rule.

This function performs a POST to the /ecommerce/stores/{store_id}/promo-rules endpoint.

Add a new promo rule to a store.

Parameters:

  • store_id: &str – The name of the folder.

Get promo rule.

This function performs a GET to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id} endpoint.

Get information about a specific promo rule.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • promo_rule_id: &str – The id for the promo rule of a store.

Delete promo rule.

This function performs a DELETE to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id} endpoint.

Delete a promo rule from a store.

Parameters:

  • store_id: &str – The name of the folder.
  • promo_rule_id: &str – The id for the promo rule of a store.

Update promo rule.

This function performs a PATCH to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id} endpoint.

Update a promo rule.

Parameters:

  • store_id: &str – The name of the folder.
  • promo_rule_id: &str – The id for the promo rule of a store.

List promo codes.

This function performs a GET to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes endpoint.

Get information about a store’s promo codes.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • promo_rule_id: &str – The id for the promo rule of a store.
  • store_id: &str – The name of the folder.

Add promo code.

This function performs a POST to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes endpoint.

Add a new promo code to a store.

Parameters:

  • store_id: &str – The name of the folder.
  • promo_rule_id: &str – The id for the promo rule of a store.

Get promo code.

This function performs a GET to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id} endpoint.

Get information about a specific promo code.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • promo_rule_id: &str – The id for the promo rule of a store.
  • promo_code_id: &str – The id for the promo code of a store.

Delete promo code.

This function performs a DELETE to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id} endpoint.

Delete a promo code from a store.

Parameters:

  • store_id: &str – The name of the folder.
  • promo_rule_id: &str – The id for the promo rule of a store.
  • promo_code_id: &str – The id for the promo code of a store.

Update promo code.

This function performs a PATCH to the /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id} endpoint.

Update a promo code.

Parameters:

  • store_id: &str – The name of the folder.
  • promo_rule_id: &str – The id for the promo rule of a store.
  • promo_code_id: &str – The id for the promo code of a store.

List orders.

This function performs a GET to the /ecommerce/stores/{store_id}/orders endpoint.

Get information about a store’s orders.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.
  • customer_id: &str – Restrict results to orders made by a specific customer.
  • has_outreach: bool – Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
  • campaign_id: &str – Restrict results to orders with a specific campaign_id value.
  • outreach_id: &str – Restrict results to orders with a specific outreach_id value.

Add order.

This function performs a POST to the /ecommerce/stores/{store_id}/orders endpoint.

Add a new order to a store.

Parameters:

  • store_id: &str – The name of the folder.

Get order info.

This function performs a GET to the /ecommerce/stores/{store_id}/orders/{order_id} endpoint.

Get information about a specific order.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.

Delete order.

This function performs a DELETE to the /ecommerce/stores/{store_id}/orders/{order_id} endpoint.

Delete an order.

Parameters:

  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.

Update order.

This function performs a PATCH to the /ecommerce/stores/{store_id}/orders/{order_id} endpoint.

Update a specific order.

Parameters:

  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.

List order line items.

This function performs a GET to the /ecommerce/stores/{store_id}/orders/{order_id}/lines endpoint.

Get information about an order’s line items.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.

Add order line item.

This function performs a POST to the /ecommerce/stores/{store_id}/orders/{order_id}/lines endpoint.

Add a new line item to an existing order.

Parameters:

  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.

Get order line item.

This function performs a GET to the /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} endpoint.

Get information about a specific order line item.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.
  • line_id: &str – The id for the line item of an order.

Delete order line item.

This function performs a DELETE to the /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} endpoint.

Delete a specific order line item.

Parameters:

  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.
  • line_id: &str – The id for the line item of an order.

Update order line item.

This function performs a PATCH to the /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} endpoint.

Update a specific order line item.

Parameters:

  • store_id: &str – The name of the folder.
  • order_id: &str – The id for the order in a store.
  • line_id: &str – The id for the line item of an order.

List product.

This function performs a GET to the /ecommerce/stores/{store_id}/products endpoint.

Get information about a store’s products.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.

Add product.

This function performs a POST to the /ecommerce/stores/{store_id}/products endpoint.

Add a new product to a store.

Parameters:

  • store_id: &str – The name of the folder.

Get product info.

This function performs a GET to the /ecommerce/stores/{store_id}/products/{product_id} endpoint.

Get information about a specific product.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.

Delete product.

This function performs a DELETE to the /ecommerce/stores/{store_id}/products/{product_id} endpoint.

Delete a product.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.

Update product.

This function performs a PATCH to the /ecommerce/stores/{store_id}/products/{product_id} endpoint.

Update a specific product.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.

List product variants.

This function performs a GET to the /ecommerce/stores/{store_id}/products/{product_id}/variants endpoint.

Get information about a product’s variants.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.

Add product variant.

This function performs a POST to the /ecommerce/stores/{store_id}/products/{product_id}/variants endpoint.

Add a new variant to the product.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.

Get product variant info.

This function performs a GET to the /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} endpoint.

Get information about a specific product variant.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.
  • variant_id: &str – The id for the product variant.

Add or update product variant.

This function performs a PUT to the /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} endpoint.

Add or update a product variant.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.
  • variant_id: &str – The id for the product variant.

Delete product variant.

This function performs a DELETE to the /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} endpoint.

Delete a product variant.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.
  • variant_id: &str – The id for the product variant.

Update product variant.

This function performs a PATCH to the /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} endpoint.

Update a product variant.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.
  • variant_id: &str – The id for the product variant.

List product images.

This function performs a GET to the /ecommerce/stores/{store_id}/products/{product_id}/images endpoint.

Get information about a product’s images.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.

Add product image.

This function performs a POST to the /ecommerce/stores/{store_id}/products/{product_id}/images endpoint.

Add a new image to the product.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.

Get product image info.

This function performs a GET to the /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} endpoint.

Get information about a specific product image.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.
  • image_id: &str – The id for the product image.

Delete product image.

This function performs a DELETE to the /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} endpoint.

Delete a product image.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.
  • image_id: &str – The id for the product image.

Update product image.

This function performs a PATCH to the /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} endpoint.

Update a product image.

Parameters:

  • store_id: &str – The name of the folder.
  • product_id: &str – The id for the product of a store.
  • image_id: &str – The id for the product image.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more