ultracart_api 3.10.18 → 3.10.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -4
- data/docs/Activity.md +2 -0
- data/docs/Conversation.md +12 -0
- data/docs/ConversationAgentAuthResponse.md +12 -0
- data/docs/ConversationApi.md +360 -0
- data/docs/ConversationMessage.md +12 -0
- data/docs/ConversationParticipant.md +14 -0
- data/docs/ConversationStartRequest.md +9 -0
- data/docs/ConversationStartResponse.md +9 -0
- data/docs/ConversationSummary.md +16 -0
- data/docs/ConversationsResponse.md +12 -0
- data/docs/CustomerActivity.md +4 -0
- data/docs/CustomerApi.md +57 -0
- data/docs/CustomerMergeRequest.md +9 -0
- data/lib/ultracart_api/api/conversation_api.rb +412 -0
- data/lib/ultracart_api/api/customer_api.rb +63 -0
- data/lib/ultracart_api/models/activity.rb +19 -1
- data/lib/ultracart_api/models/conversation.rb +224 -0
- data/lib/ultracart_api/models/conversation_agent_auth_response.rb +222 -0
- data/lib/ultracart_api/models/conversation_message.rb +223 -0
- data/lib/ultracart_api/models/conversation_participant.rb +241 -0
- data/lib/ultracart_api/models/conversation_start_request.rb +195 -0
- data/lib/ultracart_api/models/conversation_start_response.rb +193 -0
- data/lib/ultracart_api/models/conversation_summary.rb +257 -0
- data/lib/ultracart_api/models/conversations_response.rb +223 -0
- data/lib/ultracart_api/models/customer_activity.rb +40 -4
- data/lib/ultracart_api/models/customer_merge_request.rb +195 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +10 -0
- metadata +22 -2
@@ -0,0 +1,195 @@
|
|
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 CustomerMergeRequest
|
17
|
+
# Customer profile oid to merge
|
18
|
+
attr_accessor :customer_profile_oid
|
19
|
+
|
20
|
+
# Email of the customer profile to merge
|
21
|
+
attr_accessor :email
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'customer_profile_oid' => :'customer_profile_oid',
|
27
|
+
:'email' => :'email'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'customer_profile_oid' => :'Integer',
|
35
|
+
:'email' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'customer_profile_oid')
|
48
|
+
self.customer_profile_oid = attributes[:'customer_profile_oid']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'email')
|
52
|
+
self.email = attributes[:'email']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
invalid_properties
|
61
|
+
end
|
62
|
+
|
63
|
+
# Check to see if the all the properties in the model are valid
|
64
|
+
# @return true if the model is valid
|
65
|
+
def valid?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
customer_profile_oid == o.customer_profile_oid &&
|
75
|
+
email == o.email
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[customer_profile_oid, email].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
97
|
+
# check to ensure the input is an array given that the attribute
|
98
|
+
# is documented as an array but the input is not
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
101
|
+
end
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
105
|
+
end
|
106
|
+
|
107
|
+
self
|
108
|
+
end
|
109
|
+
|
110
|
+
# Deserializes the data based on type
|
111
|
+
# @param string type Data type
|
112
|
+
# @param string value Value to be deserialized
|
113
|
+
# @return [Object] Deserialized data
|
114
|
+
def _deserialize(type, value)
|
115
|
+
case type.to_sym
|
116
|
+
when :DateTime
|
117
|
+
DateTime.parse(value)
|
118
|
+
when :Date
|
119
|
+
Date.parse(value)
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :BOOLEAN
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else # model
|
147
|
+
temp_model = UltracartClient.const_get(type).new
|
148
|
+
temp_model.build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
next if value.nil?
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
178
|
+
# @param [Object] value Any valid value
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -133,6 +133,14 @@ require 'ultracart_api/models/checkout_setup_browser_key_request'
|
|
133
133
|
require 'ultracart_api/models/checkout_setup_browser_key_response'
|
134
134
|
require 'ultracart_api/models/checkout_state_province_response'
|
135
135
|
require 'ultracart_api/models/city_state_zip'
|
136
|
+
require 'ultracart_api/models/conversation'
|
137
|
+
require 'ultracart_api/models/conversation_agent_auth_response'
|
138
|
+
require 'ultracart_api/models/conversation_message'
|
139
|
+
require 'ultracart_api/models/conversation_participant'
|
140
|
+
require 'ultracart_api/models/conversation_start_request'
|
141
|
+
require 'ultracart_api/models/conversation_start_response'
|
142
|
+
require 'ultracart_api/models/conversation_summary'
|
143
|
+
require 'ultracart_api/models/conversations_response'
|
136
144
|
require 'ultracart_api/models/countries_response'
|
137
145
|
require 'ultracart_api/models/country'
|
138
146
|
require 'ultracart_api/models/coupon'
|
@@ -211,6 +219,7 @@ require 'ultracart_api/models/customer_email_list_changes'
|
|
211
219
|
require 'ultracart_api/models/customer_loyalty'
|
212
220
|
require 'ultracart_api/models/customer_loyalty_ledger'
|
213
221
|
require 'ultracart_api/models/customer_loyalty_redemption'
|
222
|
+
require 'ultracart_api/models/customer_merge_request'
|
214
223
|
require 'ultracart_api/models/customer_orders_summary'
|
215
224
|
require 'ultracart_api/models/customer_pricing_tier'
|
216
225
|
require 'ultracart_api/models/customer_privacy'
|
@@ -657,6 +666,7 @@ require 'ultracart_api/api/auto_order_api'
|
|
657
666
|
require 'ultracart_api/api/channel_partner_api'
|
658
667
|
require 'ultracart_api/api/chargeback_api'
|
659
668
|
require 'ultracart_api/api/checkout_api'
|
669
|
+
require 'ultracart_api/api/conversation_api'
|
660
670
|
require 'ultracart_api/api/coupon_api'
|
661
671
|
require 'ultracart_api/api/customer_api'
|
662
672
|
require 'ultracart_api/api/fulfillment_api'
|
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: 3.10.
|
4
|
+
version: 3.10.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -342,6 +342,15 @@ files:
|
|
342
342
|
- docs/CheckoutSetupBrowserKeyResponse.md
|
343
343
|
- docs/CheckoutStateProvinceResponse.md
|
344
344
|
- docs/CityStateZip.md
|
345
|
+
- docs/Conversation.md
|
346
|
+
- docs/ConversationAgentAuthResponse.md
|
347
|
+
- docs/ConversationApi.md
|
348
|
+
- docs/ConversationMessage.md
|
349
|
+
- docs/ConversationParticipant.md
|
350
|
+
- docs/ConversationStartRequest.md
|
351
|
+
- docs/ConversationStartResponse.md
|
352
|
+
- docs/ConversationSummary.md
|
353
|
+
- docs/ConversationsResponse.md
|
345
354
|
- docs/CountriesResponse.md
|
346
355
|
- docs/Country.md
|
347
356
|
- docs/Coupon.md
|
@@ -422,6 +431,7 @@ files:
|
|
422
431
|
- docs/CustomerLoyalty.md
|
423
432
|
- docs/CustomerLoyaltyLedger.md
|
424
433
|
- docs/CustomerLoyaltyRedemption.md
|
434
|
+
- docs/CustomerMergeRequest.md
|
425
435
|
- docs/CustomerOrdersSummary.md
|
426
436
|
- docs/CustomerPricingTier.md
|
427
437
|
- docs/CustomerPrivacy.md
|
@@ -879,6 +889,7 @@ files:
|
|
879
889
|
- lib/ultracart_api/api/channel_partner_api.rb
|
880
890
|
- lib/ultracart_api/api/chargeback_api.rb
|
881
891
|
- lib/ultracart_api/api/checkout_api.rb
|
892
|
+
- lib/ultracart_api/api/conversation_api.rb
|
882
893
|
- lib/ultracart_api/api/coupon_api.rb
|
883
894
|
- lib/ultracart_api/api/customer_api.rb
|
884
895
|
- lib/ultracart_api/api/fulfillment_api.rb
|
@@ -1011,6 +1022,14 @@ files:
|
|
1011
1022
|
- lib/ultracart_api/models/checkout_setup_browser_key_response.rb
|
1012
1023
|
- lib/ultracart_api/models/checkout_state_province_response.rb
|
1013
1024
|
- lib/ultracart_api/models/city_state_zip.rb
|
1025
|
+
- lib/ultracart_api/models/conversation.rb
|
1026
|
+
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
1027
|
+
- lib/ultracart_api/models/conversation_message.rb
|
1028
|
+
- lib/ultracart_api/models/conversation_participant.rb
|
1029
|
+
- lib/ultracart_api/models/conversation_start_request.rb
|
1030
|
+
- lib/ultracart_api/models/conversation_start_response.rb
|
1031
|
+
- lib/ultracart_api/models/conversation_summary.rb
|
1032
|
+
- lib/ultracart_api/models/conversations_response.rb
|
1014
1033
|
- lib/ultracart_api/models/countries_response.rb
|
1015
1034
|
- lib/ultracart_api/models/country.rb
|
1016
1035
|
- lib/ultracart_api/models/coupon.rb
|
@@ -1089,6 +1108,7 @@ files:
|
|
1089
1108
|
- lib/ultracart_api/models/customer_loyalty.rb
|
1090
1109
|
- lib/ultracart_api/models/customer_loyalty_ledger.rb
|
1091
1110
|
- lib/ultracart_api/models/customer_loyalty_redemption.rb
|
1111
|
+
- lib/ultracart_api/models/customer_merge_request.rb
|
1092
1112
|
- lib/ultracart_api/models/customer_orders_summary.rb
|
1093
1113
|
- lib/ultracart_api/models/customer_pricing_tier.rb
|
1094
1114
|
- lib/ultracart_api/models/customer_privacy.rb
|