storecove 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/lib/storecove.rb +20 -1
- data/lib/storecove/api/invoice_submissions_api.rb +9 -4
- data/lib/storecove/api/legal_entities_api.rb +248 -0
- data/lib/storecove/api/peppol_identifiers_api.rb +156 -0
- data/lib/storecove/api/purchase_invoices_api.rb +133 -0
- data/lib/storecove/api/shop_account_requests_api.rb +24 -11
- data/lib/storecove/api/shop_accounts_api.rb +25 -12
- data/lib/storecove/api/shops_api.rb +2 -1
- data/lib/storecove/api_client.rb +39 -26
- data/lib/storecove/api_error.rb +1 -0
- data/lib/storecove/configuration.rb +7 -0
- data/lib/storecove/models/accounting_cost_code.rb +2 -1
- data/lib/storecove/models/accounting_customer_party.rb +2 -1
- data/lib/storecove/models/accounting_details.rb +219 -0
- data/lib/storecove/models/accounting_details_1.rb +219 -0
- data/lib/storecove/models/address.rb +2 -1
- data/lib/storecove/models/contact.rb +2 -6
- data/lib/storecove/models/country.rb +10 -0
- data/lib/storecove/models/currency_code.rb +10 -0
- data/lib/storecove/models/error_model.rb +2 -1
- data/lib/storecove/models/invoice.rb +16 -3
- data/lib/storecove/models/invoice_line.rb +251 -6
- data/lib/storecove/models/invoice_recipient.rb +24 -11
- data/lib/storecove/models/invoice_recipient_preflight.rb +21 -19
- data/lib/storecove/models/invoice_submission.rb +20 -9
- data/lib/storecove/models/invoice_submission_result.rb +2 -1
- data/lib/storecove/models/legal_entity.rb +164 -25
- data/lib/storecove/models/legal_entity_create.rb +417 -0
- data/lib/storecove/models/legal_entity_identifier.rb +2 -1
- data/lib/storecove/models/legal_entity_shop.rb +253 -0
- data/lib/storecove/models/legal_entity_update.rb +380 -0
- data/lib/storecove/models/logos.rb +2 -1
- data/lib/storecove/models/party.rb +7 -1
- data/lib/storecove/models/payment_means.rb +199 -0
- data/lib/storecove/models/peppol_identifier.rb +284 -0
- data/lib/storecove/models/peppol_identifier_create.rb +308 -0
- data/lib/storecove/models/preflight_invoice_recipient_result.rb +2 -1
- data/lib/storecove/models/public_identifier.rb +3 -2
- data/lib/storecove/models/public_identifiers.rb +2 -1
- data/lib/storecove/models/purchase_invoice.rb +463 -0
- data/lib/storecove/models/purchase_invoice_invoice_line.rb +247 -0
- data/lib/storecove/models/purchase_invoice_sender.rb +280 -0
- data/lib/storecove/models/purchase_invoice_sender_billing_contact.rb +209 -0
- data/lib/storecove/models/purchase_invoice_ubl.rb +209 -0
- data/lib/storecove/models/shop.rb +3 -2
- data/lib/storecove/models/shop_account_input.rb +2 -1
- data/lib/storecove/models/shop_account_request_input.rb +2 -1
- data/lib/storecove/models/shop_account_request_result.rb +2 -1
- data/lib/storecove/models/shop_account_request_update.rb +2 -1
- data/lib/storecove/models/shop_account_result.rb +2 -1
- data/lib/storecove/models/shop_account_update.rb +2 -1
- data/lib/storecove/models/tax.rb +2 -1
- data/lib/storecove/models/vat_details.rb +209 -0
- data/lib/storecove/models/widget_identification.rb +228 -0
- data/lib/storecove/version.rb +2 -1
- data/spec/api/invoice_submissions_api_spec.rb +9 -20
- data/spec/api/legal_entities_api_spec.rb +84 -0
- data/spec/api/peppol_identifiers_api_spec.rb +63 -0
- data/spec/api/purchase_invoices_api_spec.rb +59 -0
- data/spec/api/shop_account_requests_api_spec.rb +30 -41
- data/spec/api/shop_accounts_api_spec.rb +34 -45
- data/spec/api/shops_api_spec.rb +6 -17
- data/spec/api_client_spec.rb +2 -13
- data/spec/configuration_spec.rb +2 -13
- data/spec/models/accounting_cost_code_spec.rb +3 -14
- data/spec/models/accounting_customer_party_spec.rb +3 -14
- data/spec/models/accounting_details_1_spec.rb +60 -0
- data/spec/models/accounting_details_spec.rb +60 -0
- data/spec/models/{party_address_spec.rb → address_spec.rb} +8 -19
- data/spec/models/{party_contact_spec.rb → contact_spec.rb} +8 -19
- data/spec/models/country_spec.rb +3 -14
- data/spec/models/currency_code_spec.rb +3 -14
- data/spec/models/error_model_spec.rb +3 -14
- data/spec/models/invoice_line_spec.rb +69 -14
- data/spec/models/invoice_recipient_preflight_spec.rb +10 -15
- data/spec/models/invoice_recipient_spec.rb +15 -14
- data/spec/models/{invoice_submission_invoice_spec.rb → invoice_spec.rb} +20 -19
- data/spec/models/invoice_submission_result_spec.rb +4 -15
- data/spec/models/invoice_submission_spec.rb +4 -15
- data/spec/models/legal_entity_create_spec.rb +78 -0
- data/spec/models/legal_entity_identifier_spec.rb +3 -14
- data/spec/models/legal_entity_shop_spec.rb +84 -0
- data/spec/models/legal_entity_spec.rb +7 -18
- data/spec/models/legal_entity_update_spec.rb +78 -0
- data/spec/models/logos_spec.rb +3 -14
- data/spec/models/party_spec.rb +3 -14
- data/spec/models/payment_means_spec.rb +48 -0
- data/spec/models/peppol_identifier_create_spec.rb +54 -0
- data/spec/models/peppol_identifier_spec.rb +54 -0
- data/spec/models/preflight_invoice_recipient_result_spec.rb +3 -14
- data/spec/models/public_identifier_spec.rb +3 -14
- data/spec/models/public_identifiers_spec.rb +3 -14
- data/spec/models/purchase_invoice_invoice_line_spec.rb +78 -0
- data/spec/models/purchase_invoice_sender_billing_contact_spec.rb +54 -0
- data/spec/models/purchase_invoice_sender_spec.rb +96 -0
- data/spec/models/purchase_invoice_spec.rb +188 -0
- data/spec/models/purchase_invoice_ubl_spec.rb +54 -0
- data/spec/models/shop_account_input_spec.rb +3 -14
- data/spec/models/shop_account_request_input_spec.rb +3 -14
- data/spec/models/{shop_account_request_spec.rb → shop_account_request_result_spec.rb} +8 -19
- data/spec/models/shop_account_request_update_spec.rb +3 -14
- data/spec/models/shop_account_result_spec.rb +3 -14
- data/spec/models/shop_account_update_spec.rb +3 -14
- data/spec/models/shop_spec.rb +3 -14
- data/spec/models/{invoice_line_tax_spec.rb → tax_spec.rb} +8 -19
- data/spec/models/vat_details_spec.rb +54 -0
- data/spec/models/widget_identification_spec.rb +48 -0
- data/spec/spec_helper.rb +2 -13
- data/storecove.gemspec +10 -19
- metadata +83 -28
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -118,7 +119,7 @@ module StorecoveApi
|
|
118
119
|
end
|
119
120
|
|
120
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
-
# @return Array for valid
|
122
|
+
# @return Array for valid properties with the reasons
|
122
123
|
def list_invalid_properties
|
123
124
|
invalid_properties = Array.new
|
124
125
|
if !@street1.nil? && @street1.to_s.length < 2
|
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -62,20 +63,15 @@ module StorecoveApi
|
|
62
63
|
end
|
63
64
|
|
64
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
65
|
-
# @return Array for valid
|
66
|
+
# @return Array for valid properties with the reasons
|
66
67
|
def list_invalid_properties
|
67
68
|
invalid_properties = Array.new
|
68
|
-
if @email.nil?
|
69
|
-
invalid_properties.push("invalid value for 'email', email cannot be nil.")
|
70
|
-
end
|
71
|
-
|
72
69
|
return invalid_properties
|
73
70
|
end
|
74
71
|
|
75
72
|
# Check to see if the all the properties in the model are valid
|
76
73
|
# @return true if the model is valid
|
77
74
|
def valid?
|
78
|
-
return false if @email.nil?
|
79
75
|
return true
|
80
76
|
end
|
81
77
|
|
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -263,6 +264,15 @@ module StorecoveApi
|
|
263
264
|
ZA = "ZA".freeze
|
264
265
|
ZM = "ZM".freeze
|
265
266
|
ZW = "ZW".freeze
|
267
|
+
|
268
|
+
# Builds the enum from string
|
269
|
+
# @param [String] The enum value in the form of the string
|
270
|
+
# @return [String] The enum value
|
271
|
+
def build_from_hash(value)
|
272
|
+
constantValues = Country.constants.select{|c| Country::const_get(c) == value}
|
273
|
+
raise "Invalid ENUM value #{value} for class #Country" if constantValues.empty?
|
274
|
+
value
|
275
|
+
end
|
266
276
|
end
|
267
277
|
|
268
278
|
end
|
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -192,6 +193,15 @@ module StorecoveApi
|
|
192
193
|
YER = "YER".freeze
|
193
194
|
ZAR = "ZAR".freeze
|
194
195
|
ZMW = "ZMW".freeze
|
196
|
+
|
197
|
+
# Builds the enum from string
|
198
|
+
# @param [String] The enum value in the form of the string
|
199
|
+
# @return [String] The enum value
|
200
|
+
def build_from_hash(value)
|
201
|
+
constantValues = CurrencyCode.constants.select{|c| CurrencyCode::const_get(c) == value}
|
202
|
+
raise "Invalid ENUM value #{value} for class #CurrencyCode" if constantValues.empty?
|
203
|
+
value
|
204
|
+
end
|
195
205
|
end
|
196
206
|
|
197
207
|
end
|
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -54,7 +55,7 @@ module StorecoveApi
|
|
54
55
|
end
|
55
56
|
|
56
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
-
# @return Array for valid
|
58
|
+
# @return Array for valid properties with the reasons
|
58
59
|
def list_invalid_properties
|
59
60
|
invalid_properties = Array.new
|
60
61
|
return invalid_properties
|
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -17,12 +18,15 @@ module StorecoveApi
|
|
17
18
|
# The documentCurrencyCode is the currency for the entire invoice. We currently do not support invoices in multiple currencies. If left out, will default to EUR
|
18
19
|
attr_accessor :document_currency_code
|
19
20
|
|
20
|
-
# The invoice number you assigned to the invoice. The invoiceNumber should be unique for the
|
21
|
+
# The invoice number you assigned to the invoice. The invoiceNumber should be unique for the legalEntityId and year of the issueDate. This means invoice numbers can be reused in different years, as is customary in some countries.
|
21
22
|
attr_accessor :invoice_number
|
22
23
|
|
23
24
|
# Format: yyyy-mm-dd.
|
24
25
|
attr_accessor :issue_date
|
25
26
|
|
27
|
+
# Whether or not the invoice is reverse charged
|
28
|
+
attr_accessor :vat_reverse_charge
|
29
|
+
|
26
30
|
# The receiving party
|
27
31
|
attr_accessor :accounting_customer_party
|
28
32
|
|
@@ -98,6 +102,7 @@ module StorecoveApi
|
|
98
102
|
:'document_currency_code' => :'documentCurrencyCode',
|
99
103
|
:'invoice_number' => :'invoiceNumber',
|
100
104
|
:'issue_date' => :'issueDate',
|
105
|
+
:'vat_reverse_charge' => :'vatReverseCharge',
|
101
106
|
:'accounting_customer_party' => :'accountingCustomerParty',
|
102
107
|
:'invoice_lines' => :'invoiceLines',
|
103
108
|
:'accounting_cost_code' => :'accountingCostCode',
|
@@ -123,6 +128,7 @@ module StorecoveApi
|
|
123
128
|
:'document_currency_code' => :'CurrencyCode',
|
124
129
|
:'invoice_number' => :'String',
|
125
130
|
:'issue_date' => :'String',
|
131
|
+
:'vat_reverse_charge' => :'BOOLEAN',
|
126
132
|
:'accounting_customer_party' => :'AccountingCustomerParty',
|
127
133
|
:'invoice_lines' => :'Array<InvoiceLine>',
|
128
134
|
:'accounting_cost_code' => :'AccountingCostCode',
|
@@ -162,6 +168,12 @@ module StorecoveApi
|
|
162
168
|
self.issue_date = attributes[:'issueDate']
|
163
169
|
end
|
164
170
|
|
171
|
+
if attributes.has_key?(:'vatReverseCharge')
|
172
|
+
self.vat_reverse_charge = attributes[:'vatReverseCharge']
|
173
|
+
else
|
174
|
+
self.vat_reverse_charge = false
|
175
|
+
end
|
176
|
+
|
165
177
|
if attributes.has_key?(:'accountingCustomerParty')
|
166
178
|
self.accounting_customer_party = attributes[:'accountingCustomerParty']
|
167
179
|
end
|
@@ -233,7 +245,7 @@ module StorecoveApi
|
|
233
245
|
end
|
234
246
|
|
235
247
|
# Show invalid properties with the reasons. Usually used together with valid?
|
236
|
-
# @return Array for valid
|
248
|
+
# @return Array for valid properties with the reasons
|
237
249
|
def list_invalid_properties
|
238
250
|
invalid_properties = Array.new
|
239
251
|
if @invoice_number.nil?
|
@@ -376,6 +388,7 @@ module StorecoveApi
|
|
376
388
|
document_currency_code == o.document_currency_code &&
|
377
389
|
invoice_number == o.invoice_number &&
|
378
390
|
issue_date == o.issue_date &&
|
391
|
+
vat_reverse_charge == o.vat_reverse_charge &&
|
379
392
|
accounting_customer_party == o.accounting_customer_party &&
|
380
393
|
invoice_lines == o.invoice_lines &&
|
381
394
|
accounting_cost_code == o.accounting_cost_code &&
|
@@ -403,7 +416,7 @@ module StorecoveApi
|
|
403
416
|
# Calculates hash code according to all attributes.
|
404
417
|
# @return [Fixnum] Hash code
|
405
418
|
def hash
|
406
|
-
[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
|
419
|
+
[document_currency_code, invoice_number, issue_date, vat_reverse_charge, 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
|
407
420
|
end
|
408
421
|
|
409
422
|
# Builds the object from hash
|
@@ -6,6 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 2.0.1
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
9
10
|
|
10
11
|
=end
|
11
12
|
|
@@ -29,7 +30,10 @@ module StorecoveApi
|
|
29
30
|
# The number of items (may be fractional).
|
30
31
|
attr_accessor :quantity
|
31
32
|
|
32
|
-
# The
|
33
|
+
# The discount or surcharge on this item. Should be negative for discounts
|
34
|
+
attr_accessor :allowance_charge
|
35
|
+
|
36
|
+
# The amount excluding VAT. Should equal quantity x itemPrice + allowanceCharge. A difference of 5 cents or 1% between the calculated value and the provided value is allowed.
|
33
37
|
attr_accessor :amount_excluding_vat
|
34
38
|
|
35
39
|
attr_accessor :tax
|
@@ -39,6 +43,33 @@ module StorecoveApi
|
|
39
43
|
# A URL to an image for the product in the invoice line.
|
40
44
|
attr_accessor :image_url
|
41
45
|
|
46
|
+
# The NZI (Nationale Zorg Instelling) code.
|
47
|
+
attr_accessor :group_nzi_code
|
48
|
+
|
49
|
+
# The description of the NZI code.
|
50
|
+
attr_accessor :group_nzi_description
|
51
|
+
|
52
|
+
# The NZI account number.
|
53
|
+
attr_accessor :group_nzi_account
|
54
|
+
|
55
|
+
# The articlegroup code.
|
56
|
+
attr_accessor :group_articlegroup_code
|
57
|
+
|
58
|
+
# The description of the acticlegroup.
|
59
|
+
attr_accessor :group_articlegroup_description
|
60
|
+
|
61
|
+
# The articlegroup account number.
|
62
|
+
attr_accessor :group_articlegroup_account
|
63
|
+
|
64
|
+
# The code the customer gave this item.
|
65
|
+
attr_accessor :group_customer_code
|
66
|
+
|
67
|
+
# The description for the code the customer gave this item.
|
68
|
+
attr_accessor :group_customer_description
|
69
|
+
|
70
|
+
# The account number the customer assigned to this customer code.
|
71
|
+
attr_accessor :group_customer_account
|
72
|
+
|
42
73
|
|
43
74
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
75
|
def self.attribute_map
|
@@ -48,10 +79,20 @@ module StorecoveApi
|
|
48
79
|
:'invoice_period' => :'invoicePeriod',
|
49
80
|
:'item_price' => :'itemPrice',
|
50
81
|
:'quantity' => :'quantity',
|
82
|
+
:'allowance_charge' => :'allowanceCharge',
|
51
83
|
:'amount_excluding_vat' => :'amountExcludingVat',
|
52
84
|
:'tax' => :'tax',
|
53
85
|
:'accounting_cost_code' => :'accountingCostCode',
|
54
|
-
:'image_url' => :'imageUrl'
|
86
|
+
:'image_url' => :'imageUrl',
|
87
|
+
:'group_nzi_code' => :'groupNziCode',
|
88
|
+
:'group_nzi_description' => :'groupNziDescription',
|
89
|
+
:'group_nzi_account' => :'groupNziAccount',
|
90
|
+
:'group_articlegroup_code' => :'groupArticlegroupCode',
|
91
|
+
:'group_articlegroup_description' => :'groupArticlegroupDescription',
|
92
|
+
:'group_articlegroup_account' => :'groupArticlegroupAccount',
|
93
|
+
:'group_customer_code' => :'groupCustomerCode',
|
94
|
+
:'group_customer_description' => :'groupCustomerDescription',
|
95
|
+
:'group_customer_account' => :'groupCustomerAccount'
|
55
96
|
}
|
56
97
|
end
|
57
98
|
|
@@ -63,10 +104,20 @@ module StorecoveApi
|
|
63
104
|
:'invoice_period' => :'String',
|
64
105
|
:'item_price' => :'Float',
|
65
106
|
:'quantity' => :'Float',
|
107
|
+
:'allowance_charge' => :'Float',
|
66
108
|
:'amount_excluding_vat' => :'Float',
|
67
109
|
:'tax' => :'Tax',
|
68
110
|
:'accounting_cost_code' => :'AccountingCostCode',
|
69
|
-
:'image_url' => :'String'
|
111
|
+
:'image_url' => :'String',
|
112
|
+
:'group_nzi_code' => :'String',
|
113
|
+
:'group_nzi_description' => :'String',
|
114
|
+
:'group_nzi_account' => :'String',
|
115
|
+
:'group_articlegroup_code' => :'String',
|
116
|
+
:'group_articlegroup_description' => :'String',
|
117
|
+
:'group_articlegroup_account' => :'String',
|
118
|
+
:'group_customer_code' => :'String',
|
119
|
+
:'group_customer_description' => :'String',
|
120
|
+
:'group_customer_account' => :'String'
|
70
121
|
}
|
71
122
|
end
|
72
123
|
|
@@ -98,6 +149,10 @@ module StorecoveApi
|
|
98
149
|
self.quantity = attributes[:'quantity']
|
99
150
|
end
|
100
151
|
|
152
|
+
if attributes.has_key?(:'allowanceCharge')
|
153
|
+
self.allowance_charge = attributes[:'allowanceCharge']
|
154
|
+
end
|
155
|
+
|
101
156
|
if attributes.has_key?(:'amountExcludingVat')
|
102
157
|
self.amount_excluding_vat = attributes[:'amountExcludingVat']
|
103
158
|
end
|
@@ -114,10 +169,46 @@ module StorecoveApi
|
|
114
169
|
self.image_url = attributes[:'imageUrl']
|
115
170
|
end
|
116
171
|
|
172
|
+
if attributes.has_key?(:'groupNziCode')
|
173
|
+
self.group_nzi_code = attributes[:'groupNziCode']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'groupNziDescription')
|
177
|
+
self.group_nzi_description = attributes[:'groupNziDescription']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'groupNziAccount')
|
181
|
+
self.group_nzi_account = attributes[:'groupNziAccount']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.has_key?(:'groupArticlegroupCode')
|
185
|
+
self.group_articlegroup_code = attributes[:'groupArticlegroupCode']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.has_key?(:'groupArticlegroupDescription')
|
189
|
+
self.group_articlegroup_description = attributes[:'groupArticlegroupDescription']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'groupArticlegroupAccount')
|
193
|
+
self.group_articlegroup_account = attributes[:'groupArticlegroupAccount']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.has_key?(:'groupCustomerCode')
|
197
|
+
self.group_customer_code = attributes[:'groupCustomerCode']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.has_key?(:'groupCustomerDescription')
|
201
|
+
self.group_customer_description = attributes[:'groupCustomerDescription']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.has_key?(:'groupCustomerAccount')
|
205
|
+
self.group_customer_account = attributes[:'groupCustomerAccount']
|
206
|
+
end
|
207
|
+
|
117
208
|
end
|
118
209
|
|
119
210
|
# Show invalid properties with the reasons. Usually used together with valid?
|
120
|
-
# @return Array for valid
|
211
|
+
# @return Array for valid properties with the reasons
|
121
212
|
def list_invalid_properties
|
122
213
|
invalid_properties = Array.new
|
123
214
|
if !@id.nil? && @id.to_s.length < 1
|
@@ -140,6 +231,42 @@ module StorecoveApi
|
|
140
231
|
invalid_properties.push("invalid value for 'amount_excluding_vat', amount_excluding_vat cannot be nil.")
|
141
232
|
end
|
142
233
|
|
234
|
+
if !@group_nzi_code.nil? && @group_nzi_code.to_s.length < 1
|
235
|
+
invalid_properties.push("invalid value for 'group_nzi_code', the character length must be great than or equal to 1.")
|
236
|
+
end
|
237
|
+
|
238
|
+
if !@group_nzi_description.nil? && @group_nzi_description.to_s.length < 1
|
239
|
+
invalid_properties.push("invalid value for 'group_nzi_description', the character length must be great than or equal to 1.")
|
240
|
+
end
|
241
|
+
|
242
|
+
if !@group_nzi_account.nil? && @group_nzi_account.to_s.length < 1
|
243
|
+
invalid_properties.push("invalid value for 'group_nzi_account', the character length must be great than or equal to 1.")
|
244
|
+
end
|
245
|
+
|
246
|
+
if !@group_articlegroup_code.nil? && @group_articlegroup_code.to_s.length < 1
|
247
|
+
invalid_properties.push("invalid value for 'group_articlegroup_code', the character length must be great than or equal to 1.")
|
248
|
+
end
|
249
|
+
|
250
|
+
if !@group_articlegroup_description.nil? && @group_articlegroup_description.to_s.length < 1
|
251
|
+
invalid_properties.push("invalid value for 'group_articlegroup_description', the character length must be great than or equal to 1.")
|
252
|
+
end
|
253
|
+
|
254
|
+
if !@group_articlegroup_account.nil? && @group_articlegroup_account.to_s.length < 1
|
255
|
+
invalid_properties.push("invalid value for 'group_articlegroup_account', the character length must be great than or equal to 1.")
|
256
|
+
end
|
257
|
+
|
258
|
+
if !@group_customer_code.nil? && @group_customer_code.to_s.length < 1
|
259
|
+
invalid_properties.push("invalid value for 'group_customer_code', the character length must be great than or equal to 1.")
|
260
|
+
end
|
261
|
+
|
262
|
+
if !@group_customer_description.nil? && @group_customer_description.to_s.length < 1
|
263
|
+
invalid_properties.push("invalid value for 'group_customer_description', the character length must be great than or equal to 1.")
|
264
|
+
end
|
265
|
+
|
266
|
+
if !@group_customer_account.nil? && @group_customer_account.to_s.length < 1
|
267
|
+
invalid_properties.push("invalid value for 'group_customer_account', the character length must be great than or equal to 1.")
|
268
|
+
end
|
269
|
+
|
143
270
|
return invalid_properties
|
144
271
|
end
|
145
272
|
|
@@ -151,6 +278,15 @@ module StorecoveApi
|
|
151
278
|
return false if @description.to_s.length < 1
|
152
279
|
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}$/)
|
153
280
|
return false if @amount_excluding_vat.nil?
|
281
|
+
return false if !@group_nzi_code.nil? && @group_nzi_code.to_s.length < 1
|
282
|
+
return false if !@group_nzi_description.nil? && @group_nzi_description.to_s.length < 1
|
283
|
+
return false if !@group_nzi_account.nil? && @group_nzi_account.to_s.length < 1
|
284
|
+
return false if !@group_articlegroup_code.nil? && @group_articlegroup_code.to_s.length < 1
|
285
|
+
return false if !@group_articlegroup_description.nil? && @group_articlegroup_description.to_s.length < 1
|
286
|
+
return false if !@group_articlegroup_account.nil? && @group_articlegroup_account.to_s.length < 1
|
287
|
+
return false if !@group_customer_code.nil? && @group_customer_code.to_s.length < 1
|
288
|
+
return false if !@group_customer_description.nil? && @group_customer_description.to_s.length < 1
|
289
|
+
return false if !@group_customer_account.nil? && @group_customer_account.to_s.length < 1
|
154
290
|
return true
|
155
291
|
end
|
156
292
|
|
@@ -190,6 +326,105 @@ module StorecoveApi
|
|
190
326
|
@invoice_period = invoice_period
|
191
327
|
end
|
192
328
|
|
329
|
+
# Custom attribute writer method with validation
|
330
|
+
# @param [Object] group_nzi_code Value to be assigned
|
331
|
+
def group_nzi_code=(group_nzi_code)
|
332
|
+
|
333
|
+
if !group_nzi_code.nil? && group_nzi_code.to_s.length < 1
|
334
|
+
fail ArgumentError, "invalid value for 'group_nzi_code', the character length must be great than or equal to 1."
|
335
|
+
end
|
336
|
+
|
337
|
+
@group_nzi_code = group_nzi_code
|
338
|
+
end
|
339
|
+
|
340
|
+
# Custom attribute writer method with validation
|
341
|
+
# @param [Object] group_nzi_description Value to be assigned
|
342
|
+
def group_nzi_description=(group_nzi_description)
|
343
|
+
|
344
|
+
if !group_nzi_description.nil? && group_nzi_description.to_s.length < 1
|
345
|
+
fail ArgumentError, "invalid value for 'group_nzi_description', the character length must be great than or equal to 1."
|
346
|
+
end
|
347
|
+
|
348
|
+
@group_nzi_description = group_nzi_description
|
349
|
+
end
|
350
|
+
|
351
|
+
# Custom attribute writer method with validation
|
352
|
+
# @param [Object] group_nzi_account Value to be assigned
|
353
|
+
def group_nzi_account=(group_nzi_account)
|
354
|
+
|
355
|
+
if !group_nzi_account.nil? && group_nzi_account.to_s.length < 1
|
356
|
+
fail ArgumentError, "invalid value for 'group_nzi_account', the character length must be great than or equal to 1."
|
357
|
+
end
|
358
|
+
|
359
|
+
@group_nzi_account = group_nzi_account
|
360
|
+
end
|
361
|
+
|
362
|
+
# Custom attribute writer method with validation
|
363
|
+
# @param [Object] group_articlegroup_code Value to be assigned
|
364
|
+
def group_articlegroup_code=(group_articlegroup_code)
|
365
|
+
|
366
|
+
if !group_articlegroup_code.nil? && group_articlegroup_code.to_s.length < 1
|
367
|
+
fail ArgumentError, "invalid value for 'group_articlegroup_code', the character length must be great than or equal to 1."
|
368
|
+
end
|
369
|
+
|
370
|
+
@group_articlegroup_code = group_articlegroup_code
|
371
|
+
end
|
372
|
+
|
373
|
+
# Custom attribute writer method with validation
|
374
|
+
# @param [Object] group_articlegroup_description Value to be assigned
|
375
|
+
def group_articlegroup_description=(group_articlegroup_description)
|
376
|
+
|
377
|
+
if !group_articlegroup_description.nil? && group_articlegroup_description.to_s.length < 1
|
378
|
+
fail ArgumentError, "invalid value for 'group_articlegroup_description', the character length must be great than or equal to 1."
|
379
|
+
end
|
380
|
+
|
381
|
+
@group_articlegroup_description = group_articlegroup_description
|
382
|
+
end
|
383
|
+
|
384
|
+
# Custom attribute writer method with validation
|
385
|
+
# @param [Object] group_articlegroup_account Value to be assigned
|
386
|
+
def group_articlegroup_account=(group_articlegroup_account)
|
387
|
+
|
388
|
+
if !group_articlegroup_account.nil? && group_articlegroup_account.to_s.length < 1
|
389
|
+
fail ArgumentError, "invalid value for 'group_articlegroup_account', the character length must be great than or equal to 1."
|
390
|
+
end
|
391
|
+
|
392
|
+
@group_articlegroup_account = group_articlegroup_account
|
393
|
+
end
|
394
|
+
|
395
|
+
# Custom attribute writer method with validation
|
396
|
+
# @param [Object] group_customer_code Value to be assigned
|
397
|
+
def group_customer_code=(group_customer_code)
|
398
|
+
|
399
|
+
if !group_customer_code.nil? && group_customer_code.to_s.length < 1
|
400
|
+
fail ArgumentError, "invalid value for 'group_customer_code', the character length must be great than or equal to 1."
|
401
|
+
end
|
402
|
+
|
403
|
+
@group_customer_code = group_customer_code
|
404
|
+
end
|
405
|
+
|
406
|
+
# Custom attribute writer method with validation
|
407
|
+
# @param [Object] group_customer_description Value to be assigned
|
408
|
+
def group_customer_description=(group_customer_description)
|
409
|
+
|
410
|
+
if !group_customer_description.nil? && group_customer_description.to_s.length < 1
|
411
|
+
fail ArgumentError, "invalid value for 'group_customer_description', the character length must be great than or equal to 1."
|
412
|
+
end
|
413
|
+
|
414
|
+
@group_customer_description = group_customer_description
|
415
|
+
end
|
416
|
+
|
417
|
+
# Custom attribute writer method with validation
|
418
|
+
# @param [Object] group_customer_account Value to be assigned
|
419
|
+
def group_customer_account=(group_customer_account)
|
420
|
+
|
421
|
+
if !group_customer_account.nil? && group_customer_account.to_s.length < 1
|
422
|
+
fail ArgumentError, "invalid value for 'group_customer_account', the character length must be great than or equal to 1."
|
423
|
+
end
|
424
|
+
|
425
|
+
@group_customer_account = group_customer_account
|
426
|
+
end
|
427
|
+
|
193
428
|
# Checks equality by comparing each attribute.
|
194
429
|
# @param [Object] Object to be compared
|
195
430
|
def ==(o)
|
@@ -200,10 +435,20 @@ module StorecoveApi
|
|
200
435
|
invoice_period == o.invoice_period &&
|
201
436
|
item_price == o.item_price &&
|
202
437
|
quantity == o.quantity &&
|
438
|
+
allowance_charge == o.allowance_charge &&
|
203
439
|
amount_excluding_vat == o.amount_excluding_vat &&
|
204
440
|
tax == o.tax &&
|
205
441
|
accounting_cost_code == o.accounting_cost_code &&
|
206
|
-
image_url == o.image_url
|
442
|
+
image_url == o.image_url &&
|
443
|
+
group_nzi_code == o.group_nzi_code &&
|
444
|
+
group_nzi_description == o.group_nzi_description &&
|
445
|
+
group_nzi_account == o.group_nzi_account &&
|
446
|
+
group_articlegroup_code == o.group_articlegroup_code &&
|
447
|
+
group_articlegroup_description == o.group_articlegroup_description &&
|
448
|
+
group_articlegroup_account == o.group_articlegroup_account &&
|
449
|
+
group_customer_code == o.group_customer_code &&
|
450
|
+
group_customer_description == o.group_customer_description &&
|
451
|
+
group_customer_account == o.group_customer_account
|
207
452
|
end
|
208
453
|
|
209
454
|
# @see the `==` method
|
@@ -215,7 +460,7 @@ module StorecoveApi
|
|
215
460
|
# Calculates hash code according to all attributes.
|
216
461
|
# @return [Fixnum] Hash code
|
217
462
|
def hash
|
218
|
-
[id, description, invoice_period, item_price, quantity, amount_excluding_vat, tax, accounting_cost_code, image_url].hash
|
463
|
+
[id, description, invoice_period, item_price, quantity, allowance_charge, amount_excluding_vat, tax, accounting_cost_code, image_url, group_nzi_code, group_nzi_description, group_nzi_account, group_articlegroup_code, group_articlegroup_description, group_articlegroup_account, group_customer_code, group_customer_description, group_customer_account].hash
|
219
464
|
end
|
220
465
|
|
221
466
|
# Builds the object from hash
|