ultracart_api 4.1.22 → 4.1.24
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 +16 -2
- data/docs/ConversationApi.md +219 -0
- data/docs/ConversationDeleteKnowledgeBaseDocumentResponse.md +26 -0
- data/docs/ConversationInsertKnowledgeBaseDocumentRequest.md +18 -0
- data/docs/ConversationInsertKnowledgeBaseDocumentResponse.md +30 -0
- data/docs/ConversationKnowledgeBaseDocument.md +30 -0
- data/docs/ConversationKnowledgeBaseDocumentUploadUrl.md +20 -0
- data/docs/ConversationKnowledgeBaseDocumentUploadUrlResponse.md +26 -0
- data/docs/ConversationKnowledgeBaseDocumentsResponse.md +26 -0
- data/docs/ConversationVirtualAgentCapabilities.md +2 -0
- data/docs/CustomReportAccountConfig.md +2 -0
- data/docs/CustomReportUsageBreakdown.md +20 -0
- data/docs/CustomerApi.md +5 -5
- data/docs/CustomerLoyalty.md +6 -0
- data/lib/ultracart_api/api/conversation_api.rb +279 -0
- data/lib/ultracart_api/api/customer_api.rb +5 -5
- data/lib/ultracart_api/models/conversation_delete_knowledge_base_document_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_insert_knowledge_base_document_request.rb +219 -0
- data/lib/ultracart_api/models/conversation_insert_knowledge_base_document_response.rb +276 -0
- data/lib/ultracart_api/models/conversation_knowledge_base_document.rb +274 -0
- data/lib/ultracart_api/models/conversation_knowledge_base_document_upload_url.rb +228 -0
- data/lib/ultracart_api/models/conversation_knowledge_base_document_upload_url_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_knowledge_base_documents_response.rb +259 -0
- data/lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb +11 -1
- data/lib/ultracart_api/models/custom_report_account_config.rb +12 -1
- data/lib/ultracart_api/models/custom_report_usage_breakdown.rb +229 -0
- data/lib/ultracart_api/models/customer_loyalty.rb +31 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
|
@@ -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 ConversationKnowledgeBaseDocumentUploadUrlResponse
|
|
18
|
+
attr_accessor :conversation_pbx_audio_upload_url
|
|
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
|
+
:'conversation_pbx_audio_upload_url' => :'conversation_pbx_audio_upload_url',
|
|
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
|
+
:'conversation_pbx_audio_upload_url' => :'ConversationKnowledgeBaseDocumentUploadUrl',
|
|
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::ConversationKnowledgeBaseDocumentUploadUrlResponse` 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::ConversationKnowledgeBaseDocumentUploadUrlResponse`. 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?(:'conversation_pbx_audio_upload_url')
|
|
78
|
+
self.conversation_pbx_audio_upload_url = attributes[:'conversation_pbx_audio_upload_url']
|
|
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
|
+
conversation_pbx_audio_upload_url == o.conversation_pbx_audio_upload_url &&
|
|
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
|
+
[conversation_pbx_audio_upload_url, 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
|
|
@@ -0,0 +1,259 @@
|
|
|
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 ConversationKnowledgeBaseDocumentsResponse
|
|
18
|
+
# documents
|
|
19
|
+
attr_accessor :documents
|
|
20
|
+
|
|
21
|
+
attr_accessor :error
|
|
22
|
+
|
|
23
|
+
attr_accessor :metadata
|
|
24
|
+
|
|
25
|
+
# Indicates if API call was successful
|
|
26
|
+
attr_accessor :success
|
|
27
|
+
|
|
28
|
+
attr_accessor :warning
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'documents' => :'documents',
|
|
34
|
+
:'error' => :'error',
|
|
35
|
+
:'metadata' => :'metadata',
|
|
36
|
+
:'success' => :'success',
|
|
37
|
+
:'warning' => :'warning'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'documents' => :'Array<ConversationKnowledgeBaseDocument>',
|
|
50
|
+
:'error' => :'Error',
|
|
51
|
+
:'metadata' => :'ResponseMetadata',
|
|
52
|
+
:'success' => :'Boolean',
|
|
53
|
+
:'warning' => :'Warning'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationKnowledgeBaseDocumentsResponse` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationKnowledgeBaseDocumentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'documents')
|
|
79
|
+
if (value = attributes[:'documents']).is_a?(Array)
|
|
80
|
+
self.documents = value
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'error')
|
|
85
|
+
self.error = attributes[:'error']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'metadata')
|
|
89
|
+
self.metadata = attributes[:'metadata']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'success')
|
|
93
|
+
self.success = attributes[:'success']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'warning')
|
|
97
|
+
self.warning = attributes[:'warning']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
invalid_properties = Array.new
|
|
105
|
+
invalid_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Check to see if the all the properties in the model are valid
|
|
109
|
+
# @return true if the model is valid
|
|
110
|
+
def valid?
|
|
111
|
+
true
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Checks equality by comparing each attribute.
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def ==(o)
|
|
117
|
+
return true if self.equal?(o)
|
|
118
|
+
self.class == o.class &&
|
|
119
|
+
documents == o.documents &&
|
|
120
|
+
error == o.error &&
|
|
121
|
+
metadata == o.metadata &&
|
|
122
|
+
success == o.success &&
|
|
123
|
+
warning == o.warning
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# @see the `==` method
|
|
127
|
+
# @param [Object] Object to be compared
|
|
128
|
+
def eql?(o)
|
|
129
|
+
self == o
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Calculates hash code according to all attributes.
|
|
133
|
+
# @return [Integer] Hash code
|
|
134
|
+
def hash
|
|
135
|
+
[documents, error, metadata, success, warning].hash
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Builds the object from hash
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
# @return [Object] Returns the model itself
|
|
141
|
+
def self.build_from_hash(attributes)
|
|
142
|
+
new.build_from_hash(attributes)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Builds the object from hash
|
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
147
|
+
# @return [Object] Returns the model itself
|
|
148
|
+
def build_from_hash(attributes)
|
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
152
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
153
|
+
self.send("#{key}=", nil)
|
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
155
|
+
# check to ensure the input is an array given that the attribute
|
|
156
|
+
# is documented as an array but the input is not
|
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
159
|
+
end
|
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
self
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Deserializes the data based on type
|
|
169
|
+
# @param string type Data type
|
|
170
|
+
# @param string value Value to be deserialized
|
|
171
|
+
# @return [Object] Deserialized data
|
|
172
|
+
def _deserialize(type, value)
|
|
173
|
+
case type.to_sym
|
|
174
|
+
when :Time
|
|
175
|
+
Time.parse(value)
|
|
176
|
+
when :Date
|
|
177
|
+
Date.parse(value)
|
|
178
|
+
when :String
|
|
179
|
+
value.to_s
|
|
180
|
+
when :Integer
|
|
181
|
+
value.to_i
|
|
182
|
+
when :Float
|
|
183
|
+
value.to_f
|
|
184
|
+
when :Boolean
|
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
186
|
+
true
|
|
187
|
+
else
|
|
188
|
+
false
|
|
189
|
+
end
|
|
190
|
+
when :Object
|
|
191
|
+
# generic object (usually a Hash), return directly
|
|
192
|
+
value
|
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
|
199
|
+
{}.tap do |hash|
|
|
200
|
+
value.each do |k, v|
|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
else # model
|
|
205
|
+
# models (e.g. Pet) or oneOf
|
|
206
|
+
klass = UltracartClient.const_get(type)
|
|
207
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Returns the string representation of the object
|
|
212
|
+
# @return [String] String presentation of the object
|
|
213
|
+
def to_s
|
|
214
|
+
to_hash.to_s
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
|
219
|
+
def to_body
|
|
220
|
+
to_hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Returns the object in the form of hash
|
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
|
225
|
+
def to_hash
|
|
226
|
+
hash = {}
|
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
228
|
+
value = self.send(attr)
|
|
229
|
+
if value.nil?
|
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
hash[param] = _to_hash(value)
|
|
235
|
+
end
|
|
236
|
+
hash
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Outputs non-array value in the form of hash
|
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
241
|
+
# @param [Object] value Any valid value
|
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
|
243
|
+
def _to_hash(value)
|
|
244
|
+
if value.is_a?(Array)
|
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
|
246
|
+
elsif value.is_a?(Hash)
|
|
247
|
+
{}.tap do |hash|
|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
249
|
+
end
|
|
250
|
+
elsif value.respond_to? :to_hash
|
|
251
|
+
value.to_hash
|
|
252
|
+
else
|
|
253
|
+
value
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
end
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module UltracartClient
|
|
17
17
|
class ConversationVirtualAgentCapabilities
|
|
18
|
+
# Permission flag to allow this Agent access to the storefront and item information.
|
|
19
|
+
attr_accessor :access_storefront_and_item
|
|
20
|
+
|
|
18
21
|
attr_accessor :cancel_subscription
|
|
19
22
|
|
|
20
23
|
attr_accessor :delay_subscription
|
|
@@ -73,6 +76,7 @@ module UltracartClient
|
|
|
73
76
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
77
|
def self.attribute_map
|
|
75
78
|
{
|
|
79
|
+
:'access_storefront_and_item' => :'access_storefront_and_item',
|
|
76
80
|
:'cancel_subscription' => :'cancel_subscription',
|
|
77
81
|
:'delay_subscription' => :'delay_subscription',
|
|
78
82
|
:'lookup_order_information' => :'lookup_order_information',
|
|
@@ -98,6 +102,7 @@ module UltracartClient
|
|
|
98
102
|
# Attribute type mapping.
|
|
99
103
|
def self.openapi_types
|
|
100
104
|
{
|
|
105
|
+
:'access_storefront_and_item' => :'Boolean',
|
|
101
106
|
:'cancel_subscription' => :'Boolean',
|
|
102
107
|
:'delay_subscription' => :'Boolean',
|
|
103
108
|
:'lookup_order_information' => :'Boolean',
|
|
@@ -136,6 +141,10 @@ module UltracartClient
|
|
|
136
141
|
h[k.to_sym] = v
|
|
137
142
|
}
|
|
138
143
|
|
|
144
|
+
if attributes.key?(:'access_storefront_and_item')
|
|
145
|
+
self.access_storefront_and_item = attributes[:'access_storefront_and_item']
|
|
146
|
+
end
|
|
147
|
+
|
|
139
148
|
if attributes.key?(:'cancel_subscription')
|
|
140
149
|
self.cancel_subscription = attributes[:'cancel_subscription']
|
|
141
150
|
end
|
|
@@ -225,6 +234,7 @@ module UltracartClient
|
|
|
225
234
|
def ==(o)
|
|
226
235
|
return true if self.equal?(o)
|
|
227
236
|
self.class == o.class &&
|
|
237
|
+
access_storefront_and_item == o.access_storefront_and_item &&
|
|
228
238
|
cancel_subscription == o.cancel_subscription &&
|
|
229
239
|
delay_subscription == o.delay_subscription &&
|
|
230
240
|
lookup_order_information == o.lookup_order_information &&
|
|
@@ -250,7 +260,7 @@ module UltracartClient
|
|
|
250
260
|
# Calculates hash code according to all attributes.
|
|
251
261
|
# @return [Integer] Hash code
|
|
252
262
|
def hash
|
|
253
|
-
[cancel_subscription, delay_subscription, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, open_support_ticket_zoho_desk_department_id, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card, zoho_desk_available, zoho_desk_departments].hash
|
|
263
|
+
[access_storefront_and_item, cancel_subscription, delay_subscription, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, open_support_ticket_zoho_desk_department_id, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card, zoho_desk_available, zoho_desk_departments].hash
|
|
254
264
|
end
|
|
255
265
|
|
|
256
266
|
# Builds the object from hash
|
|
@@ -20,6 +20,8 @@ module UltracartClient
|
|
|
20
20
|
# Current AI usage creating reports
|
|
21
21
|
attr_accessor :ai_usage
|
|
22
22
|
|
|
23
|
+
attr_accessor :ai_usage_breakdowns
|
|
24
|
+
|
|
23
25
|
# Current BigQuery SQL usage running reports
|
|
24
26
|
attr_accessor :merchant_id
|
|
25
27
|
|
|
@@ -45,6 +47,7 @@ module UltracartClient
|
|
|
45
47
|
{
|
|
46
48
|
:'ai_budget' => :'ai_budget',
|
|
47
49
|
:'ai_usage' => :'ai_usage',
|
|
50
|
+
:'ai_usage_breakdowns' => :'ai_usage_breakdowns',
|
|
48
51
|
:'merchant_id' => :'merchant_id',
|
|
49
52
|
:'novice_sql_comments' => :'novice_sql_comments',
|
|
50
53
|
:'opt_in' => :'opt_in',
|
|
@@ -66,6 +69,7 @@ module UltracartClient
|
|
|
66
69
|
{
|
|
67
70
|
:'ai_budget' => :'Float',
|
|
68
71
|
:'ai_usage' => :'Float',
|
|
72
|
+
:'ai_usage_breakdowns' => :'Array<CustomReportUsageBreakdown>',
|
|
69
73
|
:'merchant_id' => :'String',
|
|
70
74
|
:'novice_sql_comments' => :'Boolean',
|
|
71
75
|
:'opt_in' => :'Boolean',
|
|
@@ -106,6 +110,12 @@ module UltracartClient
|
|
|
106
110
|
self.ai_usage = attributes[:'ai_usage']
|
|
107
111
|
end
|
|
108
112
|
|
|
113
|
+
if attributes.key?(:'ai_usage_breakdowns')
|
|
114
|
+
if (value = attributes[:'ai_usage_breakdowns']).is_a?(Array)
|
|
115
|
+
self.ai_usage_breakdowns = value
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
109
119
|
if attributes.key?(:'merchant_id')
|
|
110
120
|
self.merchant_id = attributes[:'merchant_id']
|
|
111
121
|
end
|
|
@@ -159,6 +169,7 @@ module UltracartClient
|
|
|
159
169
|
self.class == o.class &&
|
|
160
170
|
ai_budget == o.ai_budget &&
|
|
161
171
|
ai_usage == o.ai_usage &&
|
|
172
|
+
ai_usage_breakdowns == o.ai_usage_breakdowns &&
|
|
162
173
|
merchant_id == o.merchant_id &&
|
|
163
174
|
novice_sql_comments == o.novice_sql_comments &&
|
|
164
175
|
opt_in == o.opt_in &&
|
|
@@ -178,7 +189,7 @@ module UltracartClient
|
|
|
178
189
|
# Calculates hash code according to all attributes.
|
|
179
190
|
# @return [Integer] Hash code
|
|
180
191
|
def hash
|
|
181
|
-
[ai_budget, ai_usage, merchant_id, novice_sql_comments, opt_in, opt_in_by_user, opt_in_date, read_only, sql_budget, sql_usage].hash
|
|
192
|
+
[ai_budget, ai_usage, ai_usage_breakdowns, merchant_id, novice_sql_comments, opt_in, opt_in_by_user, opt_in_date, read_only, sql_budget, sql_usage].hash
|
|
182
193
|
end
|
|
183
194
|
|
|
184
195
|
# Builds the object from hash
|