MailchimpMarketing 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/MailchimpMarketing.gemspec +45 -0
- data/README.md +378 -0
- data/lib/MailchimpMarketing.rb +162 -0
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +57 -0
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +78 -0
- data/lib/MailchimpMarketing/api/automations_api.rb +351 -0
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +111 -0
- data/lib/MailchimpMarketing/api/batches_api.rb +94 -0
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +111 -0
- data/lib/MailchimpMarketing/api/campaigns_api.rb +414 -0
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +110 -0
- data/lib/MailchimpMarketing/api/conversations_api.rb +124 -0
- data/lib/MailchimpMarketing/api/dashboard_api.rb +128 -0
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +1139 -0
- data/lib/MailchimpMarketing/api/external_auths_api.rb +78 -0
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +66 -0
- data/lib/MailchimpMarketing/api/file_manager_api.rb +224 -0
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +164 -0
- data/lib/MailchimpMarketing/api/lists_api.rb +1302 -0
- data/lib/MailchimpMarketing/api/ping_api.rb +39 -0
- data/lib/MailchimpMarketing/api/postcards_api.rb +45 -0
- data/lib/MailchimpMarketing/api/reporting_api.rb +142 -0
- data/lib/MailchimpMarketing/api/reports_api.rb +464 -0
- data/lib/MailchimpMarketing/api/root_api.rb +41 -0
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +43 -0
- data/lib/MailchimpMarketing/api/search_members_api.rb +44 -0
- data/lib/MailchimpMarketing/api/template_folders_api.rb +111 -0
- data/lib/MailchimpMarketing/api/templates_api.rb +137 -0
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +104 -0
- data/lib/MailchimpMarketing/api_client.rb +214 -0
- data/lib/MailchimpMarketing/api_error.rb +38 -0
- data/lib/MailchimpMarketing/configuration.rb +209 -0
- data/lib/MailchimpMarketing/version.rb +15 -0
- metadata +257 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class ConnectedSitesApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# Delete connected site
|
25
|
+
def remove(connected_site_id, opts = {})
|
26
|
+
fail ArgumentError, "Missing required param: 'connected_site_id'" if connected_site_id.nil?
|
27
|
+
|
28
|
+
query_params = {}
|
29
|
+
form_params = {}
|
30
|
+
post_body = nil
|
31
|
+
|
32
|
+
local_var_path = '/connected-sites/{connected_site_id}'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
33
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
34
|
+
:query_params => query_params,
|
35
|
+
:form_params => form_params,
|
36
|
+
:body => post_body)
|
37
|
+
return data, status_code, headers
|
38
|
+
end
|
39
|
+
|
40
|
+
# List connected sites
|
41
|
+
def list(opts = {})
|
42
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
43
|
+
|
44
|
+
query_params = {}
|
45
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
46
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
47
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
48
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
49
|
+
form_params = {}
|
50
|
+
post_body = nil
|
51
|
+
|
52
|
+
local_var_path = '/connected-sites'
|
53
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
54
|
+
:query_params => query_params,
|
55
|
+
:form_params => form_params,
|
56
|
+
:body => post_body)
|
57
|
+
return data, status_code, headers
|
58
|
+
end
|
59
|
+
|
60
|
+
# Get connected site
|
61
|
+
def get(connected_site_id, opts = {})
|
62
|
+
fail ArgumentError, "Missing required param: 'connected_site_id'" if connected_site_id.nil?
|
63
|
+
|
64
|
+
query_params = {}
|
65
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
66
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
67
|
+
form_params = {}
|
68
|
+
post_body = nil
|
69
|
+
|
70
|
+
local_var_path = '/connected-sites/{connected_site_id}'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
71
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body)
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Add connected site
|
79
|
+
def create(body, opts = {})
|
80
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
81
|
+
|
82
|
+
query_params = {}
|
83
|
+
form_params = {}
|
84
|
+
post_body = @api_client.object_to_http_body(body)
|
85
|
+
|
86
|
+
local_var_path = '/connected-sites'
|
87
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body)
|
91
|
+
return data, status_code, headers
|
92
|
+
end
|
93
|
+
|
94
|
+
# Verify connected site script
|
95
|
+
def verify_script_installation(connected_site_id, opts = {})
|
96
|
+
fail ArgumentError, "Missing required param: 'connected_site_id'" if connected_site_id.nil?
|
97
|
+
|
98
|
+
query_params = {}
|
99
|
+
form_params = {}
|
100
|
+
post_body = nil
|
101
|
+
|
102
|
+
local_var_path = '/connected-sites/{connected_site_id}/actions/verify-script-installation'.sub('{' + 'connected_site_id' + '}', connected_site_id.to_s)
|
103
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
104
|
+
:query_params => query_params,
|
105
|
+
:form_params => form_params,
|
106
|
+
:body => post_body)
|
107
|
+
return data, status_code, headers
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class ConversationsApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# List conversations
|
25
|
+
def list(opts = {})
|
26
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
27
|
+
fail ArgumentError, 'invalid value for "has_unread_messages", must be one of true, false' if opts[:'has_unread_messages'] && !['true', 'false'].include?(opts[:'has_unread_messages'])
|
28
|
+
|
29
|
+
query_params = {}
|
30
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
31
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
32
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
33
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
34
|
+
query_params[:'has_unread_messages'] = opts[:'has_unread_messages'] if !opts[:'has_unread_messages'].nil?
|
35
|
+
query_params[:'list_id'] = opts[:'list_id'] if !opts[:'list_id'].nil?
|
36
|
+
query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
|
37
|
+
form_params = {}
|
38
|
+
post_body = nil
|
39
|
+
|
40
|
+
local_var_path = '/conversations'
|
41
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
42
|
+
:query_params => query_params,
|
43
|
+
:form_params => form_params,
|
44
|
+
:body => post_body)
|
45
|
+
return data, status_code, headers
|
46
|
+
end
|
47
|
+
|
48
|
+
# Get conversation
|
49
|
+
def get(conversation_id, opts = {})
|
50
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
51
|
+
|
52
|
+
query_params = {}
|
53
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
54
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
55
|
+
form_params = {}
|
56
|
+
post_body = nil
|
57
|
+
|
58
|
+
local_var_path = '/conversations/{conversation_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
59
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
60
|
+
:query_params => query_params,
|
61
|
+
:form_params => form_params,
|
62
|
+
:body => post_body)
|
63
|
+
return data, status_code, headers
|
64
|
+
end
|
65
|
+
|
66
|
+
# List messages
|
67
|
+
def get_conversation_messages(conversation_id, opts = {})
|
68
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
69
|
+
fail ArgumentError, 'invalid value for "is_read", must be one of true, false' if opts[:'is_read'] && !['true', 'false'].include?(opts[:'is_read'])
|
70
|
+
|
71
|
+
query_params = {}
|
72
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
73
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
74
|
+
query_params[:'is_read'] = opts[:'is_read'] if !opts[:'is_read'].nil?
|
75
|
+
query_params[:'before_timestamp'] = opts[:'before_timestamp'] if !opts[:'before_timestamp'].nil?
|
76
|
+
query_params[:'since_timestamp'] = opts[:'since_timestamp'] if !opts[:'since_timestamp'].nil?
|
77
|
+
form_params = {}
|
78
|
+
post_body = nil
|
79
|
+
|
80
|
+
local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
81
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body)
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# Get message
|
89
|
+
def get_conversation_message(conversation_id, message_id, opts = {})
|
90
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
91
|
+
fail ArgumentError, "Missing required param: 'message_id'" if message_id.nil?
|
92
|
+
|
93
|
+
query_params = {}
|
94
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
95
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
96
|
+
form_params = {}
|
97
|
+
post_body = nil
|
98
|
+
|
99
|
+
local_var_path = '/conversations/{conversation_id}/messages/{message_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s).sub('{' + 'message_id' + '}', message_id.to_s)
|
100
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
101
|
+
:query_params => query_params,
|
102
|
+
:form_params => form_params,
|
103
|
+
:body => post_body)
|
104
|
+
return data, status_code, headers
|
105
|
+
end
|
106
|
+
|
107
|
+
# Post message
|
108
|
+
def create_conversation_message(conversation_id, body, opts = {})
|
109
|
+
fail ArgumentError, "Missing required param: 'conversation_id'" if conversation_id.nil?
|
110
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
111
|
+
|
112
|
+
query_params = {}
|
113
|
+
form_params = {}
|
114
|
+
post_body = @api_client.object_to_http_body(body)
|
115
|
+
|
116
|
+
local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s)
|
117
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
118
|
+
:query_params => query_params,
|
119
|
+
:form_params => form_params,
|
120
|
+
:body => post_body)
|
121
|
+
return data, status_code, headers
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class DashboardApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# List dashboard ads
|
25
|
+
def ads(opts = {})
|
26
|
+
|
27
|
+
query_params = {}
|
28
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
29
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
30
|
+
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
31
|
+
query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
|
32
|
+
form_params = {}
|
33
|
+
post_body = nil
|
34
|
+
|
35
|
+
local_var_path = '/dashboard/ads'
|
36
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
37
|
+
:query_params => query_params,
|
38
|
+
:form_params => form_params,
|
39
|
+
:body => post_body)
|
40
|
+
return data, status_code, headers
|
41
|
+
end
|
42
|
+
|
43
|
+
# List dashboard audiences
|
44
|
+
def audiences(opts = {})
|
45
|
+
|
46
|
+
query_params = {}
|
47
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
48
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
49
|
+
form_params = {}
|
50
|
+
post_body = nil
|
51
|
+
|
52
|
+
local_var_path = '/dashboard/audiences'
|
53
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
54
|
+
:query_params => query_params,
|
55
|
+
:form_params => form_params,
|
56
|
+
:body => post_body)
|
57
|
+
return data, status_code, headers
|
58
|
+
end
|
59
|
+
|
60
|
+
# List dashboard charts
|
61
|
+
def charts(opts = {})
|
62
|
+
|
63
|
+
query_params = {}
|
64
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
65
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
66
|
+
form_params = {}
|
67
|
+
post_body = nil
|
68
|
+
|
69
|
+
local_var_path = '/dashboard/charts'
|
70
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body)
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
76
|
+
|
77
|
+
# List dashboard ecommerce info
|
78
|
+
def ecommerce(opts = {})
|
79
|
+
|
80
|
+
query_params = {}
|
81
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
82
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
83
|
+
form_params = {}
|
84
|
+
post_body = nil
|
85
|
+
|
86
|
+
local_var_path = '/dashboard/ecommerce'
|
87
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body)
|
91
|
+
return data, status_code, headers
|
92
|
+
end
|
93
|
+
|
94
|
+
# List dashboard engagement info
|
95
|
+
def engagement(opts = {})
|
96
|
+
|
97
|
+
query_params = {}
|
98
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
99
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
100
|
+
form_params = {}
|
101
|
+
post_body = nil
|
102
|
+
|
103
|
+
local_var_path = '/dashboard/engagement'
|
104
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
105
|
+
:query_params => query_params,
|
106
|
+
:form_params => form_params,
|
107
|
+
:body => post_body)
|
108
|
+
return data, status_code, headers
|
109
|
+
end
|
110
|
+
|
111
|
+
# List dashboard homepage metrics
|
112
|
+
def homepage(opts = {})
|
113
|
+
|
114
|
+
query_params = {}
|
115
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
116
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
117
|
+
form_params = {}
|
118
|
+
post_body = nil
|
119
|
+
|
120
|
+
local_var_path = '/dashboard/homepage'
|
121
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body)
|
125
|
+
return data, status_code, headers
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -0,0 +1,1139 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class EcommerceApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# Delete store
|
25
|
+
def delete_store(store_id, opts = {})
|
26
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
27
|
+
|
28
|
+
query_params = {}
|
29
|
+
form_params = {}
|
30
|
+
post_body = nil
|
31
|
+
|
32
|
+
local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
|
33
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
34
|
+
:query_params => query_params,
|
35
|
+
:form_params => form_params,
|
36
|
+
:body => post_body)
|
37
|
+
return data, status_code, headers
|
38
|
+
end
|
39
|
+
|
40
|
+
# Delete cart
|
41
|
+
def delete_store_cart(store_id, cart_id, opts = {})
|
42
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
43
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
44
|
+
|
45
|
+
query_params = {}
|
46
|
+
form_params = {}
|
47
|
+
post_body = nil
|
48
|
+
|
49
|
+
local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
|
50
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
51
|
+
:query_params => query_params,
|
52
|
+
:form_params => form_params,
|
53
|
+
:body => post_body)
|
54
|
+
return data, status_code, headers
|
55
|
+
end
|
56
|
+
|
57
|
+
# Delete cart line item
|
58
|
+
def delete_cart_line_item(store_id, cart_id, line_id, opts = {})
|
59
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
60
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
61
|
+
fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
|
62
|
+
|
63
|
+
query_params = {}
|
64
|
+
form_params = {}
|
65
|
+
post_body = nil
|
66
|
+
|
67
|
+
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)
|
68
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body)
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
|
75
|
+
# Delete customer
|
76
|
+
def delete_store_customer(store_id, customer_id, opts = {})
|
77
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
78
|
+
fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
|
79
|
+
|
80
|
+
query_params = {}
|
81
|
+
form_params = {}
|
82
|
+
post_body = nil
|
83
|
+
|
84
|
+
local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
|
85
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
86
|
+
:query_params => query_params,
|
87
|
+
:form_params => form_params,
|
88
|
+
:body => post_body)
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete order
|
93
|
+
def delete_order(store_id, order_id, opts = {})
|
94
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
95
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
96
|
+
|
97
|
+
query_params = {}
|
98
|
+
form_params = {}
|
99
|
+
post_body = nil
|
100
|
+
|
101
|
+
local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
|
102
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
103
|
+
:query_params => query_params,
|
104
|
+
:form_params => form_params,
|
105
|
+
:body => post_body)
|
106
|
+
return data, status_code, headers
|
107
|
+
end
|
108
|
+
|
109
|
+
# Delete order line item
|
110
|
+
def delete_order_line_item(store_id, order_id, line_id, opts = {})
|
111
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
112
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
113
|
+
fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
|
114
|
+
|
115
|
+
query_params = {}
|
116
|
+
form_params = {}
|
117
|
+
post_body = nil
|
118
|
+
|
119
|
+
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)
|
120
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
121
|
+
:query_params => query_params,
|
122
|
+
:form_params => form_params,
|
123
|
+
:body => post_body)
|
124
|
+
return data, status_code, headers
|
125
|
+
end
|
126
|
+
|
127
|
+
# Delete product
|
128
|
+
def delete_store_product(store_id, product_id, opts = {})
|
129
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
130
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
131
|
+
|
132
|
+
query_params = {}
|
133
|
+
form_params = {}
|
134
|
+
post_body = nil
|
135
|
+
|
136
|
+
local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
|
137
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body)
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
144
|
+
# Delete product image
|
145
|
+
def delete_product_image(store_id, product_id, image_id, opts = {})
|
146
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
147
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
148
|
+
fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil?
|
149
|
+
|
150
|
+
query_params = {}
|
151
|
+
form_params = {}
|
152
|
+
post_body = nil
|
153
|
+
|
154
|
+
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)
|
155
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body)
|
159
|
+
return data, status_code, headers
|
160
|
+
end
|
161
|
+
|
162
|
+
# Delete product variant
|
163
|
+
def delete_product_variant(store_id, product_id, variant_id, opts = {})
|
164
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
165
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
166
|
+
fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
|
167
|
+
|
168
|
+
query_params = {}
|
169
|
+
form_params = {}
|
170
|
+
post_body = nil
|
171
|
+
|
172
|
+
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)
|
173
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
174
|
+
:query_params => query_params,
|
175
|
+
:form_params => form_params,
|
176
|
+
:body => post_body)
|
177
|
+
return data, status_code, headers
|
178
|
+
end
|
179
|
+
|
180
|
+
# Delete promo code
|
181
|
+
def delete_promo_code(store_id, promo_rule_id, promo_code_id, opts = {})
|
182
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
183
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
184
|
+
fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil?
|
185
|
+
|
186
|
+
query_params = {}
|
187
|
+
form_params = {}
|
188
|
+
post_body = nil
|
189
|
+
|
190
|
+
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)
|
191
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
192
|
+
:query_params => query_params,
|
193
|
+
:form_params => form_params,
|
194
|
+
:body => post_body)
|
195
|
+
return data, status_code, headers
|
196
|
+
end
|
197
|
+
|
198
|
+
# Delete promo rule
|
199
|
+
def delete_promo_rule(store_id, promo_rule_id, opts = {})
|
200
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
201
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
202
|
+
|
203
|
+
query_params = {}
|
204
|
+
form_params = {}
|
205
|
+
post_body = nil
|
206
|
+
|
207
|
+
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)
|
208
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
209
|
+
:query_params => query_params,
|
210
|
+
:form_params => form_params,
|
211
|
+
:body => post_body)
|
212
|
+
return data, status_code, headers
|
213
|
+
end
|
214
|
+
|
215
|
+
# List e commerce api resources
|
216
|
+
def info(opts = {})
|
217
|
+
|
218
|
+
query_params = {}
|
219
|
+
form_params = {}
|
220
|
+
post_body = nil
|
221
|
+
|
222
|
+
local_var_path = '/ecommerce'
|
223
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
224
|
+
:query_params => query_params,
|
225
|
+
:form_params => form_params,
|
226
|
+
:body => post_body)
|
227
|
+
return data, status_code, headers
|
228
|
+
end
|
229
|
+
|
230
|
+
# List account orders
|
231
|
+
def orders(opts = {})
|
232
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
233
|
+
|
234
|
+
query_params = {}
|
235
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
236
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
237
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
238
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
239
|
+
query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
|
240
|
+
query_params[:'outreach_id'] = opts[:'outreach_id'] if !opts[:'outreach_id'].nil?
|
241
|
+
query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
|
242
|
+
query_params[:'has_outreach'] = opts[:'has_outreach'] if !opts[:'has_outreach'].nil?
|
243
|
+
form_params = {}
|
244
|
+
post_body = nil
|
245
|
+
|
246
|
+
local_var_path = '/ecommerce/orders'
|
247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
248
|
+
:query_params => query_params,
|
249
|
+
:form_params => form_params,
|
250
|
+
:body => post_body)
|
251
|
+
return data, status_code, headers
|
252
|
+
end
|
253
|
+
|
254
|
+
# List stores
|
255
|
+
def stores(opts = {})
|
256
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
257
|
+
|
258
|
+
query_params = {}
|
259
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
260
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
261
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
262
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
263
|
+
form_params = {}
|
264
|
+
post_body = nil
|
265
|
+
|
266
|
+
local_var_path = '/ecommerce/stores'
|
267
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body)
|
271
|
+
return data, status_code, headers
|
272
|
+
end
|
273
|
+
|
274
|
+
# Get store info
|
275
|
+
def get_store(store_id, opts = {})
|
276
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
277
|
+
|
278
|
+
query_params = {}
|
279
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
280
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
281
|
+
form_params = {}
|
282
|
+
post_body = nil
|
283
|
+
|
284
|
+
local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
|
285
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
286
|
+
:query_params => query_params,
|
287
|
+
:form_params => form_params,
|
288
|
+
:body => post_body)
|
289
|
+
return data, status_code, headers
|
290
|
+
end
|
291
|
+
|
292
|
+
# List carts
|
293
|
+
def get_store_carts(store_id, opts = {})
|
294
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
295
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
296
|
+
|
297
|
+
query_params = {}
|
298
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
299
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
300
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
301
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
302
|
+
form_params = {}
|
303
|
+
post_body = nil
|
304
|
+
|
305
|
+
local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s)
|
306
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
307
|
+
:query_params => query_params,
|
308
|
+
:form_params => form_params,
|
309
|
+
:body => post_body)
|
310
|
+
return data, status_code, headers
|
311
|
+
end
|
312
|
+
|
313
|
+
# Get cart info
|
314
|
+
def get_store_cart(store_id, cart_id, opts = {})
|
315
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
316
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
317
|
+
|
318
|
+
query_params = {}
|
319
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
320
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
321
|
+
form_params = {}
|
322
|
+
post_body = nil
|
323
|
+
|
324
|
+
local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
|
325
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
326
|
+
:query_params => query_params,
|
327
|
+
:form_params => form_params,
|
328
|
+
:body => post_body)
|
329
|
+
return data, status_code, headers
|
330
|
+
end
|
331
|
+
|
332
|
+
# List cart line items
|
333
|
+
def get_all_cart_line_items(store_id, cart_id, opts = {})
|
334
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
335
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
336
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
337
|
+
|
338
|
+
query_params = {}
|
339
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
340
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
341
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
342
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
343
|
+
form_params = {}
|
344
|
+
post_body = nil
|
345
|
+
|
346
|
+
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)
|
347
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
348
|
+
:query_params => query_params,
|
349
|
+
:form_params => form_params,
|
350
|
+
:body => post_body)
|
351
|
+
return data, status_code, headers
|
352
|
+
end
|
353
|
+
|
354
|
+
# Get cart line item
|
355
|
+
def get_cart_line_item(store_id, cart_id, line_id, opts = {})
|
356
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
357
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
358
|
+
fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
|
359
|
+
|
360
|
+
query_params = {}
|
361
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
362
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
363
|
+
form_params = {}
|
364
|
+
post_body = nil
|
365
|
+
|
366
|
+
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)
|
367
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
368
|
+
:query_params => query_params,
|
369
|
+
:form_params => form_params,
|
370
|
+
:body => post_body)
|
371
|
+
return data, status_code, headers
|
372
|
+
end
|
373
|
+
|
374
|
+
# List customers
|
375
|
+
def get_all_store_customers(store_id, opts = {})
|
376
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
377
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
378
|
+
|
379
|
+
query_params = {}
|
380
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
381
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
382
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
383
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
384
|
+
query_params[:'email_address'] = opts[:'email_address'] if !opts[:'email_address'].nil?
|
385
|
+
form_params = {}
|
386
|
+
post_body = nil
|
387
|
+
|
388
|
+
local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s)
|
389
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
390
|
+
:query_params => query_params,
|
391
|
+
:form_params => form_params,
|
392
|
+
:body => post_body)
|
393
|
+
return data, status_code, headers
|
394
|
+
end
|
395
|
+
|
396
|
+
# Get customer info
|
397
|
+
def get_store_customer(store_id, customer_id, opts = {})
|
398
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
399
|
+
fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
|
400
|
+
|
401
|
+
query_params = {}
|
402
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
403
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
404
|
+
form_params = {}
|
405
|
+
post_body = nil
|
406
|
+
|
407
|
+
local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
|
408
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
409
|
+
:query_params => query_params,
|
410
|
+
:form_params => form_params,
|
411
|
+
:body => post_body)
|
412
|
+
return data, status_code, headers
|
413
|
+
end
|
414
|
+
|
415
|
+
# List orders
|
416
|
+
def get_store_orders(store_id, opts = {})
|
417
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
418
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
419
|
+
|
420
|
+
query_params = {}
|
421
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
422
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
423
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
424
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
425
|
+
query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
|
426
|
+
query_params[:'has_outreach'] = opts[:'has_outreach'] if !opts[:'has_outreach'].nil?
|
427
|
+
query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
|
428
|
+
query_params[:'outreach_id'] = opts[:'outreach_id'] if !opts[:'outreach_id'].nil?
|
429
|
+
form_params = {}
|
430
|
+
post_body = nil
|
431
|
+
|
432
|
+
local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s)
|
433
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
434
|
+
:query_params => query_params,
|
435
|
+
:form_params => form_params,
|
436
|
+
:body => post_body)
|
437
|
+
return data, status_code, headers
|
438
|
+
end
|
439
|
+
|
440
|
+
# Get order info
|
441
|
+
def get_order(store_id, order_id, opts = {})
|
442
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
443
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
444
|
+
|
445
|
+
query_params = {}
|
446
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
447
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
448
|
+
form_params = {}
|
449
|
+
post_body = nil
|
450
|
+
|
451
|
+
local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
|
452
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
453
|
+
:query_params => query_params,
|
454
|
+
:form_params => form_params,
|
455
|
+
:body => post_body)
|
456
|
+
return data, status_code, headers
|
457
|
+
end
|
458
|
+
|
459
|
+
# List order line items
|
460
|
+
def get_all_order_line_items(store_id, order_id, opts = {})
|
461
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
462
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
463
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
464
|
+
|
465
|
+
query_params = {}
|
466
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
467
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
468
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
469
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
470
|
+
form_params = {}
|
471
|
+
post_body = nil
|
472
|
+
|
473
|
+
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)
|
474
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
475
|
+
:query_params => query_params,
|
476
|
+
:form_params => form_params,
|
477
|
+
:body => post_body)
|
478
|
+
return data, status_code, headers
|
479
|
+
end
|
480
|
+
|
481
|
+
# Get order line item
|
482
|
+
def get_order_line_item(store_id, order_id, line_id, opts = {})
|
483
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
484
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
485
|
+
fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
|
486
|
+
|
487
|
+
query_params = {}
|
488
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
489
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
490
|
+
form_params = {}
|
491
|
+
post_body = nil
|
492
|
+
|
493
|
+
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)
|
494
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
495
|
+
:query_params => query_params,
|
496
|
+
:form_params => form_params,
|
497
|
+
:body => post_body)
|
498
|
+
return data, status_code, headers
|
499
|
+
end
|
500
|
+
|
501
|
+
# List product
|
502
|
+
def get_all_store_products(store_id, opts = {})
|
503
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
504
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of title, created_at, price' if opts[:'sort_field'] && !['title', 'created_at', 'price'].include?(opts[:'sort_field'])
|
505
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
506
|
+
|
507
|
+
query_params = {}
|
508
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
509
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
510
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
511
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
512
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
513
|
+
form_params = {}
|
514
|
+
post_body = nil
|
515
|
+
|
516
|
+
local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s)
|
517
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
518
|
+
:query_params => query_params,
|
519
|
+
:form_params => form_params,
|
520
|
+
:body => post_body)
|
521
|
+
return data, status_code, headers
|
522
|
+
end
|
523
|
+
|
524
|
+
# Get product info
|
525
|
+
def get_store_product(store_id, product_id, opts = {})
|
526
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
527
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
528
|
+
|
529
|
+
query_params = {}
|
530
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
531
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
532
|
+
form_params = {}
|
533
|
+
post_body = nil
|
534
|
+
|
535
|
+
local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
|
536
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
537
|
+
:query_params => query_params,
|
538
|
+
:form_params => form_params,
|
539
|
+
:body => post_body)
|
540
|
+
return data, status_code, headers
|
541
|
+
end
|
542
|
+
|
543
|
+
# List product images
|
544
|
+
def get_product_images(store_id, product_id, opts = {})
|
545
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
546
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
547
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
548
|
+
|
549
|
+
query_params = {}
|
550
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
551
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
552
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
553
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
554
|
+
form_params = {}
|
555
|
+
post_body = nil
|
556
|
+
|
557
|
+
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)
|
558
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
559
|
+
:query_params => query_params,
|
560
|
+
:form_params => form_params,
|
561
|
+
:body => post_body)
|
562
|
+
return data, status_code, headers
|
563
|
+
end
|
564
|
+
|
565
|
+
# Get product image info
|
566
|
+
def get_product_image(store_id, product_id, image_id, opts = {})
|
567
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
568
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
569
|
+
fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil?
|
570
|
+
|
571
|
+
query_params = {}
|
572
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
573
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
574
|
+
form_params = {}
|
575
|
+
post_body = nil
|
576
|
+
|
577
|
+
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)
|
578
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
579
|
+
:query_params => query_params,
|
580
|
+
:form_params => form_params,
|
581
|
+
:body => post_body)
|
582
|
+
return data, status_code, headers
|
583
|
+
end
|
584
|
+
|
585
|
+
# List product variants
|
586
|
+
def get_product_variants(store_id, product_id, opts = {})
|
587
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
588
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
589
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
590
|
+
|
591
|
+
query_params = {}
|
592
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
593
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
594
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
595
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
596
|
+
form_params = {}
|
597
|
+
post_body = nil
|
598
|
+
|
599
|
+
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)
|
600
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
601
|
+
:query_params => query_params,
|
602
|
+
:form_params => form_params,
|
603
|
+
:body => post_body)
|
604
|
+
return data, status_code, headers
|
605
|
+
end
|
606
|
+
|
607
|
+
# Get product variant info
|
608
|
+
def get_product_variant(store_id, product_id, variant_id, opts = {})
|
609
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
610
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
611
|
+
fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
|
612
|
+
|
613
|
+
query_params = {}
|
614
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
615
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
616
|
+
form_params = {}
|
617
|
+
post_body = nil
|
618
|
+
|
619
|
+
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)
|
620
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
621
|
+
:query_params => query_params,
|
622
|
+
:form_params => form_params,
|
623
|
+
:body => post_body)
|
624
|
+
return data, status_code, headers
|
625
|
+
end
|
626
|
+
|
627
|
+
# List promo codes
|
628
|
+
def get_promo_codes(promo_rule_id, store_id, opts = {})
|
629
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
630
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
631
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
632
|
+
|
633
|
+
query_params = {}
|
634
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
635
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
636
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
637
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
638
|
+
form_params = {}
|
639
|
+
post_body = nil
|
640
|
+
|
641
|
+
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)
|
642
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
643
|
+
:query_params => query_params,
|
644
|
+
:form_params => form_params,
|
645
|
+
:body => post_body)
|
646
|
+
return data, status_code, headers
|
647
|
+
end
|
648
|
+
|
649
|
+
# Get promo code
|
650
|
+
def get_promo_code(store_id, promo_rule_id, promo_code_id, opts = {})
|
651
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
652
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
653
|
+
fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil?
|
654
|
+
|
655
|
+
query_params = {}
|
656
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
657
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
658
|
+
form_params = {}
|
659
|
+
post_body = nil
|
660
|
+
|
661
|
+
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)
|
662
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
663
|
+
:query_params => query_params,
|
664
|
+
:form_params => form_params,
|
665
|
+
:body => post_body)
|
666
|
+
return data, status_code, headers
|
667
|
+
end
|
668
|
+
|
669
|
+
# List promo rules
|
670
|
+
def list_promo_rules(store_id, opts = {})
|
671
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
672
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
673
|
+
|
674
|
+
query_params = {}
|
675
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
676
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
677
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
678
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
679
|
+
form_params = {}
|
680
|
+
post_body = nil
|
681
|
+
|
682
|
+
local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s)
|
683
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
684
|
+
:query_params => query_params,
|
685
|
+
:form_params => form_params,
|
686
|
+
:body => post_body)
|
687
|
+
return data, status_code, headers
|
688
|
+
end
|
689
|
+
|
690
|
+
# Get promo rule
|
691
|
+
def get_promo_rule(store_id, promo_rule_id, opts = {})
|
692
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
693
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
694
|
+
|
695
|
+
query_params = {}
|
696
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
697
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
698
|
+
form_params = {}
|
699
|
+
post_body = nil
|
700
|
+
|
701
|
+
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)
|
702
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
703
|
+
:query_params => query_params,
|
704
|
+
:form_params => form_params,
|
705
|
+
:body => post_body)
|
706
|
+
return data, status_code, headers
|
707
|
+
end
|
708
|
+
|
709
|
+
# Update store
|
710
|
+
def update_store(store_id, body, opts = {})
|
711
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
712
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
713
|
+
|
714
|
+
query_params = {}
|
715
|
+
form_params = {}
|
716
|
+
post_body = @api_client.object_to_http_body(body)
|
717
|
+
|
718
|
+
local_var_path = '/ecommerce/stores/{store_id}'.sub('{' + 'store_id' + '}', store_id.to_s)
|
719
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
720
|
+
:query_params => query_params,
|
721
|
+
:form_params => form_params,
|
722
|
+
:body => post_body)
|
723
|
+
return data, status_code, headers
|
724
|
+
end
|
725
|
+
|
726
|
+
# Update cart
|
727
|
+
def update_store_cart(store_id, cart_id, body, opts = {})
|
728
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
729
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
730
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
731
|
+
|
732
|
+
query_params = {}
|
733
|
+
form_params = {}
|
734
|
+
post_body = @api_client.object_to_http_body(body)
|
735
|
+
|
736
|
+
local_var_path = '/ecommerce/stores/{store_id}/carts/{cart_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'cart_id' + '}', cart_id.to_s)
|
737
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
738
|
+
:query_params => query_params,
|
739
|
+
:form_params => form_params,
|
740
|
+
:body => post_body)
|
741
|
+
return data, status_code, headers
|
742
|
+
end
|
743
|
+
|
744
|
+
# Update cart line item
|
745
|
+
def update_cart_line_item(store_id, cart_id, line_id, body, opts = {})
|
746
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
747
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
748
|
+
fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
|
749
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
750
|
+
|
751
|
+
query_params = {}
|
752
|
+
form_params = {}
|
753
|
+
post_body = @api_client.object_to_http_body(body)
|
754
|
+
|
755
|
+
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)
|
756
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
757
|
+
:query_params => query_params,
|
758
|
+
:form_params => form_params,
|
759
|
+
:body => post_body)
|
760
|
+
return data, status_code, headers
|
761
|
+
end
|
762
|
+
|
763
|
+
# Update customer
|
764
|
+
def update_store_customer(store_id, customer_id, body, opts = {})
|
765
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
766
|
+
fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
|
767
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
768
|
+
|
769
|
+
query_params = {}
|
770
|
+
form_params = {}
|
771
|
+
post_body = @api_client.object_to_http_body(body)
|
772
|
+
|
773
|
+
local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
|
774
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
775
|
+
:query_params => query_params,
|
776
|
+
:form_params => form_params,
|
777
|
+
:body => post_body)
|
778
|
+
return data, status_code, headers
|
779
|
+
end
|
780
|
+
|
781
|
+
# Update order
|
782
|
+
def update_order(store_id, order_id, body, opts = {})
|
783
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
784
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
785
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
786
|
+
|
787
|
+
query_params = {}
|
788
|
+
form_params = {}
|
789
|
+
post_body = @api_client.object_to_http_body(body)
|
790
|
+
|
791
|
+
local_var_path = '/ecommerce/stores/{store_id}/orders/{order_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
|
792
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
793
|
+
:query_params => query_params,
|
794
|
+
:form_params => form_params,
|
795
|
+
:body => post_body)
|
796
|
+
return data, status_code, headers
|
797
|
+
end
|
798
|
+
|
799
|
+
# Update order line item
|
800
|
+
def update_order_line_item(store_id, order_id, line_id, body, opts = {})
|
801
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
802
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
803
|
+
fail ArgumentError, "Missing required param: 'line_id'" if line_id.nil?
|
804
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
805
|
+
|
806
|
+
query_params = {}
|
807
|
+
form_params = {}
|
808
|
+
post_body = @api_client.object_to_http_body(body)
|
809
|
+
|
810
|
+
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)
|
811
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
812
|
+
:query_params => query_params,
|
813
|
+
:form_params => form_params,
|
814
|
+
:body => post_body)
|
815
|
+
return data, status_code, headers
|
816
|
+
end
|
817
|
+
|
818
|
+
# Update product
|
819
|
+
def update_store_product(store_id, product_id, body, opts = {})
|
820
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
821
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
822
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
823
|
+
|
824
|
+
query_params = {}
|
825
|
+
form_params = {}
|
826
|
+
post_body = @api_client.object_to_http_body(body)
|
827
|
+
|
828
|
+
local_var_path = '/ecommerce/stores/{store_id}/products/{product_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'product_id' + '}', product_id.to_s)
|
829
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
830
|
+
:query_params => query_params,
|
831
|
+
:form_params => form_params,
|
832
|
+
:body => post_body)
|
833
|
+
return data, status_code, headers
|
834
|
+
end
|
835
|
+
|
836
|
+
# Update product image
|
837
|
+
def update_product_image(store_id, product_id, image_id, body, opts = {})
|
838
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
839
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
840
|
+
fail ArgumentError, "Missing required param: 'image_id'" if image_id.nil?
|
841
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
842
|
+
|
843
|
+
query_params = {}
|
844
|
+
form_params = {}
|
845
|
+
post_body = @api_client.object_to_http_body(body)
|
846
|
+
|
847
|
+
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)
|
848
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
849
|
+
:query_params => query_params,
|
850
|
+
:form_params => form_params,
|
851
|
+
:body => post_body)
|
852
|
+
return data, status_code, headers
|
853
|
+
end
|
854
|
+
|
855
|
+
# Update product variant
|
856
|
+
def update_product_variant(store_id, product_id, variant_id, body, opts = {})
|
857
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
858
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
859
|
+
fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
|
860
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
861
|
+
|
862
|
+
query_params = {}
|
863
|
+
form_params = {}
|
864
|
+
post_body = @api_client.object_to_http_body(body)
|
865
|
+
|
866
|
+
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)
|
867
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
868
|
+
:query_params => query_params,
|
869
|
+
:form_params => form_params,
|
870
|
+
:body => post_body)
|
871
|
+
return data, status_code, headers
|
872
|
+
end
|
873
|
+
|
874
|
+
# Update promo code
|
875
|
+
def update_promo_code(store_id, promo_rule_id, promo_code_id, body, opts = {})
|
876
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
877
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
878
|
+
fail ArgumentError, "Missing required param: 'promo_code_id'" if promo_code_id.nil?
|
879
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
880
|
+
|
881
|
+
query_params = {}
|
882
|
+
form_params = {}
|
883
|
+
post_body = @api_client.object_to_http_body(body)
|
884
|
+
|
885
|
+
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)
|
886
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
887
|
+
:query_params => query_params,
|
888
|
+
:form_params => form_params,
|
889
|
+
:body => post_body)
|
890
|
+
return data, status_code, headers
|
891
|
+
end
|
892
|
+
|
893
|
+
# Update promo rule
|
894
|
+
def update_promo_rule(store_id, promo_rule_id, body, opts = {})
|
895
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
896
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
897
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
898
|
+
|
899
|
+
query_params = {}
|
900
|
+
form_params = {}
|
901
|
+
post_body = @api_client.object_to_http_body(body)
|
902
|
+
|
903
|
+
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)
|
904
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
905
|
+
:query_params => query_params,
|
906
|
+
:form_params => form_params,
|
907
|
+
:body => post_body)
|
908
|
+
return data, status_code, headers
|
909
|
+
end
|
910
|
+
|
911
|
+
# Add store
|
912
|
+
def add_store(body, opts = {})
|
913
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
914
|
+
|
915
|
+
query_params = {}
|
916
|
+
form_params = {}
|
917
|
+
post_body = @api_client.object_to_http_body(body)
|
918
|
+
|
919
|
+
local_var_path = '/ecommerce/stores'
|
920
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
921
|
+
:query_params => query_params,
|
922
|
+
:form_params => form_params,
|
923
|
+
:body => post_body)
|
924
|
+
return data, status_code, headers
|
925
|
+
end
|
926
|
+
|
927
|
+
# Add cart
|
928
|
+
def add_store_cart(store_id, body, opts = {})
|
929
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
930
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
931
|
+
|
932
|
+
query_params = {}
|
933
|
+
form_params = {}
|
934
|
+
post_body = @api_client.object_to_http_body(body)
|
935
|
+
|
936
|
+
local_var_path = '/ecommerce/stores/{store_id}/carts'.sub('{' + 'store_id' + '}', store_id.to_s)
|
937
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
938
|
+
:query_params => query_params,
|
939
|
+
:form_params => form_params,
|
940
|
+
:body => post_body)
|
941
|
+
return data, status_code, headers
|
942
|
+
end
|
943
|
+
|
944
|
+
# Add cart line item
|
945
|
+
def add_cart_line_item(store_id, cart_id, body, opts = {})
|
946
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
947
|
+
fail ArgumentError, "Missing required param: 'cart_id'" if cart_id.nil?
|
948
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
949
|
+
|
950
|
+
query_params = {}
|
951
|
+
form_params = {}
|
952
|
+
post_body = @api_client.object_to_http_body(body)
|
953
|
+
|
954
|
+
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)
|
955
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
956
|
+
:query_params => query_params,
|
957
|
+
:form_params => form_params,
|
958
|
+
:body => post_body)
|
959
|
+
return data, status_code, headers
|
960
|
+
end
|
961
|
+
|
962
|
+
# Add customer
|
963
|
+
def add_store_customer(store_id, body, opts = {})
|
964
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
965
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
966
|
+
|
967
|
+
query_params = {}
|
968
|
+
form_params = {}
|
969
|
+
post_body = @api_client.object_to_http_body(body)
|
970
|
+
|
971
|
+
local_var_path = '/ecommerce/stores/{store_id}/customers'.sub('{' + 'store_id' + '}', store_id.to_s)
|
972
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
973
|
+
:query_params => query_params,
|
974
|
+
:form_params => form_params,
|
975
|
+
:body => post_body)
|
976
|
+
return data, status_code, headers
|
977
|
+
end
|
978
|
+
|
979
|
+
# Add order
|
980
|
+
def add_store_order(store_id, body, opts = {})
|
981
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
982
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
983
|
+
|
984
|
+
query_params = {}
|
985
|
+
form_params = {}
|
986
|
+
post_body = @api_client.object_to_http_body(body)
|
987
|
+
|
988
|
+
local_var_path = '/ecommerce/stores/{store_id}/orders'.sub('{' + 'store_id' + '}', store_id.to_s)
|
989
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
990
|
+
:query_params => query_params,
|
991
|
+
:form_params => form_params,
|
992
|
+
:body => post_body)
|
993
|
+
return data, status_code, headers
|
994
|
+
end
|
995
|
+
|
996
|
+
# Add order line item
|
997
|
+
def add_order_line_item(store_id, order_id, body, opts = {})
|
998
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
999
|
+
fail ArgumentError, "Missing required param: 'order_id'" if order_id.nil?
|
1000
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1001
|
+
|
1002
|
+
query_params = {}
|
1003
|
+
form_params = {}
|
1004
|
+
post_body = @api_client.object_to_http_body(body)
|
1005
|
+
|
1006
|
+
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)
|
1007
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1008
|
+
:query_params => query_params,
|
1009
|
+
:form_params => form_params,
|
1010
|
+
:body => post_body)
|
1011
|
+
return data, status_code, headers
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# Add product
|
1015
|
+
def add_store_product(store_id, body, opts = {})
|
1016
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
1017
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1018
|
+
|
1019
|
+
query_params = {}
|
1020
|
+
form_params = {}
|
1021
|
+
post_body = @api_client.object_to_http_body(body)
|
1022
|
+
|
1023
|
+
local_var_path = '/ecommerce/stores/{store_id}/products'.sub('{' + 'store_id' + '}', store_id.to_s)
|
1024
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1025
|
+
:query_params => query_params,
|
1026
|
+
:form_params => form_params,
|
1027
|
+
:body => post_body)
|
1028
|
+
return data, status_code, headers
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Add product image
|
1032
|
+
def add_product_image(store_id, product_id, body, opts = {})
|
1033
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
1034
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
1035
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1036
|
+
|
1037
|
+
query_params = {}
|
1038
|
+
form_params = {}
|
1039
|
+
post_body = @api_client.object_to_http_body(body)
|
1040
|
+
|
1041
|
+
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)
|
1042
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1043
|
+
:query_params => query_params,
|
1044
|
+
:form_params => form_params,
|
1045
|
+
:body => post_body)
|
1046
|
+
return data, status_code, headers
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# Add product variant
|
1050
|
+
def add_product_variants(store_id, product_id, body, opts = {})
|
1051
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
1052
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
1053
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1054
|
+
|
1055
|
+
query_params = {}
|
1056
|
+
form_params = {}
|
1057
|
+
post_body = @api_client.object_to_http_body(body)
|
1058
|
+
|
1059
|
+
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)
|
1060
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1061
|
+
:query_params => query_params,
|
1062
|
+
:form_params => form_params,
|
1063
|
+
:body => post_body)
|
1064
|
+
return data, status_code, headers
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
# Add promo code
|
1068
|
+
def add_promo_code(store_id, promo_rule_id, body, opts = {})
|
1069
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
1070
|
+
fail ArgumentError, "Missing required param: 'promo_rule_id'" if promo_rule_id.nil?
|
1071
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1072
|
+
|
1073
|
+
query_params = {}
|
1074
|
+
form_params = {}
|
1075
|
+
post_body = @api_client.object_to_http_body(body)
|
1076
|
+
|
1077
|
+
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)
|
1078
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1079
|
+
:query_params => query_params,
|
1080
|
+
:form_params => form_params,
|
1081
|
+
:body => post_body)
|
1082
|
+
return data, status_code, headers
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
# Add promo rule
|
1086
|
+
def add_promo_rules(store_id, body, opts = {})
|
1087
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
1088
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1089
|
+
|
1090
|
+
query_params = {}
|
1091
|
+
form_params = {}
|
1092
|
+
post_body = @api_client.object_to_http_body(body)
|
1093
|
+
|
1094
|
+
local_var_path = '/ecommerce/stores/{store_id}/promo-rules'.sub('{' + 'store_id' + '}', store_id.to_s)
|
1095
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1096
|
+
:query_params => query_params,
|
1097
|
+
:form_params => form_params,
|
1098
|
+
:body => post_body)
|
1099
|
+
return data, status_code, headers
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
# Add or update customer
|
1103
|
+
def set_store_customer(store_id, customer_id, body, opts = {})
|
1104
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
1105
|
+
fail ArgumentError, "Missing required param: 'customer_id'" if customer_id.nil?
|
1106
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1107
|
+
|
1108
|
+
query_params = {}
|
1109
|
+
form_params = {}
|
1110
|
+
post_body = @api_client.object_to_http_body(body)
|
1111
|
+
|
1112
|
+
local_var_path = '/ecommerce/stores/{store_id}/customers/{customer_id}'.sub('{' + 'store_id' + '}', store_id.to_s).sub('{' + 'customer_id' + '}', customer_id.to_s)
|
1113
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1114
|
+
:query_params => query_params,
|
1115
|
+
:form_params => form_params,
|
1116
|
+
:body => post_body)
|
1117
|
+
return data, status_code, headers
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
# Add or update product variant
|
1121
|
+
def add_product_variant(store_id, product_id, variant_id, body, opts = {})
|
1122
|
+
fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
|
1123
|
+
fail ArgumentError, "Missing required param: 'product_id'" if product_id.nil?
|
1124
|
+
fail ArgumentError, "Missing required param: 'variant_id'" if variant_id.nil?
|
1125
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1126
|
+
|
1127
|
+
query_params = {}
|
1128
|
+
form_params = {}
|
1129
|
+
post_body = @api_client.object_to_http_body(body)
|
1130
|
+
|
1131
|
+
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)
|
1132
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1133
|
+
:query_params => query_params,
|
1134
|
+
:form_params => form_params,
|
1135
|
+
:body => post_body)
|
1136
|
+
return data, status_code, headers
|
1137
|
+
end
|
1138
|
+
end
|
1139
|
+
end
|