ultracart_api 3.10.118 → 3.10.119

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: 2a1e12c962ef45d3a3abdd0c2d436029ed9955b6017086ee23bb1c0162a60ff2
4
- data.tar.gz: 32d4887c8eefe35d745959c1d5b7b32aa03f6fd3b852531b23931c172cf43d2d
3
+ metadata.gz: 5b2632cb45c345d2423a388b3b6b937211914e8d4a96be721503d470ff857e0f
4
+ data.tar.gz: c9fb31bc8611b4774323653157a13bd436e120cf1c69e3c4a72cf156b915ad4b
5
5
  SHA512:
6
- metadata.gz: ec19b5df3ef7cce59ac26e5aa6a8930d32207e024f73b804ed8fafe942a3c0a37ab2684cbaf4914bfddfafa4c63018785a51301613a6dc842fd2a368d5a441b0
7
- data.tar.gz: e1b971890362d6502fa47bc9050eaa34f9c107619e41f380d31be876c7c3718ae8216af4b87b1144c6efa49d9bd00b9029dc63c6e8de63ba851e7cd0de9832d7
6
+ metadata.gz: 852716c1539873a1c5fd40ea0c198d81daa3f9d8cc9597645e2e07ca4cc3b1ed700e495079dd80106f8a2b5f65c5820559e86c87b1b097d40d6e84e0f587ef0d
7
+ data.tar.gz: 7acd76691d0e603839147056319e1805adc9a33ed9d351270e2987c7faf4dfed38ce17237349f501ff2272fd1863e3ddf67ea846721dec89860dbb508f6600ae
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.10.118
10
+ - Package version: 3.10.119
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.10.118.gem
27
+ gem install ./ultracart_api-3.10.119.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.118.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.119.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.10.118'
35
+ gem 'ultracart_api', '~> 3.10.119'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -1086,6 +1086,7 @@ Class | Method | HTTP request | Description
1086
1086
  - [UltracartClient::OrderQuery](docs/OrderQuery.md)
1087
1087
  - [UltracartClient::OrderQueryBatch](docs/OrderQueryBatch.md)
1088
1088
  - [UltracartClient::OrderQuote](docs/OrderQuote.md)
1089
+ - [UltracartClient::OrderReason](docs/OrderReason.md)
1089
1090
  - [UltracartClient::OrderRefundableResponse](docs/OrderRefundableResponse.md)
1090
1091
  - [UltracartClient::OrderReplacement](docs/OrderReplacement.md)
1091
1092
  - [UltracartClient::OrderReplacementItem](docs/OrderReplacementItem.md)
@@ -1302,6 +1303,7 @@ Not every change is committed to every SDK.
1302
1303
 
1303
1304
  | Version | Date | Comments |
1304
1305
  | --: | :-: | --- |
1306
+ | 3.10.119 | 02/20/2023 | refund reasons |
1305
1307
  | 3.10.118 | 02/17/2023 | convo api - smsUnsubscribeConversation method |
1306
1308
  | 3.10.117 | 02/15/2023 | added auto order sorting by next_shipment_dts |
1307
1309
  | 3.10.116 | 02/10/2023 | convo - add storefront_host_name to search request |
data/docs/Order.md CHANGED
@@ -32,7 +32,9 @@ Name | Type | Description | Notes
32
32
  **properties** | [**Array<OrderProperty>**](OrderProperty.md) | Properties, available only through update, not through insert due to the nature of how properties are handled internally | [optional]
33
33
  **quote** | [**OrderQuote**](OrderQuote.md) | | [optional]
34
34
  **refund_dts** | **String** | If the order was refunded, the date/time that the last refund occurred | [optional]
35
+ **refund_reason** | **String** | Refund reason code. This can only be written during a refund operation otherwise this field is read only. | [optional]
35
36
  **reject_dts** | **String** | If the order was rejected, the date/time that the rejection occurred | [optional]
37
+ **reject_reason** | **String** | Reject reason code. This can only be written during a reject operation otherwise this field is read only. | [optional]
36
38
  **salesforce** | [**OrderSalesforce**](OrderSalesforce.md) | | [optional]
37
39
  **shipping** | [**OrderShipping**](OrderShipping.md) | | [optional]
38
40
  **summary** | [**OrderSummary**](OrderSummary.md) | | [optional]
data/docs/OrderItem.md CHANGED
@@ -46,6 +46,8 @@ Name | Type | Description | Notes
46
46
  **quantity** | **Float** | Quantity | [optional]
47
47
  **quantity_refunded** | **Float** | Quantity refunded on this item (read only except refund operation) | [optional]
48
48
  **quickbooks_class** | **String** | QuickBooks class | [optional]
49
+ **refund_reason** | **String** | Refund reason code. This can only be written during a refund operation otherwise this field is read only. | [optional]
50
+ **return_reason** | **String** | Return reason code. This can only be written during a refund operation otherwise this field is read only. | [optional]
49
51
  **ship_separately** | **BOOLEAN** | True if this item ships in a separate box | [optional]
50
52
  **shipped_by_user** | **String** | Shipped by user | [optional]
51
53
  **shipped_dts** | **String** | Date/time that this item was marked shipped | [optional]
@@ -0,0 +1,10 @@
1
+ # UltracartClient::OrderReason
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **default_reason** | **BOOLEAN** | Default reason | [optional]
7
+ **description** | **String** | Reason description. This is the friendly description of the reason that should be displayed to the user. | [optional]
8
+ **value** | **String** | Reason value. This is what should be submitted with a refund operation. | [optional]
9
+
10
+
@@ -4,7 +4,13 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **error** | [**Error**](Error.md) | | [optional]
7
+ **item_level_refund_reason_required** | **BOOLEAN** | True if the item level refund reason is required | [optional]
8
+ **item_level_refund_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reason codes available at the item level. | [optional]
9
+ **item_level_return_reasons** | [**Array<OrderReason>**](OrderReason.md) | Return codes available at the item level. | [optional]
7
10
  **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
11
+ **order_level_refund_reason_required** | **BOOLEAN** | True if the order level refund reason is required | [optional]
12
+ **order_level_refund_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reason codes available at the order level. | [optional]
13
+ **order_level_reject_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reject codes available at the order level. | [optional]
8
14
  **refundable** | **BOOLEAN** | Whether the order is refundable or not. Null should be interpreted as false. | [optional]
9
15
  **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
10
16
  **warning** | [**Warning**](Warning.md) | | [optional]
@@ -84,9 +84,15 @@ module UltracartClient
84
84
  # If the order was refunded, the date/time that the last refund occurred
85
85
  attr_accessor :refund_dts
86
86
 
87
+ # Refund reason code. This can only be written during a refund operation otherwise this field is read only.
88
+ attr_accessor :refund_reason
89
+
87
90
  # If the order was rejected, the date/time that the rejection occurred
88
91
  attr_accessor :reject_dts
89
92
 
93
+ # Reject reason code. This can only be written during a reject operation otherwise this field is read only.
94
+ attr_accessor :reject_reason
95
+
90
96
  attr_accessor :salesforce
91
97
 
92
98
  attr_accessor :shipping
@@ -155,7 +161,9 @@ module UltracartClient
155
161
  :'properties' => :'properties',
156
162
  :'quote' => :'quote',
157
163
  :'refund_dts' => :'refund_dts',
164
+ :'refund_reason' => :'refund_reason',
158
165
  :'reject_dts' => :'reject_dts',
166
+ :'reject_reason' => :'reject_reason',
159
167
  :'salesforce' => :'salesforce',
160
168
  :'shipping' => :'shipping',
161
169
  :'summary' => :'summary',
@@ -197,7 +205,9 @@ module UltracartClient
197
205
  :'properties' => :'Array<OrderProperty>',
198
206
  :'quote' => :'OrderQuote',
199
207
  :'refund_dts' => :'String',
208
+ :'refund_reason' => :'String',
200
209
  :'reject_dts' => :'String',
210
+ :'reject_reason' => :'String',
201
211
  :'salesforce' => :'OrderSalesforce',
202
212
  :'shipping' => :'OrderShipping',
203
213
  :'summary' => :'OrderSummary',
@@ -339,10 +349,18 @@ module UltracartClient
339
349
  self.refund_dts = attributes[:'refund_dts']
340
350
  end
341
351
 
352
+ if attributes.has_key?(:'refund_reason')
353
+ self.refund_reason = attributes[:'refund_reason']
354
+ end
355
+
342
356
  if attributes.has_key?(:'reject_dts')
343
357
  self.reject_dts = attributes[:'reject_dts']
344
358
  end
345
359
 
360
+ if attributes.has_key?(:'reject_reason')
361
+ self.reject_reason = attributes[:'reject_reason']
362
+ end
363
+
346
364
  if attributes.has_key?(:'salesforce')
347
365
  self.salesforce = attributes[:'salesforce']
348
366
  end
@@ -461,7 +479,9 @@ module UltracartClient
461
479
  properties == o.properties &&
462
480
  quote == o.quote &&
463
481
  refund_dts == o.refund_dts &&
482
+ refund_reason == o.refund_reason &&
464
483
  reject_dts == o.reject_dts &&
484
+ reject_reason == o.reject_reason &&
465
485
  salesforce == o.salesforce &&
466
486
  shipping == o.shipping &&
467
487
  summary == o.summary &&
@@ -479,7 +499,7 @@ module UltracartClient
479
499
  # Calculates hash code according to all attributes.
480
500
  # @return [Fixnum] Hash code
481
501
  def hash
482
- [affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, reject_dts, salesforce, shipping, summary, tags, taxes, utms].hash
502
+ [affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, refund_reason, reject_dts, reject_reason, salesforce, shipping, summary, tags, taxes, utms].hash
483
503
  end
484
504
 
485
505
  # Builds the object from hash
@@ -136,6 +136,12 @@ module UltracartClient
136
136
  # QuickBooks class
137
137
  attr_accessor :quickbooks_class
138
138
 
139
+ # Refund reason code. This can only be written during a refund operation otherwise this field is read only.
140
+ attr_accessor :refund_reason
141
+
142
+ # Return reason code. This can only be written during a refund operation otherwise this field is read only.
143
+ attr_accessor :return_reason
144
+
139
145
  # True if this item ships in a separate box
140
146
  attr_accessor :ship_separately
141
147
 
@@ -246,6 +252,8 @@ module UltracartClient
246
252
  :'quantity' => :'quantity',
247
253
  :'quantity_refunded' => :'quantity_refunded',
248
254
  :'quickbooks_class' => :'quickbooks_class',
255
+ :'refund_reason' => :'refund_reason',
256
+ :'return_reason' => :'return_reason',
249
257
  :'ship_separately' => :'ship_separately',
250
258
  :'shipped_by_user' => :'shipped_by_user',
251
259
  :'shipped_dts' => :'shipped_dts',
@@ -311,6 +319,8 @@ module UltracartClient
311
319
  :'quantity' => :'Float',
312
320
  :'quantity_refunded' => :'Float',
313
321
  :'quickbooks_class' => :'String',
322
+ :'refund_reason' => :'String',
323
+ :'return_reason' => :'String',
314
324
  :'ship_separately' => :'BOOLEAN',
315
325
  :'shipped_by_user' => :'String',
316
326
  :'shipped_dts' => :'String',
@@ -516,6 +526,14 @@ module UltracartClient
516
526
  self.quickbooks_class = attributes[:'quickbooks_class']
517
527
  end
518
528
 
529
+ if attributes.has_key?(:'refund_reason')
530
+ self.refund_reason = attributes[:'refund_reason']
531
+ end
532
+
533
+ if attributes.has_key?(:'return_reason')
534
+ self.return_reason = attributes[:'return_reason']
535
+ end
536
+
519
537
  if attributes.has_key?(:'ship_separately')
520
538
  self.ship_separately = attributes[:'ship_separately']
521
539
  end
@@ -761,6 +779,8 @@ module UltracartClient
761
779
  quantity == o.quantity &&
762
780
  quantity_refunded == o.quantity_refunded &&
763
781
  quickbooks_class == o.quickbooks_class &&
782
+ refund_reason == o.refund_reason &&
783
+ return_reason == o.return_reason &&
764
784
  ship_separately == o.ship_separately &&
765
785
  shipped_by_user == o.shipped_by_user &&
766
786
  shipped_dts == o.shipped_dts &&
@@ -788,7 +808,7 @@ module UltracartClient
788
808
  # Calculates hash code according to all attributes.
789
809
  # @return [Fixnum] Hash code
790
810
  def hash
791
- [accounting_code, activation_codes, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_index, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, parent_item_index, parent_merchant_item_id, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, ship_separately, shipped_by_user, shipped_dts, shipping_status, special_product_type, tags, tax_free, tax_product_type, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
811
+ [accounting_code, activation_codes, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_index, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, parent_item_index, parent_merchant_item_id, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, refund_reason, return_reason, ship_separately, shipped_by_user, shipped_dts, shipping_status, special_product_type, tags, tax_free, tax_product_type, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
792
812
  end
793
813
 
794
814
  # Builds the object from hash
@@ -0,0 +1,205 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class OrderReason
17
+ # Default reason
18
+ attr_accessor :default_reason
19
+
20
+ # Reason description. This is the friendly description of the reason that should be displayed to the user.
21
+ attr_accessor :description
22
+
23
+ # Reason value. This is what should be submitted with a refund operation.
24
+ attr_accessor :value
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'default_reason' => :'default_reason',
30
+ :'description' => :'description',
31
+ :'value' => :'value'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'default_reason' => :'BOOLEAN',
39
+ :'description' => :'String',
40
+ :'value' => :'String'
41
+ }
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
+
52
+ if attributes.has_key?(:'default_reason')
53
+ self.default_reason = attributes[:'default_reason']
54
+ end
55
+
56
+ if attributes.has_key?(:'description')
57
+ self.description = attributes[:'description']
58
+ end
59
+
60
+ if attributes.has_key?(:'value')
61
+ self.value = attributes[:'value']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ default_reason == o.default_reason &&
84
+ description == o.description &&
85
+ value == o.value
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Fixnum] Hash code
96
+ def hash
97
+ [default_reason, description, value].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :BOOLEAN
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ temp_model = UltracartClient.const_get(type).new
158
+ temp_model.build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ next if value.nil?
181
+ hash[param] = _to_hash(value)
182
+ end
183
+ hash
184
+ end
185
+
186
+ # Outputs non-array value in the form of hash
187
+ # For object, use to_hash. Otherwise, just return the value
188
+ # @param [Object] value Any valid value
189
+ # @return [Hash] Returns the value in the form of hash
190
+ def _to_hash(value)
191
+ if value.is_a?(Array)
192
+ value.compact.map { |v| _to_hash(v) }
193
+ elsif value.is_a?(Hash)
194
+ {}.tap do |hash|
195
+ value.each { |k, v| hash[k] = _to_hash(v) }
196
+ end
197
+ elsif value.respond_to? :to_hash
198
+ value.to_hash
199
+ else
200
+ value
201
+ end
202
+ end
203
+
204
+ end
205
+ end
@@ -16,8 +16,26 @@ module UltracartClient
16
16
  class OrderRefundableResponse
17
17
  attr_accessor :error
18
18
 
19
+ # True if the item level refund reason is required
20
+ attr_accessor :item_level_refund_reason_required
21
+
22
+ # Reason codes available at the item level.
23
+ attr_accessor :item_level_refund_reasons
24
+
25
+ # Return codes available at the item level.
26
+ attr_accessor :item_level_return_reasons
27
+
19
28
  attr_accessor :metadata
20
29
 
30
+ # True if the order level refund reason is required
31
+ attr_accessor :order_level_refund_reason_required
32
+
33
+ # Reason codes available at the order level.
34
+ attr_accessor :order_level_refund_reasons
35
+
36
+ # Reject codes available at the order level.
37
+ attr_accessor :order_level_reject_reasons
38
+
21
39
  # Whether the order is refundable or not. Null should be interpreted as false.
22
40
  attr_accessor :refundable
23
41
 
@@ -30,7 +48,13 @@ module UltracartClient
30
48
  def self.attribute_map
31
49
  {
32
50
  :'error' => :'error',
51
+ :'item_level_refund_reason_required' => :'item_level_refund_reason_required',
52
+ :'item_level_refund_reasons' => :'item_level_refund_reasons',
53
+ :'item_level_return_reasons' => :'item_level_return_reasons',
33
54
  :'metadata' => :'metadata',
55
+ :'order_level_refund_reason_required' => :'order_level_refund_reason_required',
56
+ :'order_level_refund_reasons' => :'order_level_refund_reasons',
57
+ :'order_level_reject_reasons' => :'order_level_reject_reasons',
34
58
  :'refundable' => :'refundable',
35
59
  :'success' => :'success',
36
60
  :'warning' => :'warning'
@@ -41,7 +65,13 @@ module UltracartClient
41
65
  def self.swagger_types
42
66
  {
43
67
  :'error' => :'Error',
68
+ :'item_level_refund_reason_required' => :'BOOLEAN',
69
+ :'item_level_refund_reasons' => :'Array<OrderReason>',
70
+ :'item_level_return_reasons' => :'Array<OrderReason>',
44
71
  :'metadata' => :'ResponseMetadata',
72
+ :'order_level_refund_reason_required' => :'BOOLEAN',
73
+ :'order_level_refund_reasons' => :'Array<OrderReason>',
74
+ :'order_level_reject_reasons' => :'Array<OrderReason>',
45
75
  :'refundable' => :'BOOLEAN',
46
76
  :'success' => :'BOOLEAN',
47
77
  :'warning' => :'Warning'
@@ -60,10 +90,42 @@ module UltracartClient
60
90
  self.error = attributes[:'error']
61
91
  end
62
92
 
93
+ if attributes.has_key?(:'item_level_refund_reason_required')
94
+ self.item_level_refund_reason_required = attributes[:'item_level_refund_reason_required']
95
+ end
96
+
97
+ if attributes.has_key?(:'item_level_refund_reasons')
98
+ if (value = attributes[:'item_level_refund_reasons']).is_a?(Array)
99
+ self.item_level_refund_reasons = value
100
+ end
101
+ end
102
+
103
+ if attributes.has_key?(:'item_level_return_reasons')
104
+ if (value = attributes[:'item_level_return_reasons']).is_a?(Array)
105
+ self.item_level_return_reasons = value
106
+ end
107
+ end
108
+
63
109
  if attributes.has_key?(:'metadata')
64
110
  self.metadata = attributes[:'metadata']
65
111
  end
66
112
 
113
+ if attributes.has_key?(:'order_level_refund_reason_required')
114
+ self.order_level_refund_reason_required = attributes[:'order_level_refund_reason_required']
115
+ end
116
+
117
+ if attributes.has_key?(:'order_level_refund_reasons')
118
+ if (value = attributes[:'order_level_refund_reasons']).is_a?(Array)
119
+ self.order_level_refund_reasons = value
120
+ end
121
+ end
122
+
123
+ if attributes.has_key?(:'order_level_reject_reasons')
124
+ if (value = attributes[:'order_level_reject_reasons']).is_a?(Array)
125
+ self.order_level_reject_reasons = value
126
+ end
127
+ end
128
+
67
129
  if attributes.has_key?(:'refundable')
68
130
  self.refundable = attributes[:'refundable']
69
131
  end
@@ -96,7 +158,13 @@ module UltracartClient
96
158
  return true if self.equal?(o)
97
159
  self.class == o.class &&
98
160
  error == o.error &&
161
+ item_level_refund_reason_required == o.item_level_refund_reason_required &&
162
+ item_level_refund_reasons == o.item_level_refund_reasons &&
163
+ item_level_return_reasons == o.item_level_return_reasons &&
99
164
  metadata == o.metadata &&
165
+ order_level_refund_reason_required == o.order_level_refund_reason_required &&
166
+ order_level_refund_reasons == o.order_level_refund_reasons &&
167
+ order_level_reject_reasons == o.order_level_reject_reasons &&
100
168
  refundable == o.refundable &&
101
169
  success == o.success &&
102
170
  warning == o.warning
@@ -111,7 +179,7 @@ module UltracartClient
111
179
  # Calculates hash code according to all attributes.
112
180
  # @return [Fixnum] Hash code
113
181
  def hash
114
- [error, metadata, refundable, success, warning].hash
182
+ [error, item_level_refund_reason_required, item_level_refund_reasons, item_level_return_reasons, metadata, order_level_refund_reason_required, order_level_refund_reasons, order_level_reject_reasons, refundable, success, warning].hash
115
183
  end
116
184
 
117
185
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.118'
14
+ VERSION = '3.10.119'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -610,6 +610,7 @@ require 'ultracart_api/models/order_property'
610
610
  require 'ultracart_api/models/order_query'
611
611
  require 'ultracart_api/models/order_query_batch'
612
612
  require 'ultracart_api/models/order_quote'
613
+ require 'ultracart_api/models/order_reason'
613
614
  require 'ultracart_api/models/order_refundable_response'
614
615
  require 'ultracart_api/models/order_replacement'
615
616
  require 'ultracart_api/models/order_replacement_item'
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: 3.10.118
4
+ version: 3.10.119
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-17 00:00:00.000000000 Z
11
+ date: 2023-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -828,6 +828,7 @@ files:
828
828
  - docs/OrderQuery.md
829
829
  - docs/OrderQueryBatch.md
830
830
  - docs/OrderQuote.md
831
+ - docs/OrderReason.md
831
832
  - docs/OrderRefundableResponse.md
832
833
  - docs/OrderReplacement.md
833
834
  - docs/OrderReplacementItem.md
@@ -1596,6 +1597,7 @@ files:
1596
1597
  - lib/ultracart_api/models/order_query.rb
1597
1598
  - lib/ultracart_api/models/order_query_batch.rb
1598
1599
  - lib/ultracart_api/models/order_quote.rb
1600
+ - lib/ultracart_api/models/order_reason.rb
1599
1601
  - lib/ultracart_api/models/order_refundable_response.rb
1600
1602
  - lib/ultracart_api/models/order_replacement.rb
1601
1603
  - lib/ultracart_api/models/order_replacement_item.rb