ultracart_api 4.1.10 → 4.1.11
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 +7 -2
- data/docs/ConversationApi.md +141 -0
- data/docs/ConversationVirtualAgentBudget.md +24 -0
- data/docs/ConversationVirtualAgentBudgetResponse.md +26 -0
- data/lib/ultracart_api/api/conversation_api.rb +127 -0
- data/lib/ultracart_api/models/conversation_virtual_agent_budget.rb +246 -0
- data/lib/ultracart_api/models/conversation_virtual_agent_budget_response.rb +256 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f71a7626e11dc2e25115c5f55316dd49e99b9962d26d24a1afb79c374c6343fe
|
4
|
+
data.tar.gz: b71883378304bb9635626ba5f688e50c05c0957b39f927f172f7e8990363949b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfd116db96db25c08b3e77f93b61e8d7e6a23a4c51563249624a9e5e08f512a1c0f2691e2a54c45e66f6f7034e9acb278ef647d21e3f38711de900557f7c6a5c
|
7
|
+
data.tar.gz: 768e53dec3684074239003282adabf20f454bbd68f17cee7e028365701b8bea3bdd9c53b411ee0f18045f642d6f4bb334f31947914940684de0aba8aeeb22d5f
|
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.11
|
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.11'
|
20
20
|
```
|
21
21
|
|
22
22
|
install:
|
@@ -187,6 +187,7 @@ Class | Method | HTTP request | Description
|
|
187
187
|
*UltracartClient::ConversationApi* | [**get_pbx_time_ranges**](docs/ConversationApi.md#get_pbx_time_ranges) | **GET** /conversation/pbx/time_range | Get pbx timeRanges
|
188
188
|
*UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailbox**](docs/ConversationApi.md#get_pbx_voicemail_mailbox) | **GET** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Get pbx voicemailMailbox
|
189
189
|
*UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailboxes**](docs/ConversationApi.md#get_pbx_voicemail_mailboxes) | **GET** /conversation/pbx/voicemail_mailbox | Get pbx voicemailMailboxes
|
190
|
+
*UltracartClient::ConversationApi* | [**get_virtual_agent_budget**](docs/ConversationApi.md#get_virtual_agent_budget) | **GET** /conversation/virtualagent/budget | Get virtual agent budget
|
190
191
|
*UltracartClient::ConversationApi* | [**insert_conversation_canned_message**](docs/ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message
|
191
192
|
*UltracartClient::ConversationApi* | [**insert_conversation_department**](docs/ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department
|
192
193
|
*UltracartClient::ConversationApi* | [**insert_conversation_engagement**](docs/ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement
|
@@ -218,6 +219,7 @@ Class | Method | HTTP request | Description
|
|
218
219
|
*UltracartClient::ConversationApi* | [**update_pbx_time_based**](docs/ConversationApi.md#update_pbx_time_based) | **PUT** /conversation/pbx/time_based/{conversationPbxTimeBasedUuid} | Update pbx timeBased
|
219
220
|
*UltracartClient::ConversationApi* | [**update_pbx_time_range**](docs/ConversationApi.md#update_pbx_time_range) | **PUT** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Update pbx timeRange
|
220
221
|
*UltracartClient::ConversationApi* | [**update_pbx_voicemail_mailbox**](docs/ConversationApi.md#update_pbx_voicemail_mailbox) | **PUT** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Update pbx voicemailMailbox
|
222
|
+
*UltracartClient::ConversationApi* | [**update_virtual_agent_budget**](docs/ConversationApi.md#update_virtual_agent_budget) | **PUT** /conversation/virtualagent/budget | Update virtual agent budget
|
221
223
|
*UltracartClient::CouponApi* | [**delete_coupon**](docs/CouponApi.md#delete_coupon) | **DELETE** /coupon/coupons/{coupon_oid} | Delete a coupon
|
222
224
|
*UltracartClient::CouponApi* | [**delete_coupons_by_code**](docs/CouponApi.md#delete_coupons_by_code) | **DELETE** /coupon/coupons/by_code | Deletes multiple coupons
|
223
225
|
*UltracartClient::CouponApi* | [**delete_coupons_by_oid**](docs/CouponApi.md#delete_coupons_by_oid) | **DELETE** /coupon/coupons/by_oid | Deletes multiple coupons
|
@@ -808,6 +810,8 @@ Class | Method | HTTP request | Description
|
|
808
810
|
- [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
|
809
811
|
- [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
|
810
812
|
- [UltracartClient::ConversationTwilioAccount](docs/ConversationTwilioAccount.md)
|
813
|
+
- [UltracartClient::ConversationVirtualAgentBudget](docs/ConversationVirtualAgentBudget.md)
|
814
|
+
- [UltracartClient::ConversationVirtualAgentBudgetResponse](docs/ConversationVirtualAgentBudgetResponse.md)
|
811
815
|
- [UltracartClient::ConversationWebchatContext](docs/ConversationWebchatContext.md)
|
812
816
|
- [UltracartClient::ConversationWebchatQueueStatus](docs/ConversationWebchatQueueStatus.md)
|
813
817
|
- [UltracartClient::ConversationWebchatQueueStatusAgent](docs/ConversationWebchatQueueStatusAgent.md)
|
@@ -1522,6 +1526,7 @@ Not every change is committed to every SDK.
|
|
1522
1526
|
|
1523
1527
|
| Version | Date | Comments |
|
1524
1528
|
| --: | :-: | --- |
|
1529
|
+
| 4.1.11 | 05/19/2025 | conversations - virtual AI budgets |
|
1525
1530
|
| 4.1.10 | 05/06/2025 | conversation - ConversationAgentProfile.user_id added for agent profiles call |
|
1526
1531
|
| 4.1.9 | 05/05/2025 | conversations - method to fetch all agent profiles for admin screens |
|
1527
1532
|
| 4.1.8 | 04/22/2025 | order property fields for created_by and created_dts |
|
data/docs/ConversationApi.md
CHANGED
@@ -57,6 +57,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
57
57
|
| [**get_pbx_time_ranges**](ConversationApi.md#get_pbx_time_ranges) | **GET** /conversation/pbx/time_range | Get pbx timeRanges |
|
58
58
|
| [**get_pbx_voicemail_mailbox**](ConversationApi.md#get_pbx_voicemail_mailbox) | **GET** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Get pbx voicemailMailbox |
|
59
59
|
| [**get_pbx_voicemail_mailboxes**](ConversationApi.md#get_pbx_voicemail_mailboxes) | **GET** /conversation/pbx/voicemail_mailbox | Get pbx voicemailMailboxes |
|
60
|
+
| [**get_virtual_agent_budget**](ConversationApi.md#get_virtual_agent_budget) | **GET** /conversation/virtualagent/budget | Get virtual agent budget |
|
60
61
|
| [**insert_conversation_canned_message**](ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message |
|
61
62
|
| [**insert_conversation_department**](ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department |
|
62
63
|
| [**insert_conversation_engagement**](ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement |
|
@@ -88,6 +89,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
88
89
|
| [**update_pbx_time_based**](ConversationApi.md#update_pbx_time_based) | **PUT** /conversation/pbx/time_based/{conversationPbxTimeBasedUuid} | Update pbx timeBased |
|
89
90
|
| [**update_pbx_time_range**](ConversationApi.md#update_pbx_time_range) | **PUT** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Update pbx timeRange |
|
90
91
|
| [**update_pbx_voicemail_mailbox**](ConversationApi.md#update_pbx_voicemail_mailbox) | **PUT** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Update pbx voicemailMailbox |
|
92
|
+
| [**update_virtual_agent_budget**](ConversationApi.md#update_virtual_agent_budget) | **PUT** /conversation/virtualagent/budget | Update virtual agent budget |
|
91
93
|
|
92
94
|
|
93
95
|
## delete_conversation_canned_message
|
@@ -3809,6 +3811,74 @@ This endpoint does not need any parameter.
|
|
3809
3811
|
- **Accept**: application/json
|
3810
3812
|
|
3811
3813
|
|
3814
|
+
## get_virtual_agent_budget
|
3815
|
+
|
3816
|
+
> <ConversationVirtualAgentBudgetResponse> get_virtual_agent_budget
|
3817
|
+
|
3818
|
+
Get virtual agent budget
|
3819
|
+
|
3820
|
+
Retrieve virtual agent budget
|
3821
|
+
|
3822
|
+
### Examples
|
3823
|
+
|
3824
|
+
```ruby
|
3825
|
+
require 'time'
|
3826
|
+
require 'ultracart_api'
|
3827
|
+
require 'json'
|
3828
|
+
require 'yaml'
|
3829
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
3830
|
+
|
3831
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
3832
|
+
# As such, this might not be the best way to use this object.
|
3833
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
3834
|
+
|
3835
|
+
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
3836
|
+
|
3837
|
+
begin
|
3838
|
+
# Get virtual agent budget
|
3839
|
+
result = api_instance.get_virtual_agent_budget
|
3840
|
+
p result
|
3841
|
+
rescue UltracartClient::ApiError => e
|
3842
|
+
puts "Error when calling ConversationApi->get_virtual_agent_budget: #{e}"
|
3843
|
+
end
|
3844
|
+
```
|
3845
|
+
|
3846
|
+
#### Using the get_virtual_agent_budget_with_http_info variant
|
3847
|
+
|
3848
|
+
This returns an Array which contains the response data, status code and headers.
|
3849
|
+
|
3850
|
+
> <Array(<ConversationVirtualAgentBudgetResponse>, Integer, Hash)> get_virtual_agent_budget_with_http_info
|
3851
|
+
|
3852
|
+
```ruby
|
3853
|
+
begin
|
3854
|
+
# Get virtual agent budget
|
3855
|
+
data, status_code, headers = api_instance.get_virtual_agent_budget_with_http_info
|
3856
|
+
p status_code # => 2xx
|
3857
|
+
p headers # => { ... }
|
3858
|
+
p data # => <ConversationVirtualAgentBudgetResponse>
|
3859
|
+
rescue UltracartClient::ApiError => e
|
3860
|
+
puts "Error when calling ConversationApi->get_virtual_agent_budget_with_http_info: #{e}"
|
3861
|
+
end
|
3862
|
+
```
|
3863
|
+
|
3864
|
+
### Parameters
|
3865
|
+
|
3866
|
+
This endpoint does not need any parameter.
|
3867
|
+
|
3868
|
+
### Return type
|
3869
|
+
|
3870
|
+
[**ConversationVirtualAgentBudgetResponse**](ConversationVirtualAgentBudgetResponse.md)
|
3871
|
+
|
3872
|
+
### Authorization
|
3873
|
+
|
3874
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
3875
|
+
|
3876
|
+
### HTTP request headers
|
3877
|
+
|
3878
|
+
- **Content-Type**: Not defined
|
3879
|
+
- **Accept**: application/json
|
3880
|
+
|
3881
|
+
|
3812
3882
|
## insert_conversation_canned_message
|
3813
3883
|
|
3814
3884
|
> <ConversationCannedMessageResponse> insert_conversation_canned_message(canned_message)
|
@@ -6031,3 +6101,74 @@ end
|
|
6031
6101
|
- **Content-Type**: application/json
|
6032
6102
|
- **Accept**: application/json
|
6033
6103
|
|
6104
|
+
|
6105
|
+
## update_virtual_agent_budget
|
6106
|
+
|
6107
|
+
> <ConversationVirtualAgentBudgetResponse> update_virtual_agent_budget(virtual_agent_budget)
|
6108
|
+
|
6109
|
+
Update virtual agent budget
|
6110
|
+
|
6111
|
+
Update virtual agent budget
|
6112
|
+
|
6113
|
+
### Examples
|
6114
|
+
|
6115
|
+
```ruby
|
6116
|
+
require 'time'
|
6117
|
+
require 'ultracart_api'
|
6118
|
+
require 'json'
|
6119
|
+
require 'yaml'
|
6120
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
6121
|
+
|
6122
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
6123
|
+
# As such, this might not be the best way to use this object.
|
6124
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
6125
|
+
|
6126
|
+
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
6127
|
+
virtual_agent_budget = UltracartClient::ConversationVirtualAgentBudget.new # ConversationVirtualAgentBudget | Virtual Agent Budget
|
6128
|
+
|
6129
|
+
begin
|
6130
|
+
# Update virtual agent budget
|
6131
|
+
result = api_instance.update_virtual_agent_budget(virtual_agent_budget)
|
6132
|
+
p result
|
6133
|
+
rescue UltracartClient::ApiError => e
|
6134
|
+
puts "Error when calling ConversationApi->update_virtual_agent_budget: #{e}"
|
6135
|
+
end
|
6136
|
+
```
|
6137
|
+
|
6138
|
+
#### Using the update_virtual_agent_budget_with_http_info variant
|
6139
|
+
|
6140
|
+
This returns an Array which contains the response data, status code and headers.
|
6141
|
+
|
6142
|
+
> <Array(<ConversationVirtualAgentBudgetResponse>, Integer, Hash)> update_virtual_agent_budget_with_http_info(virtual_agent_budget)
|
6143
|
+
|
6144
|
+
```ruby
|
6145
|
+
begin
|
6146
|
+
# Update virtual agent budget
|
6147
|
+
data, status_code, headers = api_instance.update_virtual_agent_budget_with_http_info(virtual_agent_budget)
|
6148
|
+
p status_code # => 2xx
|
6149
|
+
p headers # => { ... }
|
6150
|
+
p data # => <ConversationVirtualAgentBudgetResponse>
|
6151
|
+
rescue UltracartClient::ApiError => e
|
6152
|
+
puts "Error when calling ConversationApi->update_virtual_agent_budget_with_http_info: #{e}"
|
6153
|
+
end
|
6154
|
+
```
|
6155
|
+
|
6156
|
+
### Parameters
|
6157
|
+
|
6158
|
+
| Name | Type | Description | Notes |
|
6159
|
+
| ---- | ---- | ----------- | ----- |
|
6160
|
+
| **virtual_agent_budget** | [**ConversationVirtualAgentBudget**](ConversationVirtualAgentBudget.md) | Virtual Agent Budget | |
|
6161
|
+
|
6162
|
+
### Return type
|
6163
|
+
|
6164
|
+
[**ConversationVirtualAgentBudgetResponse**](ConversationVirtualAgentBudgetResponse.md)
|
6165
|
+
|
6166
|
+
### Authorization
|
6167
|
+
|
6168
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
6169
|
+
|
6170
|
+
### HTTP request headers
|
6171
|
+
|
6172
|
+
- **Content-Type**: application/json
|
6173
|
+
- **Accept**: application/json
|
6174
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# UltracartClient::ConversationVirtualAgentBudget
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **budget_daily** | **Float** | | [optional] |
|
8
|
+
| **budget_monthly** | **Float** | | [optional] |
|
9
|
+
| **used_daily** | **Float** | | [optional] |
|
10
|
+
| **used_monthly** | **Float** | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'ultracart_api'
|
16
|
+
|
17
|
+
instance = UltracartClient::ConversationVirtualAgentBudget.new(
|
18
|
+
budget_daily: null,
|
19
|
+
budget_monthly: null,
|
20
|
+
used_daily: null,
|
21
|
+
used_monthly: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# UltracartClient::ConversationVirtualAgentBudgetResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **budget** | [**ConversationVirtualAgentBudget**](ConversationVirtualAgentBudget.md) | | [optional] |
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ultracart_api'
|
17
|
+
|
18
|
+
instance = UltracartClient::ConversationVirtualAgentBudgetResponse.new(
|
19
|
+
budget: null,
|
20
|
+
error: null,
|
21
|
+
metadata: null,
|
22
|
+
success: null,
|
23
|
+
warning: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -3349,6 +3349,64 @@ module UltracartClient
|
|
3349
3349
|
return data, status_code, headers
|
3350
3350
|
end
|
3351
3351
|
|
3352
|
+
# Get virtual agent budget
|
3353
|
+
# Retrieve virtual agent budget
|
3354
|
+
# @param [Hash] opts the optional parameters
|
3355
|
+
# @return [ConversationVirtualAgentBudgetResponse]
|
3356
|
+
def get_virtual_agent_budget(opts = {})
|
3357
|
+
data, _status_code, _headers = get_virtual_agent_budget_with_http_info(opts)
|
3358
|
+
data
|
3359
|
+
end
|
3360
|
+
|
3361
|
+
# Get virtual agent budget
|
3362
|
+
# Retrieve virtual agent budget
|
3363
|
+
# @param [Hash] opts the optional parameters
|
3364
|
+
# @return [Array<(ConversationVirtualAgentBudgetResponse, Integer, Hash)>] ConversationVirtualAgentBudgetResponse data, response status code and response headers
|
3365
|
+
def get_virtual_agent_budget_with_http_info(opts = {})
|
3366
|
+
if @api_client.config.debugging
|
3367
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_virtual_agent_budget ...'
|
3368
|
+
end
|
3369
|
+
# resource path
|
3370
|
+
local_var_path = '/conversation/virtualagent/budget'
|
3371
|
+
|
3372
|
+
# query parameters
|
3373
|
+
query_params = opts[:query_params] || {}
|
3374
|
+
|
3375
|
+
# header parameters
|
3376
|
+
header_params = opts[:header_params] || {}
|
3377
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
3378
|
+
# HTTP header 'Accept' (if needed)
|
3379
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3380
|
+
|
3381
|
+
# form parameters
|
3382
|
+
form_params = opts[:form_params] || {}
|
3383
|
+
|
3384
|
+
# http body (model)
|
3385
|
+
post_body = opts[:debug_body]
|
3386
|
+
|
3387
|
+
# return_type
|
3388
|
+
return_type = opts[:debug_return_type] || 'ConversationVirtualAgentBudgetResponse'
|
3389
|
+
|
3390
|
+
# auth_names
|
3391
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
3392
|
+
|
3393
|
+
new_options = opts.merge(
|
3394
|
+
:operation => :"ConversationApi.get_virtual_agent_budget",
|
3395
|
+
:header_params => header_params,
|
3396
|
+
:query_params => query_params,
|
3397
|
+
:form_params => form_params,
|
3398
|
+
:body => post_body,
|
3399
|
+
:auth_names => auth_names,
|
3400
|
+
:return_type => return_type
|
3401
|
+
)
|
3402
|
+
|
3403
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3404
|
+
if @api_client.config.debugging
|
3405
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_virtual_agent_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3406
|
+
end
|
3407
|
+
return data, status_code, headers
|
3408
|
+
end
|
3409
|
+
|
3352
3410
|
# Insert a canned message
|
3353
3411
|
# Insert a canned message
|
3354
3412
|
# @param canned_message [ConversationCannedMessage] Canned message
|
@@ -5537,5 +5595,74 @@ module UltracartClient
|
|
5537
5595
|
end
|
5538
5596
|
return data, status_code, headers
|
5539
5597
|
end
|
5598
|
+
|
5599
|
+
# Update virtual agent budget
|
5600
|
+
# Update virtual agent budget
|
5601
|
+
# @param virtual_agent_budget [ConversationVirtualAgentBudget] Virtual Agent Budget
|
5602
|
+
# @param [Hash] opts the optional parameters
|
5603
|
+
# @return [ConversationVirtualAgentBudgetResponse]
|
5604
|
+
def update_virtual_agent_budget(virtual_agent_budget, opts = {})
|
5605
|
+
data, _status_code, _headers = update_virtual_agent_budget_with_http_info(virtual_agent_budget, opts)
|
5606
|
+
data
|
5607
|
+
end
|
5608
|
+
|
5609
|
+
# Update virtual agent budget
|
5610
|
+
# Update virtual agent budget
|
5611
|
+
# @param virtual_agent_budget [ConversationVirtualAgentBudget] Virtual Agent Budget
|
5612
|
+
# @param [Hash] opts the optional parameters
|
5613
|
+
# @return [Array<(ConversationVirtualAgentBudgetResponse, Integer, Hash)>] ConversationVirtualAgentBudgetResponse data, response status code and response headers
|
5614
|
+
def update_virtual_agent_budget_with_http_info(virtual_agent_budget, opts = {})
|
5615
|
+
if @api_client.config.debugging
|
5616
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.update_virtual_agent_budget ...'
|
5617
|
+
end
|
5618
|
+
# verify the required parameter 'virtual_agent_budget' is set
|
5619
|
+
if @api_client.config.client_side_validation && virtual_agent_budget.nil?
|
5620
|
+
fail ArgumentError, "Missing the required parameter 'virtual_agent_budget' when calling ConversationApi.update_virtual_agent_budget"
|
5621
|
+
end
|
5622
|
+
# resource path
|
5623
|
+
local_var_path = '/conversation/virtualagent/budget'
|
5624
|
+
|
5625
|
+
# query parameters
|
5626
|
+
query_params = opts[:query_params] || {}
|
5627
|
+
|
5628
|
+
# header parameters
|
5629
|
+
header_params = opts[:header_params] || {}
|
5630
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
5631
|
+
# HTTP header 'Accept' (if needed)
|
5632
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
5633
|
+
# HTTP header 'Content-Type'
|
5634
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
5635
|
+
if !content_type.nil?
|
5636
|
+
header_params['Content-Type'] = content_type
|
5637
|
+
end
|
5638
|
+
|
5639
|
+
# form parameters
|
5640
|
+
form_params = opts[:form_params] || {}
|
5641
|
+
|
5642
|
+
# http body (model)
|
5643
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(virtual_agent_budget)
|
5644
|
+
|
5645
|
+
# return_type
|
5646
|
+
return_type = opts[:debug_return_type] || 'ConversationVirtualAgentBudgetResponse'
|
5647
|
+
|
5648
|
+
# auth_names
|
5649
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
5650
|
+
|
5651
|
+
new_options = opts.merge(
|
5652
|
+
:operation => :"ConversationApi.update_virtual_agent_budget",
|
5653
|
+
:header_params => header_params,
|
5654
|
+
:query_params => query_params,
|
5655
|
+
:form_params => form_params,
|
5656
|
+
:body => post_body,
|
5657
|
+
:auth_names => auth_names,
|
5658
|
+
:return_type => return_type
|
5659
|
+
)
|
5660
|
+
|
5661
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
5662
|
+
if @api_client.config.debugging
|
5663
|
+
@api_client.config.logger.debug "API called: ConversationApi#update_virtual_agent_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
5664
|
+
end
|
5665
|
+
return data, status_code, headers
|
5666
|
+
end
|
5540
5667
|
end
|
5541
5668
|
end
|
@@ -0,0 +1,246 @@
|
|
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 ConversationVirtualAgentBudget
|
18
|
+
attr_accessor :budget_daily
|
19
|
+
|
20
|
+
attr_accessor :budget_monthly
|
21
|
+
|
22
|
+
attr_accessor :used_daily
|
23
|
+
|
24
|
+
attr_accessor :used_monthly
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'budget_daily' => :'budget_daily',
|
30
|
+
:'budget_monthly' => :'budget_monthly',
|
31
|
+
:'used_daily' => :'used_daily',
|
32
|
+
:'used_monthly' => :'used_monthly'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'budget_daily' => :'Float',
|
45
|
+
:'budget_monthly' => :'Float',
|
46
|
+
:'used_daily' => :'Float',
|
47
|
+
:'used_monthly' => :'Float'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationVirtualAgentBudget` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationVirtualAgentBudget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'budget_daily')
|
73
|
+
self.budget_daily = attributes[:'budget_daily']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'budget_monthly')
|
77
|
+
self.budget_monthly = attributes[:'budget_monthly']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'used_daily')
|
81
|
+
self.used_daily = attributes[:'used_daily']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'used_monthly')
|
85
|
+
self.used_monthly = attributes[:'used_monthly']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
invalid_properties
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
def valid?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
budget_daily == o.budget_daily &&
|
108
|
+
budget_monthly == o.budget_monthly &&
|
109
|
+
used_daily == o.used_daily &&
|
110
|
+
used_monthly == o.used_monthly
|
111
|
+
end
|
112
|
+
|
113
|
+
# @see the `==` method
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def eql?(o)
|
116
|
+
self == o
|
117
|
+
end
|
118
|
+
|
119
|
+
# Calculates hash code according to all attributes.
|
120
|
+
# @return [Integer] Hash code
|
121
|
+
def hash
|
122
|
+
[budget_daily, budget_monthly, used_daily, used_monthly].hash
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def self.build_from_hash(attributes)
|
129
|
+
new.build_from_hash(attributes)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Builds the object from hash
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
# @return [Object] Returns the model itself
|
135
|
+
def build_from_hash(attributes)
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
138
|
+
self.class.openapi_types.each_pair do |key, type|
|
139
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
140
|
+
self.send("#{key}=", nil)
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
142
|
+
# check to ensure the input is an array given that the attribute
|
143
|
+
# is documented as an array but the input is not
|
144
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
+
end
|
147
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deserializes the data based on type
|
156
|
+
# @param string type Data type
|
157
|
+
# @param string value Value to be deserialized
|
158
|
+
# @return [Object] Deserialized data
|
159
|
+
def _deserialize(type, value)
|
160
|
+
case type.to_sym
|
161
|
+
when :Time
|
162
|
+
Time.parse(value)
|
163
|
+
when :Date
|
164
|
+
Date.parse(value)
|
165
|
+
when :String
|
166
|
+
value.to_s
|
167
|
+
when :Integer
|
168
|
+
value.to_i
|
169
|
+
when :Float
|
170
|
+
value.to_f
|
171
|
+
when :Boolean
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
+
true
|
174
|
+
else
|
175
|
+
false
|
176
|
+
end
|
177
|
+
when :Object
|
178
|
+
# generic object (usually a Hash), return directly
|
179
|
+
value
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each do |k, v|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
else # model
|
192
|
+
# models (e.g. Pet) or oneOf
|
193
|
+
klass = UltracartClient.const_get(type)
|
194
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the string representation of the object
|
199
|
+
# @return [String] String presentation of the object
|
200
|
+
def to_s
|
201
|
+
to_hash.to_s
|
202
|
+
end
|
203
|
+
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_body
|
207
|
+
to_hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the object in the form of hash
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_hash
|
213
|
+
hash = {}
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
215
|
+
value = self.send(attr)
|
216
|
+
if value.nil?
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
219
|
+
end
|
220
|
+
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
245
|
+
|
246
|
+
end
|
@@ -0,0 +1,256 @@
|
|
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 ConversationVirtualAgentBudgetResponse
|
18
|
+
attr_accessor :budget
|
19
|
+
|
20
|
+
attr_accessor :error
|
21
|
+
|
22
|
+
attr_accessor :metadata
|
23
|
+
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
26
|
+
|
27
|
+
attr_accessor :warning
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'budget' => :'budget',
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'budget' => :'ConversationVirtualAgentBudget',
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'success' => :'Boolean',
|
52
|
+
:'warning' => :'Warning'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
])
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationVirtualAgentBudgetResponse` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationVirtualAgentBudgetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'budget')
|
78
|
+
self.budget = attributes[:'budget']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'error')
|
82
|
+
self.error = attributes[:'error']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'metadata')
|
86
|
+
self.metadata = attributes[:'metadata']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'success')
|
90
|
+
self.success = attributes[:'success']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'warning')
|
94
|
+
self.warning = attributes[:'warning']
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
+
# @return Array for valid properties with the reasons
|
100
|
+
def list_invalid_properties
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
budget == o.budget &&
|
117
|
+
error == o.error &&
|
118
|
+
metadata == o.metadata &&
|
119
|
+
success == o.success &&
|
120
|
+
warning == o.warning
|
121
|
+
end
|
122
|
+
|
123
|
+
# @see the `==` method
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def eql?(o)
|
126
|
+
self == o
|
127
|
+
end
|
128
|
+
|
129
|
+
# Calculates hash code according to all attributes.
|
130
|
+
# @return [Integer] Hash code
|
131
|
+
def hash
|
132
|
+
[budget, error, metadata, success, warning].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def self.build_from_hash(attributes)
|
139
|
+
new.build_from_hash(attributes)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
150
|
+
self.send("#{key}=", nil)
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = UltracartClient.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -237,6 +237,8 @@ require 'ultracart_api/models/conversation_start_request'
|
|
237
237
|
require 'ultracart_api/models/conversation_start_response'
|
238
238
|
require 'ultracart_api/models/conversation_summary'
|
239
239
|
require 'ultracart_api/models/conversation_twilio_account'
|
240
|
+
require 'ultracart_api/models/conversation_virtual_agent_budget'
|
241
|
+
require 'ultracart_api/models/conversation_virtual_agent_budget_response'
|
240
242
|
require 'ultracart_api/models/conversation_webchat_context'
|
241
243
|
require 'ultracart_api/models/conversation_webchat_queue_status'
|
242
244
|
require 'ultracart_api/models/conversation_webchat_queue_status_agent'
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -287,6 +287,8 @@ files:
|
|
287
287
|
- docs/ConversationStartResponse.md
|
288
288
|
- docs/ConversationSummary.md
|
289
289
|
- docs/ConversationTwilioAccount.md
|
290
|
+
- docs/ConversationVirtualAgentBudget.md
|
291
|
+
- docs/ConversationVirtualAgentBudgetResponse.md
|
290
292
|
- docs/ConversationWebchatContext.md
|
291
293
|
- docs/ConversationWebchatQueueStatus.md
|
292
294
|
- docs/ConversationWebchatQueueStatusAgent.md
|
@@ -1187,6 +1189,8 @@ files:
|
|
1187
1189
|
- lib/ultracart_api/models/conversation_start_response.rb
|
1188
1190
|
- lib/ultracart_api/models/conversation_summary.rb
|
1189
1191
|
- lib/ultracart_api/models/conversation_twilio_account.rb
|
1192
|
+
- lib/ultracart_api/models/conversation_virtual_agent_budget.rb
|
1193
|
+
- lib/ultracart_api/models/conversation_virtual_agent_budget_response.rb
|
1190
1194
|
- lib/ultracart_api/models/conversation_webchat_context.rb
|
1191
1195
|
- lib/ultracart_api/models/conversation_webchat_queue_status.rb
|
1192
1196
|
- lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb
|