ultracart_api 4.0.96.rc → 4.0.97.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,219 @@
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 ConversationJoinRequest
18
+ attr_accessor :participant_language_iso_code
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'participant_language_iso_code' => :'participant_language_iso_code'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'participant_language_iso_code' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationJoinRequest` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationJoinRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'participant_language_iso_code')
61
+ self.participant_language_iso_code = attributes[:'participant_language_iso_code']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ participant_language_iso_code == o.participant_language_iso_code
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [participant_language_iso_code].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = UltracartClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -21,6 +21,8 @@ module UltracartClient
21
21
 
22
22
  attr_accessor :conversation_participant_uuid
23
23
 
24
+ attr_accessor :email
25
+
24
26
  # Joined conversation date/time
25
27
  attr_accessor :joined_dts
26
28
 
@@ -34,6 +36,8 @@ module UltracartClient
34
36
 
35
37
  attr_accessor :profile_image_url
36
38
 
39
+ attr_accessor :sms_phone_number
40
+
37
41
  attr_accessor :status
38
42
 
39
43
  attr_accessor :timezone
@@ -46,11 +50,13 @@ module UltracartClient
46
50
  :'conversation_participant_arn' => :'conversation_participant_arn',
47
51
  :'conversation_participant_name' => :'conversation_participant_name',
48
52
  :'conversation_participant_uuid' => :'conversation_participant_uuid',
53
+ :'email' => :'email',
49
54
  :'joined_dts' => :'joined_dts',
50
55
  :'language_iso_code' => :'language_iso_code',
51
56
  :'last_message_dts' => :'last_message_dts',
52
57
  :'left_dts' => :'left_dts',
53
58
  :'profile_image_url' => :'profile_image_url',
59
+ :'sms_phone_number' => :'sms_phone_number',
54
60
  :'status' => :'status',
55
61
  :'timezone' => :'timezone',
56
62
  :'unread_messages' => :'unread_messages'
@@ -68,11 +74,13 @@ module UltracartClient
68
74
  :'conversation_participant_arn' => :'String',
69
75
  :'conversation_participant_name' => :'String',
70
76
  :'conversation_participant_uuid' => :'String',
77
+ :'email' => :'String',
71
78
  :'joined_dts' => :'String',
72
79
  :'language_iso_code' => :'String',
73
80
  :'last_message_dts' => :'String',
74
81
  :'left_dts' => :'String',
75
82
  :'profile_image_url' => :'String',
83
+ :'sms_phone_number' => :'String',
76
84
  :'status' => :'String',
77
85
  :'timezone' => :'String',
78
86
  :'unread_messages' => :'Integer'
@@ -112,6 +120,10 @@ module UltracartClient
112
120
  self.conversation_participant_uuid = attributes[:'conversation_participant_uuid']
113
121
  end
114
122
 
123
+ if attributes.key?(:'email')
124
+ self.email = attributes[:'email']
125
+ end
126
+
115
127
  if attributes.key?(:'joined_dts')
116
128
  self.joined_dts = attributes[:'joined_dts']
117
129
  end
@@ -132,6 +144,10 @@ module UltracartClient
132
144
  self.profile_image_url = attributes[:'profile_image_url']
133
145
  end
134
146
 
147
+ if attributes.key?(:'sms_phone_number')
148
+ self.sms_phone_number = attributes[:'sms_phone_number']
149
+ end
150
+
135
151
  if attributes.key?(:'status')
136
152
  self.status = attributes[:'status']
137
153
  end
@@ -166,11 +182,13 @@ module UltracartClient
166
182
  conversation_participant_arn == o.conversation_participant_arn &&
167
183
  conversation_participant_name == o.conversation_participant_name &&
168
184
  conversation_participant_uuid == o.conversation_participant_uuid &&
185
+ email == o.email &&
169
186
  joined_dts == o.joined_dts &&
170
187
  language_iso_code == o.language_iso_code &&
171
188
  last_message_dts == o.last_message_dts &&
172
189
  left_dts == o.left_dts &&
173
190
  profile_image_url == o.profile_image_url &&
191
+ sms_phone_number == o.sms_phone_number &&
174
192
  status == o.status &&
175
193
  timezone == o.timezone &&
176
194
  unread_messages == o.unread_messages
@@ -185,7 +203,7 @@ module UltracartClient
185
203
  # Calculates hash code according to all attributes.
186
204
  # @return [Integer] Hash code
187
205
  def hash
188
- [conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, joined_dts, language_iso_code, last_message_dts, left_dts, profile_image_url, status, timezone, unread_messages].hash
206
+ [conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, email, joined_dts, language_iso_code, last_message_dts, left_dts, profile_image_url, sms_phone_number, status, timezone, unread_messages].hash
189
207
  end
190
208
 
191
209
  # Builds the object from hash
@@ -26,6 +26,8 @@ module UltracartClient
26
26
  # Date/time the customer joined the queue
27
27
  attr_accessor :join_dts
28
28
 
29
+ attr_accessor :participant_language_iso_code
30
+
29
31
  attr_accessor :question
30
32
 
31
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,6 +38,7 @@ module UltracartClient
36
38
  :'conversation_webchat_queue_uuid' => :'conversation_webchat_queue_uuid',
37
39
  :'email' => :'email',
38
40
  :'join_dts' => :'join_dts',
41
+ :'participant_language_iso_code' => :'participant_language_iso_code',
39
42
  :'question' => :'question'
40
43
  }
41
44
  end
@@ -53,6 +56,7 @@ module UltracartClient
53
56
  :'conversation_webchat_queue_uuid' => :'String',
54
57
  :'email' => :'String',
55
58
  :'join_dts' => :'String',
59
+ :'participant_language_iso_code' => :'String',
56
60
  :'question' => :'String'
57
61
  }
58
62
  end
@@ -98,6 +102,10 @@ module UltracartClient
98
102
  self.join_dts = attributes[:'join_dts']
99
103
  end
100
104
 
105
+ if attributes.key?(:'participant_language_iso_code')
106
+ self.participant_language_iso_code = attributes[:'participant_language_iso_code']
107
+ end
108
+
101
109
  if attributes.key?(:'question')
102
110
  self.question = attributes[:'question']
103
111
  end
@@ -126,6 +134,7 @@ module UltracartClient
126
134
  conversation_webchat_queue_uuid == o.conversation_webchat_queue_uuid &&
127
135
  email == o.email &&
128
136
  join_dts == o.join_dts &&
137
+ participant_language_iso_code == o.participant_language_iso_code &&
129
138
  question == o.question
130
139
  end
131
140
 
@@ -138,7 +147,7 @@ module UltracartClient
138
147
  # Calculates hash code according to all attributes.
139
148
  # @return [Integer] Hash code
140
149
  def hash
141
- [conversation_participant_arn, conversation_participant_name, conversation_webchat_queue_uuid, email, join_dts, question].hash
150
+ [conversation_participant_arn, conversation_participant_name, conversation_webchat_queue_uuid, email, join_dts, participant_language_iso_code, question].hash
142
151
  end
143
152
 
144
153
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.96.rc'
14
+ VERSION = '4.0.97.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -142,6 +142,12 @@ require 'ultracart_api/models/conversation_canned_message'
142
142
  require 'ultracart_api/models/conversation_canned_message_response'
143
143
  require 'ultracart_api/models/conversation_canned_messages_response'
144
144
  require 'ultracart_api/models/conversation_canned_messages_search'
145
+ require 'ultracart_api/models/conversation_department'
146
+ require 'ultracart_api/models/conversation_department_response'
147
+ require 'ultracart_api/models/conversation_departments_response'
148
+ require 'ultracart_api/models/conversation_engagement'
149
+ require 'ultracart_api/models/conversation_engagement_response'
150
+ require 'ultracart_api/models/conversation_engagements_response'
145
151
  require 'ultracart_api/models/conversation_event_add_coupon'
146
152
  require 'ultracart_api/models/conversation_event_add_item'
147
153
  require 'ultracart_api/models/conversation_event_queue_position'
@@ -149,6 +155,7 @@ require 'ultracart_api/models/conversation_event_rr_web'
149
155
  require 'ultracart_api/models/conversation_event_read_message'
150
156
  require 'ultracart_api/models/conversation_event_typing'
151
157
  require 'ultracart_api/models/conversation_event_webchat_context'
158
+ require 'ultracart_api/models/conversation_join_request'
152
159
  require 'ultracart_api/models/conversation_message'
153
160
  require 'ultracart_api/models/conversation_message_translation'
154
161
  require 'ultracart_api/models/conversation_message_transport_status'
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.96.rc
4
+ version: 4.0.97.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-09 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -192,6 +192,12 @@ files:
192
192
  - docs/ConversationCannedMessageResponse.md
193
193
  - docs/ConversationCannedMessagesResponse.md
194
194
  - docs/ConversationCannedMessagesSearch.md
195
+ - docs/ConversationDepartment.md
196
+ - docs/ConversationDepartmentResponse.md
197
+ - docs/ConversationDepartmentsResponse.md
198
+ - docs/ConversationEngagement.md
199
+ - docs/ConversationEngagementResponse.md
200
+ - docs/ConversationEngagementsResponse.md
195
201
  - docs/ConversationEventAddCoupon.md
196
202
  - docs/ConversationEventAddItem.md
197
203
  - docs/ConversationEventQueuePosition.md
@@ -199,6 +205,7 @@ files:
199
205
  - docs/ConversationEventReadMessage.md
200
206
  - docs/ConversationEventTyping.md
201
207
  - docs/ConversationEventWebchatContext.md
208
+ - docs/ConversationJoinRequest.md
202
209
  - docs/ConversationMessage.md
203
210
  - docs/ConversationMessageTranslation.md
204
211
  - docs/ConversationMessageTransportStatus.md
@@ -927,6 +934,12 @@ files:
927
934
  - lib/ultracart_api/models/conversation_canned_message_response.rb
928
935
  - lib/ultracart_api/models/conversation_canned_messages_response.rb
929
936
  - lib/ultracart_api/models/conversation_canned_messages_search.rb
937
+ - lib/ultracart_api/models/conversation_department.rb
938
+ - lib/ultracart_api/models/conversation_department_response.rb
939
+ - lib/ultracart_api/models/conversation_departments_response.rb
940
+ - lib/ultracart_api/models/conversation_engagement.rb
941
+ - lib/ultracart_api/models/conversation_engagement_response.rb
942
+ - lib/ultracart_api/models/conversation_engagements_response.rb
930
943
  - lib/ultracart_api/models/conversation_event_add_coupon.rb
931
944
  - lib/ultracart_api/models/conversation_event_add_item.rb
932
945
  - lib/ultracart_api/models/conversation_event_queue_position.rb
@@ -934,6 +947,7 @@ files:
934
947
  - lib/ultracart_api/models/conversation_event_rr_web.rb
935
948
  - lib/ultracart_api/models/conversation_event_typing.rb
936
949
  - lib/ultracart_api/models/conversation_event_webchat_context.rb
950
+ - lib/ultracart_api/models/conversation_join_request.rb
937
951
  - lib/ultracart_api/models/conversation_message.rb
938
952
  - lib/ultracart_api/models/conversation_message_translation.rb
939
953
  - lib/ultracart_api/models/conversation_message_transport_status.rb