MailchimpMarketing 3.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/MailchimpMarketing.gemspec +45 -0
  4. data/README.md +378 -0
  5. data/lib/MailchimpMarketing.rb +162 -0
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +57 -0
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +78 -0
  8. data/lib/MailchimpMarketing/api/automations_api.rb +351 -0
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +111 -0
  10. data/lib/MailchimpMarketing/api/batches_api.rb +94 -0
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +111 -0
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +414 -0
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +110 -0
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +124 -0
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +128 -0
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +1139 -0
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +78 -0
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +66 -0
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +224 -0
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +164 -0
  21. data/lib/MailchimpMarketing/api/lists_api.rb +1302 -0
  22. data/lib/MailchimpMarketing/api/ping_api.rb +39 -0
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +45 -0
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +142 -0
  25. data/lib/MailchimpMarketing/api/reports_api.rb +464 -0
  26. data/lib/MailchimpMarketing/api/root_api.rb +41 -0
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +43 -0
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +44 -0
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +111 -0
  30. data/lib/MailchimpMarketing/api/templates_api.rb +137 -0
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +104 -0
  32. data/lib/MailchimpMarketing/api_client.rb +214 -0
  33. data/lib/MailchimpMarketing/api_error.rb +38 -0
  34. data/lib/MailchimpMarketing/configuration.rb +209 -0
  35. data/lib/MailchimpMarketing/version.rb +15 -0
  36. metadata +257 -0
@@ -0,0 +1,78 @@
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 ExternalAuthsApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client)
21
+ @api_client = api_client
22
+ end
23
+
24
+ # Get external authentication
25
+ def get(system_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'system_id'" if system_id.nil?
27
+
28
+ query_params = {}
29
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
30
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
31
+ form_params = {}
32
+ post_body = nil
33
+
34
+ local_var_path = '/external-auths/{system_id}'.sub('{' + 'system_id' + '}', system_id.to_s)
35
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
36
+ :query_params => query_params,
37
+ :form_params => form_params,
38
+ :body => post_body)
39
+ return data, status_code, headers
40
+ end
41
+
42
+ # List external authentications
43
+ def get_collection(opts = {})
44
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
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
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
50
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
51
+ form_params = {}
52
+ post_body = nil
53
+
54
+ local_var_path = '/external-auths'
55
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
56
+ :query_params => query_params,
57
+ :form_params => form_params,
58
+ :body => post_body)
59
+ return data, status_code, headers
60
+ end
61
+
62
+ # Add external authentication
63
+ def create(body, opts = {})
64
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
65
+
66
+ query_params = {}
67
+ form_params = {}
68
+ post_body = @api_client.object_to_http_body(body)
69
+
70
+ local_var_path = '/external-auths'
71
+ data, status_code, headers = @api_client.call_api(:POST, 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
+ end
78
+ end
@@ -0,0 +1,66 @@
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 FacebookAdsApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client)
21
+ @api_client = api_client
22
+ end
23
+
24
+ # List facebook ads
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 "sort_field", must be one of created_at, updated_at, end_time' if opts[:'sort_field'] && !['created_at', 'updated_at', 'end_time'].include?(opts[:'sort_field'])
28
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
29
+
30
+ query_params = {}
31
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
32
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
33
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
34
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
35
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
36
+ query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
37
+ form_params = {}
38
+ post_body = nil
39
+
40
+ local_var_path = '/facebook-ads'
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 facebook ad info
49
+ def get_ad(outreach_id, opts = {})
50
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_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 = '/facebook-ads/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_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
+ end
66
+ end
@@ -0,0 +1,224 @@
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 FileManagerApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client)
21
+ @api_client = api_client
22
+ end
23
+
24
+ # Delete file
25
+ def delete_file(file_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'file_id'" if file_id.nil?
27
+
28
+ query_params = {}
29
+ form_params = {}
30
+ post_body = nil
31
+
32
+ local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_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 folder
41
+ def delete_folder(folder_id, opts = {})
42
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
43
+
44
+ query_params = {}
45
+ form_params = {}
46
+ post_body = nil
47
+
48
+ local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
49
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
50
+ :query_params => query_params,
51
+ :form_params => form_params,
52
+ :body => post_body)
53
+ return data, status_code, headers
54
+ end
55
+
56
+ # List file manager resources
57
+ def get(opts = {})
58
+
59
+ query_params = {}
60
+ form_params = {}
61
+ post_body = nil
62
+
63
+ local_var_path = '/file-manager'
64
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body)
68
+ return data, status_code, headers
69
+ end
70
+
71
+ # List stored files
72
+ def files(opts = {})
73
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
74
+ fail ArgumentError, 'invalid value for "sort_field", must be one of added_date' if opts[:'sort_field'] && !['added_date'].include?(opts[:'sort_field'])
75
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
76
+
77
+ query_params = {}
78
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
79
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
80
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
81
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
82
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
83
+ query_params[:'created_by'] = opts[:'created_by'] if !opts[:'created_by'].nil?
84
+ query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
85
+ query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
86
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
87
+ query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
88
+ form_params = {}
89
+ post_body = nil
90
+
91
+ local_var_path = '/file-manager/files'
92
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body)
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Get file
100
+ def get_file(file_id, opts = {})
101
+ fail ArgumentError, "Missing required param: 'file_id'" if file_id.nil?
102
+
103
+ query_params = {}
104
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
105
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
106
+ form_params = {}
107
+ post_body = nil
108
+
109
+ local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
110
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
111
+ :query_params => query_params,
112
+ :form_params => form_params,
113
+ :body => post_body)
114
+ return data, status_code, headers
115
+ end
116
+
117
+ # List folders
118
+ def list_folders(opts = {})
119
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
120
+
121
+ query_params = {}
122
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
123
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
124
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
125
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
126
+ query_params[:'created_by'] = opts[:'created_by'] if !opts[:'created_by'].nil?
127
+ query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
128
+ query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
129
+ form_params = {}
130
+ post_body = nil
131
+
132
+ local_var_path = '/file-manager/folders'
133
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body)
137
+ return data, status_code, headers
138
+ end
139
+
140
+ # Get folder
141
+ def get_folder(folder_id, opts = {})
142
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
143
+
144
+ query_params = {}
145
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
146
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
147
+ form_params = {}
148
+ post_body = nil
149
+
150
+ local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
151
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
152
+ :query_params => query_params,
153
+ :form_params => form_params,
154
+ :body => post_body)
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Update file
159
+ def update_file(file_id, body, opts = {})
160
+ fail ArgumentError, "Missing required param: 'file_id'" if file_id.nil?
161
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
162
+
163
+ query_params = {}
164
+ form_params = {}
165
+ post_body = @api_client.object_to_http_body(body)
166
+
167
+ local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
168
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
169
+ :query_params => query_params,
170
+ :form_params => form_params,
171
+ :body => post_body)
172
+ return data, status_code, headers
173
+ end
174
+
175
+ # Update folder
176
+ def update_folder(folder_id, body, opts = {})
177
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
178
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
179
+
180
+ query_params = {}
181
+ form_params = {}
182
+ post_body = @api_client.object_to_http_body(body)
183
+
184
+ local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
185
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
186
+ :query_params => query_params,
187
+ :form_params => form_params,
188
+ :body => post_body)
189
+ return data, status_code, headers
190
+ end
191
+
192
+ # Add file
193
+ def upload(body, opts = {})
194
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
195
+
196
+ query_params = {}
197
+ form_params = {}
198
+ post_body = @api_client.object_to_http_body(body)
199
+
200
+ local_var_path = '/file-manager/files'
201
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body)
205
+ return data, status_code, headers
206
+ end
207
+
208
+ # Add folder
209
+ def create_folder(body, opts = {})
210
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
211
+
212
+ query_params = {}
213
+ form_params = {}
214
+ post_body = @api_client.object_to_http_body(body)
215
+
216
+ local_var_path = '/file-manager/folders'
217
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
218
+ :query_params => query_params,
219
+ :form_params => form_params,
220
+ :body => post_body)
221
+ return data, status_code, headers
222
+ end
223
+ end
224
+ end
@@ -0,0 +1,164 @@
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 LandingPagesApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client)
21
+ @api_client = api_client
22
+ end
23
+
24
+ # Delete landing page
25
+ def delete_page(page_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
27
+
28
+ query_params = {}
29
+ form_params = {}
30
+ post_body = nil
31
+
32
+ local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_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 landing pages
41
+ def get_all(opts = {})
42
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
43
+ fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at' if opts[:'sort_field'] && !['created_at', 'updated_at'].include?(opts[:'sort_field'])
44
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
45
+
46
+ query_params = {}
47
+ query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
48
+ query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
49
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
50
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
51
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
52
+ form_params = {}
53
+ post_body = nil
54
+
55
+ local_var_path = '/landing-pages'
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :query_params => query_params,
58
+ :form_params => form_params,
59
+ :body => post_body)
60
+ return data, status_code, headers
61
+ end
62
+
63
+ # Get landing page info
64
+ def get_page(page_id, opts = {})
65
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
66
+
67
+ query_params = {}
68
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
69
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
70
+ form_params = {}
71
+ post_body = nil
72
+
73
+ local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
74
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body)
78
+ return data, status_code, headers
79
+ end
80
+
81
+ # Get landing page content
82
+ def get_page_content(page_id, opts = {})
83
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
84
+
85
+ query_params = {}
86
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
87
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
88
+ form_params = {}
89
+ post_body = nil
90
+
91
+ local_var_path = '/landing-pages/{page_id}/content'.sub('{' + 'page_id' + '}', page_id.to_s)
92
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body)
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Update landing page
100
+ def update_page(page_id, body, opts = {})
101
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
102
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
103
+
104
+ query_params = {}
105
+ form_params = {}
106
+ post_body = @api_client.object_to_http_body(body)
107
+
108
+ local_var_path = '/landing-pages/{page_id}'.sub('{' + 'page_id' + '}', page_id.to_s)
109
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
110
+ :query_params => query_params,
111
+ :form_params => form_params,
112
+ :body => post_body)
113
+ return data, status_code, headers
114
+ end
115
+
116
+ # Add landing page
117
+ def create(body, opts = {})
118
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
119
+
120
+ query_params = {}
121
+ form_params = {}
122
+ post_body = @api_client.object_to_http_body(body)
123
+
124
+ local_var_path = '/landing-pages'
125
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
126
+ :query_params => query_params,
127
+ :form_params => form_params,
128
+ :body => post_body)
129
+ return data, status_code, headers
130
+ end
131
+
132
+ # Publish landing page
133
+ def publish_page(page_id, opts = {})
134
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
135
+
136
+ query_params = {}
137
+ form_params = {}
138
+ post_body = nil
139
+
140
+ local_var_path = '/landing-pages/{page_id}/actions/publish'.sub('{' + 'page_id' + '}', page_id.to_s)
141
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body)
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Unpublish landing page
149
+ def unpublish_page(page_id, opts = {})
150
+ fail ArgumentError, "Missing required param: 'page_id'" if page_id.nil?
151
+
152
+ query_params = {}
153
+ form_params = {}
154
+ post_body = nil
155
+
156
+ local_var_path = '/landing-pages/{page_id}/actions/unpublish'.sub('{' + 'page_id' + '}', page_id.to_s)
157
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
158
+ :query_params => query_params,
159
+ :form_params => form_params,
160
+ :body => post_body)
161
+ return data, status_code, headers
162
+ end
163
+ end
164
+ end