smooch-api 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/docs/Integration.md +8 -0
- data/docs/IntegrationApi.md +59 -0
- data/docs/IntegrationUpdate.md +15 -0
- data/lib/smooch-api.rb +2 -1
- data/lib/smooch-api/api/app_api.rb +1 -1
- data/lib/smooch-api/api/app_user_api.rb +1 -1
- data/lib/smooch-api/api/attachments_api.rb +1 -1
- data/lib/smooch-api/api/conversation_api.rb +1 -1
- data/lib/smooch-api/api/integration_api.rb +68 -1
- data/lib/smooch-api/api/menu_api.rb +1 -1
- data/lib/smooch-api/api/webhook_api.rb +1 -1
- data/lib/smooch-api/api_client.rb +1 -1
- data/lib/smooch-api/api_error.rb +1 -1
- data/lib/smooch-api/configuration.rb +1 -1
- data/lib/smooch-api/models/action.rb +1 -1
- data/lib/smooch-api/models/app.rb +1 -1
- data/lib/smooch-api/models/app_create.rb +1 -1
- data/lib/smooch-api/models/app_response.rb +1 -1
- data/lib/smooch-api/models/app_settings.rb +1 -1
- data/lib/smooch-api/models/app_update.rb +1 -1
- data/lib/smooch-api/models/app_user.rb +1 -1
- data/lib/smooch-api/models/app_user_business_systems_response.rb +1 -1
- data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
- data/lib/smooch-api/models/app_user_link.rb +1 -1
- data/lib/smooch-api/models/app_user_pre_create.rb +1 -1
- data/lib/smooch-api/models/app_user_response.rb +1 -1
- data/lib/smooch-api/models/app_user_update.rb +1 -1
- data/lib/smooch-api/models/attachment_response.rb +1 -1
- data/lib/smooch-api/models/auth_code_response.rb +1 -1
- data/lib/smooch-api/models/business_system_item.rb +1 -1
- data/lib/smooch-api/models/channel_entity_item.rb +1 -1
- data/lib/smooch-api/models/client.rb +1 -1
- data/lib/smooch-api/models/client_info.rb +1 -1
- data/lib/smooch-api/models/confirmation.rb +1 -1
- data/lib/smooch-api/models/conversation.rb +1 -1
- data/lib/smooch-api/models/destination.rb +1 -1
- data/lib/smooch-api/models/display_settings.rb +1 -1
- data/lib/smooch-api/models/get_messages_response.rb +1 -1
- data/lib/smooch-api/models/integration.rb +87 -5
- data/lib/smooch-api/models/integration_create.rb +1 -1
- data/lib/smooch-api/models/integration_response.rb +1 -1
- data/lib/smooch-api/models/integration_update.rb +261 -0
- data/lib/smooch-api/models/jwt_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response_link_requests.rb +1 -1
- data/lib/smooch-api/models/list_apps_response.rb +1 -1
- data/lib/smooch-api/models/list_integrations_response.rb +1 -1
- data/lib/smooch-api/models/list_secret_keys_response.rb +1 -1
- data/lib/smooch-api/models/list_webhooks_response.rb +1 -1
- data/lib/smooch-api/models/menu.rb +1 -1
- data/lib/smooch-api/models/menu_item.rb +1 -1
- data/lib/smooch-api/models/menu_response.rb +1 -1
- data/lib/smooch-api/models/message.rb +1 -1
- data/lib/smooch-api/models/message_item.rb +1 -1
- data/lib/smooch-api/models/message_post.rb +1 -1
- data/lib/smooch-api/models/message_response.rb +1 -1
- data/lib/smooch-api/models/secret_key.rb +1 -1
- data/lib/smooch-api/models/secret_key_create.rb +1 -1
- data/lib/smooch-api/models/secret_key_response.rb +1 -1
- data/lib/smooch-api/models/source.rb +1 -1
- data/lib/smooch-api/models/typing_activity_trigger.rb +1 -1
- data/lib/smooch-api/models/webhook.rb +1 -1
- data/lib/smooch-api/models/webhook_create.rb +1 -1
- data/lib/smooch-api/models/webhook_response.rb +1 -1
- data/lib/smooch-api/models/webhook_update.rb +1 -1
- data/lib/smooch-api/version.rb +2 -2
- data/smooch-api.gemspec +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +4 -2
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -120,6 +120,30 @@ module SmoochApi
|
|
120
120
|
# Smooch will receive all messages sent to this phone number. Required for *messagebird* integrations.
|
121
121
|
attr_accessor :originator
|
122
122
|
|
123
|
+
# This color will be used in the messenger header and the button or tab in idle state. (Optional) Used for *Web Messenger* integrations.
|
124
|
+
attr_accessor :brand_color
|
125
|
+
|
126
|
+
# This color will be used for customer messages, quick replies and actions in the footer. (Optional) Used for *Web Messenger* integrations.
|
127
|
+
attr_accessor :conversation_color
|
128
|
+
|
129
|
+
# This color will be used for call-to-actions inside your messages. (Optional) Used for *Web Messenger* integrations.
|
130
|
+
attr_accessor :action_color
|
131
|
+
|
132
|
+
# Choose how the messenger will appear on your website. Must be either button or tab. (Optional) Used for *Web Messenger* integrations.
|
133
|
+
attr_accessor :display_style
|
134
|
+
|
135
|
+
# With the button style Web Messenger, you have the option of selecting your own button icon. (Optional) Used for *Web Messenger* integrations.
|
136
|
+
attr_accessor :button_icon_url
|
137
|
+
|
138
|
+
# A custom business name for the Web Messenger. (Optional) Used for *Web Messenger* integrations.
|
139
|
+
attr_accessor :integration_order
|
140
|
+
|
141
|
+
# A custom business name for the Web Messenger. (Optional) Used for *Web Messenger* integrations.
|
142
|
+
attr_accessor :business_name
|
143
|
+
|
144
|
+
# A custom business icon url for the Web Messenger. (Optional) Used for *Web Messenger* integrations.
|
145
|
+
attr_accessor :business_icon_url
|
146
|
+
|
123
147
|
|
124
148
|
# Attribute mapping from ruby-style variable name to JSON key.
|
125
149
|
def self.attribute_map
|
@@ -158,7 +182,15 @@ module SmoochApi
|
|
158
182
|
:'domain' => :'domain',
|
159
183
|
:'incoming_address' => :'incomingAddress',
|
160
184
|
:'access_key' => :'accessKey',
|
161
|
-
:'originator' => :'originator'
|
185
|
+
:'originator' => :'originator',
|
186
|
+
:'brand_color' => :'brandColor',
|
187
|
+
:'conversation_color' => :'conversationColor',
|
188
|
+
:'action_color' => :'actionColor',
|
189
|
+
:'display_style' => :'displayStyle',
|
190
|
+
:'button_icon_url' => :'buttonIconUrl',
|
191
|
+
:'integration_order' => :'integrationOrder',
|
192
|
+
:'business_name' => :'businessName',
|
193
|
+
:'business_icon_url' => :'businessIconUrl'
|
162
194
|
}
|
163
195
|
end
|
164
196
|
|
@@ -199,7 +231,15 @@ module SmoochApi
|
|
199
231
|
:'domain' => :'String',
|
200
232
|
:'incoming_address' => :'String',
|
201
233
|
:'access_key' => :'String',
|
202
|
-
:'originator' => :'String'
|
234
|
+
:'originator' => :'String',
|
235
|
+
:'brand_color' => :'String',
|
236
|
+
:'conversation_color' => :'String',
|
237
|
+
:'action_color' => :'String',
|
238
|
+
:'display_style' => :'String',
|
239
|
+
:'button_icon_url' => :'String',
|
240
|
+
:'integration_order' => :'Array<String>',
|
241
|
+
:'business_name' => :'String',
|
242
|
+
:'business_icon_url' => :'String'
|
203
243
|
}
|
204
244
|
end
|
205
245
|
|
@@ -351,6 +391,40 @@ module SmoochApi
|
|
351
391
|
self.originator = attributes[:'originator']
|
352
392
|
end
|
353
393
|
|
394
|
+
if attributes.has_key?(:'brandColor')
|
395
|
+
self.brand_color = attributes[:'brandColor']
|
396
|
+
end
|
397
|
+
|
398
|
+
if attributes.has_key?(:'conversationColor')
|
399
|
+
self.conversation_color = attributes[:'conversationColor']
|
400
|
+
end
|
401
|
+
|
402
|
+
if attributes.has_key?(:'actionColor')
|
403
|
+
self.action_color = attributes[:'actionColor']
|
404
|
+
end
|
405
|
+
|
406
|
+
if attributes.has_key?(:'displayStyle')
|
407
|
+
self.display_style = attributes[:'displayStyle']
|
408
|
+
end
|
409
|
+
|
410
|
+
if attributes.has_key?(:'buttonIconUrl')
|
411
|
+
self.button_icon_url = attributes[:'buttonIconUrl']
|
412
|
+
end
|
413
|
+
|
414
|
+
if attributes.has_key?(:'integrationOrder')
|
415
|
+
if (value = attributes[:'integrationOrder']).is_a?(Array)
|
416
|
+
self.integration_order = value
|
417
|
+
end
|
418
|
+
end
|
419
|
+
|
420
|
+
if attributes.has_key?(:'businessName')
|
421
|
+
self.business_name = attributes[:'businessName']
|
422
|
+
end
|
423
|
+
|
424
|
+
if attributes.has_key?(:'businessIconUrl')
|
425
|
+
self.business_icon_url = attributes[:'businessIconUrl']
|
426
|
+
end
|
427
|
+
|
354
428
|
end
|
355
429
|
|
356
430
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -415,7 +489,15 @@ module SmoochApi
|
|
415
489
|
domain == o.domain &&
|
416
490
|
incoming_address == o.incoming_address &&
|
417
491
|
access_key == o.access_key &&
|
418
|
-
originator == o.originator
|
492
|
+
originator == o.originator &&
|
493
|
+
brand_color == o.brand_color &&
|
494
|
+
conversation_color == o.conversation_color &&
|
495
|
+
action_color == o.action_color &&
|
496
|
+
display_style == o.display_style &&
|
497
|
+
button_icon_url == o.button_icon_url &&
|
498
|
+
integration_order == o.integration_order &&
|
499
|
+
business_name == o.business_name &&
|
500
|
+
business_icon_url == o.business_icon_url
|
419
501
|
end
|
420
502
|
|
421
503
|
# @see the `==` method
|
@@ -427,7 +509,7 @@ module SmoochApi
|
|
427
509
|
# Calculates hash code according to all attributes.
|
428
510
|
# @return [Fixnum] Hash code
|
429
511
|
def hash
|
430
|
-
[_id, type, page_access_token, app_id, app_secret, webhook_secret, page_id, account_sid, auth_token, phone_number_sid, phone_number, name, token, uri, channel_access_token, bot_name, encoding_aes_key, from_address, certificate, password, auto_update_badge, production, server_key, sender_id, consumer_key, consumer_secret, access_token_key, access_token_secret, user_id, username, api_key, domain, incoming_address, access_key, originator].hash
|
512
|
+
[_id, type, page_access_token, app_id, app_secret, webhook_secret, page_id, account_sid, auth_token, phone_number_sid, phone_number, name, token, uri, channel_access_token, bot_name, encoding_aes_key, from_address, certificate, password, auto_update_badge, production, server_key, sender_id, consumer_key, consumer_secret, access_token_key, access_token_secret, user_id, username, api_key, domain, incoming_address, access_key, originator, brand_color, conversation_color, action_color, display_style, button_icon_url, integration_order, business_name, business_icon_url].hash
|
431
513
|
end
|
432
514
|
|
433
515
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.7
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -0,0 +1,261 @@
|
|
1
|
+
=begin
|
2
|
+
#Smooch
|
3
|
+
|
4
|
+
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.7
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SmoochApi
|
16
|
+
|
17
|
+
class IntegrationUpdate
|
18
|
+
# This color will be used in the messenger header and the button or tab in idle state. (Optional) Used for *Web Messenger* integrations.
|
19
|
+
attr_accessor :brand_color
|
20
|
+
|
21
|
+
# This color will be used for customer messages, quick replies and actions in the footer. (Optional) Used for *Web Messenger* integrations.
|
22
|
+
attr_accessor :conversation_color
|
23
|
+
|
24
|
+
# This color will be used for call-to-actions inside your messages. (Optional) Used for *Web Messenger* integrations.
|
25
|
+
attr_accessor :action_color
|
26
|
+
|
27
|
+
# Choose how the messenger will appear on your website. Must be either button or tab. (Optional) Used for *Web Messenger* integrations.
|
28
|
+
attr_accessor :display_style
|
29
|
+
|
30
|
+
# With the button style Web Messenger, you have the option of selecting your own button icon. (Optional) Used for *Web Messenger* integrations.
|
31
|
+
attr_accessor :button_icon_url
|
32
|
+
|
33
|
+
# A custom business name for the Web Messenger. (Optional) Used for *Web Messenger* integrations.
|
34
|
+
attr_accessor :integration_order
|
35
|
+
|
36
|
+
# A custom business name for the Web Messenger. (Optional) Used for *Web Messenger* integrations.
|
37
|
+
attr_accessor :business_name
|
38
|
+
|
39
|
+
# A custom business icon url for the Web Messenger. (Optional) Used for *Web Messenger* integrations.
|
40
|
+
attr_accessor :business_icon_url
|
41
|
+
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
:'brand_color' => :'brandColor',
|
47
|
+
:'conversation_color' => :'conversationColor',
|
48
|
+
:'action_color' => :'actionColor',
|
49
|
+
:'display_style' => :'displayStyle',
|
50
|
+
:'button_icon_url' => :'buttonIconUrl',
|
51
|
+
:'integration_order' => :'integrationOrder',
|
52
|
+
:'business_name' => :'businessName',
|
53
|
+
:'business_icon_url' => :'businessIconUrl'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
:'brand_color' => :'String',
|
61
|
+
:'conversation_color' => :'String',
|
62
|
+
:'action_color' => :'String',
|
63
|
+
:'display_style' => :'String',
|
64
|
+
:'button_icon_url' => :'String',
|
65
|
+
:'integration_order' => :'Array<String>',
|
66
|
+
:'business_name' => :'String',
|
67
|
+
:'business_icon_url' => :'String'
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
return unless attributes.is_a?(Hash)
|
75
|
+
|
76
|
+
# convert string to symbol for hash key
|
77
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
78
|
+
|
79
|
+
if attributes.has_key?(:'brandColor')
|
80
|
+
self.brand_color = attributes[:'brandColor']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'conversationColor')
|
84
|
+
self.conversation_color = attributes[:'conversationColor']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'actionColor')
|
88
|
+
self.action_color = attributes[:'actionColor']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'displayStyle')
|
92
|
+
self.display_style = attributes[:'displayStyle']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'buttonIconUrl')
|
96
|
+
self.button_icon_url = attributes[:'buttonIconUrl']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'integrationOrder')
|
100
|
+
if (value = attributes[:'integrationOrder']).is_a?(Array)
|
101
|
+
self.integration_order = value
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'businessName')
|
106
|
+
self.business_name = attributes[:'businessName']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'businessIconUrl')
|
110
|
+
self.business_icon_url = attributes[:'businessIconUrl']
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
116
|
+
# @return Array for valid properies with the reasons
|
117
|
+
def list_invalid_properties
|
118
|
+
invalid_properties = Array.new
|
119
|
+
return invalid_properties
|
120
|
+
end
|
121
|
+
|
122
|
+
# Check to see if the all the properties in the model are valid
|
123
|
+
# @return true if the model is valid
|
124
|
+
def valid?
|
125
|
+
return true
|
126
|
+
end
|
127
|
+
|
128
|
+
# Checks equality by comparing each attribute.
|
129
|
+
# @param [Object] Object to be compared
|
130
|
+
def ==(o)
|
131
|
+
return true if self.equal?(o)
|
132
|
+
self.class == o.class &&
|
133
|
+
brand_color == o.brand_color &&
|
134
|
+
conversation_color == o.conversation_color &&
|
135
|
+
action_color == o.action_color &&
|
136
|
+
display_style == o.display_style &&
|
137
|
+
button_icon_url == o.button_icon_url &&
|
138
|
+
integration_order == o.integration_order &&
|
139
|
+
business_name == o.business_name &&
|
140
|
+
business_icon_url == o.business_icon_url
|
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 [Fixnum] Hash code
|
151
|
+
def hash
|
152
|
+
[brand_color, conversation_color, action_color, display_style, button_icon_url, integration_order, business_name, business_icon_url].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 build_from_hash(attributes)
|
159
|
+
return nil unless attributes.is_a?(Hash)
|
160
|
+
self.class.swagger_types.each_pair do |key, type|
|
161
|
+
if type =~ /\AArray<(.*)>/i
|
162
|
+
# check to ensure the input is an array given that the the attribute
|
163
|
+
# is documented as an array but the input is not
|
164
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
165
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
166
|
+
end
|
167
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
168
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
169
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
170
|
+
end
|
171
|
+
|
172
|
+
self
|
173
|
+
end
|
174
|
+
|
175
|
+
# Deserializes the data based on type
|
176
|
+
# @param string type Data type
|
177
|
+
# @param string value Value to be deserialized
|
178
|
+
# @return [Object] Deserialized data
|
179
|
+
def _deserialize(type, value)
|
180
|
+
case type.to_sym
|
181
|
+
when :DateTime
|
182
|
+
DateTime.parse(value)
|
183
|
+
when :Date
|
184
|
+
Date.parse(value)
|
185
|
+
when :String
|
186
|
+
value.to_s
|
187
|
+
when :Integer
|
188
|
+
value.to_i
|
189
|
+
when :Float
|
190
|
+
value.to_f
|
191
|
+
when :BOOLEAN
|
192
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
193
|
+
true
|
194
|
+
else
|
195
|
+
false
|
196
|
+
end
|
197
|
+
when :Object
|
198
|
+
# generic object (usually a Hash), return directly
|
199
|
+
value
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
203
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each do |k, v|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
else # model
|
212
|
+
temp_model = SmoochApi.const_get(type).new
|
213
|
+
temp_model.build_from_hash(value)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the string representation of the object
|
218
|
+
# @return [String] String presentation of the object
|
219
|
+
def to_s
|
220
|
+
to_hash.to_s
|
221
|
+
end
|
222
|
+
|
223
|
+
# to_body is an alias to to_hash (backward compatibility)
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_body
|
226
|
+
to_hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the object in the form of hash
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
231
|
+
def to_hash
|
232
|
+
hash = {}
|
233
|
+
self.class.attribute_map.each_pair do |attr, param|
|
234
|
+
value = self.send(attr)
|
235
|
+
next if value.nil?
|
236
|
+
hash[param] = _to_hash(value)
|
237
|
+
end
|
238
|
+
hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Outputs non-array value in the form of hash
|
242
|
+
# For object, use to_hash. Otherwise, just return the value
|
243
|
+
# @param [Object] value Any valid value
|
244
|
+
# @return [Hash] Returns the value in the form of hash
|
245
|
+
def _to_hash(value)
|
246
|
+
if value.is_a?(Array)
|
247
|
+
value.compact.map{ |v| _to_hash(v) }
|
248
|
+
elsif value.is_a?(Hash)
|
249
|
+
{}.tap do |hash|
|
250
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
251
|
+
end
|
252
|
+
elsif value.respond_to? :to_hash
|
253
|
+
value.to_hash
|
254
|
+
else
|
255
|
+
value
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|