storecove 1.0.3 → 1.0.4

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/storecove/api/invoice_submissions_api.rb +8 -28
  3. data/lib/storecove/api/shop_account_requests_api.rb +10 -42
  4. data/lib/storecove/api/shop_accounts_api.rb +45 -81
  5. data/lib/storecove/api/shops_api.rb +4 -20
  6. data/lib/storecove/api_client.rb +16 -19
  7. data/lib/storecove/api_error.rb +7 -17
  8. data/lib/storecove/configuration.rb +0 -12
  9. data/lib/storecove/models/accounting_cost_code.rb +3 -19
  10. data/lib/storecove/models/accounting_customer_party.rb +7 -15
  11. data/lib/storecove/models/{party_address.rb → address.rb} +8 -19
  12. data/lib/storecove/models/{party_contact.rb → contact.rb} +8 -16
  13. data/lib/storecove/models/country.rb +0 -12
  14. data/lib/storecove/models/currency_code.rb +0 -12
  15. data/lib/storecove/models/error_model.rb +3 -15
  16. data/lib/storecove/models/{invoice_submission_invoice.rb → invoice.rb} +55 -41
  17. data/lib/storecove/models/invoice_line.rb +12 -22
  18. data/lib/storecove/models/invoice_recipient.rb +18 -21
  19. data/lib/storecove/models/invoice_recipient_preflight.rb +11 -15
  20. data/lib/storecove/models/invoice_submission.rb +15 -16
  21. data/lib/storecove/models/invoice_submission_result.rb +11 -23
  22. data/lib/storecove/models/legal_entity.rb +3 -15
  23. data/lib/storecove/models/legal_entity_identifier.rb +3 -15
  24. data/lib/storecove/models/logos.rb +3 -15
  25. data/lib/storecove/models/party.rb +5 -17
  26. data/lib/storecove/models/preflight_invoice_recipient_result.rb +3 -15
  27. data/lib/storecove/models/{public_identifiers_inner.rb → public_identifier.rb} +4 -16
  28. data/lib/storecove/models/public_identifiers.rb +3 -15
  29. data/lib/storecove/models/shop.rb +3 -15
  30. data/lib/storecove/models/shop_account_input.rb +19 -15
  31. data/lib/storecove/models/shop_account_request.rb +7 -15
  32. data/lib/storecove/models/shop_account_request_input.rb +3 -15
  33. data/lib/storecove/models/shop_account_request_update.rb +3 -15
  34. data/lib/storecove/models/{shop_account.rb → shop_account_result.rb} +4 -16
  35. data/lib/storecove/models/shop_account_update.rb +3 -15
  36. data/lib/storecove/models/{invoice_line_tax.rb → tax.rb} +16 -16
  37. data/lib/storecove/version.rb +1 -13
  38. data/lib/storecove.rb +6 -18
  39. data/spec/api/invoice_submissions_api_spec.rb +70 -0
  40. data/spec/api/shop_account_requests_api_spec.rb +107 -0
  41. data/spec/api/shop_accounts_api_spec.rb +118 -0
  42. data/spec/api/shops_api_spec.rb +57 -0
  43. data/spec/api_client_spec.rb +237 -0
  44. data/spec/configuration_spec.rb +53 -0
  45. data/spec/models/accounting_cost_code_spec.rb +71 -0
  46. data/spec/models/accounting_customer_party_spec.rb +59 -0
  47. data/spec/models/country_spec.rb +47 -0
  48. data/spec/models/currency_code_spec.rb +47 -0
  49. data/spec/models/error_model_spec.rb +59 -0
  50. data/spec/models/invoice_line_spec.rb +95 -0
  51. data/spec/models/invoice_line_tax_spec.rb +65 -0
  52. data/spec/models/invoice_recipient_preflight_spec.rb +59 -0
  53. data/spec/models/invoice_recipient_spec.rb +59 -0
  54. data/spec/models/invoice_submission_invoice_spec.rb +159 -0
  55. data/spec/models/invoice_submission_result_spec.rb +53 -0
  56. data/spec/models/invoice_submission_spec.rb +99 -0
  57. data/spec/models/legal_entity_identifier_spec.rb +65 -0
  58. data/spec/models/legal_entity_spec.rb +95 -0
  59. data/spec/models/logos_spec.rb +65 -0
  60. data/spec/models/party_address_spec.rb +101 -0
  61. data/spec/models/party_contact_spec.rb +65 -0
  62. data/spec/models/party_spec.rb +65 -0
  63. data/spec/models/preflight_invoice_recipient_result_spec.rb +57 -0
  64. data/spec/models/public_identifier_spec.rb +59 -0
  65. data/spec/models/public_identifiers_spec.rb +47 -0
  66. data/spec/models/shop_account_input_spec.rb +77 -0
  67. data/spec/models/shop_account_request_input_spec.rb +77 -0
  68. data/spec/models/shop_account_request_spec.rb +77 -0
  69. data/spec/models/shop_account_request_update_spec.rb +71 -0
  70. data/spec/models/shop_account_result_spec.rb +95 -0
  71. data/spec/models/shop_account_update_spec.rb +65 -0
  72. data/spec/models/shop_spec.rb +77 -0
  73. data/spec/spec_helper.rb +122 -0
  74. metadata +79 -10
  75. data/lib/storecove/models/swagger-codegen +0 -2799
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d9984fa7278af458ac5b6e18e18803556c89325
4
- data.tar.gz: ae6e4fc328d6cf5c0218d0e75cb63ced4afd9476
3
+ metadata.gz: 834edd140649c7cfd52e4b3a7370fe669cb78381
4
+ data.tar.gz: fe79d3e6113675c2e7e98962070201efdd210f88
5
5
  SHA512:
6
- metadata.gz: d74a07b6458d62b3089188aa2cdd78a2204b5871186a4645fbf0a3bdda6d005acb33f60bbf3835be9f50c5ed158b41c104ae5f2b85aa53f8b9bb1971269b2f37
7
- data.tar.gz: 3d1c9be3c39f0d62fe49148fc799d5907b8a50cd8007b7a01d42500d7cd85693af64b6cb18724de5a73a4e98b62745f5ae8d9dc7687e8a1be86631f026f3b4a6
6
+ metadata.gz: 962117535ff1a3eb88b81221cb6b32c8dd251ec66389de25de9a1689c881374d59c2047509ba47589337c951950dc04f3845ac1870ffb445e1bcabac7b93c0f2
7
+ data.tar.gz: ddb0edd99d2831ed7835440e37c93419449693f5d8804da0f592823438d580302127799d3b29247e42c77aba475be23dbe4168f15c4ffeffe40b4aa840942ff8
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
7
7
  Contact: apisupport@storecove.nl
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
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
10
  =end
23
11
 
24
12
  require "uri"
@@ -32,7 +20,7 @@ module StorecoveApi
32
20
  end
33
21
 
34
22
  # Submit a new invoice
35
- # Submit an invoice for delivery. include::examples/invoice_submissions/post.adoc[]
23
+ # Submit an invoice for delivery. include::examples/invoice_submissions/create.adoc[]
36
24
  # @param invoice_submission Invoice to submit
37
25
  # @param [Hash] opts the optional parameters
38
26
  # @return [InvoiceSubmissionResult]
@@ -42,7 +30,7 @@ module StorecoveApi
42
30
  end
43
31
 
44
32
  # Submit a new invoice
45
- # Submit an invoice for delivery. include::examples/invoice_submissions/post.adoc[]
33
+ # Submit an invoice for delivery. include::examples/invoice_submissions/create.adoc[]
46
34
  # @param invoice_submission Invoice to submit
47
35
  # @param [Hash] opts the optional parameters
48
36
  # @return [Array<(InvoiceSubmissionResult, Fixnum, Hash)>] InvoiceSubmissionResult data, response status code and response headers
@@ -60,14 +48,10 @@ module StorecoveApi
60
48
 
61
49
  # header parameters
62
50
  header_params = {}
63
-
64
51
  # HTTP header 'Accept' (if needed)
65
- local_header_accept = ['application/json']
66
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
-
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
68
53
  # HTTP header 'Content-Type'
69
- local_header_content_type = ['application/json']
70
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
54
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
71
55
 
72
56
  # form parameters
73
57
  form_params = {}
@@ -89,7 +73,7 @@ module StorecoveApi
89
73
  end
90
74
 
91
75
  # Preflight an invoice recipient
92
- # Check whether Storecove can deliver an invoice for a list of ids. include::examples/invoice_submissions/post_preflight.adoc[]
76
+ # Check whether Storecove can deliver an invoice for a list of ids. include::examples/invoice_submissions/preflight.adoc[]
93
77
  # @param invoice_recipient_preflight The invoice recipient to preflight
94
78
  # @param [Hash] opts the optional parameters
95
79
  # @return [PreflightInvoiceRecipientResult]
@@ -99,7 +83,7 @@ module StorecoveApi
99
83
  end
100
84
 
101
85
  # Preflight an invoice recipient
102
- # Check whether Storecove can deliver an invoice for a list of ids. include::examples/invoice_submissions/post_preflight.adoc[]
86
+ # Check whether Storecove can deliver an invoice for a list of ids. include::examples/invoice_submissions/preflight.adoc[]
103
87
  # @param invoice_recipient_preflight The invoice recipient to preflight
104
88
  # @param [Hash] opts the optional parameters
105
89
  # @return [Array<(PreflightInvoiceRecipientResult, Fixnum, Hash)>] PreflightInvoiceRecipientResult data, response status code and response headers
@@ -117,14 +101,10 @@ module StorecoveApi
117
101
 
118
102
  # header parameters
119
103
  header_params = {}
120
-
121
104
  # HTTP header 'Accept' (if needed)
122
- local_header_accept = ['application/json']
123
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
124
-
105
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
106
  # HTTP header 'Content-Type'
126
- local_header_content_type = ['application/json']
127
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
107
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
128
108
 
129
109
  # form parameters
130
110
  form_params = {}
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
7
7
  Contact: apisupport@storecove.nl
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
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
10
  =end
23
11
 
24
12
  require "uri"
@@ -61,14 +49,10 @@ module StorecoveApi
61
49
 
62
50
  # header parameters
63
51
  header_params = {}
64
-
65
52
  # 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
-
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
69
54
  # 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)
55
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
72
56
 
73
57
  # form parameters
74
58
  form_params = {}
@@ -118,14 +102,10 @@ module StorecoveApi
118
102
 
119
103
  # header parameters
120
104
  header_params = {}
121
-
122
105
  # HTTP header 'Accept' (if needed)
123
- local_header_accept = ['application/json']
124
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
125
-
106
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
107
  # HTTP header 'Content-Type'
127
- local_header_content_type = ['application/json']
128
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
108
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
109
 
130
110
  # form parameters
131
111
  form_params = {}
@@ -175,14 +155,10 @@ module StorecoveApi
175
155
 
176
156
  # header parameters
177
157
  header_params = {}
178
-
179
158
  # HTTP header 'Accept' (if needed)
180
- local_header_accept = ['application/json']
181
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
182
-
159
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
183
160
  # HTTP header 'Content-Type'
184
- local_header_content_type = ['application/json']
185
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
161
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
186
162
 
187
163
  # form parameters
188
164
  form_params = {}
@@ -231,14 +207,10 @@ module StorecoveApi
231
207
 
232
208
  # header parameters
233
209
  header_params = {}
234
-
235
210
  # HTTP header 'Accept' (if needed)
236
- local_header_accept = ['application/json']
237
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
238
-
211
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
239
212
  # HTTP header 'Content-Type'
240
- local_header_content_type = ['application/json']
241
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
213
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
242
214
 
243
215
  # form parameters
244
216
  form_params = {}
@@ -292,14 +264,10 @@ module StorecoveApi
292
264
 
293
265
  # header parameters
294
266
  header_params = {}
295
-
296
267
  # HTTP header 'Accept' (if needed)
297
- local_header_accept = ['application/json']
298
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
299
-
268
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
300
269
  # HTTP header 'Content-Type'
301
- local_header_content_type = ['application/json']
302
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
270
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
303
271
 
304
272
  # form parameters
305
273
  form_params = {}
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
7
7
  Contact: apisupport@storecove.nl
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
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
10
  =end
23
11
 
24
12
  require "uri"
@@ -32,20 +20,20 @@ module StorecoveApi
32
20
  end
33
21
 
34
22
  # Get ShopAccounts for an entity
35
- # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/get_index.adoc[]
23
+ # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/all.adoc[]
36
24
  # @param external_user_id Filter by the external_user_id
37
25
  # @param [Hash] opts the optional parameters
38
- # @return [Array<ShopAccount>]
26
+ # @return [Array<ShopAccountResult>]
39
27
  def all(external_user_id, opts = {})
40
28
  data, _status_code, _headers = all_with_http_info(external_user_id, opts)
41
29
  return data
42
30
  end
43
31
 
44
32
  # Get ShopAccounts for an entity
45
- # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/get_index.adoc[]
33
+ # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/all.adoc[]
46
34
  # @param external_user_id Filter by the external_user_id
47
35
  # @param [Hash] opts the optional parameters
48
- # @return [Array<(Array<ShopAccount>, Fixnum, Hash)>] Array<ShopAccount> data, response status code and response headers
36
+ # @return [Array<(Array<ShopAccountResult>, Fixnum, Hash)>] Array<ShopAccountResult> data, response status code and response headers
49
37
  def all_with_http_info(external_user_id, opts = {})
50
38
  if @api_client.config.debugging
51
39
  @api_client.config.logger.debug "Calling API: ShopAccountsApi.all ..."
@@ -61,14 +49,10 @@ module StorecoveApi
61
49
 
62
50
  # header parameters
63
51
  header_params = {}
64
-
65
52
  # 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
-
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
69
54
  # 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)
55
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
72
56
 
73
57
  # form parameters
74
58
  form_params = {}
@@ -82,7 +66,7 @@ module StorecoveApi
82
66
  :form_params => form_params,
83
67
  :body => post_body,
84
68
  :auth_names => auth_names,
85
- :return_type => 'Array<ShopAccount>')
69
+ :return_type => 'Array<ShopAccountResult>')
86
70
  if @api_client.config.debugging
87
71
  @api_client.config.logger.debug "API called: ShopAccountsApi#all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
72
  end
@@ -90,18 +74,18 @@ module StorecoveApi
90
74
  end
91
75
 
92
76
  # Get ShopAccounts with authorization failures
93
- # Get ShopAccounts with authorization failures
77
+ # Get ShopAccounts with authorization failures. include::examples/shop_accounts/auth_failures.adoc[]
94
78
  # @param [Hash] opts the optional parameters
95
- # @return [Array<ShopAccount>]
79
+ # @return [Array<ShopAccountResult>]
96
80
  def auth_failures(opts = {})
97
81
  data, _status_code, _headers = auth_failures_with_http_info(opts)
98
82
  return data
99
83
  end
100
84
 
101
85
  # Get ShopAccounts with authorization failures
102
- # Get ShopAccounts with authorization failures
86
+ # Get ShopAccounts with authorization failures. include::examples/shop_accounts/auth_failures.adoc[]
103
87
  # @param [Hash] opts the optional parameters
104
- # @return [Array<(Array<ShopAccount>, Fixnum, Hash)>] Array<ShopAccount> data, response status code and response headers
88
+ # @return [Array<(Array<ShopAccountResult>, Fixnum, Hash)>] Array<ShopAccountResult> data, response status code and response headers
105
89
  def auth_failures_with_http_info(opts = {})
106
90
  if @api_client.config.debugging
107
91
  @api_client.config.logger.debug "Calling API: ShopAccountsApi.auth_failures ..."
@@ -114,14 +98,10 @@ module StorecoveApi
114
98
 
115
99
  # header parameters
116
100
  header_params = {}
117
-
118
101
  # 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
-
102
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
122
103
  # 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)
104
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
125
105
 
126
106
  # form parameters
127
107
  form_params = {}
@@ -135,7 +115,7 @@ module StorecoveApi
135
115
  :form_params => form_params,
136
116
  :body => post_body,
137
117
  :auth_names => auth_names,
138
- :return_type => 'Array<ShopAccount>')
118
+ :return_type => 'Array<ShopAccountResult>')
139
119
  if @api_client.config.debugging
140
120
  @api_client.config.logger.debug "API called: ShopAccountsApi#auth_failures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
121
  end
@@ -143,20 +123,20 @@ module StorecoveApi
143
123
  end
144
124
 
145
125
  # Create ShopAccount
146
- # Create a new ShopAccount. include::examples/shop_accounts/post.adoc[]
126
+ # Create a new ShopAccount. include::examples/shop_accounts/create.adoc[]
147
127
  # @param shop_account ShopAccount to add
148
128
  # @param [Hash] opts the optional parameters
149
- # @return [ShopAccount]
129
+ # @return [ShopAccountResult]
150
130
  def create(shop_account, opts = {})
151
131
  data, _status_code, _headers = create_with_http_info(shop_account, opts)
152
132
  return data
153
133
  end
154
134
 
155
135
  # Create ShopAccount
156
- # Create a new ShopAccount. include::examples/shop_accounts/post.adoc[]
136
+ # Create a new ShopAccount. include::examples/shop_accounts/create.adoc[]
157
137
  # @param shop_account ShopAccount to add
158
138
  # @param [Hash] opts the optional parameters
159
- # @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
139
+ # @return [Array<(ShopAccountResult, Fixnum, Hash)>] ShopAccountResult data, response status code and response headers
160
140
  def create_with_http_info(shop_account, opts = {})
161
141
  if @api_client.config.debugging
162
142
  @api_client.config.logger.debug "Calling API: ShopAccountsApi.create ..."
@@ -171,14 +151,10 @@ module StorecoveApi
171
151
 
172
152
  # header parameters
173
153
  header_params = {}
174
-
175
154
  # 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
-
155
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
156
  # 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)
157
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
182
158
 
183
159
  # form parameters
184
160
  form_params = {}
@@ -192,15 +168,15 @@ module StorecoveApi
192
168
  :form_params => form_params,
193
169
  :body => post_body,
194
170
  :auth_names => auth_names,
195
- :return_type => 'ShopAccount')
171
+ :return_type => 'ShopAccountResult')
196
172
  if @api_client.config.debugging
197
173
  @api_client.config.logger.debug "API called: ShopAccountsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
174
  end
199
175
  return data, status_code, headers
200
176
  end
201
177
 
202
- # Delete a specific ShopAccount
203
- # Delete a specific ShopAccount
178
+ # Delete ShopAccount
179
+ #
204
180
  # @param id shop_account id
205
181
  # @param [Hash] opts the optional parameters
206
182
  # @return [nil]
@@ -209,8 +185,8 @@ module StorecoveApi
209
185
  return nil
210
186
  end
211
187
 
212
- # Delete a specific ShopAccount
213
- # Delete a specific ShopAccount
188
+ # Delete ShopAccount
189
+ #
214
190
  # @param id shop_account id
215
191
  # @param [Hash] opts the optional parameters
216
192
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
@@ -228,14 +204,10 @@ module StorecoveApi
228
204
 
229
205
  # header parameters
230
206
  header_params = {}
231
-
232
207
  # 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
-
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
236
209
  # 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)
210
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
239
211
 
240
212
  # form parameters
241
213
  form_params = {}
@@ -255,21 +227,21 @@ module StorecoveApi
255
227
  return data, status_code, headers
256
228
  end
257
229
 
258
- # Show a specific ShopAccount
259
- # Show a specific ShopAccount
230
+ # Get ShopAccount
231
+ # Get a specific ShopAccount. include::examples/shop_accounts/get.adoc[]
260
232
  # @param id shop_account id
261
233
  # @param [Hash] opts the optional parameters
262
- # @return [ShopAccount]
234
+ # @return [ShopAccountResult]
263
235
  def get(id, opts = {})
264
236
  data, _status_code, _headers = get_with_http_info(id, opts)
265
237
  return data
266
238
  end
267
239
 
268
- # Show a specific ShopAccount
269
- # Show a specific ShopAccount
240
+ # Get ShopAccount
241
+ # Get a specific ShopAccount. include::examples/shop_accounts/get.adoc[]
270
242
  # @param id shop_account id
271
243
  # @param [Hash] opts the optional parameters
272
- # @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
244
+ # @return [Array<(ShopAccountResult, Fixnum, Hash)>] ShopAccountResult data, response status code and response headers
273
245
  def get_with_http_info(id, opts = {})
274
246
  if @api_client.config.debugging
275
247
  @api_client.config.logger.debug "Calling API: ShopAccountsApi.get ..."
@@ -284,14 +256,10 @@ module StorecoveApi
284
256
 
285
257
  # header parameters
286
258
  header_params = {}
287
-
288
259
  # 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
-
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
292
261
  # 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)
262
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
295
263
 
296
264
  # form parameters
297
265
  form_params = {}
@@ -305,30 +273,30 @@ module StorecoveApi
305
273
  :form_params => form_params,
306
274
  :body => post_body,
307
275
  :auth_names => auth_names,
308
- :return_type => 'ShopAccount')
276
+ :return_type => 'ShopAccountResult')
309
277
  if @api_client.config.debugging
310
278
  @api_client.config.logger.debug "API called: ShopAccountsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
279
  end
312
280
  return data, status_code, headers
313
281
  end
314
282
 
315
- # Update a specific ShopAccount
316
- # Update a specific ShopAccount
283
+ # Update ShopAccount
284
+ # Update a specific ShopAccount. include::examples/shop_accounts/update.adoc[]
317
285
  # @param id shop_account id
318
286
  # @param shop_account ShopAccount updates
319
287
  # @param [Hash] opts the optional parameters
320
- # @return [ShopAccount]
288
+ # @return [ShopAccountResult]
321
289
  def update(id, shop_account, opts = {})
322
290
  data, _status_code, _headers = update_with_http_info(id, shop_account, opts)
323
291
  return data
324
292
  end
325
293
 
326
- # Update a specific ShopAccount
327
- # Update a specific ShopAccount
294
+ # Update ShopAccount
295
+ # Update a specific ShopAccount. include::examples/shop_accounts/update.adoc[]
328
296
  # @param id shop_account id
329
297
  # @param shop_account ShopAccount updates
330
298
  # @param [Hash] opts the optional parameters
331
- # @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
299
+ # @return [Array<(ShopAccountResult, Fixnum, Hash)>] ShopAccountResult data, response status code and response headers
332
300
  def update_with_http_info(id, shop_account, opts = {})
333
301
  if @api_client.config.debugging
334
302
  @api_client.config.logger.debug "Calling API: ShopAccountsApi.update ..."
@@ -345,14 +313,10 @@ module StorecoveApi
345
313
 
346
314
  # header parameters
347
315
  header_params = {}
348
-
349
316
  # 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
-
317
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
353
318
  # 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)
319
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
356
320
 
357
321
  # form parameters
358
322
  form_params = {}
@@ -366,7 +330,7 @@ module StorecoveApi
366
330
  :form_params => form_params,
367
331
  :body => post_body,
368
332
  :auth_names => auth_names,
369
- :return_type => 'ShopAccount')
333
+ :return_type => 'ShopAccountResult')
370
334
  if @api_client.config.debugging
371
335
  @api_client.config.logger.debug "API called: ShopAccountsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
372
336
  end
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
7
7
  Contact: apisupport@storecove.nl
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
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
10
  =end
23
11
 
24
12
  require "uri"
@@ -32,7 +20,7 @@ module StorecoveApi
32
20
  end
33
21
 
34
22
  # Get Shops
35
- # Get available shops
23
+ # Get all available shops. include::examples/shops/all.adoc[]
36
24
  # @param [Hash] opts the optional parameters
37
25
  # @return [Array<Shop>]
38
26
  def all(opts = {})
@@ -41,7 +29,7 @@ module StorecoveApi
41
29
  end
42
30
 
43
31
  # Get Shops
44
- # Get available shops
32
+ # Get all available shops. include::examples/shops/all.adoc[]
45
33
  # @param [Hash] opts the optional parameters
46
34
  # @return [Array<(Array<Shop>, Fixnum, Hash)>] Array<Shop> data, response status code and response headers
47
35
  def all_with_http_info(opts = {})
@@ -56,14 +44,10 @@ module StorecoveApi
56
44
 
57
45
  # header parameters
58
46
  header_params = {}
59
-
60
47
  # 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
-
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
64
49
  # 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)
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
67
51
 
68
52
  # form parameters
69
53
  form_params = {}
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
7
7
  Contact: apisupport@storecove.nl
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
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
10
  =end
23
11
 
24
12
  require 'date'
@@ -66,10 +54,18 @@ module StorecoveApi
66
54
  end
67
55
 
68
56
  unless response.success?
69
- fail ApiError.new(:code => response.code,
70
- :response_headers => response.headers,
71
- :response_body => response.body),
72
- response.status_message
57
+ if response.timed_out?
58
+ fail ApiError.new('Connection timed out')
59
+ elsif response.code == 0
60
+ # Errors from libcurl will be made visible here
61
+ fail ApiError.new(:code => 0,
62
+ :message => response.return_message)
63
+ else
64
+ fail ApiError.new(:code => response.code,
65
+ :response_headers => response.headers,
66
+ :response_body => response.body),
67
+ response.status_message
68
+ end
73
69
  end
74
70
 
75
71
  if opts[:return_type]
@@ -134,10 +130,11 @@ module StorecoveApi
134
130
  # application/json
135
131
  # application/json; charset=UTF8
136
132
  # APPLICATION/JSON
133
+ # */*
137
134
  # @param [String] mime MIME
138
- # @return [Boolean] True if the MIME is applicaton/json
135
+ # @return [Boolean] True if the MIME is application/json
139
136
  def json_mime?(mime)
140
- !(mime =~ /\Aapplication\/json(;.*)?\z/i).nil?
137
+ (mime == "*/*") || !(mime =~ /\Aapplication\/json(;.*)?\z/i).nil?
141
138
  end
142
139
 
143
140
  # Deserialize the response to the given return type.
@@ -288,7 +285,7 @@ module StorecoveApi
288
285
  # Update hearder and query params based on authentication settings.
289
286
  #
290
287
  # @param [Hash] header_params Header parameters
291
- # @param [Hash] form_params Query parameters
288
+ # @param [Hash] query_params Query parameters
292
289
  # @param [String] auth_names Authentication scheme name
293
290
  def update_params_for_auth!(header_params, query_params, auth_names)
294
291
  Array(auth_names).each do |auth_name|