ultracart_api 4.0.118.rc → 4.0.119.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/ConversationApi.md +69 -0
- data/docs/ConversationDepartmentsResponse.md +0 -2
- data/docs/ConversationPermissions.md +18 -0
- data/docs/ConversationPermissionsResponse.md +26 -0
- data/lib/ultracart_api/api/conversation_api.rb +58 -0
- data/lib/ultracart_api/models/conversation_departments_response.rb +1 -10
- data/lib/ultracart_api/models/conversation_permissions.rb +219 -0
- data/lib/ultracart_api/models/conversation_permissions_response.rb +256 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a21d0568b3df6a2712a5b6b34d8ad74de0fdac3002d98f399928b72240e18461
|
4
|
+
data.tar.gz: 3a715b6661f9eab199372d46e1faecc6af829a062284f1a5680bc2d1c4991ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 519b33ea41dce3d4b84b3bd08eae930819281afe6254e9cfe8fd8c097b6ab1c2716ee11d7c4f4c1517a94d6d3caa62725131cdda46a7f38bdf9e9580ab5e01e5
|
7
|
+
data.tar.gz: d2ced92f247c8ddcb0bc9496ec9be4cf3f2336efbd79e2c4cf03773daa89186f5f8df641c9cefe4b43d63d4eefcc4d94b29efe29dd9a1e421ddb2cc9d44610b7
|
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.
|
10
|
+
- Package version: 4.0.119.rc
|
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.
|
27
|
+
gem install ./ultracart_api-4.0.119.rc.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.119.rc.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.
|
36
|
+
gem 'ultracart_api', '~> 4.0.119.rc'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -150,6 +150,7 @@ Class | Method | HTTP request | Description
|
|
150
150
|
*UltracartClient::ConversationApi* | [**get_conversation_engagements**](docs/ConversationApi.md#get_conversation_engagements) | **GET** /conversation/engagements | Retrieve a list of engagements ordered by name
|
151
151
|
*UltracartClient::ConversationApi* | [**get_conversation_messages**](docs/ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages
|
152
152
|
*UltracartClient::ConversationApi* | [**get_conversation_multimedia_upload_url**](docs/ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL
|
153
|
+
*UltracartClient::ConversationApi* | [**get_conversation_permissions**](docs/ConversationApi.md#get_conversation_permissions) | **GET** /conversation/permissions | Retrieve conversation permissions
|
153
154
|
*UltracartClient::ConversationApi* | [**get_conversation_webchat_queue_statuses**](docs/ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses
|
154
155
|
*UltracartClient::ConversationApi* | [**get_conversations**](docs/ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest
|
155
156
|
*UltracartClient::ConversationApi* | [**get_conversations_autocomplete**](docs/ConversationApi.md#get_conversations_autocomplete) | **POST** /conversation/conversations/autocomplete | Retrieve a list of matching terms for a search field
|
@@ -651,6 +652,8 @@ Class | Method | HTTP request | Description
|
|
651
652
|
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
652
653
|
- [UltracartClient::ConversationMultimediaUploadUrlResponse](docs/ConversationMultimediaUploadUrlResponse.md)
|
653
654
|
- [UltracartClient::ConversationParticipant](docs/ConversationParticipant.md)
|
655
|
+
- [UltracartClient::ConversationPermissions](docs/ConversationPermissions.md)
|
656
|
+
- [UltracartClient::ConversationPermissionsResponse](docs/ConversationPermissionsResponse.md)
|
654
657
|
- [UltracartClient::ConversationResponse](docs/ConversationResponse.md)
|
655
658
|
- [UltracartClient::ConversationSearchRequest](docs/ConversationSearchRequest.md)
|
656
659
|
- [UltracartClient::ConversationSearchResponse](docs/ConversationSearchResponse.md)
|
@@ -1293,6 +1296,7 @@ Not every change is committed to every SDK.
|
|
1293
1296
|
|
1294
1297
|
| Version | Date | Comments |
|
1295
1298
|
| --: | :-: | --- |
|
1299
|
+
| 4.0.119-RC | 01/19/2023 | convo - getConversationPermissions added |
|
1296
1300
|
| 4.0.118-RC | 01/18/2023 | conversation get dept member list method added |
|
1297
1301
|
| 4.0.117-RC | 01/18/2023 | conversation dept members |
|
1298
1302
|
| 4.0.116-RC | 01/18/2023 | channel partner ship to pref desc field |
|
data/docs/ConversationApi.md
CHANGED
@@ -17,6 +17,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
17
17
|
| [**get_conversation_engagements**](ConversationApi.md#get_conversation_engagements) | **GET** /conversation/engagements | Retrieve a list of engagements ordered by name |
|
18
18
|
| [**get_conversation_messages**](ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages |
|
19
19
|
| [**get_conversation_multimedia_upload_url**](ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL |
|
20
|
+
| [**get_conversation_permissions**](ConversationApi.md#get_conversation_permissions) | **GET** /conversation/permissions | Retrieve conversation permissions |
|
20
21
|
| [**get_conversation_webchat_queue_statuses**](ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses |
|
21
22
|
| [**get_conversations**](ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest |
|
22
23
|
| [**get_conversations_autocomplete**](ConversationApi.md#get_conversations_autocomplete) | **POST** /conversation/conversations/autocomplete | Retrieve a list of matching terms for a search field |
|
@@ -946,6 +947,74 @@ end
|
|
946
947
|
- **Accept**: application/json
|
947
948
|
|
948
949
|
|
950
|
+
## get_conversation_permissions
|
951
|
+
|
952
|
+
> <ConversationPermissionsResponse> get_conversation_permissions
|
953
|
+
|
954
|
+
Retrieve conversation permissions
|
955
|
+
|
956
|
+
Retrieve conversation permissions
|
957
|
+
|
958
|
+
### Examples
|
959
|
+
|
960
|
+
```ruby
|
961
|
+
require 'time'
|
962
|
+
require 'ultracart_api'
|
963
|
+
require 'json'
|
964
|
+
require 'yaml'
|
965
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
966
|
+
|
967
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
968
|
+
# As such, this might not be the best way to use this object.
|
969
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
970
|
+
|
971
|
+
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
972
|
+
|
973
|
+
begin
|
974
|
+
# Retrieve conversation permissions
|
975
|
+
result = api_instance.get_conversation_permissions
|
976
|
+
p result
|
977
|
+
rescue UltracartClient::ApiError => e
|
978
|
+
puts "Error when calling ConversationApi->get_conversation_permissions: #{e}"
|
979
|
+
end
|
980
|
+
```
|
981
|
+
|
982
|
+
#### Using the get_conversation_permissions_with_http_info variant
|
983
|
+
|
984
|
+
This returns an Array which contains the response data, status code and headers.
|
985
|
+
|
986
|
+
> <Array(<ConversationPermissionsResponse>, Integer, Hash)> get_conversation_permissions_with_http_info
|
987
|
+
|
988
|
+
```ruby
|
989
|
+
begin
|
990
|
+
# Retrieve conversation permissions
|
991
|
+
data, status_code, headers = api_instance.get_conversation_permissions_with_http_info
|
992
|
+
p status_code # => 2xx
|
993
|
+
p headers # => { ... }
|
994
|
+
p data # => <ConversationPermissionsResponse>
|
995
|
+
rescue UltracartClient::ApiError => e
|
996
|
+
puts "Error when calling ConversationApi->get_conversation_permissions_with_http_info: #{e}"
|
997
|
+
end
|
998
|
+
```
|
999
|
+
|
1000
|
+
### Parameters
|
1001
|
+
|
1002
|
+
This endpoint does not need any parameter.
|
1003
|
+
|
1004
|
+
### Return type
|
1005
|
+
|
1006
|
+
[**ConversationPermissionsResponse**](ConversationPermissionsResponse.md)
|
1007
|
+
|
1008
|
+
### Authorization
|
1009
|
+
|
1010
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1011
|
+
|
1012
|
+
### HTTP request headers
|
1013
|
+
|
1014
|
+
- **Content-Type**: Not defined
|
1015
|
+
- **Accept**: application/json
|
1016
|
+
|
1017
|
+
|
949
1018
|
## get_conversation_webchat_queue_statuses
|
950
1019
|
|
951
1020
|
> <ConversationWebchatQueueStatusesResponse> get_conversation_webchat_queue_statuses
|
@@ -7,7 +7,6 @@
|
|
7
7
|
| **conversation_departments** | [**Array<ConversationDepartment>**](ConversationDepartment.md) | | [optional] |
|
8
8
|
| **error** | [**Error**](Error.md) | | [optional] |
|
9
9
|
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
10
|
-
| **read_only** | **Boolean** | | [optional] |
|
11
10
|
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
12
11
|
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
13
12
|
|
@@ -20,7 +19,6 @@ instance = UltracartClient::ConversationDepartmentsResponse.new(
|
|
20
19
|
conversation_departments: null,
|
21
20
|
error: null,
|
22
21
|
metadata: null,
|
23
|
-
read_only: null,
|
24
22
|
success: null,
|
25
23
|
warning: null
|
26
24
|
)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# UltracartClient::ConversationPermissions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **edit_settings** | **Boolean** | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'ultracart_api'
|
13
|
+
|
14
|
+
instance = UltracartClient::ConversationPermissions.new(
|
15
|
+
edit_settings: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# UltracartClient::ConversationPermissionsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
8
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
9
|
+
| **permissions** | [**ConversationPermissions**](ConversationPermissions.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::ConversationPermissionsResponse.new(
|
19
|
+
error: null,
|
20
|
+
metadata: null,
|
21
|
+
permissions: null,
|
22
|
+
success: null,
|
23
|
+
warning: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -840,6 +840,64 @@ module UltracartClient
|
|
840
840
|
return data, status_code, headers
|
841
841
|
end
|
842
842
|
|
843
|
+
# Retrieve conversation permissions
|
844
|
+
# Retrieve conversation permissions
|
845
|
+
# @param [Hash] opts the optional parameters
|
846
|
+
# @return [ConversationPermissionsResponse]
|
847
|
+
def get_conversation_permissions(opts = {})
|
848
|
+
data, _status_code, _headers = get_conversation_permissions_with_http_info(opts)
|
849
|
+
data
|
850
|
+
end
|
851
|
+
|
852
|
+
# Retrieve conversation permissions
|
853
|
+
# Retrieve conversation permissions
|
854
|
+
# @param [Hash] opts the optional parameters
|
855
|
+
# @return [Array<(ConversationPermissionsResponse, Integer, Hash)>] ConversationPermissionsResponse data, response status code and response headers
|
856
|
+
def get_conversation_permissions_with_http_info(opts = {})
|
857
|
+
if @api_client.config.debugging
|
858
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_permissions ...'
|
859
|
+
end
|
860
|
+
# resource path
|
861
|
+
local_var_path = '/conversation/permissions'
|
862
|
+
|
863
|
+
# query parameters
|
864
|
+
query_params = opts[:query_params] || {}
|
865
|
+
|
866
|
+
# header parameters
|
867
|
+
header_params = opts[:header_params] || {}
|
868
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
869
|
+
# HTTP header 'Accept' (if needed)
|
870
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
871
|
+
|
872
|
+
# form parameters
|
873
|
+
form_params = opts[:form_params] || {}
|
874
|
+
|
875
|
+
# http body (model)
|
876
|
+
post_body = opts[:debug_body]
|
877
|
+
|
878
|
+
# return_type
|
879
|
+
return_type = opts[:debug_return_type] || 'ConversationPermissionsResponse'
|
880
|
+
|
881
|
+
# auth_names
|
882
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
883
|
+
|
884
|
+
new_options = opts.merge(
|
885
|
+
:operation => :"ConversationApi.get_conversation_permissions",
|
886
|
+
:header_params => header_params,
|
887
|
+
:query_params => query_params,
|
888
|
+
:form_params => form_params,
|
889
|
+
:body => post_body,
|
890
|
+
:auth_names => auth_names,
|
891
|
+
:return_type => return_type
|
892
|
+
)
|
893
|
+
|
894
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
895
|
+
if @api_client.config.debugging
|
896
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_conversation_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
897
|
+
end
|
898
|
+
return data, status_code, headers
|
899
|
+
end
|
900
|
+
|
843
901
|
# Retrieve a conversation webchat queue statuses
|
844
902
|
# Retrieve a conversation webchat queue statuses including agent status and queue entries
|
845
903
|
# @param [Hash] opts the optional parameters
|
@@ -21,8 +21,6 @@ module UltracartClient
|
|
21
21
|
|
22
22
|
attr_accessor :metadata
|
23
23
|
|
24
|
-
attr_accessor :read_only
|
25
|
-
|
26
24
|
# Indicates if API call was successful
|
27
25
|
attr_accessor :success
|
28
26
|
|
@@ -34,7 +32,6 @@ module UltracartClient
|
|
34
32
|
:'conversation_departments' => :'conversation_departments',
|
35
33
|
:'error' => :'error',
|
36
34
|
:'metadata' => :'metadata',
|
37
|
-
:'read_only' => :'read_only',
|
38
35
|
:'success' => :'success',
|
39
36
|
:'warning' => :'warning'
|
40
37
|
}
|
@@ -51,7 +48,6 @@ module UltracartClient
|
|
51
48
|
:'conversation_departments' => :'Array<ConversationDepartment>',
|
52
49
|
:'error' => :'Error',
|
53
50
|
:'metadata' => :'ResponseMetadata',
|
54
|
-
:'read_only' => :'Boolean',
|
55
51
|
:'success' => :'Boolean',
|
56
52
|
:'warning' => :'Warning'
|
57
53
|
}
|
@@ -92,10 +88,6 @@ module UltracartClient
|
|
92
88
|
self.metadata = attributes[:'metadata']
|
93
89
|
end
|
94
90
|
|
95
|
-
if attributes.key?(:'read_only')
|
96
|
-
self.read_only = attributes[:'read_only']
|
97
|
-
end
|
98
|
-
|
99
91
|
if attributes.key?(:'success')
|
100
92
|
self.success = attributes[:'success']
|
101
93
|
end
|
@@ -126,7 +118,6 @@ module UltracartClient
|
|
126
118
|
conversation_departments == o.conversation_departments &&
|
127
119
|
error == o.error &&
|
128
120
|
metadata == o.metadata &&
|
129
|
-
read_only == o.read_only &&
|
130
121
|
success == o.success &&
|
131
122
|
warning == o.warning
|
132
123
|
end
|
@@ -140,7 +131,7 @@ module UltracartClient
|
|
140
131
|
# Calculates hash code according to all attributes.
|
141
132
|
# @return [Integer] Hash code
|
142
133
|
def hash
|
143
|
-
[conversation_departments, error, metadata,
|
134
|
+
[conversation_departments, error, metadata, success, warning].hash
|
144
135
|
end
|
145
136
|
|
146
137
|
# Builds the object from hash
|
@@ -0,0 +1,219 @@
|
|
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 ConversationPermissions
|
18
|
+
attr_accessor :edit_settings
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'edit_settings' => :'edit_settings'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'edit_settings' => :'Boolean'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPermissions` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPermissions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'edit_settings')
|
61
|
+
self.edit_settings = attributes[:'edit_settings']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
edit_settings == o.edit_settings
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[edit_settings].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = UltracartClient.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
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 ConversationPermissionsResponse
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
attr_accessor :metadata
|
21
|
+
|
22
|
+
attr_accessor :permissions
|
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
|
+
:'error' => :'error',
|
33
|
+
:'metadata' => :'metadata',
|
34
|
+
:'permissions' => :'permissions',
|
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
|
+
:'error' => :'Error',
|
49
|
+
:'metadata' => :'ResponseMetadata',
|
50
|
+
:'permissions' => :'ConversationPermissions',
|
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::ConversationPermissionsResponse` 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::ConversationPermissionsResponse`. 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?(:'error')
|
78
|
+
self.error = attributes[:'error']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'metadata')
|
82
|
+
self.metadata = attributes[:'metadata']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'permissions')
|
86
|
+
self.permissions = attributes[:'permissions']
|
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
|
+
error == o.error &&
|
117
|
+
metadata == o.metadata &&
|
118
|
+
permissions == o.permissions &&
|
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
|
+
[error, metadata, permissions, success, warning].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def self.build_from_hash(attributes)
|
139
|
+
new.build_from_hash(attributes)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
150
|
+
self.send("#{key}=", nil)
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = UltracartClient.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -176,6 +176,8 @@ require 'ultracart_api/models/conversation_messages_response'
|
|
176
176
|
require 'ultracart_api/models/conversation_multimedia_upload_url'
|
177
177
|
require 'ultracart_api/models/conversation_multimedia_upload_url_response'
|
178
178
|
require 'ultracart_api/models/conversation_participant'
|
179
|
+
require 'ultracart_api/models/conversation_permissions'
|
180
|
+
require 'ultracart_api/models/conversation_permissions_response'
|
179
181
|
require 'ultracart_api/models/conversation_response'
|
180
182
|
require 'ultracart_api/models/conversation_search_request'
|
181
183
|
require 'ultracart_api/models/conversation_search_response'
|
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.
|
4
|
+
version: 4.0.119.rc
|
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-
|
11
|
+
date: 2023-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -226,6 +226,8 @@ files:
|
|
226
226
|
- docs/ConversationMultimediaUploadUrl.md
|
227
227
|
- docs/ConversationMultimediaUploadUrlResponse.md
|
228
228
|
- docs/ConversationParticipant.md
|
229
|
+
- docs/ConversationPermissions.md
|
230
|
+
- docs/ConversationPermissionsResponse.md
|
229
231
|
- docs/ConversationResponse.md
|
230
232
|
- docs/ConversationSearchRequest.md
|
231
233
|
- docs/ConversationSearchResponse.md
|
@@ -991,6 +993,8 @@ files:
|
|
991
993
|
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|
992
994
|
- lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb
|
993
995
|
- lib/ultracart_api/models/conversation_participant.rb
|
996
|
+
- lib/ultracart_api/models/conversation_permissions.rb
|
997
|
+
- lib/ultracart_api/models/conversation_permissions_response.rb
|
994
998
|
- lib/ultracart_api/models/conversation_response.rb
|
995
999
|
- lib/ultracart_api/models/conversation_search_request.rb
|
996
1000
|
- lib/ultracart_api/models/conversation_search_response.rb
|