ultracart_api 4.1.83 → 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.
- checksums.yaml +4 -4
- data/README.md +14 -8
- data/docs/Item.md +2 -0
- data/docs/ItemApi.md +328 -167
- data/docs/ItemGatedCode.md +24 -0
- data/docs/{ItemShippingDistributionCenterResponse.md → ItemGatedCodeResponse.md} +4 -4
- data/docs/ItemGatedCodesRequest.md +18 -0
- data/docs/ItemGatedCodesResponse.md +26 -0
- data/docs/ItemGenerateGatedCodesRequest.md +22 -0
- data/lib/ultracart_api/api/item_api.rb +423 -226
- data/lib/ultracart_api/models/item.rb +13 -1
- data/lib/ultracart_api/models/item_gated_code.rb +265 -0
- data/lib/ultracart_api/models/{item_shipping_distribution_center_response.rb → item_gated_code_response.rb} +10 -10
- data/lib/ultracart_api/models/{item_inventory_update_request.rb → item_gated_codes_request.rb} +12 -12
- data/lib/ultracart_api/models/item_gated_codes_response.rb +259 -0
- data/lib/ultracart_api/models/{item_inventory_update.rb → item_generate_gated_codes_request.rb} +27 -25
- data/lib/ultracart_api/models/order_query.rb +2 -2
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -3
- metadata +12 -8
- data/docs/ItemInventoryUpdate.md +0 -22
- data/docs/ItemInventoryUpdateRequest.md +0 -18
|
@@ -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
|
|
17
|
+
class ItemGatedCodeResponse
|
|
18
18
|
attr_accessor :error
|
|
19
19
|
|
|
20
|
-
attr_accessor :
|
|
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
|
-
:'
|
|
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
|
-
:'
|
|
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::
|
|
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::
|
|
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?(:'
|
|
82
|
-
self.
|
|
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
|
-
|
|
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,
|
|
132
|
+
[error, gated_code, metadata, success, warning].hash
|
|
133
133
|
end
|
|
134
134
|
|
|
135
135
|
# Builds the object from hash
|
data/lib/ultracart_api/models/{item_inventory_update_request.rb → item_gated_codes_request.rb}
RENAMED
|
@@ -14,14 +14,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module UltracartClient
|
|
17
|
-
class
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
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
|
-
:'
|
|
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
|
-
:'
|
|
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::
|
|
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::
|
|
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?(:'
|
|
62
|
-
if (value = attributes[:'
|
|
63
|
-
self.
|
|
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
|
-
|
|
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
|
-
[
|
|
98
|
+
[gated_codes].hash
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
# Builds the object from hash
|