ultracart_api 4.0.128 → 4.0.129

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1983a719da101f1f4c4186a6576dfa4d87cdaeb7f4e983af611f0505189ed0ce
4
- data.tar.gz: ad575d13d7c383d6d616a44da7188220c0300695869ee722f104fecbf769c145
3
+ metadata.gz: 5293012ec7f9968e2943c0d98f9b26438de29af158a51197cc9be2019da03db3
4
+ data.tar.gz: de611ab94d3219c13428d3b7bb524d322802b0502ba25e2850531fff9b97d73c
5
5
  SHA512:
6
- metadata.gz: 6a5463cddf29098a9be25847e094013ef5180de7c48ab823e5db4f1d2a76e885ec0ea1cfdbd296a20a8813a869a51f47d732a799d804f42570ed58fcbf386ba3
7
- data.tar.gz: 1881d3c94b5dbae1fbaee3619c318d45812fcacd334229a43af854677cbadf6b6a0130e81178789ddd37017c254a5d12b44c5f68600cd8620207f552b1a2c9b0
6
+ metadata.gz: 86906721722d5080fea607ea6cfdc62b630f572c573bb43350f3e9bf475311c5e1845fa359ad031c7c77f6eb86d46ecd934f32bfaba94a1d87837faf9d21b7a8
7
+ data.tar.gz: 2ab9d6ba0ac04ffa3c7e2c2d07bff9dd69375066d7954d05dfda59491bce10a1f060ea624ef1a92606e7dafed8341243b78fad7a77135557467d32b4a1ffa18f
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
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.0.128
10
+ - Package version: 4.0.129
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.128.gem
27
+ gem install ./ultracart_api-4.0.129.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.128.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.129.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.128'
36
+ gem 'ultracart_api', '~> 4.0.129'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -141,6 +141,7 @@ Class | Method | HTTP request | Description
141
141
  *UltracartClient::ConversationApi* | [**delete_department**](docs/ConversationApi.md#delete_department) | **DELETE** /conversation/departments/{conversation_department_oid} | Delete a conversation department
142
142
  *UltracartClient::ConversationApi* | [**delete_engagement**](docs/ConversationApi.md#delete_engagement) | **DELETE** /conversation/engagements/{conversation_engagement_oid} | Delete a conversation engagement
143
143
  *UltracartClient::ConversationApi* | [**get_agent_keep_alive**](docs/ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive
144
+ *UltracartClient::ConversationApi* | [**get_agent_profile**](docs/ConversationApi.md#get_agent_profile) | **GET** /conversation/agent/profile | Get agent profile
144
145
  *UltracartClient::ConversationApi* | [**get_agent_websocket_authorization**](docs/ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
145
146
  *UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
146
147
  *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
@@ -165,6 +166,7 @@ Class | Method | HTTP request | Description
165
166
  *UltracartClient::ConversationApi* | [**mark_read_conversation**](docs/ConversationApi.md#mark_read_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/markread | Mark a conversation as read
166
167
  *UltracartClient::ConversationApi* | [**search_conversation_canned_messages**](docs/ConversationApi.md#search_conversation_canned_messages) | **POST** /conversation/canned_messages/search | Search for canned messages by short_code
167
168
  *UltracartClient::ConversationApi* | [**start_conversation**](docs/ConversationApi.md#start_conversation) | **PUT** /conversation/conversations | Start a conversation
169
+ *UltracartClient::ConversationApi* | [**update_agent_profile**](docs/ConversationApi.md#update_agent_profile) | **PUT** /conversation/agent/profile | Update agent profile
168
170
  *UltracartClient::ConversationApi* | [**update_conversation_canned_message**](docs/ConversationApi.md#update_conversation_canned_message) | **PUT** /conversation/canned_messages/{conversation_canned_message_oid} | Update a canned message
169
171
  *UltracartClient::ConversationApi* | [**update_conversation_department**](docs/ConversationApi.md#update_conversation_department) | **PUT** /conversation/departments/{conversation_department_oid} | Update a department
170
172
  *UltracartClient::ConversationApi* | [**update_conversation_engagement**](docs/ConversationApi.md#update_conversation_engagement) | **PUT** /conversation/engagements/{conversation_engagement_oid} | Update a engagement
@@ -622,6 +624,8 @@ Class | Method | HTTP request | Description
622
624
  - [UltracartClient::Conversation](docs/Conversation.md)
623
625
  - [UltracartClient::ConversationAgentAuth](docs/ConversationAgentAuth.md)
624
626
  - [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
627
+ - [UltracartClient::ConversationAgentProfile](docs/ConversationAgentProfile.md)
628
+ - [UltracartClient::ConversationAgentProfileResponse](docs/ConversationAgentProfileResponse.md)
625
629
  - [UltracartClient::ConversationAutocompleteRequest](docs/ConversationAutocompleteRequest.md)
626
630
  - [UltracartClient::ConversationAutocompleteResponse](docs/ConversationAutocompleteResponse.md)
627
631
  - [UltracartClient::ConversationAutocompleteValue](docs/ConversationAutocompleteValue.md)
@@ -1304,6 +1308,7 @@ Not every change is committed to every SDK.
1304
1308
 
1305
1309
  | Version | Date | Comments |
1306
1310
  | --: | :-: | --- |
1311
+ | 4.0.129 | 02/01/2023 | convo - agent profile get/update methods |
1307
1312
  | 4.0.128 | 01/27/2023 | convo - added event_engage_customer property to message |
1308
1313
  | 4.0.127 | 01/27/2023 | conversations - getLocationsForEngagement method |
1309
1314
  | 4.0.126-RC | 01/26/2023 | typo in ConversationWebsocketMessage |
@@ -0,0 +1,30 @@
1
+ # UltracartClient::ConversationAgentProfile
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **chat_limit** | **Integer** | The number of engagement chats that can be pushed on them at any given time. | [optional] |
8
+ | **default_language_iso_code** | **String** | The default language the agent is chatting in | [optional] |
9
+ | **default_status** | **String** | Default status when the agent loads conversations app. | [optional] |
10
+ | **display_name** | **String** | An alternate name that the agent wants to use in chat. | [optional] |
11
+ | **name** | **String** | Their actual user name for profile settings display as placeholder test | [optional] |
12
+ | **profile_image_upload_key** | **String** | An upload key used to update the profile image. | [optional] |
13
+ | **profile_image_url** | **String** | Their current profile image URL | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'ultracart_api'
19
+
20
+ instance = UltracartClient::ConversationAgentProfile.new(
21
+ chat_limit: null,
22
+ default_language_iso_code: null,
23
+ default_status: null,
24
+ display_name: null,
25
+ name: null,
26
+ profile_image_upload_key: null,
27
+ profile_image_url: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::ConversationAgentProfileResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **agent_profile** | [**ConversationAgentProfile**](ConversationAgentProfile.md) | | [optional] |
8
+ | **error** | [**Error**](Error.md) | | [optional] |
9
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
10
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
11
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::ConversationAgentProfileResponse.new(
19
+ agent_profile: null,
20
+ error: null,
21
+ metadata: null,
22
+ success: null,
23
+ warning: null
24
+ )
25
+ ```
26
+
@@ -8,6 +8,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
8
8
  | [**delete_department**](ConversationApi.md#delete_department) | **DELETE** /conversation/departments/{conversation_department_oid} | Delete a conversation department |
9
9
  | [**delete_engagement**](ConversationApi.md#delete_engagement) | **DELETE** /conversation/engagements/{conversation_engagement_oid} | Delete a conversation engagement |
10
10
  | [**get_agent_keep_alive**](ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive |
11
+ | [**get_agent_profile**](ConversationApi.md#get_agent_profile) | **GET** /conversation/agent/profile | Get agent profile |
11
12
  | [**get_agent_websocket_authorization**](ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization |
12
13
  | [**get_conversation**](ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation |
13
14
  | [**get_conversation_canned_messages**](ConversationApi.md#get_conversation_canned_messages) | **GET** /conversation/canned_messages | Retrieve a list of canned messages ordered by short_code |
@@ -32,6 +33,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
32
33
  | [**mark_read_conversation**](ConversationApi.md#mark_read_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/markread | Mark a conversation as read |
33
34
  | [**search_conversation_canned_messages**](ConversationApi.md#search_conversation_canned_messages) | **POST** /conversation/canned_messages/search | Search for canned messages by short_code |
34
35
  | [**start_conversation**](ConversationApi.md#start_conversation) | **PUT** /conversation/conversations | Start a conversation |
36
+ | [**update_agent_profile**](ConversationApi.md#update_agent_profile) | **PUT** /conversation/agent/profile | Update agent profile |
35
37
  | [**update_conversation_canned_message**](ConversationApi.md#update_conversation_canned_message) | **PUT** /conversation/canned_messages/{conversation_canned_message_oid} | Update a canned message |
36
38
  | [**update_conversation_department**](ConversationApi.md#update_conversation_department) | **PUT** /conversation/departments/{conversation_department_oid} | Update a department |
37
39
  | [**update_conversation_engagement**](ConversationApi.md#update_conversation_engagement) | **PUT** /conversation/engagements/{conversation_engagement_oid} | Update a engagement |
@@ -315,6 +317,74 @@ nil (empty response body)
315
317
  - **Accept**: application/json
316
318
 
317
319
 
320
+ ## get_agent_profile
321
+
322
+ > <ConversationAgentProfileResponse> get_agent_profile
323
+
324
+ Get agent profile
325
+
326
+ Retrieve the agents profile
327
+
328
+ ### Examples
329
+
330
+ ```ruby
331
+ require 'time'
332
+ require 'ultracart_api'
333
+ require 'json'
334
+ require 'yaml'
335
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
336
+
337
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
338
+ # As such, this might not be the best way to use this object.
339
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
340
+
341
+ api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
342
+
343
+ begin
344
+ # Get agent profile
345
+ result = api_instance.get_agent_profile
346
+ p result
347
+ rescue UltracartClient::ApiError => e
348
+ puts "Error when calling ConversationApi->get_agent_profile: #{e}"
349
+ end
350
+ ```
351
+
352
+ #### Using the get_agent_profile_with_http_info variant
353
+
354
+ This returns an Array which contains the response data, status code and headers.
355
+
356
+ > <Array(<ConversationAgentProfileResponse>, Integer, Hash)> get_agent_profile_with_http_info
357
+
358
+ ```ruby
359
+ begin
360
+ # Get agent profile
361
+ data, status_code, headers = api_instance.get_agent_profile_with_http_info
362
+ p status_code # => 2xx
363
+ p headers # => { ... }
364
+ p data # => <ConversationAgentProfileResponse>
365
+ rescue UltracartClient::ApiError => e
366
+ puts "Error when calling ConversationApi->get_agent_profile_with_http_info: #{e}"
367
+ end
368
+ ```
369
+
370
+ ### Parameters
371
+
372
+ This endpoint does not need any parameter.
373
+
374
+ ### Return type
375
+
376
+ [**ConversationAgentProfileResponse**](ConversationAgentProfileResponse.md)
377
+
378
+ ### Authorization
379
+
380
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
381
+
382
+ ### HTTP request headers
383
+
384
+ - **Content-Type**: Not defined
385
+ - **Accept**: application/json
386
+
387
+
318
388
  ## get_agent_websocket_authorization
319
389
 
320
390
  > <ConversationAgentAuthResponse> get_agent_websocket_authorization
@@ -2014,6 +2084,77 @@ end
2014
2084
  - **Accept**: application/json
2015
2085
 
2016
2086
 
2087
+ ## update_agent_profile
2088
+
2089
+ > <ConversationAgentProfileResponse> update_agent_profile(profile_request)
2090
+
2091
+ Update agent profile
2092
+
2093
+ Update agent profile
2094
+
2095
+ ### Examples
2096
+
2097
+ ```ruby
2098
+ require 'time'
2099
+ require 'ultracart_api'
2100
+ require 'json'
2101
+ require 'yaml'
2102
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
2103
+
2104
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
2105
+ # As such, this might not be the best way to use this object.
2106
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
2107
+
2108
+ api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
2109
+ profile_request = UltracartClient::ConversationAgentProfile.new # ConversationAgentProfile | Profile request
2110
+
2111
+ begin
2112
+ # Update agent profile
2113
+ result = api_instance.update_agent_profile(profile_request)
2114
+ p result
2115
+ rescue UltracartClient::ApiError => e
2116
+ puts "Error when calling ConversationApi->update_agent_profile: #{e}"
2117
+ end
2118
+ ```
2119
+
2120
+ #### Using the update_agent_profile_with_http_info variant
2121
+
2122
+ This returns an Array which contains the response data, status code and headers.
2123
+
2124
+ > <Array(<ConversationAgentProfileResponse>, Integer, Hash)> update_agent_profile_with_http_info(profile_request)
2125
+
2126
+ ```ruby
2127
+ begin
2128
+ # Update agent profile
2129
+ data, status_code, headers = api_instance.update_agent_profile_with_http_info(profile_request)
2130
+ p status_code # => 2xx
2131
+ p headers # => { ... }
2132
+ p data # => <ConversationAgentProfileResponse>
2133
+ rescue UltracartClient::ApiError => e
2134
+ puts "Error when calling ConversationApi->update_agent_profile_with_http_info: #{e}"
2135
+ end
2136
+ ```
2137
+
2138
+ ### Parameters
2139
+
2140
+ | Name | Type | Description | Notes |
2141
+ | ---- | ---- | ----------- | ----- |
2142
+ | **profile_request** | [**ConversationAgentProfile**](ConversationAgentProfile.md) | Profile request | |
2143
+
2144
+ ### Return type
2145
+
2146
+ [**ConversationAgentProfileResponse**](ConversationAgentProfileResponse.md)
2147
+
2148
+ ### Authorization
2149
+
2150
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
2151
+
2152
+ ### HTTP request headers
2153
+
2154
+ - **Content-Type**: application/json
2155
+ - **Accept**: application/json
2156
+
2157
+
2017
2158
  ## update_conversation_canned_message
2018
2159
 
2019
2160
  > <ConversationCannedMessageResponse> update_conversation_canned_message(conversation_canned_message_oid, canned_message)
@@ -282,6 +282,64 @@ module UltracartClient
282
282
  return data, status_code, headers
283
283
  end
284
284
 
285
+ # Get agent profile
286
+ # Retrieve the agents profile
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [ConversationAgentProfileResponse]
289
+ def get_agent_profile(opts = {})
290
+ data, _status_code, _headers = get_agent_profile_with_http_info(opts)
291
+ data
292
+ end
293
+
294
+ # Get agent profile
295
+ # Retrieve the agents profile
296
+ # @param [Hash] opts the optional parameters
297
+ # @return [Array<(ConversationAgentProfileResponse, Integer, Hash)>] ConversationAgentProfileResponse data, response status code and response headers
298
+ def get_agent_profile_with_http_info(opts = {})
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_profile ...'
301
+ end
302
+ # resource path
303
+ local_var_path = '/conversation/agent/profile'
304
+
305
+ # query parameters
306
+ query_params = opts[:query_params] || {}
307
+
308
+ # header parameters
309
+ header_params = opts[:header_params] || {}
310
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
313
+
314
+ # form parameters
315
+ form_params = opts[:form_params] || {}
316
+
317
+ # http body (model)
318
+ post_body = opts[:debug_body]
319
+
320
+ # return_type
321
+ return_type = opts[:debug_return_type] || 'ConversationAgentProfileResponse'
322
+
323
+ # auth_names
324
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
325
+
326
+ new_options = opts.merge(
327
+ :operation => :"ConversationApi.get_agent_profile",
328
+ :header_params => header_params,
329
+ :query_params => query_params,
330
+ :form_params => form_params,
331
+ :body => post_body,
332
+ :auth_names => auth_names,
333
+ :return_type => return_type
334
+ )
335
+
336
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
337
+ if @api_client.config.debugging
338
+ @api_client.config.logger.debug "API called: ConversationApi#get_agent_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
339
+ end
340
+ return data, status_code, headers
341
+ end
342
+
285
343
  # Get agent websocket authorization
286
344
  # Retrieve a JWT to authorize an agent to make a websocket connection.
287
345
  # @param [Hash] opts the optional parameters
@@ -1830,6 +1888,75 @@ module UltracartClient
1830
1888
  return data, status_code, headers
1831
1889
  end
1832
1890
 
1891
+ # Update agent profile
1892
+ # Update agent profile
1893
+ # @param profile_request [ConversationAgentProfile] Profile request
1894
+ # @param [Hash] opts the optional parameters
1895
+ # @return [ConversationAgentProfileResponse]
1896
+ def update_agent_profile(profile_request, opts = {})
1897
+ data, _status_code, _headers = update_agent_profile_with_http_info(profile_request, opts)
1898
+ data
1899
+ end
1900
+
1901
+ # Update agent profile
1902
+ # Update agent profile
1903
+ # @param profile_request [ConversationAgentProfile] Profile request
1904
+ # @param [Hash] opts the optional parameters
1905
+ # @return [Array<(ConversationAgentProfileResponse, Integer, Hash)>] ConversationAgentProfileResponse data, response status code and response headers
1906
+ def update_agent_profile_with_http_info(profile_request, opts = {})
1907
+ if @api_client.config.debugging
1908
+ @api_client.config.logger.debug 'Calling API: ConversationApi.update_agent_profile ...'
1909
+ end
1910
+ # verify the required parameter 'profile_request' is set
1911
+ if @api_client.config.client_side_validation && profile_request.nil?
1912
+ fail ArgumentError, "Missing the required parameter 'profile_request' when calling ConversationApi.update_agent_profile"
1913
+ end
1914
+ # resource path
1915
+ local_var_path = '/conversation/agent/profile'
1916
+
1917
+ # query parameters
1918
+ query_params = opts[:query_params] || {}
1919
+
1920
+ # header parameters
1921
+ header_params = opts[:header_params] || {}
1922
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1923
+ # HTTP header 'Accept' (if needed)
1924
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1925
+ # HTTP header 'Content-Type'
1926
+ content_type = @api_client.select_header_content_type(['application/json'])
1927
+ if !content_type.nil?
1928
+ header_params['Content-Type'] = content_type
1929
+ end
1930
+
1931
+ # form parameters
1932
+ form_params = opts[:form_params] || {}
1933
+
1934
+ # http body (model)
1935
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_request)
1936
+
1937
+ # return_type
1938
+ return_type = opts[:debug_return_type] || 'ConversationAgentProfileResponse'
1939
+
1940
+ # auth_names
1941
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1942
+
1943
+ new_options = opts.merge(
1944
+ :operation => :"ConversationApi.update_agent_profile",
1945
+ :header_params => header_params,
1946
+ :query_params => query_params,
1947
+ :form_params => form_params,
1948
+ :body => post_body,
1949
+ :auth_names => auth_names,
1950
+ :return_type => return_type
1951
+ )
1952
+
1953
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1954
+ if @api_client.config.debugging
1955
+ @api_client.config.logger.debug "API called: ConversationApi#update_agent_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1956
+ end
1957
+ return data, status_code, headers
1958
+ end
1959
+
1833
1960
  # Update a canned message
1834
1961
  # Update a canned message
1835
1962
  # @param conversation_canned_message_oid [Integer]
@@ -0,0 +1,314 @@
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 ConversationAgentProfile
18
+ # The number of engagement chats that can be pushed on them at any given time.
19
+ attr_accessor :chat_limit
20
+
21
+ # The default language the agent is chatting in
22
+ attr_accessor :default_language_iso_code
23
+
24
+ # Default status when the agent loads conversations app.
25
+ attr_accessor :default_status
26
+
27
+ # An alternate name that the agent wants to use in chat.
28
+ attr_accessor :display_name
29
+
30
+ # Their actual user name for profile settings display as placeholder test
31
+ attr_accessor :name
32
+
33
+ # An upload key used to update the profile image.
34
+ attr_accessor :profile_image_upload_key
35
+
36
+ # Their current profile image URL
37
+ attr_accessor :profile_image_url
38
+
39
+ class EnumAttributeValidator
40
+ attr_reader :datatype
41
+ attr_reader :allowable_values
42
+
43
+ def initialize(datatype, allowable_values)
44
+ @allowable_values = allowable_values.map do |value|
45
+ case datatype.to_s
46
+ when /Integer/i
47
+ value.to_i
48
+ when /Float/i
49
+ value.to_f
50
+ else
51
+ value
52
+ end
53
+ end
54
+ end
55
+
56
+ def valid?(value)
57
+ !value || allowable_values.include?(value)
58
+ end
59
+ end
60
+
61
+ # Attribute mapping from ruby-style variable name to JSON key.
62
+ def self.attribute_map
63
+ {
64
+ :'chat_limit' => :'chat_limit',
65
+ :'default_language_iso_code' => :'default_language_iso_code',
66
+ :'default_status' => :'default_status',
67
+ :'display_name' => :'display_name',
68
+ :'name' => :'name',
69
+ :'profile_image_upload_key' => :'profile_image_upload_key',
70
+ :'profile_image_url' => :'profile_image_url'
71
+ }
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'chat_limit' => :'Integer',
83
+ :'default_language_iso_code' => :'String',
84
+ :'default_status' => :'String',
85
+ :'display_name' => :'String',
86
+ :'name' => :'String',
87
+ :'profile_image_upload_key' => :'String',
88
+ :'profile_image_url' => :'String'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ ])
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ if (!attributes.is_a?(Hash))
102
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationAgentProfile` initialize method"
103
+ end
104
+
105
+ # check to see if the attribute exists and convert string to symbol for hash key
106
+ attributes = attributes.each_with_object({}) { |(k, v), h|
107
+ if (!self.class.attribute_map.key?(k.to_sym))
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationAgentProfile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
+ end
110
+ h[k.to_sym] = v
111
+ }
112
+
113
+ if attributes.key?(:'chat_limit')
114
+ self.chat_limit = attributes[:'chat_limit']
115
+ end
116
+
117
+ if attributes.key?(:'default_language_iso_code')
118
+ self.default_language_iso_code = attributes[:'default_language_iso_code']
119
+ end
120
+
121
+ if attributes.key?(:'default_status')
122
+ self.default_status = attributes[:'default_status']
123
+ end
124
+
125
+ if attributes.key?(:'display_name')
126
+ self.display_name = attributes[:'display_name']
127
+ end
128
+
129
+ if attributes.key?(:'name')
130
+ self.name = attributes[:'name']
131
+ end
132
+
133
+ if attributes.key?(:'profile_image_upload_key')
134
+ self.profile_image_upload_key = attributes[:'profile_image_upload_key']
135
+ end
136
+
137
+ if attributes.key?(:'profile_image_url')
138
+ self.profile_image_url = attributes[:'profile_image_url']
139
+ end
140
+ end
141
+
142
+ # Show invalid properties with the reasons. Usually used together with valid?
143
+ # @return Array for valid properties with the reasons
144
+ def list_invalid_properties
145
+ invalid_properties = Array.new
146
+ invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ default_status_validator = EnumAttributeValidator.new('String', ["available", "busy", "unavailable"])
153
+ return false unless default_status_validator.valid?(@default_status)
154
+ true
155
+ end
156
+
157
+ # Custom attribute writer method checking allowed values (enum).
158
+ # @param [Object] default_status Object to be assigned
159
+ def default_status=(default_status)
160
+ validator = EnumAttributeValidator.new('String', ["available", "busy", "unavailable"])
161
+ unless validator.valid?(default_status)
162
+ fail ArgumentError, "invalid value for \"default_status\", must be one of #{validator.allowable_values}."
163
+ end
164
+ @default_status = default_status
165
+ end
166
+
167
+ # Checks equality by comparing each attribute.
168
+ # @param [Object] Object to be compared
169
+ def ==(o)
170
+ return true if self.equal?(o)
171
+ self.class == o.class &&
172
+ chat_limit == o.chat_limit &&
173
+ default_language_iso_code == o.default_language_iso_code &&
174
+ default_status == o.default_status &&
175
+ display_name == o.display_name &&
176
+ name == o.name &&
177
+ profile_image_upload_key == o.profile_image_upload_key &&
178
+ profile_image_url == o.profile_image_url
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [chat_limit, default_language_iso_code, default_status, display_name, name, profile_image_upload_key, profile_image_url].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ new.build_from_hash(attributes)
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def build_from_hash(attributes)
204
+ return nil unless attributes.is_a?(Hash)
205
+ attributes = attributes.transform_keys(&:to_sym)
206
+ self.class.openapi_types.each_pair do |key, type|
207
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
208
+ self.send("#{key}=", nil)
209
+ elsif type =~ /\AArray<(.*)>/i
210
+ # check to ensure the input is an array given that the attribute
211
+ # is documented as an array but the input is not
212
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
213
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
214
+ end
215
+ elsif !attributes[self.class.attribute_map[key]].nil?
216
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
217
+ end
218
+ end
219
+
220
+ self
221
+ end
222
+
223
+ # Deserializes the data based on type
224
+ # @param string type Data type
225
+ # @param string value Value to be deserialized
226
+ # @return [Object] Deserialized data
227
+ def _deserialize(type, value)
228
+ case type.to_sym
229
+ when :Time
230
+ Time.parse(value)
231
+ when :Date
232
+ Date.parse(value)
233
+ when :String
234
+ value.to_s
235
+ when :Integer
236
+ value.to_i
237
+ when :Float
238
+ value.to_f
239
+ when :Boolean
240
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
241
+ true
242
+ else
243
+ false
244
+ end
245
+ when :Object
246
+ # generic object (usually a Hash), return directly
247
+ value
248
+ when /\AArray<(?<inner_type>.+)>\z/
249
+ inner_type = Regexp.last_match[:inner_type]
250
+ value.map { |v| _deserialize(inner_type, v) }
251
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
252
+ k_type = Regexp.last_match[:k_type]
253
+ v_type = Regexp.last_match[:v_type]
254
+ {}.tap do |hash|
255
+ value.each do |k, v|
256
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
257
+ end
258
+ end
259
+ else # model
260
+ # models (e.g. Pet) or oneOf
261
+ klass = UltracartClient.const_get(type)
262
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
263
+ end
264
+ end
265
+
266
+ # Returns the string representation of the object
267
+ # @return [String] String presentation of the object
268
+ def to_s
269
+ to_hash.to_s
270
+ end
271
+
272
+ # to_body is an alias to to_hash (backward compatibility)
273
+ # @return [Hash] Returns the object in the form of hash
274
+ def to_body
275
+ to_hash
276
+ end
277
+
278
+ # Returns the object in the form of hash
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_hash
281
+ hash = {}
282
+ self.class.attribute_map.each_pair do |attr, param|
283
+ value = self.send(attr)
284
+ if value.nil?
285
+ is_nullable = self.class.openapi_nullable.include?(attr)
286
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
287
+ end
288
+
289
+ hash[param] = _to_hash(value)
290
+ end
291
+ hash
292
+ end
293
+
294
+ # Outputs non-array value in the form of hash
295
+ # For object, use to_hash. Otherwise, just return the value
296
+ # @param [Object] value Any valid value
297
+ # @return [Hash] Returns the value in the form of hash
298
+ def _to_hash(value)
299
+ if value.is_a?(Array)
300
+ value.compact.map { |v| _to_hash(v) }
301
+ elsif value.is_a?(Hash)
302
+ {}.tap do |hash|
303
+ value.each { |k, v| hash[k] = _to_hash(v) }
304
+ end
305
+ elsif value.respond_to? :to_hash
306
+ value.to_hash
307
+ else
308
+ value
309
+ end
310
+ end
311
+
312
+ end
313
+
314
+ end
@@ -0,0 +1,256 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ConversationAgentProfileResponse
18
+ attr_accessor :agent_profile
19
+
20
+ attr_accessor :error
21
+
22
+ attr_accessor :metadata
23
+
24
+ # Indicates if API call was successful
25
+ attr_accessor :success
26
+
27
+ attr_accessor :warning
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'agent_profile' => :'agent_profile',
33
+ :'error' => :'error',
34
+ :'metadata' => :'metadata',
35
+ :'success' => :'success',
36
+ :'warning' => :'warning'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'agent_profile' => :'ConversationAgentProfile',
49
+ :'error' => :'Error',
50
+ :'metadata' => :'ResponseMetadata',
51
+ :'success' => :'Boolean',
52
+ :'warning' => :'Warning'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationAgentProfileResponse` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationAgentProfileResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'agent_profile')
78
+ self.agent_profile = attributes[:'agent_profile']
79
+ end
80
+
81
+ if attributes.key?(:'error')
82
+ self.error = attributes[:'error']
83
+ end
84
+
85
+ if attributes.key?(:'metadata')
86
+ self.metadata = attributes[:'metadata']
87
+ end
88
+
89
+ if attributes.key?(:'success')
90
+ self.success = attributes[:'success']
91
+ end
92
+
93
+ if attributes.key?(:'warning')
94
+ self.warning = attributes[:'warning']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ agent_profile == o.agent_profile &&
117
+ error == o.error &&
118
+ metadata == o.metadata &&
119
+ success == o.success &&
120
+ warning == o.warning
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [agent_profile, error, metadata, success, warning].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ new.build_from_hash(attributes)
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ self.class.openapi_types.each_pair do |key, type|
149
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
150
+ self.send("#{key}=", nil)
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
155
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
156
+ end
157
+ elsif !attributes[self.class.attribute_map[key]].nil?
158
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
+ end
160
+ end
161
+
162
+ self
163
+ end
164
+
165
+ # Deserializes the data based on type
166
+ # @param string type Data type
167
+ # @param string value Value to be deserialized
168
+ # @return [Object] Deserialized data
169
+ def _deserialize(type, value)
170
+ case type.to_sym
171
+ when :Time
172
+ Time.parse(value)
173
+ when :Date
174
+ Date.parse(value)
175
+ when :String
176
+ value.to_s
177
+ when :Integer
178
+ value.to_i
179
+ when :Float
180
+ value.to_f
181
+ when :Boolean
182
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
+ true
184
+ else
185
+ false
186
+ end
187
+ when :Object
188
+ # generic object (usually a Hash), return directly
189
+ value
190
+ when /\AArray<(?<inner_type>.+)>\z/
191
+ inner_type = Regexp.last_match[:inner_type]
192
+ value.map { |v| _deserialize(inner_type, v) }
193
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
+ k_type = Regexp.last_match[:k_type]
195
+ v_type = Regexp.last_match[:v_type]
196
+ {}.tap do |hash|
197
+ value.each do |k, v|
198
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
+ end
200
+ end
201
+ else # model
202
+ # models (e.g. Pet) or oneOf
203
+ klass = UltracartClient.const_get(type)
204
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
+ end
206
+ end
207
+
208
+ # Returns the string representation of the object
209
+ # @return [String] String presentation of the object
210
+ def to_s
211
+ to_hash.to_s
212
+ end
213
+
214
+ # to_body is an alias to to_hash (backward compatibility)
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_body
217
+ to_hash
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ self.class.attribute_map.each_pair do |attr, param|
225
+ value = self.send(attr)
226
+ if value.nil?
227
+ is_nullable = self.class.openapi_nullable.include?(attr)
228
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
+ end
230
+
231
+ hash[param] = _to_hash(value)
232
+ end
233
+ hash
234
+ end
235
+
236
+ # Outputs non-array value in the form of hash
237
+ # For object, use to_hash. Otherwise, just return the value
238
+ # @param [Object] value Any valid value
239
+ # @return [Hash] Returns the value in the form of hash
240
+ def _to_hash(value)
241
+ if value.is_a?(Array)
242
+ value.compact.map { |v| _to_hash(v) }
243
+ elsif value.is_a?(Hash)
244
+ {}.tap do |hash|
245
+ value.each { |k, v| hash[k] = _to_hash(v) }
246
+ end
247
+ elsif value.respond_to? :to_hash
248
+ value.to_hash
249
+ else
250
+ value
251
+ end
252
+ end
253
+
254
+ end
255
+
256
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.128'
14
+ VERSION = '4.0.129'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -143,6 +143,8 @@ require 'ultracart_api/models/city_state_zip'
143
143
  require 'ultracart_api/models/conversation'
144
144
  require 'ultracart_api/models/conversation_agent_auth'
145
145
  require 'ultracart_api/models/conversation_agent_auth_response'
146
+ require 'ultracart_api/models/conversation_agent_profile'
147
+ require 'ultracart_api/models/conversation_agent_profile_response'
146
148
  require 'ultracart_api/models/conversation_autocomplete_request'
147
149
  require 'ultracart_api/models/conversation_autocomplete_response'
148
150
  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: 4.0.128
4
+ version: 4.0.129
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-27 00:00:00.000000000 Z
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -192,6 +192,8 @@ files:
192
192
  - docs/Conversation.md
193
193
  - docs/ConversationAgentAuth.md
194
194
  - docs/ConversationAgentAuthResponse.md
195
+ - docs/ConversationAgentProfile.md
196
+ - docs/ConversationAgentProfileResponse.md
195
197
  - docs/ConversationApi.md
196
198
  - docs/ConversationAutocompleteRequest.md
197
199
  - docs/ConversationAutocompleteResponse.md
@@ -965,6 +967,8 @@ files:
965
967
  - lib/ultracart_api/models/conversation.rb
966
968
  - lib/ultracart_api/models/conversation_agent_auth.rb
967
969
  - lib/ultracart_api/models/conversation_agent_auth_response.rb
970
+ - lib/ultracart_api/models/conversation_agent_profile.rb
971
+ - lib/ultracart_api/models/conversation_agent_profile_response.rb
968
972
  - lib/ultracart_api/models/conversation_autocomplete_request.rb
969
973
  - lib/ultracart_api/models/conversation_autocomplete_response.rb
970
974
  - lib/ultracart_api/models/conversation_autocomplete_value.rb