ultracart_api 4.1.147 → 4.1.148
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 +4 -2
- data/docs/ConversationVirtualAgentCapabilities.md +6 -0
- data/docs/ConversationVirtualAgentCapabilityCustomCollection.md +30 -0
- data/lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb +33 -1
- data/lib/ultracart_api/models/conversation_virtual_agent_capability_custom_collection.rb +280 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba4977a62acb33c11fa5fc16903ffa679e996f053ca6c5920f6d2f8c450c6cce
|
|
4
|
+
data.tar.gz: f8805e823b86f7ae7b56b86e2ab8dd52aec339076104437c81cfed9610dab404
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c2d29199eb34ebb2d86c3071c7c185ffaf2f077f8206be73906468424bd21406c26615c26daec6a3e443022dabb5b1fd66cb5a01a2a5b069171d6439af75702
|
|
7
|
+
data.tar.gz: d51e2f0a95eea2719be0767245cb3a203dbf13b79f2627169165c317f91e9e134a948b4dcee4c70d00319f4b165a0200270b64857bb2955334f964e31999e442
|
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.148
|
|
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.148'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -1084,6 +1084,7 @@ Class | Method | HTTP request | Description
|
|
|
1084
1084
|
- [UltracartClient::ConversationVirtualAgentBudgetResponse](docs/ConversationVirtualAgentBudgetResponse.md)
|
|
1085
1085
|
- [UltracartClient::ConversationVirtualAgentCapabilities](docs/ConversationVirtualAgentCapabilities.md)
|
|
1086
1086
|
- [UltracartClient::ConversationVirtualAgentCapabilitiesResponse](docs/ConversationVirtualAgentCapabilitiesResponse.md)
|
|
1087
|
+
- [UltracartClient::ConversationVirtualAgentCapabilityCustomCollection](docs/ConversationVirtualAgentCapabilityCustomCollection.md)
|
|
1087
1088
|
- [UltracartClient::ConversationVirtualAgentCapabilityZohoDeskDepartment](docs/ConversationVirtualAgentCapabilityZohoDeskDepartment.md)
|
|
1088
1089
|
- [UltracartClient::ConversationWebchatContext](docs/ConversationWebchatContext.md)
|
|
1089
1090
|
- [UltracartClient::ConversationWebchatQueueStatus](docs/ConversationWebchatQueueStatus.md)
|
|
@@ -1927,6 +1928,7 @@ Not every change is committed to every SDK.
|
|
|
1927
1928
|
|
|
1928
1929
|
| Version | Date | Comments |
|
|
1929
1930
|
| --: | :-: | --- |
|
|
1931
|
+
| 4.1.148 | 09/04/2026 | conversations - added ai agent capabilities |
|
|
1930
1932
|
| 4.1.147 | 09/04/2026 | sfvb - internal testing |
|
|
1931
1933
|
| 4.1.146 | 09/03/2026 | sfvb - internal testing |
|
|
1932
1934
|
| 4.1.145 | 09/02/2026 | sfvb - internal testing |
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **access_custom_collections** | **Boolean** | Permission flag to allow this Agent to search the merchant's custom Typesense collections. | [optional] |
|
|
7
8
|
| **access_storefront_and_item** | **Boolean** | Permission flag to allow this Agent access to the storefront and item information. | [optional] |
|
|
8
9
|
| **cancel_subscription** | **Boolean** | | [optional] |
|
|
10
|
+
| **custom_collection_oids** | **Object** | The custom collections this Agent is allowed to search. Empty means none, even when access_custom_collections is true. | [optional] |
|
|
11
|
+
| **custom_collections** | [**Array<ConversationVirtualAgentCapabilityCustomCollection>**](ConversationVirtualAgentCapabilityCustomCollection.md) | Read only. All of the merchant's custom collections, to populate the selection list for custom_collection_oids. Changes here are ignored. | [optional] |
|
|
9
12
|
| **delay_subscription** | **Boolean** | | [optional] |
|
|
10
13
|
| **generate_coupon** | **Boolean** | Permission flag to allow this Agent to generate coupons based upon the agent prompt instructions | [optional] |
|
|
11
14
|
| **lookup_order_information** | **Boolean** | | [optional] |
|
|
@@ -27,8 +30,11 @@
|
|
|
27
30
|
require 'ultracart_api'
|
|
28
31
|
|
|
29
32
|
instance = UltracartClient::ConversationVirtualAgentCapabilities.new(
|
|
33
|
+
access_custom_collections: null,
|
|
30
34
|
access_storefront_and_item: null,
|
|
31
35
|
cancel_subscription: null,
|
|
36
|
+
custom_collection_oids: null,
|
|
37
|
+
custom_collections: null,
|
|
32
38
|
delay_subscription: null,
|
|
33
39
|
generate_coupon: null,
|
|
34
40
|
lookup_order_information: null,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UltracartClient::ConversationVirtualAgentCapabilityCustomCollection
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ai_description** | **String** | Merchant authored description of what is in this collection, which is what the agent sees when deciding whether to search it | [optional] |
|
|
8
|
+
| **ai_enabled** | **Boolean** | True if this collection has been enabled for AI access in its own configuration. A collection that is not enabled cannot be searched even if it is selected here. | [optional] |
|
|
9
|
+
| **collection_name** | **String** | Merchant assigned name of the collection | [optional] |
|
|
10
|
+
| **error_message** | **String** | Error from the last build, if it failed. A collection with an error will return nothing to the agent, so this is worth surfacing next to the selection. | [optional] |
|
|
11
|
+
| **last_update_dts** | **String** | Date/time the collection was last rebuilt from the merchant's BigQuery query | [optional] |
|
|
12
|
+
| **record_count** | **Integer** | Number of records loaded on the last build | [optional] |
|
|
13
|
+
| **typesense_custom_collection_oid** | **Integer** | The identifier to place in custom_collection_oids to grant the agent access to this collection | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'ultracart_api'
|
|
19
|
+
|
|
20
|
+
instance = UltracartClient::ConversationVirtualAgentCapabilityCustomCollection.new(
|
|
21
|
+
ai_description: null,
|
|
22
|
+
ai_enabled: null,
|
|
23
|
+
collection_name: null,
|
|
24
|
+
error_message: null,
|
|
25
|
+
last_update_dts: null,
|
|
26
|
+
record_count: null,
|
|
27
|
+
typesense_custom_collection_oid: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -15,11 +15,20 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module UltracartClient
|
|
17
17
|
class ConversationVirtualAgentCapabilities
|
|
18
|
+
# Permission flag to allow this Agent to search the merchant's custom Typesense collections.
|
|
19
|
+
attr_accessor :access_custom_collections
|
|
20
|
+
|
|
18
21
|
# Permission flag to allow this Agent access to the storefront and item information.
|
|
19
22
|
attr_accessor :access_storefront_and_item
|
|
20
23
|
|
|
21
24
|
attr_accessor :cancel_subscription
|
|
22
25
|
|
|
26
|
+
# The custom collections this Agent is allowed to search. Empty means none, even when access_custom_collections is true.
|
|
27
|
+
attr_accessor :custom_collection_oids
|
|
28
|
+
|
|
29
|
+
# Read only. All of the merchant's custom collections, to populate the selection list for custom_collection_oids. Changes here are ignored.
|
|
30
|
+
attr_accessor :custom_collections
|
|
31
|
+
|
|
23
32
|
attr_accessor :delay_subscription
|
|
24
33
|
|
|
25
34
|
# Permission flag to allow this Agent to generate coupons based upon the agent prompt instructions
|
|
@@ -79,8 +88,11 @@ module UltracartClient
|
|
|
79
88
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
80
89
|
def self.attribute_map
|
|
81
90
|
{
|
|
91
|
+
:'access_custom_collections' => :'access_custom_collections',
|
|
82
92
|
:'access_storefront_and_item' => :'access_storefront_and_item',
|
|
83
93
|
:'cancel_subscription' => :'cancel_subscription',
|
|
94
|
+
:'custom_collection_oids' => :'custom_collection_oids',
|
|
95
|
+
:'custom_collections' => :'custom_collections',
|
|
84
96
|
:'delay_subscription' => :'delay_subscription',
|
|
85
97
|
:'generate_coupon' => :'generate_coupon',
|
|
86
98
|
:'lookup_order_information' => :'lookup_order_information',
|
|
@@ -106,8 +118,11 @@ module UltracartClient
|
|
|
106
118
|
# Attribute type mapping.
|
|
107
119
|
def self.openapi_types
|
|
108
120
|
{
|
|
121
|
+
:'access_custom_collections' => :'Boolean',
|
|
109
122
|
:'access_storefront_and_item' => :'Boolean',
|
|
110
123
|
:'cancel_subscription' => :'Boolean',
|
|
124
|
+
:'custom_collection_oids' => :'Object',
|
|
125
|
+
:'custom_collections' => :'Array<ConversationVirtualAgentCapabilityCustomCollection>',
|
|
111
126
|
:'delay_subscription' => :'Boolean',
|
|
112
127
|
:'generate_coupon' => :'Boolean',
|
|
113
128
|
:'lookup_order_information' => :'Boolean',
|
|
@@ -146,6 +161,10 @@ module UltracartClient
|
|
|
146
161
|
h[k.to_sym] = v
|
|
147
162
|
}
|
|
148
163
|
|
|
164
|
+
if attributes.key?(:'access_custom_collections')
|
|
165
|
+
self.access_custom_collections = attributes[:'access_custom_collections']
|
|
166
|
+
end
|
|
167
|
+
|
|
149
168
|
if attributes.key?(:'access_storefront_and_item')
|
|
150
169
|
self.access_storefront_and_item = attributes[:'access_storefront_and_item']
|
|
151
170
|
end
|
|
@@ -154,6 +173,16 @@ module UltracartClient
|
|
|
154
173
|
self.cancel_subscription = attributes[:'cancel_subscription']
|
|
155
174
|
end
|
|
156
175
|
|
|
176
|
+
if attributes.key?(:'custom_collection_oids')
|
|
177
|
+
self.custom_collection_oids = attributes[:'custom_collection_oids']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'custom_collections')
|
|
181
|
+
if (value = attributes[:'custom_collections']).is_a?(Array)
|
|
182
|
+
self.custom_collections = value
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
157
186
|
if attributes.key?(:'delay_subscription')
|
|
158
187
|
self.delay_subscription = attributes[:'delay_subscription']
|
|
159
188
|
end
|
|
@@ -243,8 +272,11 @@ module UltracartClient
|
|
|
243
272
|
def ==(o)
|
|
244
273
|
return true if self.equal?(o)
|
|
245
274
|
self.class == o.class &&
|
|
275
|
+
access_custom_collections == o.access_custom_collections &&
|
|
246
276
|
access_storefront_and_item == o.access_storefront_and_item &&
|
|
247
277
|
cancel_subscription == o.cancel_subscription &&
|
|
278
|
+
custom_collection_oids == o.custom_collection_oids &&
|
|
279
|
+
custom_collections == o.custom_collections &&
|
|
248
280
|
delay_subscription == o.delay_subscription &&
|
|
249
281
|
generate_coupon == o.generate_coupon &&
|
|
250
282
|
lookup_order_information == o.lookup_order_information &&
|
|
@@ -270,7 +302,7 @@ module UltracartClient
|
|
|
270
302
|
# Calculates hash code according to all attributes.
|
|
271
303
|
# @return [Integer] Hash code
|
|
272
304
|
def hash
|
|
273
|
-
[access_storefront_and_item, cancel_subscription, delay_subscription, generate_coupon, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, open_support_ticket_zoho_desk_department_id, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card, zoho_desk_available, zoho_desk_departments].hash
|
|
305
|
+
[access_custom_collections, access_storefront_and_item, cancel_subscription, custom_collection_oids, custom_collections, delay_subscription, generate_coupon, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, open_support_ticket_zoho_desk_department_id, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card, zoho_desk_available, zoho_desk_departments].hash
|
|
274
306
|
end
|
|
275
307
|
|
|
276
308
|
# Builds the object from hash
|
|
@@ -0,0 +1,280 @@
|
|
|
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 ConversationVirtualAgentCapabilityCustomCollection
|
|
18
|
+
# Merchant authored description of what is in this collection, which is what the agent sees when deciding whether to search it
|
|
19
|
+
attr_accessor :ai_description
|
|
20
|
+
|
|
21
|
+
# True if this collection has been enabled for AI access in its own configuration. A collection that is not enabled cannot be searched even if it is selected here.
|
|
22
|
+
attr_accessor :ai_enabled
|
|
23
|
+
|
|
24
|
+
# Merchant assigned name of the collection
|
|
25
|
+
attr_accessor :collection_name
|
|
26
|
+
|
|
27
|
+
# Error from the last build, if it failed. A collection with an error will return nothing to the agent, so this is worth surfacing next to the selection.
|
|
28
|
+
attr_accessor :error_message
|
|
29
|
+
|
|
30
|
+
# Date/time the collection was last rebuilt from the merchant's BigQuery query
|
|
31
|
+
attr_accessor :last_update_dts
|
|
32
|
+
|
|
33
|
+
# Number of records loaded on the last build
|
|
34
|
+
attr_accessor :record_count
|
|
35
|
+
|
|
36
|
+
# The identifier to place in custom_collection_oids to grant the agent access to this collection
|
|
37
|
+
attr_accessor :typesense_custom_collection_oid
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'ai_description' => :'ai_description',
|
|
43
|
+
:'ai_enabled' => :'ai_enabled',
|
|
44
|
+
:'collection_name' => :'collection_name',
|
|
45
|
+
:'error_message' => :'error_message',
|
|
46
|
+
:'last_update_dts' => :'last_update_dts',
|
|
47
|
+
:'record_count' => :'record_count',
|
|
48
|
+
:'typesense_custom_collection_oid' => :'typesense_custom_collection_oid'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'ai_description' => :'String',
|
|
61
|
+
:'ai_enabled' => :'Boolean',
|
|
62
|
+
:'collection_name' => :'String',
|
|
63
|
+
:'error_message' => :'String',
|
|
64
|
+
:'last_update_dts' => :'String',
|
|
65
|
+
:'record_count' => :'Integer',
|
|
66
|
+
:'typesense_custom_collection_oid' => :'Integer'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationVirtualAgentCapabilityCustomCollection` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationVirtualAgentCapabilityCustomCollection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'ai_description')
|
|
92
|
+
self.ai_description = attributes[:'ai_description']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'ai_enabled')
|
|
96
|
+
self.ai_enabled = attributes[:'ai_enabled']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'collection_name')
|
|
100
|
+
self.collection_name = attributes[:'collection_name']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'error_message')
|
|
104
|
+
self.error_message = attributes[:'error_message']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'last_update_dts')
|
|
108
|
+
self.last_update_dts = attributes[:'last_update_dts']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'record_count')
|
|
112
|
+
self.record_count = attributes[:'record_count']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'typesense_custom_collection_oid')
|
|
116
|
+
self.typesense_custom_collection_oid = attributes[:'typesense_custom_collection_oid']
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
121
|
+
# @return Array for valid properties with the reasons
|
|
122
|
+
def list_invalid_properties
|
|
123
|
+
invalid_properties = Array.new
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
true
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Checks equality by comparing each attribute.
|
|
134
|
+
# @param [Object] Object to be compared
|
|
135
|
+
def ==(o)
|
|
136
|
+
return true if self.equal?(o)
|
|
137
|
+
self.class == o.class &&
|
|
138
|
+
ai_description == o.ai_description &&
|
|
139
|
+
ai_enabled == o.ai_enabled &&
|
|
140
|
+
collection_name == o.collection_name &&
|
|
141
|
+
error_message == o.error_message &&
|
|
142
|
+
last_update_dts == o.last_update_dts &&
|
|
143
|
+
record_count == o.record_count &&
|
|
144
|
+
typesense_custom_collection_oid == o.typesense_custom_collection_oid
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @see the `==` method
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def eql?(o)
|
|
150
|
+
self == o
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculates hash code according to all attributes.
|
|
154
|
+
# @return [Integer] Hash code
|
|
155
|
+
def hash
|
|
156
|
+
[ai_description, ai_enabled, collection_name, error_message, last_update_dts, record_count, typesense_custom_collection_oid].hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Builds the object from hash
|
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
161
|
+
# @return [Object] Returns the model itself
|
|
162
|
+
def self.build_from_hash(attributes)
|
|
163
|
+
new.build_from_hash(attributes)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Builds the object from hash
|
|
167
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
168
|
+
# @return [Object] Returns the model itself
|
|
169
|
+
def build_from_hash(attributes)
|
|
170
|
+
return nil unless attributes.is_a?(Hash)
|
|
171
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
172
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
173
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
174
|
+
self.send("#{key}=", nil)
|
|
175
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
176
|
+
# check to ensure the input is an array given that the attribute
|
|
177
|
+
# is documented as an array but the input is not
|
|
178
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
179
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
180
|
+
end
|
|
181
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
182
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
self
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Deserializes the data based on type
|
|
190
|
+
# @param string type Data type
|
|
191
|
+
# @param string value Value to be deserialized
|
|
192
|
+
# @return [Object] Deserialized data
|
|
193
|
+
def _deserialize(type, value)
|
|
194
|
+
case type.to_sym
|
|
195
|
+
when :Time
|
|
196
|
+
Time.parse(value)
|
|
197
|
+
when :Date
|
|
198
|
+
Date.parse(value)
|
|
199
|
+
when :String
|
|
200
|
+
value.to_s
|
|
201
|
+
when :Integer
|
|
202
|
+
value.to_i
|
|
203
|
+
when :Float
|
|
204
|
+
value.to_f
|
|
205
|
+
when :Boolean
|
|
206
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
207
|
+
true
|
|
208
|
+
else
|
|
209
|
+
false
|
|
210
|
+
end
|
|
211
|
+
when :Object
|
|
212
|
+
# generic object (usually a Hash), return directly
|
|
213
|
+
value
|
|
214
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
215
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
216
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
217
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
218
|
+
k_type = Regexp.last_match[:k_type]
|
|
219
|
+
v_type = Regexp.last_match[:v_type]
|
|
220
|
+
{}.tap do |hash|
|
|
221
|
+
value.each do |k, v|
|
|
222
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
else # model
|
|
226
|
+
# models (e.g. Pet) or oneOf
|
|
227
|
+
klass = UltracartClient.const_get(type)
|
|
228
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Returns the string representation of the object
|
|
233
|
+
# @return [String] String presentation of the object
|
|
234
|
+
def to_s
|
|
235
|
+
to_hash.to_s
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
|
240
|
+
def to_body
|
|
241
|
+
to_hash
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the object in the form of hash
|
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
|
246
|
+
def to_hash
|
|
247
|
+
hash = {}
|
|
248
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
249
|
+
value = self.send(attr)
|
|
250
|
+
if value.nil?
|
|
251
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
252
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
hash[param] = _to_hash(value)
|
|
256
|
+
end
|
|
257
|
+
hash
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Outputs non-array value in the form of hash
|
|
261
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
262
|
+
# @param [Object] value Any valid value
|
|
263
|
+
# @return [Hash] Returns the value in the form of hash
|
|
264
|
+
def _to_hash(value)
|
|
265
|
+
if value.is_a?(Array)
|
|
266
|
+
value.compact.map { |v| _to_hash(v) }
|
|
267
|
+
elsif value.is_a?(Hash)
|
|
268
|
+
{}.tap do |hash|
|
|
269
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
270
|
+
end
|
|
271
|
+
elsif value.respond_to? :to_hash
|
|
272
|
+
value.to_hash
|
|
273
|
+
else
|
|
274
|
+
value
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -338,6 +338,7 @@ require 'ultracart_api/models/conversation_virtual_agent_budget'
|
|
|
338
338
|
require 'ultracart_api/models/conversation_virtual_agent_budget_response'
|
|
339
339
|
require 'ultracart_api/models/conversation_virtual_agent_capabilities'
|
|
340
340
|
require 'ultracart_api/models/conversation_virtual_agent_capabilities_response'
|
|
341
|
+
require 'ultracart_api/models/conversation_virtual_agent_capability_custom_collection'
|
|
341
342
|
require 'ultracart_api/models/conversation_virtual_agent_capability_zoho_desk_department'
|
|
342
343
|
require 'ultracart_api/models/conversation_webchat_context'
|
|
343
344
|
require 'ultracart_api/models/conversation_webchat_queue_status'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.148
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
@@ -389,6 +389,7 @@ files:
|
|
|
389
389
|
- docs/ConversationVirtualAgentBudgetResponse.md
|
|
390
390
|
- docs/ConversationVirtualAgentCapabilities.md
|
|
391
391
|
- docs/ConversationVirtualAgentCapabilitiesResponse.md
|
|
392
|
+
- docs/ConversationVirtualAgentCapabilityCustomCollection.md
|
|
392
393
|
- docs/ConversationVirtualAgentCapabilityZohoDeskDepartment.md
|
|
393
394
|
- docs/ConversationWebchatContext.md
|
|
394
395
|
- docs/ConversationWebchatQueueStatus.md
|
|
@@ -1524,6 +1525,7 @@ files:
|
|
|
1524
1525
|
- lib/ultracart_api/models/conversation_virtual_agent_budget_response.rb
|
|
1525
1526
|
- lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb
|
|
1526
1527
|
- lib/ultracart_api/models/conversation_virtual_agent_capabilities_response.rb
|
|
1528
|
+
- lib/ultracart_api/models/conversation_virtual_agent_capability_custom_collection.rb
|
|
1527
1529
|
- lib/ultracart_api/models/conversation_virtual_agent_capability_zoho_desk_department.rb
|
|
1528
1530
|
- lib/ultracart_api/models/conversation_webchat_context.rb
|
|
1529
1531
|
- lib/ultracart_api/models/conversation_webchat_queue_status.rb
|