ultracart_api 4.0.91.rc → 4.0.92.rc

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25e96decee5cbe02863dcc5160000d54e507905f01913e73db395dd3dafe38b7
4
- data.tar.gz: d0234a670742c2e73a2ec200744a37bfbd8e196fce69c9c5ce84948de6e3e0e4
3
+ metadata.gz: ae6d6c91f2d56c781d104f23dc2c1eaea6afd896d6b98851a8ccc5e23cd2fa79
4
+ data.tar.gz: 67f3a2b96ddedcaf7df9c58755e03f508aac23882ad889cdbb5f1c9d4173ce10
5
5
  SHA512:
6
- metadata.gz: 6e462ee027c6940f14e00e0ccb0d432243cbf7e25d4bd7b2e23d5e12fb45abc6d2f49acc44ca74733d8be1ecd087dacf6a9106898ba6fa1dd3fd93abac538e1f
7
- data.tar.gz: 6f6188975dc9a196609a95b56ed5da4520204fd1b9b97223c36b68de3c5424cdd56b7e8fd3f64484994f229cb962fca2cc855a9648f6a93c2411f0db22784f56
6
+ metadata.gz: 2ce397257a46176a459e1acd43e0219ac9a73424ce777fd38a637a4e6c9ec849f8e0cb7cd95b5ff869b16d80a0b0016bd3aa34975b61896d482e15915c3a25fb
7
+ data.tar.gz: c70599f3b8572c72d9fee31e86a1ce854d8421ac5604b40fe83880dc2ea15efbf49d72956d37582d2de90877af07ea57c76ba156580f387079800c57a7a197e5
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.91.rc
10
+ - Package version: 4.0.92.rc
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.91.rc.gem
27
+ gem install ./ultracart_api-4.0.92.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.91.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.92.rc.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.91.rc'
36
+ gem 'ultracart_api', '~> 4.0.92.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -567,6 +567,7 @@ Class | Method | HTTP request | Description
567
567
  - [UltracartClient::CartUpsellAfter](docs/CartUpsellAfter.md)
568
568
  - [UltracartClient::CartValidationRequest](docs/CartValidationRequest.md)
569
569
  - [UltracartClient::CartValidationResponse](docs/CartValidationResponse.md)
570
+ - [UltracartClient::ChannelPartner](docs/ChannelPartner.md)
570
571
  - [UltracartClient::ChannelPartnerCancelResponse](docs/ChannelPartnerCancelResponse.md)
571
572
  - [UltracartClient::ChannelPartnerEstimateShippingResponse](docs/ChannelPartnerEstimateShippingResponse.md)
572
573
  - [UltracartClient::ChannelPartnerEstimateTaxResponse](docs/ChannelPartnerEstimateTaxResponse.md)
@@ -689,6 +690,7 @@ Class | Method | HTTP request | Description
689
690
  - [UltracartClient::CustomerAttachment](docs/CustomerAttachment.md)
690
691
  - [UltracartClient::CustomerBilling](docs/CustomerBilling.md)
691
692
  - [UltracartClient::CustomerCard](docs/CustomerCard.md)
693
+ - [UltracartClient::CustomerEDI](docs/CustomerEDI.md)
692
694
  - [UltracartClient::CustomerEditorValues](docs/CustomerEditorValues.md)
693
695
  - [UltracartClient::CustomerEmail](docs/CustomerEmail.md)
694
696
  - [UltracartClient::CustomerEmailListChanges](docs/CustomerEmailListChanges.md)
@@ -1234,6 +1236,7 @@ Not every change is committed to every SDK.
1234
1236
 
1235
1237
  | Version | Date | Comments |
1236
1238
  | --: | :-: | --- |
1239
+ | 4.0.92-RC | 12/06/2022 | customer api - expose edi information and editor values |
1237
1240
  | 4.0.91-RC | 12/02/2022 | conversations - customer last unresponded dts |
1238
1241
  | 4.0.90-RC | 11/30/2022 | conversations - add order and auto order information to webchat context |
1239
1242
  | 4.0.89-RC | 11/30/2022 | order item - addl fields for linking kits to kit components |
@@ -0,0 +1,30 @@
1
+ # UltracartClient::ChannelPartner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **channel_partner_oid** | **Integer** | Channel partner object id | [optional] |
8
+ | **code** | **String** | Code associated with the channel partner | [optional] |
9
+ | **communication_method** | **String** | Communication method of the channel partner | [optional] |
10
+ | **inactive** | **Boolean** | True if the channel partner is inactive | [optional] |
11
+ | **merchant_id** | **String** | Merchant ID of the channel partner | [optional] |
12
+ | **name** | **String** | Name of the channel partner | [optional] |
13
+ | **skip_customer_emails** | **Boolean** | True if emails to the customer are skipped for this channel partner. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'ultracart_api'
19
+
20
+ instance = UltracartClient::ChannelPartner.new(
21
+ channel_partner_oid: null,
22
+ code: null,
23
+ communication_method: null,
24
+ inactive: null,
25
+ merchant_id: null,
26
+ name: null,
27
+ skip_customer_emails: null
28
+ )
29
+ ```
30
+
data/docs/Customer.md CHANGED
@@ -23,6 +23,7 @@
23
23
  | **customer_profile_oid** | **Integer** | Customer profile object identifier | [optional] |
24
24
  | **dhl_account_number** | **String** | DHL account number | [optional] |
25
25
  | **dhl_duty_account_number** | **String** | DHL duty account number | [optional] |
26
+ | **edi** | [**CustomerEDI**](CustomerEDI.md) | | [optional] |
26
27
  | **email** | **String** | Email address of this customer profile | [optional] |
27
28
  | **exempt_shipping_handling_charge** | **Boolean** | Exempt shipping handling charge | [optional] |
28
29
  | **fedex_account_number** | **String** | FedEx account number | [optional] |
@@ -90,6 +91,7 @@ instance = UltracartClient::Customer.new(
90
91
  customer_profile_oid: null,
91
92
  dhl_account_number: null,
92
93
  dhl_duty_account_number: null,
94
+ edi: null,
93
95
  email: null,
94
96
  exempt_shipping_handling_charge: null,
95
97
  fedex_account_number: null,
@@ -0,0 +1,22 @@
1
+ # UltracartClient::CustomerEDI
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **channel_partner_oid** | **Integer** | EDI channel partner this customer profile is associated with | [optional] |
8
+ | **distribution_center_number** | **String** | The EDI distribution center number associated with this customer profile. | [optional] |
9
+ | **store_number** | **String** | The EDI store number associated with this customer profile. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::CustomerEDI.new(
17
+ channel_partner_oid: null,
18
+ distribution_center_number: null,
19
+ store_number: null
20
+ )
21
+ ```
22
+
@@ -9,6 +9,7 @@
9
9
  | **card_exp_years** | **Array<String>** | card_exp_years | [optional] |
10
10
  | **card_types** | **Array<String>** | card_types | [optional] |
11
11
  | **countries** | [**Array<Country>**](Country.md) | countries | [optional] |
12
+ | **edi_channel_partners** | [**Array<ChannelPartner>**](ChannelPartner.md) | EDI channel partners | [optional] |
12
13
  | **loyalty_ledger_descriptions** | **Array<String>** | loyalty_ledger_descriptions | [optional] |
13
14
  | **loyalty_program_type** | **String** | loyalty_program_type | [optional] |
14
15
  | **qb_classes** | **Array<String>** | qb_classes | [optional] |
@@ -27,6 +28,7 @@ instance = UltracartClient::CustomerEditorValues.new(
27
28
  card_exp_years: null,
28
29
  card_types: null,
29
30
  countries: null,
31
+ edi_channel_partners: null,
30
32
  loyalty_ledger_descriptions: null,
31
33
  loyalty_program_type: null,
32
34
  qb_classes: null,
@@ -0,0 +1,280 @@
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 ChannelPartner
18
+ # Channel partner object id
19
+ attr_accessor :channel_partner_oid
20
+
21
+ # Code associated with the channel partner
22
+ attr_accessor :code
23
+
24
+ # Communication method of the channel partner
25
+ attr_accessor :communication_method
26
+
27
+ # True if the channel partner is inactive
28
+ attr_accessor :inactive
29
+
30
+ # Merchant ID of the channel partner
31
+ attr_accessor :merchant_id
32
+
33
+ # Name of the channel partner
34
+ attr_accessor :name
35
+
36
+ # True if emails to the customer are skipped for this channel partner.
37
+ attr_accessor :skip_customer_emails
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'channel_partner_oid' => :'channel_partner_oid',
43
+ :'code' => :'code',
44
+ :'communication_method' => :'communication_method',
45
+ :'inactive' => :'inactive',
46
+ :'merchant_id' => :'merchant_id',
47
+ :'name' => :'name',
48
+ :'skip_customer_emails' => :'skip_customer_emails'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'channel_partner_oid' => :'Integer',
61
+ :'code' => :'String',
62
+ :'communication_method' => :'String',
63
+ :'inactive' => :'Boolean',
64
+ :'merchant_id' => :'String',
65
+ :'name' => :'String',
66
+ :'skip_customer_emails' => :'Boolean'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChannelPartner` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChannelPartner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'channel_partner_oid')
92
+ self.channel_partner_oid = attributes[:'channel_partner_oid']
93
+ end
94
+
95
+ if attributes.key?(:'code')
96
+ self.code = attributes[:'code']
97
+ end
98
+
99
+ if attributes.key?(:'communication_method')
100
+ self.communication_method = attributes[:'communication_method']
101
+ end
102
+
103
+ if attributes.key?(:'inactive')
104
+ self.inactive = attributes[:'inactive']
105
+ end
106
+
107
+ if attributes.key?(:'merchant_id')
108
+ self.merchant_id = attributes[:'merchant_id']
109
+ end
110
+
111
+ if attributes.key?(:'name')
112
+ self.name = attributes[:'name']
113
+ end
114
+
115
+ if attributes.key?(:'skip_customer_emails')
116
+ self.skip_customer_emails = attributes[:'skip_customer_emails']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ channel_partner_oid == o.channel_partner_oid &&
139
+ code == o.code &&
140
+ communication_method == o.communication_method &&
141
+ inactive == o.inactive &&
142
+ merchant_id == o.merchant_id &&
143
+ name == o.name &&
144
+ skip_customer_emails == o.skip_customer_emails
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [channel_partner_oid, code, communication_method, inactive, merchant_id, name, skip_customer_emails].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ new.build_from_hash(attributes)
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ attributes = attributes.transform_keys(&:to_sym)
172
+ self.class.openapi_types.each_pair do |key, type|
173
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
174
+ self.send("#{key}=", nil)
175
+ elsif type =~ /\AArray<(.*)>/i
176
+ # check to ensure the input is an array given that the attribute
177
+ # is documented as an array but the input is not
178
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
179
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
180
+ end
181
+ elsif !attributes[self.class.attribute_map[key]].nil?
182
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
183
+ end
184
+ end
185
+
186
+ self
187
+ end
188
+
189
+ # Deserializes the data based on type
190
+ # @param string type Data type
191
+ # @param string value Value to be deserialized
192
+ # @return [Object] Deserialized data
193
+ def _deserialize(type, value)
194
+ case type.to_sym
195
+ when :Time
196
+ Time.parse(value)
197
+ when :Date
198
+ Date.parse(value)
199
+ when :String
200
+ value.to_s
201
+ when :Integer
202
+ value.to_i
203
+ when :Float
204
+ value.to_f
205
+ when :Boolean
206
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
+ true
208
+ else
209
+ false
210
+ end
211
+ when :Object
212
+ # generic object (usually a Hash), return directly
213
+ value
214
+ when /\AArray<(?<inner_type>.+)>\z/
215
+ inner_type = Regexp.last_match[:inner_type]
216
+ value.map { |v| _deserialize(inner_type, v) }
217
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
218
+ k_type = Regexp.last_match[:k_type]
219
+ v_type = Regexp.last_match[:v_type]
220
+ {}.tap do |hash|
221
+ value.each do |k, v|
222
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
223
+ end
224
+ end
225
+ else # model
226
+ # models (e.g. Pet) or oneOf
227
+ klass = UltracartClient.const_get(type)
228
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
229
+ end
230
+ end
231
+
232
+ # Returns the string representation of the object
233
+ # @return [String] String presentation of the object
234
+ def to_s
235
+ to_hash.to_s
236
+ end
237
+
238
+ # to_body is an alias to to_hash (backward compatibility)
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_body
241
+ to_hash
242
+ end
243
+
244
+ # Returns the object in the form of hash
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_hash
247
+ hash = {}
248
+ self.class.attribute_map.each_pair do |attr, param|
249
+ value = self.send(attr)
250
+ if value.nil?
251
+ is_nullable = self.class.openapi_nullable.include?(attr)
252
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
253
+ end
254
+
255
+ hash[param] = _to_hash(value)
256
+ end
257
+ hash
258
+ end
259
+
260
+ # Outputs non-array value in the form of hash
261
+ # For object, use to_hash. Otherwise, just return the value
262
+ # @param [Object] value Any valid value
263
+ # @return [Hash] Returns the value in the form of hash
264
+ def _to_hash(value)
265
+ if value.is_a?(Array)
266
+ value.compact.map { |v| _to_hash(v) }
267
+ elsif value.is_a?(Hash)
268
+ {}.tap do |hash|
269
+ value.each { |k, v| hash[k] = _to_hash(v) }
270
+ end
271
+ elsif value.respond_to? :to_hash
272
+ value.to_hash
273
+ else
274
+ value
275
+ end
276
+ end
277
+
278
+ end
279
+
280
+ end
@@ -71,6 +71,8 @@ module UltracartClient
71
71
  # DHL duty account number
72
72
  attr_accessor :dhl_duty_account_number
73
73
 
74
+ attr_accessor :edi
75
+
74
76
  # Email address of this customer profile
75
77
  attr_accessor :email
76
78
 
@@ -210,6 +212,7 @@ module UltracartClient
210
212
  :'customer_profile_oid' => :'customer_profile_oid',
211
213
  :'dhl_account_number' => :'dhl_account_number',
212
214
  :'dhl_duty_account_number' => :'dhl_duty_account_number',
215
+ :'edi' => :'edi',
213
216
  :'email' => :'email',
214
217
  :'exempt_shipping_handling_charge' => :'exempt_shipping_handling_charge',
215
218
  :'fedex_account_number' => :'fedex_account_number',
@@ -281,6 +284,7 @@ module UltracartClient
281
284
  :'customer_profile_oid' => :'Integer',
282
285
  :'dhl_account_number' => :'String',
283
286
  :'dhl_duty_account_number' => :'String',
287
+ :'edi' => :'CustomerEDI',
284
288
  :'email' => :'String',
285
289
  :'exempt_shipping_handling_charge' => :'Boolean',
286
290
  :'fedex_account_number' => :'String',
@@ -430,6 +434,10 @@ module UltracartClient
430
434
  self.dhl_duty_account_number = attributes[:'dhl_duty_account_number']
431
435
  end
432
436
 
437
+ if attributes.key?(:'edi')
438
+ self.edi = attributes[:'edi']
439
+ end
440
+
433
441
  if attributes.key?(:'email')
434
442
  self.email = attributes[:'email']
435
443
  end
@@ -809,6 +817,7 @@ module UltracartClient
809
817
  customer_profile_oid == o.customer_profile_oid &&
810
818
  dhl_account_number == o.dhl_account_number &&
811
819
  dhl_duty_account_number == o.dhl_duty_account_number &&
820
+ edi == o.edi &&
812
821
  email == o.email &&
813
822
  exempt_shipping_handling_charge == o.exempt_shipping_handling_charge &&
814
823
  fedex_account_number == o.fedex_account_number &&
@@ -861,7 +870,7 @@ module UltracartClient
861
870
  # Calculates hash code according to all attributes.
862
871
  # @return [Integer] Hash code
863
872
  def hash
864
- [activity, affiliate_oid, allow_3rd_party_billing, allow_cod, allow_drop_shipping, allow_purchase_order, allow_quote_request, allow_selection_of_address_type, attachments, auto_approve_cod, auto_approve_purchase_order, automatic_merchant_notes, billing, business_notes, cards, cc_emails, customer_profile_oid, dhl_account_number, dhl_duty_account_number, email, exempt_shipping_handling_charge, fedex_account_number, free_shipping, free_shipping_minimum, last_modified_by, last_modified_dts, loyalty, maximum_item_count, merchant_id, minimum_item_count, minimum_subtotal, no_coupons, no_free_shipping, no_realtime_charge, orders, orders_summary, password, pricing_tiers, privacy, qb_class, qb_code, quotes, quotes_summary, referral_source, reviewer, sales_rep_code, send_signup_notification, shipping, signup_dts, software_entitlements, suppress_buysafe, tags, tax_codes, tax_exempt, tax_id, terms, track_separately, unapproved, ups_account_number, website_url].hash
873
+ [activity, affiliate_oid, allow_3rd_party_billing, allow_cod, allow_drop_shipping, allow_purchase_order, allow_quote_request, allow_selection_of_address_type, attachments, auto_approve_cod, auto_approve_purchase_order, automatic_merchant_notes, billing, business_notes, cards, cc_emails, customer_profile_oid, dhl_account_number, dhl_duty_account_number, edi, email, exempt_shipping_handling_charge, fedex_account_number, free_shipping, free_shipping_minimum, last_modified_by, last_modified_dts, loyalty, maximum_item_count, merchant_id, minimum_item_count, minimum_subtotal, no_coupons, no_free_shipping, no_realtime_charge, orders, orders_summary, password, pricing_tiers, privacy, qb_class, qb_code, quotes, quotes_summary, referral_source, reviewer, sales_rep_code, send_signup_notification, shipping, signup_dts, software_entitlements, suppress_buysafe, tags, tax_codes, tax_exempt, tax_id, terms, track_separately, unapproved, ups_account_number, website_url].hash
865
874
  end
866
875
 
867
876
  # Builds the object from hash
@@ -0,0 +1,240 @@
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 CustomerEDI
18
+ # EDI channel partner this customer profile is associated with
19
+ attr_accessor :channel_partner_oid
20
+
21
+ # The EDI distribution center number associated with this customer profile.
22
+ attr_accessor :distribution_center_number
23
+
24
+ # The EDI store number associated with this customer profile.
25
+ attr_accessor :store_number
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'channel_partner_oid' => :'channel_partner_oid',
31
+ :'distribution_center_number' => :'distribution_center_number',
32
+ :'store_number' => :'store_number'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'channel_partner_oid' => :'Integer',
45
+ :'distribution_center_number' => :'String',
46
+ :'store_number' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomerEDI` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomerEDI`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'channel_partner_oid')
72
+ self.channel_partner_oid = attributes[:'channel_partner_oid']
73
+ end
74
+
75
+ if attributes.key?(:'distribution_center_number')
76
+ self.distribution_center_number = attributes[:'distribution_center_number']
77
+ end
78
+
79
+ if attributes.key?(:'store_number')
80
+ self.store_number = attributes[:'store_number']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ channel_partner_oid == o.channel_partner_oid &&
103
+ distribution_center_number == o.distribution_center_number &&
104
+ store_number == o.store_number
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [channel_partner_oid, distribution_center_number, store_number].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = UltracartClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -30,6 +30,9 @@ module UltracartClient
30
30
  # countries
31
31
  attr_accessor :countries
32
32
 
33
+ # EDI channel partners
34
+ attr_accessor :edi_channel_partners
35
+
33
36
  # loyalty_ledger_descriptions
34
37
  attr_accessor :loyalty_ledger_descriptions
35
38
 
@@ -56,6 +59,7 @@ module UltracartClient
56
59
  :'card_exp_years' => :'card_exp_years',
57
60
  :'card_types' => :'card_types',
58
61
  :'countries' => :'countries',
62
+ :'edi_channel_partners' => :'edi_channel_partners',
59
63
  :'loyalty_ledger_descriptions' => :'loyalty_ledger_descriptions',
60
64
  :'loyalty_program_type' => :'loyalty_program_type',
61
65
  :'qb_classes' => :'qb_classes',
@@ -78,6 +82,7 @@ module UltracartClient
78
82
  :'card_exp_years' => :'Array<String>',
79
83
  :'card_types' => :'Array<String>',
80
84
  :'countries' => :'Array<Country>',
85
+ :'edi_channel_partners' => :'Array<ChannelPartner>',
81
86
  :'loyalty_ledger_descriptions' => :'Array<String>',
82
87
  :'loyalty_program_type' => :'String',
83
88
  :'qb_classes' => :'Array<String>',
@@ -138,6 +143,12 @@ module UltracartClient
138
143
  end
139
144
  end
140
145
 
146
+ if attributes.key?(:'edi_channel_partners')
147
+ if (value = attributes[:'edi_channel_partners']).is_a?(Array)
148
+ self.edi_channel_partners = value
149
+ end
150
+ end
151
+
141
152
  if attributes.key?(:'loyalty_ledger_descriptions')
142
153
  if (value = attributes[:'loyalty_ledger_descriptions']).is_a?(Array)
143
154
  self.loyalty_ledger_descriptions = value
@@ -196,6 +207,7 @@ module UltracartClient
196
207
  card_exp_years == o.card_exp_years &&
197
208
  card_types == o.card_types &&
198
209
  countries == o.countries &&
210
+ edi_channel_partners == o.edi_channel_partners &&
199
211
  loyalty_ledger_descriptions == o.loyalty_ledger_descriptions &&
200
212
  loyalty_program_type == o.loyalty_program_type &&
201
213
  qb_classes == o.qb_classes &&
@@ -213,7 +225,7 @@ module UltracartClient
213
225
  # Calculates hash code according to all attributes.
214
226
  # @return [Integer] Hash code
215
227
  def hash
216
- [affiliates, card_exp_months, card_exp_years, card_types, countries, loyalty_ledger_descriptions, loyalty_program_type, qb_classes, sales_rep_codes, state_optional_countries, terms].hash
228
+ [affiliates, card_exp_months, card_exp_years, card_types, countries, edi_channel_partners, loyalty_ledger_descriptions, loyalty_program_type, qb_classes, sales_rep_codes, state_optional_countries, terms].hash
217
229
  end
218
230
 
219
231
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.91.rc'
14
+ VERSION = '4.0.92.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -114,6 +114,7 @@ require 'ultracart_api/models/cart_taxes'
114
114
  require 'ultracart_api/models/cart_upsell_after'
115
115
  require 'ultracart_api/models/cart_validation_request'
116
116
  require 'ultracart_api/models/cart_validation_response'
117
+ require 'ultracart_api/models/channel_partner'
117
118
  require 'ultracart_api/models/channel_partner_cancel_response'
118
119
  require 'ultracart_api/models/channel_partner_estimate_shipping_response'
119
120
  require 'ultracart_api/models/channel_partner_estimate_tax_response'
@@ -236,6 +237,7 @@ require 'ultracart_api/models/customer_affiliate'
236
237
  require 'ultracart_api/models/customer_attachment'
237
238
  require 'ultracart_api/models/customer_billing'
238
239
  require 'ultracart_api/models/customer_card'
240
+ require 'ultracart_api/models/customer_edi'
239
241
  require 'ultracart_api/models/customer_editor_values'
240
242
  require 'ultracart_api/models/customer_email'
241
243
  require 'ultracart_api/models/customer_email_list_changes'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.91.rc
4
+ version: 4.0.92.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-02 00:00:00.000000000 Z
11
+ date: 2022-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -160,6 +160,7 @@ files:
160
160
  - docs/CartUpsellAfter.md
161
161
  - docs/CartValidationRequest.md
162
162
  - docs/CartValidationResponse.md
163
+ - docs/ChannelPartner.md
163
164
  - docs/ChannelPartnerApi.md
164
165
  - docs/ChannelPartnerCancelResponse.md
165
166
  - docs/ChannelPartnerEstimateShippingResponse.md
@@ -288,6 +289,7 @@ files:
288
289
  - docs/CustomerAttachment.md
289
290
  - docs/CustomerBilling.md
290
291
  - docs/CustomerCard.md
292
+ - docs/CustomerEDI.md
291
293
  - docs/CustomerEditorValues.md
292
294
  - docs/CustomerEmail.md
293
295
  - docs/CustomerEmailListChanges.md
@@ -892,6 +894,7 @@ files:
892
894
  - lib/ultracart_api/models/cart_upsell_after.rb
893
895
  - lib/ultracart_api/models/cart_validation_request.rb
894
896
  - lib/ultracart_api/models/cart_validation_response.rb
897
+ - lib/ultracart_api/models/channel_partner.rb
895
898
  - lib/ultracart_api/models/channel_partner_cancel_response.rb
896
899
  - lib/ultracart_api/models/channel_partner_estimate_shipping_response.rb
897
900
  - lib/ultracart_api/models/channel_partner_estimate_tax_response.rb
@@ -1014,6 +1017,7 @@ files:
1014
1017
  - lib/ultracart_api/models/customer_attachment.rb
1015
1018
  - lib/ultracart_api/models/customer_billing.rb
1016
1019
  - lib/ultracart_api/models/customer_card.rb
1020
+ - lib/ultracart_api/models/customer_edi.rb
1017
1021
  - lib/ultracart_api/models/customer_editor_values.rb
1018
1022
  - lib/ultracart_api/models/customer_email.rb
1019
1023
  - lib/ultracart_api/models/customer_email_list_changes.rb