ultracart_api 3.10.37 → 3.10.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/docs/CartMarketing.md +1 -0
- data/docs/ConversationParticipant.md +1 -0
- data/docs/ConversationWebchatQueueStatusAgent.md +2 -1
- data/docs/CustomerApi.md +54 -0
- data/docs/CustomerMagicLinkResponse.md +12 -0
- data/docs/ItemReview.md +44 -0
- data/docs/ItemReviews.md +1 -0
- data/docs/OrderBilling.md +2 -0
- data/docs/OrderMarketing.md +1 -0
- data/docs/StoreFront.md +18 -0
- data/docs/StoreFrontsResponse.md +12 -0
- data/docs/StorefrontApi.md +44 -0
- data/lib/ultracart_api/api/customer_api.rb +61 -0
- data/lib/ultracart_api/api/storefront_api.rb +47 -0
- data/lib/ultracart_api/models/cart_marketing.rb +11 -1
- data/lib/ultracart_api/models/conversation_participant.rb +10 -1
- data/lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb +49 -4
- data/lib/ultracart_api/models/customer_magic_link_response.rb +222 -0
- data/lib/ultracart_api/models/item_review.rb +510 -0
- data/lib/ultracart_api/models/item_reviews.rb +12 -1
- data/lib/ultracart_api/models/order_billing.rb +51 -1
- data/lib/ultracart_api/models/order_marketing.rb +11 -1
- data/lib/ultracart_api/models/store_front.rb +274 -0
- data/lib/ultracart_api/models/store_fronts_response.rb +223 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
@@ -14,6 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module UltracartClient
|
16
16
|
class ConversationWebchatQueueStatusAgent
|
17
|
+
# Status of the agent
|
17
18
|
attr_accessor :agent_status
|
18
19
|
|
19
20
|
attr_accessor :conversation_participant_arn
|
@@ -25,6 +26,31 @@ module UltracartClient
|
|
25
26
|
|
26
27
|
attr_accessor :next_round_robin
|
27
28
|
|
29
|
+
# Profile image URL
|
30
|
+
attr_accessor :profile_image_url
|
31
|
+
|
32
|
+
class EnumAttributeValidator
|
33
|
+
attr_reader :datatype
|
34
|
+
attr_reader :allowable_values
|
35
|
+
|
36
|
+
def initialize(datatype, allowable_values)
|
37
|
+
@allowable_values = allowable_values.map do |value|
|
38
|
+
case datatype.to_s
|
39
|
+
when /Integer/i
|
40
|
+
value.to_i
|
41
|
+
when /Float/i
|
42
|
+
value.to_f
|
43
|
+
else
|
44
|
+
value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def valid?(value)
|
50
|
+
!value || allowable_values.include?(value)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
28
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
55
|
def self.attribute_map
|
30
56
|
{
|
@@ -32,7 +58,8 @@ module UltracartClient
|
|
32
58
|
:'conversation_participant_arn' => :'conversation_participant_arn',
|
33
59
|
:'conversation_participant_name' => :'conversation_participant_name',
|
34
60
|
:'last_chat_dts' => :'last_chat_dts',
|
35
|
-
:'next_round_robin' => :'next_round_robin'
|
61
|
+
:'next_round_robin' => :'next_round_robin',
|
62
|
+
:'profile_image_url' => :'profile_image_url'
|
36
63
|
}
|
37
64
|
end
|
38
65
|
|
@@ -43,7 +70,8 @@ module UltracartClient
|
|
43
70
|
:'conversation_participant_arn' => :'String',
|
44
71
|
:'conversation_participant_name' => :'String',
|
45
72
|
:'last_chat_dts' => :'String',
|
46
|
-
:'next_round_robin' => :'BOOLEAN'
|
73
|
+
:'next_round_robin' => :'BOOLEAN',
|
74
|
+
:'profile_image_url' => :'String'
|
47
75
|
}
|
48
76
|
end
|
49
77
|
|
@@ -74,6 +102,10 @@ module UltracartClient
|
|
74
102
|
if attributes.has_key?(:'next_round_robin')
|
75
103
|
self.next_round_robin = attributes[:'next_round_robin']
|
76
104
|
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'profile_image_url')
|
107
|
+
self.profile_image_url = attributes[:'profile_image_url']
|
108
|
+
end
|
77
109
|
end
|
78
110
|
|
79
111
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -86,9 +118,21 @@ module UltracartClient
|
|
86
118
|
# Check to see if the all the properties in the model are valid
|
87
119
|
# @return true if the model is valid
|
88
120
|
def valid?
|
121
|
+
agent_status_validator = EnumAttributeValidator.new('String', ['available', 'busy', 'unavailable'])
|
122
|
+
return false unless agent_status_validator.valid?(@agent_status)
|
89
123
|
true
|
90
124
|
end
|
91
125
|
|
126
|
+
# Custom attribute writer method checking allowed values (enum).
|
127
|
+
# @param [Object] agent_status Object to be assigned
|
128
|
+
def agent_status=(agent_status)
|
129
|
+
validator = EnumAttributeValidator.new('String', ['available', 'busy', 'unavailable'])
|
130
|
+
unless validator.valid?(agent_status)
|
131
|
+
fail ArgumentError, 'invalid value for "agent_status", must be one of #{validator.allowable_values}.'
|
132
|
+
end
|
133
|
+
@agent_status = agent_status
|
134
|
+
end
|
135
|
+
|
92
136
|
# Checks equality by comparing each attribute.
|
93
137
|
# @param [Object] Object to be compared
|
94
138
|
def ==(o)
|
@@ -98,7 +142,8 @@ module UltracartClient
|
|
98
142
|
conversation_participant_arn == o.conversation_participant_arn &&
|
99
143
|
conversation_participant_name == o.conversation_participant_name &&
|
100
144
|
last_chat_dts == o.last_chat_dts &&
|
101
|
-
next_round_robin == o.next_round_robin
|
145
|
+
next_round_robin == o.next_round_robin &&
|
146
|
+
profile_image_url == o.profile_image_url
|
102
147
|
end
|
103
148
|
|
104
149
|
# @see the `==` method
|
@@ -110,7 +155,7 @@ module UltracartClient
|
|
110
155
|
# Calculates hash code according to all attributes.
|
111
156
|
# @return [Fixnum] Hash code
|
112
157
|
def hash
|
113
|
-
[agent_status, conversation_participant_arn, conversation_participant_name, last_chat_dts, next_round_robin].hash
|
158
|
+
[agent_status, conversation_participant_arn, conversation_participant_name, last_chat_dts, next_round_robin, profile_image_url].hash
|
114
159
|
end
|
115
160
|
|
116
161
|
# Builds the object from hash
|
@@ -0,0 +1,222 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class CustomerMagicLinkResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# Indicates if API call was successful
|
22
|
+
attr_accessor :success
|
23
|
+
|
24
|
+
# URL
|
25
|
+
attr_accessor :url
|
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
|
+
:'success' => :'success',
|
35
|
+
:'url' => :'url',
|
36
|
+
:'warning' => :'warning'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'error' => :'Error',
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
45
|
+
:'success' => :'BOOLEAN',
|
46
|
+
:'url' => :'String',
|
47
|
+
:'warning' => :'Warning'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'error')
|
60
|
+
self.error = attributes[:'error']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.has_key?(:'metadata')
|
64
|
+
self.metadata = attributes[:'metadata']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'success')
|
68
|
+
self.success = attributes[:'success']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'url')
|
72
|
+
self.url = attributes[:'url']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'warning')
|
76
|
+
self.warning = attributes[:'warning']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
invalid_properties
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
error == o.error &&
|
99
|
+
metadata == o.metadata &&
|
100
|
+
success == o.success &&
|
101
|
+
url == o.url &&
|
102
|
+
warning == o.warning
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Fixnum] Hash code
|
113
|
+
def hash
|
114
|
+
[error, metadata, success, url, warning].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def build_from_hash(attributes)
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
123
|
+
if type =~ /\AArray<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Deserializes the data based on type
|
138
|
+
# @param string type Data type
|
139
|
+
# @param string value Value to be deserialized
|
140
|
+
# @return [Object] Deserialized data
|
141
|
+
def _deserialize(type, value)
|
142
|
+
case type.to_sym
|
143
|
+
when :DateTime
|
144
|
+
DateTime.parse(value)
|
145
|
+
when :Date
|
146
|
+
Date.parse(value)
|
147
|
+
when :String
|
148
|
+
value.to_s
|
149
|
+
when :Integer
|
150
|
+
value.to_i
|
151
|
+
when :Float
|
152
|
+
value.to_f
|
153
|
+
when :BOOLEAN
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
155
|
+
true
|
156
|
+
else
|
157
|
+
false
|
158
|
+
end
|
159
|
+
when :Object
|
160
|
+
# generic object (usually a Hash), return directly
|
161
|
+
value
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
168
|
+
{}.tap do |hash|
|
169
|
+
value.each do |k, v|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
else # model
|
174
|
+
temp_model = UltracartClient.const_get(type).new
|
175
|
+
temp_model.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
next if value.nil?
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
222
|
+
end
|