ultracart_api 4.1.83 → 4.1.85

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.
@@ -785,6 +785,132 @@ module UltracartClient
785
785
  return data, status_code, headers
786
786
  end
787
787
 
788
+ # Retrieve a value histogram for a given AR transaction-detail name
789
+ # For the calling merchant's Accounts Receivable orders, returns a value -> document-count histogram for the named transaction detail, optionally scoped to transactions on the named gateway. Drives the AR filter modal's autocomplete on the detail-value input.
790
+ # @param detail [String] The transaction-detail name to histogram.
791
+ # @param [Hash] opts the optional parameters
792
+ # @option opts [String] :gateway The gateway name to scope to (optional).
793
+ # @return [nil]
794
+ def get_accounts_receivable_detail_value_histogram(detail, opts = {})
795
+ get_accounts_receivable_detail_value_histogram_with_http_info(detail, opts)
796
+ nil
797
+ end
798
+
799
+ # Retrieve a value histogram for a given AR transaction-detail name
800
+ # For the calling merchant's Accounts Receivable orders, returns a value -> document-count histogram for the named transaction detail, optionally scoped to transactions on the named gateway. Drives the AR filter modal's autocomplete on the detail-value input.
801
+ # @param detail [String] The transaction-detail name to histogram.
802
+ # @param [Hash] opts the optional parameters
803
+ # @option opts [String] :gateway The gateway name to scope to (optional).
804
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
805
+ def get_accounts_receivable_detail_value_histogram_with_http_info(detail, opts = {})
806
+ if @api_client.config.debugging
807
+ @api_client.config.logger.debug 'Calling API: OrderApi.get_accounts_receivable_detail_value_histogram ...'
808
+ end
809
+ # verify the required parameter 'detail' is set
810
+ if @api_client.config.client_side_validation && detail.nil?
811
+ fail ArgumentError, "Missing the required parameter 'detail' when calling OrderApi.get_accounts_receivable_detail_value_histogram"
812
+ end
813
+ # resource path
814
+ local_var_path = '/order/accounts_receivable/detail_value_histogram'
815
+
816
+ # query parameters
817
+ query_params = opts[:query_params] || {}
818
+ query_params[:'detail'] = detail
819
+ query_params[:'gateway'] = opts[:'gateway'] if !opts[:'gateway'].nil?
820
+
821
+ # header parameters
822
+ header_params = opts[:header_params] || {}
823
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
824
+ # HTTP header 'Accept' (if needed)
825
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
826
+
827
+ # form parameters
828
+ form_params = opts[:form_params] || {}
829
+
830
+ # http body (model)
831
+ post_body = opts[:debug_body]
832
+
833
+ # return_type
834
+ return_type = opts[:debug_return_type]
835
+
836
+ # auth_names
837
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
838
+
839
+ new_options = opts.merge(
840
+ :operation => :"OrderApi.get_accounts_receivable_detail_value_histogram",
841
+ :header_params => header_params,
842
+ :query_params => query_params,
843
+ :form_params => form_params,
844
+ :body => post_body,
845
+ :auth_names => auth_names,
846
+ :return_type => return_type
847
+ )
848
+
849
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
850
+ if @api_client.config.debugging
851
+ @api_client.config.logger.debug "API called: OrderApi#get_accounts_receivable_detail_value_histogram\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
852
+ end
853
+ return data, status_code, headers
854
+ end
855
+
856
+ # Retrieve gateway / detail-name picker data for the AR filter modal
857
+ # For the calling merchant's Accounts Receivable orders, returns the distinct payment gateway names paired with the set of transaction-detail names observed on those gateways. Drives the cascading gateway / detail-name pickers in the AR filter modal.
858
+ # @param [Hash] opts the optional parameters
859
+ # @return [nil]
860
+ def get_accounts_receivable_gateway_detail_names(opts = {})
861
+ get_accounts_receivable_gateway_detail_names_with_http_info(opts)
862
+ nil
863
+ end
864
+
865
+ # Retrieve gateway / detail-name picker data for the AR filter modal
866
+ # For the calling merchant&#39;s Accounts Receivable orders, returns the distinct payment gateway names paired with the set of transaction-detail names observed on those gateways. Drives the cascading gateway / detail-name pickers in the AR filter modal.
867
+ # @param [Hash] opts the optional parameters
868
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
869
+ def get_accounts_receivable_gateway_detail_names_with_http_info(opts = {})
870
+ if @api_client.config.debugging
871
+ @api_client.config.logger.debug 'Calling API: OrderApi.get_accounts_receivable_gateway_detail_names ...'
872
+ end
873
+ # resource path
874
+ local_var_path = '/order/accounts_receivable/gateway_detail_names'
875
+
876
+ # query parameters
877
+ query_params = opts[:query_params] || {}
878
+
879
+ # header parameters
880
+ header_params = opts[:header_params] || {}
881
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
882
+ # HTTP header 'Accept' (if needed)
883
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
884
+
885
+ # form parameters
886
+ form_params = opts[:form_params] || {}
887
+
888
+ # http body (model)
889
+ post_body = opts[:debug_body]
890
+
891
+ # return_type
892
+ return_type = opts[:debug_return_type]
893
+
894
+ # auth_names
895
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
896
+
897
+ new_options = opts.merge(
898
+ :operation => :"OrderApi.get_accounts_receivable_gateway_detail_names",
899
+ :header_params => header_params,
900
+ :query_params => query_params,
901
+ :form_params => form_params,
902
+ :body => post_body,
903
+ :auth_names => auth_names,
904
+ :return_type => return_type
905
+ )
906
+
907
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
908
+ if @api_client.config.debugging
909
+ @api_client.config.logger.debug "API called: OrderApi#get_accounts_receivable_gateway_detail_names\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
910
+ end
911
+ return data, status_code, headers
912
+ end
913
+
788
914
  # Retrieve A/R Retry Configuration
789
915
  # Retrieve A/R Retry Configuration. This is primarily an internal API call. It is doubtful you would ever need to use it.
790
916
  # @param [Hash] opts the optional parameters
@@ -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