ultracart_api 3.11.8 → 3.11.9
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 -4
- data/docs/ConversationAgentProfilesResponse.md +12 -0
- data/docs/ConversationApi.md +46 -0
- data/docs/WebhookApi.md +16 -0
- data/lib/ultracart_api/api/conversation_api.rb +49 -0
- data/lib/ultracart_api/api/webhook_api.rb +24 -0
- data/lib/ultracart_api/models/conversation_agent_profiles_response.rb +223 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0950ee1da1d3f836549d10b831d4c557db58cad6b044f03fdf90133e26185a4
|
4
|
+
data.tar.gz: e88b1a3639950ddc61c2690b55e2e23c5dda001f083a0aefd22e525459bf41b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c07fcd71688a50d7a6de1399acba13ad8f900de29fbe6fdb76f74838341d375cf1fd03e7793c02b6c37c3a27df07f969761d3deaf9caaceedcd09b2a60899c7a
|
7
|
+
data.tar.gz: b68fa90b5910a352d812970b3e7c175b7dcdbe98dad993dd626616cbed07c3bbbf6af9ae927a5a9cc65a5dce52379950e1cfec89476bcd597f633109f88d9ab8
|
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.9
|
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.9.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.9.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.9'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -151,6 +151,7 @@ Class | Method | HTTP request | Description
|
|
151
151
|
*UltracartClient::ConversationApi* | [**delete_pbx_voicemail_mailbox**](docs/ConversationApi.md#delete_pbx_voicemail_mailbox) | **DELETE** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Delete pbx voicemailMailbox
|
152
152
|
*UltracartClient::ConversationApi* | [**get_agent_keep_alive**](docs/ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive
|
153
153
|
*UltracartClient::ConversationApi* | [**get_agent_profile**](docs/ConversationApi.md#get_agent_profile) | **GET** /conversation/agent/profile | Get agent profile
|
154
|
+
*UltracartClient::ConversationApi* | [**get_agent_profiles**](docs/ConversationApi.md#get_agent_profiles) | **GET** /conversation/agent/profiles | Get agent profiles
|
154
155
|
*UltracartClient::ConversationApi* | [**get_agent_websocket_authorization**](docs/ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
|
155
156
|
*UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
|
156
157
|
*UltracartClient::ConversationApi* | [**get_conversation_canned_messages**](docs/ConversationApi.md#get_conversation_canned_messages) | **GET** /conversation/canned_messages | Retrieve a list of canned messages ordered by short_code
|
@@ -726,6 +727,7 @@ Class | Method | HTTP request | Description
|
|
726
727
|
- [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
|
727
728
|
- [UltracartClient::ConversationAgentProfile](docs/ConversationAgentProfile.md)
|
728
729
|
- [UltracartClient::ConversationAgentProfileResponse](docs/ConversationAgentProfileResponse.md)
|
730
|
+
- [UltracartClient::ConversationAgentProfilesResponse](docs/ConversationAgentProfilesResponse.md)
|
729
731
|
- [UltracartClient::ConversationAutocompleteRequest](docs/ConversationAutocompleteRequest.md)
|
730
732
|
- [UltracartClient::ConversationAutocompleteResponse](docs/ConversationAutocompleteResponse.md)
|
731
733
|
- [UltracartClient::ConversationAutocompleteValue](docs/ConversationAutocompleteValue.md)
|
@@ -1522,6 +1524,7 @@ Not every change is committed to every SDK.
|
|
1522
1524
|
|
1523
1525
|
| Version | Date | Comments |
|
1524
1526
|
| --: | :-: | --- |
|
1527
|
+
| 3.11.9 | 05/05/2025 | conversations - method to fetch all agent profiles for admin screens |
|
1525
1528
|
| 3.11.8 | 04/22/2025 | order property fields for created_by and created_dts |
|
1526
1529
|
| 3.11.7 | 04/21/2025 | conversation agent additional fields |
|
1527
1530
|
| 3.11.6 | 04/16/2025 | added channel partner order item properties |
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::ConversationAgentProfilesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**agent_profiles** | [**Array<ConversationAgentProfile>**](ConversationAgentProfile.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/ConversationApi.md
CHANGED
@@ -17,6 +17,7 @@ Method | HTTP request | Description
|
|
17
17
|
[**delete_pbx_voicemail_mailbox**](ConversationApi.md#delete_pbx_voicemail_mailbox) | **DELETE** /conversation/pbx/voicemail_mailbox/{conversationPbxVoicemailMailboxUuid} | Delete pbx voicemailMailbox
|
18
18
|
[**get_agent_keep_alive**](ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive
|
19
19
|
[**get_agent_profile**](ConversationApi.md#get_agent_profile) | **GET** /conversation/agent/profile | Get agent profile
|
20
|
+
[**get_agent_profiles**](ConversationApi.md#get_agent_profiles) | **GET** /conversation/agent/profiles | Get agent profiles
|
20
21
|
[**get_agent_websocket_authorization**](ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
|
21
22
|
[**get_conversation**](ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
|
22
23
|
[**get_conversation_canned_messages**](ConversationApi.md#get_conversation_canned_messages) | **GET** /conversation/canned_messages | Retrieve a list of canned messages ordered by short_code
|
@@ -726,6 +727,51 @@ This endpoint does not need any parameter.
|
|
726
727
|
|
727
728
|
|
728
729
|
|
730
|
+
# **get_agent_profiles**
|
731
|
+
> ConversationAgentProfilesResponse get_agent_profiles
|
732
|
+
|
733
|
+
Get agent profiles
|
734
|
+
|
735
|
+
Retrieve the agents profile
|
736
|
+
|
737
|
+
### Example
|
738
|
+
```ruby
|
739
|
+
# load the gem
|
740
|
+
require 'ultracart_api'
|
741
|
+
|
742
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
743
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
744
|
+
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
begin
|
749
|
+
#Get agent profiles
|
750
|
+
result = api_instance.get_agent_profiles
|
751
|
+
p result
|
752
|
+
rescue UltracartClient::ApiError => e
|
753
|
+
puts "Exception when calling ConversationApi->get_agent_profiles: #{e}"
|
754
|
+
end
|
755
|
+
```
|
756
|
+
|
757
|
+
### Parameters
|
758
|
+
This endpoint does not need any parameter.
|
759
|
+
|
760
|
+
### Return type
|
761
|
+
|
762
|
+
[**ConversationAgentProfilesResponse**](ConversationAgentProfilesResponse.md)
|
763
|
+
|
764
|
+
### Authorization
|
765
|
+
|
766
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
767
|
+
|
768
|
+
### HTTP request headers
|
769
|
+
|
770
|
+
- **Content-Type**: application/json
|
771
|
+
- **Accept**: application/json
|
772
|
+
|
773
|
+
|
774
|
+
|
729
775
|
# **get_agent_websocket_authorization**
|
730
776
|
> ConversationAgentAuthResponse get_agent_websocket_authorization
|
731
777
|
|
data/docs/WebhookApi.md
CHANGED
@@ -186,6 +186,14 @@ api_instance = UltracartClient::WebhookApi.new_using_api_key(simple_key, false,
|
|
186
186
|
webhook_oid = 56 # Integer | The webhook oid to retrieve log summaries for.
|
187
187
|
|
188
188
|
opts = {
|
189
|
+
request_id: 'request_id_example', # String |
|
190
|
+
begin_date: 'begin_date_example', # String |
|
191
|
+
end_date: 'end_date_example', # String |
|
192
|
+
status: 'status_example', # String |
|
193
|
+
event: 'event_example', # String |
|
194
|
+
order_id: 'order_id_example', # String |
|
195
|
+
request: 'request_example', # String |
|
196
|
+
duration: 56, # Integer |
|
189
197
|
_limit: 100, # Integer | The maximum number of records to return on this one API call.
|
190
198
|
_offset: 0, # Integer | Pagination of the record set. Offset is a zero based index.
|
191
199
|
_since: '_since_example' # String | Fetch log summaries that have been delivered since this date/time.
|
@@ -205,6 +213,14 @@ end
|
|
205
213
|
Name | Type | Description | Notes
|
206
214
|
------------- | ------------- | ------------- | -------------
|
207
215
|
**webhook_oid** | **Integer**| The webhook oid to retrieve log summaries for. |
|
216
|
+
**request_id** | **String**| | [optional]
|
217
|
+
**begin_date** | **String**| | [optional]
|
218
|
+
**end_date** | **String**| | [optional]
|
219
|
+
**status** | **String**| | [optional]
|
220
|
+
**event** | **String**| | [optional]
|
221
|
+
**order_id** | **String**| | [optional]
|
222
|
+
**request** | **String**| | [optional]
|
223
|
+
**duration** | **Integer**| | [optional]
|
208
224
|
**_limit** | **Integer**| The maximum number of records to return on this one API call. | [optional] [default to 100]
|
209
225
|
**_offset** | **Integer**| Pagination of the record set. Offset is a zero based index. | [optional] [default to 0]
|
210
226
|
**_since** | **String**| Fetch log summaries that have been delivered since this date/time. | [optional]
|
@@ -735,6 +735,55 @@ module UltracartClient
|
|
735
735
|
end
|
736
736
|
return data, status_code, headers
|
737
737
|
end
|
738
|
+
# Get agent profiles
|
739
|
+
# Retrieve the agents profile
|
740
|
+
# @param [Hash] opts the optional parameters
|
741
|
+
# @return [ConversationAgentProfilesResponse]
|
742
|
+
def get_agent_profiles(opts = {})
|
743
|
+
data, _status_code, _headers = get_agent_profiles_with_http_info(opts)
|
744
|
+
data
|
745
|
+
end
|
746
|
+
|
747
|
+
# Get agent profiles
|
748
|
+
# Retrieve the agents profile
|
749
|
+
# @param [Hash] opts the optional parameters
|
750
|
+
# @return [Array<(ConversationAgentProfilesResponse, Fixnum, Hash)>] ConversationAgentProfilesResponse data, response status code and response headers
|
751
|
+
def get_agent_profiles_with_http_info(opts = {})
|
752
|
+
if @api_client.config.debugging
|
753
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_profiles ...'
|
754
|
+
end
|
755
|
+
# resource path
|
756
|
+
local_var_path = '/conversation/agent/profiles'
|
757
|
+
|
758
|
+
# query parameters
|
759
|
+
query_params = {}
|
760
|
+
|
761
|
+
# header parameters
|
762
|
+
header_params = {}
|
763
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
764
|
+
# HTTP header 'Accept' (if needed)
|
765
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
766
|
+
# HTTP header 'Content-Type'
|
767
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
768
|
+
|
769
|
+
# form parameters
|
770
|
+
form_params = {}
|
771
|
+
|
772
|
+
# http body (model)
|
773
|
+
post_body = nil
|
774
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
775
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
776
|
+
:header_params => header_params,
|
777
|
+
:query_params => query_params,
|
778
|
+
:form_params => form_params,
|
779
|
+
:body => post_body,
|
780
|
+
:auth_names => auth_names,
|
781
|
+
:return_type => 'ConversationAgentProfilesResponse')
|
782
|
+
if @api_client.config.debugging
|
783
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_agent_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
784
|
+
end
|
785
|
+
return data, status_code, headers
|
786
|
+
end
|
738
787
|
# Get agent websocket authorization
|
739
788
|
# Retrieve a JWT to authorize an agent to make a websocket connection.
|
740
789
|
# @param [Hash] opts the optional parameters
|
@@ -206,6 +206,14 @@ module UltracartClient
|
|
206
206
|
# Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
|
207
207
|
# @param webhook_oid The webhook oid to retrieve log summaries for.
|
208
208
|
# @param [Hash] opts the optional parameters
|
209
|
+
# @option opts [String] :request_id
|
210
|
+
# @option opts [String] :begin_date
|
211
|
+
# @option opts [String] :end_date
|
212
|
+
# @option opts [String] :status
|
213
|
+
# @option opts [String] :event
|
214
|
+
# @option opts [String] :order_id
|
215
|
+
# @option opts [String] :request
|
216
|
+
# @option opts [Integer] :duration
|
209
217
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (default to 100)
|
210
218
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
211
219
|
# @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
|
@@ -219,6 +227,14 @@ module UltracartClient
|
|
219
227
|
# Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
|
220
228
|
# @param webhook_oid The webhook oid to retrieve log summaries for.
|
221
229
|
# @param [Hash] opts the optional parameters
|
230
|
+
# @option opts [String] :request_id
|
231
|
+
# @option opts [String] :begin_date
|
232
|
+
# @option opts [String] :end_date
|
233
|
+
# @option opts [String] :status
|
234
|
+
# @option opts [String] :event
|
235
|
+
# @option opts [String] :order_id
|
236
|
+
# @option opts [String] :request
|
237
|
+
# @option opts [Integer] :duration
|
222
238
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call.
|
223
239
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
|
224
240
|
# @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
|
@@ -236,6 +252,14 @@ module UltracartClient
|
|
236
252
|
|
237
253
|
# query parameters
|
238
254
|
query_params = {}
|
255
|
+
query_params[:'requestId'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
256
|
+
query_params[:'beginDate'] = opts[:'begin_date'] if !opts[:'begin_date'].nil?
|
257
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
258
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
259
|
+
query_params[:'event'] = opts[:'event'] if !opts[:'event'].nil?
|
260
|
+
query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
|
261
|
+
query_params[:'request'] = opts[:'request'] if !opts[:'request'].nil?
|
262
|
+
query_params[:'duration'] = opts[:'duration'] if !opts[:'duration'].nil?
|
239
263
|
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
240
264
|
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
241
265
|
query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
|
@@ -0,0 +1,223 @@
|
|
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 ConversationAgentProfilesResponse
|
17
|
+
attr_accessor :agent_profiles
|
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
|
+
:'agent_profiles' => :'agent_profiles',
|
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
|
+
:'agent_profiles' => :'Array<ConversationAgentProfile>',
|
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?(:'agent_profiles')
|
59
|
+
if (value = attributes[:'agent_profiles']).is_a?(Array)
|
60
|
+
self.agent_profiles = value
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'error')
|
65
|
+
self.error = attributes[:'error']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'metadata')
|
69
|
+
self.metadata = attributes[:'metadata']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'success')
|
73
|
+
self.success = attributes[:'success']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'warning')
|
77
|
+
self.warning = attributes[:'warning']
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
+
# @return Array for valid properties with the reasons
|
83
|
+
def list_invalid_properties
|
84
|
+
invalid_properties = Array.new
|
85
|
+
invalid_properties
|
86
|
+
end
|
87
|
+
|
88
|
+
# Check to see if the all the properties in the model are valid
|
89
|
+
# @return true if the model is valid
|
90
|
+
def valid?
|
91
|
+
true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Checks equality by comparing each attribute.
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def ==(o)
|
97
|
+
return true if self.equal?(o)
|
98
|
+
self.class == o.class &&
|
99
|
+
agent_profiles == o.agent_profiles &&
|
100
|
+
error == o.error &&
|
101
|
+
metadata == o.metadata &&
|
102
|
+
success == o.success &&
|
103
|
+
warning == o.warning
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Fixnum] Hash code
|
114
|
+
def hash
|
115
|
+
[agent_profiles, error, metadata, success, warning].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.swagger_types.each_pair do |key, type|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :DateTime
|
145
|
+
DateTime.parse(value)
|
146
|
+
when :Date
|
147
|
+
Date.parse(value)
|
148
|
+
when :String
|
149
|
+
value.to_s
|
150
|
+
when :Integer
|
151
|
+
value.to_i
|
152
|
+
when :Float
|
153
|
+
value.to_f
|
154
|
+
when :BOOLEAN
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
|
+
true
|
157
|
+
else
|
158
|
+
false
|
159
|
+
end
|
160
|
+
when :Object
|
161
|
+
# generic object (usually a Hash), return directly
|
162
|
+
value
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each do |k, v|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else # model
|
175
|
+
temp_model = UltracartClient.const_get(type).new
|
176
|
+
temp_model.build_from_hash(value)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the string representation of the object
|
181
|
+
# @return [String] String presentation of the object
|
182
|
+
def to_s
|
183
|
+
to_hash.to_s
|
184
|
+
end
|
185
|
+
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_body
|
189
|
+
to_hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the object in the form of hash
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_hash
|
195
|
+
hash = {}
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
197
|
+
value = self.send(attr)
|
198
|
+
next if value.nil?
|
199
|
+
hash[param] = _to_hash(value)
|
200
|
+
end
|
201
|
+
hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Outputs non-array value in the form of hash
|
205
|
+
# For object, use to_hash. Otherwise, just return the value
|
206
|
+
# @param [Object] value Any valid value
|
207
|
+
# @return [Hash] Returns the value in the form of hash
|
208
|
+
def _to_hash(value)
|
209
|
+
if value.is_a?(Array)
|
210
|
+
value.compact.map { |v| _to_hash(v) }
|
211
|
+
elsif value.is_a?(Hash)
|
212
|
+
{}.tap do |hash|
|
213
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
214
|
+
end
|
215
|
+
elsif value.respond_to? :to_hash
|
216
|
+
value.to_hash
|
217
|
+
else
|
218
|
+
value
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
223
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -152,6 +152,7 @@ require 'ultracart_api/models/conversation_agent_auth'
|
|
152
152
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
153
153
|
require 'ultracart_api/models/conversation_agent_profile'
|
154
154
|
require 'ultracart_api/models/conversation_agent_profile_response'
|
155
|
+
require 'ultracart_api/models/conversation_agent_profiles_response'
|
155
156
|
require 'ultracart_api/models/conversation_autocomplete_request'
|
156
157
|
require 'ultracart_api/models/conversation_autocomplete_response'
|
157
158
|
require 'ultracart_api/models/conversation_autocomplete_value'
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -361,6 +361,7 @@ files:
|
|
361
361
|
- docs/ConversationAgentAuthResponse.md
|
362
362
|
- docs/ConversationAgentProfile.md
|
363
363
|
- docs/ConversationAgentProfileResponse.md
|
364
|
+
- docs/ConversationAgentProfilesResponse.md
|
364
365
|
- docs/ConversationApi.md
|
365
366
|
- docs/ConversationAutocompleteRequest.md
|
366
367
|
- docs/ConversationAutocompleteResponse.md
|
@@ -1262,6 +1263,7 @@ files:
|
|
1262
1263
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
1263
1264
|
- lib/ultracart_api/models/conversation_agent_profile.rb
|
1264
1265
|
- lib/ultracart_api/models/conversation_agent_profile_response.rb
|
1266
|
+
- lib/ultracart_api/models/conversation_agent_profiles_response.rb
|
1265
1267
|
- lib/ultracart_api/models/conversation_autocomplete_request.rb
|
1266
1268
|
- lib/ultracart_api/models/conversation_autocomplete_response.rb
|
1267
1269
|
- lib/ultracart_api/models/conversation_autocomplete_value.rb
|