ultracart_api 4.1.150 → 4.1.152

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -2
  3. data/docs/ConversationAgentTestSessionJoinRequest.md +18 -0
  4. data/docs/ConversationAgentTestSessionRequest.md +24 -0
  5. data/docs/ConversationAgentTestSessionResponse.md +32 -0
  6. data/docs/ConversationApi.md +111 -0
  7. data/docs/ConversationCustomerAuth.md +30 -0
  8. data/docs/SfvbApi.md +111 -0
  9. data/docs/SfvbThemeAttribute.md +34 -0
  10. data/docs/SfvbThemeAttributeUpdate.md +24 -0
  11. data/docs/SfvbThemeAttributeUpdateRequest.md +18 -0
  12. data/docs/SfvbThemeAttributesResponse.md +24 -0
  13. data/docs/SfvbThemeFont.md +22 -0
  14. data/docs/SfvbThemeFontFamily.md +22 -0
  15. data/lib/ultracart_api/api/conversation_api.rb +156 -0
  16. data/lib/ultracart_api/api/sfvb_api.rb +151 -0
  17. data/lib/ultracart_api/models/conversation_agent_test_session_join_request.rb +220 -0
  18. data/lib/ultracart_api/models/conversation_agent_test_session_request.rb +250 -0
  19. data/lib/ultracart_api/models/conversation_agent_test_session_response.rb +285 -0
  20. data/lib/ultracart_api/models/conversation_customer_auth.rb +273 -0
  21. data/lib/ultracart_api/models/sfvb_theme_attribute.rb +333 -0
  22. data/lib/ultracart_api/models/sfvb_theme_attribute_update.rb +283 -0
  23. data/lib/ultracart_api/models/sfvb_theme_attribute_update_request.rb +222 -0
  24. data/lib/ultracart_api/models/sfvb_theme_attributes_response.rb +252 -0
  25. data/lib/ultracart_api/models/sfvb_theme_font.rb +242 -0
  26. data/lib/ultracart_api/models/sfvb_theme_font_family.rb +274 -0
  27. data/lib/ultracart_api/version.rb +1 -1
  28. data/lib/ultracart_api.rb +10 -0
  29. metadata +22 -2
@@ -0,0 +1,250 @@
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 ConversationAgentTestSessionRequest
18
+ # Customer profile to converse as. The cart is established as a soft login for this customer, so the agent sees their real order history.
19
+ attr_accessor :customer_profile_oid
20
+
21
+ # Optional opening question, the same way a customer types one before joining the queue.
22
+ attr_accessor :question
23
+
24
+ # Webchat queue to join. The agent is selected explicitly, so this does not have to be a queue the agent is assigned to.
25
+ attr_accessor :queue_name
26
+
27
+ # Host name of the storefront to test against, with no protocol prefix. Determines which catalog the agent searches.
28
+ attr_accessor :storefront_host_name
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'customer_profile_oid' => :'customer_profile_oid',
34
+ :'question' => :'question',
35
+ :'queue_name' => :'queue_name',
36
+ :'storefront_host_name' => :'storefront_host_name'
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
+ :'customer_profile_oid' => :'Integer',
49
+ :'question' => :'String',
50
+ :'queue_name' => :'String',
51
+ :'storefront_host_name' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationAgentTestSessionRequest` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationAgentTestSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'customer_profile_oid')
77
+ self.customer_profile_oid = attributes[:'customer_profile_oid']
78
+ end
79
+
80
+ if attributes.key?(:'question')
81
+ self.question = attributes[:'question']
82
+ end
83
+
84
+ if attributes.key?(:'queue_name')
85
+ self.queue_name = attributes[:'queue_name']
86
+ end
87
+
88
+ if attributes.key?(:'storefront_host_name')
89
+ self.storefront_host_name = attributes[:'storefront_host_name']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ customer_profile_oid == o.customer_profile_oid &&
112
+ question == o.question &&
113
+ queue_name == o.queue_name &&
114
+ storefront_host_name == o.storefront_host_name
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [customer_profile_oid, question, queue_name, storefront_host_name].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ new.build_from_hash(attributes)
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ self.class.openapi_types.each_pair do |key, type|
143
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
+ self.send("#{key}=", nil)
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
149
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ end
151
+ elsif !attributes[self.class.attribute_map[key]].nil?
152
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ end
154
+ end
155
+
156
+ self
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def _deserialize(type, value)
164
+ case type.to_sym
165
+ when :Time
166
+ Time.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :Boolean
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ # models (e.g. Pet) or oneOf
197
+ klass = UltracartClient.const_get(type)
198
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ # Outputs non-array value in the form of hash
231
+ # For object, use to_hash. Otherwise, just return the value
232
+ # @param [Object] value Any valid value
233
+ # @return [Hash] Returns the value in the form of hash
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map { |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+
248
+ end
249
+
250
+ end
@@ -0,0 +1,285 @@
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 ConversationAgentTestSessionResponse
18
+ # Cart established for this session, soft logged in as the chosen customer profile. Real, and anything the agent adds to it persists.
19
+ attr_accessor :cart_id
20
+
21
+ # Queue entry created for this session
22
+ attr_accessor :conversation_webchat_queue_uuid
23
+
24
+ attr_accessor :customer_auth
25
+
26
+ attr_accessor :error
27
+
28
+ attr_accessor :metadata
29
+
30
+ # Storefront the session is running against
31
+ attr_accessor :storefront_host_name
32
+
33
+ attr_accessor :success
34
+
35
+ attr_accessor :warning
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'cart_id' => :'cart_id',
41
+ :'conversation_webchat_queue_uuid' => :'conversation_webchat_queue_uuid',
42
+ :'customer_auth' => :'customer_auth',
43
+ :'error' => :'error',
44
+ :'metadata' => :'metadata',
45
+ :'storefront_host_name' => :'storefront_host_name',
46
+ :'success' => :'success',
47
+ :'warning' => :'warning'
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'cart_id' => :'String',
60
+ :'conversation_webchat_queue_uuid' => :'String',
61
+ :'customer_auth' => :'ConversationCustomerAuth',
62
+ :'error' => :'Error',
63
+ :'metadata' => :'ResponseMetadata',
64
+ :'storefront_host_name' => :'String',
65
+ :'success' => :'Boolean',
66
+ :'warning' => :'Warning'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationAgentTestSessionResponse` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationAgentTestSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'cart_id')
92
+ self.cart_id = attributes[:'cart_id']
93
+ end
94
+
95
+ if attributes.key?(:'conversation_webchat_queue_uuid')
96
+ self.conversation_webchat_queue_uuid = attributes[:'conversation_webchat_queue_uuid']
97
+ end
98
+
99
+ if attributes.key?(:'customer_auth')
100
+ self.customer_auth = attributes[:'customer_auth']
101
+ end
102
+
103
+ if attributes.key?(:'error')
104
+ self.error = attributes[:'error']
105
+ end
106
+
107
+ if attributes.key?(:'metadata')
108
+ self.metadata = attributes[:'metadata']
109
+ end
110
+
111
+ if attributes.key?(:'storefront_host_name')
112
+ self.storefront_host_name = attributes[:'storefront_host_name']
113
+ end
114
+
115
+ if attributes.key?(:'success')
116
+ self.success = attributes[:'success']
117
+ end
118
+
119
+ if attributes.key?(:'warning')
120
+ self.warning = attributes[:'warning']
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ invalid_properties = Array.new
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ true
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ cart_id == o.cart_id &&
143
+ conversation_webchat_queue_uuid == o.conversation_webchat_queue_uuid &&
144
+ customer_auth == o.customer_auth &&
145
+ error == o.error &&
146
+ metadata == o.metadata &&
147
+ storefront_host_name == o.storefront_host_name &&
148
+ success == o.success &&
149
+ warning == o.warning
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [cart_id, conversation_webchat_queue_uuid, customer_auth, error, metadata, storefront_host_name, success, warning].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ new.build_from_hash(attributes)
169
+ end
170
+
171
+ # Builds the object from hash
172
+ # @param [Hash] attributes Model attributes in the form of hash
173
+ # @return [Object] Returns the model itself
174
+ def build_from_hash(attributes)
175
+ return nil unless attributes.is_a?(Hash)
176
+ attributes = attributes.transform_keys(&:to_sym)
177
+ self.class.openapi_types.each_pair do |key, type|
178
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
179
+ self.send("#{key}=", nil)
180
+ elsif type =~ /\AArray<(.*)>/i
181
+ # check to ensure the input is an array given that the attribute
182
+ # is documented as an array but the input is not
183
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
184
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
185
+ end
186
+ elsif !attributes[self.class.attribute_map[key]].nil?
187
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
+ end
189
+ end
190
+
191
+ self
192
+ end
193
+
194
+ # Deserializes the data based on type
195
+ # @param string type Data type
196
+ # @param string value Value to be deserialized
197
+ # @return [Object] Deserialized data
198
+ def _deserialize(type, value)
199
+ case type.to_sym
200
+ when :Time
201
+ Time.parse(value)
202
+ when :Date
203
+ Date.parse(value)
204
+ when :String
205
+ value.to_s
206
+ when :Integer
207
+ value.to_i
208
+ when :Float
209
+ value.to_f
210
+ when :Boolean
211
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
212
+ true
213
+ else
214
+ false
215
+ end
216
+ when :Object
217
+ # generic object (usually a Hash), return directly
218
+ value
219
+ when /\AArray<(?<inner_type>.+)>\z/
220
+ inner_type = Regexp.last_match[:inner_type]
221
+ value.map { |v| _deserialize(inner_type, v) }
222
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
223
+ k_type = Regexp.last_match[:k_type]
224
+ v_type = Regexp.last_match[:v_type]
225
+ {}.tap do |hash|
226
+ value.each do |k, v|
227
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
228
+ end
229
+ end
230
+ else # model
231
+ # models (e.g. Pet) or oneOf
232
+ klass = UltracartClient.const_get(type)
233
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
234
+ end
235
+ end
236
+
237
+ # Returns the string representation of the object
238
+ # @return [String] String presentation of the object
239
+ def to_s
240
+ to_hash.to_s
241
+ end
242
+
243
+ # to_body is an alias to to_hash (backward compatibility)
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_body
246
+ to_hash
247
+ end
248
+
249
+ # Returns the object in the form of hash
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_hash
252
+ hash = {}
253
+ self.class.attribute_map.each_pair do |attr, param|
254
+ value = self.send(attr)
255
+ if value.nil?
256
+ is_nullable = self.class.openapi_nullable.include?(attr)
257
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
258
+ end
259
+
260
+ hash[param] = _to_hash(value)
261
+ end
262
+ hash
263
+ end
264
+
265
+ # Outputs non-array value in the form of hash
266
+ # For object, use to_hash. Otherwise, just return the value
267
+ # @param [Object] value Any valid value
268
+ # @return [Hash] Returns the value in the form of hash
269
+ def _to_hash(value)
270
+ if value.is_a?(Array)
271
+ value.compact.map { |v| _to_hash(v) }
272
+ elsif value.is_a?(Hash)
273
+ {}.tap do |hash|
274
+ value.each { |k, v| hash[k] = _to_hash(v) }
275
+ end
276
+ elsif value.respond_to? :to_hash
277
+ value.to_hash
278
+ else
279
+ value
280
+ end
281
+ end
282
+
283
+ end
284
+
285
+ end