storecove 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/storecove/api/invoice_submissions_api.rb +8 -28
  3. data/lib/storecove/api/shop_account_requests_api.rb +10 -42
  4. data/lib/storecove/api/shop_accounts_api.rb +45 -81
  5. data/lib/storecove/api/shops_api.rb +4 -20
  6. data/lib/storecove/api_client.rb +16 -19
  7. data/lib/storecove/api_error.rb +7 -17
  8. data/lib/storecove/configuration.rb +0 -12
  9. data/lib/storecove/models/accounting_cost_code.rb +3 -19
  10. data/lib/storecove/models/accounting_customer_party.rb +7 -15
  11. data/lib/storecove/models/{party_address.rb → address.rb} +8 -19
  12. data/lib/storecove/models/{party_contact.rb → contact.rb} +8 -16
  13. data/lib/storecove/models/country.rb +0 -12
  14. data/lib/storecove/models/currency_code.rb +0 -12
  15. data/lib/storecove/models/error_model.rb +3 -15
  16. data/lib/storecove/models/{invoice_submission_invoice.rb → invoice.rb} +55 -41
  17. data/lib/storecove/models/invoice_line.rb +12 -22
  18. data/lib/storecove/models/invoice_recipient.rb +18 -21
  19. data/lib/storecove/models/invoice_recipient_preflight.rb +11 -15
  20. data/lib/storecove/models/invoice_submission.rb +15 -16
  21. data/lib/storecove/models/invoice_submission_result.rb +11 -23
  22. data/lib/storecove/models/legal_entity.rb +3 -15
  23. data/lib/storecove/models/legal_entity_identifier.rb +3 -15
  24. data/lib/storecove/models/logos.rb +3 -15
  25. data/lib/storecove/models/party.rb +5 -17
  26. data/lib/storecove/models/preflight_invoice_recipient_result.rb +3 -15
  27. data/lib/storecove/models/{public_identifiers_inner.rb → public_identifier.rb} +4 -16
  28. data/lib/storecove/models/public_identifiers.rb +3 -15
  29. data/lib/storecove/models/shop.rb +3 -15
  30. data/lib/storecove/models/shop_account_input.rb +19 -15
  31. data/lib/storecove/models/shop_account_request.rb +7 -15
  32. data/lib/storecove/models/shop_account_request_input.rb +3 -15
  33. data/lib/storecove/models/shop_account_request_update.rb +3 -15
  34. data/lib/storecove/models/{shop_account.rb → shop_account_result.rb} +4 -16
  35. data/lib/storecove/models/shop_account_update.rb +3 -15
  36. data/lib/storecove/models/{invoice_line_tax.rb → tax.rb} +16 -16
  37. data/lib/storecove/version.rb +1 -13
  38. data/lib/storecove.rb +6 -18
  39. data/spec/api/invoice_submissions_api_spec.rb +70 -0
  40. data/spec/api/shop_account_requests_api_spec.rb +107 -0
  41. data/spec/api/shop_accounts_api_spec.rb +118 -0
  42. data/spec/api/shops_api_spec.rb +57 -0
  43. data/spec/api_client_spec.rb +237 -0
  44. data/spec/configuration_spec.rb +53 -0
  45. data/spec/models/accounting_cost_code_spec.rb +71 -0
  46. data/spec/models/accounting_customer_party_spec.rb +59 -0
  47. data/spec/models/country_spec.rb +47 -0
  48. data/spec/models/currency_code_spec.rb +47 -0
  49. data/spec/models/error_model_spec.rb +59 -0
  50. data/spec/models/invoice_line_spec.rb +95 -0
  51. data/spec/models/invoice_line_tax_spec.rb +65 -0
  52. data/spec/models/invoice_recipient_preflight_spec.rb +59 -0
  53. data/spec/models/invoice_recipient_spec.rb +59 -0
  54. data/spec/models/invoice_submission_invoice_spec.rb +159 -0
  55. data/spec/models/invoice_submission_result_spec.rb +53 -0
  56. data/spec/models/invoice_submission_spec.rb +99 -0
  57. data/spec/models/legal_entity_identifier_spec.rb +65 -0
  58. data/spec/models/legal_entity_spec.rb +95 -0
  59. data/spec/models/logos_spec.rb +65 -0
  60. data/spec/models/party_address_spec.rb +101 -0
  61. data/spec/models/party_contact_spec.rb +65 -0
  62. data/spec/models/party_spec.rb +65 -0
  63. data/spec/models/preflight_invoice_recipient_result_spec.rb +57 -0
  64. data/spec/models/public_identifier_spec.rb +59 -0
  65. data/spec/models/public_identifiers_spec.rb +47 -0
  66. data/spec/models/shop_account_input_spec.rb +77 -0
  67. data/spec/models/shop_account_request_input_spec.rb +77 -0
  68. data/spec/models/shop_account_request_spec.rb +77 -0
  69. data/spec/models/shop_account_request_update_spec.rb +71 -0
  70. data/spec/models/shop_account_result_spec.rb +95 -0
  71. data/spec/models/shop_account_update_spec.rb +65 -0
  72. data/spec/models/shop_spec.rb +77 -0
  73. data/spec/spec_helper.rb +122 -0
  74. metadata +79 -10
  75. data/lib/storecove/models/swagger-codegen +0 -2799
@@ -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'
@@ -71,7 +59,7 @@ module StorecoveApi
71
59
  :'invoice_period' => :'String',
72
60
  :'quantity' => :'Float',
73
61
  :'amount_excluding_vat' => :'Float',
74
- :'tax' => :'InvoiceLineTax',
62
+ :'tax' => :'Tax',
75
63
  :'accounting_cost_code' => :'AccountingCostCode',
76
64
  :'image_url' => :'String'
77
65
  }
@@ -123,7 +111,6 @@ module StorecoveApi
123
111
  # @return Array for valid properies with the reasons
124
112
  def list_invalid_properties
125
113
  invalid_properties = Array.new
126
-
127
114
  if !@id.nil? && @id.to_s.length < 1
128
115
  invalid_properties.push("invalid value for 'id', the character length must be great than or equal to 1.")
129
116
  end
@@ -136,9 +123,12 @@ module StorecoveApi
136
123
  invalid_properties.push("invalid value for 'description', the character length must be great than or equal to 1.")
137
124
  end
138
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}$/.")
128
+ end
139
129
 
140
- if !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+-\\s+\\d{4}-\\d{2}-\\d{2}$/)
141
- 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}$/.")
130
+ if @amount_excluding_vat.nil?
131
+ invalid_properties.push("invalid value for 'amount_excluding_vat', amount_excluding_vat cannot be nil.")
142
132
  end
143
133
 
144
134
  return invalid_properties
@@ -150,7 +140,7 @@ module StorecoveApi
150
140
  return false if !@id.nil? && @id.to_s.length < 1
151
141
  return false if @description.nil?
152
142
  return false if @description.to_s.length < 1
153
- return false if !@invoice_period.nil? && @invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+-\\s+\\d{4}-\\d{2}-\\d{2}$/)
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}$/)
154
144
  return false if @amount_excluding_vat.nil?
155
145
  return true
156
146
  end
@@ -184,8 +174,8 @@ module StorecoveApi
184
174
  # @param [Object] invoice_period Value to be assigned
185
175
  def invoice_period=(invoice_period)
186
176
 
187
- if !invoice_period.nil? && invoice_period !~ Regexp.new(/^\\d{4}-\\d{2}-\\d{2}\\s+-\\s+\\d{4}-\\d{2}-\\d{2}$/)
188
- 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}$/."
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}$/."
189
179
  end
190
180
 
191
181
  @invoice_period = invoice_period
@@ -224,7 +214,7 @@ module StorecoveApi
224
214
  def build_from_hash(attributes)
225
215
  return nil unless attributes.is_a?(Hash)
226
216
  self.class.swagger_types.each_pair do |key, type|
227
- if type =~ /^Array<(.*)>/i
217
+ if type =~ /\AArray<(.*)>/i
228
218
  # check to ensure the input is an array given that the the attribute
229
219
  # is documented as an array but the input is not
230
220
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -255,7 +245,7 @@ module StorecoveApi
255
245
  when :Float
256
246
  value.to_f
257
247
  when :BOOLEAN
258
- if value.to_s =~ /^(true|t|yes|y|1)$/i
248
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
259
249
  true
260
250
  else
261
251
  false
@@ -266,7 +256,7 @@ module StorecoveApi
266
256
  when /\AArray<(?<inner_type>.+)>\z/
267
257
  inner_type = Regexp.last_match[:inner_type]
268
258
  value.map { |v| _deserialize(inner_type, v) }
269
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
259
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
270
260
  k_type = Regexp.last_match[:k_type]
271
261
  v_type = Regexp.last_match[:v_type]
272
262
  {}.tap do |hash|
@@ -7,24 +7,12 @@ 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
- # Ids that identify this invoice recipient
15
+ # Ids that identify this invoice recipient. The list of identifiers should match with the accountingCustomerParty. I.e., you should not be sending an invoice for one accountingCustomerParty to the publicIdentifier of another.
28
16
  class InvoiceRecipient
29
17
  # Your id for this organization. This should match the id that you use for the Storecove widget (if you use that).
30
18
  attr_accessor :id
@@ -32,12 +20,16 @@ module StorecoveApi
32
20
  # The public identifiers for this invoice recipient. Either an id, or one or more public identifiers must be given
33
21
  attr_accessor :public_identifiers
34
22
 
23
+ # The email address the invoice should be sent to if none of the other identifiers can be used
24
+ attr_accessor :fallback_email
25
+
35
26
 
36
27
  # Attribute mapping from ruby-style variable name to JSON key.
37
28
  def self.attribute_map
38
29
  {
39
30
  :'id' => :'id',
40
- :'public_identifiers' => :'publicIdentifiers'
31
+ :'public_identifiers' => :'publicIdentifiers',
32
+ :'fallback_email' => :'fallbackEmail'
41
33
  }
42
34
  end
43
35
 
@@ -45,7 +37,8 @@ module StorecoveApi
45
37
  def self.swagger_types
46
38
  {
47
39
  :'id' => :'String',
48
- :'public_identifiers' => :'PublicIdentifiers'
40
+ :'public_identifiers' => :'PublicIdentifiers',
41
+ :'fallback_email' => :'String'
49
42
  }
50
43
  end
51
44
 
@@ -65,13 +58,16 @@ module StorecoveApi
65
58
  self.public_identifiers = attributes[:'publicIdentifiers']
66
59
  end
67
60
 
61
+ if attributes.has_key?(:'fallbackEmail')
62
+ self.fallback_email = attributes[:'fallbackEmail']
63
+ end
64
+
68
65
  end
69
66
 
70
67
  # Show invalid properties with the reasons. Usually used together with valid?
71
68
  # @return Array for valid properies with the reasons
72
69
  def list_invalid_properties
73
70
  invalid_properties = Array.new
74
-
75
71
  if !@id.nil? && @id.to_s.length < 2
76
72
  invalid_properties.push("invalid value for 'id', the character length must be great than or equal to 2.")
77
73
  end
@@ -103,7 +99,8 @@ module StorecoveApi
103
99
  return true if self.equal?(o)
104
100
  self.class == o.class &&
105
101
  id == o.id &&
106
- public_identifiers == o.public_identifiers
102
+ public_identifiers == o.public_identifiers &&
103
+ fallback_email == o.fallback_email
107
104
  end
108
105
 
109
106
  # @see the `==` method
@@ -115,7 +112,7 @@ module StorecoveApi
115
112
  # Calculates hash code according to all attributes.
116
113
  # @return [Fixnum] Hash code
117
114
  def hash
118
- [id, public_identifiers].hash
115
+ [id, public_identifiers, fallback_email].hash
119
116
  end
120
117
 
121
118
  # Builds the object from hash
@@ -124,7 +121,7 @@ module StorecoveApi
124
121
  def build_from_hash(attributes)
125
122
  return nil unless attributes.is_a?(Hash)
126
123
  self.class.swagger_types.each_pair do |key, type|
127
- if type =~ /^Array<(.*)>/i
124
+ if type =~ /\AArray<(.*)>/i
128
125
  # check to ensure the input is an array given that the the attribute
129
126
  # is documented as an array but the input is not
130
127
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -155,7 +152,7 @@ module StorecoveApi
155
152
  when :Float
156
153
  value.to_f
157
154
  when :BOOLEAN
158
- if value.to_s =~ /^(true|t|yes|y|1)$/i
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
156
  true
160
157
  else
161
158
  false
@@ -166,7 +163,7 @@ module StorecoveApi
166
163
  when /\AArray<(?<inner_type>.+)>\z/
167
164
  inner_type = Regexp.last_match[:inner_type]
168
165
  value.map { |v| _deserialize(inner_type, v) }
169
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
167
  k_type = Regexp.last_match[:k_type]
171
168
  v_type = Regexp.last_match[:v_type]
172
169
  {}.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'
@@ -70,6 +58,14 @@ module StorecoveApi
70
58
  # @return Array for valid properies with the reasons
71
59
  def list_invalid_properties
72
60
  invalid_properties = Array.new
61
+ if @supplier_id.nil?
62
+ invalid_properties.push("invalid value for 'supplier_id', supplier_id cannot be nil.")
63
+ end
64
+
65
+ if @invoice_recipient.nil?
66
+ invalid_properties.push("invalid value for 'invoice_recipient', invoice_recipient cannot be nil.")
67
+ end
68
+
73
69
  return invalid_properties
74
70
  end
75
71
 
@@ -108,7 +104,7 @@ module StorecoveApi
108
104
  def build_from_hash(attributes)
109
105
  return nil unless attributes.is_a?(Hash)
110
106
  self.class.swagger_types.each_pair do |key, type|
111
- if type =~ /^Array<(.*)>/i
107
+ if type =~ /\AArray<(.*)>/i
112
108
  # check to ensure the input is an array given that the the attribute
113
109
  # is documented as an array but the input is not
114
110
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -139,7 +135,7 @@ module StorecoveApi
139
135
  when :Float
140
136
  value.to_f
141
137
  when :BOOLEAN
142
- if value.to_s =~ /^(true|t|yes|y|1)$/i
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
139
  true
144
140
  else
145
141
  false
@@ -150,7 +146,7 @@ module StorecoveApi
150
146
  when /\AArray<(?<inner_type>.+)>\z/
151
147
  inner_type = Regexp.last_match[:inner_type]
152
148
  value.map { |v| _deserialize(inner_type, v) }
153
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
150
  k_type = Regexp.last_match[:k_type]
155
151
  v_type = Regexp.last_match[:v_type]
156
152
  {}.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'
@@ -94,7 +82,7 @@ module StorecoveApi
94
82
  :'invoice_recipient' => :'InvoiceRecipient',
95
83
  :'document' => :'String',
96
84
  :'document_url' => :'String',
97
- :'invoice' => :'InvoiceSubmissionInvoice'
85
+ :'invoice' => :'Invoice'
98
86
  }
99
87
  end
100
88
 
@@ -144,6 +132,17 @@ module StorecoveApi
144
132
  # @return Array for valid properies with the reasons
145
133
  def list_invalid_properties
146
134
  invalid_properties = Array.new
135
+ if @mode.nil?
136
+ invalid_properties.push("invalid value for 'mode', mode cannot be nil.")
137
+ end
138
+
139
+ if @supplier_id.nil?
140
+ invalid_properties.push("invalid value for 'supplier_id', supplier_id cannot be nil.")
141
+ end
142
+
143
+ if @invoice_recipient.nil?
144
+ invalid_properties.push("invalid value for 'invoice_recipient', invoice_recipient cannot be nil.")
145
+ end
147
146
 
148
147
  if !@document.nil? && @document.to_s.length < 5
149
148
  invalid_properties.push("invalid value for 'document', the character length must be great than or equal to 5.")
@@ -218,7 +217,7 @@ module StorecoveApi
218
217
  def build_from_hash(attributes)
219
218
  return nil unless attributes.is_a?(Hash)
220
219
  self.class.swagger_types.each_pair do |key, type|
221
- if type =~ /^Array<(.*)>/i
220
+ if type =~ /\AArray<(.*)>/i
222
221
  # check to ensure the input is an array given that the the attribute
223
222
  # is documented as an array but the input is not
224
223
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -249,7 +248,7 @@ module StorecoveApi
249
248
  when :Float
250
249
  value.to_f
251
250
  when :BOOLEAN
252
- if value.to_s =~ /^(true|t|yes|y|1)$/i
251
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
252
  true
254
253
  else
255
254
  false
@@ -260,7 +259,7 @@ module StorecoveApi
260
259
  when /\AArray<(?<inner_type>.+)>\z/
261
260
  inner_type = Regexp.last_match[:inner_type]
262
261
  value.map { |v| _deserialize(inner_type, v) }
263
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
262
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
263
  k_type = Regexp.last_match[:k_type]
265
264
  v_type = Regexp.last_match[:v_type]
266
265
  {}.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'
@@ -26,21 +14,21 @@ require 'date'
26
14
  module StorecoveApi
27
15
  # The result of an invoice submission
28
16
  class InvoiceSubmissionResult
29
- # The submission id
30
- attr_accessor :id
17
+ # A (V4) GUID for the invoice submission
18
+ attr_accessor :guid
31
19
 
32
20
 
33
21
  # Attribute mapping from ruby-style variable name to JSON key.
34
22
  def self.attribute_map
35
23
  {
36
- :'id' => :'id'
24
+ :'guid' => :'guid'
37
25
  }
38
26
  end
39
27
 
40
28
  # Attribute type mapping.
41
29
  def self.swagger_types
42
30
  {
43
- :'id' => :'String'
31
+ :'guid' => :'String'
44
32
  }
45
33
  end
46
34
 
@@ -52,8 +40,8 @@ module StorecoveApi
52
40
  # convert string to symbol for hash key
53
41
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
42
 
55
- if attributes.has_key?(:'id')
56
- self.id = attributes[:'id']
43
+ if attributes.has_key?(:'guid')
44
+ self.guid = attributes[:'guid']
57
45
  end
58
46
 
59
47
  end
@@ -76,7 +64,7 @@ module StorecoveApi
76
64
  def ==(o)
77
65
  return true if self.equal?(o)
78
66
  self.class == o.class &&
79
- id == o.id
67
+ guid == o.guid
80
68
  end
81
69
 
82
70
  # @see the `==` method
@@ -88,7 +76,7 @@ module StorecoveApi
88
76
  # Calculates hash code according to all attributes.
89
77
  # @return [Fixnum] Hash code
90
78
  def hash
91
- [id].hash
79
+ [guid].hash
92
80
  end
93
81
 
94
82
  # Builds the object from hash
@@ -97,7 +85,7 @@ module StorecoveApi
97
85
  def build_from_hash(attributes)
98
86
  return nil unless attributes.is_a?(Hash)
99
87
  self.class.swagger_types.each_pair do |key, type|
100
- if type =~ /^Array<(.*)>/i
88
+ if type =~ /\AArray<(.*)>/i
101
89
  # check to ensure the input is an array given that the the attribute
102
90
  # is documented as an array but the input is not
103
91
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -128,7 +116,7 @@ module StorecoveApi
128
116
  when :Float
129
117
  value.to_f
130
118
  when :BOOLEAN
131
- if value.to_s =~ /^(true|t|yes|y|1)$/i
119
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
132
120
  true
133
121
  else
134
122
  false
@@ -139,7 +127,7 @@ module StorecoveApi
139
127
  when /\AArray<(?<inner_type>.+)>\z/
140
128
  inner_type = Regexp.last_match[:inner_type]
141
129
  value.map { |v| _deserialize(inner_type, v) }
142
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
130
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
143
131
  k_type = Regexp.last_match[:k_type]
144
132
  v_type = Regexp.last_match[:v_type]
145
133
  {}.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'
@@ -161,7 +149,7 @@ module StorecoveApi
161
149
  def build_from_hash(attributes)
162
150
  return nil unless attributes.is_a?(Hash)
163
151
  self.class.swagger_types.each_pair do |key, type|
164
- if type =~ /^Array<(.*)>/i
152
+ if type =~ /\AArray<(.*)>/i
165
153
  # check to ensure the input is an array given that the the attribute
166
154
  # is documented as an array but the input is not
167
155
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -192,7 +180,7 @@ module StorecoveApi
192
180
  when :Float
193
181
  value.to_f
194
182
  when :BOOLEAN
195
- if value.to_s =~ /^(true|t|yes|y|1)$/i
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
184
  true
197
185
  else
198
186
  false
@@ -203,7 +191,7 @@ module StorecoveApi
203
191
  when /\AArray<(?<inner_type>.+)>\z/
204
192
  inner_type = Regexp.last_match[:inner_type]
205
193
  value.map { |v| _deserialize(inner_type, v) }
206
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
195
  k_type = Regexp.last_match[:k_type]
208
196
  v_type = Regexp.last_match[:v_type]
209
197
  {}.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'
@@ -114,7 +102,7 @@ module StorecoveApi
114
102
  def build_from_hash(attributes)
115
103
  return nil unless attributes.is_a?(Hash)
116
104
  self.class.swagger_types.each_pair do |key, type|
117
- if type =~ /^Array<(.*)>/i
105
+ if type =~ /\AArray<(.*)>/i
118
106
  # check to ensure the input is an array given that the the attribute
119
107
  # is documented as an array but the input is not
120
108
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -145,7 +133,7 @@ module StorecoveApi
145
133
  when :Float
146
134
  value.to_f
147
135
  when :BOOLEAN
148
- if value.to_s =~ /^(true|t|yes|y|1)$/i
136
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
137
  true
150
138
  else
151
139
  false
@@ -156,7 +144,7 @@ module StorecoveApi
156
144
  when /\AArray<(?<inner_type>.+)>\z/
157
145
  inner_type = Regexp.last_match[:inner_type]
158
146
  value.map { |v| _deserialize(inner_type, v) }
159
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
147
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
148
  k_type = Regexp.last_match[:k_type]
161
149
  v_type = Regexp.last_match[:v_type]
162
150
  {}.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'
@@ -114,7 +102,7 @@ module StorecoveApi
114
102
  def build_from_hash(attributes)
115
103
  return nil unless attributes.is_a?(Hash)
116
104
  self.class.swagger_types.each_pair do |key, type|
117
- if type =~ /^Array<(.*)>/i
105
+ if type =~ /\AArray<(.*)>/i
118
106
  # check to ensure the input is an array given that the the attribute
119
107
  # is documented as an array but the input is not
120
108
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -145,7 +133,7 @@ module StorecoveApi
145
133
  when :Float
146
134
  value.to_f
147
135
  when :BOOLEAN
148
- if value.to_s =~ /^(true|t|yes|y|1)$/i
136
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
137
  true
150
138
  else
151
139
  false
@@ -156,7 +144,7 @@ module StorecoveApi
156
144
  when /\AArray<(?<inner_type>.+)>\z/
157
145
  inner_type = Regexp.last_match[:inner_type]
158
146
  value.map { |v| _deserialize(inner_type, v) }
159
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
147
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
148
  k_type = Regexp.last_match[:k_type]
161
149
  v_type = Regexp.last_match[:v_type]
162
150
  {}.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'
@@ -47,8 +35,8 @@ module StorecoveApi
47
35
  def self.swagger_types
48
36
  {
49
37
  :'company_name' => :'String',
50
- :'address' => :'PartyAddress',
51
- :'contact' => :'PartyContact'
38
+ :'address' => :'Address',
39
+ :'contact' => :'Contact'
52
40
  }
53
41
  end
54
42
 
@@ -139,7 +127,7 @@ module StorecoveApi
139
127
  def build_from_hash(attributes)
140
128
  return nil unless attributes.is_a?(Hash)
141
129
  self.class.swagger_types.each_pair do |key, type|
142
- if type =~ /^Array<(.*)>/i
130
+ if type =~ /\AArray<(.*)>/i
143
131
  # check to ensure the input is an array given that the the attribute
144
132
  # is documented as an array but the input is not
145
133
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -170,7 +158,7 @@ module StorecoveApi
170
158
  when :Float
171
159
  value.to_f
172
160
  when :BOOLEAN
173
- if value.to_s =~ /^(true|t|yes|y|1)$/i
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
162
  true
175
163
  else
176
164
  false
@@ -181,7 +169,7 @@ module StorecoveApi
181
169
  when /\AArray<(?<inner_type>.+)>\z/
182
170
  inner_type = Regexp.last_match[:inner_type]
183
171
  value.map { |v| _deserialize(inner_type, v) }
184
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
173
  k_type = Regexp.last_match[:k_type]
186
174
  v_type = Regexp.last_match[:v_type]
187
175
  {}.tap do |hash|