smooch-api 5.24.1 → 5.28.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +176 -0
  3. data/README.md +20 -1
  4. data/docs/AppApi.md +60 -0
  5. data/docs/AppUserLink.md +1 -0
  6. data/docs/Author.md +11 -0
  7. data/docs/GetSdkIdsResponse.md +10 -0
  8. data/docs/Integration.md +2 -1
  9. data/docs/IntegrationCreate.md +5 -0
  10. data/docs/IntegrationUpdate.md +1 -0
  11. data/docs/NotificationApi.md +71 -0
  12. data/docs/NotificationPost.md +11 -0
  13. data/docs/NotificationPostDestination.md +9 -0
  14. data/docs/NotificationResponse.md +8 -0
  15. data/docs/NotificationResponseNotification.md +8 -0
  16. data/lib/smooch-api.rb +8 -1
  17. data/lib/smooch-api/api/app_api.rb +56 -1
  18. data/lib/smooch-api/api/app_user_api.rb +1 -1
  19. data/lib/smooch-api/api/attachments_api.rb +1 -1
  20. data/lib/smooch-api/api/conversation_api.rb +1 -1
  21. data/lib/smooch-api/api/deployment_api.rb +1 -1
  22. data/lib/smooch-api/api/integration_api.rb +1 -1
  23. data/lib/smooch-api/api/menu_api.rb +1 -1
  24. data/lib/smooch-api/api/notification_api.rb +84 -0
  25. data/lib/smooch-api/api/service_account_api.rb +1 -1
  26. data/lib/smooch-api/api/template_api.rb +1 -1
  27. data/lib/smooch-api/api/webhook_api.rb +1 -1
  28. data/lib/smooch-api/api_client.rb +1 -1
  29. data/lib/smooch-api/api_error.rb +1 -1
  30. data/lib/smooch-api/configuration.rb +1 -1
  31. data/lib/smooch-api/models/action.rb +1 -1
  32. data/lib/smooch-api/models/activity_response.rb +1 -1
  33. data/lib/smooch-api/models/app.rb +1 -1
  34. data/lib/smooch-api/models/app_create.rb +1 -1
  35. data/lib/smooch-api/models/app_response.rb +1 -1
  36. data/lib/smooch-api/models/app_settings.rb +1 -1
  37. data/lib/smooch-api/models/app_update.rb +1 -1
  38. data/lib/smooch-api/models/app_user.rb +1 -1
  39. data/lib/smooch-api/models/app_user_business_systems_response.rb +1 -1
  40. data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
  41. data/lib/smooch-api/models/app_user_link.rb +12 -2
  42. data/lib/smooch-api/models/app_user_merge.rb +1 -1
  43. data/lib/smooch-api/models/app_user_pre_create.rb +1 -1
  44. data/lib/smooch-api/models/app_user_response.rb +1 -1
  45. data/lib/smooch-api/models/app_user_update.rb +1 -1
  46. data/lib/smooch-api/models/attachment_remove.rb +1 -1
  47. data/lib/smooch-api/models/attachment_response.rb +1 -1
  48. data/lib/smooch-api/models/auth_code_response.rb +1 -1
  49. data/lib/smooch-api/models/author.rb +224 -0
  50. data/lib/smooch-api/models/business_system_item.rb +1 -1
  51. data/lib/smooch-api/models/channel_entity_item.rb +1 -1
  52. data/lib/smooch-api/models/client.rb +1 -1
  53. data/lib/smooch-api/models/client_info.rb +1 -1
  54. data/lib/smooch-api/models/confirmation.rb +1 -1
  55. data/lib/smooch-api/models/conversation.rb +1 -1
  56. data/lib/smooch-api/models/conversation_activity.rb +1 -1
  57. data/lib/smooch-api/models/coordinates.rb +1 -1
  58. data/lib/smooch-api/models/deployment.rb +1 -1
  59. data/lib/smooch-api/models/deployment_activate_phone_number.rb +1 -1
  60. data/lib/smooch-api/models/deployment_confirm_code.rb +1 -1
  61. data/lib/smooch-api/models/deployment_create.rb +1 -1
  62. data/lib/smooch-api/models/deployment_response.rb +1 -1
  63. data/lib/smooch-api/models/destination.rb +1 -1
  64. data/lib/smooch-api/models/display_settings.rb +1 -1
  65. data/lib/smooch-api/models/enums.rb +3 -3
  66. data/lib/smooch-api/models/field.rb +1 -1
  67. data/lib/smooch-api/models/field_post.rb +1 -1
  68. data/lib/smooch-api/models/get_integration_profile_response.rb +1 -1
  69. data/lib/smooch-api/models/get_messages_response.rb +1 -1
  70. data/lib/smooch-api/models/get_sdk_ids_response.rb +224 -0
  71. data/lib/smooch-api/models/integration.rb +13 -3
  72. data/lib/smooch-api/models/integration_create.rb +55 -5
  73. data/lib/smooch-api/models/integration_profile_update.rb +1 -1
  74. data/lib/smooch-api/models/integration_response.rb +1 -1
  75. data/lib/smooch-api/models/integration_update.rb +15 -5
  76. data/lib/smooch-api/models/jwt_response.rb +1 -1
  77. data/lib/smooch-api/models/link_request_response.rb +1 -1
  78. data/lib/smooch-api/models/link_request_response_link_requests.rb +1 -1
  79. data/lib/smooch-api/models/list_apps_response.rb +1 -1
  80. data/lib/smooch-api/models/list_deployments_response.rb +1 -1
  81. data/lib/smooch-api/models/list_integrations_response.rb +1 -1
  82. data/lib/smooch-api/models/list_secret_keys_response.rb +1 -1
  83. data/lib/smooch-api/models/list_service_accounts_response.rb +1 -1
  84. data/lib/smooch-api/models/list_templates_response.rb +1 -1
  85. data/lib/smooch-api/models/list_webhooks_response.rb +1 -1
  86. data/lib/smooch-api/models/location.rb +1 -1
  87. data/lib/smooch-api/models/menu.rb +1 -1
  88. data/lib/smooch-api/models/menu_item.rb +1 -1
  89. data/lib/smooch-api/models/menu_response.rb +1 -1
  90. data/lib/smooch-api/models/merged_user.rb +1 -1
  91. data/lib/smooch-api/models/message.rb +1 -1
  92. data/lib/smooch-api/models/message_item.rb +1 -1
  93. data/lib/smooch-api/models/message_override.rb +1 -1
  94. data/lib/smooch-api/models/message_override_line.rb +1 -1
  95. data/lib/smooch-api/models/message_override_messenger.rb +1 -1
  96. data/lib/smooch-api/models/message_override_whatsapp.rb +1 -1
  97. data/lib/smooch-api/models/message_post.rb +1 -1
  98. data/lib/smooch-api/models/message_response.rb +1 -1
  99. data/lib/smooch-api/models/notification_post.rb +234 -0
  100. data/lib/smooch-api/models/notification_post_destination.rb +209 -0
  101. data/lib/smooch-api/models/notification_response.rb +188 -0
  102. data/lib/smooch-api/models/notification_response_notification.rb +194 -0
  103. data/lib/smooch-api/models/option.rb +1 -1
  104. data/lib/smooch-api/models/quoted_message.rb +1 -1
  105. data/lib/smooch-api/models/secret_key.rb +1 -1
  106. data/lib/smooch-api/models/secret_key_create.rb +1 -1
  107. data/lib/smooch-api/models/secret_key_response.rb +1 -1
  108. data/lib/smooch-api/models/select.rb +1 -1
  109. data/lib/smooch-api/models/service_account.rb +1 -1
  110. data/lib/smooch-api/models/service_account_create.rb +1 -1
  111. data/lib/smooch-api/models/service_account_response.rb +1 -1
  112. data/lib/smooch-api/models/service_account_update.rb +1 -1
  113. data/lib/smooch-api/models/source.rb +1 -1
  114. data/lib/smooch-api/models/sub_menu_item.rb +1 -1
  115. data/lib/smooch-api/models/template.rb +1 -1
  116. data/lib/smooch-api/models/template_create.rb +1 -1
  117. data/lib/smooch-api/models/template_response.rb +1 -1
  118. data/lib/smooch-api/models/template_update.rb +1 -1
  119. data/lib/smooch-api/models/upload_integration_profile_photo_response.rb +1 -1
  120. data/lib/smooch-api/models/webhook.rb +1 -1
  121. data/lib/smooch-api/models/webhook_create.rb +1 -1
  122. data/lib/smooch-api/models/webhook_response.rb +1 -1
  123. data/lib/smooch-api/models/webhook_update.rb +1 -1
  124. data/lib/smooch-api/version.rb +2 -2
  125. data/smooch-api.gemspec +2 -2
  126. data/spec/api_client_spec.rb +1 -1
  127. data/spec/configuration_spec.rb +1 -1
  128. data/spec/spec_helper.rb +1 -1
  129. metadata +18 -3
@@ -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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -257,7 +257,7 @@ module SmoochApi
257
257
  return false unless quotedMessageType_validator.valid?(@quotedMessageType)
258
258
  role_validator = EnumAttributeValidator.new('String', ["appMaker", "appUser"])
259
259
  return false unless role_validator.valid?(@role)
260
- webhookTriggers_validator = EnumAttributeValidator.new('String', ["appUser:delete", "client:add", "client:remove", "conversation:read", "conversation:referral", "conversation:start", "link:failure", "link:match", "link:success", "merge:appUser", "message:appMaker", "message:appUser", "message:delivery:channel", "message:delivery:failure", "message:delivery:user", "payment:success", "postback", "typing:appUser"])
260
+ webhookTriggers_validator = EnumAttributeValidator.new('String', ["appUser:delete", "client:add", "client:remove", "conversation:read", "conversation:referral", "conversation:start", "link:failure", "link:match", "link:success", "merge:appUser", "message:appMaker", "message:appUser", "message:delivery:channel", "message:delivery:failure", "message:delivery:user", "notification:delivery:channel", "notification:delivery:failure", "notification:delivery:user", "payment:success", "postback", "typing:appUser"])
261
261
  return false unless webhookTriggers_validator.valid?(@webhookTriggers)
262
262
  return true
263
263
  end
@@ -445,7 +445,7 @@ module SmoochApi
445
445
  # Custom attribute writer method checking allowed values (enum).
446
446
  # @param [Object] webhookTriggers Object to be assigned
447
447
  def webhookTriggers=(webhookTriggers)
448
- validator = EnumAttributeValidator.new('String', ["appUser:delete", "client:add", "client:remove", "conversation:read", "conversation:referral", "conversation:start", "link:failure", "link:match", "link:success", "merge:appUser", "message:appMaker", "message:appUser", "message:delivery:channel", "message:delivery:failure", "message:delivery:user", "payment:success", "postback", "typing:appUser"])
448
+ validator = EnumAttributeValidator.new('String', ["appUser:delete", "client:add", "client:remove", "conversation:read", "conversation:referral", "conversation:start", "link:failure", "link:match", "link:success", "merge:appUser", "message:appMaker", "message:appUser", "message:delivery:channel", "message:delivery:failure", "message:delivery:user", "notification:delivery:channel", "notification:delivery:failure", "notification:delivery:user", "payment:success", "postback", "typing:appUser"])
449
449
  unless validator.valid?(webhookTriggers)
450
450
  fail ArgumentError, "invalid value for 'webhookTriggers', must be one of #{validator.allowable_values}."
451
451
  end
@@ -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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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: 5.24
6
+ OpenAPI spec version: 5.28
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,224 @@
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: 5.28
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 GetSdkIdsResponse
18
+ # The ID of the `android` integration, used when initializing the Android SDK.
19
+ attr_accessor :androidIntegrationId
20
+
21
+ # The ID of the `ios` integration, used when initializing the iOS SDK.
22
+ attr_accessor :iosIntegrationId
23
+
24
+ # The ID of the `web` integration, used when initializing the Web Messenger SDK.
25
+ attr_accessor :webIntegrationId
26
+
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'androidIntegrationId' => :'androidIntegrationId',
32
+ :'iosIntegrationId' => :'iosIntegrationId',
33
+ :'webIntegrationId' => :'webIntegrationId'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'androidIntegrationId' => :'String',
41
+ :'iosIntegrationId' => :'String',
42
+ :'webIntegrationId' => :'String'
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
53
+
54
+ if attributes.has_key?(:'androidIntegrationId')
55
+ self.androidIntegrationId = attributes[:'androidIntegrationId']
56
+ end
57
+
58
+ if attributes.has_key?(:'iosIntegrationId')
59
+ self.iosIntegrationId = attributes[:'iosIntegrationId']
60
+ end
61
+
62
+ if attributes.has_key?(:'webIntegrationId')
63
+ self.webIntegrationId = attributes[:'webIntegrationId']
64
+ end
65
+
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properies with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ if @androidIntegrationId.nil?
73
+ invalid_properties.push("invalid value for 'androidIntegrationId', androidIntegrationId cannot be nil.")
74
+ end
75
+
76
+ if @iosIntegrationId.nil?
77
+ invalid_properties.push("invalid value for 'iosIntegrationId', iosIntegrationId cannot be nil.")
78
+ end
79
+
80
+ if @webIntegrationId.nil?
81
+ invalid_properties.push("invalid value for 'webIntegrationId', webIntegrationId cannot be nil.")
82
+ end
83
+
84
+ return invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ return false if @androidIntegrationId.nil?
91
+ return false if @iosIntegrationId.nil?
92
+ return false if @webIntegrationId.nil?
93
+ return true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ androidIntegrationId == o.androidIntegrationId &&
102
+ iosIntegrationId == o.iosIntegrationId &&
103
+ webIntegrationId == o.webIntegrationId
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
+ [androidIntegrationId, iosIntegrationId, webIntegrationId].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 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 = SmoochApi.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
+
224
+ end
@@ -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: 5.24
6
+ OpenAPI spec version: 5.28
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -111,7 +111,7 @@ module SmoochApi
111
111
  # Use the unread count of the conversation as the application badge. (Optional) Used for *apn* integrations.
112
112
  attr_accessor :autoUpdateBadge
113
113
 
114
- # Flag specifying whether the certificate is production. Returned on successful *apn* integrations.
114
+ # Flag specifying the APN environment to connect to (`production` if true, `sandbox` otherwise). Defaults to value inferred from certificate if not specified. (Optional) Used for *apn* integrations.
115
115
  attr_accessor :production
116
116
 
117
117
  # Your server key from the fcm console. Required for *fcm* integrations.
@@ -159,6 +159,9 @@ module SmoochApi
159
159
  # Smooch will receive all messages sent to this phone number. Required for *messagebird* integrations.
160
160
  attr_accessor :originator
161
161
 
162
+ # The signing key of your MessageBird account. Used to validate the webhooks' origin. (Optional) Used for *messagebird* integrations.
163
+ attr_accessor :signingKey
164
+
162
165
  # This color will be used in the messenger header and the button or tab in idle state. (Optional) Used for *Web Messenger* integrations.
163
166
  attr_accessor :brandColor
164
167
 
@@ -259,6 +262,7 @@ module SmoochApi
259
262
  :'incomingAddress' => :'incomingAddress',
260
263
  :'accessKey' => :'accessKey',
261
264
  :'originator' => :'originator',
265
+ :'signingKey' => :'signingKey',
262
266
  :'brandColor' => :'brandColor',
263
267
  :'fixedIntroPane' => :'fixedIntroPane',
264
268
  :'conversationColor' => :'conversationColor',
@@ -329,6 +333,7 @@ module SmoochApi
329
333
  :'incomingAddress' => :'String',
330
334
  :'accessKey' => :'String',
331
335
  :'originator' => :'String',
336
+ :'signingKey' => :'String',
332
337
  :'brandColor' => :'String',
333
338
  :'fixedIntroPane' => :'BOOLEAN',
334
339
  :'conversationColor' => :'String',
@@ -548,6 +553,10 @@ module SmoochApi
548
553
  self.originator = attributes[:'originator']
549
554
  end
550
555
 
556
+ if attributes.has_key?(:'signingKey')
557
+ self.signingKey = attributes[:'signingKey']
558
+ end
559
+
551
560
  if attributes.has_key?(:'brandColor')
552
561
  self.brandColor = attributes[:'brandColor']
553
562
  end
@@ -694,6 +703,7 @@ module SmoochApi
694
703
  incomingAddress == o.incomingAddress &&
695
704
  accessKey == o.accessKey &&
696
705
  originator == o.originator &&
706
+ signingKey == o.signingKey &&
697
707
  brandColor == o.brandColor &&
698
708
  fixedIntroPane == o.fixedIntroPane &&
699
709
  conversationColor == o.conversationColor &&
@@ -721,7 +731,7 @@ module SmoochApi
721
731
  # Calculates hash code according to all attributes.
722
732
  # @return [Fixnum] Hash code
723
733
  def hash
724
- [id, type, displayName, pageAccessToken, appId, appSecret, accessTokenUrl, webhookSecret, pageId, accountSid, authToken, phoneNumberSid, phoneNumber, name, token, uri, channelId, channelSecret, channelAccessToken, serviceCode, switcherSecret, qrCodeUrl, lineId, botName, encodingAesKey, fromAddress, certificate, deploymentId, baseUrl, hsmFallbackLanguage, password, autoUpdateBadge, production, serverKey, senderId, tier, envName, consumerKey, consumerSecret, accessTokenKey, accessTokenSecret, userId, username, apiKey, domain, incomingAddress, accessKey, originator, brandColor, fixedIntroPane, conversationColor, actionColor, displayStyle, buttonIconUrl, buttonWidth, buttonHeight, integrationOrder, businessName, businessIconUrl, backgroundImageUrl, originWhitelist, hideUnsubscribeLink, status, error].hash
734
+ [id, type, displayName, pageAccessToken, appId, appSecret, accessTokenUrl, webhookSecret, pageId, accountSid, authToken, phoneNumberSid, phoneNumber, name, token, uri, channelId, channelSecret, channelAccessToken, serviceCode, switcherSecret, qrCodeUrl, lineId, botName, encodingAesKey, fromAddress, certificate, deploymentId, baseUrl, hsmFallbackLanguage, password, autoUpdateBadge, production, serverKey, senderId, tier, envName, consumerKey, consumerSecret, accessTokenKey, accessTokenSecret, userId, username, apiKey, domain, incomingAddress, accessKey, originator, signingKey, brandColor, fixedIntroPane, conversationColor, actionColor, displayStyle, buttonIconUrl, buttonWidth, buttonHeight, integrationOrder, businessName, businessIconUrl, backgroundImageUrl, originWhitelist, hideUnsubscribeLink, status, error].hash
725
735
  end
726
736
 
727
737
  # 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: 5.24
6
+ OpenAPI spec version: 5.28
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -84,6 +84,9 @@ module SmoochApi
84
84
  # Use the unread count of the conversation as the application badge. (Optional) Used for *apn* integrations.
85
85
  attr_accessor :autoUpdateBadge
86
86
 
87
+ # Flag specifying the APN environment to connect to (`production` if true, `sandbox` otherwise). Defaults to value inferred from certificate if not specified. (Optional) Used for *apn* integrations.
88
+ attr_accessor :production
89
+
87
90
  # Your server key from the fcm console. Required for *fcm* integrations.
88
91
  attr_accessor :serverKey
89
92
 
@@ -162,6 +165,18 @@ module SmoochApi
162
165
  # When `true`, unsubscribe links will not be included in outbound emails. If this setting is enabled, it is expected that the business is providing the user a way to unsubscribe by some other means. (Optional) Used for *mailgun* integrations.
163
166
  attr_accessor :hideUnsubscribeLink
164
167
 
168
+ # The signing key of your MessageBird account. Used to validate the webhooks' origin. (Optional) Used for *messagebird* integrations.
169
+ attr_accessor :signingKey
170
+
171
+ # The public API key of your Mailgun account. Required for *mailgun* integrations.
172
+ attr_accessor :apiKey
173
+
174
+ # The domain used to relay email. Required for *mailgun* integrations.
175
+ attr_accessor :domain
176
+
177
+ # Smooch will receive all emails sent to this address. Required for *mailgun* integrations.
178
+ attr_accessor :incomingAddress
179
+
165
180
 
166
181
  # Attribute mapping from ruby-style variable name to JSON key.
167
182
  def self.attribute_map
@@ -189,6 +204,7 @@ module SmoochApi
189
204
  :'password' => :'password',
190
205
  :'username' => :'username',
191
206
  :'autoUpdateBadge' => :'autoUpdateBadge',
207
+ :'production' => :'production',
192
208
  :'serverKey' => :'serverKey',
193
209
  :'senderId' => :'senderId',
194
210
  :'tier' => :'tier',
@@ -214,7 +230,11 @@ module SmoochApi
214
230
  :'backgroundImageUrl' => :'backgroundImageUrl',
215
231
  :'originWhitelist' => :'originWhitelist',
216
232
  :'qrCodeUrl' => :'qrCodeUrl',
217
- :'hideUnsubscribeLink' => :'hideUnsubscribeLink'
233
+ :'hideUnsubscribeLink' => :'hideUnsubscribeLink',
234
+ :'signingKey' => :'signingKey',
235
+ :'apiKey' => :'apiKey',
236
+ :'domain' => :'domain',
237
+ :'incomingAddress' => :'incomingAddress'
218
238
  }
219
239
  end
220
240
 
@@ -244,6 +264,7 @@ module SmoochApi
244
264
  :'password' => :'String',
245
265
  :'username' => :'String',
246
266
  :'autoUpdateBadge' => :'BOOLEAN',
267
+ :'production' => :'BOOLEAN',
247
268
  :'serverKey' => :'String',
248
269
  :'senderId' => :'String',
249
270
  :'tier' => :'String',
@@ -269,7 +290,11 @@ module SmoochApi
269
290
  :'backgroundImageUrl' => :'String',
270
291
  :'originWhitelist' => :'Array<String>',
271
292
  :'qrCodeUrl' => :'String',
272
- :'hideUnsubscribeLink' => :'BOOLEAN'
293
+ :'hideUnsubscribeLink' => :'BOOLEAN',
294
+ :'signingKey' => :'String',
295
+ :'apiKey' => :'String',
296
+ :'domain' => :'String',
297
+ :'incomingAddress' => :'String'
273
298
  }
274
299
  end
275
300
 
@@ -373,6 +398,10 @@ module SmoochApi
373
398
  self.autoUpdateBadge = attributes[:'autoUpdateBadge']
374
399
  end
375
400
 
401
+ if attributes.has_key?(:'production')
402
+ self.production = attributes[:'production']
403
+ end
404
+
376
405
  if attributes.has_key?(:'serverKey')
377
406
  self.serverKey = attributes[:'serverKey']
378
407
  end
@@ -481,6 +510,22 @@ module SmoochApi
481
510
  self.hideUnsubscribeLink = attributes[:'hideUnsubscribeLink']
482
511
  end
483
512
 
513
+ if attributes.has_key?(:'signingKey')
514
+ self.signingKey = attributes[:'signingKey']
515
+ end
516
+
517
+ if attributes.has_key?(:'apiKey')
518
+ self.apiKey = attributes[:'apiKey']
519
+ end
520
+
521
+ if attributes.has_key?(:'domain')
522
+ self.domain = attributes[:'domain']
523
+ end
524
+
525
+ if attributes.has_key?(:'incomingAddress')
526
+ self.incomingAddress = attributes[:'incomingAddress']
527
+ end
528
+
484
529
  end
485
530
 
486
531
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -529,6 +574,7 @@ module SmoochApi
529
574
  password == o.password &&
530
575
  username == o.username &&
531
576
  autoUpdateBadge == o.autoUpdateBadge &&
577
+ production == o.production &&
532
578
  serverKey == o.serverKey &&
533
579
  senderId == o.senderId &&
534
580
  tier == o.tier &&
@@ -554,7 +600,11 @@ module SmoochApi
554
600
  backgroundImageUrl == o.backgroundImageUrl &&
555
601
  originWhitelist == o.originWhitelist &&
556
602
  qrCodeUrl == o.qrCodeUrl &&
557
- hideUnsubscribeLink == o.hideUnsubscribeLink
603
+ hideUnsubscribeLink == o.hideUnsubscribeLink &&
604
+ signingKey == o.signingKey &&
605
+ apiKey == o.apiKey &&
606
+ domain == o.domain &&
607
+ incomingAddress == o.incomingAddress
558
608
  end
559
609
 
560
610
  # @see the `==` method
@@ -566,7 +616,7 @@ module SmoochApi
566
616
  # Calculates hash code according to all attributes.
567
617
  # @return [Fixnum] Hash code
568
618
  def hash
569
- [type, displayName, pageAccessToken, appId, appSecret, accountSid, authToken, baseUrl, hsmFallbackLanguage, phoneNumberSid, token, channelId, channelSecret, channelAccessToken, deploymentId, serviceCode, switcherSecret, encodingAesKey, fromAddress, certificate, password, username, autoUpdateBadge, serverKey, senderId, tier, envName, consumerKey, consumerSecret, accessTokenKey, accessTokenSecret, accessTokenUrl, accessKey, originator, brandColor, fixedIntroPane, conversationColor, actionColor, displayStyle, buttonIconUrl, buttonWidth, buttonHeight, integrationOrder, businessName, businessIconUrl, backgroundImageUrl, originWhitelist, qrCodeUrl, hideUnsubscribeLink].hash
619
+ [type, displayName, pageAccessToken, appId, appSecret, accountSid, authToken, baseUrl, hsmFallbackLanguage, phoneNumberSid, token, channelId, channelSecret, channelAccessToken, deploymentId, serviceCode, switcherSecret, encodingAesKey, fromAddress, certificate, password, username, autoUpdateBadge, production, serverKey, senderId, tier, envName, consumerKey, consumerSecret, accessTokenKey, accessTokenSecret, accessTokenUrl, accessKey, originator, brandColor, fixedIntroPane, conversationColor, actionColor, displayStyle, buttonIconUrl, buttonWidth, buttonHeight, integrationOrder, businessName, businessIconUrl, backgroundImageUrl, originWhitelist, qrCodeUrl, hideUnsubscribeLink, signingKey, apiKey, domain, incomingAddress].hash
570
620
  end
571
621
 
572
622
  # Builds the object from hash