ultracart_api 3.10.19 → 3.10.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,223 @@
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 ConversationsResponse
17
+ attr_accessor :conversations
18
+
19
+ attr_accessor :error
20
+
21
+ attr_accessor :metadata
22
+
23
+ # Indicates if API call was successful
24
+ attr_accessor :success
25
+
26
+ attr_accessor :warning
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'conversations' => :'conversations',
32
+ :'error' => :'error',
33
+ :'metadata' => :'metadata',
34
+ :'success' => :'success',
35
+ :'warning' => :'warning'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'conversations' => :'Array<ConversationSummary>',
43
+ :'error' => :'Error',
44
+ :'metadata' => :'ResponseMetadata',
45
+ :'success' => :'BOOLEAN',
46
+ :'warning' => :'Warning'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'conversations')
59
+ if (value = attributes[:'conversations']).is_a?(Array)
60
+ self.conversations = value
61
+ end
62
+ end
63
+
64
+ if attributes.has_key?(:'error')
65
+ self.error = attributes[:'error']
66
+ end
67
+
68
+ if attributes.has_key?(:'metadata')
69
+ self.metadata = attributes[:'metadata']
70
+ end
71
+
72
+ if attributes.has_key?(:'success')
73
+ self.success = attributes[:'success']
74
+ end
75
+
76
+ if attributes.has_key?(:'warning')
77
+ self.warning = attributes[:'warning']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ conversations == o.conversations &&
100
+ error == o.error &&
101
+ metadata == o.metadata &&
102
+ success == o.success &&
103
+ warning == o.warning
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [conversations, error, metadata, success, warning].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.swagger_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :DateTime
145
+ DateTime.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :BOOLEAN
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ temp_model = UltracartClient.const_get(type).new
176
+ temp_model.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ next if value.nil?
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.19'
14
+ VERSION = '3.10.20'
15
15
  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'
@@ -658,6 +666,7 @@ require 'ultracart_api/api/auto_order_api'
658
666
  require 'ultracart_api/api/channel_partner_api'
659
667
  require 'ultracart_api/api/chargeback_api'
660
668
  require 'ultracart_api/api/checkout_api'
669
+ require 'ultracart_api/api/conversation_api'
661
670
  require 'ultracart_api/api/coupon_api'
662
671
  require 'ultracart_api/api/customer_api'
663
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.19
4
+ version: 3.10.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-11 00:00:00.000000000 Z
11
+ date: 2022-07-14 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
@@ -880,6 +889,7 @@ files:
880
889
  - lib/ultracart_api/api/channel_partner_api.rb
881
890
  - lib/ultracart_api/api/chargeback_api.rb
882
891
  - lib/ultracart_api/api/checkout_api.rb
892
+ - lib/ultracart_api/api/conversation_api.rb
883
893
  - lib/ultracart_api/api/coupon_api.rb
884
894
  - lib/ultracart_api/api/customer_api.rb
885
895
  - lib/ultracart_api/api/fulfillment_api.rb
@@ -1012,6 +1022,14 @@ files:
1012
1022
  - lib/ultracart_api/models/checkout_setup_browser_key_response.rb
1013
1023
  - lib/ultracart_api/models/checkout_state_province_response.rb
1014
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
1015
1033
  - lib/ultracart_api/models/countries_response.rb
1016
1034
  - lib/ultracart_api/models/country.rb
1017
1035
  - lib/ultracart_api/models/coupon.rb