storecove 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/lib/storecove/api/invoice_submissions_api.rb +148 -0
  3. data/lib/storecove/api/shop_account_requests_api.rb +323 -0
  4. data/lib/storecove/api/shop_accounts_api.rb +376 -0
  5. data/lib/storecove/api/shops_api.rb +87 -0
  6. data/lib/storecove/api_client.rb +379 -0
  7. data/lib/storecove/api_error.rb +47 -0
  8. data/lib/storecove/configuration.rb +214 -0
  9. data/lib/storecove/models/accounting_cost_code.rb +298 -0
  10. data/lib/storecove/models/accounting_customer_party.rb +210 -0
  11. data/lib/storecove/models/country.rb +280 -0
  12. data/lib/storecove/models/currency_code.rb +209 -0
  13. data/lib/storecove/models/error_model.rb +208 -0
  14. data/lib/storecove/models/invoice_line.rb +327 -0
  15. data/lib/storecove/models/invoice_line_tax.rb +222 -0
  16. data/lib/storecove/models/invoice_recipient.rb +227 -0
  17. data/lib/storecove/models/invoice_recipient_preflight.rb +211 -0
  18. data/lib/storecove/models/invoice_submission.rb +321 -0
  19. data/lib/storecove/models/invoice_submission_invoice.rb +506 -0
  20. data/lib/storecove/models/invoice_submission_result.rb +200 -0
  21. data/lib/storecove/models/legal_entity.rb +264 -0
  22. data/lib/storecove/models/legal_entity_identifier.rb +217 -0
  23. data/lib/storecove/models/logos.rb +217 -0
  24. data/lib/storecove/models/party.rb +242 -0
  25. data/lib/storecove/models/party_address.rb +331 -0
  26. data/lib/storecove/models/party_contact.rb +218 -0
  27. data/lib/storecove/models/preflight_invoice_recipient_result.rb +233 -0
  28. data/lib/storecove/models/public_identifiers.rb +190 -0
  29. data/lib/storecove/models/public_identifiers_inner.rb +258 -0
  30. data/lib/storecove/models/shop.rb +237 -0
  31. data/lib/storecove/models/shop_account.rb +270 -0
  32. data/lib/storecove/models/shop_account_input.rb +244 -0
  33. data/lib/storecove/models/shop_account_request.rb +236 -0
  34. data/lib/storecove/models/shop_account_request_input.rb +235 -0
  35. data/lib/storecove/models/shop_account_request_update.rb +226 -0
  36. data/lib/storecove/models/shop_account_update.rb +220 -0
  37. data/lib/storecove/models/swagger-codegen +2799 -0
  38. data/lib/storecove/version.rb +26 -0
  39. data/lib/storecove.rb +82 -0
  40. data/storecove.gemspec +55 -0
  41. metadata +263 -0
@@ -0,0 +1,376 @@
1
+ =begin
2
+ #Storecove API
3
+
4
+ #Storecove API
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: apisupport@storecove.nl
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module StorecoveApi
27
+ class ShopAccountsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Get ShopAccounts for an entity
35
+ # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/get_index.adoc[]
36
+ # @param external_user_id Filter by the external_user_id
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<ShopAccount>]
39
+ def all(external_user_id, opts = {})
40
+ data, _status_code, _headers = all_with_http_info(external_user_id, opts)
41
+ return data
42
+ end
43
+
44
+ # Get ShopAccounts for an entity
45
+ # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/get_index.adoc[]
46
+ # @param external_user_id Filter by the external_user_id
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(Array<ShopAccount>, Fixnum, Hash)>] Array<ShopAccount> data, response status code and response headers
49
+ def all_with_http_info(external_user_id, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.all ..."
52
+ end
53
+ # verify the required parameter 'external_user_id' is set
54
+ fail ArgumentError, "Missing the required parameter 'external_user_id' when calling ShopAccountsApi.all" if external_user_id.nil?
55
+ # resource path
56
+ local_var_path = "/shop_accounts".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+ query_params[:'external_user_id'] = external_user_id
61
+
62
+ # header parameters
63
+ header_params = {}
64
+
65
+ # HTTP header 'Accept' (if needed)
66
+ local_header_accept = ['application/json']
67
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
68
+
69
+ # HTTP header 'Content-Type'
70
+ local_header_content_type = ['application/json']
71
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
72
+
73
+ # form parameters
74
+ form_params = {}
75
+
76
+ # http body (model)
77
+ post_body = nil
78
+ auth_names = ['Bearer']
79
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => 'Array<ShopAccount>')
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: ShopAccountsApi#all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Get ShopAccounts with authorization failures
93
+ # Get ShopAccounts with authorization failures
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Array<ShopAccount>]
96
+ def auth_failures(opts = {})
97
+ data, _status_code, _headers = auth_failures_with_http_info(opts)
98
+ return data
99
+ end
100
+
101
+ # Get ShopAccounts with authorization failures
102
+ # Get ShopAccounts with authorization failures
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(Array<ShopAccount>, Fixnum, Hash)>] Array<ShopAccount> data, response status code and response headers
105
+ def auth_failures_with_http_info(opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.auth_failures ..."
108
+ end
109
+ # resource path
110
+ local_var_path = "/shop_accounts/auth_failures".sub('{format}','json')
111
+
112
+ # query parameters
113
+ query_params = {}
114
+
115
+ # header parameters
116
+ header_params = {}
117
+
118
+ # HTTP header 'Accept' (if needed)
119
+ local_header_accept = ['application/json']
120
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
121
+
122
+ # HTTP header 'Content-Type'
123
+ local_header_content_type = ['application/json']
124
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
125
+
126
+ # form parameters
127
+ form_params = {}
128
+
129
+ # http body (model)
130
+ post_body = nil
131
+ auth_names = ['Bearer']
132
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => 'Array<ShopAccount>')
139
+ if @api_client.config.debugging
140
+ @api_client.config.logger.debug "API called: ShopAccountsApi#auth_failures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
+ end
142
+ return data, status_code, headers
143
+ end
144
+
145
+ # Create ShopAccount
146
+ # Create a new ShopAccount. include::examples/shop_accounts/post.adoc[]
147
+ # @param shop_account ShopAccount to add
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [ShopAccount]
150
+ def create(shop_account, opts = {})
151
+ data, _status_code, _headers = create_with_http_info(shop_account, opts)
152
+ return data
153
+ end
154
+
155
+ # Create ShopAccount
156
+ # Create a new ShopAccount. include::examples/shop_accounts/post.adoc[]
157
+ # @param shop_account ShopAccount to add
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
160
+ def create_with_http_info(shop_account, opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.create ..."
163
+ end
164
+ # verify the required parameter 'shop_account' is set
165
+ fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.create" if shop_account.nil?
166
+ # resource path
167
+ local_var_path = "/shop_accounts".sub('{format}','json')
168
+
169
+ # query parameters
170
+ query_params = {}
171
+
172
+ # header parameters
173
+ header_params = {}
174
+
175
+ # HTTP header 'Accept' (if needed)
176
+ local_header_accept = ['application/json']
177
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
178
+
179
+ # HTTP header 'Content-Type'
180
+ local_header_content_type = ['application/json']
181
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
182
+
183
+ # form parameters
184
+ form_params = {}
185
+
186
+ # http body (model)
187
+ post_body = @api_client.object_to_http_body(shop_account)
188
+ auth_names = ['Bearer']
189
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
190
+ :header_params => header_params,
191
+ :query_params => query_params,
192
+ :form_params => form_params,
193
+ :body => post_body,
194
+ :auth_names => auth_names,
195
+ :return_type => 'ShopAccount')
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug "API called: ShopAccountsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
+ end
199
+ return data, status_code, headers
200
+ end
201
+
202
+ # Delete a specific ShopAccount
203
+ # Delete a specific ShopAccount
204
+ # @param id shop_account id
205
+ # @param [Hash] opts the optional parameters
206
+ # @return [nil]
207
+ def destroy(id, opts = {})
208
+ destroy_with_http_info(id, opts)
209
+ return nil
210
+ end
211
+
212
+ # Delete a specific ShopAccount
213
+ # Delete a specific ShopAccount
214
+ # @param id shop_account id
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
217
+ def destroy_with_http_info(id, opts = {})
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.destroy ..."
220
+ end
221
+ # verify the required parameter 'id' is set
222
+ fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.destroy" if id.nil?
223
+ # resource path
224
+ local_var_path = "/shop_accounts/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
225
+
226
+ # query parameters
227
+ query_params = {}
228
+
229
+ # header parameters
230
+ header_params = {}
231
+
232
+ # HTTP header 'Accept' (if needed)
233
+ local_header_accept = ['application/json']
234
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
235
+
236
+ # HTTP header 'Content-Type'
237
+ local_header_content_type = ['application/json']
238
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
239
+
240
+ # form parameters
241
+ form_params = {}
242
+
243
+ # http body (model)
244
+ post_body = nil
245
+ auth_names = ['Bearer']
246
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
247
+ :header_params => header_params,
248
+ :query_params => query_params,
249
+ :form_params => form_params,
250
+ :body => post_body,
251
+ :auth_names => auth_names)
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: ShopAccountsApi#destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ return data, status_code, headers
256
+ end
257
+
258
+ # Show a specific ShopAccount
259
+ # Show a specific ShopAccount
260
+ # @param id shop_account id
261
+ # @param [Hash] opts the optional parameters
262
+ # @return [ShopAccount]
263
+ def get(id, opts = {})
264
+ data, _status_code, _headers = get_with_http_info(id, opts)
265
+ return data
266
+ end
267
+
268
+ # Show a specific ShopAccount
269
+ # Show a specific ShopAccount
270
+ # @param id shop_account id
271
+ # @param [Hash] opts the optional parameters
272
+ # @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
273
+ def get_with_http_info(id, opts = {})
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.get ..."
276
+ end
277
+ # verify the required parameter 'id' is set
278
+ fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.get" if id.nil?
279
+ # resource path
280
+ local_var_path = "/shop_accounts/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
281
+
282
+ # query parameters
283
+ query_params = {}
284
+
285
+ # header parameters
286
+ header_params = {}
287
+
288
+ # HTTP header 'Accept' (if needed)
289
+ local_header_accept = ['application/json']
290
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
291
+
292
+ # HTTP header 'Content-Type'
293
+ local_header_content_type = ['application/json']
294
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
295
+
296
+ # form parameters
297
+ form_params = {}
298
+
299
+ # http body (model)
300
+ post_body = nil
301
+ auth_names = ['Bearer']
302
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
303
+ :header_params => header_params,
304
+ :query_params => query_params,
305
+ :form_params => form_params,
306
+ :body => post_body,
307
+ :auth_names => auth_names,
308
+ :return_type => 'ShopAccount')
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug "API called: ShopAccountsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
+ end
312
+ return data, status_code, headers
313
+ end
314
+
315
+ # Update a specific ShopAccount
316
+ # Update a specific ShopAccount
317
+ # @param id shop_account id
318
+ # @param shop_account ShopAccount updates
319
+ # @param [Hash] opts the optional parameters
320
+ # @return [ShopAccount]
321
+ def update(id, shop_account, opts = {})
322
+ data, _status_code, _headers = update_with_http_info(id, shop_account, opts)
323
+ return data
324
+ end
325
+
326
+ # Update a specific ShopAccount
327
+ # Update a specific ShopAccount
328
+ # @param id shop_account id
329
+ # @param shop_account ShopAccount updates
330
+ # @param [Hash] opts the optional parameters
331
+ # @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
332
+ def update_with_http_info(id, shop_account, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.update ..."
335
+ end
336
+ # verify the required parameter 'id' is set
337
+ fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.update" if id.nil?
338
+ # verify the required parameter 'shop_account' is set
339
+ fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.update" if shop_account.nil?
340
+ # resource path
341
+ local_var_path = "/shop_accounts/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
342
+
343
+ # query parameters
344
+ query_params = {}
345
+
346
+ # header parameters
347
+ header_params = {}
348
+
349
+ # HTTP header 'Accept' (if needed)
350
+ local_header_accept = ['application/json']
351
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
352
+
353
+ # HTTP header 'Content-Type'
354
+ local_header_content_type = ['application/json']
355
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
356
+
357
+ # form parameters
358
+ form_params = {}
359
+
360
+ # http body (model)
361
+ post_body = @api_client.object_to_http_body(shop_account)
362
+ auth_names = ['Bearer']
363
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
364
+ :header_params => header_params,
365
+ :query_params => query_params,
366
+ :form_params => form_params,
367
+ :body => post_body,
368
+ :auth_names => auth_names,
369
+ :return_type => 'ShopAccount')
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug "API called: ShopAccountsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
372
+ end
373
+ return data, status_code, headers
374
+ end
375
+ end
376
+ end
@@ -0,0 +1,87 @@
1
+ =begin
2
+ #Storecove API
3
+
4
+ #Storecove API
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: apisupport@storecove.nl
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module StorecoveApi
27
+ class ShopsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Get Shops
35
+ # Get available shops
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<Shop>]
38
+ def all(opts = {})
39
+ data, _status_code, _headers = all_with_http_info(opts)
40
+ return data
41
+ end
42
+
43
+ # Get Shops
44
+ # Get available shops
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [Array<(Array<Shop>, Fixnum, Hash)>] Array<Shop> data, response status code and response headers
47
+ def all_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug "Calling API: ShopsApi.all ..."
50
+ end
51
+ # resource path
52
+ local_var_path = "/shops".sub('{format}','json')
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+
60
+ # HTTP header 'Accept' (if needed)
61
+ local_header_accept = ['application/json']
62
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
63
+
64
+ # HTTP header 'Content-Type'
65
+ local_header_content_type = ['application/json']
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
67
+
68
+ # form parameters
69
+ form_params = {}
70
+
71
+ # http body (model)
72
+ post_body = nil
73
+ auth_names = ['Bearer']
74
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => 'Array<Shop>')
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: ShopsApi#all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+ end
87
+ end