ultracart_api 4.1.69 → 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 +4 -4
- data/README.md +5 -2
- data/docs/ConversationPbxQueue.md +24 -0
- data/docs/Coupon.md +2 -0
- data/docs/CouponPercentOffItemsWithMinimumItemAmount.md +32 -0
- data/lib/ultracart_api/models/conversation_pbx_queue.rb +151 -1
- data/lib/ultracart_api/models/coupon.rb +10 -1
- data/lib/ultracart_api/models/coupon_percent_off_items_with_minimum_item_amount.rb +313 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3509f1bbed3d909218c3b613ee45440ce00c259d88e6b5ea29511af2b45ee3c5
|
|
4
|
+
data.tar.gz: 95c8c23311dc0fd905f76a946d6bb0d0948fb8b347294a4bb4dd286c149210e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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,8 @@ 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 |
|
|
1691
|
+
| 4.1.70 | 04/03/2026 | conversation pbx - queue callback settings |
|
|
1689
1692
|
| 4.1.69 | 03/31/2026 | conversations - user specific audio methods |
|
|
1690
1693
|
| 4.1.68 | 03/31/2026 | oauth - device support |
|
|
1691
1694
|
| 4.1.67 | 02/24/2026 | customer activity - sms and sms_stop fields added |
|
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
| **ai_timeout_seconds** | **Integer** | AI timeout seconds | [optional] |
|
|
9
9
|
| **announce_queue_position** | **Boolean** | If true, the customer is told their queue position upon entering the queue | [optional] |
|
|
10
10
|
| **automatic_coach_agent_uuid** | **String** | AI Agent UUID to automatically engage to provide coaching | [optional] |
|
|
11
|
+
| **callback_announce_audio_uuid** | **String** | Custom audio file UUID for the callback offer prompt | [optional] |
|
|
12
|
+
| **callback_announce_say** | **String** | Custom TTS text for the callback offer prompt | [optional] |
|
|
13
|
+
| **callback_confirm_audio_uuid** | **String** | Custom audio file UUID for the callback confirmation message | [optional] |
|
|
14
|
+
| **callback_confirm_say** | **String** | Custom TTS text for the callback confirmation message | [optional] |
|
|
15
|
+
| **callback_enabled** | **Boolean** | If true, the callback option is enabled for this queue | [optional] |
|
|
16
|
+
| **callback_hours_only** | **Boolean** | When true, only offer callbacks during business hours | [optional] |
|
|
17
|
+
| **callback_max_attempts** | **Integer** | Maximum number of times the system will attempt to call the customer back | [optional] |
|
|
18
|
+
| **callback_max_offers** | **Integer** | Maximum number of times the callback option is offered to a caller per call | [optional] |
|
|
19
|
+
| **callback_max_pending** | **Integer** | Maximum number of pending callbacks allowed per queue | [optional] |
|
|
20
|
+
| **callback_offer_after_seconds** | **Integer** | Seconds a caller must wait in queue before the callback option is offered | [optional] |
|
|
21
|
+
| **callback_offer_interval_seconds** | **Integer** | Seconds between repeat callback offers to the same caller | [optional] |
|
|
22
|
+
| **callback_retry_delay_seconds** | **Integer** | Delay in seconds between callback retry attempts | [optional] |
|
|
11
23
|
| **conversation_pbx_queue_uuid** | **String** | Conversation Pbx Queue unique identifier | [optional] |
|
|
12
24
|
| **conversation_voicemail_mailbox_uuid** | **String** | The voicemail mailbox associated with this queue | [optional] |
|
|
13
25
|
| **hold_conversation_pbx_audio_uuid** | **String** | The audio to play while holding in a queue | [optional] |
|
|
@@ -39,6 +51,18 @@ instance = UltracartClient::ConversationPbxQueue.new(
|
|
|
39
51
|
ai_timeout_seconds: null,
|
|
40
52
|
announce_queue_position: null,
|
|
41
53
|
automatic_coach_agent_uuid: null,
|
|
54
|
+
callback_announce_audio_uuid: null,
|
|
55
|
+
callback_announce_say: null,
|
|
56
|
+
callback_confirm_audio_uuid: null,
|
|
57
|
+
callback_confirm_say: null,
|
|
58
|
+
callback_enabled: null,
|
|
59
|
+
callback_hours_only: null,
|
|
60
|
+
callback_max_attempts: null,
|
|
61
|
+
callback_max_offers: null,
|
|
62
|
+
callback_max_pending: null,
|
|
63
|
+
callback_offer_after_seconds: null,
|
|
64
|
+
callback_offer_interval_seconds: null,
|
|
65
|
+
callback_retry_delay_seconds: null,
|
|
42
66
|
conversation_pbx_queue_uuid: null,
|
|
43
67
|
conversation_voicemail_mailbox_uuid: null,
|
|
44
68
|
hold_conversation_pbx_audio_uuid: null,
|
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
|
+
|
|
@@ -27,6 +27,42 @@ module UltracartClient
|
|
|
27
27
|
# AI Agent UUID to automatically engage to provide coaching
|
|
28
28
|
attr_accessor :automatic_coach_agent_uuid
|
|
29
29
|
|
|
30
|
+
# Custom audio file UUID for the callback offer prompt
|
|
31
|
+
attr_accessor :callback_announce_audio_uuid
|
|
32
|
+
|
|
33
|
+
# Custom TTS text for the callback offer prompt
|
|
34
|
+
attr_accessor :callback_announce_say
|
|
35
|
+
|
|
36
|
+
# Custom audio file UUID for the callback confirmation message
|
|
37
|
+
attr_accessor :callback_confirm_audio_uuid
|
|
38
|
+
|
|
39
|
+
# Custom TTS text for the callback confirmation message
|
|
40
|
+
attr_accessor :callback_confirm_say
|
|
41
|
+
|
|
42
|
+
# If true, the callback option is enabled for this queue
|
|
43
|
+
attr_accessor :callback_enabled
|
|
44
|
+
|
|
45
|
+
# When true, only offer callbacks during business hours
|
|
46
|
+
attr_accessor :callback_hours_only
|
|
47
|
+
|
|
48
|
+
# Maximum number of times the system will attempt to call the customer back
|
|
49
|
+
attr_accessor :callback_max_attempts
|
|
50
|
+
|
|
51
|
+
# Maximum number of times the callback option is offered to a caller per call
|
|
52
|
+
attr_accessor :callback_max_offers
|
|
53
|
+
|
|
54
|
+
# Maximum number of pending callbacks allowed per queue
|
|
55
|
+
attr_accessor :callback_max_pending
|
|
56
|
+
|
|
57
|
+
# Seconds a caller must wait in queue before the callback option is offered
|
|
58
|
+
attr_accessor :callback_offer_after_seconds
|
|
59
|
+
|
|
60
|
+
# Seconds between repeat callback offers to the same caller
|
|
61
|
+
attr_accessor :callback_offer_interval_seconds
|
|
62
|
+
|
|
63
|
+
# Delay in seconds between callback retry attempts
|
|
64
|
+
attr_accessor :callback_retry_delay_seconds
|
|
65
|
+
|
|
30
66
|
# Conversation Pbx Queue unique identifier
|
|
31
67
|
attr_accessor :conversation_pbx_queue_uuid
|
|
32
68
|
|
|
@@ -115,6 +151,18 @@ module UltracartClient
|
|
|
115
151
|
:'ai_timeout_seconds' => :'ai_timeout_seconds',
|
|
116
152
|
:'announce_queue_position' => :'announce_queue_position',
|
|
117
153
|
:'automatic_coach_agent_uuid' => :'automatic_coach_agent_uuid',
|
|
154
|
+
:'callback_announce_audio_uuid' => :'callback_announce_audio_uuid',
|
|
155
|
+
:'callback_announce_say' => :'callback_announce_say',
|
|
156
|
+
:'callback_confirm_audio_uuid' => :'callback_confirm_audio_uuid',
|
|
157
|
+
:'callback_confirm_say' => :'callback_confirm_say',
|
|
158
|
+
:'callback_enabled' => :'callback_enabled',
|
|
159
|
+
:'callback_hours_only' => :'callback_hours_only',
|
|
160
|
+
:'callback_max_attempts' => :'callback_max_attempts',
|
|
161
|
+
:'callback_max_offers' => :'callback_max_offers',
|
|
162
|
+
:'callback_max_pending' => :'callback_max_pending',
|
|
163
|
+
:'callback_offer_after_seconds' => :'callback_offer_after_seconds',
|
|
164
|
+
:'callback_offer_interval_seconds' => :'callback_offer_interval_seconds',
|
|
165
|
+
:'callback_retry_delay_seconds' => :'callback_retry_delay_seconds',
|
|
118
166
|
:'conversation_pbx_queue_uuid' => :'conversation_pbx_queue_uuid',
|
|
119
167
|
:'conversation_voicemail_mailbox_uuid' => :'conversation_voicemail_mailbox_uuid',
|
|
120
168
|
:'hold_conversation_pbx_audio_uuid' => :'hold_conversation_pbx_audio_uuid',
|
|
@@ -150,6 +198,18 @@ module UltracartClient
|
|
|
150
198
|
:'ai_timeout_seconds' => :'Integer',
|
|
151
199
|
:'announce_queue_position' => :'Boolean',
|
|
152
200
|
:'automatic_coach_agent_uuid' => :'String',
|
|
201
|
+
:'callback_announce_audio_uuid' => :'String',
|
|
202
|
+
:'callback_announce_say' => :'String',
|
|
203
|
+
:'callback_confirm_audio_uuid' => :'String',
|
|
204
|
+
:'callback_confirm_say' => :'String',
|
|
205
|
+
:'callback_enabled' => :'Boolean',
|
|
206
|
+
:'callback_hours_only' => :'Boolean',
|
|
207
|
+
:'callback_max_attempts' => :'Integer',
|
|
208
|
+
:'callback_max_offers' => :'Integer',
|
|
209
|
+
:'callback_max_pending' => :'Integer',
|
|
210
|
+
:'callback_offer_after_seconds' => :'Integer',
|
|
211
|
+
:'callback_offer_interval_seconds' => :'Integer',
|
|
212
|
+
:'callback_retry_delay_seconds' => :'Integer',
|
|
153
213
|
:'conversation_pbx_queue_uuid' => :'String',
|
|
154
214
|
:'conversation_voicemail_mailbox_uuid' => :'String',
|
|
155
215
|
:'hold_conversation_pbx_audio_uuid' => :'String',
|
|
@@ -210,6 +270,54 @@ module UltracartClient
|
|
|
210
270
|
self.automatic_coach_agent_uuid = attributes[:'automatic_coach_agent_uuid']
|
|
211
271
|
end
|
|
212
272
|
|
|
273
|
+
if attributes.key?(:'callback_announce_audio_uuid')
|
|
274
|
+
self.callback_announce_audio_uuid = attributes[:'callback_announce_audio_uuid']
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
if attributes.key?(:'callback_announce_say')
|
|
278
|
+
self.callback_announce_say = attributes[:'callback_announce_say']
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if attributes.key?(:'callback_confirm_audio_uuid')
|
|
282
|
+
self.callback_confirm_audio_uuid = attributes[:'callback_confirm_audio_uuid']
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
if attributes.key?(:'callback_confirm_say')
|
|
286
|
+
self.callback_confirm_say = attributes[:'callback_confirm_say']
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
if attributes.key?(:'callback_enabled')
|
|
290
|
+
self.callback_enabled = attributes[:'callback_enabled']
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
if attributes.key?(:'callback_hours_only')
|
|
294
|
+
self.callback_hours_only = attributes[:'callback_hours_only']
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
if attributes.key?(:'callback_max_attempts')
|
|
298
|
+
self.callback_max_attempts = attributes[:'callback_max_attempts']
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
if attributes.key?(:'callback_max_offers')
|
|
302
|
+
self.callback_max_offers = attributes[:'callback_max_offers']
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if attributes.key?(:'callback_max_pending')
|
|
306
|
+
self.callback_max_pending = attributes[:'callback_max_pending']
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if attributes.key?(:'callback_offer_after_seconds')
|
|
310
|
+
self.callback_offer_after_seconds = attributes[:'callback_offer_after_seconds']
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
if attributes.key?(:'callback_offer_interval_seconds')
|
|
314
|
+
self.callback_offer_interval_seconds = attributes[:'callback_offer_interval_seconds']
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if attributes.key?(:'callback_retry_delay_seconds')
|
|
318
|
+
self.callback_retry_delay_seconds = attributes[:'callback_retry_delay_seconds']
|
|
319
|
+
end
|
|
320
|
+
|
|
213
321
|
if attributes.key?(:'conversation_pbx_queue_uuid')
|
|
214
322
|
self.conversation_pbx_queue_uuid = attributes[:'conversation_pbx_queue_uuid']
|
|
215
323
|
end
|
|
@@ -295,6 +403,14 @@ module UltracartClient
|
|
|
295
403
|
# @return Array for valid properties with the reasons
|
|
296
404
|
def list_invalid_properties
|
|
297
405
|
invalid_properties = Array.new
|
|
406
|
+
if !@callback_announce_audio_uuid.nil? && @callback_announce_audio_uuid.to_s.length > 50
|
|
407
|
+
invalid_properties.push('invalid value for "callback_announce_audio_uuid", the character length must be smaller than or equal to 50.')
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
if !@callback_confirm_audio_uuid.nil? && @callback_confirm_audio_uuid.to_s.length > 50
|
|
411
|
+
invalid_properties.push('invalid value for "callback_confirm_audio_uuid", the character length must be smaller than or equal to 50.')
|
|
412
|
+
end
|
|
413
|
+
|
|
298
414
|
if !@conversation_voicemail_mailbox_uuid.nil? && @conversation_voicemail_mailbox_uuid.to_s.length > 50
|
|
299
415
|
invalid_properties.push('invalid value for "conversation_voicemail_mailbox_uuid", the character length must be smaller than or equal to 50.')
|
|
300
416
|
end
|
|
@@ -343,6 +459,8 @@ module UltracartClient
|
|
|
343
459
|
def valid?
|
|
344
460
|
ai_priority_validator = EnumAttributeValidator.new('String', ["neutral", "first", "backup"])
|
|
345
461
|
return false unless ai_priority_validator.valid?(@ai_priority)
|
|
462
|
+
return false if !@callback_announce_audio_uuid.nil? && @callback_announce_audio_uuid.to_s.length > 50
|
|
463
|
+
return false if !@callback_confirm_audio_uuid.nil? && @callback_confirm_audio_uuid.to_s.length > 50
|
|
346
464
|
return false if !@conversation_voicemail_mailbox_uuid.nil? && @conversation_voicemail_mailbox_uuid.to_s.length > 50
|
|
347
465
|
return false if !@hold_conversation_pbx_audio_uuid.nil? && @hold_conversation_pbx_audio_uuid.to_s.length > 50
|
|
348
466
|
return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5
|
|
@@ -370,6 +488,26 @@ module UltracartClient
|
|
|
370
488
|
@ai_priority = ai_priority
|
|
371
489
|
end
|
|
372
490
|
|
|
491
|
+
# Custom attribute writer method with validation
|
|
492
|
+
# @param [Object] callback_announce_audio_uuid Value to be assigned
|
|
493
|
+
def callback_announce_audio_uuid=(callback_announce_audio_uuid)
|
|
494
|
+
if !callback_announce_audio_uuid.nil? && callback_announce_audio_uuid.to_s.length > 50
|
|
495
|
+
fail ArgumentError, 'invalid value for "callback_announce_audio_uuid", the character length must be smaller than or equal to 50.'
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
@callback_announce_audio_uuid = callback_announce_audio_uuid
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
# Custom attribute writer method with validation
|
|
502
|
+
# @param [Object] callback_confirm_audio_uuid Value to be assigned
|
|
503
|
+
def callback_confirm_audio_uuid=(callback_confirm_audio_uuid)
|
|
504
|
+
if !callback_confirm_audio_uuid.nil? && callback_confirm_audio_uuid.to_s.length > 50
|
|
505
|
+
fail ArgumentError, 'invalid value for "callback_confirm_audio_uuid", the character length must be smaller than or equal to 50.'
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
@callback_confirm_audio_uuid = callback_confirm_audio_uuid
|
|
509
|
+
end
|
|
510
|
+
|
|
373
511
|
# Custom attribute writer method with validation
|
|
374
512
|
# @param [Object] conversation_voicemail_mailbox_uuid Value to be assigned
|
|
375
513
|
def conversation_voicemail_mailbox_uuid=(conversation_voicemail_mailbox_uuid)
|
|
@@ -479,6 +617,18 @@ module UltracartClient
|
|
|
479
617
|
ai_timeout_seconds == o.ai_timeout_seconds &&
|
|
480
618
|
announce_queue_position == o.announce_queue_position &&
|
|
481
619
|
automatic_coach_agent_uuid == o.automatic_coach_agent_uuid &&
|
|
620
|
+
callback_announce_audio_uuid == o.callback_announce_audio_uuid &&
|
|
621
|
+
callback_announce_say == o.callback_announce_say &&
|
|
622
|
+
callback_confirm_audio_uuid == o.callback_confirm_audio_uuid &&
|
|
623
|
+
callback_confirm_say == o.callback_confirm_say &&
|
|
624
|
+
callback_enabled == o.callback_enabled &&
|
|
625
|
+
callback_hours_only == o.callback_hours_only &&
|
|
626
|
+
callback_max_attempts == o.callback_max_attempts &&
|
|
627
|
+
callback_max_offers == o.callback_max_offers &&
|
|
628
|
+
callback_max_pending == o.callback_max_pending &&
|
|
629
|
+
callback_offer_after_seconds == o.callback_offer_after_seconds &&
|
|
630
|
+
callback_offer_interval_seconds == o.callback_offer_interval_seconds &&
|
|
631
|
+
callback_retry_delay_seconds == o.callback_retry_delay_seconds &&
|
|
482
632
|
conversation_pbx_queue_uuid == o.conversation_pbx_queue_uuid &&
|
|
483
633
|
conversation_voicemail_mailbox_uuid == o.conversation_voicemail_mailbox_uuid &&
|
|
484
634
|
hold_conversation_pbx_audio_uuid == o.hold_conversation_pbx_audio_uuid &&
|
|
@@ -510,7 +660,7 @@ module UltracartClient
|
|
|
510
660
|
# Calculates hash code according to all attributes.
|
|
511
661
|
# @return [Integer] Hash code
|
|
512
662
|
def hash
|
|
513
|
-
[ai_priority, ai_timeout_seconds, announce_queue_position, automatic_coach_agent_uuid, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail, wait_critical_seconds, wait_warning_seconds, wrap_up_seconds].hash
|
|
663
|
+
[ai_priority, ai_timeout_seconds, announce_queue_position, automatic_coach_agent_uuid, callback_announce_audio_uuid, callback_announce_say, callback_confirm_audio_uuid, callback_confirm_say, callback_enabled, callback_hours_only, callback_max_attempts, callback_max_offers, callback_max_pending, callback_offer_after_seconds, callback_offer_interval_seconds, callback_retry_delay_seconds, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail, wait_critical_seconds, wait_warning_seconds, wrap_up_seconds].hash
|
|
514
664
|
end
|
|
515
665
|
|
|
516
666
|
# Builds the object from hash
|
|
@@ -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
|
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.
|
|
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-
|
|
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
|