storecove 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/lib/storecove/api/invoice_submissions_api.rb +148 -0
  3. data/lib/storecove/api/shop_account_requests_api.rb +323 -0
  4. data/lib/storecove/api/shop_accounts_api.rb +376 -0
  5. data/lib/storecove/api/shops_api.rb +87 -0
  6. data/lib/storecove/api_client.rb +379 -0
  7. data/lib/storecove/api_error.rb +47 -0
  8. data/lib/storecove/configuration.rb +214 -0
  9. data/lib/storecove/models/accounting_cost_code.rb +298 -0
  10. data/lib/storecove/models/accounting_customer_party.rb +210 -0
  11. data/lib/storecove/models/country.rb +280 -0
  12. data/lib/storecove/models/currency_code.rb +209 -0
  13. data/lib/storecove/models/error_model.rb +208 -0
  14. data/lib/storecove/models/invoice_line.rb +327 -0
  15. data/lib/storecove/models/invoice_line_tax.rb +222 -0
  16. data/lib/storecove/models/invoice_recipient.rb +227 -0
  17. data/lib/storecove/models/invoice_recipient_preflight.rb +211 -0
  18. data/lib/storecove/models/invoice_submission.rb +321 -0
  19. data/lib/storecove/models/invoice_submission_invoice.rb +506 -0
  20. data/lib/storecove/models/invoice_submission_result.rb +200 -0
  21. data/lib/storecove/models/legal_entity.rb +264 -0
  22. data/lib/storecove/models/legal_entity_identifier.rb +217 -0
  23. data/lib/storecove/models/logos.rb +217 -0
  24. data/lib/storecove/models/party.rb +242 -0
  25. data/lib/storecove/models/party_address.rb +331 -0
  26. data/lib/storecove/models/party_contact.rb +218 -0
  27. data/lib/storecove/models/preflight_invoice_recipient_result.rb +233 -0
  28. data/lib/storecove/models/public_identifiers.rb +190 -0
  29. data/lib/storecove/models/public_identifiers_inner.rb +258 -0
  30. data/lib/storecove/models/shop.rb +237 -0
  31. data/lib/storecove/models/shop_account.rb +270 -0
  32. data/lib/storecove/models/shop_account_input.rb +244 -0
  33. data/lib/storecove/models/shop_account_request.rb +236 -0
  34. data/lib/storecove/models/shop_account_request_input.rb +235 -0
  35. data/lib/storecove/models/shop_account_request_update.rb +226 -0
  36. data/lib/storecove/models/shop_account_update.rb +220 -0
  37. data/lib/storecove/models/swagger-codegen +2799 -0
  38. data/lib/storecove/version.rb +26 -0
  39. data/lib/storecove.rb +82 -0
  40. data/storecove.gemspec +55 -0
  41. metadata +263 -0
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Storecove API
3
+
4
+ #Storecove API
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: apisupport@storecove.nl
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
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
+ =end
23
+
24
+ require 'date'
25
+
26
+ module StorecoveApi
27
+
28
+ class ShopAccountUpdate
29
+ # See <<_swagger_api_shopaccountinput>>.
30
+ attr_accessor :username
31
+
32
+ # See <<_swagger_api_shopaccountinput>>.
33
+ attr_accessor :password
34
+
35
+ # See <<_swagger_api_shopaccountinput>>.
36
+ attr_accessor :email
37
+
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'username' => :'username',
43
+ :'password' => :'password',
44
+ :'email' => :'email'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'username' => :'String',
52
+ :'password' => :'String',
53
+ :'email' => :'String'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ return unless attributes.is_a?(Hash)
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
64
+
65
+ if attributes.has_key?(:'username')
66
+ self.username = attributes[:'username']
67
+ end
68
+
69
+ if attributes.has_key?(:'password')
70
+ self.password = attributes[:'password']
71
+ end
72
+
73
+ if attributes.has_key?(:'email')
74
+ self.email = attributes[:'email']
75
+ end
76
+
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properies with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ return invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ return true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ username == o.username &&
98
+ password == o.password &&
99
+ email == o.email
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Fixnum] Hash code
110
+ def hash
111
+ [username, password, email].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /^Array<(.*)>/i
121
+ # check to ensure the input is an array given that the the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = StorecoveApi.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map{ |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end