ultracart_api 3.11.11 → 3.11.13
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 +10 -4
- data/docs/Conversation.md +2 -0
- data/docs/ConversationApi.md +97 -0
- data/docs/ConversationVirtualAgentCapabilities.md +16 -0
- data/docs/ConversationVirtualAgentCapabilitiesResponse.md +12 -0
- data/docs/ItemRestriction.md +1 -0
- data/lib/ultracart_api/api/conversation_api.rb +104 -0
- data/lib/ultracart_api/models/conversation.rb +21 -1
- data/lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb +256 -0
- data/lib/ultracart_api/models/conversation_virtual_agent_capabilities_response.rb +221 -0
- data/lib/ultracart_api/models/item_restriction.rb +11 -1
- 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: 656f56eb03edbe8d3fcea4b31483a94fbe1b59a1da823f4013651c8516b8c7b8
|
4
|
+
data.tar.gz: 686a268af6211e982927372fbceebe8f1b8928afffb0cb3c0397d240acd4ab8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c3ed31f2dcc4dd982973caf97c6da4141750386e003aea8cc8edea593f4a174bd65a9f8656d3883afcd4c6030ab55627541fd7b64e09ccca688c5275b6b2a25
|
7
|
+
data.tar.gz: 188eccb8f4461e294feea9f14de956749b5ef32b7a25bf0242216aa2e12bbe802ccd7bf440c427e67fcd7f4e5a0e91af549f99fd232402e19b0bc21df659665c
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 3.11.
|
10
|
+
- Package version: 3.11.13
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
13
13
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-3.11.
|
27
|
+
gem install ./ultracart_api-3.11.13.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.11.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.11.13.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ultracart_api', '~> 3.11.
|
35
|
+
gem 'ultracart_api', '~> 3.11.13'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -192,6 +192,7 @@ Class | Method | HTTP request | Description
|
|
192
192
|
*UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailbox**](docs/ConversationApi.md#get_pbx_voicemail_mailbox) | **GET** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Get pbx voicemailMailbox
|
193
193
|
*UltracartClient::ConversationApi* | [**get_pbx_voicemail_mailboxes**](docs/ConversationApi.md#get_pbx_voicemail_mailboxes) | **GET** /conversation/pbx/voicemail_mailbox | Get pbx voicemailMailboxes
|
194
194
|
*UltracartClient::ConversationApi* | [**get_virtual_agent_budget**](docs/ConversationApi.md#get_virtual_agent_budget) | **GET** /conversation/virtualagent/budget | Get virtual agent budget
|
195
|
+
*UltracartClient::ConversationApi* | [**get_virtual_agent_capabilities**](docs/ConversationApi.md#get_virtual_agent_capabilities) | **GET** /conversation/virtualagent/capabilities | Get virtual agent capabilities
|
195
196
|
*UltracartClient::ConversationApi* | [**insert_conversation_canned_message**](docs/ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message
|
196
197
|
*UltracartClient::ConversationApi* | [**insert_conversation_department**](docs/ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department
|
197
198
|
*UltracartClient::ConversationApi* | [**insert_conversation_engagement**](docs/ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement
|
@@ -224,6 +225,7 @@ Class | Method | HTTP request | Description
|
|
224
225
|
*UltracartClient::ConversationApi* | [**update_pbx_time_range**](docs/ConversationApi.md#update_pbx_time_range) | **PUT** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Update pbx timeRange
|
225
226
|
*UltracartClient::ConversationApi* | [**update_pbx_voicemail_mailbox**](docs/ConversationApi.md#update_pbx_voicemail_mailbox) | **PUT** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Update pbx voicemailMailbox
|
226
227
|
*UltracartClient::ConversationApi* | [**update_virtual_agent_budget**](docs/ConversationApi.md#update_virtual_agent_budget) | **PUT** /conversation/virtualagent/budget | Update virtual agent budget
|
228
|
+
*UltracartClient::ConversationApi* | [**update_virtual_agent_capabilities**](docs/ConversationApi.md#update_virtual_agent_capabilities) | **PUT** /conversation/virtualagent/capabilities | Update virtual agent capabilities
|
227
229
|
*UltracartClient::CouponApi* | [**delete_coupon**](docs/CouponApi.md#delete_coupon) | **DELETE** /coupon/coupons/{coupon_oid} | Delete a coupon
|
228
230
|
*UltracartClient::CouponApi* | [**delete_coupons_by_code**](docs/CouponApi.md#delete_coupons_by_code) | **DELETE** /coupon/coupons/by_code | Deletes multiple coupons
|
229
231
|
*UltracartClient::CouponApi* | [**delete_coupons_by_oid**](docs/CouponApi.md#delete_coupons_by_oid) | **DELETE** /coupon/coupons/by_oid | Deletes multiple coupons
|
@@ -817,6 +819,8 @@ Class | Method | HTTP request | Description
|
|
817
819
|
- [UltracartClient::ConversationTwilioAccount](docs/ConversationTwilioAccount.md)
|
818
820
|
- [UltracartClient::ConversationVirtualAgentBudget](docs/ConversationVirtualAgentBudget.md)
|
819
821
|
- [UltracartClient::ConversationVirtualAgentBudgetResponse](docs/ConversationVirtualAgentBudgetResponse.md)
|
822
|
+
- [UltracartClient::ConversationVirtualAgentCapabilities](docs/ConversationVirtualAgentCapabilities.md)
|
823
|
+
- [UltracartClient::ConversationVirtualAgentCapabilitiesResponse](docs/ConversationVirtualAgentCapabilitiesResponse.md)
|
820
824
|
- [UltracartClient::ConversationWebchatContext](docs/ConversationWebchatContext.md)
|
821
825
|
- [UltracartClient::ConversationWebchatQueueStatus](docs/ConversationWebchatQueueStatus.md)
|
822
826
|
- [UltracartClient::ConversationWebchatQueueStatusAgent](docs/ConversationWebchatQueueStatusAgent.md)
|
@@ -1528,6 +1532,8 @@ Not every change is committed to every SDK.
|
|
1528
1532
|
|
1529
1533
|
| Version | Date | Comments |
|
1530
1534
|
| --: | :-: | --- |
|
1535
|
+
| 3.11.13 | 05/20/2025 | conversation - virtual agent flag and virtual agent cost |
|
1536
|
+
| 3.11.12 | 05/19/2025 | conversations - AI agent capabilities method |
|
1531
1537
|
| 3.11.11 | 05/19/2025 | conversations - virtual AI budgets |
|
1532
1538
|
| 3.11.10 | 05/06/2025 | conversation - ConversationAgentProfile.user_id added for agent profiles call |
|
1533
1539
|
| 3.11.9 | 05/05/2025 | conversations - method to fetch all agent profiles for admin screens |
|
data/docs/Conversation.md
CHANGED
@@ -21,6 +21,8 @@ Name | Type | Description | Notes
|
|
21
21
|
**sentiment** | [**ConversationSentiment**](ConversationSentiment.md) | | [optional]
|
22
22
|
**start_dts** | **String** | Start of the conversation date/time | [optional]
|
23
23
|
**unread_messages** | **BOOLEAN** | | [optional]
|
24
|
+
**virtual_agent** | **BOOLEAN** | True if a virtual agent answered the conversation | [optional]
|
25
|
+
**virtual_agent_cost** | **Float** | The cost of this conversation performed by the virtual agent | [optional]
|
24
26
|
**visible** | **BOOLEAN** | | [optional]
|
25
27
|
|
26
28
|
|
data/docs/ConversationApi.md
CHANGED
@@ -58,6 +58,7 @@ Method | HTTP request | Description
|
|
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
60
|
[**get_virtual_agent_budget**](ConversationApi.md#get_virtual_agent_budget) | **GET** /conversation/virtualagent/budget | Get virtual agent budget
|
61
|
+
[**get_virtual_agent_capabilities**](ConversationApi.md#get_virtual_agent_capabilities) | **GET** /conversation/virtualagent/capabilities | Get virtual agent capabilities
|
61
62
|
[**insert_conversation_canned_message**](ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message
|
62
63
|
[**insert_conversation_department**](ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department
|
63
64
|
[**insert_conversation_engagement**](ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement
|
@@ -90,6 +91,7 @@ Method | HTTP request | Description
|
|
90
91
|
[**update_pbx_time_range**](ConversationApi.md#update_pbx_time_range) | **PUT** /conversation/pbx/time_range/{conversationPbxTimeRangeUuid} | Update pbx timeRange
|
91
92
|
[**update_pbx_voicemail_mailbox**](ConversationApi.md#update_pbx_voicemail_mailbox) | **PUT** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Update pbx voicemailMailbox
|
92
93
|
[**update_virtual_agent_budget**](ConversationApi.md#update_virtual_agent_budget) | **PUT** /conversation/virtualagent/budget | Update virtual agent budget
|
94
|
+
[**update_virtual_agent_capabilities**](ConversationApi.md#update_virtual_agent_capabilities) | **PUT** /conversation/virtualagent/capabilities | Update virtual agent capabilities
|
93
95
|
|
94
96
|
|
95
97
|
# **delete_conversation_canned_message**
|
@@ -2705,6 +2707,51 @@ This endpoint does not need any parameter.
|
|
2705
2707
|
|
2706
2708
|
|
2707
2709
|
|
2710
|
+
# **get_virtual_agent_capabilities**
|
2711
|
+
> ConversationVirtualAgentCapabilitiesResponse get_virtual_agent_capabilities
|
2712
|
+
|
2713
|
+
Get virtual agent capabilities
|
2714
|
+
|
2715
|
+
Retrieve virtual agent capabilities
|
2716
|
+
|
2717
|
+
### Example
|
2718
|
+
```ruby
|
2719
|
+
# load the gem
|
2720
|
+
require 'ultracart_api'
|
2721
|
+
|
2722
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
2723
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
2724
|
+
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
|
2725
|
+
|
2726
|
+
|
2727
|
+
|
2728
|
+
begin
|
2729
|
+
#Get virtual agent capabilities
|
2730
|
+
result = api_instance.get_virtual_agent_capabilities
|
2731
|
+
p result
|
2732
|
+
rescue UltracartClient::ApiError => e
|
2733
|
+
puts "Exception when calling ConversationApi->get_virtual_agent_capabilities: #{e}"
|
2734
|
+
end
|
2735
|
+
```
|
2736
|
+
|
2737
|
+
### Parameters
|
2738
|
+
This endpoint does not need any parameter.
|
2739
|
+
|
2740
|
+
### Return type
|
2741
|
+
|
2742
|
+
[**ConversationVirtualAgentCapabilitiesResponse**](ConversationVirtualAgentCapabilitiesResponse.md)
|
2743
|
+
|
2744
|
+
### Authorization
|
2745
|
+
|
2746
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
2747
|
+
|
2748
|
+
### HTTP request headers
|
2749
|
+
|
2750
|
+
- **Content-Type**: application/json
|
2751
|
+
- **Accept**: application/json
|
2752
|
+
|
2753
|
+
|
2754
|
+
|
2708
2755
|
# **insert_conversation_canned_message**
|
2709
2756
|
> ConversationCannedMessageResponse insert_conversation_canned_message(canned_message)
|
2710
2757
|
|
@@ -4340,3 +4387,53 @@ Name | Type | Description | Notes
|
|
4340
4387
|
|
4341
4388
|
|
4342
4389
|
|
4390
|
+
# **update_virtual_agent_capabilities**
|
4391
|
+
> ConversationVirtualAgentCapabilitiesResponse update_virtual_agent_capabilities(virtual_agent_capabilities)
|
4392
|
+
|
4393
|
+
Update virtual agent capabilities
|
4394
|
+
|
4395
|
+
Update virtual agent capabilities
|
4396
|
+
|
4397
|
+
### Example
|
4398
|
+
```ruby
|
4399
|
+
# load the gem
|
4400
|
+
require 'ultracart_api'
|
4401
|
+
|
4402
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
4403
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
4404
|
+
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
|
4405
|
+
|
4406
|
+
|
4407
|
+
virtual_agent_capabilities = UltracartClient::ConversationVirtualAgentCapabilities.new # ConversationVirtualAgentCapabilities | Virtual Agent Capabilities
|
4408
|
+
|
4409
|
+
|
4410
|
+
begin
|
4411
|
+
#Update virtual agent capabilities
|
4412
|
+
result = api_instance.update_virtual_agent_capabilities(virtual_agent_capabilities)
|
4413
|
+
p result
|
4414
|
+
rescue UltracartClient::ApiError => e
|
4415
|
+
puts "Exception when calling ConversationApi->update_virtual_agent_capabilities: #{e}"
|
4416
|
+
end
|
4417
|
+
```
|
4418
|
+
|
4419
|
+
### Parameters
|
4420
|
+
|
4421
|
+
Name | Type | Description | Notes
|
4422
|
+
------------- | ------------- | ------------- | -------------
|
4423
|
+
**virtual_agent_capabilities** | [**ConversationVirtualAgentCapabilities**](ConversationVirtualAgentCapabilities.md)| Virtual Agent Capabilities |
|
4424
|
+
|
4425
|
+
### Return type
|
4426
|
+
|
4427
|
+
[**ConversationVirtualAgentCapabilitiesResponse**](ConversationVirtualAgentCapabilitiesResponse.md)
|
4428
|
+
|
4429
|
+
### Authorization
|
4430
|
+
|
4431
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
4432
|
+
|
4433
|
+
### HTTP request headers
|
4434
|
+
|
4435
|
+
- **Content-Type**: application/json
|
4436
|
+
- **Accept**: application/json
|
4437
|
+
|
4438
|
+
|
4439
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# UltracartClient::ConversationVirtualAgentCapabilities
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**cancel_subscription** | **BOOLEAN** | | [optional]
|
7
|
+
**delay_subscription** | **BOOLEAN** | | [optional]
|
8
|
+
**lookup_order_information** | **BOOLEAN** | | [optional]
|
9
|
+
**lookup_subscription_information** | **BOOLEAN** | | [optional]
|
10
|
+
**open_support_ticket** | **BOOLEAN** | | [optional]
|
11
|
+
**pause_subscription** | **BOOLEAN** | | [optional]
|
12
|
+
**resume_subscription** | **BOOLEAN** | | [optional]
|
13
|
+
**transfer_chat_to_live_agent** | **BOOLEAN** | | [optional]
|
14
|
+
**update_subscription_credit_card** | **BOOLEAN** | | [optional]
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::ConversationVirtualAgentCapabilitiesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**capabilities** | [**ConversationVirtualAgentCapabilities**](ConversationVirtualAgentCapabilities.md) | | [optional]
|
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
|
+
|
12
|
+
|
data/docs/ItemRestriction.md
CHANGED
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**exclude_coupon** | **BOOLEAN** | Exclude coupons | [optional]
|
7
7
|
**exclude_from_free_promotion** | **BOOLEAN** | Exclude from free promotion | [optional]
|
8
|
+
**exclude_from_loyalty** | **BOOLEAN** | Exclude from loyalty. Must be set to true or false to save. Null is ignored for backwards SDK compatibility | [optional]
|
8
9
|
**items** | [**Array<ItemRestrictionItem>**](ItemRestrictionItem.md) | Items | [optional]
|
9
10
|
**maximum_quantity** | **Integer** | Maximum quantity | [optional]
|
10
11
|
**minimum_quantity** | **Integer** | Minimum quantity (defaults to 1) | [optional]
|
@@ -2900,6 +2900,55 @@ module UltracartClient
|
|
2900
2900
|
end
|
2901
2901
|
return data, status_code, headers
|
2902
2902
|
end
|
2903
|
+
# Get virtual agent capabilities
|
2904
|
+
# Retrieve virtual agent capabilities
|
2905
|
+
# @param [Hash] opts the optional parameters
|
2906
|
+
# @return [ConversationVirtualAgentCapabilitiesResponse]
|
2907
|
+
def get_virtual_agent_capabilities(opts = {})
|
2908
|
+
data, _status_code, _headers = get_virtual_agent_capabilities_with_http_info(opts)
|
2909
|
+
data
|
2910
|
+
end
|
2911
|
+
|
2912
|
+
# Get virtual agent capabilities
|
2913
|
+
# Retrieve virtual agent capabilities
|
2914
|
+
# @param [Hash] opts the optional parameters
|
2915
|
+
# @return [Array<(ConversationVirtualAgentCapabilitiesResponse, Fixnum, Hash)>] ConversationVirtualAgentCapabilitiesResponse data, response status code and response headers
|
2916
|
+
def get_virtual_agent_capabilities_with_http_info(opts = {})
|
2917
|
+
if @api_client.config.debugging
|
2918
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_virtual_agent_capabilities ...'
|
2919
|
+
end
|
2920
|
+
# resource path
|
2921
|
+
local_var_path = '/conversation/virtualagent/capabilities'
|
2922
|
+
|
2923
|
+
# query parameters
|
2924
|
+
query_params = {}
|
2925
|
+
|
2926
|
+
# header parameters
|
2927
|
+
header_params = {}
|
2928
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
2929
|
+
# HTTP header 'Accept' (if needed)
|
2930
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2931
|
+
# HTTP header 'Content-Type'
|
2932
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2933
|
+
|
2934
|
+
# form parameters
|
2935
|
+
form_params = {}
|
2936
|
+
|
2937
|
+
# http body (model)
|
2938
|
+
post_body = nil
|
2939
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
2940
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
2941
|
+
:header_params => header_params,
|
2942
|
+
:query_params => query_params,
|
2943
|
+
:form_params => form_params,
|
2944
|
+
:body => post_body,
|
2945
|
+
:auth_names => auth_names,
|
2946
|
+
:return_type => 'ConversationVirtualAgentCapabilitiesResponse')
|
2947
|
+
if @api_client.config.debugging
|
2948
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_virtual_agent_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2949
|
+
end
|
2950
|
+
return data, status_code, headers
|
2951
|
+
end
|
2903
2952
|
# Insert a canned message
|
2904
2953
|
# Insert a canned message
|
2905
2954
|
# @param canned_message Canned message
|
@@ -4732,5 +4781,60 @@ module UltracartClient
|
|
4732
4781
|
end
|
4733
4782
|
return data, status_code, headers
|
4734
4783
|
end
|
4784
|
+
# Update virtual agent capabilities
|
4785
|
+
# Update virtual agent capabilities
|
4786
|
+
# @param virtual_agent_capabilities Virtual Agent Capabilities
|
4787
|
+
# @param [Hash] opts the optional parameters
|
4788
|
+
# @return [ConversationVirtualAgentCapabilitiesResponse]
|
4789
|
+
def update_virtual_agent_capabilities(virtual_agent_capabilities, opts = {})
|
4790
|
+
data, _status_code, _headers = update_virtual_agent_capabilities_with_http_info(virtual_agent_capabilities, opts)
|
4791
|
+
data
|
4792
|
+
end
|
4793
|
+
|
4794
|
+
# Update virtual agent capabilities
|
4795
|
+
# Update virtual agent capabilities
|
4796
|
+
# @param virtual_agent_capabilities Virtual Agent Capabilities
|
4797
|
+
# @param [Hash] opts the optional parameters
|
4798
|
+
# @return [Array<(ConversationVirtualAgentCapabilitiesResponse, Fixnum, Hash)>] ConversationVirtualAgentCapabilitiesResponse data, response status code and response headers
|
4799
|
+
def update_virtual_agent_capabilities_with_http_info(virtual_agent_capabilities, opts = {})
|
4800
|
+
if @api_client.config.debugging
|
4801
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.update_virtual_agent_capabilities ...'
|
4802
|
+
end
|
4803
|
+
# verify the required parameter 'virtual_agent_capabilities' is set
|
4804
|
+
if @api_client.config.client_side_validation && virtual_agent_capabilities.nil?
|
4805
|
+
fail ArgumentError, "Missing the required parameter 'virtual_agent_capabilities' when calling ConversationApi.update_virtual_agent_capabilities"
|
4806
|
+
end
|
4807
|
+
# resource path
|
4808
|
+
local_var_path = '/conversation/virtualagent/capabilities'
|
4809
|
+
|
4810
|
+
# query parameters
|
4811
|
+
query_params = {}
|
4812
|
+
|
4813
|
+
# header parameters
|
4814
|
+
header_params = {}
|
4815
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
4816
|
+
# HTTP header 'Accept' (if needed)
|
4817
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4818
|
+
# HTTP header 'Content-Type'
|
4819
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
4820
|
+
|
4821
|
+
# form parameters
|
4822
|
+
form_params = {}
|
4823
|
+
|
4824
|
+
# http body (model)
|
4825
|
+
post_body = @api_client.object_to_http_body(virtual_agent_capabilities)
|
4826
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
4827
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
4828
|
+
:header_params => header_params,
|
4829
|
+
:query_params => query_params,
|
4830
|
+
:form_params => form_params,
|
4831
|
+
:body => post_body,
|
4832
|
+
:auth_names => auth_names,
|
4833
|
+
:return_type => 'ConversationVirtualAgentCapabilitiesResponse')
|
4834
|
+
if @api_client.config.debugging
|
4835
|
+
@api_client.config.logger.debug "API called: ConversationApi#update_virtual_agent_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4836
|
+
end
|
4837
|
+
return data, status_code, headers
|
4838
|
+
end
|
4735
4839
|
end
|
4736
4840
|
end
|
@@ -56,6 +56,12 @@ module UltracartClient
|
|
56
56
|
|
57
57
|
attr_accessor :unread_messages
|
58
58
|
|
59
|
+
# True if a virtual agent answered the conversation
|
60
|
+
attr_accessor :virtual_agent
|
61
|
+
|
62
|
+
# The cost of this conversation performed by the virtual agent
|
63
|
+
attr_accessor :virtual_agent_cost
|
64
|
+
|
59
65
|
attr_accessor :visible
|
60
66
|
|
61
67
|
class EnumAttributeValidator
|
@@ -101,6 +107,8 @@ module UltracartClient
|
|
101
107
|
:'sentiment' => :'sentiment',
|
102
108
|
:'start_dts' => :'start_dts',
|
103
109
|
:'unread_messages' => :'unread_messages',
|
110
|
+
:'virtual_agent' => :'virtual_agent',
|
111
|
+
:'virtual_agent_cost' => :'virtual_agent_cost',
|
104
112
|
:'visible' => :'visible'
|
105
113
|
}
|
106
114
|
end
|
@@ -126,6 +134,8 @@ module UltracartClient
|
|
126
134
|
:'sentiment' => :'ConversationSentiment',
|
127
135
|
:'start_dts' => :'String',
|
128
136
|
:'unread_messages' => :'BOOLEAN',
|
137
|
+
:'virtual_agent' => :'BOOLEAN',
|
138
|
+
:'virtual_agent_cost' => :'Float',
|
129
139
|
:'visible' => :'BOOLEAN'
|
130
140
|
}
|
131
141
|
end
|
@@ -214,6 +224,14 @@ module UltracartClient
|
|
214
224
|
self.unread_messages = attributes[:'unread_messages']
|
215
225
|
end
|
216
226
|
|
227
|
+
if attributes.has_key?(:'virtual_agent')
|
228
|
+
self.virtual_agent = attributes[:'virtual_agent']
|
229
|
+
end
|
230
|
+
|
231
|
+
if attributes.has_key?(:'virtual_agent_cost')
|
232
|
+
self.virtual_agent_cost = attributes[:'virtual_agent_cost']
|
233
|
+
end
|
234
|
+
|
217
235
|
if attributes.has_key?(:'visible')
|
218
236
|
self.visible = attributes[:'visible']
|
219
237
|
end
|
@@ -267,6 +285,8 @@ module UltracartClient
|
|
267
285
|
sentiment == o.sentiment &&
|
268
286
|
start_dts == o.start_dts &&
|
269
287
|
unread_messages == o.unread_messages &&
|
288
|
+
virtual_agent == o.virtual_agent &&
|
289
|
+
virtual_agent_cost == o.virtual_agent_cost &&
|
270
290
|
visible == o.visible
|
271
291
|
end
|
272
292
|
|
@@ -279,7 +299,7 @@ module UltracartClient
|
|
279
299
|
# Calculates hash code according to all attributes.
|
280
300
|
# @return [Fixnum] Hash code
|
281
301
|
def hash
|
282
|
-
[base_language_iso_code, closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, sentiment, start_dts, unread_messages, visible].hash
|
302
|
+
[base_language_iso_code, closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, sentiment, start_dts, unread_messages, virtual_agent, virtual_agent_cost, visible].hash
|
283
303
|
end
|
284
304
|
|
285
305
|
# Builds the object from hash
|
@@ -0,0 +1,256 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class ConversationVirtualAgentCapabilities
|
17
|
+
attr_accessor :cancel_subscription
|
18
|
+
|
19
|
+
attr_accessor :delay_subscription
|
20
|
+
|
21
|
+
attr_accessor :lookup_order_information
|
22
|
+
|
23
|
+
attr_accessor :lookup_subscription_information
|
24
|
+
|
25
|
+
attr_accessor :open_support_ticket
|
26
|
+
|
27
|
+
attr_accessor :pause_subscription
|
28
|
+
|
29
|
+
attr_accessor :resume_subscription
|
30
|
+
|
31
|
+
attr_accessor :transfer_chat_to_live_agent
|
32
|
+
|
33
|
+
attr_accessor :update_subscription_credit_card
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'cancel_subscription' => :'cancel_subscription',
|
39
|
+
:'delay_subscription' => :'delay_subscription',
|
40
|
+
:'lookup_order_information' => :'lookup_order_information',
|
41
|
+
:'lookup_subscription_information' => :'lookup_subscription_information',
|
42
|
+
:'open_support_ticket' => :'open_support_ticket',
|
43
|
+
:'pause_subscription' => :'pause_subscription',
|
44
|
+
:'resume_subscription' => :'resume_subscription',
|
45
|
+
:'transfer_chat_to_live_agent' => :'transfer_chat_to_live_agent',
|
46
|
+
:'update_subscription_credit_card' => :'update_subscription_credit_card'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'cancel_subscription' => :'BOOLEAN',
|
54
|
+
:'delay_subscription' => :'BOOLEAN',
|
55
|
+
:'lookup_order_information' => :'BOOLEAN',
|
56
|
+
:'lookup_subscription_information' => :'BOOLEAN',
|
57
|
+
:'open_support_ticket' => :'BOOLEAN',
|
58
|
+
:'pause_subscription' => :'BOOLEAN',
|
59
|
+
:'resume_subscription' => :'BOOLEAN',
|
60
|
+
:'transfer_chat_to_live_agent' => :'BOOLEAN',
|
61
|
+
:'update_subscription_credit_card' => :'BOOLEAN'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
return unless attributes.is_a?(Hash)
|
69
|
+
|
70
|
+
# convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
72
|
+
|
73
|
+
if attributes.has_key?(:'cancel_subscription')
|
74
|
+
self.cancel_subscription = attributes[:'cancel_subscription']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'delay_subscription')
|
78
|
+
self.delay_subscription = attributes[:'delay_subscription']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'lookup_order_information')
|
82
|
+
self.lookup_order_information = attributes[:'lookup_order_information']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'lookup_subscription_information')
|
86
|
+
self.lookup_subscription_information = attributes[:'lookup_subscription_information']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'open_support_ticket')
|
90
|
+
self.open_support_ticket = attributes[:'open_support_ticket']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'pause_subscription')
|
94
|
+
self.pause_subscription = attributes[:'pause_subscription']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'resume_subscription')
|
98
|
+
self.resume_subscription = attributes[:'resume_subscription']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'transfer_chat_to_live_agent')
|
102
|
+
self.transfer_chat_to_live_agent = attributes[:'transfer_chat_to_live_agent']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'update_subscription_credit_card')
|
106
|
+
self.update_subscription_credit_card = attributes[:'update_subscription_credit_card']
|
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
|
+
cancel_subscription == o.cancel_subscription &&
|
129
|
+
delay_subscription == o.delay_subscription &&
|
130
|
+
lookup_order_information == o.lookup_order_information &&
|
131
|
+
lookup_subscription_information == o.lookup_subscription_information &&
|
132
|
+
open_support_ticket == o.open_support_ticket &&
|
133
|
+
pause_subscription == o.pause_subscription &&
|
134
|
+
resume_subscription == o.resume_subscription &&
|
135
|
+
transfer_chat_to_live_agent == o.transfer_chat_to_live_agent &&
|
136
|
+
update_subscription_credit_card == o.update_subscription_credit_card
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def eql?(o)
|
142
|
+
self == o
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Fixnum] Hash code
|
147
|
+
def hash
|
148
|
+
[cancel_subscription, delay_subscription, lookup_order_information, lookup_subscription_information, open_support_ticket, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card].hash
|
149
|
+
end
|
150
|
+
|
151
|
+
# Builds the object from hash
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
# @return [Object] Returns the model itself
|
154
|
+
def build_from_hash(attributes)
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
156
|
+
self.class.swagger_types.each_pair do |key, type|
|
157
|
+
if type =~ /\AArray<(.*)>/i
|
158
|
+
# check to ensure the input is an array given that the attribute
|
159
|
+
# is documented as an array but the input is not
|
160
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
161
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
162
|
+
end
|
163
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
164
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
165
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
166
|
+
end
|
167
|
+
|
168
|
+
self
|
169
|
+
end
|
170
|
+
|
171
|
+
# Deserializes the data based on type
|
172
|
+
# @param string type Data type
|
173
|
+
# @param string value Value to be deserialized
|
174
|
+
# @return [Object] Deserialized data
|
175
|
+
def _deserialize(type, value)
|
176
|
+
case type.to_sym
|
177
|
+
when :DateTime
|
178
|
+
DateTime.parse(value)
|
179
|
+
when :Date
|
180
|
+
Date.parse(value)
|
181
|
+
when :String
|
182
|
+
value.to_s
|
183
|
+
when :Integer
|
184
|
+
value.to_i
|
185
|
+
when :Float
|
186
|
+
value.to_f
|
187
|
+
when :BOOLEAN
|
188
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
189
|
+
true
|
190
|
+
else
|
191
|
+
false
|
192
|
+
end
|
193
|
+
when :Object
|
194
|
+
# generic object (usually a Hash), return directly
|
195
|
+
value
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
202
|
+
{}.tap do |hash|
|
203
|
+
value.each do |k, v|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
else # model
|
208
|
+
temp_model = UltracartClient.const_get(type).new
|
209
|
+
temp_model.build_from_hash(value)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# Returns the string representation of the object
|
214
|
+
# @return [String] String presentation of the object
|
215
|
+
def to_s
|
216
|
+
to_hash.to_s
|
217
|
+
end
|
218
|
+
|
219
|
+
# to_body is an alias to to_hash (backward compatibility)
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_body
|
222
|
+
to_hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Returns the object in the form of hash
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
227
|
+
def to_hash
|
228
|
+
hash = {}
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
230
|
+
value = self.send(attr)
|
231
|
+
next if value.nil?
|
232
|
+
hash[param] = _to_hash(value)
|
233
|
+
end
|
234
|
+
hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Outputs non-array value in the form of hash
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
239
|
+
# @param [Object] value Any valid value
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
241
|
+
def _to_hash(value)
|
242
|
+
if value.is_a?(Array)
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
244
|
+
elsif value.is_a?(Hash)
|
245
|
+
{}.tap do |hash|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
247
|
+
end
|
248
|
+
elsif value.respond_to? :to_hash
|
249
|
+
value.to_hash
|
250
|
+
else
|
251
|
+
value
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class ConversationVirtualAgentCapabilitiesResponse
|
17
|
+
attr_accessor :capabilities
|
18
|
+
|
19
|
+
attr_accessor :error
|
20
|
+
|
21
|
+
attr_accessor :metadata
|
22
|
+
|
23
|
+
# Indicates if API call was successful
|
24
|
+
attr_accessor :success
|
25
|
+
|
26
|
+
attr_accessor :warning
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'capabilities' => :'capabilities',
|
32
|
+
:'error' => :'error',
|
33
|
+
:'metadata' => :'metadata',
|
34
|
+
:'success' => :'success',
|
35
|
+
:'warning' => :'warning'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'capabilities' => :'ConversationVirtualAgentCapabilities',
|
43
|
+
:'error' => :'Error',
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
45
|
+
:'success' => :'BOOLEAN',
|
46
|
+
:'warning' => :'Warning'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
return unless attributes.is_a?(Hash)
|
54
|
+
|
55
|
+
# convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
+
|
58
|
+
if attributes.has_key?(:'capabilities')
|
59
|
+
self.capabilities = attributes[:'capabilities']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'error')
|
63
|
+
self.error = attributes[:'error']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'metadata')
|
67
|
+
self.metadata = attributes[:'metadata']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'success')
|
71
|
+
self.success = attributes[:'success']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.has_key?(:'warning')
|
75
|
+
self.warning = attributes[:'warning']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
capabilities == o.capabilities &&
|
98
|
+
error == o.error &&
|
99
|
+
metadata == o.metadata &&
|
100
|
+
success == o.success &&
|
101
|
+
warning == o.warning
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Fixnum] Hash code
|
112
|
+
def hash
|
113
|
+
[capabilities, error, metadata, success, warning].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
self.class.swagger_types.each_pair do |key, type|
|
122
|
+
if type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :DateTime
|
143
|
+
DateTime.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :BOOLEAN
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
temp_model = UltracartClient.const_get(type).new
|
174
|
+
temp_model.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
next if value.nil?
|
197
|
+
hash[param] = _to_hash(value)
|
198
|
+
end
|
199
|
+
hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Outputs non-array value in the form of hash
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
204
|
+
# @param [Object] value Any valid value
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
206
|
+
def _to_hash(value)
|
207
|
+
if value.is_a?(Array)
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
209
|
+
elsif value.is_a?(Hash)
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
212
|
+
end
|
213
|
+
elsif value.respond_to? :to_hash
|
214
|
+
value.to_hash
|
215
|
+
else
|
216
|
+
value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
end
|
@@ -20,6 +20,9 @@ module UltracartClient
|
|
20
20
|
# Exclude from free promotion
|
21
21
|
attr_accessor :exclude_from_free_promotion
|
22
22
|
|
23
|
+
# Exclude from loyalty. Must be set to true or false to save. Null is ignored for backwards SDK compatibility
|
24
|
+
attr_accessor :exclude_from_loyalty
|
25
|
+
|
23
26
|
# Items
|
24
27
|
attr_accessor :items
|
25
28
|
|
@@ -43,6 +46,7 @@ module UltracartClient
|
|
43
46
|
{
|
44
47
|
:'exclude_coupon' => :'exclude_coupon',
|
45
48
|
:'exclude_from_free_promotion' => :'exclude_from_free_promotion',
|
49
|
+
:'exclude_from_loyalty' => :'exclude_from_loyalty',
|
46
50
|
:'items' => :'items',
|
47
51
|
:'maximum_quantity' => :'maximum_quantity',
|
48
52
|
:'minimum_quantity' => :'minimum_quantity',
|
@@ -57,6 +61,7 @@ module UltracartClient
|
|
57
61
|
{
|
58
62
|
:'exclude_coupon' => :'BOOLEAN',
|
59
63
|
:'exclude_from_free_promotion' => :'BOOLEAN',
|
64
|
+
:'exclude_from_loyalty' => :'BOOLEAN',
|
60
65
|
:'items' => :'Array<ItemRestrictionItem>',
|
61
66
|
:'maximum_quantity' => :'Integer',
|
62
67
|
:'minimum_quantity' => :'Integer',
|
@@ -82,6 +87,10 @@ module UltracartClient
|
|
82
87
|
self.exclude_from_free_promotion = attributes[:'exclude_from_free_promotion']
|
83
88
|
end
|
84
89
|
|
90
|
+
if attributes.has_key?(:'exclude_from_loyalty')
|
91
|
+
self.exclude_from_loyalty = attributes[:'exclude_from_loyalty']
|
92
|
+
end
|
93
|
+
|
85
94
|
if attributes.has_key?(:'items')
|
86
95
|
if (value = attributes[:'items']).is_a?(Array)
|
87
96
|
self.items = value
|
@@ -129,6 +138,7 @@ module UltracartClient
|
|
129
138
|
self.class == o.class &&
|
130
139
|
exclude_coupon == o.exclude_coupon &&
|
131
140
|
exclude_from_free_promotion == o.exclude_from_free_promotion &&
|
141
|
+
exclude_from_loyalty == o.exclude_from_loyalty &&
|
132
142
|
items == o.items &&
|
133
143
|
maximum_quantity == o.maximum_quantity &&
|
134
144
|
minimum_quantity == o.minimum_quantity &&
|
@@ -146,7 +156,7 @@ module UltracartClient
|
|
146
156
|
# Calculates hash code according to all attributes.
|
147
157
|
# @return [Fixnum] Hash code
|
148
158
|
def hash
|
149
|
-
[exclude_coupon, exclude_from_free_promotion, items, maximum_quantity, minimum_quantity, multiple_quantity, one_per_customer, purchase_separately].hash
|
159
|
+
[exclude_coupon, exclude_from_free_promotion, exclude_from_loyalty, items, maximum_quantity, minimum_quantity, multiple_quantity, one_per_customer, purchase_separately].hash
|
150
160
|
end
|
151
161
|
|
152
162
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -240,6 +240,8 @@ require 'ultracart_api/models/conversation_summary'
|
|
240
240
|
require 'ultracart_api/models/conversation_twilio_account'
|
241
241
|
require 'ultracart_api/models/conversation_virtual_agent_budget'
|
242
242
|
require 'ultracart_api/models/conversation_virtual_agent_budget_response'
|
243
|
+
require 'ultracart_api/models/conversation_virtual_agent_capabilities'
|
244
|
+
require 'ultracart_api/models/conversation_virtual_agent_capabilities_response'
|
243
245
|
require 'ultracart_api/models/conversation_webchat_context'
|
244
246
|
require 'ultracart_api/models/conversation_webchat_queue_status'
|
245
247
|
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: 3.11.
|
4
|
+
version: 3.11.13
|
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-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -450,6 +450,8 @@ files:
|
|
450
450
|
- docs/ConversationTwilioAccount.md
|
451
451
|
- docs/ConversationVirtualAgentBudget.md
|
452
452
|
- docs/ConversationVirtualAgentBudgetResponse.md
|
453
|
+
- docs/ConversationVirtualAgentCapabilities.md
|
454
|
+
- docs/ConversationVirtualAgentCapabilitiesResponse.md
|
453
455
|
- docs/ConversationWebchatContext.md
|
454
456
|
- docs/ConversationWebchatQueueStatus.md
|
455
457
|
- docs/ConversationWebchatQueueStatusAgent.md
|
@@ -1353,6 +1355,8 @@ files:
|
|
1353
1355
|
- lib/ultracart_api/models/conversation_twilio_account.rb
|
1354
1356
|
- lib/ultracart_api/models/conversation_virtual_agent_budget.rb
|
1355
1357
|
- lib/ultracart_api/models/conversation_virtual_agent_budget_response.rb
|
1358
|
+
- lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb
|
1359
|
+
- lib/ultracart_api/models/conversation_virtual_agent_capabilities_response.rb
|
1356
1360
|
- lib/ultracart_api/models/conversation_webchat_context.rb
|
1357
1361
|
- lib/ultracart_api/models/conversation_webchat_queue_status.rb
|
1358
1362
|
- lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb
|