ultracart_api 4.1.70 → 4.1.71

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69b88c8f377abe4c258f2596ea4e535308b97fbf6efe2a717f755140d765c197
4
- data.tar.gz: ba05247f4eb23b62b456e53830b11027d47abae099fbe46928fc364fcbe22a95
3
+ metadata.gz: 3509f1bbed3d909218c3b613ee45440ce00c259d88e6b5ea29511af2b45ee3c5
4
+ data.tar.gz: 95c8c23311dc0fd905f76a946d6bb0d0948fb8b347294a4bb4dd286c149210e2
5
5
  SHA512:
6
- metadata.gz: 23f47bd84edce36c0bf5f724a8e381facaec5a8be8124fe4894decd8af81c4fc41a735ff5c8f26fdc77d987b207b691ccef5f722acbf9879112f697cc7669cd5
7
- data.tar.gz: 5305bc35dcf40acdacd65a5a92e69c3a5655258415381130d96abcd018d67b9fcdf84fbca54c016d11a8f63edc682d50b865f5fcecb160e6e48f9ef8f5373a3c
6
+ metadata.gz: b887af1f00b28af8be4fa98638e323092c11d3afc2607c68473f6ce6e1e195012817e3873a1a2f1b98f5680eb551a35390f68e95470107be7c90f95673d247f2
7
+ data.tar.gz: a28cfe2dbc3be03c66b3f698a7ec445544458bc4ef5c746f8271f3d4aa0207ea2fedb59bb98aa24cbc7abfc5a9f20324e9d5e6baee35ab4c16dc923ca160070a
data/README.md CHANGED
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
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.1.70
10
+ - Package version: 4.1.71
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  - For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
16
16
  gemfile:
17
17
 
18
18
  ```shell
19
- gem 'ultracart_api', '4.1.70'
19
+ gem 'ultracart_api', '4.1.71'
20
20
  ```
21
21
 
22
22
  install:
@@ -989,6 +989,7 @@ Class | Method | HTTP request | Description
989
989
  - [UltracartClient::CouponPercentOffItems](docs/CouponPercentOffItems.md)
990
990
  - [UltracartClient::CouponPercentOffItemsAndFreeShipping](docs/CouponPercentOffItemsAndFreeShipping.md)
991
991
  - [UltracartClient::CouponPercentOffItemsWithItemsPurchase](docs/CouponPercentOffItemsWithItemsPurchase.md)
992
+ - [UltracartClient::CouponPercentOffItemsWithMinimumItemAmount](docs/CouponPercentOffItemsWithMinimumItemAmount.md)
992
993
  - [UltracartClient::CouponPercentOffMsrpItems](docs/CouponPercentOffMsrpItems.md)
993
994
  - [UltracartClient::CouponPercentOffRetailPriceItems](docs/CouponPercentOffRetailPriceItems.md)
994
995
  - [UltracartClient::CouponPercentOffShipping](docs/CouponPercentOffShipping.md)
@@ -1686,6 +1687,7 @@ Not every change is committed to every SDK.
1686
1687
 
1687
1688
  | Version | Date | Comments |
1688
1689
  | --: | :-: | --- |
1690
+ | 4.1.71 | 04/06/2026 | coupons - new percent_off_items_with_minimum_item_amount |
1689
1691
  | 4.1.70 | 04/03/2026 | conversation pbx - queue callback settings |
1690
1692
  | 4.1.69 | 03/31/2026 | conversations - user specific audio methods |
1691
1693
  | 4.1.68 | 03/31/2026 | oauth - device support |
data/docs/Coupon.md CHANGED
@@ -49,6 +49,7 @@
49
49
  | **percent_off_items** | [**CouponPercentOffItems**](CouponPercentOffItems.md) | | [optional] |
50
50
  | **percent_off_items_and_free_shipping** | [**CouponPercentOffItemsAndFreeShipping**](CouponPercentOffItemsAndFreeShipping.md) | | [optional] |
51
51
  | **percent_off_items_with_items_purchase** | [**CouponPercentOffItemsWithItemsPurchase**](CouponPercentOffItemsWithItemsPurchase.md) | | [optional] |
52
+ | **percent_off_items_with_minimum_item_amount** | [**CouponPercentOffItemsWithMinimumItemAmount**](CouponPercentOffItemsWithMinimumItemAmount.md) | | [optional] |
52
53
  | **percent_off_msrp_items** | [**CouponPercentOffMsrpItems**](CouponPercentOffMsrpItems.md) | | [optional] |
53
54
  | **percent_off_retail_price_items** | [**CouponPercentOffRetailPriceItems**](CouponPercentOffRetailPriceItems.md) | | [optional] |
54
55
  | **percent_off_shipping** | [**CouponPercentOffShipping**](CouponPercentOffShipping.md) | | [optional] |
@@ -123,6 +124,7 @@ instance = UltracartClient::Coupon.new(
123
124
  percent_off_items: null,
124
125
  percent_off_items_and_free_shipping: null,
125
126
  percent_off_items_with_items_purchase: null,
127
+ percent_off_items_with_minimum_item_amount: null,
126
128
  percent_off_msrp_items: null,
127
129
  percent_off_retail_price_items: null,
128
130
  percent_off_shipping: null,
@@ -0,0 +1,32 @@
1
+ # UltracartClient::CouponPercentOffItemsWithMinimumItemAmount
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **currency_code** | **String** | The ISO-4217 three letter currency code the customer is viewing prices in | [optional] |
8
+ | **discount_percent** | **Float** | The percentage of subtotal discount | [optional] |
9
+ | **excluded_item_tags** | **Array<String>** | A list of item tags which cannot be discounted. | [optional] |
10
+ | **excluded_items** | **Array<String>** | A list of items which cannot be discounted. | [optional] |
11
+ | **item_tags** | **Array<String>** | An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items. | [optional] |
12
+ | **items** | **Array<String>** | An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items. | [optional] |
13
+ | **limit** | **Integer** | The (optional) maximum quantity of discounted items. | [optional] |
14
+ | **minimum_item_amount** | **Float** | The minimum item amount (dollars) required for the discount to apply | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'ultracart_api'
20
+
21
+ instance = UltracartClient::CouponPercentOffItemsWithMinimumItemAmount.new(
22
+ currency_code: null,
23
+ discount_percent: null,
24
+ excluded_item_tags: null,
25
+ excluded_items: null,
26
+ item_tags: null,
27
+ items: null,
28
+ limit: null,
29
+ minimum_item_amount: null
30
+ )
31
+ ```
32
+
@@ -116,6 +116,8 @@ module UltracartClient
116
116
 
117
117
  attr_accessor :percent_off_items_with_items_purchase
118
118
 
119
+ attr_accessor :percent_off_items_with_minimum_item_amount
120
+
119
121
  attr_accessor :percent_off_msrp_items
120
122
 
121
123
  attr_accessor :percent_off_retail_price_items
@@ -238,6 +240,7 @@ module UltracartClient
238
240
  :'percent_off_items' => :'percent_off_items',
239
241
  :'percent_off_items_and_free_shipping' => :'percent_off_items_and_free_shipping',
240
242
  :'percent_off_items_with_items_purchase' => :'percent_off_items_with_items_purchase',
243
+ :'percent_off_items_with_minimum_item_amount' => :'percent_off_items_with_minimum_item_amount',
241
244
  :'percent_off_msrp_items' => :'percent_off_msrp_items',
242
245
  :'percent_off_retail_price_items' => :'percent_off_retail_price_items',
243
246
  :'percent_off_shipping' => :'percent_off_shipping',
@@ -316,6 +319,7 @@ module UltracartClient
316
319
  :'percent_off_items' => :'CouponPercentOffItems',
317
320
  :'percent_off_items_and_free_shipping' => :'CouponPercentOffItemsAndFreeShipping',
318
321
  :'percent_off_items_with_items_purchase' => :'CouponPercentOffItemsWithItemsPurchase',
322
+ :'percent_off_items_with_minimum_item_amount' => :'CouponPercentOffItemsWithMinimumItemAmount',
319
323
  :'percent_off_msrp_items' => :'CouponPercentOffMsrpItems',
320
324
  :'percent_off_retail_price_items' => :'CouponPercentOffRetailPriceItems',
321
325
  :'percent_off_shipping' => :'CouponPercentOffShipping',
@@ -542,6 +546,10 @@ module UltracartClient
542
546
  self.percent_off_items_with_items_purchase = attributes[:'percent_off_items_with_items_purchase']
543
547
  end
544
548
 
549
+ if attributes.key?(:'percent_off_items_with_minimum_item_amount')
550
+ self.percent_off_items_with_minimum_item_amount = attributes[:'percent_off_items_with_minimum_item_amount']
551
+ end
552
+
545
553
  if attributes.key?(:'percent_off_msrp_items')
546
554
  self.percent_off_msrp_items = attributes[:'percent_off_msrp_items']
547
555
  end
@@ -792,6 +800,7 @@ module UltracartClient
792
800
  percent_off_items == o.percent_off_items &&
793
801
  percent_off_items_and_free_shipping == o.percent_off_items_and_free_shipping &&
794
802
  percent_off_items_with_items_purchase == o.percent_off_items_with_items_purchase &&
803
+ percent_off_items_with_minimum_item_amount == o.percent_off_items_with_minimum_item_amount &&
795
804
  percent_off_msrp_items == o.percent_off_msrp_items &&
796
805
  percent_off_retail_price_items == o.percent_off_retail_price_items &&
797
806
  percent_off_shipping == o.percent_off_shipping &&
@@ -825,7 +834,7 @@ module UltracartClient
825
834
  # Calculates hash code according to all attributes.
826
835
  # @return [Integer] Hash code
827
836
  def hash
828
- [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_item_purchase_and_free_shipping, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, skip_on_rebill, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
837
+ [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_item_purchase_and_free_shipping, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_items_with_minimum_item_amount, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, skip_on_rebill, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
829
838
  end
830
839
 
831
840
  # Builds the object from hash
@@ -0,0 +1,313 @@
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 CouponPercentOffItemsWithMinimumItemAmount
18
+ # The ISO-4217 three letter currency code the customer is viewing prices in
19
+ attr_accessor :currency_code
20
+
21
+ # The percentage of subtotal discount
22
+ attr_accessor :discount_percent
23
+
24
+ # A list of item tags which cannot be discounted.
25
+ attr_accessor :excluded_item_tags
26
+
27
+ # A list of items which cannot be discounted.
28
+ attr_accessor :excluded_items
29
+
30
+ # An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.
31
+ attr_accessor :item_tags
32
+
33
+ # An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.
34
+ attr_accessor :items
35
+
36
+ # The (optional) maximum quantity of discounted items.
37
+ attr_accessor :limit
38
+
39
+ # The minimum item amount (dollars) required for the discount to apply
40
+ attr_accessor :minimum_item_amount
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'currency_code' => :'currency_code',
46
+ :'discount_percent' => :'discount_percent',
47
+ :'excluded_item_tags' => :'excluded_item_tags',
48
+ :'excluded_items' => :'excluded_items',
49
+ :'item_tags' => :'item_tags',
50
+ :'items' => :'items',
51
+ :'limit' => :'limit',
52
+ :'minimum_item_amount' => :'minimum_item_amount'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'currency_code' => :'String',
65
+ :'discount_percent' => :'Float',
66
+ :'excluded_item_tags' => :'Array<String>',
67
+ :'excluded_items' => :'Array<String>',
68
+ :'item_tags' => :'Array<String>',
69
+ :'items' => :'Array<String>',
70
+ :'limit' => :'Integer',
71
+ :'minimum_item_amount' => :'Float'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CouponPercentOffItemsWithMinimumItemAmount` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CouponPercentOffItemsWithMinimumItemAmount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'currency_code')
97
+ self.currency_code = attributes[:'currency_code']
98
+ end
99
+
100
+ if attributes.key?(:'discount_percent')
101
+ self.discount_percent = attributes[:'discount_percent']
102
+ end
103
+
104
+ if attributes.key?(:'excluded_item_tags')
105
+ if (value = attributes[:'excluded_item_tags']).is_a?(Array)
106
+ self.excluded_item_tags = value
107
+ end
108
+ end
109
+
110
+ if attributes.key?(:'excluded_items')
111
+ if (value = attributes[:'excluded_items']).is_a?(Array)
112
+ self.excluded_items = value
113
+ end
114
+ end
115
+
116
+ if attributes.key?(:'item_tags')
117
+ if (value = attributes[:'item_tags']).is_a?(Array)
118
+ self.item_tags = value
119
+ end
120
+ end
121
+
122
+ if attributes.key?(:'items')
123
+ if (value = attributes[:'items']).is_a?(Array)
124
+ self.items = value
125
+ end
126
+ end
127
+
128
+ if attributes.key?(:'limit')
129
+ self.limit = attributes[:'limit']
130
+ end
131
+
132
+ if attributes.key?(:'minimum_item_amount')
133
+ self.minimum_item_amount = attributes[:'minimum_item_amount']
134
+ end
135
+ end
136
+
137
+ # Show invalid properties with the reasons. Usually used together with valid?
138
+ # @return Array for valid properties with the reasons
139
+ def list_invalid_properties
140
+ invalid_properties = Array.new
141
+ if !@currency_code.nil? && @currency_code.to_s.length > 3
142
+ invalid_properties.push('invalid value for "currency_code", the character length must be smaller than or equal to 3.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ return false if !@currency_code.nil? && @currency_code.to_s.length > 3
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] currency_code Value to be assigned
157
+ def currency_code=(currency_code)
158
+ if !currency_code.nil? && currency_code.to_s.length > 3
159
+ fail ArgumentError, 'invalid value for "currency_code", the character length must be smaller than or equal to 3.'
160
+ end
161
+
162
+ @currency_code = currency_code
163
+ end
164
+
165
+ # Checks equality by comparing each attribute.
166
+ # @param [Object] Object to be compared
167
+ def ==(o)
168
+ return true if self.equal?(o)
169
+ self.class == o.class &&
170
+ currency_code == o.currency_code &&
171
+ discount_percent == o.discount_percent &&
172
+ excluded_item_tags == o.excluded_item_tags &&
173
+ excluded_items == o.excluded_items &&
174
+ item_tags == o.item_tags &&
175
+ items == o.items &&
176
+ limit == o.limit &&
177
+ minimum_item_amount == o.minimum_item_amount
178
+ end
179
+
180
+ # @see the `==` method
181
+ # @param [Object] Object to be compared
182
+ def eql?(o)
183
+ self == o
184
+ end
185
+
186
+ # Calculates hash code according to all attributes.
187
+ # @return [Integer] Hash code
188
+ def hash
189
+ [currency_code, discount_percent, excluded_item_tags, excluded_items, item_tags, items, limit, minimum_item_amount].hash
190
+ end
191
+
192
+ # Builds the object from hash
193
+ # @param [Hash] attributes Model attributes in the form of hash
194
+ # @return [Object] Returns the model itself
195
+ def self.build_from_hash(attributes)
196
+ new.build_from_hash(attributes)
197
+ end
198
+
199
+ # Builds the object from hash
200
+ # @param [Hash] attributes Model attributes in the form of hash
201
+ # @return [Object] Returns the model itself
202
+ def build_from_hash(attributes)
203
+ return nil unless attributes.is_a?(Hash)
204
+ attributes = attributes.transform_keys(&:to_sym)
205
+ self.class.openapi_types.each_pair do |key, type|
206
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
207
+ self.send("#{key}=", nil)
208
+ elsif type =~ /\AArray<(.*)>/i
209
+ # check to ensure the input is an array given that the attribute
210
+ # is documented as an array but the input is not
211
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
212
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
213
+ end
214
+ elsif !attributes[self.class.attribute_map[key]].nil?
215
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
216
+ end
217
+ end
218
+
219
+ self
220
+ end
221
+
222
+ # Deserializes the data based on type
223
+ # @param string type Data type
224
+ # @param string value Value to be deserialized
225
+ # @return [Object] Deserialized data
226
+ def _deserialize(type, value)
227
+ case type.to_sym
228
+ when :Time
229
+ Time.parse(value)
230
+ when :Date
231
+ Date.parse(value)
232
+ when :String
233
+ value.to_s
234
+ when :Integer
235
+ value.to_i
236
+ when :Float
237
+ value.to_f
238
+ when :Boolean
239
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
240
+ true
241
+ else
242
+ false
243
+ end
244
+ when :Object
245
+ # generic object (usually a Hash), return directly
246
+ value
247
+ when /\AArray<(?<inner_type>.+)>\z/
248
+ inner_type = Regexp.last_match[:inner_type]
249
+ value.map { |v| _deserialize(inner_type, v) }
250
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
251
+ k_type = Regexp.last_match[:k_type]
252
+ v_type = Regexp.last_match[:v_type]
253
+ {}.tap do |hash|
254
+ value.each do |k, v|
255
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
256
+ end
257
+ end
258
+ else # model
259
+ # models (e.g. Pet) or oneOf
260
+ klass = UltracartClient.const_get(type)
261
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
262
+ end
263
+ end
264
+
265
+ # Returns the string representation of the object
266
+ # @return [String] String presentation of the object
267
+ def to_s
268
+ to_hash.to_s
269
+ end
270
+
271
+ # to_body is an alias to to_hash (backward compatibility)
272
+ # @return [Hash] Returns the object in the form of hash
273
+ def to_body
274
+ to_hash
275
+ end
276
+
277
+ # Returns the object in the form of hash
278
+ # @return [Hash] Returns the object in the form of hash
279
+ def to_hash
280
+ hash = {}
281
+ self.class.attribute_map.each_pair do |attr, param|
282
+ value = self.send(attr)
283
+ if value.nil?
284
+ is_nullable = self.class.openapi_nullable.include?(attr)
285
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
286
+ end
287
+
288
+ hash[param] = _to_hash(value)
289
+ end
290
+ hash
291
+ end
292
+
293
+ # Outputs non-array value in the form of hash
294
+ # For object, use to_hash. Otherwise, just return the value
295
+ # @param [Object] value Any valid value
296
+ # @return [Hash] Returns the value in the form of hash
297
+ def _to_hash(value)
298
+ if value.is_a?(Array)
299
+ value.compact.map { |v| _to_hash(v) }
300
+ elsif value.is_a?(Hash)
301
+ {}.tap do |hash|
302
+ value.each { |k, v| hash[k] = _to_hash(v) }
303
+ end
304
+ elsif value.respond_to? :to_hash
305
+ value.to_hash
306
+ else
307
+ value
308
+ end
309
+ end
310
+
311
+ end
312
+
313
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.70'
14
+ VERSION = '4.1.71'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -344,6 +344,7 @@ require 'ultracart_api/models/coupon_percent_off_item_with_items_quantity_purcha
344
344
  require 'ultracart_api/models/coupon_percent_off_items'
345
345
  require 'ultracart_api/models/coupon_percent_off_items_and_free_shipping'
346
346
  require 'ultracart_api/models/coupon_percent_off_items_with_items_purchase'
347
+ require 'ultracart_api/models/coupon_percent_off_items_with_minimum_item_amount'
347
348
  require 'ultracart_api/models/coupon_percent_off_msrp_items'
348
349
  require 'ultracart_api/models/coupon_percent_off_retail_price_items'
349
350
  require 'ultracart_api/models/coupon_percent_off_shipping'
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.1.70
4
+ version: 4.1.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-03 00:00:00.000000000 Z
11
+ date: 2026-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -394,6 +394,7 @@ files:
394
394
  - docs/CouponPercentOffItems.md
395
395
  - docs/CouponPercentOffItemsAndFreeShipping.md
396
396
  - docs/CouponPercentOffItemsWithItemsPurchase.md
397
+ - docs/CouponPercentOffItemsWithMinimumItemAmount.md
397
398
  - docs/CouponPercentOffMsrpItems.md
398
399
  - docs/CouponPercentOffRetailPriceItems.md
399
400
  - docs/CouponPercentOffShipping.md
@@ -1382,6 +1383,7 @@ files:
1382
1383
  - lib/ultracart_api/models/coupon_percent_off_items.rb
1383
1384
  - lib/ultracart_api/models/coupon_percent_off_items_and_free_shipping.rb
1384
1385
  - lib/ultracart_api/models/coupon_percent_off_items_with_items_purchase.rb
1386
+ - lib/ultracart_api/models/coupon_percent_off_items_with_minimum_item_amount.rb
1385
1387
  - lib/ultracart_api/models/coupon_percent_off_msrp_items.rb
1386
1388
  - lib/ultracart_api/models/coupon_percent_off_retail_price_items.rb
1387
1389
  - lib/ultracart_api/models/coupon_percent_off_shipping.rb