MailchimpMarketing 3.0.1 → 3.0.8

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 +4 -4
  2. data/Gemfile +1 -1
  3. data/MailchimpMarketing.gemspec +1 -1
  4. data/README.md +55 -46
  5. data/lib/MailchimpMarketing.rb +5 -6
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +13 -69
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +20 -113
  8. data/lib/MailchimpMarketing/api/automations_api.rb +130 -685
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +33 -182
  10. data/lib/MailchimpMarketing/api/batches_api.rb +26 -146
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +33 -182
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +144 -803
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +32 -179
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +36 -205
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +32 -221
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +447 -2312
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +20 -113
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +16 -83
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +71 -413
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +51 -286
  21. data/lib/MailchimpMarketing/api/lists_api.rb +721 -2876
  22. data/lib/MailchimpMarketing/api/ping_api.rb +7 -33
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +9 -41
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +41 -237
  25. data/lib/MailchimpMarketing/api/reports_api.rb +153 -903
  26. data/lib/MailchimpMarketing/api/root_api.rb +7 -37
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +8 -39
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +8 -41
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +33 -182
  30. data/lib/MailchimpMarketing/api/templates_api.rb +40 -234
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +32 -170
  32. data/lib/MailchimpMarketing/api_client.rb +94 -64
  33. data/lib/MailchimpMarketing/api_error.rb +4 -4
  34. data/lib/MailchimpMarketing/configuration.rb +1 -1
  35. data/lib/MailchimpMarketing/version.rb +2 -2
  36. metadata +2 -2
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class ExternalAuthsApi
@@ -19,152 +20,58 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Get an External Authentication
23
- # Get information about a specific partners External Authentication for a user.
24
- # @param system_id The System name for external partner.
25
- # @param [Hash] opts the optional parameters
26
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
27
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
28
- # @return [ExternalAuthenticationsExternalAuths]
29
- def get(system_id = {}, opts = {})
30
- data, _status_code, _headers = get_with_http_info(system_id, opts)
31
- data
32
- end
33
23
 
34
- # Get an External Authentication
35
- # Get information about a specific partners External Authentication for a user.
36
- # @param system_id The System name for external partner.
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
39
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
40
- # @return [Array<(ExternalAuthenticationsExternalAuths, Fixnum, Hash)>] ExternalAuthenticationsExternalAuths data, response status code and response headers
41
- def get_with_http_info(system_id, opts = {})
42
- # resource path
43
- local_var_path = '/external-auths/{system_id}'.sub('{' + 'system_id' + '}', system_id.to_s)
24
+ # Get external authentication
25
+ def get(system_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'system_id'" if system_id.nil?
44
27
 
45
- # query parameters
46
28
  query_params = {}
47
29
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
48
30
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
49
-
50
- # header parameters
51
- header_params = {}
52
- # HTTP header 'Accept' (if needed)
53
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
54
- # HTTP header 'Content-Type'
55
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
56
-
57
- # form parameters
58
31
  form_params = {}
59
-
60
- # http body (model)
61
32
  post_body = nil
62
- auth_names = ['basicAuth']
33
+
34
+ local_var_path = '/external-auths/{system_id}'.sub('{' + 'system_id' + '}', system_id.to_s)
63
35
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
64
- :header_params => header_params,
65
36
  :query_params => query_params,
66
37
  :form_params => form_params,
67
- :body => post_body,
68
- :auth_names => auth_names,
69
- :return_type => 'ExternalAuthenticationsExternalAuths')
38
+ :body => post_body)
70
39
  return data, status_code, headers
71
40
  end
72
- # Get a collection of External Authentications
73
- # Get a collection of External Authentications
74
- # @param [Hash] opts the optional parameters
75
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
76
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
77
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
78
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
79
- # @return [ExternalAuthentications]
80
- def get_collection(opts = {})
81
- data, _status_code, _headers = get_collection_with_http_info(opts)
82
- data
83
- end
84
41
 
85
- # Get a collection of External Authentications
86
- # Get a collection of External Authentications
87
- # @param [Hash] opts the optional parameters
88
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
89
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
90
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
91
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
92
- # @return [Array<(ExternalAuthentications, Fixnum, Hash)>] ExternalAuthentications data, response status code and response headers
93
- def get_collection_with_http_info(opts = {})
94
- # resource path
95
- local_var_path = '/external-auths'
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
96
45
 
97
- # query parameters
98
46
  query_params = {}
99
47
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
100
48
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
101
49
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
102
50
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
103
-
104
- # header parameters
105
- header_params = {}
106
- # HTTP header 'Accept' (if needed)
107
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
108
- # HTTP header 'Content-Type'
109
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
110
-
111
- # form parameters
112
51
  form_params = {}
113
-
114
- # http body (model)
115
52
  post_body = nil
116
- auth_names = ['basicAuth']
53
+
54
+ local_var_path = '/external-auths'
117
55
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
118
- :header_params => header_params,
119
56
  :query_params => query_params,
120
57
  :form_params => form_params,
121
- :body => post_body,
122
- :auth_names => auth_names,
123
- :return_type => 'ExternalAuthentications')
58
+ :body => post_body)
124
59
  return data, status_code, headers
125
60
  end
126
- # Create a new External Auth
127
- # Create a new external auth if one does not exist.
128
- # @param body
129
- # @param [Hash] opts the optional parameters
130
- # @return [ExternalAuthenticationsExternalAuths]
131
- def create(body = {}, opts = {})
132
- data, _status_code, _headers = create_with_http_info(body, opts)
133
- data
134
- end
135
61
 
136
- # Create a new External Auth
137
- # Create a new external auth if one does not exist.
138
- # @param body
139
- # @param [Hash] opts the optional parameters
140
- # @return [Array<(ExternalAuthenticationsExternalAuths, Fixnum, Hash)>] ExternalAuthenticationsExternalAuths data, response status code and response headers
141
- def create_with_http_info(body, opts = {})
142
- # resource path
143
- local_var_path = '/external-auths'
62
+ # Add external authentication
63
+ def create(body, opts = {})
64
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
144
65
 
145
- # query parameters
146
66
  query_params = {}
147
-
148
- # header parameters
149
- header_params = {}
150
- # HTTP header 'Accept' (if needed)
151
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
152
- # HTTP header 'Content-Type'
153
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
154
-
155
- # form parameters
156
67
  form_params = {}
157
-
158
- # http body (model)
159
68
  post_body = @api_client.object_to_http_body(body)
160
- auth_names = ['basicAuth']
69
+
70
+ local_var_path = '/external-auths'
161
71
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
162
- :header_params => header_params,
163
72
  :query_params => query_params,
164
73
  :form_params => form_params,
165
- :body => post_body,
166
- :auth_names => auth_names,
167
- :return_type => 'ExternalAuthenticationsExternalAuths')
74
+ :body => post_body)
168
75
  return data, status_code, headers
169
76
  end
170
77
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class FacebookAdsApi
@@ -19,36 +20,13 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # __summary__
23
- # Get list of Facebook Ads
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
26
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
27
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
28
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
29
- # @option opts [String] :sort_field Returns files sorted by the specified field.
30
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
31
- # @return [InlineResponse2009]
32
- def list(opts = {})
33
- data, _status_code, _headers = list_with_http_info(opts)
34
- data
35
- end
36
23
 
37
- # __summary__
38
- # Get list of Facebook Ads
39
- # @param [Hash] opts the optional parameters
40
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
41
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
42
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
43
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
44
- # @option opts [String] :sort_field Returns files sorted by the specified field.
45
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
46
- # @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
47
- def list_with_http_info(opts = {})
48
- # resource path
49
- local_var_path = '/facebook-ads'
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'])
50
29
 
51
- # query parameters
52
30
  query_params = {}
53
31
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
54
32
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -56,77 +34,32 @@ module MailchimpMarketing
56
34
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
57
35
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
58
36
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
59
-
60
- # header parameters
61
- header_params = {}
62
- # HTTP header 'Accept' (if needed)
63
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
64
- # HTTP header 'Content-Type'
65
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
66
-
67
- # form parameters
68
37
  form_params = {}
69
-
70
- # http body (model)
71
38
  post_body = nil
72
- auth_names = ['basicAuth']
39
+
40
+ local_var_path = '/facebook-ads'
73
41
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
74
- :header_params => header_params,
75
42
  :query_params => query_params,
76
43
  :form_params => form_params,
77
- :body => post_body,
78
- :auth_names => auth_names,
79
- :return_type => 'InlineResponse2009')
44
+ :body => post_body)
80
45
  return data, status_code, headers
81
46
  end
82
- # __summary__
83
- # Get details of a facebook ad
84
- # @param outreach_id The outreach id.
85
- # @param [Hash] opts the optional parameters
86
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
87
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
88
- # @return [InlineResponse20010]
89
- def get_ad(outreach_id = {}, opts = {})
90
- data, _status_code, _headers = get_ad_with_http_info(outreach_id, opts)
91
- data
92
- end
93
47
 
94
- # __summary__
95
- # Get details of a facebook ad
96
- # @param outreach_id The outreach id.
97
- # @param [Hash] opts the optional parameters
98
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
99
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
100
- # @return [Array<(InlineResponse20010, Fixnum, Hash)>] InlineResponse20010 data, response status code and response headers
101
- def get_ad_with_http_info(outreach_id, opts = {})
102
- # resource path
103
- local_var_path = '/facebook-ads/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
48
+ # Get facebook ad info
49
+ def get_ad(outreach_id, opts = {})
50
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
104
51
 
105
- # query parameters
106
52
  query_params = {}
107
53
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
108
54
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
109
-
110
- # header parameters
111
- header_params = {}
112
- # HTTP header 'Accept' (if needed)
113
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
114
- # HTTP header 'Content-Type'
115
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
116
-
117
- # form parameters
118
55
  form_params = {}
119
-
120
- # http body (model)
121
56
  post_body = nil
122
- auth_names = ['basicAuth']
57
+
58
+ local_var_path = '/facebook-ads/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
123
59
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
124
- :header_params => header_params,
125
60
  :query_params => query_params,
126
61
  :form_params => form_params,
127
- :body => post_body,
128
- :auth_names => auth_names,
129
- :return_type => 'InlineResponse20010')
62
+ :body => post_body)
130
63
  return data, status_code, headers
131
64
  end
132
65
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class FileManagerApi
@@ -19,172 +20,60 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Remove a specific file
23
- # Remove a specific file from the File Manager.
24
- # @param file_id The unique id for the File Manager file.
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def delete_file(file_id = {}, opts = {})
28
- delete_file_with_http_info(file_id, opts)
29
- nil
30
- end
31
23
 
32
- # Remove a specific file
33
- # Remove a specific file from the File Manager.
34
- # @param file_id The unique id for the File Manager file.
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
37
- def delete_file_with_http_info(file_id, opts = {})
38
- # resource path
39
- local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
24
+ # Delete file
25
+ def delete_file(file_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'file_id'" if file_id.nil?
40
27
 
41
- # query parameters
42
28
  query_params = {}
43
-
44
- # header parameters
45
- header_params = {}
46
- # HTTP header 'Accept' (if needed)
47
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
48
- # HTTP header 'Content-Type'
49
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
-
51
- # form parameters
52
29
  form_params = {}
53
-
54
- # http body (model)
55
30
  post_body = nil
56
- auth_names = ['basicAuth']
31
+
32
+ local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
57
33
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
- :header_params => header_params,
59
34
  :query_params => query_params,
60
35
  :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
36
+ :body => post_body)
63
37
  return data, status_code, headers
64
38
  end
65
- # Remove a File Manager folder
66
- # Delete a specific folder in the File Manager.
67
- # @param folder_id The unique id for the File Manager folder.
68
- # @param [Hash] opts the optional parameters
69
- # @return [nil]
70
- def delete_folder(folder_id = {}, opts = {})
71
- delete_folder_with_http_info(folder_id, opts)
72
- nil
73
- end
74
39
 
75
- # Remove a File Manager folder
76
- # Delete a specific folder in the File Manager.
77
- # @param folder_id The unique id for the File Manager folder.
78
- # @param [Hash] opts the optional parameters
79
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
80
- def delete_folder_with_http_info(folder_id, opts = {})
81
- # resource path
82
- local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
40
+ # Delete folder
41
+ def delete_folder(folder_id, opts = {})
42
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
83
43
 
84
- # query parameters
85
44
  query_params = {}
86
-
87
- # header parameters
88
- header_params = {}
89
- # HTTP header 'Accept' (if needed)
90
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
91
- # HTTP header 'Content-Type'
92
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
93
-
94
- # form parameters
95
45
  form_params = {}
96
-
97
- # http body (model)
98
46
  post_body = nil
99
- auth_names = ['basicAuth']
47
+
48
+ local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
100
49
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
101
- :header_params => header_params,
102
50
  :query_params => query_params,
103
51
  :form_params => form_params,
104
- :body => post_body,
105
- :auth_names => auth_names)
52
+ :body => post_body)
106
53
  return data, status_code, headers
107
54
  end
108
- # Get information about the file-manager endpoint's resources
109
- # Get information about the file-manager endpoint's resources
110
- # @param [Hash] opts the optional parameters
111
- # @return [FileManager]
112
- def get(opts = {})
113
- data, _status_code, _headers = get_with_http_info(opts)
114
- data
115
- end
116
55
 
117
- # Get information about the file-manager endpoint&#39;s resources
118
- # Get information about the file-manager endpoint&#39;s resources
119
- # @param [Hash] opts the optional parameters
120
- # @return [Array<(FileManager, Fixnum, Hash)>] FileManager data, response status code and response headers
121
- def get_with_http_info(opts = {})
122
- # resource path
123
- local_var_path = '/file-manager'
56
+ # List file manager resources
57
+ def get(opts = {})
124
58
 
125
- # query parameters
126
59
  query_params = {}
127
-
128
- # header parameters
129
- header_params = {}
130
- # HTTP header 'Accept' (if needed)
131
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
132
- # HTTP header 'Content-Type'
133
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
134
-
135
- # form parameters
136
60
  form_params = {}
137
-
138
- # http body (model)
139
61
  post_body = nil
140
- auth_names = ['basicAuth']
62
+
63
+ local_var_path = '/file-manager'
141
64
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
142
- :header_params => header_params,
143
65
  :query_params => query_params,
144
66
  :form_params => form_params,
145
- :body => post_body,
146
- :auth_names => auth_names,
147
- :return_type => 'FileManager')
67
+ :body => post_body)
148
68
  return data, status_code, headers
149
69
  end
150
- # Get information about stored files
151
- # Get a list of available images and files stored in the File Manager for the account.
152
- # @param [Hash] opts the optional parameters
153
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
154
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
155
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
156
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
157
- # @option opts [String] :type The file type for the File Manager file.
158
- # @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
159
- # @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
160
- # @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
161
- # @option opts [String] :sort_field Returns files sorted by the specified field.
162
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
163
- # @return [FileManager1]
164
- def files(opts = {})
165
- data, _status_code, _headers = files_with_http_info(opts)
166
- data
167
- end
168
70
 
169
- # Get information about stored files
170
- # Get a list of available images and files stored in the File Manager for the account.
171
- # @param [Hash] opts the optional parameters
172
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
173
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
174
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
175
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
176
- # @option opts [String] :type The file type for the File Manager file.
177
- # @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
178
- # @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
179
- # @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
180
- # @option opts [String] :sort_field Returns files sorted by the specified field.
181
- # @option opts [String] :sort_dir Determines the order direction for sorted results.
182
- # @return [Array<(FileManager1, Fixnum, Hash)>] FileManager1 data, response status code and response headers
183
- def files_with_http_info(opts = {})
184
- # resource path
185
- local_var_path = '/file-manager/files'
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'])
186
76
 
187
- # query parameters
188
77
  query_params = {}
189
78
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
190
79
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -196,111 +85,39 @@ module MailchimpMarketing
196
85
  query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
197
86
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
198
87
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
199
-
200
- # header parameters
201
- header_params = {}
202
- # HTTP header 'Accept' (if needed)
203
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
204
- # HTTP header 'Content-Type'
205
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
206
-
207
- # form parameters
208
88
  form_params = {}
209
-
210
- # http body (model)
211
89
  post_body = nil
212
- auth_names = ['basicAuth']
90
+
91
+ local_var_path = '/file-manager/files'
213
92
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
214
- :header_params => header_params,
215
93
  :query_params => query_params,
216
94
  :form_params => form_params,
217
- :body => post_body,
218
- :auth_names => auth_names,
219
- :return_type => 'FileManager1')
95
+ :body => post_body)
220
96
  return data, status_code, headers
221
97
  end
222
- # Get a specific file
223
- # Get information about a specific file in the File Manager.
224
- # @param file_id The unique id for the File Manager file.
225
- # @param [Hash] opts the optional parameters
226
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
227
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
228
- # @return [GalleryFile]
229
- def get_file(file_id = {}, opts = {})
230
- data, _status_code, _headers = get_file_with_http_info(file_id, opts)
231
- data
232
- end
233
98
 
234
- # Get a specific file
235
- # Get information about a specific file in the File Manager.
236
- # @param file_id The unique id for the File Manager file.
237
- # @param [Hash] opts the optional parameters
238
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
239
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
240
- # @return [Array<(GalleryFile, Fixnum, Hash)>] GalleryFile data, response status code and response headers
241
- def get_file_with_http_info(file_id, opts = {})
242
- # resource path
243
- local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
99
+ # Get file
100
+ def get_file(file_id, opts = {})
101
+ fail ArgumentError, "Missing required param: 'file_id'" if file_id.nil?
244
102
 
245
- # query parameters
246
103
  query_params = {}
247
104
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
248
105
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
249
-
250
- # header parameters
251
- header_params = {}
252
- # HTTP header 'Accept' (if needed)
253
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
254
- # HTTP header 'Content-Type'
255
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
256
-
257
- # form parameters
258
106
  form_params = {}
259
-
260
- # http body (model)
261
107
  post_body = nil
262
- auth_names = ['basicAuth']
108
+
109
+ local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
263
110
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
264
- :header_params => header_params,
265
111
  :query_params => query_params,
266
112
  :form_params => form_params,
267
- :body => post_body,
268
- :auth_names => auth_names,
269
- :return_type => 'GalleryFile')
113
+ :body => post_body)
270
114
  return data, status_code, headers
271
115
  end
272
- # Get a list of folders in the File Manager
273
- # Get a list of all folders in the File Manager.
274
- # @param [Hash] opts the optional parameters
275
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
276
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
277
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
278
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
279
- # @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
280
- # @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
281
- # @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
282
- # @return [FileManagerFolders]
283
- def list_folders(opts = {})
284
- data, _status_code, _headers = list_folders_with_http_info(opts)
285
- data
286
- end
287
116
 
288
- # Get a list of folders in the File Manager
289
- # Get a list of all folders in the File Manager.
290
- # @param [Hash] opts the optional parameters
291
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
292
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
293
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
294
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
295
- # @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
296
- # @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
297
- # @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
298
- # @return [Array<(FileManagerFolders, Fixnum, Hash)>] FileManagerFolders data, response status code and response headers
299
- def list_folders_with_http_info(opts = {})
300
- # resource path
301
- local_var_path = '/file-manager/folders'
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
302
120
 
303
- # query parameters
304
121
  query_params = {}
305
122
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
306
123
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -309,257 +126,98 @@ module MailchimpMarketing
309
126
  query_params[:'created_by'] = opts[:'created_by'] if !opts[:'created_by'].nil?
310
127
  query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
311
128
  query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
312
-
313
- # header parameters
314
- header_params = {}
315
- # HTTP header 'Accept' (if needed)
316
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
317
- # HTTP header 'Content-Type'
318
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
319
-
320
- # form parameters
321
129
  form_params = {}
322
-
323
- # http body (model)
324
130
  post_body = nil
325
- auth_names = ['basicAuth']
131
+
132
+ local_var_path = '/file-manager/folders'
326
133
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
327
- :header_params => header_params,
328
134
  :query_params => query_params,
329
135
  :form_params => form_params,
330
- :body => post_body,
331
- :auth_names => auth_names,
332
- :return_type => 'FileManagerFolders')
136
+ :body => post_body)
333
137
  return data, status_code, headers
334
138
  end
335
- # Get information about a specific folder
336
- # Get information about a specific folder in the File Manager.
337
- # @param folder_id The unique id for the File Manager folder.
338
- # @param [Hash] opts the optional parameters
339
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
340
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
341
- # @return [GalleryFolder]
342
- def get_folder(folder_id = {}, opts = {})
343
- data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
344
- data
345
- end
346
139
 
347
- # Get information about a specific folder
348
- # Get information about a specific folder in the File Manager.
349
- # @param folder_id The unique id for the File Manager folder.
350
- # @param [Hash] opts the optional parameters
351
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
352
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
353
- # @return [Array<(GalleryFolder, Fixnum, Hash)>] GalleryFolder data, response status code and response headers
354
- def get_folder_with_http_info(folder_id, opts = {})
355
- # resource path
356
- local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
140
+ # Get folder
141
+ def get_folder(folder_id, opts = {})
142
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
357
143
 
358
- # query parameters
359
144
  query_params = {}
360
145
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
361
146
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
362
-
363
- # header parameters
364
- header_params = {}
365
- # HTTP header 'Accept' (if needed)
366
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
367
- # HTTP header 'Content-Type'
368
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
369
-
370
- # form parameters
371
147
  form_params = {}
372
-
373
- # http body (model)
374
148
  post_body = nil
375
- auth_names = ['basicAuth']
149
+
150
+ local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
376
151
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
377
- :header_params => header_params,
378
152
  :query_params => query_params,
379
153
  :form_params => form_params,
380
- :body => post_body,
381
- :auth_names => auth_names,
382
- :return_type => 'GalleryFolder')
154
+ :body => post_body)
383
155
  return data, status_code, headers
384
156
  end
385
- # Update a specific file
386
- # Update a file in the File Manager.
387
- # @param file_id The unique id for the File Manager file.
388
- # @param body
389
- # @param [Hash] opts the optional parameters
390
- # @return [GalleryFile]
391
- def update_file(file_id = {}, body = {}, opts = {})
392
- data, _status_code, _headers = update_file_with_http_info(file_id, body, opts)
393
- data
394
- end
395
157
 
396
- # Update a specific file
397
- # Update a file in the File Manager.
398
- # @param file_id The unique id for the File Manager file.
399
- # @param body
400
- # @param [Hash] opts the optional parameters
401
- # @return [Array<(GalleryFile, Fixnum, Hash)>] GalleryFile data, response status code and response headers
402
- def update_file_with_http_info(file_id, body, opts = {})
403
- # resource path
404
- local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
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?
405
162
 
406
- # query parameters
407
163
  query_params = {}
408
-
409
- # header parameters
410
- header_params = {}
411
- # HTTP header 'Accept' (if needed)
412
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
413
- # HTTP header 'Content-Type'
414
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
415
-
416
- # form parameters
417
164
  form_params = {}
418
-
419
- # http body (model)
420
165
  post_body = @api_client.object_to_http_body(body)
421
- auth_names = ['basicAuth']
166
+
167
+ local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
422
168
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
423
- :header_params => header_params,
424
169
  :query_params => query_params,
425
170
  :form_params => form_params,
426
- :body => post_body,
427
- :auth_names => auth_names,
428
- :return_type => 'GalleryFile')
171
+ :body => post_body)
429
172
  return data, status_code, headers
430
173
  end
431
- # Update a File Manager folder
432
- # Update a specific File Manager folder.
433
- # @param folder_id The unique id for the File Manager folder.
434
- # @param body
435
- # @param [Hash] opts the optional parameters
436
- # @return [GalleryFolder]
437
- def update_folder(folder_id = {}, body = {}, opts = {})
438
- data, _status_code, _headers = update_folder_with_http_info(folder_id, body, opts)
439
- data
440
- end
441
174
 
442
- # Update a File Manager folder
443
- # Update a specific File Manager folder.
444
- # @param folder_id The unique id for the File Manager folder.
445
- # @param body
446
- # @param [Hash] opts the optional parameters
447
- # @return [Array<(GalleryFolder, Fixnum, Hash)>] GalleryFolder data, response status code and response headers
448
- def update_folder_with_http_info(folder_id, body, opts = {})
449
- # resource path
450
- local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
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?
451
179
 
452
- # query parameters
453
180
  query_params = {}
454
-
455
- # header parameters
456
- header_params = {}
457
- # HTTP header 'Accept' (if needed)
458
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
459
- # HTTP header 'Content-Type'
460
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
461
-
462
- # form parameters
463
181
  form_params = {}
464
-
465
- # http body (model)
466
182
  post_body = @api_client.object_to_http_body(body)
467
- auth_names = ['basicAuth']
183
+
184
+ local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
468
185
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
469
- :header_params => header_params,
470
186
  :query_params => query_params,
471
187
  :form_params => form_params,
472
- :body => post_body,
473
- :auth_names => auth_names,
474
- :return_type => 'GalleryFolder')
188
+ :body => post_body)
475
189
  return data, status_code, headers
476
190
  end
477
- # Upload a new file
478
- # Upload a new image or file to the File Manager.
479
- # @param body
480
- # @param [Hash] opts the optional parameters
481
- # @return [GalleryFile]
482
- def upload(body = {}, opts = {})
483
- data, _status_code, _headers = upload_with_http_info(body, opts)
484
- data
485
- end
486
191
 
487
- # Upload a new file
488
- # Upload a new image or file to the File Manager.
489
- # @param body
490
- # @param [Hash] opts the optional parameters
491
- # @return [Array<(GalleryFile, Fixnum, Hash)>] GalleryFile data, response status code and response headers
492
- def upload_with_http_info(body, opts = {})
493
- # resource path
494
- local_var_path = '/file-manager/files'
192
+ # Add file
193
+ def upload(body, opts = {})
194
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
495
195
 
496
- # query parameters
497
196
  query_params = {}
498
-
499
- # header parameters
500
- header_params = {}
501
- # HTTP header 'Accept' (if needed)
502
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
503
- # HTTP header 'Content-Type'
504
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
505
-
506
- # form parameters
507
197
  form_params = {}
508
-
509
- # http body (model)
510
198
  post_body = @api_client.object_to_http_body(body)
511
- auth_names = ['basicAuth']
199
+
200
+ local_var_path = '/file-manager/files'
512
201
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
513
- :header_params => header_params,
514
202
  :query_params => query_params,
515
203
  :form_params => form_params,
516
- :body => post_body,
517
- :auth_names => auth_names,
518
- :return_type => 'GalleryFile')
204
+ :body => post_body)
519
205
  return data, status_code, headers
520
206
  end
521
- # Create a new folder
522
- # Create a new folder in the File Manager.
523
- # @param body
524
- # @param [Hash] opts the optional parameters
525
- # @return [GalleryFolder]
526
- def create_folder(body = {}, opts = {})
527
- data, _status_code, _headers = create_folder_with_http_info(body, opts)
528
- data
529
- end
530
207
 
531
- # Create a new folder
532
- # Create a new folder in the File Manager.
533
- # @param body
534
- # @param [Hash] opts the optional parameters
535
- # @return [Array<(GalleryFolder, Fixnum, Hash)>] GalleryFolder data, response status code and response headers
536
- def create_folder_with_http_info(body, opts = {})
537
- # resource path
538
- local_var_path = '/file-manager/folders'
208
+ # Add folder
209
+ def create_folder(body, opts = {})
210
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
539
211
 
540
- # query parameters
541
212
  query_params = {}
542
-
543
- # header parameters
544
- header_params = {}
545
- # HTTP header 'Accept' (if needed)
546
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
547
- # HTTP header 'Content-Type'
548
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
549
-
550
- # form parameters
551
213
  form_params = {}
552
-
553
- # http body (model)
554
214
  post_body = @api_client.object_to_http_body(body)
555
- auth_names = ['basicAuth']
215
+
216
+ local_var_path = '/file-manager/folders'
556
217
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
557
- :header_params => header_params,
558
218
  :query_params => query_params,
559
219
  :form_params => form_params,
560
- :body => post_body,
561
- :auth_names => auth_names,
562
- :return_type => 'GalleryFolder')
220
+ :body => post_body)
563
221
  return data, status_code, headers
564
222
  end
565
223
  end