Class: MailchimpMarketing::EcommerceApi
- Inherits:
-
Object
- Object
- MailchimpMarketing::EcommerceApi
- Defined in:
- lib/MailchimpMarketing/api/ecommerce_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_cart_line_item(store_id, cart_id, body, opts = {}) ⇒ Object
Add cart line item.
-
#add_order_line_item(store_id, order_id, body, opts = {}) ⇒ Object
Add order line item.
-
#add_product_image(store_id, product_id, body, opts = {}) ⇒ Object
Add product image.
-
#add_product_variant(store_id, product_id, variant_id, body, opts = {}) ⇒ Object
Add or update product variant.
-
#add_product_variants(store_id, product_id, body, opts = {}) ⇒ Object
Add product variant.
-
#add_promo_code(store_id, promo_rule_id, body, opts = {}) ⇒ Object
Add promo code.
-
#add_promo_rules(store_id, body, opts = {}) ⇒ Object
Add promo rule.
-
#add_store(body, opts = {}) ⇒ Object
Add store.
-
#add_store_cart(store_id, body, opts = {}) ⇒ Object
Add cart.
-
#add_store_customer(store_id, body, opts = {}) ⇒ Object
Add customer.
-
#add_store_order(store_id, body, opts = {}) ⇒ Object
Add order.
-
#add_store_product(store_id, body, opts = {}) ⇒ Object
Add product.
-
#delete_cart_line_item(store_id, cart_id, line_id, opts = {}) ⇒ Object
Delete cart line item.
-
#delete_order(store_id, order_id, opts = {}) ⇒ Object
Delete order.
-
#delete_order_line_item(store_id, order_id, line_id, opts = {}) ⇒ Object
Delete order line item.
-
#delete_product_image(store_id, product_id, image_id, opts = {}) ⇒ Object
Delete product image.
-
#delete_product_variant(store_id, product_id, variant_id, opts = {}) ⇒ Object
Delete product variant.
-
#delete_promo_code(store_id, promo_rule_id, promo_code_id, opts = {}) ⇒ Object
Delete promo code.
-
#delete_promo_rule(store_id, promo_rule_id, opts = {}) ⇒ Object
Delete promo rule.
-
#delete_store(store_id, opts = {}) ⇒ Object
Delete store.
-
#delete_store_cart(store_id, cart_id, opts = {}) ⇒ Object
Delete cart.
-
#delete_store_customer(store_id, customer_id, opts = {}) ⇒ Object
Delete customer.
-
#delete_store_product(store_id, product_id, opts = {}) ⇒ Object
Delete product.
-
#get_all_cart_line_items(store_id, cart_id, opts = {}) ⇒ Object
List cart line items.
-
#get_all_order_line_items(store_id, order_id, opts = {}) ⇒ Object
List order line items.
-
#get_all_store_customers(store_id, opts = {}) ⇒ Object
List customers.
-
#get_all_store_products(store_id, opts = {}) ⇒ Object
List product.
-
#get_cart_line_item(store_id, cart_id, line_id, opts = {}) ⇒ Object
Get cart line item.
-
#get_order(store_id, order_id, opts = {}) ⇒ Object
Get order info.
-
#get_order_line_item(store_id, order_id, line_id, opts = {}) ⇒ Object
Get order line item.
-
#get_product_image(store_id, product_id, image_id, opts = {}) ⇒ Object
Get product image info.
-
#get_product_images(store_id, product_id, opts = {}) ⇒ Object
List product images.
-
#get_product_variant(store_id, product_id, variant_id, opts = {}) ⇒ Object
Get product variant info.
-
#get_product_variants(store_id, product_id, opts = {}) ⇒ Object
List product variants.
-
#get_promo_code(store_id, promo_rule_id, promo_code_id, opts = {}) ⇒ Object
Get promo code.
-
#get_promo_codes(promo_rule_id, store_id, opts = {}) ⇒ Object
List promo codes.
-
#get_promo_rule(store_id, promo_rule_id, opts = {}) ⇒ Object
Get promo rule.
-
#get_store(store_id, opts = {}) ⇒ Object
Get store info.
-
#get_store_cart(store_id, cart_id, opts = {}) ⇒ Object
Get cart info.
-
#get_store_carts(store_id, opts = {}) ⇒ Object
List carts.
-
#get_store_customer(store_id, customer_id, opts = {}) ⇒ Object
Get customer info.
-
#get_store_orders(store_id, opts = {}) ⇒ Object
List orders.
-
#get_store_product(store_id, product_id, opts = {}) ⇒ Object
Get product info.
-
#initialize(api_client) ⇒ EcommerceApi
constructor
A new instance of EcommerceApi.
-
#list_promo_rules(store_id, opts = {}) ⇒ Object
List promo rules.
-
#orders(opts = {}) ⇒ Object
List account orders.
-
#set_store_customer(store_id, customer_id, body, opts = {}) ⇒ Object
Add or update customer.
-
#stores(opts = {}) ⇒ Object
List stores.
-
#update_cart_line_item(store_id, cart_id, line_id, body, opts = {}) ⇒ Object
Update cart line item.
-
#update_order(store_id, order_id, body, opts = {}) ⇒ Object
Update order.
-
#update_order_line_item(store_id, order_id, line_id, body, opts = {}) ⇒ Object
Update order line item.
-
#update_product_image(store_id, product_id, image_id, body, opts = {}) ⇒ Object
Update product image.
-
#update_product_variant(store_id, product_id, variant_id, body, opts = {}) ⇒ Object
Update product variant.
-
#update_promo_code(store_id, promo_rule_id, promo_code_id, body, opts = {}) ⇒ Object
Update promo code.
-
#update_promo_rule(store_id, promo_rule_id, body, opts = {}) ⇒ Object
Update promo rule.
-
#update_store(store_id, body, opts = {}) ⇒ Object
Update store.
-
#update_store_cart(store_id, cart_id, body, opts = {}) ⇒ Object
Update cart.
-
#update_store_customer(store_id, customer_id, body, opts = {}) ⇒ Object
Update customer.
-
#update_store_product(store_id, product_id, body, opts = {}) ⇒ Object
Update product.
Constructor Details
#initialize(api_client) ⇒ EcommerceApi
Returns a new instance of EcommerceApi.
19 20 21 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 19 def initialize(api_client) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_cart_line_item(store_id, cart_id, body, opts = {}) ⇒ Object
Add cart line item
833 834 835 836 837 838 839 840 841 842 843 844 845 846 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 833 def add_cart_line_item(store_id, cart_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_order_line_item(store_id, order_id, body, opts = {}) ⇒ Object
Add order line item
879 880 881 882 883 884 885 886 887 888 889 890 891 892 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 879 def add_order_line_item(store_id, order_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_product_image(store_id, product_id, body, opts = {}) ⇒ Object
Add product image
910 911 912 913 914 915 916 917 918 919 920 921 922 923 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 910 def add_product_image(store_id, product_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_product_variant(store_id, product_id, variant_id, body, opts = {}) ⇒ Object
Add or update product variant
989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 989 def add_product_variant(store_id, product_id, variant_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:PUT, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_product_variants(store_id, product_id, body, opts = {}) ⇒ Object
Add product variant
926 927 928 929 930 931 932 933 934 935 936 937 938 939 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 926 def add_product_variants(store_id, product_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_promo_code(store_id, promo_rule_id, body, opts = {}) ⇒ Object
Add promo code
942 943 944 945 946 947 948 949 950 951 952 953 954 955 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 942 def add_promo_code(store_id, promo_rule_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_promo_rules(store_id, body, opts = {}) ⇒ Object
Add promo rule
958 959 960 961 962 963 964 965 966 967 968 969 970 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 958 def add_promo_rules(store_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_store(body, opts = {}) ⇒ Object
Add store
804 805 806 807 808 809 810 811 812 813 814 815 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 804 def add_store(body, opts = {}) fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores' data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_store_cart(store_id, body, opts = {}) ⇒ Object
Add cart
818 819 820 821 822 823 824 825 826 827 828 829 830 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 818 def add_store_cart(store_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_store_customer(store_id, body, opts = {}) ⇒ Object
Add customer
849 850 851 852 853 854 855 856 857 858 859 860 861 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 849 def add_store_customer(store_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_store_order(store_id, body, opts = {}) ⇒ Object
Add order
864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 864 def add_store_order(store_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_store_product(store_id, body, opts = {}) ⇒ Object
Add product
895 896 897 898 899 900 901 902 903 904 905 906 907 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 895 def add_store_product(store_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_cart_line_item(store_id, cart_id, line_id, opts = {}) ⇒ Object
Delete cart line item
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 53 def delete_cart_line_item(store_id, cart_id, line_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil? query_params = {} post_body = nil 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) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_order(store_id, order_id, opts = {}) ⇒ Object
Delete order
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 84 def delete_order(store_id, order_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? query_params = {} post_body = nil local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_order_line_item(store_id, order_id, line_id, opts = {}) ⇒ Object
Delete order line item
99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 99 def delete_order_line_item(store_id, order_id, line_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil? query_params = {} post_body = nil 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) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_product_image(store_id, product_id, image_id, opts = {}) ⇒ Object
Delete product image
130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 130 def delete_product_image(store_id, product_id, image_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil? query_params = {} post_body = nil 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) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_product_variant(store_id, product_id, variant_id, opts = {}) ⇒ Object
Delete product variant
146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 146 def delete_product_variant(store_id, product_id, variant_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil? query_params = {} post_body = nil 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) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_promo_code(store_id, promo_rule_id, promo_code_id, opts = {}) ⇒ Object
Delete promo code
162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 162 def delete_promo_code(store_id, promo_rule_id, promo_code_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil? query_params = {} post_body = nil 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) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_promo_rule(store_id, promo_rule_id, opts = {}) ⇒ Object
Delete promo rule
178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 178 def delete_promo_rule(store_id, promo_rule_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? query_params = {} post_body = nil 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) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_store(store_id, opts = {}) ⇒ Object
Delete store
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 24 def delete_store(store_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? query_params = {} post_body = nil local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_store_cart(store_id, cart_id, opts = {}) ⇒ Object
Delete cart
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 38 def delete_store_cart(store_id, cart_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? query_params = {} post_body = nil local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_store_customer(store_id, customer_id, opts = {}) ⇒ Object
Delete customer
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 69 def delete_store_customer(store_id, customer_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil? query_params = {} post_body = nil local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_store_product(store_id, product_id, opts = {}) ⇒ Object
Delete product
115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 115 def delete_store_product(store_id, product_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? query_params = {} post_body = nil local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_all_cart_line_items(store_id, cart_id, opts = {}) ⇒ Object
List cart line items
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 285 def get_all_cart_line_items(store_id, cart_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_all_order_line_items(store_id, order_id, opts = {}) ⇒ Object
List order line items
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 400 def get_all_order_line_items(store_id, order_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_all_store_customers(store_id, opts = {}) ⇒ Object
List customers
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 323 def get_all_store_customers(store_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_all_store_products(store_id, opts = {}) ⇒ Object
List product
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 438 def get_all_store_products(store_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_cart_line_item(store_id, cart_id, line_id, opts = {}) ⇒ Object
Get cart line item
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 305 def get_cart_line_item(store_id, cart_id, line_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil? 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_order(store_id, order_id, opts = {}) ⇒ Object
Get order info
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 383 def get_order(store_id, order_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_order_line_item(store_id, order_id, line_id, opts = {}) ⇒ Object
Get order line item
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 420 def get_order_line_item(store_id, order_id, line_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil? 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_product_image(store_id, product_id, image_id, opts = {}) ⇒ Object
Get product image info
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 494 def get_product_image(store_id, product_id, image_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil? 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_product_images(store_id, product_id, opts = {}) ⇒ Object
List product images
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 474 def get_product_images(store_id, product_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_product_variant(store_id, product_id, variant_id, opts = {}) ⇒ Object
Get product variant info
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 532 def get_product_variant(store_id, product_id, variant_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil? 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_product_variants(store_id, product_id, opts = {}) ⇒ Object
List product variants
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 512 def get_product_variants(store_id, product_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_promo_code(store_id, promo_rule_id, promo_code_id, opts = {}) ⇒ Object
Get promo code
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 570 def get_promo_code(store_id, promo_rule_id, promo_code_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil? 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_promo_codes(promo_rule_id, store_id, opts = {}) ⇒ Object
List promo codes
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 550 def get_promo_codes(promo_rule_id, store_id, opts = {}) fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_promo_rule(store_id, promo_rule_id, opts = {}) ⇒ Object
Get promo rule
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 607 def get_promo_rule(store_id, promo_rule_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? 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? post_body = nil 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) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_store(store_id, opts = {}) ⇒ Object
Get store info
233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 233 def get_store(store_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_store_cart(store_id, cart_id, opts = {}) ⇒ Object
Get cart info
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 268 def get_store_cart(store_id, cart_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_store_carts(store_id, opts = {}) ⇒ Object
List carts
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 249 def get_store_carts(store_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_store_customer(store_id, customer_id, opts = {}) ⇒ Object
Get customer info
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 343 def get_store_customer(store_id, customer_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil? 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_store_orders(store_id, opts = {}) ⇒ Object
List orders
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 360 def get_store_orders(store_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_store_product(store_id, product_id, opts = {}) ⇒ Object
Get product info
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 457 def get_store_product(store_id, product_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#list_promo_rules(store_id, opts = {}) ⇒ Object
List promo rules
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 588 def list_promo_rules(store_id, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#orders(opts = {}) ⇒ Object
List account orders
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 193 def orders(opts = {}) fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil local_var_path = '/ecommerce/orders' data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#set_store_customer(store_id, customer_id, body, opts = {}) ⇒ Object
Add or update customer
973 974 975 976 977 978 979 980 981 982 983 984 985 986 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 973 def set_store_customer(store_id, customer_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) data = @api_client.call_api(:PUT, local_var_path, :query_params => query_params, :body => post_body) return data end |
#stores(opts = {}) ⇒ Object
List stores
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 215 def stores(opts = {}) fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 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? post_body = nil local_var_path = '/ecommerce/stores' data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_cart_line_item(store_id, cart_id, line_id, body, opts = {}) ⇒ Object
Update cart line item
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 655 def update_cart_line_item(store_id, cart_id, line_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_order(store_id, order_id, body, opts = {}) ⇒ Object
Update order
688 689 690 691 692 693 694 695 696 697 698 699 700 701 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 688 def update_order(store_id, order_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_order_line_item(store_id, order_id, line_id, body, opts = {}) ⇒ Object
Update order line item
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 704 def update_order_line_item(store_id, order_id, line_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil? fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_product_image(store_id, product_id, image_id, body, opts = {}) ⇒ Object
Update product image
737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 737 def update_product_image(store_id, product_id, image_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_product_variant(store_id, product_id, variant_id, body, opts = {}) ⇒ Object
Update product variant
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 754 def update_product_variant(store_id, product_id, variant_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_promo_code(store_id, promo_rule_id, promo_code_id, body, opts = {}) ⇒ Object
Update promo code
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 771 def update_promo_code(store_id, promo_rule_id, promo_code_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_promo_rule(store_id, promo_rule_id, body, opts = {}) ⇒ Object
Update promo rule
788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 788 def update_promo_rule(store_id, promo_rule_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) 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) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_store(store_id, body, opts = {}) ⇒ Object
Update store
624 625 626 627 628 629 630 631 632 633 634 635 636 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 624 def update_store(store_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_store_cart(store_id, cart_id, body, opts = {}) ⇒ Object
Update cart
639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 639 def update_store_cart(store_id, cart_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_store_customer(store_id, customer_id, body, opts = {}) ⇒ Object
Update customer
672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 672 def update_store_customer(store_id, customer_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_store_product(store_id, product_id, body, opts = {}) ⇒ Object
Update product
721 722 723 724 725 726 727 728 729 730 731 732 733 734 |
# File 'lib/MailchimpMarketing/api/ecommerce_api.rb', line 721 def update_store_product(store_id, product_id, body, opts = {}) fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil? fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |