ultracart_api 4.0.32.rc → 4.0.35.rc

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -4
  3. data/docs/Activity.md +4 -0
  4. data/docs/AffiliateApi.md +16 -22
  5. data/docs/AutoOrderApi.md +64 -88
  6. data/docs/ChannelPartnerApi.md +40 -55
  7. data/docs/ChargebackApi.md +40 -55
  8. data/docs/CheckoutApi.md +152 -294
  9. data/docs/Conversation.md +26 -0
  10. data/docs/ConversationAgentAuthResponse.md +22 -0
  11. data/docs/ConversationApi.md +438 -0
  12. data/docs/ConversationMessage.md +26 -0
  13. data/docs/ConversationParticipant.md +30 -0
  14. data/docs/ConversationStartRequest.md +20 -0
  15. data/docs/ConversationStartResponse.md +20 -0
  16. data/docs/ConversationSummary.md +34 -0
  17. data/docs/ConversationsResponse.md +26 -0
  18. data/docs/CouponApi.md +152 -209
  19. data/docs/CustomerActivity.md +9 -1
  20. data/docs/CustomerApi.md +213 -192
  21. data/docs/CustomerMergeRequest.md +20 -0
  22. data/docs/FulfillmentApi.md +48 -66
  23. data/docs/GiftCertificateApi.md +64 -88
  24. data/docs/IntegrationLogApi.md +40 -55
  25. data/docs/ItemApi.md +72 -99
  26. data/docs/OauthApi.md +16 -32
  27. data/docs/OrderApi.md +184 -253
  28. data/docs/SsoApi.md +32 -44
  29. data/docs/StorefrontApi.md +1134 -2345
  30. data/docs/TaxApi.md +224 -308
  31. data/docs/UserApi.md +88 -121
  32. data/docs/WebhookApi.md +64 -88
  33. data/lib/ultracart_api/api/conversation_api.rb +418 -0
  34. data/lib/ultracart_api/api/customer_api.rb +78 -0
  35. data/lib/ultracart_api/models/activity.rb +19 -1
  36. data/lib/ultracart_api/models/conversation.rb +259 -0
  37. data/lib/ultracart_api/models/conversation_agent_auth_response.rb +237 -0
  38. data/lib/ultracart_api/models/conversation_message.rb +258 -0
  39. data/lib/ultracart_api/models/conversation_participant.rb +276 -0
  40. data/lib/ultracart_api/models/conversation_start_request.rb +230 -0
  41. data/lib/ultracart_api/models/conversation_start_response.rb +228 -0
  42. data/lib/ultracart_api/models/conversation_summary.rb +292 -0
  43. data/lib/ultracart_api/models/conversations_response.rb +258 -0
  44. data/lib/ultracart_api/models/customer_activity.rb +40 -4
  45. data/lib/ultracart_api/models/customer_merge_request.rb +230 -0
  46. data/lib/ultracart_api/version.rb +1 -1
  47. data/lib/ultracart_api.rb +10 -0
  48. metadata +22 -2
@@ -0,0 +1,258 @@
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 ConversationMessage
18
+ attr_accessor :author_conversation_participant_arn
19
+
20
+ attr_accessor :author_conversation_participant_name
21
+
22
+ attr_accessor :body
23
+
24
+ attr_accessor :media_urls
25
+
26
+ # Message date/time
27
+ attr_accessor :message_dts
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'author_conversation_participant_arn' => :'author_conversation_participant_arn',
33
+ :'author_conversation_participant_name' => :'author_conversation_participant_name',
34
+ :'body' => :'body',
35
+ :'media_urls' => :'media_urls',
36
+ :'message_dts' => :'message_dts'
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
+ :'author_conversation_participant_arn' => :'String',
49
+ :'author_conversation_participant_name' => :'String',
50
+ :'body' => :'String',
51
+ :'media_urls' => :'Array<String>',
52
+ :'message_dts' => :'String'
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::ConversationMessage` 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::ConversationMessage`. 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?(:'author_conversation_participant_arn')
78
+ self.author_conversation_participant_arn = attributes[:'author_conversation_participant_arn']
79
+ end
80
+
81
+ if attributes.key?(:'author_conversation_participant_name')
82
+ self.author_conversation_participant_name = attributes[:'author_conversation_participant_name']
83
+ end
84
+
85
+ if attributes.key?(:'body')
86
+ self.body = attributes[:'body']
87
+ end
88
+
89
+ if attributes.key?(:'media_urls')
90
+ if (value = attributes[:'media_urls']).is_a?(Array)
91
+ self.media_urls = value
92
+ end
93
+ end
94
+
95
+ if attributes.key?(:'message_dts')
96
+ self.message_dts = attributes[:'message_dts']
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ invalid_properties = Array.new
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ author_conversation_participant_arn == o.author_conversation_participant_arn &&
119
+ author_conversation_participant_name == o.author_conversation_participant_name &&
120
+ body == o.body &&
121
+ media_urls == o.media_urls &&
122
+ message_dts == o.message_dts
123
+ end
124
+
125
+ # @see the `==` method
126
+ # @param [Object] Object to be compared
127
+ def eql?(o)
128
+ self == o
129
+ end
130
+
131
+ # Calculates hash code according to all attributes.
132
+ # @return [Integer] Hash code
133
+ def hash
134
+ [author_conversation_participant_arn, author_conversation_participant_name, body, media_urls, message_dts].hash
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def self.build_from_hash(attributes)
141
+ new.build_from_hash(attributes)
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
150
+ self.class.openapi_types.each_pair do |key, type|
151
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
152
+ self.send("#{key}=", nil)
153
+ elsif type =~ /\AArray<(.*)>/i
154
+ # check to ensure the input is an array given that the attribute
155
+ # is documented as an array but the input is not
156
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
157
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
158
+ end
159
+ elsif !attributes[self.class.attribute_map[key]].nil?
160
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
161
+ end
162
+ end
163
+
164
+ self
165
+ end
166
+
167
+ # Deserializes the data based on type
168
+ # @param string type Data type
169
+ # @param string value Value to be deserialized
170
+ # @return [Object] Deserialized data
171
+ def _deserialize(type, value)
172
+ case type.to_sym
173
+ when :Time
174
+ Time.parse(value)
175
+ when :Date
176
+ Date.parse(value)
177
+ when :String
178
+ value.to_s
179
+ when :Integer
180
+ value.to_i
181
+ when :Float
182
+ value.to_f
183
+ when :Boolean
184
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
185
+ true
186
+ else
187
+ false
188
+ end
189
+ when :Object
190
+ # generic object (usually a Hash), return directly
191
+ value
192
+ when /\AArray<(?<inner_type>.+)>\z/
193
+ inner_type = Regexp.last_match[:inner_type]
194
+ value.map { |v| _deserialize(inner_type, v) }
195
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
196
+ k_type = Regexp.last_match[:k_type]
197
+ v_type = Regexp.last_match[:v_type]
198
+ {}.tap do |hash|
199
+ value.each do |k, v|
200
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
201
+ end
202
+ end
203
+ else # model
204
+ # models (e.g. Pet) or oneOf
205
+ klass = UltracartClient.const_get(type)
206
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ end
@@ -0,0 +1,276 @@
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 ConversationParticipant
18
+ attr_accessor :conversation_participant_arn
19
+
20
+ attr_accessor :conversation_participant_name
21
+
22
+ attr_accessor :conversation_participant_uuid
23
+
24
+ # Joined conversation date/time
25
+ attr_accessor :joined_dts
26
+
27
+ # Last message date/time
28
+ attr_accessor :last_message_dts
29
+
30
+ # Left conversation date/time
31
+ attr_accessor :left_dts
32
+
33
+ attr_accessor :status
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'conversation_participant_arn' => :'conversation_participant_arn',
39
+ :'conversation_participant_name' => :'conversation_participant_name',
40
+ :'conversation_participant_uuid' => :'conversation_participant_uuid',
41
+ :'joined_dts' => :'joined_dts',
42
+ :'last_message_dts' => :'last_message_dts',
43
+ :'left_dts' => :'left_dts',
44
+ :'status' => :'status'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'conversation_participant_arn' => :'String',
57
+ :'conversation_participant_name' => :'String',
58
+ :'conversation_participant_uuid' => :'String',
59
+ :'joined_dts' => :'String',
60
+ :'last_message_dts' => :'String',
61
+ :'left_dts' => :'String',
62
+ :'status' => :'String'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationParticipant` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationParticipant`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'conversation_participant_arn')
88
+ self.conversation_participant_arn = attributes[:'conversation_participant_arn']
89
+ end
90
+
91
+ if attributes.key?(:'conversation_participant_name')
92
+ self.conversation_participant_name = attributes[:'conversation_participant_name']
93
+ end
94
+
95
+ if attributes.key?(:'conversation_participant_uuid')
96
+ self.conversation_participant_uuid = attributes[:'conversation_participant_uuid']
97
+ end
98
+
99
+ if attributes.key?(:'joined_dts')
100
+ self.joined_dts = attributes[:'joined_dts']
101
+ end
102
+
103
+ if attributes.key?(:'last_message_dts')
104
+ self.last_message_dts = attributes[:'last_message_dts']
105
+ end
106
+
107
+ if attributes.key?(:'left_dts')
108
+ self.left_dts = attributes[:'left_dts']
109
+ end
110
+
111
+ if attributes.key?(:'status')
112
+ self.status = attributes[:'status']
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ invalid_properties = Array.new
120
+ invalid_properties
121
+ end
122
+
123
+ # Check to see if the all the properties in the model are valid
124
+ # @return true if the model is valid
125
+ def valid?
126
+ true
127
+ end
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] Object to be compared
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ conversation_participant_arn == o.conversation_participant_arn &&
135
+ conversation_participant_name == o.conversation_participant_name &&
136
+ conversation_participant_uuid == o.conversation_participant_uuid &&
137
+ joined_dts == o.joined_dts &&
138
+ last_message_dts == o.last_message_dts &&
139
+ left_dts == o.left_dts &&
140
+ status == o.status
141
+ end
142
+
143
+ # @see the `==` method
144
+ # @param [Object] Object to be compared
145
+ def eql?(o)
146
+ self == o
147
+ end
148
+
149
+ # Calculates hash code according to all attributes.
150
+ # @return [Integer] Hash code
151
+ def hash
152
+ [conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, joined_dts, last_message_dts, left_dts, status].hash
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def self.build_from_hash(attributes)
159
+ new.build_from_hash(attributes)
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ self.class.openapi_types.each_pair do |key, type|
169
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
170
+ self.send("#{key}=", nil)
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
175
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
176
+ end
177
+ elsif !attributes[self.class.attribute_map[key]].nil?
178
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
+ end
180
+ end
181
+
182
+ self
183
+ end
184
+
185
+ # Deserializes the data based on type
186
+ # @param string type Data type
187
+ # @param string value Value to be deserialized
188
+ # @return [Object] Deserialized data
189
+ def _deserialize(type, value)
190
+ case type.to_sym
191
+ when :Time
192
+ Time.parse(value)
193
+ when :Date
194
+ Date.parse(value)
195
+ when :String
196
+ value.to_s
197
+ when :Integer
198
+ value.to_i
199
+ when :Float
200
+ value.to_f
201
+ when :Boolean
202
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
203
+ true
204
+ else
205
+ false
206
+ end
207
+ when :Object
208
+ # generic object (usually a Hash), return directly
209
+ value
210
+ when /\AArray<(?<inner_type>.+)>\z/
211
+ inner_type = Regexp.last_match[:inner_type]
212
+ value.map { |v| _deserialize(inner_type, v) }
213
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
214
+ k_type = Regexp.last_match[:k_type]
215
+ v_type = Regexp.last_match[:v_type]
216
+ {}.tap do |hash|
217
+ value.each do |k, v|
218
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
219
+ end
220
+ end
221
+ else # model
222
+ # models (e.g. Pet) or oneOf
223
+ klass = UltracartClient.const_get(type)
224
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
225
+ end
226
+ end
227
+
228
+ # Returns the string representation of the object
229
+ # @return [String] String presentation of the object
230
+ def to_s
231
+ to_hash.to_s
232
+ end
233
+
234
+ # to_body is an alias to to_hash (backward compatibility)
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_body
237
+ to_hash
238
+ end
239
+
240
+ # Returns the object in the form of hash
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_hash
243
+ hash = {}
244
+ self.class.attribute_map.each_pair do |attr, param|
245
+ value = self.send(attr)
246
+ if value.nil?
247
+ is_nullable = self.class.openapi_nullable.include?(attr)
248
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
249
+ end
250
+
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map { |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+
274
+ end
275
+
276
+ end