tradenity 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +89 -77
  4. data/lib/tradenity/api_client.rb +408 -0
  5. data/lib/tradenity/api_error.rb +36 -0
  6. data/lib/tradenity/configuration.rb +205 -0
  7. data/lib/tradenity/exceptions.rb +5 -0
  8. data/lib/tradenity/rails/railtie.rb +20 -20
  9. data/lib/tradenity/resources/address.rb +729 -0
  10. data/lib/tradenity/resources/braintree_gateway.rb +804 -0
  11. data/lib/tradenity/resources/brand.rb +732 -0
  12. data/lib/tradenity/resources/cancel_operation.rb +675 -0
  13. data/lib/tradenity/resources/cart_settings.rb +219 -0
  14. data/lib/tradenity/resources/cash_on_delivery_payment.rb +746 -0
  15. data/lib/tradenity/resources/category.rb +763 -0
  16. data/lib/tradenity/resources/collection.rb +734 -0
  17. data/lib/tradenity/resources/contact_info.rb +306 -0
  18. data/lib/tradenity/resources/countries_geo_zone.rb +739 -0
  19. data/lib/tradenity/resources/country.rb +803 -0
  20. data/lib/tradenity/resources/coupon.rb +454 -0
  21. data/lib/tradenity/resources/credit_card_payment.rb +803 -0
  22. data/lib/tradenity/resources/currency.rb +762 -0
  23. data/lib/tradenity/resources/customer.rb +816 -0
  24. data/lib/tradenity/resources/customer_group.rb +723 -0
  25. data/lib/tradenity/resources/dimensions.rb +263 -0
  26. data/lib/tradenity/resources/discount_coupon.rb +811 -0
  27. data/lib/tradenity/resources/discount_promotion.rb +784 -0
  28. data/lib/tradenity/resources/fixed_rate_shipping.rb +837 -0
  29. data/lib/tradenity/resources/free_item_coupon.rb +793 -0
  30. data/lib/tradenity/resources/free_shipping.rb +806 -0
  31. data/lib/tradenity/resources/free_shipping_coupon.rb +788 -0
  32. data/lib/tradenity/resources/free_shipping_promotion.rb +744 -0
  33. data/lib/tradenity/resources/gateway.rb +435 -0
  34. data/lib/tradenity/resources/general_settings.rb +206 -0
  35. data/lib/tradenity/resources/geo_zone.rb +406 -0
  36. data/lib/tradenity/resources/instance_meta.rb +182 -0
  37. data/lib/tradenity/resources/inventory_settings.rb +197 -0
  38. data/lib/tradenity/resources/items_selector.rb +270 -0
  39. data/lib/tradenity/resources/line_item.rb +347 -0
  40. data/lib/tradenity/resources/mail_server_settings.rb +221 -0
  41. data/lib/tradenity/resources/measurement_settings.rb +253 -0
  42. data/lib/tradenity/resources/option.rb +787 -0
  43. data/lib/tradenity/resources/option_set.rb +734 -0
  44. data/lib/tradenity/resources/option_value.rb +680 -0
  45. data/lib/tradenity/resources/order.rb +929 -0
  46. data/lib/tradenity/resources/order_line_item.rb +777 -0
  47. data/lib/tradenity/resources/paging.rb +38 -0
  48. data/lib/tradenity/resources/payment.rb +429 -0
  49. data/lib/tradenity/resources/payment_card.rb +847 -0
  50. data/lib/tradenity/resources/payment_settings.rb +201 -0
  51. data/lib/tradenity/resources/payment_source.rb +392 -0
  52. data/lib/tradenity/resources/payment_token.rb +723 -0
  53. data/lib/tradenity/resources/payment_transaction.rb +740 -0
  54. data/lib/tradenity/resources/photo.rb +341 -0
  55. data/lib/tradenity/resources/product.rb +1156 -0
  56. data/lib/tradenity/resources/promotion.rb +427 -0
  57. data/lib/tradenity/resources/refund_operation.rb +358 -0
  58. data/lib/tradenity/resources/refund_transaction.rb +730 -0
  59. data/lib/tradenity/resources/return_line_item.rb +781 -0
  60. data/lib/tradenity/resources/return_operation.rb +686 -0
  61. data/lib/tradenity/resources/return_settings.rb +255 -0
  62. data/lib/tradenity/resources/shipping_method.rb +530 -0
  63. data/lib/tradenity/resources/shopping_cart.rb +647 -0
  64. data/lib/tradenity/resources/state.rb +675 -0
  65. data/lib/tradenity/resources/states_geo_zone.rb +748 -0
  66. data/lib/tradenity/resources/store_credit.rb +686 -0
  67. data/lib/tradenity/resources/store_credit_payment.rb +764 -0
  68. data/lib/tradenity/resources/store_credit_transaction.rb +730 -0
  69. data/lib/tradenity/resources/store_profile.rb +532 -0
  70. data/lib/tradenity/resources/stripe_gateway.rb +804 -0
  71. data/lib/tradenity/resources/table_rate_rule.rb +712 -0
  72. data/lib/tradenity/resources/table_rate_shipping.rb +834 -0
  73. data/lib/tradenity/resources/tax_class.rb +723 -0
  74. data/lib/tradenity/resources/tax_rate.rb +845 -0
  75. data/lib/tradenity/resources/tax_settings.rb +231 -0
  76. data/lib/tradenity/resources/test_gateway.rb +804 -0
  77. data/lib/tradenity/resources/transaction.rb +523 -0
  78. data/lib/tradenity/resources/utils.rb +7 -0
  79. data/lib/tradenity/resources/variant.rb +877 -0
  80. data/lib/tradenity/resources/web_hooks.rb +262 -0
  81. data/lib/tradenity/resources/weight.rb +235 -0
  82. data/lib/tradenity/resources/wish_list.rb +686 -0
  83. data/lib/tradenity/resources/zip_codes_geo_zone.rb +755 -0
  84. data/lib/tradenity/token_holder.rb +22 -0
  85. data/lib/tradenity/version.rb +13 -3
  86. data/lib/tradenity.rb +117 -7
  87. data/tradenity.gemspec +35 -30
  88. metadata +200 -34
  89. data/lib/tradenity/api.rb +0 -17
  90. data/lib/tradenity/error/exceptions.rb +0 -52
  91. data/lib/tradenity/error/message.rb +0 -38
  92. data/lib/tradenity/http/client.rb +0 -130
  93. data/lib/tradenity/model/base.rb +0 -100
  94. data/lib/tradenity/model/entities.rb +0 -390
  95. data/lib/tradenity/model/paging.rb +0 -23
@@ -0,0 +1,532 @@
1
+ =begin
2
+ #Tradenity API
3
+
4
+ #Tradenity eCommerce Rest API
5
+
6
+ Contact: support@tradenity.com
7
+ Generated by: https://github.com/tradenity
8
+
9
+ =end
10
+
11
+ require 'uri'
12
+
13
+ module Tradenity
14
+ class StoreProfile
15
+
16
+
17
+ def id=(id)
18
+ @id = id
19
+ end
20
+
21
+ def id
22
+ if instance_variable_defined?('@id') && @id != nil
23
+ @id
24
+ elsif __meta && __meta.href != nil
25
+ @id = __meta.href.split('/')[-1]
26
+ @id
27
+ else
28
+ nil
29
+ end
30
+ end
31
+
32
+ attr_accessor :__meta
33
+
34
+ attr_accessor :created_at
35
+
36
+ attr_accessor :updated_at
37
+
38
+ attr_accessor :name
39
+
40
+ attr_accessor :description
41
+
42
+ attr_accessor :contact_info
43
+
44
+ attr_accessor :billing_info
45
+
46
+ attr_accessor :facebook
47
+
48
+ attr_accessor :twitter
49
+
50
+ attr_accessor :youtube
51
+
52
+ attr_accessor :instagram
53
+
54
+ attr_accessor :pinterest
55
+
56
+ attr_accessor :linkedin
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'id' => :'id',
62
+ :'__meta' => :'__meta',
63
+ :'created_at' => :'createdAt',
64
+ :'updated_at' => :'updatedAt',
65
+ :'name' => :'name',
66
+ :'description' => :'description',
67
+ :'contact_info' => :'contactInfo',
68
+ :'billing_info' => :'billingInfo',
69
+ :'facebook' => :'facebook',
70
+ :'twitter' => :'twitter',
71
+ :'youtube' => :'youtube',
72
+ :'instagram' => :'instagram',
73
+ :'pinterest' => :'pinterest',
74
+ :'linkedin' => :'linkedin'
75
+ }
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.swagger_types
80
+ {
81
+ :'id' => :'String',
82
+ :'__meta' => :'InstanceMeta',
83
+ :'created_at' => :'DateTime',
84
+ :'updated_at' => :'DateTime',
85
+ :'name' => :'String',
86
+ :'description' => :'String',
87
+ :'contact_info' => :'ContactInfo',
88
+ :'billing_info' => :'ContactInfo',
89
+ :'facebook' => :'String',
90
+ :'twitter' => :'String',
91
+ :'youtube' => :'String',
92
+ :'instagram' => :'String',
93
+ :'pinterest' => :'String',
94
+ :'linkedin' => :'String'
95
+ }
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ return unless attributes.is_a?(Hash)
102
+
103
+ # convert string to symbol for hash key
104
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
105
+ if attributes.has_key?(:'id')
106
+ self.id = attributes[:'id']
107
+ end
108
+
109
+ if attributes.has_key?(:'__meta')
110
+ self.__meta = attributes[:'__meta']
111
+ end
112
+
113
+ if attributes.has_key?(:'createdAt')
114
+ self.created_at = attributes[:'createdAt']
115
+ end
116
+
117
+ if attributes.has_key?(:'created_at')
118
+ self.created_at = attributes[:'created_at']
119
+ end
120
+
121
+ if attributes.has_key?(:'updatedAt')
122
+ self.updated_at = attributes[:'updatedAt']
123
+ end
124
+
125
+ if attributes.has_key?(:'updated_at')
126
+ self.updated_at = attributes[:'updated_at']
127
+ end
128
+
129
+ if attributes.has_key?(:'name')
130
+ self.name = attributes[:'name']
131
+ end
132
+
133
+ if attributes.has_key?(:'description')
134
+ self.description = attributes[:'description']
135
+ end
136
+
137
+ if attributes.has_key?(:'contactInfo')
138
+ self.contact_info = attributes[:'contactInfo']
139
+ end
140
+
141
+ if attributes.has_key?(:'contact_info')
142
+ self.contact_info = attributes[:'contact_info']
143
+ end
144
+
145
+ if attributes.has_key?(:'billingInfo')
146
+ self.billing_info = attributes[:'billingInfo']
147
+ end
148
+
149
+ if attributes.has_key?(:'billing_info')
150
+ self.billing_info = attributes[:'billing_info']
151
+ end
152
+
153
+ if attributes.has_key?(:'facebook')
154
+ self.facebook = attributes[:'facebook']
155
+ end
156
+
157
+ if attributes.has_key?(:'twitter')
158
+ self.twitter = attributes[:'twitter']
159
+ end
160
+
161
+ if attributes.has_key?(:'youtube')
162
+ self.youtube = attributes[:'youtube']
163
+ end
164
+
165
+ if attributes.has_key?(:'instagram')
166
+ self.instagram = attributes[:'instagram']
167
+ end
168
+
169
+ if attributes.has_key?(:'pinterest')
170
+ self.pinterest = attributes[:'pinterest']
171
+ end
172
+
173
+ if attributes.has_key?(:'linkedin')
174
+ self.linkedin = attributes[:'linkedin']
175
+ end
176
+ end
177
+
178
+ # Show invalid properties with the reasons. Usually used together with valid?
179
+ # @return Array for valid properties with the reasons
180
+ def list_invalid_properties
181
+ invalid_properties = Array.new
182
+ if @name.nil?
183
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
184
+ end
185
+
186
+ invalid_properties
187
+ end
188
+
189
+ # Check to see if the all the properties in the model are valid
190
+ # @return true if the model is valid
191
+ def valid?
192
+ return false if @name.nil?
193
+ true
194
+ end
195
+
196
+ # Checks equality by comparing each attribute.
197
+ # @param [Object] Object to be compared
198
+ def ==(o)
199
+ return true if self.equal?(o)
200
+ self.class == o.class &&
201
+ __meta == o.__meta &&
202
+ created_at == o.created_at &&
203
+ updated_at == o.updated_at &&
204
+ name == o.name &&
205
+ description == o.description &&
206
+ contact_info == o.contact_info &&
207
+ billing_info == o.billing_info &&
208
+ facebook == o.facebook &&
209
+ twitter == o.twitter &&
210
+ youtube == o.youtube &&
211
+ instagram == o.instagram &&
212
+ pinterest == o.pinterest &&
213
+ linkedin == o.linkedin
214
+ end
215
+
216
+ # @see the `==` method
217
+ # @param [Object] Object to be compared
218
+ def eql?(o)
219
+ self == o
220
+ end
221
+
222
+ # Calculates hash code according to all attributes.
223
+ # @return [Fixnum] Hash code
224
+ def hash
225
+ [__meta, created_at, updated_at, name, description, contact_info, billing_info, facebook, twitter, youtube, instagram, pinterest, linkedin].hash
226
+ end
227
+
228
+ # Builds the object from hash
229
+ # @param [Hash] attributes Model attributes in the form of hash
230
+ # @return [Object] Returns the model itself
231
+ def build_from_hash(attributes)
232
+ return nil unless attributes.is_a?(Hash)
233
+ self.class.swagger_types.each_pair do |key, type|
234
+ if type =~ /\AArray<(.*)>/i
235
+ # check to ensure the input is an array given that the the attribute
236
+ # is documented as an array but the input is not
237
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
238
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
239
+ end
240
+ elsif !attributes[self.class.attribute_map[key]].nil?
241
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
242
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
243
+ end
244
+
245
+ self
246
+ end
247
+
248
+ # Deserializes the data based on type
249
+ # @param string type Data type
250
+ # @param string value Value to be deserialized
251
+ # @return [Object] Deserialized data
252
+ def _deserialize(type, value)
253
+ case type.to_sym
254
+ when :DateTime
255
+ DateTime.parse(value)
256
+ when :Date
257
+ Date.parse(value)
258
+ when :String
259
+ value.to_s
260
+ when :Integer
261
+ value.to_i
262
+ when :Float
263
+ value.to_f
264
+ when :BOOLEAN
265
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
266
+ true
267
+ else
268
+ false
269
+ end
270
+ when :Object
271
+ # generic object (usually a Hash), return directly
272
+ value
273
+ when /\AArray<(?<inner_type>.+)>\z/
274
+ inner_type = Regexp.last_match[:inner_type]
275
+ value.map { |v| _deserialize(inner_type, v) }
276
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
277
+ k_type = Regexp.last_match[:k_type]
278
+ v_type = Regexp.last_match[:v_type]
279
+ {}.tap do |hash|
280
+ value.each do |k, v|
281
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
282
+ end
283
+ end
284
+ else # model
285
+ temp_model = Tradenity.const_get(type).new
286
+ temp_model.build_from_hash(value)
287
+ end
288
+ end
289
+
290
+ # Returns the string representation of the object
291
+ # @return [String] String presentation of the object
292
+ def to_s
293
+ to_hash.to_s
294
+ end
295
+
296
+ # to_body is an alias to to_hash (backward compatibility)
297
+ # @return [Hash] Returns the object in the form of hash
298
+ def to_body
299
+ to_hash
300
+ end
301
+
302
+ # Returns the object in the form of hash
303
+ # @return [Hash] Returns the object in the form of hash
304
+ def to_hash
305
+ hash = {}
306
+ self.class.attribute_map.each_pair do |attr, param|
307
+ value = self.send(attr)
308
+ next if value.nil?
309
+ hash[param] = _to_hash(value)
310
+ end
311
+ hash
312
+ end
313
+
314
+ # Outputs non-array value in the form of hash
315
+ # For object, use to_hash. Otherwise, just return the value
316
+ # @param [Object] value Any valid value
317
+ # @return [Hash] Returns the value in the form of hash
318
+ def _to_hash(value)
319
+ if value.is_a?(Array)
320
+ value.compact.map { |v| _to_hash(v) }
321
+ elsif value.is_a?(Hash)
322
+ {}.tap do |hash|
323
+ value.each { |k, v| hash[k] = _to_hash(v) }
324
+ end
325
+ elsif value.respond_to? :to_hash
326
+ value.to_hash
327
+ else
328
+ value
329
+ end
330
+ end
331
+
332
+
333
+ def self.api_client
334
+ ApiClient.default
335
+ end
336
+
337
+ # Update StoreProfile
338
+ # Update attributes of StoreProfile
339
+ # @return [StoreProfile]
340
+ def update
341
+ self.class.update_store_profile_by_id(self.id, self)
342
+ end
343
+
344
+
345
+ class << self
346
+
347
+ # Find StoreProfile
348
+ # Return single instance of StoreProfile by its ID.
349
+ # @param id ID of StoreProfile to return
350
+ # @return [StoreProfile]
351
+ def find_by_id(id)
352
+ get_store_profile_by_id(id)
353
+ end
354
+
355
+
356
+ # Find StoreProfile
357
+ # Return single instance of StoreProfile by its ID.
358
+ # @param store_profile_id ID of storeProfile to return
359
+ # @param [Hash] opts the optional parameters
360
+ # @return [StoreProfile]
361
+ def get_store_profile_by_id(store_profile_id, opts = {})
362
+ data, _status_code, _headers = get_store_profile_by_id_with_http_info(store_profile_id, opts)
363
+ data
364
+ end
365
+
366
+ # Find StoreProfile
367
+ # Return single instance of StoreProfile by its ID.
368
+ # @param store_profile_id ID of storeProfile to return
369
+ # @param [Hash] opts the optional parameters
370
+ # @return [Array<(StoreProfile, Fixnum, Hash)>] StoreProfile data, response status code and response headers
371
+ def get_store_profile_by_id_with_http_info(store_profile_id, opts = {})
372
+ if api_client.config.debugging
373
+ api_client.config.logger.debug 'Calling API: StoreProfile.get_store_profile_by_id ...'
374
+ end
375
+ # verify the required parameter 'store_profile_id' is set
376
+ if api_client.config.client_side_validation && store_profile_id.nil?
377
+ fail ArgumentError, "Missing the required parameter 'store_profile_id' when calling StoreProfile.get_store_profile_by_id"
378
+ end
379
+ # resource path
380
+ local_var_path = '/storeProfiles/{storeProfileId}'.sub('{' + 'storeProfileId' + '}', store_profile_id.to_s)
381
+
382
+ # query parameters
383
+ query_params = opts
384
+
385
+ # header parameters
386
+ header_params = {}
387
+ # HTTP header 'Accept' (if needed)
388
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
389
+ # HTTP header 'Content-Type'
390
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
391
+
392
+ # form parameters
393
+ form_params = {}
394
+
395
+ # http body (model)
396
+ post_body = nil
397
+ auth_names = []
398
+ data, status_code, headers = api_client.call_api(:GET, local_var_path,
399
+ :header_params => header_params,
400
+ :query_params => query_params,
401
+ :form_params => form_params,
402
+ :body => post_body,
403
+ :auth_names => auth_names,
404
+ :return_type => 'StoreProfile')
405
+ if api_client.config.debugging
406
+ api_client.config.logger.debug "API called: StoreProfile#get_store_profile_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
407
+ end
408
+ return data, status_code, headers
409
+ end
410
+ # Replace StoreProfile
411
+ # Replace all attributes of StoreProfile
412
+ # @param store_profile_id ID of storeProfile to replace
413
+ # @param store_profile Attributes of storeProfile to replace
414
+ # @param [Hash] opts the optional parameters
415
+ # @return [StoreProfile]
416
+ def replace_store_profile_by_id(store_profile_id, store_profile, opts = {})
417
+ data, _status_code, _headers = replace_store_profile_by_id_with_http_info(store_profile_id, store_profile, opts)
418
+ data
419
+ end
420
+
421
+ # Replace StoreProfile
422
+ # Replace all attributes of StoreProfile
423
+ # @param store_profile_id ID of storeProfile to replace
424
+ # @param store_profile Attributes of storeProfile to replace
425
+ # @param [Hash] opts the optional parameters
426
+ # @return [Array<(StoreProfile, Fixnum, Hash)>] StoreProfile data, response status code and response headers
427
+ def replace_store_profile_by_id_with_http_info(store_profile_id, store_profile, opts = {})
428
+ if api_client.config.debugging
429
+ api_client.config.logger.debug 'Calling API: StoreProfile.replace_store_profile_by_id ...'
430
+ end
431
+ # verify the required parameter 'store_profile_id' is set
432
+ if api_client.config.client_side_validation && store_profile_id.nil?
433
+ fail ArgumentError, "Missing the required parameter 'store_profile_id' when calling StoreProfile.replace_store_profile_by_id"
434
+ end
435
+ # verify the required parameter 'store_profile' is set
436
+ if api_client.config.client_side_validation && store_profile.nil?
437
+ fail ArgumentError, "Missing the required parameter 'store_profile' when calling StoreProfile.replace_store_profile_by_id"
438
+ end
439
+ # resource path
440
+ local_var_path = '/storeProfiles/{storeProfileId}'.sub('{' + 'storeProfileId' + '}', store_profile_id.to_s)
441
+
442
+ # query parameters
443
+ query_params = opts
444
+
445
+ # header parameters
446
+ header_params = {}
447
+ # HTTP header 'Accept' (if needed)
448
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
449
+ # HTTP header 'Content-Type'
450
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
451
+
452
+ # form parameters
453
+ form_params = {}
454
+
455
+ # http body (model)
456
+ post_body = api_client.object_to_http_body(store_profile)
457
+ auth_names = []
458
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
459
+ :header_params => header_params,
460
+ :query_params => query_params,
461
+ :form_params => form_params,
462
+ :body => post_body,
463
+ :auth_names => auth_names,
464
+ :return_type => 'StoreProfile')
465
+ if api_client.config.debugging
466
+ api_client.config.logger.debug "API called: StoreProfile#replace_store_profile_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
467
+ end
468
+ return data, status_code, headers
469
+ end
470
+ # Update StoreProfile
471
+ # Update attributes of StoreProfile
472
+ # @param store_profile_id ID of storeProfile to update.
473
+ # @param store_profile Attributes of storeProfile to update.
474
+ # @param [Hash] opts the optional parameters
475
+ # @return [StoreProfile]
476
+ def update_store_profile_by_id(store_profile_id, store_profile, opts = {})
477
+ data, _status_code, _headers = update_store_profile_by_id_with_http_info(store_profile_id, store_profile, opts)
478
+ data
479
+ end
480
+
481
+ # Update StoreProfile
482
+ # Update attributes of StoreProfile
483
+ # @param store_profile_id ID of storeProfile to update.
484
+ # @param store_profile Attributes of storeProfile to update.
485
+ # @param [Hash] opts the optional parameters
486
+ # @return [Array<(StoreProfile, Fixnum, Hash)>] StoreProfile data, response status code and response headers
487
+ def update_store_profile_by_id_with_http_info(store_profile_id, store_profile, opts = {})
488
+ if api_client.config.debugging
489
+ api_client.config.logger.debug 'Calling API: StoreProfile.update_store_profile_by_id ...'
490
+ end
491
+ # verify the required parameter 'store_profile_id' is set
492
+ if api_client.config.client_side_validation && store_profile_id.nil?
493
+ fail ArgumentError, "Missing the required parameter 'store_profile_id' when calling StoreProfile.update_store_profile_by_id"
494
+ end
495
+ # verify the required parameter 'store_profile' is set
496
+ if api_client.config.client_side_validation && store_profile.nil?
497
+ fail ArgumentError, "Missing the required parameter 'store_profile' when calling StoreProfile.update_store_profile_by_id"
498
+ end
499
+ # resource path
500
+ local_var_path = '/storeProfiles/{storeProfileId}'.sub('{' + 'storeProfileId' + '}', store_profile_id.to_s)
501
+
502
+ # query parameters
503
+ query_params = opts
504
+
505
+ # header parameters
506
+ header_params = {}
507
+ # HTTP header 'Accept' (if needed)
508
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
509
+ # HTTP header 'Content-Type'
510
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
511
+
512
+ # form parameters
513
+ form_params = {}
514
+
515
+ # http body (model)
516
+ post_body = api_client.object_to_http_body(store_profile)
517
+ auth_names = []
518
+ data, status_code, headers = api_client.call_api(:PATCH, local_var_path,
519
+ :header_params => header_params,
520
+ :query_params => query_params,
521
+ :form_params => form_params,
522
+ :body => post_body,
523
+ :auth_names => auth_names,
524
+ :return_type => 'StoreProfile')
525
+ if api_client.config.debugging
526
+ api_client.config.logger.debug "API called: StoreProfile#update_store_profile_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
527
+ end
528
+ return data, status_code, headers
529
+ end
530
+ end
531
+ end
532
+ end