storecove 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,33 +19,32 @@ module StorecoveApi
19
19
  @api_client = api_client
20
20
  end
21
21
 
22
- # Get ShopAccounts for an entity
23
- # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/all.adoc[]
24
- # @param external_user_id Filter by the external_user_id
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 [Array<ShopAccountResult>]
27
- def all(external_user_id, opts = {})
28
- data, _status_code, _headers = all_with_http_info(external_user_id, opts)
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
- # Get ShopAccounts for an entity
33
- # Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/all.adoc[]
34
- # @param external_user_id Filter by the external_user_id
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<(Array<ShopAccountResult>, Fixnum, Hash)>] Array<ShopAccountResult> data, response status code and response headers
37
- def all_with_http_info(external_user_id, opts = {})
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.all ..."
39
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.create_shop_account ..."
40
40
  end
41
- # verify the required parameter 'external_user_id' is set
42
- fail ArgumentError, "Missing the required parameter 'external_user_id' when calling ShopAccountsApi.all" if external_user_id.nil?
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 = nil
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(:GET, local_var_path,
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 => 'Array<ShopAccountResult>')
68
+ :return_type => 'ShopAccount')
70
69
  if @api_client.config.debugging
71
- @api_client.config.logger.debug "API called: ShopAccountsApi#all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # Get ShopAccounts with authorization failures
77
- # Get ShopAccounts with authorization failures. include::examples/shop_accounts/auth_failures.adoc[]
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 [Array<ShopAccountResult>]
80
- def auth_failures(opts = {})
81
- data, _status_code, _headers = auth_failures_with_http_info(opts)
82
- return data
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
- # Get ShopAccounts with authorization failures
86
- # Get ShopAccounts with authorization failures. include::examples/shop_accounts/auth_failures.adoc[]
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<(Array<ShopAccountResult>, Fixnum, Hash)>] Array<ShopAccountResult> data, response status code and response headers
89
- def auth_failures_with_http_info(opts = {})
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.auth_failures ..."
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/auth_failures".sub('{format}','json')
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(:GET, local_var_path,
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#auth_failures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # Create ShopAccount
126
- # Create a new ShopAccount. include::examples/shop_accounts/create.adoc[]
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 [ShopAccountResult]
130
- def create(shop_account, opts = {})
131
- data, _status_code, _headers = create_with_http_info(shop_account, opts)
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
- # Create ShopAccount
136
- # Create a new ShopAccount. include::examples/shop_accounts/create.adoc[]
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<(ShopAccountResult, Fixnum, Hash)>] ShopAccountResult data, response status code and response headers
140
- def create_with_http_info(shop_account, opts = {})
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.create ..."
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 = @api_client.object_to_http_body(shop_account)
161
+ post_body = nil
164
162
  auth_names = ['Bearer']
165
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
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 => 'ShopAccountResult')
169
+ :return_type => 'Array<ShopAccount>')
172
170
  if @api_client.config.debugging
173
- @api_client.config.logger.debug "API called: ShopAccountsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # Delete ShopAccount
179
- #
180
- # @param id shop_account id
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 [nil]
183
- def destroy(id, opts = {})
184
- destroy_with_http_info(id, opts)
185
- return nil
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
- # Delete ShopAccount
189
- #
190
- # @param id shop_account id
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<(nil, Fixnum, Hash)>] nil, response status code and response headers
193
- def destroy_with_http_info(id, opts = {})
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.destroy ..."
193
+ @api_client.config.logger.debug "Calling API: ShopAccountsApi.shop_accounts_index ..."
196
194
  end
197
- # verify the required parameter 'id' is set
198
- fail ArgumentError, "Missing the required parameter 'id' when calling ShopAccountsApi.destroy" if id.nil?
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/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
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(:DELETE, local_var_path,
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#destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # Get ShopAccount
231
- # Get a specific ShopAccount. include::examples/shop_accounts/get.adoc[]
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 [ShopAccountResult]
235
- def get(id, opts = {})
236
- data, _status_code, _headers = get_with_http_info(id, opts)
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
- # Get ShopAccount
241
- # Get a specific ShopAccount. include::examples/shop_accounts/get.adoc[]
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<(ShopAccountResult, Fixnum, Hash)>] ShopAccountResult data, response status code and response headers
245
- def get_with_http_info(id, opts = {})
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.get ..."
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.get" if id.nil?
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 => 'ShopAccountResult')
276
+ :return_type => 'ShopAccount')
277
277
  if @api_client.config.debugging
278
- @api_client.config.logger.debug "API called: ShopAccountsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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. include::examples/shop_accounts/update.adoc[]
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 [ShopAccountResult]
289
- def update(id, shop_account, opts = {})
290
- data, _status_code, _headers = update_with_http_info(id, shop_account, opts)
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. include::examples/shop_accounts/update.adoc[]
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<(ShopAccountResult, Fixnum, Hash)>] ShopAccountResult data, response status code and response headers
300
- def update_with_http_info(id, shop_account, opts = {})
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.update ..."
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.update" if id.nil?
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.update" if shop_account.nil?
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 => 'ShopAccountResult')
333
+ :return_type => 'ShopAccount')
334
334
  if @api_client.config.debugging
335
- @api_client.config.logger.debug "API called: ShopAccountsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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 Shops
23
- # Get all available shops. include::examples/shops/all.adoc[]
22
+ # Get all shops
23
+ # Get all shops
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [Array<Shop>]
26
- def all(opts = {})
27
- data, _status_code, _headers = all_with_http_info(opts)
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 Shops
32
- # Get all available shops. include::examples/shops/all.adoc[]
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 all_with_http_info(opts = {})
35
+ def shops_index_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
37
- @api_client.config.logger.debug "Calling API: ShopsApi.all ..."
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#all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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 invoiceNumber should be unique for the supplierId and year of the issueDate. This means invoice numbers can be reused in different years, as is customary in some countries.
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 - 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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
256
- invalid_properties.push("invalid value for 'issue_date', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.")
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
268
- invalid_properties.push("invalid value for 'due_date', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.")
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 !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/)
276
- invalid_properties.push("invalid value for 'invoice_period', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/.")
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 @amount_including_vat.nil?
280
- invalid_properties.push("invalid value for 'amount_including_vat', amount_including_vat cannot be nil.")
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
300
- return false if !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/)
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
327
- fail ArgumentError, "invalid value for 'issue_date', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/."
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
338
- fail ArgumentError, "invalid value for 'due_date', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/."
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
359
- fail ArgumentError, "invalid value for 'tax_point_date', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/."
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/)
370
- fail ArgumentError, "invalid value for 'invoice_period', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/."
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, amount_including_vat].hash
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 - 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(/^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/)
127
- invalid_properties.push("invalid value for 'invoice_period', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/.")
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/)
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(/^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/)
178
- fail ArgumentError, "invalid value for 'invoice_period', must conform to the pattern /^[0-9]{4}-[0-9]{2}-[0-9]{2} - [0-9]{4}-[0-9]{2}-[0-9]{2}$/."
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