=begin #Mailchimp Marketing API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 3.0.5 Contact: apihelp@mailchimp.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.12 =end require 'uri' module MailchimpMarketing class EcommerceApi attr_accessor :api_client def initialize(api_client) @api_client = api_client end # Delete store # Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # @param store_id The store id. # @param [Hash] opts the optional parameters # @return [nil] def delete_store(store_id = {}, opts = {}) delete_store_with_http_info(store_id, opts) nil end # Delete store # Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # @param store_id The store id. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_store_with_http_info(store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete cart # Delete a cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param [Hash] opts the optional parameters # @return [nil] def delete_store_cart(store_id = {}, cart_id = {}, opts = {}) delete_store_cart_with_http_info(store_id, cart_id, opts) nil end # Delete cart # Delete a cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_store_cart_with_http_info(store_id, cart_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete cart line item # Delete a specific cart line item. # @param store_id The store id. # @param cart_id The id for the cart. # @param line_id The id for the line item of a cart. # @param [Hash] opts the optional parameters # @return [nil] def delete_cart_line_item(store_id = {}, cart_id = {}, line_id = {}, opts = {}) delete_cart_line_item_with_http_info(store_id, cart_id, line_id, opts) nil end # Delete cart line item # Delete a specific cart line item. # @param store_id The store id. # @param cart_id The id for the cart. # @param line_id The id for the line item of a cart. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_cart_line_item_with_http_info(store_id, cart_id, line_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete customer # Delete a customer from a store. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param [Hash] opts the optional parameters # @return [nil] def delete_store_customer(store_id = {}, customer_id = {}, opts = {}) delete_store_customer_with_http_info(store_id, customer_id, opts) nil end # Delete customer # Delete a customer from a store. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_store_customer_with_http_info(store_id, customer_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete order # Delete an order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param [Hash] opts the optional parameters # @return [nil] def delete_order(store_id = {}, order_id = {}, opts = {}) delete_order_with_http_info(store_id, order_id, opts) nil end # Delete order # Delete an order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_order_with_http_info(store_id, order_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete order line item # Delete a specific order line item. # @param store_id The store id. # @param order_id The id for the order in a store. # @param line_id The id for the line item of an order. # @param [Hash] opts the optional parameters # @return [nil] def delete_order_line_item(store_id = {}, order_id = {}, line_id = {}, opts = {}) delete_order_line_item_with_http_info(store_id, order_id, line_id, opts) nil end # Delete order line item # Delete a specific order line item. # @param store_id The store id. # @param order_id The id for the order in a store. # @param line_id The id for the line item of an order. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_order_line_item_with_http_info(store_id, order_id, line_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete product # Delete a product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @return [nil] def delete_store_product(store_id = {}, product_id = {}, opts = {}) delete_store_product_with_http_info(store_id, product_id, opts) nil end # Delete product # Delete a product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_store_product_with_http_info(store_id, product_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete product image # Delete a product image. # @param store_id The store id. # @param product_id The id for the product of a store. # @param image_id The id for the product image. # @param [Hash] opts the optional parameters # @return [nil] def delete_product_image(store_id = {}, product_id = {}, image_id = {}, opts = {}) delete_product_image_with_http_info(store_id, product_id, image_id, opts) nil end # Delete product image # Delete a product image. # @param store_id The store id. # @param product_id The id for the product of a store. # @param image_id The id for the product image. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_product_image_with_http_info(store_id, product_id, image_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete product variant # Delete a product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param [Hash] opts the optional parameters # @return [nil] def delete_product_variant(store_id = {}, product_id = {}, variant_id = {}, opts = {}) delete_product_variant_with_http_info(store_id, product_id, variant_id, opts) nil end # Delete product variant # Delete a product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_product_variant_with_http_info(store_id, product_id, variant_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete promo code # Delete a promo code from a store. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param promo_code_id The id for the promo code of a store. # @param [Hash] opts the optional parameters # @return [nil] def delete_promo_code(store_id = {}, promo_rule_id = {}, promo_code_id = {}, opts = {}) delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts) nil end # Delete promo code # Delete a promo code from a store. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param promo_code_id The id for the promo code of a store. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # Delete promo rule # Delete a promo rule from a store. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param [Hash] opts the optional parameters # @return [nil] def delete_promo_rule(store_id = {}, promo_rule_id = {}, opts = {}) delete_promo_rule_with_http_info(store_id, promo_rule_id, opts) nil end # Delete promo rule # Delete a promo rule from a store. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_promo_rule_with_http_info(store_id, promo_rule_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end # List e commerce api resources # Get information about the e-commerce endpoint's resources. # @param [Hash] opts the optional parameters # @return [EcommerceRoot] def info(opts = {}) data, _status_code, _headers = info_with_http_info(opts) data end # List e commerce api resources # Get information about the e-commerce endpoint's resources. # @param [Hash] opts the optional parameters # @return [Array<(EcommerceRoot, Fixnum, Hash)>] EcommerceRoot data, response status code and response headers def info_with_http_info(opts = {}) # resource path local_var_path = '/ecommerce' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceRoot') return data, status_code, headers end # List account orders # Get information about an account's orders. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @option opts [String] :campaign_id Restrict results to orders with a specific `campaign_id` value. # @option opts [String] :outreach_id Restrict results to orders with a specific `outreach_id` value. # @option opts [String] :customer_id Restrict results to orders made by a specific customer. # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad. # @return [Orders1] def orders(opts = {}) data, _status_code, _headers = orders_with_http_info(opts) data end # List account orders # Get information about an account's orders. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @option opts [String] :campaign_id Restrict results to orders with a specific `campaign_id` value. # @option opts [String] :outreach_id Restrict results to orders with a specific `outreach_id` value. # @option opts [String] :customer_id Restrict results to orders made by a specific customer. # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad. # @return [Array<(Orders1, Fixnum, Hash)>] Orders1 data, response status code and response headers def orders_with_http_info(opts = {}) # resource path local_var_path = '/ecommerce/orders' # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil? query_params[:'outreach_id'] = opts[:'outreach_id'] if !opts[:'outreach_id'].nil? query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'has_outreach'] = opts[:'has_outreach'] if !opts[:'has_outreach'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Orders1') return data, status_code, headers end # List stores # Get information about all stores in the account. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [EcommerceStores] def stores(opts = {}) data, _status_code, _headers = stores_with_http_info(opts) data end # List stores # Get information about all stores in the account. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(EcommerceStores, Fixnum, Hash)>] EcommerceStores data, response status code and response headers def stores_with_http_info(opts = {}) # resource path local_var_path = '/ecommerce/stores' # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceStores') return data, status_code, headers end # Get store info # Get information about a specific store. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceStore] def get_store(store_id = {}, opts = {}) data, _status_code, _headers = get_store_with_http_info(store_id, opts) data end # Get store info # Get information about a specific store. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceStore, Fixnum, Hash)>] EcommerceStore data, response status code and response headers def get_store_with_http_info(store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceStore') return data, status_code, headers end # List carts # Get information about a store's carts. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [Carts2] def get_store_carts(store_id = {}, opts = {}) data, _status_code, _headers = get_store_carts_with_http_info(store_id, opts) data end # List carts # Get information about a store's carts. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(Carts2, Fixnum, Hash)>] Carts2 data, response status code and response headers def get_store_carts_with_http_info(store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Carts2') return data, status_code, headers end # Get cart info # Get information about a specific cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceCart] def get_store_cart(store_id = {}, cart_id = {}, opts = {}) data, _status_code, _headers = get_store_cart_with_http_info(store_id, cart_id, opts) data end # Get cart info # Get information about a specific cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceCart, Fixnum, Hash)>] EcommerceCart data, response status code and response headers def get_store_cart_with_http_info(store_id, cart_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCart') return data, status_code, headers end # List cart line items # Get information about a cart's line items. # @param store_id The store id. # @param cart_id The id for the cart. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [CartLines] def get_all_cart_line_items(store_id = {}, cart_id = {}, opts = {}) data, _status_code, _headers = get_all_cart_line_items_with_http_info(store_id, cart_id, opts) data end # List cart line items # Get information about a cart's line items. # @param store_id The store id. # @param cart_id The id for the cart. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(CartLines, Fixnum, Hash)>] CartLines data, response status code and response headers def get_all_cart_line_items_with_http_info(store_id, cart_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CartLines') return data, status_code, headers end # Get cart line item # Get information about a specific cart line item. # @param store_id The store id. # @param cart_id The id for the cart. # @param line_id The id for the line item of a cart. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceCartLineItem] def get_cart_line_item(store_id = {}, cart_id = {}, line_id = {}, opts = {}) data, _status_code, _headers = get_cart_line_item_with_http_info(store_id, cart_id, line_id, opts) data end # Get cart line item # Get information about a specific cart line item. # @param store_id The store id. # @param cart_id The id for the cart. # @param line_id The id for the line item of a cart. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceCartLineItem, Fixnum, Hash)>] EcommerceCartLineItem data, response status code and response headers def get_cart_line_item_with_http_info(store_id, cart_id, line_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCartLineItem') return data, status_code, headers end # List customers # Get information about a store's customers. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @option opts [String] :email_address Restrict the response to customers with the email address. # @return [Customers] def get_all_store_customers(store_id = {}, opts = {}) data, _status_code, _headers = get_all_store_customers_with_http_info(store_id, opts) data end # List customers # Get information about a store's customers. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @option opts [String] :email_address Restrict the response to customers with the email address. # @return [Array<(Customers, Fixnum, Hash)>] Customers data, response status code and response headers def get_all_store_customers_with_http_info(store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'email_address'] = opts[:'email_address'] if !opts[:'email_address'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Customers') return data, status_code, headers end # Get customer info # Get information about a specific customer. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceCustomer] def get_store_customer(store_id = {}, customer_id = {}, opts = {}) data, _status_code, _headers = get_store_customer_with_http_info(store_id, customer_id, opts) data end # Get customer info # Get information about a specific customer. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers def get_store_customer_with_http_info(store_id, customer_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCustomer') return data, status_code, headers end # List orders # Get information about a store's orders. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @option opts [String] :customer_id Restrict results to orders made by a specific customer. # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad. # @option opts [String] :campaign_id Restrict results to orders with a specific `campaign_id` value. # @option opts [String] :outreach_id Restrict results to orders with a specific `outreach_id` value. # @return [Orders2] def get_store_orders(store_id = {}, opts = {}) data, _status_code, _headers = get_store_orders_with_http_info(store_id, opts) data end # List orders # Get information about a store's orders. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @option opts [String] :customer_id Restrict results to orders made by a specific customer. # @option opts [BOOLEAN] :has_outreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad. # @option opts [String] :campaign_id Restrict results to orders with a specific `campaign_id` value. # @option opts [String] :outreach_id Restrict results to orders with a specific `outreach_id` value. # @return [Array<(Orders2, Fixnum, Hash)>] Orders2 data, response status code and response headers def get_store_orders_with_http_info(store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'has_outreach'] = opts[:'has_outreach'] if !opts[:'has_outreach'].nil? query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil? query_params[:'outreach_id'] = opts[:'outreach_id'] if !opts[:'outreach_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Orders2') return data, status_code, headers end # Get order info # Get information about a specific order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceOrder] def get_order(store_id = {}, order_id = {}, opts = {}) data, _status_code, _headers = get_order_with_http_info(store_id, order_id, opts) data end # Get order info # Get information about a specific order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceOrder, Fixnum, Hash)>] EcommerceOrder data, response status code and response headers def get_order_with_http_info(store_id, order_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceOrder') return data, status_code, headers end # List order line items # Get information about an order's line items. # @param store_id The store id. # @param order_id The id for the order in a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [OrderLines] def get_all_order_line_items(store_id = {}, order_id = {}, opts = {}) data, _status_code, _headers = get_all_order_line_items_with_http_info(store_id, order_id, opts) data end # List order line items # Get information about an order's line items. # @param store_id The store id. # @param order_id The id for the order in a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(OrderLines, Fixnum, Hash)>] OrderLines data, response status code and response headers def get_all_order_line_items_with_http_info(store_id, order_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrderLines') return data, status_code, headers end # Get order line item # Get information about a specific order line item. # @param store_id The store id. # @param order_id The id for the order in a store. # @param line_id The id for the line item of an order. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceOrderLineItem] def get_order_line_item(store_id = {}, order_id = {}, line_id = {}, opts = {}) data, _status_code, _headers = get_order_line_item_with_http_info(store_id, order_id, line_id, opts) data end # Get order line item # Get information about a specific order line item. # @param store_id The store id. # @param order_id The id for the order in a store. # @param line_id The id for the line item of an order. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceOrderLineItem, Fixnum, Hash)>] EcommerceOrderLineItem data, response status code and response headers def get_order_line_item_with_http_info(store_id, order_id, line_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceOrderLineItem') return data, status_code, headers end # List product # Get information about a store's products. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [String] :sort_field Returns products sorted by the specified field. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [Products] def get_all_store_products(store_id = {}, opts = {}) data, _status_code, _headers = get_all_store_products_with_http_info(store_id, opts) data end # List product # Get information about a store's products. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [String] :sort_field Returns products sorted by the specified field. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(Products, Fixnum, Hash)>] Products data, response status code and response headers def get_all_store_products_with_http_info(store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Products') return data, status_code, headers end # Get product info # Get information about a specific product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceProduct] def get_store_product(store_id = {}, product_id = {}, opts = {}) data, _status_code, _headers = get_store_product_with_http_info(store_id, product_id, opts) data end # Get product info # Get information about a specific product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceProduct, Fixnum, Hash)>] EcommerceProduct data, response status code and response headers def get_store_product_with_http_info(store_id, product_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProduct') return data, status_code, headers end # List product images # Get information about a product's images. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [EcommerceProductImages] def get_product_images(store_id = {}, product_id = {}, opts = {}) data, _status_code, _headers = get_product_images_with_http_info(store_id, product_id, opts) data end # List product images # Get information about a product's images. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(EcommerceProductImages, Fixnum, Hash)>] EcommerceProductImages data, response status code and response headers def get_product_images_with_http_info(store_id, product_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductImages') return data, status_code, headers end # Get product image info # Get information about a specific product image. # @param store_id The store id. # @param product_id The id for the product of a store. # @param image_id The id for the product image. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceProductImage] def get_product_image(store_id = {}, product_id = {}, image_id = {}, opts = {}) data, _status_code, _headers = get_product_image_with_http_info(store_id, product_id, image_id, opts) data end # Get product image info # Get information about a specific product image. # @param store_id The store id. # @param product_id The id for the product of a store. # @param image_id The id for the product image. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceProductImage, Fixnum, Hash)>] EcommerceProductImage data, response status code and response headers def get_product_image_with_http_info(store_id, product_id, image_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductImage') return data, status_code, headers end # List product variants # Get information about a product's variants. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [EcommerceProductVariants] def get_product_variants(store_id = {}, product_id = {}, opts = {}) data, _status_code, _headers = get_product_variants_with_http_info(store_id, product_id, opts) data end # List product variants # Get information about a product's variants. # @param store_id The store id. # @param product_id The id for the product of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(EcommerceProductVariants, Fixnum, Hash)>] EcommerceProductVariants data, response status code and response headers def get_product_variants_with_http_info(store_id, product_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductVariants') return data, status_code, headers end # Get product variant info # Get information about a specific product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommerceProductVariant] def get_product_variant(store_id = {}, product_id = {}, variant_id = {}, opts = {}) data, _status_code, _headers = get_product_variant_with_http_info(store_id, product_id, variant_id, opts) data end # Get product variant info # Get information about a specific product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers def get_product_variant_with_http_info(store_id, product_id, variant_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductVariant') return data, status_code, headers end # List promo codes # Get information about a store's promo codes. # @param promo_rule_id The id for the promo rule of a store. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [PromoCodes] def get_promo_codes(promo_rule_id = {}, store_id = {}, opts = {}) data, _status_code, _headers = get_promo_codes_with_http_info(promo_rule_id, store_id, opts) data end # List promo codes # Get information about a store's promo codes. # @param promo_rule_id The id for the promo rule of a store. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(PromoCodes, Fixnum, Hash)>] PromoCodes data, response status code and response headers def get_promo_codes_with_http_info(promo_rule_id, store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes'.sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PromoCodes') return data, status_code, headers end # Get promo code # Get information about a specific promo code. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param promo_code_id The id for the promo code of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommercePromoCode] def get_promo_code(store_id = {}, promo_rule_id = {}, promo_code_id = {}, opts = {}) data, _status_code, _headers = get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts) data end # Get promo code # Get information about a specific promo code. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param promo_code_id The id for the promo code of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommercePromoCode, Fixnum, Hash)>] EcommercePromoCode data, response status code and response headers def get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommercePromoCode') return data, status_code, headers end # List promo rules # Get information about a store's promo rules. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10) # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0) # @return [PromoRules] def list_promo_rules(store_id = {}, opts = {}) data, _status_code, _headers = list_promo_rules_with_http_info(store_id, opts) data end # List promo rules # Get information about a store's promo rules. # @param store_id The store id. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. # @return [Array<(PromoRules, Fixnum, Hash)>] PromoRules data, response status code and response headers def list_promo_rules_with_http_info(store_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PromoRules') return data, status_code, headers end # Get promo rule # Get information about a specific promo rule. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [EcommercePromoRule] def get_promo_rule(store_id = {}, promo_rule_id = {}, opts = {}) data, _status_code, _headers = get_promo_rule_with_http_info(store_id, promo_rule_id, opts) data end # Get promo rule # Get information about a specific promo rule. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param [Hash] opts the optional parameters # @option opts [Array] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. # @option opts [Array] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. # @return [Array<(EcommercePromoRule, Fixnum, Hash)>] EcommercePromoRule data, response status code and response headers def get_promo_rule_with_http_info(store_id, promo_rule_id, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommercePromoRule') return data, status_code, headers end # Update store # Update a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceStore] def update_store(store_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_store_with_http_info(store_id, body, opts) data end # Update store # Update a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceStore, Fixnum, Hash)>] EcommerceStore data, response status code and response headers def update_store_with_http_info(store_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceStore') return data, status_code, headers end # Update cart # Update a specific cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceCart] def update_store_cart(store_id = {}, cart_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_store_cart_with_http_info(store_id, cart_id, body, opts) data end # Update cart # Update a specific cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceCart, Fixnum, Hash)>] EcommerceCart data, response status code and response headers def update_store_cart_with_http_info(store_id, cart_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCart') return data, status_code, headers end # Update cart line item # Update a specific cart line item. # @param store_id The store id. # @param cart_id The id for the cart. # @param line_id The id for the line item of a cart. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceCartLineItem] def update_cart_line_item(store_id = {}, cart_id = {}, line_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_cart_line_item_with_http_info(store_id, cart_id, line_id, body, opts) data end # Update cart line item # Update a specific cart line item. # @param store_id The store id. # @param cart_id The id for the cart. # @param line_id The id for the line item of a cart. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceCartLineItem, Fixnum, Hash)>] EcommerceCartLineItem data, response status code and response headers def update_cart_line_item_with_http_info(store_id, cart_id, line_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCartLineItem') return data, status_code, headers end # Update customer # Update a customer. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceCustomer] def update_store_customer(store_id = {}, customer_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_store_customer_with_http_info(store_id, customer_id, body, opts) data end # Update customer # Update a customer. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers def update_store_customer_with_http_info(store_id, customer_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCustomer') return data, status_code, headers end # Update order # Update a specific order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceOrder] def update_order(store_id = {}, order_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_order_with_http_info(store_id, order_id, body, opts) data end # Update order # Update a specific order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceOrder, Fixnum, Hash)>] EcommerceOrder data, response status code and response headers def update_order_with_http_info(store_id, order_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceOrder') return data, status_code, headers end # Update order line item # Update a specific order line item. # @param store_id The store id. # @param order_id The id for the order in a store. # @param line_id The id for the line item of an order. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceOrderLineItem] def update_order_line_item(store_id = {}, order_id = {}, line_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_order_line_item_with_http_info(store_id, order_id, line_id, body, opts) data end # Update order line item # Update a specific order line item. # @param store_id The store id. # @param order_id The id for the order in a store. # @param line_id The id for the line item of an order. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceOrderLineItem, Fixnum, Hash)>] EcommerceOrderLineItem data, response status code and response headers def update_order_line_item_with_http_info(store_id, order_id, line_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'line_id' + '}', line_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceOrderLineItem') return data, status_code, headers end # Update product # Update a specific product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceProduct] def update_store_product(store_id = {}, product_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_store_product_with_http_info(store_id, product_id, body, opts) data end # Update product # Update a specific product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceProduct, Fixnum, Hash)>] EcommerceProduct data, response status code and response headers def update_store_product_with_http_info(store_id, product_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProduct') return data, status_code, headers end # Update product image # Update a product image. # @param store_id The store id. # @param product_id The id for the product of a store. # @param image_id The id for the product image. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceProductImage] def update_product_image(store_id = {}, product_id = {}, image_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_product_image_with_http_info(store_id, product_id, image_id, body, opts) data end # Update product image # Update a product image. # @param store_id The store id. # @param product_id The id for the product of a store. # @param image_id The id for the product image. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceProductImage, Fixnum, Hash)>] EcommerceProductImage data, response status code and response headers def update_product_image_with_http_info(store_id, product_id, image_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'image_id' + '}', image_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductImage') return data, status_code, headers end # Update product variant # Update a product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceProductVariant] def update_product_variant(store_id = {}, product_id = {}, variant_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_product_variant_with_http_info(store_id, product_id, variant_id, body, opts) data end # Update product variant # Update a product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers def update_product_variant_with_http_info(store_id, product_id, variant_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductVariant') return data, status_code, headers end # Update promo code # Update a promo code. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param promo_code_id The id for the promo code of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommercePromoCode] def update_promo_code(store_id = {}, promo_rule_id = {}, promo_code_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, body, opts) data end # Update promo code # Update a promo code. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param promo_code_id The id for the promo code of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommercePromoCode, Fixnum, Hash)>] EcommercePromoCode data, response status code and response headers def update_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s).sub('{' + 'promo_code_id' + '}', promo_code_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommercePromoCode') return data, status_code, headers end # Update promo rule # Update a promo rule. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommercePromoRule] def update_promo_rule(store_id = {}, promo_rule_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_promo_rule_with_http_info(store_id, promo_rule_id, body, opts) data end # Update promo rule # Update a promo rule. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommercePromoRule, Fixnum, Hash)>] EcommercePromoRule data, response status code and response headers def update_promo_rule_with_http_info(store_id, promo_rule_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommercePromoRule') return data, status_code, headers end # Add store # Add a new store to your Mailchimp account. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceStore] def add_store(body = {}, opts = {}) data, _status_code, _headers = add_store_with_http_info(body, opts) data end # Add store # Add a new store to your Mailchimp account. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceStore, Fixnum, Hash)>] EcommerceStore data, response status code and response headers def add_store_with_http_info(body, opts = {}) # resource path local_var_path = '/ecommerce/stores' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceStore') return data, status_code, headers end # Add cart # Add a new cart to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceCart] def add_store_cart(store_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_store_cart_with_http_info(store_id, body, opts) data end # Add cart # Add a new cart to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceCart, Fixnum, Hash)>] EcommerceCart data, response status code and response headers def add_store_cart_with_http_info(store_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCart') return data, status_code, headers end # Add cart line item # Add a new line item to an existing cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceCartLineItem] def add_cart_line_item(store_id = {}, cart_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_cart_line_item_with_http_info(store_id, cart_id, body, opts) data end # Add cart line item # Add a new line item to an existing cart. # @param store_id The store id. # @param cart_id The id for the cart. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceCartLineItem, Fixnum, Hash)>] EcommerceCartLineItem data, response status code and response headers def add_cart_line_item_with_http_info(store_id, cart_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCartLineItem') return data, status_code, headers end # Add customer # Add a new customer to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceCustomer] def add_store_customer(store_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_store_customer_with_http_info(store_id, body, opts) data end # Add customer # Add a new customer to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers def add_store_customer_with_http_info(store_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCustomer') return data, status_code, headers end # Add order # Add a new order to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceOrder] def add_store_order(store_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_store_order_with_http_info(store_id, body, opts) data end # Add order # Add a new order to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceOrder, Fixnum, Hash)>] EcommerceOrder data, response status code and response headers def add_store_order_with_http_info(store_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceOrder') return data, status_code, headers end # Add order line item # Add a new line item to an existing order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceOrderLineItem] def add_order_line_item(store_id = {}, order_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_order_line_item_with_http_info(store_id, order_id, body, opts) data end # Add order line item # Add a new line item to an existing order. # @param store_id The store id. # @param order_id The id for the order in a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceOrderLineItem, Fixnum, Hash)>] EcommerceOrderLineItem data, response status code and response headers def add_order_line_item_with_http_info(store_id, order_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}/lines'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceOrderLineItem') return data, status_code, headers end # Add product # Add a new product to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceProduct] def add_store_product(store_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_store_product_with_http_info(store_id, body, opts) data end # Add product # Add a new product to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceProduct, Fixnum, Hash)>] EcommerceProduct data, response status code and response headers def add_store_product_with_http_info(store_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProduct') return data, status_code, headers end # Add product image # Add a new image to the product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceProductImage] def add_product_image(store_id = {}, product_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_product_image_with_http_info(store_id, product_id, body, opts) data end # Add product image # Add a new image to the product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceProductImage, Fixnum, Hash)>] EcommerceProductImage data, response status code and response headers def add_product_image_with_http_info(store_id, product_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/images'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductImage') return data, status_code, headers end # Add product variant # Add a new variant to the product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceProductVariant] def add_product_variants(store_id = {}, product_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_product_variants_with_http_info(store_id, product_id, body, opts) data end # Add product variant # Add a new variant to the product. # @param store_id The store id. # @param product_id The id for the product of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers def add_product_variants_with_http_info(store_id, product_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductVariant') return data, status_code, headers end # Add promo code # Add a new promo code to a store. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommercePromoCode] def add_promo_code(store_id = {}, promo_rule_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_promo_code_with_http_info(store_id, promo_rule_id, body, opts) data end # Add promo code # Add a new promo code to a store. # @param store_id The store id. # @param promo_rule_id The id for the promo rule of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommercePromoCode, Fixnum, Hash)>] EcommercePromoCode data, response status code and response headers def add_promo_code_with_http_info(store_id, promo_rule_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'promo_rule_id' + '}', promo_rule_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommercePromoCode') return data, status_code, headers end # Add promo rule # Add a new promo rule to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [EcommercePromoRule] def add_promo_rules(store_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_promo_rules_with_http_info(store_id, body, opts) data end # Add promo rule # Add a new promo rule to a store. # @param store_id The store id. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommercePromoRule, Fixnum, Hash)>] EcommercePromoRule data, response status code and response headers def add_promo_rules_with_http_info(store_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommercePromoRule') return data, status_code, headers end # Add or update customer # Add or update a customer. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceCustomer] def set_store_customer(store_id = {}, customer_id = {}, body = {}, opts = {}) data, _status_code, _headers = set_store_customer_with_http_info(store_id, customer_id, body, opts) data end # Add or update customer # Add or update a customer. # @param store_id The store id. # @param customer_id The id for the customer of a store. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceCustomer, Fixnum, Hash)>] EcommerceCustomer data, response status code and response headers def set_store_customer_with_http_info(store_id, customer_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceCustomer') return data, status_code, headers end # Add or update product variant # Add or update a product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param body # @param [Hash] opts the optional parameters # @return [EcommerceProductVariant] def add_product_variant(store_id = {}, product_id = {}, variant_id = {}, body = {}, opts = {}) data, _status_code, _headers = add_product_variant_with_http_info(store_id, product_id, variant_id, body, opts) data end # Add or update product variant # Add or update a product variant. # @param store_id The store id. # @param product_id The id for the product of a store. # @param variant_id The id for the product variant. # @param body # @param [Hash] opts the optional parameters # @return [Array<(EcommerceProductVariant, Fixnum, Hash)>] EcommerceProductVariant data, response status code and response headers def add_product_variant_with_http_info(store_id, product_id, variant_id, body, opts = {}) # resource path local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s).sub('{' + 'variant_id' + '}', variant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EcommerceProductVariant') return data, status_code, headers end end end