storecove 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/storecove/api/invoice_submissions_api.rb +16 -16
- data/lib/storecove/api/shop_account_requests_api.rb +74 -74
- data/lib/storecove/api/shop_accounts_api.rb +100 -100
- data/lib/storecove/api/shops_api.rb +9 -9
- data/lib/storecove/models/invoice.rb +26 -43
- data/lib/storecove/models/invoice_line.rb +6 -6
- data/lib/storecove/models/invoice_recipient.rb +5 -16
- data/lib/storecove/models/invoice_recipient_preflight.rb +0 -10
- data/lib/storecove/models/invoice_submission_result.rb +8 -8
- data/lib/storecove/models/legal_entity.rb +1 -10
- data/lib/storecove/models/public_identifier.rb +1 -1
- data/lib/storecove/models/{shop_account_result.rb → shop_account.rb} +6 -9
- data/lib/storecove/models/shop_account_input.rb +0 -25
- data/lib/storecove/models/shop_account_update.rb +0 -3
- data/lib/storecove/version.rb +1 -1
- data/lib/storecove.rb +1 -1
- metadata +3 -3
@@ -19,33 +19,32 @@ module StorecoveApi
|
|
19
19
|
@api_client = api_client
|
20
20
|
end
|
21
21
|
|
22
|
-
#
|
23
|
-
#
|
24
|
-
# @param
|
22
|
+
# Create a new ShopAccount
|
23
|
+
# Create a new ShopAccount
|
24
|
+
# @param shop_account ShopAccount to add
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [
|
27
|
-
def
|
28
|
-
data, _status_code, _headers =
|
26
|
+
# @return [ShopAccount]
|
27
|
+
def create_shop_account(shop_account, opts = {})
|
28
|
+
data, _status_code, _headers = create_shop_account_with_http_info(shop_account, opts)
|
29
29
|
return data
|
30
30
|
end
|
31
31
|
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# @param
|
32
|
+
# Create a new ShopAccount
|
33
|
+
# Create a new ShopAccount
|
34
|
+
# @param shop_account ShopAccount to add
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(
|
37
|
-
def
|
36
|
+
# @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
|
37
|
+
def create_shop_account_with_http_info(shop_account, opts = {})
|
38
38
|
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug "Calling API: ShopAccountsApi.
|
39
|
+
@api_client.config.logger.debug "Calling API: ShopAccountsApi.create_shop_account ..."
|
40
40
|
end
|
41
|
-
# verify the required parameter '
|
42
|
-
fail ArgumentError, "Missing the required parameter '
|
41
|
+
# verify the required parameter 'shop_account' is set
|
42
|
+
fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.create_shop_account" if shop_account.nil?
|
43
43
|
# resource path
|
44
44
|
local_var_path = "/shop_accounts".sub('{format}','json')
|
45
45
|
|
46
46
|
# query parameters
|
47
47
|
query_params = {}
|
48
|
-
query_params[:'external_user_id'] = external_user_id
|
49
48
|
|
50
49
|
# header parameters
|
51
50
|
header_params = {}
|
@@ -58,40 +57,44 @@ module StorecoveApi
|
|
58
57
|
form_params = {}
|
59
58
|
|
60
59
|
# http body (model)
|
61
|
-
post_body =
|
60
|
+
post_body = @api_client.object_to_http_body(shop_account)
|
62
61
|
auth_names = ['Bearer']
|
63
|
-
data, status_code, headers = @api_client.call_api(:
|
62
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
64
63
|
:header_params => header_params,
|
65
64
|
:query_params => query_params,
|
66
65
|
:form_params => form_params,
|
67
66
|
:body => post_body,
|
68
67
|
:auth_names => auth_names,
|
69
|
-
:return_type => '
|
68
|
+
:return_type => 'ShopAccount')
|
70
69
|
if @api_client.config.debugging
|
71
|
-
@api_client.config.logger.debug "API called: ShopAccountsApi#
|
70
|
+
@api_client.config.logger.debug "API called: ShopAccountsApi#create_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
72
71
|
end
|
73
72
|
return data, status_code, headers
|
74
73
|
end
|
75
74
|
|
76
|
-
#
|
77
|
-
#
|
75
|
+
# Delete a specific ShopAccount
|
76
|
+
# Delete a specific ShopAccount
|
77
|
+
# @param id shop_account id
|
78
78
|
# @param [Hash] opts the optional parameters
|
79
|
-
# @return [
|
80
|
-
def
|
81
|
-
|
82
|
-
return
|
79
|
+
# @return [nil]
|
80
|
+
def delete_shop_account(id, opts = {})
|
81
|
+
delete_shop_account_with_http_info(id, opts)
|
82
|
+
return nil
|
83
83
|
end
|
84
84
|
|
85
|
-
#
|
86
|
-
#
|
85
|
+
# Delete a specific ShopAccount
|
86
|
+
# Delete a specific ShopAccount
|
87
|
+
# @param id shop_account id
|
87
88
|
# @param [Hash] opts the optional parameters
|
88
|
-
# @return [Array<(
|
89
|
-
def
|
89
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
90
|
+
def delete_shop_account_with_http_info(id, opts = {})
|
90
91
|
if @api_client.config.debugging
|
91
|
-
@api_client.config.logger.debug "Calling API: ShopAccountsApi.
|
92
|
+
@api_client.config.logger.debug "Calling API: ShopAccountsApi.delete_shop_account ..."
|
92
93
|
end
|
94
|
+
# verify the required parameter 'id' is set
|
95
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.delete_shop_account" if id.nil?
|
93
96
|
# resource path
|
94
|
-
local_var_path = "/shop_accounts/
|
97
|
+
local_var_path = "/shop_accounts/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
95
98
|
|
96
99
|
# query parameters
|
97
100
|
query_params = {}
|
@@ -109,42 +112,37 @@ module StorecoveApi
|
|
109
112
|
# http body (model)
|
110
113
|
post_body = nil
|
111
114
|
auth_names = ['Bearer']
|
112
|
-
data, status_code, headers = @api_client.call_api(:
|
115
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
113
116
|
:header_params => header_params,
|
114
117
|
:query_params => query_params,
|
115
118
|
:form_params => form_params,
|
116
119
|
:body => post_body,
|
117
|
-
:auth_names => auth_names
|
118
|
-
:return_type => 'Array<ShopAccountResult>')
|
120
|
+
:auth_names => auth_names)
|
119
121
|
if @api_client.config.debugging
|
120
|
-
@api_client.config.logger.debug "API called: ShopAccountsApi#
|
122
|
+
@api_client.config.logger.debug "API called: ShopAccountsApi#delete_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
121
123
|
end
|
122
124
|
return data, status_code, headers
|
123
125
|
end
|
124
126
|
|
125
|
-
#
|
126
|
-
#
|
127
|
-
# @param shop_account ShopAccount to add
|
127
|
+
# Get ShopAccounts with authorization failures
|
128
|
+
# Get ShopAccounts with authorization failures
|
128
129
|
# @param [Hash] opts the optional parameters
|
129
|
-
# @return [
|
130
|
-
def
|
131
|
-
data, _status_code, _headers =
|
130
|
+
# @return [Array<ShopAccount>]
|
131
|
+
def shop_accounts_auth_failures(opts = {})
|
132
|
+
data, _status_code, _headers = shop_accounts_auth_failures_with_http_info(opts)
|
132
133
|
return data
|
133
134
|
end
|
134
135
|
|
135
|
-
#
|
136
|
-
#
|
137
|
-
# @param shop_account ShopAccount to add
|
136
|
+
# Get ShopAccounts with authorization failures
|
137
|
+
# Get ShopAccounts with authorization failures
|
138
138
|
# @param [Hash] opts the optional parameters
|
139
|
-
# @return [Array<(
|
140
|
-
def
|
139
|
+
# @return [Array<(Array<ShopAccount>, Fixnum, Hash)>] Array<ShopAccount> data, response status code and response headers
|
140
|
+
def shop_accounts_auth_failures_with_http_info(opts = {})
|
141
141
|
if @api_client.config.debugging
|
142
|
-
@api_client.config.logger.debug "Calling API: ShopAccountsApi.
|
142
|
+
@api_client.config.logger.debug "Calling API: ShopAccountsApi.shop_accounts_auth_failures ..."
|
143
143
|
end
|
144
|
-
# verify the required parameter 'shop_account' is set
|
145
|
-
fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.create" if shop_account.nil?
|
146
144
|
# resource path
|
147
|
-
local_var_path = "/shop_accounts".sub('{format}','json')
|
145
|
+
local_var_path = "/shop_accounts/auth_failures".sub('{format}','json')
|
148
146
|
|
149
147
|
# query parameters
|
150
148
|
query_params = {}
|
@@ -160,47 +158,48 @@ module StorecoveApi
|
|
160
158
|
form_params = {}
|
161
159
|
|
162
160
|
# http body (model)
|
163
|
-
post_body =
|
161
|
+
post_body = nil
|
164
162
|
auth_names = ['Bearer']
|
165
|
-
data, status_code, headers = @api_client.call_api(:
|
163
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
166
164
|
:header_params => header_params,
|
167
165
|
:query_params => query_params,
|
168
166
|
:form_params => form_params,
|
169
167
|
:body => post_body,
|
170
168
|
:auth_names => auth_names,
|
171
|
-
:return_type => '
|
169
|
+
:return_type => 'Array<ShopAccount>')
|
172
170
|
if @api_client.config.debugging
|
173
|
-
@api_client.config.logger.debug "API called: ShopAccountsApi#
|
171
|
+
@api_client.config.logger.debug "API called: ShopAccountsApi#shop_accounts_auth_failures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
174
172
|
end
|
175
173
|
return data, status_code, headers
|
176
174
|
end
|
177
175
|
|
178
|
-
#
|
179
|
-
#
|
180
|
-
# @param
|
176
|
+
# Get all ShopAccounts
|
177
|
+
# Get all ShopAccounts
|
178
|
+
# @param external_user_id Filter by the external_user_id
|
181
179
|
# @param [Hash] opts the optional parameters
|
182
|
-
# @return [
|
183
|
-
def
|
184
|
-
|
185
|
-
return
|
180
|
+
# @return [Array<ShopAccount>]
|
181
|
+
def shop_accounts_index(external_user_id, opts = {})
|
182
|
+
data, _status_code, _headers = shop_accounts_index_with_http_info(external_user_id, opts)
|
183
|
+
return data
|
186
184
|
end
|
187
185
|
|
188
|
-
#
|
189
|
-
#
|
190
|
-
# @param
|
186
|
+
# Get all ShopAccounts
|
187
|
+
# Get all ShopAccounts
|
188
|
+
# @param external_user_id Filter by the external_user_id
|
191
189
|
# @param [Hash] opts the optional parameters
|
192
|
-
# @return [Array<(
|
193
|
-
def
|
190
|
+
# @return [Array<(Array<ShopAccount>, Fixnum, Hash)>] Array<ShopAccount> data, response status code and response headers
|
191
|
+
def shop_accounts_index_with_http_info(external_user_id, opts = {})
|
194
192
|
if @api_client.config.debugging
|
195
|
-
@api_client.config.logger.debug "Calling API: ShopAccountsApi.
|
193
|
+
@api_client.config.logger.debug "Calling API: ShopAccountsApi.shop_accounts_index ..."
|
196
194
|
end
|
197
|
-
# verify the required parameter '
|
198
|
-
fail ArgumentError, "Missing the required parameter '
|
195
|
+
# verify the required parameter 'external_user_id' is set
|
196
|
+
fail ArgumentError, "Missing the required parameter 'external_user_id' when calling ShopAccountsApi.shop_accounts_index" if external_user_id.nil?
|
199
197
|
# resource path
|
200
|
-
local_var_path = "/shop_accounts
|
198
|
+
local_var_path = "/shop_accounts".sub('{format}','json')
|
201
199
|
|
202
200
|
# query parameters
|
203
201
|
query_params = {}
|
202
|
+
query_params[:'external_user_id'] = external_user_id
|
204
203
|
|
205
204
|
# header parameters
|
206
205
|
header_params = {}
|
@@ -215,39 +214,40 @@ module StorecoveApi
|
|
215
214
|
# http body (model)
|
216
215
|
post_body = nil
|
217
216
|
auth_names = ['Bearer']
|
218
|
-
data, status_code, headers = @api_client.call_api(:
|
217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
219
218
|
:header_params => header_params,
|
220
219
|
:query_params => query_params,
|
221
220
|
:form_params => form_params,
|
222
221
|
:body => post_body,
|
223
|
-
:auth_names => auth_names
|
222
|
+
:auth_names => auth_names,
|
223
|
+
:return_type => 'Array<ShopAccount>')
|
224
224
|
if @api_client.config.debugging
|
225
|
-
@api_client.config.logger.debug "API called: ShopAccountsApi#
|
225
|
+
@api_client.config.logger.debug "API called: ShopAccountsApi#shop_accounts_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
226
226
|
end
|
227
227
|
return data, status_code, headers
|
228
228
|
end
|
229
229
|
|
230
|
-
#
|
231
|
-
#
|
230
|
+
# Show a specific ShopAccount
|
231
|
+
# Show a specific ShopAccount
|
232
232
|
# @param id shop_account id
|
233
233
|
# @param [Hash] opts the optional parameters
|
234
|
-
# @return [
|
235
|
-
def
|
236
|
-
data, _status_code, _headers =
|
234
|
+
# @return [ShopAccount]
|
235
|
+
def show_shop_account(id, opts = {})
|
236
|
+
data, _status_code, _headers = show_shop_account_with_http_info(id, opts)
|
237
237
|
return data
|
238
238
|
end
|
239
239
|
|
240
|
-
#
|
241
|
-
#
|
240
|
+
# Show a specific ShopAccount
|
241
|
+
# Show a specific ShopAccount
|
242
242
|
# @param id shop_account id
|
243
243
|
# @param [Hash] opts the optional parameters
|
244
|
-
# @return [Array<(
|
245
|
-
def
|
244
|
+
# @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
|
245
|
+
def show_shop_account_with_http_info(id, opts = {})
|
246
246
|
if @api_client.config.debugging
|
247
|
-
@api_client.config.logger.debug "Calling API: ShopAccountsApi.
|
247
|
+
@api_client.config.logger.debug "Calling API: ShopAccountsApi.show_shop_account ..."
|
248
248
|
end
|
249
249
|
# verify the required parameter 'id' is set
|
250
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.
|
250
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.show_shop_account" if id.nil?
|
251
251
|
# resource path
|
252
252
|
local_var_path = "/shop_accounts/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
253
253
|
|
@@ -273,38 +273,38 @@ module StorecoveApi
|
|
273
273
|
:form_params => form_params,
|
274
274
|
:body => post_body,
|
275
275
|
:auth_names => auth_names,
|
276
|
-
:return_type => '
|
276
|
+
:return_type => 'ShopAccount')
|
277
277
|
if @api_client.config.debugging
|
278
|
-
@api_client.config.logger.debug "API called: ShopAccountsApi#
|
278
|
+
@api_client.config.logger.debug "API called: ShopAccountsApi#show_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
279
279
|
end
|
280
280
|
return data, status_code, headers
|
281
281
|
end
|
282
282
|
|
283
|
-
# Update ShopAccount
|
284
|
-
# Update a specific ShopAccount
|
283
|
+
# Update a specific ShopAccount
|
284
|
+
# Update a specific ShopAccount
|
285
285
|
# @param id shop_account id
|
286
286
|
# @param shop_account ShopAccount updates
|
287
287
|
# @param [Hash] opts the optional parameters
|
288
|
-
# @return [
|
289
|
-
def
|
290
|
-
data, _status_code, _headers =
|
288
|
+
# @return [ShopAccount]
|
289
|
+
def update_shop_account(id, shop_account, opts = {})
|
290
|
+
data, _status_code, _headers = update_shop_account_with_http_info(id, shop_account, opts)
|
291
291
|
return data
|
292
292
|
end
|
293
293
|
|
294
|
-
# Update ShopAccount
|
295
|
-
# Update a specific ShopAccount
|
294
|
+
# Update a specific ShopAccount
|
295
|
+
# Update a specific ShopAccount
|
296
296
|
# @param id shop_account id
|
297
297
|
# @param shop_account ShopAccount updates
|
298
298
|
# @param [Hash] opts the optional parameters
|
299
|
-
# @return [Array<(
|
300
|
-
def
|
299
|
+
# @return [Array<(ShopAccount, Fixnum, Hash)>] ShopAccount data, response status code and response headers
|
300
|
+
def update_shop_account_with_http_info(id, shop_account, opts = {})
|
301
301
|
if @api_client.config.debugging
|
302
|
-
@api_client.config.logger.debug "Calling API: ShopAccountsApi.
|
302
|
+
@api_client.config.logger.debug "Calling API: ShopAccountsApi.update_shop_account ..."
|
303
303
|
end
|
304
304
|
# verify the required parameter 'id' is set
|
305
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.
|
305
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.update_shop_account" if id.nil?
|
306
306
|
# verify the required parameter 'shop_account' is set
|
307
|
-
fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.
|
307
|
+
fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.update_shop_account" if shop_account.nil?
|
308
308
|
# resource path
|
309
309
|
local_var_path = "/shop_accounts/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
310
310
|
|
@@ -330,9 +330,9 @@ module StorecoveApi
|
|
330
330
|
:form_params => form_params,
|
331
331
|
:body => post_body,
|
332
332
|
:auth_names => auth_names,
|
333
|
-
:return_type => '
|
333
|
+
:return_type => 'ShopAccount')
|
334
334
|
if @api_client.config.debugging
|
335
|
-
@api_client.config.logger.debug "API called: ShopAccountsApi#
|
335
|
+
@api_client.config.logger.debug "API called: ShopAccountsApi#update_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
336
336
|
end
|
337
337
|
return data, status_code, headers
|
338
338
|
end
|
@@ -19,22 +19,22 @@ module StorecoveApi
|
|
19
19
|
@api_client = api_client
|
20
20
|
end
|
21
21
|
|
22
|
-
# Get
|
23
|
-
# Get all
|
22
|
+
# Get all shops
|
23
|
+
# Get all shops
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @return [Array<Shop>]
|
26
|
-
def
|
27
|
-
data, _status_code, _headers =
|
26
|
+
def shops_index(opts = {})
|
27
|
+
data, _status_code, _headers = shops_index_with_http_info(opts)
|
28
28
|
return data
|
29
29
|
end
|
30
30
|
|
31
|
-
# Get
|
32
|
-
# Get all
|
31
|
+
# Get all shops
|
32
|
+
# Get all shops
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
34
|
# @return [Array<(Array<Shop>, Fixnum, Hash)>] Array<Shop> data, response status code and response headers
|
35
|
-
def
|
35
|
+
def shops_index_with_http_info(opts = {})
|
36
36
|
if @api_client.config.debugging
|
37
|
-
@api_client.config.logger.debug "Calling API: ShopsApi.
|
37
|
+
@api_client.config.logger.debug "Calling API: ShopsApi.shops_index ..."
|
38
38
|
end
|
39
39
|
# resource path
|
40
40
|
local_var_path = "/shops".sub('{format}','json')
|
@@ -63,7 +63,7 @@ module StorecoveApi
|
|
63
63
|
:auth_names => auth_names,
|
64
64
|
:return_type => 'Array<Shop>')
|
65
65
|
if @api_client.config.debugging
|
66
|
-
@api_client.config.logger.debug "API called: ShopsApi#
|
66
|
+
@api_client.config.logger.debug "API called: ShopsApi#shops_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
67
67
|
end
|
68
68
|
return data, status_code, headers
|
69
69
|
end
|
@@ -14,16 +14,14 @@ require 'date'
|
|
14
14
|
module StorecoveApi
|
15
15
|
# The invoice to send
|
16
16
|
class Invoice
|
17
|
-
# The documentCurrencyCode is the currency for the entire invoice. We currently do not support invoices in multiple currencies.
|
18
17
|
attr_accessor :document_currency_code
|
19
18
|
|
20
|
-
# The invoice number you assigned to the invoice. The
|
19
|
+
# The invoice number you assigned to the invoice. The minimum length is 1 character, to allow invoice numbers 1-9.
|
21
20
|
attr_accessor :invoice_number
|
22
21
|
|
23
22
|
# Format: yyyy-mm-dd.
|
24
23
|
attr_accessor :issue_date
|
25
24
|
|
26
|
-
# The receiving party
|
27
25
|
attr_accessor :accounting_customer_party
|
28
26
|
|
29
27
|
# An array of invoice lines.
|
@@ -43,7 +41,7 @@ module StorecoveApi
|
|
43
41
|
# A reference provided by the buyer used for internal routing of the document.
|
44
42
|
attr_accessor :buyer_reference
|
45
43
|
|
46
|
-
# The period (or specific date) to which the invoice applies. Format: yyyy-mm-dd
|
44
|
+
# The period (or specific date) to which the invoice applies. Format: yyyy-mm-dd / yyyy-mm-dd.
|
47
45
|
attr_accessor :invoice_period
|
48
46
|
|
49
47
|
# A reference to an order for this invoice.
|
@@ -67,9 +65,6 @@ module StorecoveApi
|
|
67
65
|
# The payment id that you will use to match the payment against the invoice.
|
68
66
|
attr_accessor :payment_means_payment_id
|
69
67
|
|
70
|
-
# amountIncludingVat is important because of rounding differences. In many invoices, the sum of the line item amounts excluding VAT and the VAT amounts is not equal to first summing the line items without VAT, and then applying VAT. The difference is automatically calculated and included in the electronic invoice, so the receiving accounting package can process the electronic invoice without problems.
|
71
|
-
attr_accessor :amount_including_vat
|
72
|
-
|
73
68
|
class EnumAttributeValidator
|
74
69
|
attr_reader :datatype
|
75
70
|
attr_reader :allowable_values
|
@@ -112,8 +107,7 @@ module StorecoveApi
|
|
112
107
|
:'project_reference' => :'projectReference',
|
113
108
|
:'payment_means_iban' => :'paymentMeansIban',
|
114
109
|
:'payment_means_code' => :'paymentMeansCode',
|
115
|
-
:'payment_means_payment_id' => :'paymentMeansPaymentId'
|
116
|
-
:'amount_including_vat' => :'amountIncludingVat'
|
110
|
+
:'payment_means_payment_id' => :'paymentMeansPaymentId'
|
117
111
|
}
|
118
112
|
end
|
119
113
|
|
@@ -137,8 +131,7 @@ module StorecoveApi
|
|
137
131
|
:'project_reference' => :'String',
|
138
132
|
:'payment_means_iban' => :'String',
|
139
133
|
:'payment_means_code' => :'String',
|
140
|
-
:'payment_means_payment_id' => :'String'
|
141
|
-
:'amount_including_vat' => :'Float'
|
134
|
+
:'payment_means_payment_id' => :'String'
|
142
135
|
}
|
143
136
|
end
|
144
137
|
|
@@ -226,10 +219,6 @@ module StorecoveApi
|
|
226
219
|
self.payment_means_payment_id = attributes[:'paymentMeansPaymentId']
|
227
220
|
end
|
228
221
|
|
229
|
-
if attributes.has_key?(:'amountIncludingVat')
|
230
|
-
self.amount_including_vat = attributes[:'amountIncludingVat']
|
231
|
-
end
|
232
|
-
|
233
222
|
end
|
234
223
|
|
235
224
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -252,8 +241,8 @@ module StorecoveApi
|
|
252
241
|
invalid_properties.push("invalid value for 'issue_date', issue_date cannot be nil.")
|
253
242
|
end
|
254
243
|
|
255
|
-
if @issue_date !~ Regexp.new(
|
256
|
-
invalid_properties.push("invalid value for 'issue_date', must conform to the pattern
|
244
|
+
if @issue_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
245
|
+
invalid_properties.push("invalid value for 'issue_date', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}$/.")
|
257
246
|
end
|
258
247
|
|
259
248
|
if @accounting_customer_party.nil?
|
@@ -264,20 +253,16 @@ module StorecoveApi
|
|
264
253
|
invalid_properties.push("invalid value for 'invoice_lines', invoice_lines cannot be nil.")
|
265
254
|
end
|
266
255
|
|
267
|
-
if !@due_date.nil? && @due_date !~ Regexp.new(
|
268
|
-
invalid_properties.push("invalid value for 'due_date', must conform to the pattern
|
269
|
-
end
|
270
|
-
|
271
|
-
if !@tax_point_date.nil? && @tax_point_date !~ Regexp.new(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
|
272
|
-
invalid_properties.push("invalid value for 'tax_point_date', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.")
|
256
|
+
if !@due_date.nil? && @due_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
257
|
+
invalid_properties.push("invalid value for 'due_date', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}$/.")
|
273
258
|
end
|
274
259
|
|
275
|
-
if !@
|
276
|
-
invalid_properties.push("invalid value for '
|
260
|
+
if !@tax_point_date.nil? && @tax_point_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
261
|
+
invalid_properties.push("invalid value for 'tax_point_date', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}$/.")
|
277
262
|
end
|
278
263
|
|
279
|
-
if
|
280
|
-
invalid_properties.push("invalid value for '
|
264
|
+
if !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/)
|
265
|
+
invalid_properties.push("invalid value for 'invoice_period', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/.")
|
281
266
|
end
|
282
267
|
|
283
268
|
return invalid_properties
|
@@ -290,15 +275,14 @@ module StorecoveApi
|
|
290
275
|
return false if @invoice_number.nil?
|
291
276
|
return false if @invoice_number.to_s.length < 1
|
292
277
|
return false if @issue_date.nil?
|
293
|
-
return false if @issue_date !~ Regexp.new(
|
278
|
+
return false if @issue_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
294
279
|
return false if @accounting_customer_party.nil?
|
295
280
|
return false if @invoice_lines.nil?
|
296
|
-
return false if !@due_date.nil? && @due_date !~ Regexp.new(
|
281
|
+
return false if !@due_date.nil? && @due_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
297
282
|
invoice_type_validator = EnumAttributeValidator.new('String', ["380", "384"])
|
298
283
|
return false unless invoice_type_validator.valid?(@invoice_type)
|
299
|
-
return false if !@tax_point_date.nil? && @tax_point_date !~ Regexp.new(
|
300
|
-
return false if !@invoice_period.nil? && @invoice_period !~ Regexp.new(
|
301
|
-
return false if @amount_including_vat.nil?
|
284
|
+
return false if !@tax_point_date.nil? && @tax_point_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
285
|
+
return false if !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/)
|
302
286
|
return true
|
303
287
|
end
|
304
288
|
|
@@ -323,8 +307,8 @@ module StorecoveApi
|
|
323
307
|
fail ArgumentError, "issue_date cannot be nil"
|
324
308
|
end
|
325
309
|
|
326
|
-
if issue_date !~ Regexp.new(
|
327
|
-
fail ArgumentError, "invalid value for 'issue_date', must conform to the pattern
|
310
|
+
if issue_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
311
|
+
fail ArgumentError, "invalid value for 'issue_date', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}$/."
|
328
312
|
end
|
329
313
|
|
330
314
|
@issue_date = issue_date
|
@@ -334,8 +318,8 @@ module StorecoveApi
|
|
334
318
|
# @param [Object] due_date Value to be assigned
|
335
319
|
def due_date=(due_date)
|
336
320
|
|
337
|
-
if !due_date.nil? && due_date !~ Regexp.new(
|
338
|
-
fail ArgumentError, "invalid value for 'due_date', must conform to the pattern
|
321
|
+
if !due_date.nil? && due_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
322
|
+
fail ArgumentError, "invalid value for 'due_date', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}$/."
|
339
323
|
end
|
340
324
|
|
341
325
|
@due_date = due_date
|
@@ -355,8 +339,8 @@ module StorecoveApi
|
|
355
339
|
# @param [Object] tax_point_date Value to be assigned
|
356
340
|
def tax_point_date=(tax_point_date)
|
357
341
|
|
358
|
-
if !tax_point_date.nil? && tax_point_date !~ Regexp.new(
|
359
|
-
fail ArgumentError, "invalid value for 'tax_point_date', must conform to the pattern
|
342
|
+
if !tax_point_date.nil? && tax_point_date !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}$/)
|
343
|
+
fail ArgumentError, "invalid value for 'tax_point_date', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}$/."
|
360
344
|
end
|
361
345
|
|
362
346
|
@tax_point_date = tax_point_date
|
@@ -366,8 +350,8 @@ module StorecoveApi
|
|
366
350
|
# @param [Object] invoice_period Value to be assigned
|
367
351
|
def invoice_period=(invoice_period)
|
368
352
|
|
369
|
-
if !invoice_period.nil? && invoice_period !~ Regexp.new(
|
370
|
-
fail ArgumentError, "invalid value for 'invoice_period', must conform to the pattern
|
353
|
+
if !invoice_period.nil? && invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/)
|
354
|
+
fail ArgumentError, "invalid value for 'invoice_period', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/."
|
371
355
|
end
|
372
356
|
|
373
357
|
@invoice_period = invoice_period
|
@@ -395,8 +379,7 @@ module StorecoveApi
|
|
395
379
|
project_reference == o.project_reference &&
|
396
380
|
payment_means_iban == o.payment_means_iban &&
|
397
381
|
payment_means_code == o.payment_means_code &&
|
398
|
-
payment_means_payment_id == o.payment_means_payment_id
|
399
|
-
amount_including_vat == o.amount_including_vat
|
382
|
+
payment_means_payment_id == o.payment_means_payment_id
|
400
383
|
end
|
401
384
|
|
402
385
|
# @see the `==` method
|
@@ -408,7 +391,7 @@ module StorecoveApi
|
|
408
391
|
# Calculates hash code according to all attributes.
|
409
392
|
# @return [Fixnum] Hash code
|
410
393
|
def hash
|
411
|
-
[document_currency_code, invoice_number, issue_date, accounting_customer_party, invoice_lines, accounting_cost_code, due_date, invoice_type, tax_point_date, buyer_reference, invoice_period, order_reference, billing_reference, contract_document_reference, project_reference, payment_means_iban, payment_means_code, payment_means_payment_id
|
394
|
+
[document_currency_code, invoice_number, issue_date, accounting_customer_party, invoice_lines, accounting_cost_code, due_date, invoice_type, tax_point_date, buyer_reference, invoice_period, order_reference, billing_reference, contract_document_reference, project_reference, payment_means_iban, payment_means_code, payment_means_payment_id].hash
|
412
395
|
end
|
413
396
|
|
414
397
|
# Builds the object from hash
|
@@ -20,7 +20,7 @@ module StorecoveApi
|
|
20
20
|
# The description for this invoice line.
|
21
21
|
attr_accessor :description
|
22
22
|
|
23
|
-
# The period (or specific date) to which the invoice line applies. Format: yyyy-mm-dd
|
23
|
+
# The period (or specific date) to which the invoice line applies. Format: yyyy-mm-dd / yyyy-mm-dd.
|
24
24
|
attr_accessor :invoice_period
|
25
25
|
|
26
26
|
# The number of items (may be fractional).
|
@@ -123,8 +123,8 @@ module StorecoveApi
|
|
123
123
|
invalid_properties.push("invalid value for 'description', the character length must be great than or equal to 1.")
|
124
124
|
end
|
125
125
|
|
126
|
-
if !@invoice_period.nil? && @invoice_period !~ Regexp.new(
|
127
|
-
invalid_properties.push("invalid value for 'invoice_period', must conform to the pattern
|
126
|
+
if !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/)
|
127
|
+
invalid_properties.push("invalid value for 'invoice_period', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/.")
|
128
128
|
end
|
129
129
|
|
130
130
|
if @amount_excluding_vat.nil?
|
@@ -140,7 +140,7 @@ module StorecoveApi
|
|
140
140
|
return false if !@id.nil? && @id.to_s.length < 1
|
141
141
|
return false if @description.nil?
|
142
142
|
return false if @description.to_s.length < 1
|
143
|
-
return false if !@invoice_period.nil? && @invoice_period !~ Regexp.new(
|
143
|
+
return false if !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/)
|
144
144
|
return false if @amount_excluding_vat.nil?
|
145
145
|
return true
|
146
146
|
end
|
@@ -174,8 +174,8 @@ module StorecoveApi
|
|
174
174
|
# @param [Object] invoice_period Value to be assigned
|
175
175
|
def invoice_period=(invoice_period)
|
176
176
|
|
177
|
-
if !invoice_period.nil? && invoice_period !~ Regexp.new(
|
178
|
-
fail ArgumentError, "invalid value for 'invoice_period', must conform to the pattern
|
177
|
+
if !invoice_period.nil? && invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/)
|
178
|
+
fail ArgumentError, "invalid value for 'invoice_period', must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}\\s+/\\s+\\d{4}-\\d{2}-\\d{2}$/."
|
179
179
|
end
|
180
180
|
|
181
181
|
@invoice_period = invoice_period
|