ultracart_api 4.0.97.rc → 4.0.99.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,237 @@
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 ConversationSearchResponse
18
+ attr_accessor :range_begin
19
+
20
+ attr_accessor :range_end
21
+
22
+ attr_accessor :total
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'range_begin' => :'range_begin',
28
+ :'range_end' => :'range_end',
29
+ :'total' => :'total'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'range_begin' => :'Integer',
42
+ :'range_end' => :'Integer',
43
+ :'total' => :'Integer'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationSearchResponse` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'range_begin')
69
+ self.range_begin = attributes[:'range_begin']
70
+ end
71
+
72
+ if attributes.key?(:'range_end')
73
+ self.range_end = attributes[:'range_end']
74
+ end
75
+
76
+ if attributes.key?(:'total')
77
+ self.total = attributes[:'total']
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
+ range_begin == o.range_begin &&
100
+ range_end == o.range_end &&
101
+ total == o.total
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [range_begin, range_end, total].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = UltracartClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.97.rc'
14
+ VERSION = '4.0.99.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -138,6 +138,9 @@ require 'ultracart_api/models/city_state_zip'
138
138
  require 'ultracart_api/models/conversation'
139
139
  require 'ultracart_api/models/conversation_agent_auth'
140
140
  require 'ultracart_api/models/conversation_agent_auth_response'
141
+ require 'ultracart_api/models/conversation_autocomplete_request'
142
+ require 'ultracart_api/models/conversation_autocomplete_response'
143
+ require 'ultracart_api/models/conversation_autocomplete_value'
141
144
  require 'ultracart_api/models/conversation_canned_message'
142
145
  require 'ultracart_api/models/conversation_canned_message_response'
143
146
  require 'ultracart_api/models/conversation_canned_messages_response'
@@ -164,6 +167,8 @@ require 'ultracart_api/models/conversation_multimedia_upload_url'
164
167
  require 'ultracart_api/models/conversation_multimedia_upload_url_response'
165
168
  require 'ultracart_api/models/conversation_participant'
166
169
  require 'ultracart_api/models/conversation_response'
170
+ require 'ultracart_api/models/conversation_search_request'
171
+ require 'ultracart_api/models/conversation_search_response'
167
172
  require 'ultracart_api/models/conversation_start_request'
168
173
  require 'ultracart_api/models/conversation_start_response'
169
174
  require 'ultracart_api/models/conversation_summary'
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: 4.0.97.rc
4
+ version: 4.0.99.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-13 00:00:00.000000000 Z
11
+ date: 2022-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -188,6 +188,9 @@ files:
188
188
  - docs/ConversationAgentAuth.md
189
189
  - docs/ConversationAgentAuthResponse.md
190
190
  - docs/ConversationApi.md
191
+ - docs/ConversationAutocompleteRequest.md
192
+ - docs/ConversationAutocompleteResponse.md
193
+ - docs/ConversationAutocompleteValue.md
191
194
  - docs/ConversationCannedMessage.md
192
195
  - docs/ConversationCannedMessageResponse.md
193
196
  - docs/ConversationCannedMessagesResponse.md
@@ -214,6 +217,8 @@ files:
214
217
  - docs/ConversationMultimediaUploadUrlResponse.md
215
218
  - docs/ConversationParticipant.md
216
219
  - docs/ConversationResponse.md
220
+ - docs/ConversationSearchRequest.md
221
+ - docs/ConversationSearchResponse.md
217
222
  - docs/ConversationStartRequest.md
218
223
  - docs/ConversationStartResponse.md
219
224
  - docs/ConversationSummary.md
@@ -930,6 +935,9 @@ files:
930
935
  - lib/ultracart_api/models/conversation.rb
931
936
  - lib/ultracart_api/models/conversation_agent_auth.rb
932
937
  - lib/ultracart_api/models/conversation_agent_auth_response.rb
938
+ - lib/ultracart_api/models/conversation_autocomplete_request.rb
939
+ - lib/ultracart_api/models/conversation_autocomplete_response.rb
940
+ - lib/ultracart_api/models/conversation_autocomplete_value.rb
933
941
  - lib/ultracart_api/models/conversation_canned_message.rb
934
942
  - lib/ultracart_api/models/conversation_canned_message_response.rb
935
943
  - lib/ultracart_api/models/conversation_canned_messages_response.rb
@@ -956,6 +964,8 @@ files:
956
964
  - lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb
957
965
  - lib/ultracart_api/models/conversation_participant.rb
958
966
  - lib/ultracart_api/models/conversation_response.rb
967
+ - lib/ultracart_api/models/conversation_search_request.rb
968
+ - lib/ultracart_api/models/conversation_search_response.rb
959
969
  - lib/ultracart_api/models/conversation_start_request.rb
960
970
  - lib/ultracart_api/models/conversation_start_response.rb
961
971
  - lib/ultracart_api/models/conversation_summary.rb