ultracart_api 4.1.82 → 4.1.84

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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -8
  3. data/docs/AutoOrderItemCancelRequest.md +3 -1
  4. data/docs/ConversationAgentStatusEvent.md +2 -0
  5. data/docs/ConversationPbxCallAgent.md +2 -0
  6. data/docs/Item.md +2 -0
  7. data/docs/ItemApi.md +328 -167
  8. data/docs/ItemGatedCode.md +24 -0
  9. data/docs/{ItemShippingDistributionCenterResponse.md → ItemGatedCodeResponse.md} +4 -4
  10. data/docs/ItemGatedCodesRequest.md +18 -0
  11. data/docs/ItemGatedCodesResponse.md +26 -0
  12. data/docs/ItemGenerateGatedCodesRequest.md +22 -0
  13. data/lib/ultracart_api/api/item_api.rb +423 -226
  14. data/lib/ultracart_api/models/auto_order_item_cancel_request.rb +14 -2
  15. data/lib/ultracart_api/models/conversation_agent_status_event.rb +11 -1
  16. data/lib/ultracart_api/models/conversation_pbx_call_agent.rb +11 -1
  17. data/lib/ultracart_api/models/item.rb +13 -1
  18. data/lib/ultracart_api/models/item_gated_code.rb +265 -0
  19. data/lib/ultracart_api/models/{item_shipping_distribution_center_response.rb → item_gated_code_response.rb} +10 -10
  20. data/lib/ultracart_api/models/{item_inventory_update_request.rb → item_gated_codes_request.rb} +12 -12
  21. data/lib/ultracart_api/models/item_gated_codes_response.rb +259 -0
  22. data/lib/ultracart_api/models/{item_inventory_update.rb → item_generate_gated_codes_request.rb} +27 -25
  23. data/lib/ultracart_api/models/order_query.rb +2 -2
  24. data/lib/ultracart_api/version.rb +1 -1
  25. data/lib/ultracart_api.rb +5 -3
  26. metadata +12 -8
  27. data/docs/ItemInventoryUpdate.md +0 -22
  28. data/docs/ItemInventoryUpdateRequest.md +0 -18
@@ -15,7 +15,10 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class AutoOrderItemCancelRequest
18
- # Optional tiebreaker when more than one item on the auto order shares the same original_item_id. When present, the item with this oid is targeted and its original_item_id must match the URL path parameter (safety check). Leave unset for the common case of a unique original_item_id.
18
+ # Specifying these items allows for an easier immutable item contact. Validation will occur before any operations take place. After the end/remove operation is successful, append these additional item(s) to the auto order. The changes will be available in the response if the expansion includes items.
19
+ attr_accessor :append_items
20
+
21
+ # Optional tiebreaker when more than one item on the auto order shares the same original_item_id. When present, the item with this oid is targeted and its original_item_id must match the URL path parameter (safety check). Leave unset for the common case of a unique original_item_id. For reference the order_item.item_reference_oid is the same value as auto_order_item.auto_order_item_oid UNLESS the a manual edit took place AFTER the original order was placed.
19
22
  attr_accessor :auto_order_item_oid
20
23
 
21
24
  # Cancellation mode. 'end' soft-cancels the item by setting no_order_after_dts to the current time, preserving the row for reporting. 'remove' hard-deletes the item from the auto order. Defaults to 'end' (the less destructive option) when omitted.
@@ -46,6 +49,7 @@ module UltracartClient
46
49
  # Attribute mapping from ruby-style variable name to JSON key.
47
50
  def self.attribute_map
48
51
  {
52
+ :'append_items' => :'append_items',
49
53
  :'auto_order_item_oid' => :'auto_order_item_oid',
50
54
  :'mode' => :'mode'
51
55
  }
@@ -59,6 +63,7 @@ module UltracartClient
59
63
  # Attribute type mapping.
60
64
  def self.openapi_types
61
65
  {
66
+ :'append_items' => :'Array<AutoOrderItem>',
62
67
  :'auto_order_item_oid' => :'Integer',
63
68
  :'mode' => :'String'
64
69
  }
@@ -85,6 +90,12 @@ module UltracartClient
85
90
  h[k.to_sym] = v
86
91
  }
87
92
 
93
+ if attributes.key?(:'append_items')
94
+ if (value = attributes[:'append_items']).is_a?(Array)
95
+ self.append_items = value
96
+ end
97
+ end
98
+
88
99
  if attributes.key?(:'auto_order_item_oid')
89
100
  self.auto_order_item_oid = attributes[:'auto_order_item_oid']
90
101
  end
@@ -124,6 +135,7 @@ module UltracartClient
124
135
  def ==(o)
125
136
  return true if self.equal?(o)
126
137
  self.class == o.class &&
138
+ append_items == o.append_items &&
127
139
  auto_order_item_oid == o.auto_order_item_oid &&
128
140
  mode == o.mode
129
141
  end
@@ -137,7 +149,7 @@ module UltracartClient
137
149
  # Calculates hash code according to all attributes.
138
150
  # @return [Integer] Hash code
139
151
  def hash
140
- [auto_order_item_oid, mode].hash
152
+ [append_items, auto_order_item_oid, mode].hash
141
153
  end
142
154
 
143
155
  # Builds the object from hash
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ConversationAgentStatusEvent
18
+ # Agent identifier — voice_identity for PBX (e.g. 'client:login'), participant_arn for chat, synthetic 'ai:<user_id>' for AI flag events. Stable across an agent's events; participates in DDB pk and GSI1 sk.
19
+ attr_accessor :agent_identifier
20
+
18
21
  # Agent display name at the time of the event
19
22
  attr_accessor :agent_name
20
23
 
@@ -88,6 +91,7 @@ module UltracartClient
88
91
  # Attribute mapping from ruby-style variable name to JSON key.
89
92
  def self.attribute_map
90
93
  {
94
+ :'agent_identifier' => :'agent_identifier',
91
95
  :'agent_name' => :'agent_name',
92
96
  :'agent_type' => :'agent_type',
93
97
  :'agent_user_id' => :'agent_user_id',
@@ -115,6 +119,7 @@ module UltracartClient
115
119
  # Attribute type mapping.
116
120
  def self.openapi_types
117
121
  {
122
+ :'agent_identifier' => :'String',
118
123
  :'agent_name' => :'String',
119
124
  :'agent_type' => :'String',
120
125
  :'agent_user_id' => :'String',
@@ -155,6 +160,10 @@ module UltracartClient
155
160
  h[k.to_sym] = v
156
161
  }
157
162
 
163
+ if attributes.key?(:'agent_identifier')
164
+ self.agent_identifier = attributes[:'agent_identifier']
165
+ end
166
+
158
167
  if attributes.key?(:'agent_name')
159
168
  self.agent_name = attributes[:'agent_name']
160
169
  end
@@ -358,6 +367,7 @@ module UltracartClient
358
367
  def ==(o)
359
368
  return true if self.equal?(o)
360
369
  self.class == o.class &&
370
+ agent_identifier == o.agent_identifier &&
361
371
  agent_name == o.agent_name &&
362
372
  agent_type == o.agent_type &&
363
373
  agent_user_id == o.agent_user_id &&
@@ -385,7 +395,7 @@ module UltracartClient
385
395
  # Calculates hash code according to all attributes.
386
396
  # @return [Integer] Hash code
387
397
  def hash
388
- [agent_name, agent_type, agent_user_id, channel, custom_status_name, custom_status_uuid, duration_in_previous_seconds, event_dts, event_uuid, merchant_id, new_routing_effect, new_status, parent_merchant_id, previous_routing_effect, previous_status, trigger].hash
398
+ [agent_identifier, agent_name, agent_type, agent_user_id, channel, custom_status_name, custom_status_uuid, duration_in_previous_seconds, event_dts, event_uuid, merchant_id, new_routing_effect, new_status, parent_merchant_id, previous_routing_effect, previous_status, trigger].hash
389
399
  end
390
400
 
391
401
  # Builds the object from hash
@@ -24,6 +24,9 @@ module UltracartClient
24
24
  # Display name of the agent
25
25
  attr_accessor :agent_name
26
26
 
27
+ # UltraCart user id for the agent (denormalized at index time so reporting endpoints can join on agent_user_id without translating from the agent_id login).
28
+ attr_accessor :agent_user_id
29
+
27
30
  # Whether the agent answered the call
28
31
  attr_accessor :answered
29
32
 
@@ -48,6 +51,7 @@ module UltracartClient
48
51
  :'agent_extension' => :'agent_extension',
49
52
  :'agent_id' => :'agent_id',
50
53
  :'agent_name' => :'agent_name',
54
+ :'agent_user_id' => :'agent_user_id',
51
55
  :'answered' => :'answered',
52
56
  :'call_sid' => :'call_sid',
53
57
  :'joined_at_dts' => :'joined_at_dts',
@@ -68,6 +72,7 @@ module UltracartClient
68
72
  :'agent_extension' => :'String',
69
73
  :'agent_id' => :'String',
70
74
  :'agent_name' => :'String',
75
+ :'agent_user_id' => :'String',
71
76
  :'answered' => :'Boolean',
72
77
  :'call_sid' => :'String',
73
78
  :'joined_at_dts' => :'String',
@@ -110,6 +115,10 @@ module UltracartClient
110
115
  self.agent_name = attributes[:'agent_name']
111
116
  end
112
117
 
118
+ if attributes.key?(:'agent_user_id')
119
+ self.agent_user_id = attributes[:'agent_user_id']
120
+ end
121
+
113
122
  if attributes.key?(:'answered')
114
123
  self.answered = attributes[:'answered']
115
124
  end
@@ -156,6 +165,7 @@ module UltracartClient
156
165
  agent_extension == o.agent_extension &&
157
166
  agent_id == o.agent_id &&
158
167
  agent_name == o.agent_name &&
168
+ agent_user_id == o.agent_user_id &&
159
169
  answered == o.answered &&
160
170
  call_sid == o.call_sid &&
161
171
  joined_at_dts == o.joined_at_dts &&
@@ -173,7 +183,7 @@ module UltracartClient
173
183
  # Calculates hash code according to all attributes.
174
184
  # @return [Integer] Hash code
175
185
  def hash
176
- [agent_extension, agent_id, agent_name, answered, call_sid, joined_at_dts, left_at_dts, role, worker_sid].hash
186
+ [agent_extension, agent_id, agent_name, agent_user_id, answered, call_sid, joined_at_dts, left_at_dts, role, worker_sid].hash
177
187
  end
178
188
 
179
189
  # Builds the object from hash
@@ -52,6 +52,9 @@ module UltracartClient
52
52
  # Fulfillment Add-ons
53
53
  attr_accessor :fulfillment_addons
54
54
 
55
+ # Gated access codes for this item. Read-only on this object. Use the /items/{merchant_item_oid}/gated_codes endpoints to manage.
56
+ attr_accessor :gated_codes
57
+
55
58
  attr_accessor :gift_certificate
56
59
 
57
60
  attr_accessor :google_product_search
@@ -156,6 +159,7 @@ module UltracartClient
156
159
  :'email_notifications' => :'email_notifications',
157
160
  :'enrollment123' => :'enrollment123',
158
161
  :'fulfillment_addons' => :'fulfillment_addons',
162
+ :'gated_codes' => :'gated_codes',
159
163
  :'gift_certificate' => :'gift_certificate',
160
164
  :'google_product_search' => :'google_product_search',
161
165
  :'identifiers' => :'identifiers',
@@ -218,6 +222,7 @@ module UltracartClient
218
222
  :'email_notifications' => :'ItemEmailNotifications',
219
223
  :'enrollment123' => :'ItemEnrollment123',
220
224
  :'fulfillment_addons' => :'Array<ItemFulfillmentAddon>',
225
+ :'gated_codes' => :'Array<ItemGatedCode>',
221
226
  :'gift_certificate' => :'ItemGiftCertificate',
222
227
  :'google_product_search' => :'ItemGoogleProductSearch',
223
228
  :'identifiers' => :'ItemIdentifiers',
@@ -345,6 +350,12 @@ module UltracartClient
345
350
  end
346
351
  end
347
352
 
353
+ if attributes.key?(:'gated_codes')
354
+ if (value = attributes[:'gated_codes']).is_a?(Array)
355
+ self.gated_codes = value
356
+ end
357
+ end
358
+
348
359
  if attributes.key?(:'gift_certificate')
349
360
  self.gift_certificate = attributes[:'gift_certificate']
350
361
  end
@@ -575,6 +586,7 @@ module UltracartClient
575
586
  email_notifications == o.email_notifications &&
576
587
  enrollment123 == o.enrollment123 &&
577
588
  fulfillment_addons == o.fulfillment_addons &&
589
+ gated_codes == o.gated_codes &&
578
590
  gift_certificate == o.gift_certificate &&
579
591
  google_product_search == o.google_product_search &&
580
592
  identifiers == o.identifiers &&
@@ -621,7 +633,7 @@ module UltracartClient
621
633
  # Calculates hash code according to all attributes.
622
634
  # @return [Integer] Hash code
623
635
  def hash
624
- [accounting, amember, auto_order, ccbill, channel_partner_item_mappings, chargeback, checkout, content, creation_dts, description, description_translated_text_instance_oid, digital_delivery, ebay, email_notifications, enrollment123, fulfillment_addons, gift_certificate, google_product_search, identifiers, inactive, instant_payment_notifications, internal, kit, kit_component_only, kit_definition, last_modified_dts, merchant_id, merchant_item_id, merchant_item_oid, options, parent_category_id, parent_category_path, payment_processing, physical, pricing, properties, realtime_pricing, recommend_replenishment_days, related, reporting, restriction, revguard, reviews, salesforce, shipping, tags, tax, third_party_email_marketing, variant_items, variations, wishlist_member].hash
636
+ [accounting, amember, auto_order, ccbill, channel_partner_item_mappings, chargeback, checkout, content, creation_dts, description, description_translated_text_instance_oid, digital_delivery, ebay, email_notifications, enrollment123, fulfillment_addons, gated_codes, gift_certificate, google_product_search, identifiers, inactive, instant_payment_notifications, internal, kit, kit_component_only, kit_definition, last_modified_dts, merchant_id, merchant_item_id, merchant_item_oid, options, parent_category_id, parent_category_path, payment_processing, physical, pricing, properties, realtime_pricing, recommend_replenishment_days, related, reporting, restriction, revguard, reviews, salesforce, shipping, tags, tax, third_party_email_marketing, variant_items, variations, wishlist_member].hash
625
637
  end
626
638
 
627
639
  # Builds the object from hash
@@ -0,0 +1,265 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ItemGatedCode
18
+ # The access code a customer must enter at checkout.
19
+ attr_accessor :code
20
+
21
+ # Date/time the code was added.
22
+ attr_accessor :created_dts
23
+
24
+ # Internal identifier; populated by the server on insert.
25
+ attr_accessor :merchant_item_gated_code_oid
26
+
27
+ # Item this code is associated with.
28
+ attr_accessor :merchant_item_oid
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'code' => :'code',
34
+ :'created_dts' => :'created_dts',
35
+ :'merchant_item_gated_code_oid' => :'merchant_item_gated_code_oid',
36
+ :'merchant_item_oid' => :'merchant_item_oid'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'code' => :'String',
49
+ :'created_dts' => :'String',
50
+ :'merchant_item_gated_code_oid' => :'Integer',
51
+ :'merchant_item_oid' => :'Integer'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemGatedCode` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemGatedCode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'code')
77
+ self.code = attributes[:'code']
78
+ end
79
+
80
+ if attributes.key?(:'created_dts')
81
+ self.created_dts = attributes[:'created_dts']
82
+ end
83
+
84
+ if attributes.key?(:'merchant_item_gated_code_oid')
85
+ self.merchant_item_gated_code_oid = attributes[:'merchant_item_gated_code_oid']
86
+ end
87
+
88
+ if attributes.key?(:'merchant_item_oid')
89
+ self.merchant_item_oid = attributes[:'merchant_item_oid']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ if !@code.nil? && @code.to_s.length > 255
98
+ invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 255.')
99
+ end
100
+
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ return false if !@code.nil? && @code.to_s.length > 255
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param [Object] code Value to be assigned
113
+ def code=(code)
114
+ if !code.nil? && code.to_s.length > 255
115
+ fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 255.'
116
+ end
117
+
118
+ @code = code
119
+ end
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param [Object] Object to be compared
123
+ def ==(o)
124
+ return true if self.equal?(o)
125
+ self.class == o.class &&
126
+ code == o.code &&
127
+ created_dts == o.created_dts &&
128
+ merchant_item_gated_code_oid == o.merchant_item_gated_code_oid &&
129
+ merchant_item_oid == o.merchant_item_oid
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [code, created_dts, merchant_item_gated_code_oid, merchant_item_oid].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ new.build_from_hash(attributes)
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ self.class.openapi_types.each_pair do |key, type|
158
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
159
+ self.send("#{key}=", nil)
160
+ elsif type =~ /\AArray<(.*)>/i
161
+ # check to ensure the input is an array given that the attribute
162
+ # is documented as an array but the input is not
163
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
164
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
165
+ end
166
+ elsif !attributes[self.class.attribute_map[key]].nil?
167
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
168
+ end
169
+ end
170
+
171
+ self
172
+ end
173
+
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def _deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = UltracartClient.const_get(type)
213
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+
263
+ end
264
+
265
+ end
@@ -14,10 +14,10 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module UltracartClient
17
- class ItemShippingDistributionCenterResponse
17
+ class ItemGatedCodeResponse
18
18
  attr_accessor :error
19
19
 
20
- attr_accessor :item_shipping_distribution_center
20
+ attr_accessor :gated_code
21
21
 
22
22
  attr_accessor :metadata
23
23
 
@@ -30,7 +30,7 @@ module UltracartClient
30
30
  def self.attribute_map
31
31
  {
32
32
  :'error' => :'error',
33
- :'item_shipping_distribution_center' => :'itemShippingDistributionCenter',
33
+ :'gated_code' => :'gatedCode',
34
34
  :'metadata' => :'metadata',
35
35
  :'success' => :'success',
36
36
  :'warning' => :'warning'
@@ -46,7 +46,7 @@ module UltracartClient
46
46
  def self.openapi_types
47
47
  {
48
48
  :'error' => :'Error',
49
- :'item_shipping_distribution_center' => :'ItemShippingDistributionCenter',
49
+ :'gated_code' => :'ItemGatedCode',
50
50
  :'metadata' => :'ResponseMetadata',
51
51
  :'success' => :'Boolean',
52
52
  :'warning' => :'Warning'
@@ -63,13 +63,13 @@ module UltracartClient
63
63
  # @param [Hash] attributes Model attributes in the form of hash
64
64
  def initialize(attributes = {})
65
65
  if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemShippingDistributionCenterResponse` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemGatedCodeResponse` initialize method"
67
67
  end
68
68
 
69
69
  # check to see if the attribute exists and convert string to symbol for hash key
70
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
71
71
  if (!self.class.attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemShippingDistributionCenterResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemGatedCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
73
  end
74
74
  h[k.to_sym] = v
75
75
  }
@@ -78,8 +78,8 @@ module UltracartClient
78
78
  self.error = attributes[:'error']
79
79
  end
80
80
 
81
- if attributes.key?(:'item_shipping_distribution_center')
82
- self.item_shipping_distribution_center = attributes[:'item_shipping_distribution_center']
81
+ if attributes.key?(:'gated_code')
82
+ self.gated_code = attributes[:'gated_code']
83
83
  end
84
84
 
85
85
  if attributes.key?(:'metadata')
@@ -114,7 +114,7 @@ module UltracartClient
114
114
  return true if self.equal?(o)
115
115
  self.class == o.class &&
116
116
  error == o.error &&
117
- item_shipping_distribution_center == o.item_shipping_distribution_center &&
117
+ gated_code == o.gated_code &&
118
118
  metadata == o.metadata &&
119
119
  success == o.success &&
120
120
  warning == o.warning
@@ -129,7 +129,7 @@ module UltracartClient
129
129
  # Calculates hash code according to all attributes.
130
130
  # @return [Integer] Hash code
131
131
  def hash
132
- [error, item_shipping_distribution_center, metadata, success, warning].hash
132
+ [error, gated_code, metadata, success, warning].hash
133
133
  end
134
134
 
135
135
  # Builds the object from hash
@@ -14,14 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module UltracartClient
17
- class ItemInventoryUpdateRequest
18
- # Inventory updates array
19
- attr_accessor :inventory_updates
17
+ class ItemGatedCodesRequest
18
+ # gated_codes
19
+ attr_accessor :gated_codes
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
22
22
  def self.attribute_map
23
23
  {
24
- :'inventory_updates' => :'inventory_updates'
24
+ :'gated_codes' => :'gatedCodes'
25
25
  }
26
26
  end
27
27
 
@@ -33,7 +33,7 @@ module UltracartClient
33
33
  # Attribute type mapping.
34
34
  def self.openapi_types
35
35
  {
36
- :'inventory_updates' => :'Array<ItemInventoryUpdate>'
36
+ :'gated_codes' => :'Array<ItemGatedCode>'
37
37
  }
38
38
  end
39
39
 
@@ -47,20 +47,20 @@ module UltracartClient
47
47
  # @param [Hash] attributes Model attributes in the form of hash
48
48
  def initialize(attributes = {})
49
49
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemInventoryUpdateRequest` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemGatedCodesRequest` initialize method"
51
51
  end
52
52
 
53
53
  # check to see if the attribute exists and convert string to symbol for hash key
54
54
  attributes = attributes.each_with_object({}) { |(k, v), h|
55
55
  if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemInventoryUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemGatedCodesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
57
  end
58
58
  h[k.to_sym] = v
59
59
  }
60
60
 
61
- if attributes.key?(:'inventory_updates')
62
- if (value = attributes[:'inventory_updates']).is_a?(Array)
63
- self.inventory_updates = value
61
+ if attributes.key?(:'gated_codes')
62
+ if (value = attributes[:'gated_codes']).is_a?(Array)
63
+ self.gated_codes = value
64
64
  end
65
65
  end
66
66
  end
@@ -83,7 +83,7 @@ module UltracartClient
83
83
  def ==(o)
84
84
  return true if self.equal?(o)
85
85
  self.class == o.class &&
86
- inventory_updates == o.inventory_updates
86
+ gated_codes == o.gated_codes
87
87
  end
88
88
 
89
89
  # @see the `==` method
@@ -95,7 +95,7 @@ module UltracartClient
95
95
  # Calculates hash code according to all attributes.
96
96
  # @return [Integer] Hash code
97
97
  def hash
98
- [inventory_updates].hash
98
+ [gated_codes].hash
99
99
  end
100
100
 
101
101
  # Builds the object from hash