ultracart_api 4.1.70 → 4.1.72

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: 4bf651f3c35e969505f1e9aa6fde9a7b7c32671fe1163754aa36d32033d2c028
4
+ data.tar.gz: 79da60e733be44597252b9dd0c064deb3a305ed85589972da9591886d19802dc
5
5
  SHA512:
6
- metadata.gz: 23f47bd84edce36c0bf5f724a8e381facaec5a8be8124fe4894decd8af81c4fc41a735ff5c8f26fdc77d987b207b691ccef5f722acbf9879112f697cc7669cd5
7
- data.tar.gz: 5305bc35dcf40acdacd65a5a92e69c3a5655258415381130d96abcd018d67b9fcdf84fbca54c016d11a8f63edc682d50b865f5fcecb160e6e48f9ef8f5373a3c
6
+ metadata.gz: ce8cde54f86df8d62aa28cee6a142c3f9f651196714fb3d96091ed01fc2fdc51a3fbe3b609e66abbec1099ff0721769c890771cb9ef39e46601d66c29c70e366
7
+ data.tar.gz: f0f27c480eba36cb43c190a6fe71d13274b72f5bdf9f63b02c23b456eaf4eec570d193d0c863572a5cd46a645a34c072089b96741dae033ac23a19e5c7f7330f
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.72
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.72'
20
20
  ```
21
21
 
22
22
  install:
@@ -205,6 +205,7 @@ Class | Method | HTTP request | Description
205
205
  *UltracartClient::ConversationApi* | [**get_pbx_time_baseds**](docs/ConversationApi.md#get_pbx_time_baseds) | **GET** /conversation/pbx/time_based | Get pbx timeBaseds
206
206
  *UltracartClient::ConversationApi* | [**get_pbx_time_range**](docs/ConversationApi.md#get_pbx_time_range) | **GET** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Get pbx timeRange
207
207
  *UltracartClient::ConversationApi* | [**get_pbx_time_ranges**](docs/ConversationApi.md#get_pbx_time_ranges) | **GET** /conversation/pbx/time_range | Get pbx timeRanges
208
+ *UltracartClient::ConversationApi* | [**get_pbx_voicemail_capabilities**](docs/ConversationApi.md#get_pbx_voicemail_capabilities) | **GET** /conversation/pbx/voicemail/capabilities | Get pbx voicemail capabilities
208
209
  *UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailbox**](docs/ConversationApi.md#get_pbx_voicemail_mailbox) | **GET** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Get pbx voicemailMailbox
209
210
  *UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailboxes**](docs/ConversationApi.md#get_pbx_voicemail_mailboxes) | **GET** /conversation/pbx/voicemail_mailbox | Get pbx voicemailMailboxes
210
211
  *UltracartClient::ConversationApi* | [**get_user_pbx_audio**](docs/ConversationApi.md#get_user_pbx_audio) | **GET** /conversation/pbx/audio/user/{conversationPbxAudioUuid} | Get user pbx audio
@@ -913,6 +914,7 @@ Class | Method | HTTP request | Description
913
914
  - [UltracartClient::ConversationPbxTimeRangeConfig](docs/ConversationPbxTimeRangeConfig.md)
914
915
  - [UltracartClient::ConversationPbxTimeRangeResponse](docs/ConversationPbxTimeRangeResponse.md)
915
916
  - [UltracartClient::ConversationPbxTimeRangesResponse](docs/ConversationPbxTimeRangesResponse.md)
917
+ - [UltracartClient::ConversationPbxVoicemailCapabilitiesResponse](docs/ConversationPbxVoicemailCapabilitiesResponse.md)
916
918
  - [UltracartClient::ConversationPbxVoicemailMailbox](docs/ConversationPbxVoicemailMailbox.md)
917
919
  - [UltracartClient::ConversationPbxVoicemailMailboxResponse](docs/ConversationPbxVoicemailMailboxResponse.md)
918
920
  - [UltracartClient::ConversationPbxVoicemailMailboxesResponse](docs/ConversationPbxVoicemailMailboxesResponse.md)
@@ -989,6 +991,7 @@ Class | Method | HTTP request | Description
989
991
  - [UltracartClient::CouponPercentOffItems](docs/CouponPercentOffItems.md)
990
992
  - [UltracartClient::CouponPercentOffItemsAndFreeShipping](docs/CouponPercentOffItemsAndFreeShipping.md)
991
993
  - [UltracartClient::CouponPercentOffItemsWithItemsPurchase](docs/CouponPercentOffItemsWithItemsPurchase.md)
994
+ - [UltracartClient::CouponPercentOffItemsWithMinimumItemAmount](docs/CouponPercentOffItemsWithMinimumItemAmount.md)
992
995
  - [UltracartClient::CouponPercentOffMsrpItems](docs/CouponPercentOffMsrpItems.md)
993
996
  - [UltracartClient::CouponPercentOffRetailPriceItems](docs/CouponPercentOffRetailPriceItems.md)
994
997
  - [UltracartClient::CouponPercentOffShipping](docs/CouponPercentOffShipping.md)
@@ -1686,6 +1689,8 @@ Not every change is committed to every SDK.
1686
1689
 
1687
1690
  | Version | Date | Comments |
1688
1691
  | --: | :-: | --- |
1692
+ | 4.1.72 | 04/11/2026 | conversation pbx - voicemail notification channels |
1693
+ | 4.1.71 | 04/06/2026 | coupons - new percent_off_items_with_minimum_item_amount |
1689
1694
  | 4.1.70 | 04/03/2026 | conversation pbx - queue callback settings |
1690
1695
  | 4.1.69 | 03/31/2026 | conversations - user specific audio methods |
1691
1696
  | 4.1.68 | 03/31/2026 | oauth - device support |
@@ -77,6 +77,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
77
77
  | [**get_pbx_time_baseds**](ConversationApi.md#get_pbx_time_baseds) | **GET** /conversation/pbx/time_based | Get pbx timeBaseds |
78
78
  | [**get_pbx_time_range**](ConversationApi.md#get_pbx_time_range) | **GET** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Get pbx timeRange |
79
79
  | [**get_pbx_time_ranges**](ConversationApi.md#get_pbx_time_ranges) | **GET** /conversation/pbx/time_range | Get pbx timeRanges |
80
+ | [**get_pbx_voicemail_capabilities**](ConversationApi.md#get_pbx_voicemail_capabilities) | **GET** /conversation/pbx/voicemail/capabilities | Get pbx voicemail capabilities |
80
81
  | [**get_pbx_voicemail_mailbox**](ConversationApi.md#get_pbx_voicemail_mailbox) | **GET** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Get pbx voicemailMailbox |
81
82
  | [**get_pbx_voicemail_mailboxes**](ConversationApi.md#get_pbx_voicemail_mailboxes) | **GET** /conversation/pbx/voicemail_mailbox | Get pbx voicemailMailboxes |
82
83
  | [**get_user_pbx_audio**](ConversationApi.md#get_user_pbx_audio) | **GET** /conversation/pbx/audio/user/{conversationPbxAudioUuid} | Get user pbx audio |
@@ -4024,6 +4025,57 @@ This endpoint does not need any parameter.
4024
4025
  - **Accept**: application/json
4025
4026
 
4026
4027
 
4028
+ ## get_pbx_voicemail_capabilities
4029
+
4030
+ > <ConversationPbxVoicemailCapabilitiesResponse> get_pbx_voicemail_capabilities
4031
+
4032
+ Get pbx voicemail capabilities
4033
+
4034
+ Retrieve voicemail notification capabilities including available channels
4035
+
4036
+
4037
+ ### Examples
4038
+
4039
+
4040
+ (No example for this operation).
4041
+
4042
+
4043
+ #### Using the get_pbx_voicemail_capabilities_with_http_info variant
4044
+
4045
+ This returns an Array which contains the response data, status code and headers.
4046
+
4047
+ > <Array(<ConversationPbxVoicemailCapabilitiesResponse>, Integer, Hash)> get_pbx_voicemail_capabilities_with_http_info
4048
+
4049
+ ```ruby
4050
+ begin
4051
+ # Get pbx voicemail capabilities
4052
+ data, status_code, headers = api_instance.get_pbx_voicemail_capabilities_with_http_info
4053
+ p status_code # => 2xx
4054
+ p headers # => { ... }
4055
+ p data # => <ConversationPbxVoicemailCapabilitiesResponse>
4056
+ rescue UltracartClient::ApiError => e
4057
+ puts "Error when calling ConversationApi->get_pbx_voicemail_capabilities_with_http_info: #{e}"
4058
+ end
4059
+ ```
4060
+
4061
+ ### Parameters
4062
+
4063
+ This endpoint does not need any parameter.
4064
+
4065
+ ### Return type
4066
+
4067
+ [**ConversationPbxVoicemailCapabilitiesResponse**](ConversationPbxVoicemailCapabilitiesResponse.md)
4068
+
4069
+ ### Authorization
4070
+
4071
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
4072
+
4073
+ ### HTTP request headers
4074
+
4075
+ - **Content-Type**: Not defined
4076
+ - **Accept**: application/json
4077
+
4078
+
4027
4079
  ## get_pbx_voicemail_mailbox
4028
4080
 
4029
4081
  > <ConversationPbxVoicemailMailboxResponse> get_pbx_voicemail_mailbox(conversation_pbx_voicemail_mailbox_uuid)
@@ -0,0 +1,28 @@
1
+ # UltracartClient::ConversationPbxVoicemailCapabilitiesResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | [**Error**](Error.md) | | [optional] |
8
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
9
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
10
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
11
+ | **zoho_desk_available** | **Boolean** | True if Zoho Desk is connected to UltraCart | [optional] |
12
+ | **zoho_desk_departments** | [**Array&lt;ConversationVirtualAgentCapabilityZohoDeskDepartment&gt;**](ConversationVirtualAgentCapabilityZohoDeskDepartment.md) | Array of Zoho Desk Departments if Zoho Desk is connected to UltraCart | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'ultracart_api'
18
+
19
+ instance = UltracartClient::ConversationPbxVoicemailCapabilitiesResponse.new(
20
+ error: null,
21
+ metadata: null,
22
+ success: null,
23
+ warning: null,
24
+ zoho_desk_available: null,
25
+ zoho_desk_departments: null
26
+ )
27
+ ```
28
+
@@ -6,7 +6,9 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **conversation_pbx_voicemail_mailbox_uuid** | **String** | Conversation Pbx Voicemail Mailbox UUID | [optional] |
8
8
  | **merchant_id** | **String** | Merchant Id | [optional] |
9
+ | **send_notices_to_channel** | **String** | Send notices to channel | [optional] |
9
10
  | **send_notices_to_email** | **String** | Send notices to email | [optional] |
11
+ | **send_notices_to_zoho_desk_department_id** | **String** | Send notices to Zoho Desk department id | [optional] |
10
12
  | **user_id** | **Integer** | User Id | [optional] |
11
13
  | **voicemail_followup_play_audio_uuid** | **String** | Voicemail follow play audio UUID | [optional] |
12
14
  | **voicemail_followup_say** | **String** | Voicemail followup say | [optional] |
@@ -25,7 +27,9 @@ require 'ultracart_api'
25
27
  instance = UltracartClient::ConversationPbxVoicemailMailbox.new(
26
28
  conversation_pbx_voicemail_mailbox_uuid: null,
27
29
  merchant_id: null,
30
+ send_notices_to_channel: null,
28
31
  send_notices_to_email: null,
32
+ send_notices_to_zoho_desk_department_id: null,
29
33
  user_id: null,
30
34
  voicemail_followup_play_audio_uuid: null,
31
35
  voicemail_followup_say: 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&lt;String&gt;** | A list of item tags which cannot be discounted. | [optional] |
10
+ | **excluded_items** | **Array&lt;String&gt;** | A list of items which cannot be discounted. | [optional] |
11
+ | **item_tags** | **Array&lt;String&gt;** | 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&lt;String&gt;** | 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
+
@@ -4647,6 +4647,64 @@ module UltracartClient
4647
4647
  return data, status_code, headers
4648
4648
  end
4649
4649
 
4650
+ # Get pbx voicemail capabilities
4651
+ # Retrieve voicemail notification capabilities including available channels
4652
+ # @param [Hash] opts the optional parameters
4653
+ # @return [ConversationPbxVoicemailCapabilitiesResponse]
4654
+ def get_pbx_voicemail_capabilities(opts = {})
4655
+ data, _status_code, _headers = get_pbx_voicemail_capabilities_with_http_info(opts)
4656
+ data
4657
+ end
4658
+
4659
+ # Get pbx voicemail capabilities
4660
+ # Retrieve voicemail notification capabilities including available channels
4661
+ # @param [Hash] opts the optional parameters
4662
+ # @return [Array<(ConversationPbxVoicemailCapabilitiesResponse, Integer, Hash)>] ConversationPbxVoicemailCapabilitiesResponse data, response status code and response headers
4663
+ def get_pbx_voicemail_capabilities_with_http_info(opts = {})
4664
+ if @api_client.config.debugging
4665
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_pbx_voicemail_capabilities ...'
4666
+ end
4667
+ # resource path
4668
+ local_var_path = '/conversation/pbx/voicemail/capabilities'
4669
+
4670
+ # query parameters
4671
+ query_params = opts[:query_params] || {}
4672
+
4673
+ # header parameters
4674
+ header_params = opts[:header_params] || {}
4675
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4676
+ # HTTP header 'Accept' (if needed)
4677
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4678
+
4679
+ # form parameters
4680
+ form_params = opts[:form_params] || {}
4681
+
4682
+ # http body (model)
4683
+ post_body = opts[:debug_body]
4684
+
4685
+ # return_type
4686
+ return_type = opts[:debug_return_type] || 'ConversationPbxVoicemailCapabilitiesResponse'
4687
+
4688
+ # auth_names
4689
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4690
+
4691
+ new_options = opts.merge(
4692
+ :operation => :"ConversationApi.get_pbx_voicemail_capabilities",
4693
+ :header_params => header_params,
4694
+ :query_params => query_params,
4695
+ :form_params => form_params,
4696
+ :body => post_body,
4697
+ :auth_names => auth_names,
4698
+ :return_type => return_type
4699
+ )
4700
+
4701
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4702
+ if @api_client.config.debugging
4703
+ @api_client.config.logger.debug "API called: ConversationApi#get_pbx_voicemail_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4704
+ end
4705
+ return data, status_code, headers
4706
+ end
4707
+
4650
4708
  # Get pbx voicemailMailbox
4651
4709
  # Retrieve a pbx voicemailMailbox
4652
4710
  # @param conversation_pbx_voicemail_mailbox_uuid [String]
@@ -0,0 +1,269 @@
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 ConversationPbxVoicemailCapabilitiesResponse
18
+ attr_accessor :error
19
+
20
+ attr_accessor :metadata
21
+
22
+ # Indicates if API call was successful
23
+ attr_accessor :success
24
+
25
+ attr_accessor :warning
26
+
27
+ # True if Zoho Desk is connected to UltraCart
28
+ attr_accessor :zoho_desk_available
29
+
30
+ # Array of Zoho Desk Departments if Zoho Desk is connected to UltraCart
31
+ attr_accessor :zoho_desk_departments
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'error' => :'error',
37
+ :'metadata' => :'metadata',
38
+ :'success' => :'success',
39
+ :'warning' => :'warning',
40
+ :'zoho_desk_available' => :'zoho_desk_available',
41
+ :'zoho_desk_departments' => :'zoho_desk_departments'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'error' => :'Error',
54
+ :'metadata' => :'ResponseMetadata',
55
+ :'success' => :'Boolean',
56
+ :'warning' => :'Warning',
57
+ :'zoho_desk_available' => :'Boolean',
58
+ :'zoho_desk_departments' => :'Array<ConversationVirtualAgentCapabilityZohoDeskDepartment>'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxVoicemailCapabilitiesResponse` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!self.class.attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPbxVoicemailCapabilitiesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'error')
84
+ self.error = attributes[:'error']
85
+ end
86
+
87
+ if attributes.key?(:'metadata')
88
+ self.metadata = attributes[:'metadata']
89
+ end
90
+
91
+ if attributes.key?(:'success')
92
+ self.success = attributes[:'success']
93
+ end
94
+
95
+ if attributes.key?(:'warning')
96
+ self.warning = attributes[:'warning']
97
+ end
98
+
99
+ if attributes.key?(:'zoho_desk_available')
100
+ self.zoho_desk_available = attributes[:'zoho_desk_available']
101
+ end
102
+
103
+ if attributes.key?(:'zoho_desk_departments')
104
+ if (value = attributes[:'zoho_desk_departments']).is_a?(Array)
105
+ self.zoho_desk_departments = value
106
+ end
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ true
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ error == o.error &&
129
+ metadata == o.metadata &&
130
+ success == o.success &&
131
+ warning == o.warning &&
132
+ zoho_desk_available == o.zoho_desk_available &&
133
+ zoho_desk_departments == o.zoho_desk_departments
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Integer] Hash code
144
+ def hash
145
+ [error, metadata, success, warning, zoho_desk_available, zoho_desk_departments].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def self.build_from_hash(attributes)
152
+ new.build_from_hash(attributes)
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ attributes = attributes.transform_keys(&:to_sym)
161
+ self.class.openapi_types.each_pair do |key, type|
162
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
163
+ self.send("#{key}=", nil)
164
+ elsif type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
168
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
169
+ end
170
+ elsif !attributes[self.class.attribute_map[key]].nil?
171
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
+ end
173
+ end
174
+
175
+ self
176
+ end
177
+
178
+ # Deserializes the data based on type
179
+ # @param string type Data type
180
+ # @param string value Value to be deserialized
181
+ # @return [Object] Deserialized data
182
+ def _deserialize(type, value)
183
+ case type.to_sym
184
+ when :Time
185
+ Time.parse(value)
186
+ when :Date
187
+ Date.parse(value)
188
+ when :String
189
+ value.to_s
190
+ when :Integer
191
+ value.to_i
192
+ when :Float
193
+ value.to_f
194
+ when :Boolean
195
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
+ true
197
+ else
198
+ false
199
+ end
200
+ when :Object
201
+ # generic object (usually a Hash), return directly
202
+ value
203
+ when /\AArray<(?<inner_type>.+)>\z/
204
+ inner_type = Regexp.last_match[:inner_type]
205
+ value.map { |v| _deserialize(inner_type, v) }
206
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
+ k_type = Regexp.last_match[:k_type]
208
+ v_type = Regexp.last_match[:v_type]
209
+ {}.tap do |hash|
210
+ value.each do |k, v|
211
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
+ end
213
+ end
214
+ else # model
215
+ # models (e.g. Pet) or oneOf
216
+ klass = UltracartClient.const_get(type)
217
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
218
+ end
219
+ end
220
+
221
+ # Returns the string representation of the object
222
+ # @return [String] String presentation of the object
223
+ def to_s
224
+ to_hash.to_s
225
+ end
226
+
227
+ # to_body is an alias to to_hash (backward compatibility)
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_body
230
+ to_hash
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ # Outputs non-array value in the form of hash
250
+ # For object, use to_hash. Otherwise, just return the value
251
+ # @param [Object] value Any valid value
252
+ # @return [Hash] Returns the value in the form of hash
253
+ def _to_hash(value)
254
+ if value.is_a?(Array)
255
+ value.compact.map { |v| _to_hash(v) }
256
+ elsif value.is_a?(Hash)
257
+ {}.tap do |hash|
258
+ value.each { |k, v| hash[k] = _to_hash(v) }
259
+ end
260
+ elsif value.respond_to? :to_hash
261
+ value.to_hash
262
+ else
263
+ value
264
+ end
265
+ end
266
+
267
+ end
268
+
269
+ end
@@ -21,9 +21,15 @@ module UltracartClient
21
21
  # Merchant Id
22
22
  attr_accessor :merchant_id
23
23
 
24
+ # Send notices to channel
25
+ attr_accessor :send_notices_to_channel
26
+
24
27
  # Send notices to email
25
28
  attr_accessor :send_notices_to_email
26
29
 
30
+ # Send notices to Zoho Desk department id
31
+ attr_accessor :send_notices_to_zoho_desk_department_id
32
+
27
33
  # User Id
28
34
  attr_accessor :user_id
29
35
 
@@ -78,7 +84,9 @@ module UltracartClient
78
84
  {
79
85
  :'conversation_pbx_voicemail_mailbox_uuid' => :'conversation_pbx_voicemail_mailbox_uuid',
80
86
  :'merchant_id' => :'merchant_id',
87
+ :'send_notices_to_channel' => :'send_notices_to_channel',
81
88
  :'send_notices_to_email' => :'send_notices_to_email',
89
+ :'send_notices_to_zoho_desk_department_id' => :'send_notices_to_zoho_desk_department_id',
82
90
  :'user_id' => :'user_id',
83
91
  :'voicemail_followup_play_audio_uuid' => :'voicemail_followup_play_audio_uuid',
84
92
  :'voicemail_followup_say' => :'voicemail_followup_say',
@@ -101,7 +109,9 @@ module UltracartClient
101
109
  {
102
110
  :'conversation_pbx_voicemail_mailbox_uuid' => :'String',
103
111
  :'merchant_id' => :'String',
112
+ :'send_notices_to_channel' => :'String',
104
113
  :'send_notices_to_email' => :'String',
114
+ :'send_notices_to_zoho_desk_department_id' => :'String',
105
115
  :'user_id' => :'Integer',
106
116
  :'voicemail_followup_play_audio_uuid' => :'String',
107
117
  :'voicemail_followup_say' => :'String',
@@ -143,10 +153,18 @@ module UltracartClient
143
153
  self.merchant_id = attributes[:'merchant_id']
144
154
  end
145
155
 
156
+ if attributes.key?(:'send_notices_to_channel')
157
+ self.send_notices_to_channel = attributes[:'send_notices_to_channel']
158
+ end
159
+
146
160
  if attributes.key?(:'send_notices_to_email')
147
161
  self.send_notices_to_email = attributes[:'send_notices_to_email']
148
162
  end
149
163
 
164
+ if attributes.key?(:'send_notices_to_zoho_desk_department_id')
165
+ self.send_notices_to_zoho_desk_department_id = attributes[:'send_notices_to_zoho_desk_department_id']
166
+ end
167
+
150
168
  if attributes.key?(:'user_id')
151
169
  self.user_id = attributes[:'user_id']
152
170
  end
@@ -196,10 +214,18 @@ module UltracartClient
196
214
  invalid_properties.push('invalid value for "merchant_id", the character length must be smaller than or equal to 5.')
197
215
  end
198
216
 
217
+ if !@send_notices_to_channel.nil? && @send_notices_to_channel.to_s.length > 50
218
+ invalid_properties.push('invalid value for "send_notices_to_channel", the character length must be smaller than or equal to 50.')
219
+ end
220
+
199
221
  if !@send_notices_to_email.nil? && @send_notices_to_email.to_s.length > 250
200
222
  invalid_properties.push('invalid value for "send_notices_to_email", the character length must be smaller than or equal to 250.')
201
223
  end
202
224
 
225
+ if !@send_notices_to_zoho_desk_department_id.nil? && @send_notices_to_zoho_desk_department_id.to_s.length > 50
226
+ invalid_properties.push('invalid value for "send_notices_to_zoho_desk_department_id", the character length must be smaller than or equal to 50.')
227
+ end
228
+
203
229
  if !@voicemail_followup_play_audio_uuid.nil? && @voicemail_followup_play_audio_uuid.to_s.length > 50
204
230
  invalid_properties.push('invalid value for "voicemail_followup_play_audio_uuid", the character length must be smaller than or equal to 50.')
205
231
  end
@@ -232,7 +258,11 @@ module UltracartClient
232
258
  def valid?
233
259
  return false if !@conversation_pbx_voicemail_mailbox_uuid.nil? && @conversation_pbx_voicemail_mailbox_uuid.to_s.length > 50
234
260
  return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5
261
+ send_notices_to_channel_validator = EnumAttributeValidator.new('String', ["none", "email", "zoho_desk_ticket", "ultracart_task"])
262
+ return false unless send_notices_to_channel_validator.valid?(@send_notices_to_channel)
263
+ return false if !@send_notices_to_channel.nil? && @send_notices_to_channel.to_s.length > 50
235
264
  return false if !@send_notices_to_email.nil? && @send_notices_to_email.to_s.length > 250
265
+ return false if !@send_notices_to_zoho_desk_department_id.nil? && @send_notices_to_zoho_desk_department_id.to_s.length > 50
236
266
  return false if !@voicemail_followup_play_audio_uuid.nil? && @voicemail_followup_play_audio_uuid.to_s.length > 50
237
267
  voicemail_followup_say_voice_validator = EnumAttributeValidator.new('String', ["man", "woman"])
238
268
  return false unless voicemail_followup_say_voice_validator.valid?(@voicemail_followup_say_voice)
@@ -268,6 +298,16 @@ module UltracartClient
268
298
  @merchant_id = merchant_id
269
299
  end
270
300
 
301
+ # Custom attribute writer method checking allowed values (enum).
302
+ # @param [Object] send_notices_to_channel Object to be assigned
303
+ def send_notices_to_channel=(send_notices_to_channel)
304
+ validator = EnumAttributeValidator.new('String', ["none", "email", "zoho_desk_ticket", "ultracart_task"])
305
+ unless validator.valid?(send_notices_to_channel)
306
+ fail ArgumentError, "invalid value for \"send_notices_to_channel\", must be one of #{validator.allowable_values}."
307
+ end
308
+ @send_notices_to_channel = send_notices_to_channel
309
+ end
310
+
271
311
  # Custom attribute writer method with validation
272
312
  # @param [Object] send_notices_to_email Value to be assigned
273
313
  def send_notices_to_email=(send_notices_to_email)
@@ -278,6 +318,16 @@ module UltracartClient
278
318
  @send_notices_to_email = send_notices_to_email
279
319
  end
280
320
 
321
+ # Custom attribute writer method with validation
322
+ # @param [Object] send_notices_to_zoho_desk_department_id Value to be assigned
323
+ def send_notices_to_zoho_desk_department_id=(send_notices_to_zoho_desk_department_id)
324
+ if !send_notices_to_zoho_desk_department_id.nil? && send_notices_to_zoho_desk_department_id.to_s.length > 50
325
+ fail ArgumentError, 'invalid value for "send_notices_to_zoho_desk_department_id", the character length must be smaller than or equal to 50.'
326
+ end
327
+
328
+ @send_notices_to_zoho_desk_department_id = send_notices_to_zoho_desk_department_id
329
+ end
330
+
281
331
  # Custom attribute writer method with validation
282
332
  # @param [Object] voicemail_followup_play_audio_uuid Value to be assigned
283
333
  def voicemail_followup_play_audio_uuid=(voicemail_followup_play_audio_uuid)
@@ -345,7 +395,9 @@ module UltracartClient
345
395
  self.class == o.class &&
346
396
  conversation_pbx_voicemail_mailbox_uuid == o.conversation_pbx_voicemail_mailbox_uuid &&
347
397
  merchant_id == o.merchant_id &&
398
+ send_notices_to_channel == o.send_notices_to_channel &&
348
399
  send_notices_to_email == o.send_notices_to_email &&
400
+ send_notices_to_zoho_desk_department_id == o.send_notices_to_zoho_desk_department_id &&
349
401
  user_id == o.user_id &&
350
402
  voicemail_followup_play_audio_uuid == o.voicemail_followup_play_audio_uuid &&
351
403
  voicemail_followup_say == o.voicemail_followup_say &&
@@ -366,7 +418,7 @@ module UltracartClient
366
418
  # Calculates hash code according to all attributes.
367
419
  # @return [Integer] Hash code
368
420
  def hash
369
- [conversation_pbx_voicemail_mailbox_uuid, merchant_id, send_notices_to_email, user_id, voicemail_followup_play_audio_uuid, voicemail_followup_say, voicemail_followup_say_voice, voicemail_mailbox_id, voicemail_mailbox_type, voicemail_prompt_play_audio_uuid, voicemail_prompt_say, voicemail_prompt_say_voice].hash
421
+ [conversation_pbx_voicemail_mailbox_uuid, merchant_id, send_notices_to_channel, send_notices_to_email, send_notices_to_zoho_desk_department_id, user_id, voicemail_followup_play_audio_uuid, voicemail_followup_say, voicemail_followup_say_voice, voicemail_mailbox_id, voicemail_mailbox_type, voicemail_prompt_play_audio_uuid, voicemail_prompt_say, voicemail_prompt_say_voice].hash
370
422
  end
371
423
 
372
424
  # 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
@@ -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.72'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -268,6 +268,7 @@ require 'ultracart_api/models/conversation_pbx_time_range'
268
268
  require 'ultracart_api/models/conversation_pbx_time_range_config'
269
269
  require 'ultracart_api/models/conversation_pbx_time_range_response'
270
270
  require 'ultracart_api/models/conversation_pbx_time_ranges_response'
271
+ require 'ultracart_api/models/conversation_pbx_voicemail_capabilities_response'
271
272
  require 'ultracart_api/models/conversation_pbx_voicemail_mailbox'
272
273
  require 'ultracart_api/models/conversation_pbx_voicemail_mailbox_response'
273
274
  require 'ultracart_api/models/conversation_pbx_voicemail_mailboxes_response'
@@ -344,6 +345,7 @@ require 'ultracart_api/models/coupon_percent_off_item_with_items_quantity_purcha
344
345
  require 'ultracart_api/models/coupon_percent_off_items'
345
346
  require 'ultracart_api/models/coupon_percent_off_items_and_free_shipping'
346
347
  require 'ultracart_api/models/coupon_percent_off_items_with_items_purchase'
348
+ require 'ultracart_api/models/coupon_percent_off_items_with_minimum_item_amount'
347
349
  require 'ultracart_api/models/coupon_percent_off_msrp_items'
348
350
  require 'ultracart_api/models/coupon_percent_off_retail_price_items'
349
351
  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.72
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-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -317,6 +317,7 @@ files:
317
317
  - docs/ConversationPbxTimeRangeConfig.md
318
318
  - docs/ConversationPbxTimeRangeResponse.md
319
319
  - docs/ConversationPbxTimeRangesResponse.md
320
+ - docs/ConversationPbxVoicemailCapabilitiesResponse.md
320
321
  - docs/ConversationPbxVoicemailMailbox.md
321
322
  - docs/ConversationPbxVoicemailMailboxResponse.md
322
323
  - docs/ConversationPbxVoicemailMailboxesResponse.md
@@ -394,6 +395,7 @@ files:
394
395
  - docs/CouponPercentOffItems.md
395
396
  - docs/CouponPercentOffItemsAndFreeShipping.md
396
397
  - docs/CouponPercentOffItemsWithItemsPurchase.md
398
+ - docs/CouponPercentOffItemsWithMinimumItemAmount.md
397
399
  - docs/CouponPercentOffMsrpItems.md
398
400
  - docs/CouponPercentOffRetailPriceItems.md
399
401
  - docs/CouponPercentOffShipping.md
@@ -1306,6 +1308,7 @@ files:
1306
1308
  - lib/ultracart_api/models/conversation_pbx_time_range_config.rb
1307
1309
  - lib/ultracart_api/models/conversation_pbx_time_range_response.rb
1308
1310
  - lib/ultracart_api/models/conversation_pbx_time_ranges_response.rb
1311
+ - lib/ultracart_api/models/conversation_pbx_voicemail_capabilities_response.rb
1309
1312
  - lib/ultracart_api/models/conversation_pbx_voicemail_mailbox.rb
1310
1313
  - lib/ultracart_api/models/conversation_pbx_voicemail_mailbox_response.rb
1311
1314
  - lib/ultracart_api/models/conversation_pbx_voicemail_mailboxes_response.rb
@@ -1382,6 +1385,7 @@ files:
1382
1385
  - lib/ultracart_api/models/coupon_percent_off_items.rb
1383
1386
  - lib/ultracart_api/models/coupon_percent_off_items_and_free_shipping.rb
1384
1387
  - lib/ultracart_api/models/coupon_percent_off_items_with_items_purchase.rb
1388
+ - lib/ultracart_api/models/coupon_percent_off_items_with_minimum_item_amount.rb
1385
1389
  - lib/ultracart_api/models/coupon_percent_off_msrp_items.rb
1386
1390
  - lib/ultracart_api/models/coupon_percent_off_retail_price_items.rb
1387
1391
  - lib/ultracart_api/models/coupon_percent_off_shipping.rb