storecove 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/storecove/api/invoice_submissions_api.rb +8 -28
- data/lib/storecove/api/shop_account_requests_api.rb +10 -42
- data/lib/storecove/api/shop_accounts_api.rb +45 -81
- data/lib/storecove/api/shops_api.rb +4 -20
- data/lib/storecove/api_client.rb +16 -19
- data/lib/storecove/api_error.rb +7 -17
- data/lib/storecove/configuration.rb +0 -12
- data/lib/storecove/models/accounting_cost_code.rb +3 -19
- data/lib/storecove/models/accounting_customer_party.rb +7 -15
- data/lib/storecove/models/{party_address.rb → address.rb} +8 -19
- data/lib/storecove/models/{party_contact.rb → contact.rb} +8 -16
- data/lib/storecove/models/country.rb +0 -12
- data/lib/storecove/models/currency_code.rb +0 -12
- data/lib/storecove/models/error_model.rb +3 -15
- data/lib/storecove/models/{invoice_submission_invoice.rb → invoice.rb} +55 -41
- data/lib/storecove/models/invoice_line.rb +12 -22
- data/lib/storecove/models/invoice_recipient.rb +18 -21
- data/lib/storecove/models/invoice_recipient_preflight.rb +11 -15
- data/lib/storecove/models/invoice_submission.rb +15 -16
- data/lib/storecove/models/invoice_submission_result.rb +11 -23
- data/lib/storecove/models/legal_entity.rb +3 -15
- data/lib/storecove/models/legal_entity_identifier.rb +3 -15
- data/lib/storecove/models/logos.rb +3 -15
- data/lib/storecove/models/party.rb +5 -17
- data/lib/storecove/models/preflight_invoice_recipient_result.rb +3 -15
- data/lib/storecove/models/{public_identifiers_inner.rb → public_identifier.rb} +4 -16
- data/lib/storecove/models/public_identifiers.rb +3 -15
- data/lib/storecove/models/shop.rb +3 -15
- data/lib/storecove/models/shop_account_input.rb +19 -15
- data/lib/storecove/models/shop_account_request.rb +7 -15
- data/lib/storecove/models/shop_account_request_input.rb +3 -15
- data/lib/storecove/models/shop_account_request_update.rb +3 -15
- data/lib/storecove/models/{shop_account.rb → shop_account_result.rb} +4 -16
- data/lib/storecove/models/shop_account_update.rb +3 -15
- data/lib/storecove/models/{invoice_line_tax.rb → tax.rb} +16 -16
- data/lib/storecove/version.rb +1 -13
- data/lib/storecove.rb +6 -18
- data/spec/api/invoice_submissions_api_spec.rb +70 -0
- data/spec/api/shop_account_requests_api_spec.rb +107 -0
- data/spec/api/shop_accounts_api_spec.rb +118 -0
- data/spec/api/shops_api_spec.rb +57 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +53 -0
- data/spec/models/accounting_cost_code_spec.rb +71 -0
- data/spec/models/accounting_customer_party_spec.rb +59 -0
- data/spec/models/country_spec.rb +47 -0
- data/spec/models/currency_code_spec.rb +47 -0
- data/spec/models/error_model_spec.rb +59 -0
- data/spec/models/invoice_line_spec.rb +95 -0
- data/spec/models/invoice_line_tax_spec.rb +65 -0
- data/spec/models/invoice_recipient_preflight_spec.rb +59 -0
- data/spec/models/invoice_recipient_spec.rb +59 -0
- data/spec/models/invoice_submission_invoice_spec.rb +159 -0
- data/spec/models/invoice_submission_result_spec.rb +53 -0
- data/spec/models/invoice_submission_spec.rb +99 -0
- data/spec/models/legal_entity_identifier_spec.rb +65 -0
- data/spec/models/legal_entity_spec.rb +95 -0
- data/spec/models/logos_spec.rb +65 -0
- data/spec/models/party_address_spec.rb +101 -0
- data/spec/models/party_contact_spec.rb +65 -0
- data/spec/models/party_spec.rb +65 -0
- data/spec/models/preflight_invoice_recipient_result_spec.rb +57 -0
- data/spec/models/public_identifier_spec.rb +59 -0
- data/spec/models/public_identifiers_spec.rb +47 -0
- data/spec/models/shop_account_input_spec.rb +77 -0
- data/spec/models/shop_account_request_input_spec.rb +77 -0
- data/spec/models/shop_account_request_spec.rb +77 -0
- data/spec/models/shop_account_request_update_spec.rb +71 -0
- data/spec/models/shop_account_result_spec.rb +95 -0
- data/spec/models/shop_account_update_spec.rb +65 -0
- data/spec/models/shop_spec.rb +77 -0
- data/spec/spec_helper.rb +122 -0
- metadata +79 -10
- data/lib/storecove/models/swagger-codegen +0 -2799
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -130,7 +118,7 @@ module StorecoveApi
|
|
130
118
|
def build_from_hash(attributes)
|
131
119
|
return nil unless attributes.is_a?(Hash)
|
132
120
|
self.class.swagger_types.each_pair do |key, type|
|
133
|
-
if type =~
|
121
|
+
if type =~ /\AArray<(.*)>/i
|
134
122
|
# check to ensure the input is an array given that the the attribute
|
135
123
|
# is documented as an array but the input is not
|
136
124
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -161,7 +149,7 @@ module StorecoveApi
|
|
161
149
|
when :Float
|
162
150
|
value.to_f
|
163
151
|
when :BOOLEAN
|
164
|
-
if value.to_s =~
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
153
|
true
|
166
154
|
else
|
167
155
|
false
|
@@ -172,7 +160,7 @@ module StorecoveApi
|
|
172
160
|
when /\AArray<(?<inner_type>.+)>\z/
|
173
161
|
inner_type = Regexp.last_match[:inner_type]
|
174
162
|
value.map { |v| _deserialize(inner_type, v) }
|
175
|
-
when /\AHash<(?<k_type
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
164
|
k_type = Regexp.last_match[:k_type]
|
177
165
|
v_type = Regexp.last_match[:v_type]
|
178
166
|
{}.tap do |hash|
|
@@ -7,25 +7,13 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
25
13
|
|
26
14
|
module StorecoveApi
|
27
15
|
# A public identifier for this customer.
|
28
|
-
class
|
16
|
+
class PublicIdentifier
|
29
17
|
# The scheme of the public identifier, e.g. chambre of commerce number (for The Netherlands: NL:KVK), VAT, IBAN, or NL:OIN (OIN is a Dutch government organizaton id). The full list can be found on https://joinup.ec.europa.eu/svn/peppol/TransportInfrastructure/PEPPOL_Policy%20for%20use%20of%20identifiers-300.pdf.
|
30
18
|
attr_accessor :scheme
|
31
19
|
|
@@ -155,7 +143,7 @@ module StorecoveApi
|
|
155
143
|
def build_from_hash(attributes)
|
156
144
|
return nil unless attributes.is_a?(Hash)
|
157
145
|
self.class.swagger_types.each_pair do |key, type|
|
158
|
-
if type =~
|
146
|
+
if type =~ /\AArray<(.*)>/i
|
159
147
|
# check to ensure the input is an array given that the the attribute
|
160
148
|
# is documented as an array but the input is not
|
161
149
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -186,7 +174,7 @@ module StorecoveApi
|
|
186
174
|
when :Float
|
187
175
|
value.to_f
|
188
176
|
when :BOOLEAN
|
189
|
-
if value.to_s =~
|
177
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
190
178
|
true
|
191
179
|
else
|
192
180
|
false
|
@@ -197,7 +185,7 @@ module StorecoveApi
|
|
197
185
|
when /\AArray<(?<inner_type>.+)>\z/
|
198
186
|
inner_type = Regexp.last_match[:inner_type]
|
199
187
|
value.map { |v| _deserialize(inner_type, v) }
|
200
|
-
when /\AHash<(?<k_type
|
188
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
201
189
|
k_type = Regexp.last_match[:k_type]
|
202
190
|
v_type = Regexp.last_match[:v_type]
|
203
191
|
{}.tap do |hash|
|
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -87,7 +75,7 @@ module StorecoveApi
|
|
87
75
|
def build_from_hash(attributes)
|
88
76
|
return nil unless attributes.is_a?(Hash)
|
89
77
|
self.class.swagger_types.each_pair do |key, type|
|
90
|
-
if type =~
|
78
|
+
if type =~ /\AArray<(.*)>/i
|
91
79
|
# check to ensure the input is an array given that the the attribute
|
92
80
|
# is documented as an array but the input is not
|
93
81
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -118,7 +106,7 @@ module StorecoveApi
|
|
118
106
|
when :Float
|
119
107
|
value.to_f
|
120
108
|
when :BOOLEAN
|
121
|
-
if value.to_s =~
|
109
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
122
110
|
true
|
123
111
|
else
|
124
112
|
false
|
@@ -129,7 +117,7 @@ module StorecoveApi
|
|
129
117
|
when /\AArray<(?<inner_type>.+)>\z/
|
130
118
|
inner_type = Regexp.last_match[:inner_type]
|
131
119
|
value.map { |v| _deserialize(inner_type, v) }
|
132
|
-
when /\AHash<(?<k_type
|
120
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
133
121
|
k_type = Regexp.last_match[:k_type]
|
134
122
|
v_type = Regexp.last_match[:v_type]
|
135
123
|
{}.tap do |hash|
|
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -134,7 +122,7 @@ module StorecoveApi
|
|
134
122
|
def build_from_hash(attributes)
|
135
123
|
return nil unless attributes.is_a?(Hash)
|
136
124
|
self.class.swagger_types.each_pair do |key, type|
|
137
|
-
if type =~
|
125
|
+
if type =~ /\AArray<(.*)>/i
|
138
126
|
# check to ensure the input is an array given that the the attribute
|
139
127
|
# is documented as an array but the input is not
|
140
128
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -165,7 +153,7 @@ module StorecoveApi
|
|
165
153
|
when :Float
|
166
154
|
value.to_f
|
167
155
|
when :BOOLEAN
|
168
|
-
if value.to_s =~
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
157
|
true
|
170
158
|
else
|
171
159
|
false
|
@@ -176,7 +164,7 @@ module StorecoveApi
|
|
176
164
|
when /\AArray<(?<inner_type>.+)>\z/
|
177
165
|
inner_type = Regexp.last_match[:inner_type]
|
178
166
|
value.map { |v| _deserialize(inner_type, v) }
|
179
|
-
when /\AHash<(?<k_type
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
168
|
k_type = Regexp.last_match[:k_type]
|
181
169
|
v_type = Regexp.last_match[:v_type]
|
182
170
|
{}.tap do |hash|
|
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -98,6 +86,22 @@ module StorecoveApi
|
|
98
86
|
# @return Array for valid properies with the reasons
|
99
87
|
def list_invalid_properties
|
100
88
|
invalid_properties = Array.new
|
89
|
+
if @username.nil?
|
90
|
+
invalid_properties.push("invalid value for 'username', username cannot be nil.")
|
91
|
+
end
|
92
|
+
|
93
|
+
if @password.nil?
|
94
|
+
invalid_properties.push("invalid value for 'password', password cannot be nil.")
|
95
|
+
end
|
96
|
+
|
97
|
+
if @external_user_id.nil?
|
98
|
+
invalid_properties.push("invalid value for 'external_user_id', external_user_id cannot be nil.")
|
99
|
+
end
|
100
|
+
|
101
|
+
if @shop_id.nil?
|
102
|
+
invalid_properties.push("invalid value for 'shop_id', shop_id cannot be nil.")
|
103
|
+
end
|
104
|
+
|
101
105
|
return invalid_properties
|
102
106
|
end
|
103
107
|
|
@@ -141,7 +145,7 @@ module StorecoveApi
|
|
141
145
|
def build_from_hash(attributes)
|
142
146
|
return nil unless attributes.is_a?(Hash)
|
143
147
|
self.class.swagger_types.each_pair do |key, type|
|
144
|
-
if type =~
|
148
|
+
if type =~ /\AArray<(.*)>/i
|
145
149
|
# check to ensure the input is an array given that the the attribute
|
146
150
|
# is documented as an array but the input is not
|
147
151
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -172,7 +176,7 @@ module StorecoveApi
|
|
172
176
|
when :Float
|
173
177
|
value.to_f
|
174
178
|
when :BOOLEAN
|
175
|
-
if value.to_s =~
|
179
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
176
180
|
true
|
177
181
|
else
|
178
182
|
false
|
@@ -183,7 +187,7 @@ module StorecoveApi
|
|
183
187
|
when /\AArray<(?<inner_type>.+)>\z/
|
184
188
|
inner_type = Regexp.last_match[:inner_type]
|
185
189
|
value.map { |v| _deserialize(inner_type, v) }
|
186
|
-
when /\AHash<(?<k_type
|
190
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
187
191
|
k_type = Regexp.last_match[:k_type]
|
188
192
|
v_type = Regexp.last_match[:v_type]
|
189
193
|
{}.tap do |hash|
|
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -93,6 +81,10 @@ module StorecoveApi
|
|
93
81
|
# @return Array for valid properies with the reasons
|
94
82
|
def list_invalid_properties
|
95
83
|
invalid_properties = Array.new
|
84
|
+
if @id.nil?
|
85
|
+
invalid_properties.push("invalid value for 'id', id cannot be nil.")
|
86
|
+
end
|
87
|
+
|
96
88
|
return invalid_properties
|
97
89
|
end
|
98
90
|
|
@@ -133,7 +125,7 @@ module StorecoveApi
|
|
133
125
|
def build_from_hash(attributes)
|
134
126
|
return nil unless attributes.is_a?(Hash)
|
135
127
|
self.class.swagger_types.each_pair do |key, type|
|
136
|
-
if type =~
|
128
|
+
if type =~ /\AArray<(.*)>/i
|
137
129
|
# check to ensure the input is an array given that the the attribute
|
138
130
|
# is documented as an array but the input is not
|
139
131
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -164,7 +156,7 @@ module StorecoveApi
|
|
164
156
|
when :Float
|
165
157
|
value.to_f
|
166
158
|
when :BOOLEAN
|
167
|
-
if value.to_s =~
|
159
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
168
160
|
true
|
169
161
|
else
|
170
162
|
false
|
@@ -175,7 +167,7 @@ module StorecoveApi
|
|
175
167
|
when /\AArray<(?<inner_type>.+)>\z/
|
176
168
|
inner_type = Regexp.last_match[:inner_type]
|
177
169
|
value.map { |v| _deserialize(inner_type, v) }
|
178
|
-
when /\AHash<(?<k_type
|
170
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
179
171
|
k_type = Regexp.last_match[:k_type]
|
180
172
|
v_type = Regexp.last_match[:v_type]
|
181
173
|
{}.tap do |hash|
|
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -132,7 +120,7 @@ module StorecoveApi
|
|
132
120
|
def build_from_hash(attributes)
|
133
121
|
return nil unless attributes.is_a?(Hash)
|
134
122
|
self.class.swagger_types.each_pair do |key, type|
|
135
|
-
if type =~
|
123
|
+
if type =~ /\AArray<(.*)>/i
|
136
124
|
# check to ensure the input is an array given that the the attribute
|
137
125
|
# is documented as an array but the input is not
|
138
126
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -163,7 +151,7 @@ module StorecoveApi
|
|
163
151
|
when :Float
|
164
152
|
value.to_f
|
165
153
|
when :BOOLEAN
|
166
|
-
if value.to_s =~
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
167
155
|
true
|
168
156
|
else
|
169
157
|
false
|
@@ -174,7 +162,7 @@ module StorecoveApi
|
|
174
162
|
when /\AArray<(?<inner_type>.+)>\z/
|
175
163
|
inner_type = Regexp.last_match[:inner_type]
|
176
164
|
value.map { |v| _deserialize(inner_type, v) }
|
177
|
-
when /\AHash<(?<k_type
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
178
166
|
k_type = Regexp.last_match[:k_type]
|
179
167
|
v_type = Regexp.last_match[:v_type]
|
180
168
|
{}.tap do |hash|
|
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -123,7 +111,7 @@ module StorecoveApi
|
|
123
111
|
def build_from_hash(attributes)
|
124
112
|
return nil unless attributes.is_a?(Hash)
|
125
113
|
self.class.swagger_types.each_pair do |key, type|
|
126
|
-
if type =~
|
114
|
+
if type =~ /\AArray<(.*)>/i
|
127
115
|
# check to ensure the input is an array given that the the attribute
|
128
116
|
# is documented as an array but the input is not
|
129
117
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -154,7 +142,7 @@ module StorecoveApi
|
|
154
142
|
when :Float
|
155
143
|
value.to_f
|
156
144
|
when :BOOLEAN
|
157
|
-
if value.to_s =~
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
146
|
true
|
159
147
|
else
|
160
148
|
false
|
@@ -165,7 +153,7 @@ module StorecoveApi
|
|
165
153
|
when /\AArray<(?<inner_type>.+)>\z/
|
166
154
|
inner_type = Regexp.last_match[:inner_type]
|
167
155
|
value.map { |v| _deserialize(inner_type, v) }
|
168
|
-
when /\AHash<(?<k_type
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
157
|
k_type = Regexp.last_match[:k_type]
|
170
158
|
v_type = Regexp.last_match[:v_type]
|
171
159
|
{}.tap do |hash|
|
@@ -7,25 +7,13 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
25
13
|
|
26
14
|
module StorecoveApi
|
27
15
|
|
28
|
-
class
|
16
|
+
class ShopAccountResult
|
29
17
|
# The Storecove id for the ShopAccount
|
30
18
|
attr_accessor :id
|
31
19
|
|
@@ -167,7 +155,7 @@ module StorecoveApi
|
|
167
155
|
def build_from_hash(attributes)
|
168
156
|
return nil unless attributes.is_a?(Hash)
|
169
157
|
self.class.swagger_types.each_pair do |key, type|
|
170
|
-
if type =~
|
158
|
+
if type =~ /\AArray<(.*)>/i
|
171
159
|
# check to ensure the input is an array given that the the attribute
|
172
160
|
# is documented as an array but the input is not
|
173
161
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -198,7 +186,7 @@ module StorecoveApi
|
|
198
186
|
when :Float
|
199
187
|
value.to_f
|
200
188
|
when :BOOLEAN
|
201
|
-
if value.to_s =~
|
189
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
202
190
|
true
|
203
191
|
else
|
204
192
|
false
|
@@ -209,7 +197,7 @@ module StorecoveApi
|
|
209
197
|
when /\AArray<(?<inner_type>.+)>\z/
|
210
198
|
inner_type = Regexp.last_match[:inner_type]
|
211
199
|
value.map { |v| _deserialize(inner_type, v) }
|
212
|
-
when /\AHash<(?<k_type
|
200
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
213
201
|
k_type = Regexp.last_match[:k_type]
|
214
202
|
v_type = Regexp.last_match[:v_type]
|
215
203
|
{}.tap do |hash|
|
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
@@ -117,7 +105,7 @@ module StorecoveApi
|
|
117
105
|
def build_from_hash(attributes)
|
118
106
|
return nil unless attributes.is_a?(Hash)
|
119
107
|
self.class.swagger_types.each_pair do |key, type|
|
120
|
-
if type =~
|
108
|
+
if type =~ /\AArray<(.*)>/i
|
121
109
|
# check to ensure the input is an array given that the the attribute
|
122
110
|
# is documented as an array but the input is not
|
123
111
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -148,7 +136,7 @@ module StorecoveApi
|
|
148
136
|
when :Float
|
149
137
|
value.to_f
|
150
138
|
when :BOOLEAN
|
151
|
-
if value.to_s =~
|
139
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
152
140
|
true
|
153
141
|
else
|
154
142
|
false
|
@@ -159,7 +147,7 @@ module StorecoveApi
|
|
159
147
|
when /\AArray<(?<inner_type>.+)>\z/
|
160
148
|
inner_type = Regexp.last_match[:inner_type]
|
161
149
|
value.map { |v| _deserialize(inner_type, v) }
|
162
|
-
when /\AHash<(?<k_type
|
150
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
163
151
|
k_type = Regexp.last_match[:k_type]
|
164
152
|
v_type = Regexp.last_match[:v_type]
|
165
153
|
{}.tap do |hash|
|
@@ -7,25 +7,13 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
require 'date'
|
25
13
|
|
26
14
|
module StorecoveApi
|
27
15
|
# The tax for this invoice line.
|
28
|
-
class
|
16
|
+
class Tax
|
29
17
|
# The amount of VAT. Should equal percentage x amountExcludingVat. A difference of 5 cents or 1% between the calculated value and the provided value is allowed.
|
30
18
|
attr_accessor :amount
|
31
19
|
|
@@ -79,6 +67,18 @@ module StorecoveApi
|
|
79
67
|
# @return Array for valid properies with the reasons
|
80
68
|
def list_invalid_properties
|
81
69
|
invalid_properties = Array.new
|
70
|
+
if @amount.nil?
|
71
|
+
invalid_properties.push("invalid value for 'amount', amount cannot be nil.")
|
72
|
+
end
|
73
|
+
|
74
|
+
if @percentage.nil?
|
75
|
+
invalid_properties.push("invalid value for 'percentage', percentage cannot be nil.")
|
76
|
+
end
|
77
|
+
|
78
|
+
if @country.nil?
|
79
|
+
invalid_properties.push("invalid value for 'country', country cannot be nil.")
|
80
|
+
end
|
81
|
+
|
82
82
|
return invalid_properties
|
83
83
|
end
|
84
84
|
|
@@ -119,7 +119,7 @@ module StorecoveApi
|
|
119
119
|
def build_from_hash(attributes)
|
120
120
|
return nil unless attributes.is_a?(Hash)
|
121
121
|
self.class.swagger_types.each_pair do |key, type|
|
122
|
-
if type =~
|
122
|
+
if type =~ /\AArray<(.*)>/i
|
123
123
|
# check to ensure the input is an array given that the the attribute
|
124
124
|
# is documented as an array but the input is not
|
125
125
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -150,7 +150,7 @@ module StorecoveApi
|
|
150
150
|
when :Float
|
151
151
|
value.to_f
|
152
152
|
when :BOOLEAN
|
153
|
-
if value.to_s =~
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
154
|
true
|
155
155
|
else
|
156
156
|
false
|
@@ -161,7 +161,7 @@ module StorecoveApi
|
|
161
161
|
when /\AArray<(?<inner_type>.+)>\z/
|
162
162
|
inner_type = Regexp.last_match[:inner_type]
|
163
163
|
value.map { |v| _deserialize(inner_type, v) }
|
164
|
-
when /\AHash<(?<k_type
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
165
|
k_type = Regexp.last_match[:k_type]
|
166
166
|
v_type = Regexp.last_match[:v_type]
|
167
167
|
{}.tap do |hash|
|
data/lib/storecove/version.rb
CHANGED
@@ -7,20 +7,8 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
module StorecoveApi
|
25
|
-
VERSION = "1.0.
|
13
|
+
VERSION = "1.0.4"
|
26
14
|
end
|
data/lib/storecove.rb
CHANGED
@@ -7,18 +7,6 @@ OpenAPI spec version: 2.0.0
|
|
7
7
|
Contact: apisupport@storecove.nl
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
you may not use this file except in compliance with the License.
|
12
|
-
You may obtain a copy of the License at
|
13
|
-
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
See the License for the specific language governing permissions and
|
20
|
-
limitations under the License.
|
21
|
-
|
22
10
|
=end
|
23
11
|
|
24
12
|
# Common files
|
@@ -30,32 +18,32 @@ require 'storecove/configuration'
|
|
30
18
|
# Models
|
31
19
|
require 'storecove/models/accounting_cost_code'
|
32
20
|
require 'storecove/models/accounting_customer_party'
|
21
|
+
require 'storecove/models/address'
|
22
|
+
require 'storecove/models/contact'
|
33
23
|
require 'storecove/models/country'
|
34
24
|
require 'storecove/models/currency_code'
|
35
25
|
require 'storecove/models/error_model'
|
26
|
+
require 'storecove/models/invoice'
|
36
27
|
require 'storecove/models/invoice_line'
|
37
|
-
require 'storecove/models/invoice_line_tax'
|
38
28
|
require 'storecove/models/invoice_recipient'
|
39
29
|
require 'storecove/models/invoice_recipient_preflight'
|
40
30
|
require 'storecove/models/invoice_submission'
|
41
|
-
require 'storecove/models/invoice_submission_invoice'
|
42
31
|
require 'storecove/models/invoice_submission_result'
|
43
32
|
require 'storecove/models/legal_entity'
|
44
33
|
require 'storecove/models/legal_entity_identifier'
|
45
34
|
require 'storecove/models/logos'
|
46
35
|
require 'storecove/models/party'
|
47
|
-
require 'storecove/models/party_address'
|
48
|
-
require 'storecove/models/party_contact'
|
49
36
|
require 'storecove/models/preflight_invoice_recipient_result'
|
37
|
+
require 'storecove/models/public_identifier'
|
50
38
|
require 'storecove/models/public_identifiers'
|
51
|
-
require 'storecove/models/public_identifiers_inner'
|
52
39
|
require 'storecove/models/shop'
|
53
|
-
require 'storecove/models/shop_account'
|
54
40
|
require 'storecove/models/shop_account_input'
|
55
41
|
require 'storecove/models/shop_account_request'
|
56
42
|
require 'storecove/models/shop_account_request_input'
|
57
43
|
require 'storecove/models/shop_account_request_update'
|
44
|
+
require 'storecove/models/shop_account_result'
|
58
45
|
require 'storecove/models/shop_account_update'
|
46
|
+
require 'storecove/models/tax'
|
59
47
|
|
60
48
|
# APIs
|
61
49
|
require 'storecove/api/invoice_submissions_api'
|