sunshine-conversations-client 9.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (536) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG_RB.md +12 -0
  3. data/Gemfile +9 -0
  4. data/LICENSE +176 -0
  5. data/README.md +456 -0
  6. data/Rakefile +10 -0
  7. data/docs/AcceptControlBody.md +17 -0
  8. data/docs/Action.md +41 -0
  9. data/docs/ActionSubset.md +39 -0
  10. data/docs/ActivitiesApi.md +71 -0
  11. data/docs/Activity.md +21 -0
  12. data/docs/ActivityAllOf.md +19 -0
  13. data/docs/ActivityPost.md +19 -0
  14. data/docs/ActivityPostAllOf.md +17 -0
  15. data/docs/ActivityTypes.md +17 -0
  16. data/docs/Android.md +23 -0
  17. data/docs/AndroidAllOf.md +23 -0
  18. data/docs/AndroidUpdate.md +23 -0
  19. data/docs/AndroidUpdateAllOf.md +21 -0
  20. data/docs/ApiKey.md +21 -0
  21. data/docs/App.md +23 -0
  22. data/docs/AppCreateBody.md +21 -0
  23. data/docs/AppKey.md +21 -0
  24. data/docs/AppKeyCreateBody.md +17 -0
  25. data/docs/AppKeyListResponse.md +17 -0
  26. data/docs/AppKeyResponse.md +17 -0
  27. data/docs/AppKeysApi.md +250 -0
  28. data/docs/AppListFilter.md +17 -0
  29. data/docs/AppListResponse.md +21 -0
  30. data/docs/AppResponse.md +17 -0
  31. data/docs/AppSettings.md +31 -0
  32. data/docs/AppSubSchema.md +17 -0
  33. data/docs/AppUpdateBody.md +21 -0
  34. data/docs/Apple.md +23 -0
  35. data/docs/AppleAllOf.md +23 -0
  36. data/docs/AppleUpdate.md +16 -0
  37. data/docs/AppsApi.md +309 -0
  38. data/docs/AttachmentDeleteBody.md +17 -0
  39. data/docs/AttachmentMediaTokenBody.md +17 -0
  40. data/docs/AttachmentMediaTokenResponse.md +17 -0
  41. data/docs/AttachmentResponse.md +17 -0
  42. data/docs/AttachmentSchema.md +19 -0
  43. data/docs/AttachmentUploadBody.md +17 -0
  44. data/docs/AttachmentsApi.md +254 -0
  45. data/docs/Author.md +25 -0
  46. data/docs/AuthorWebhook.md +21 -0
  47. data/docs/Buy.md +25 -0
  48. data/docs/CarouselMessage.md +23 -0
  49. data/docs/CarouselMessageDisplaySettings.md +17 -0
  50. data/docs/Client.md +37 -0
  51. data/docs/ClientAssociation.md +19 -0
  52. data/docs/ClientCreate.md +21 -0
  53. data/docs/ClientListResponse.md +21 -0
  54. data/docs/ClientResponse.md +17 -0
  55. data/docs/ClientType.md +16 -0
  56. data/docs/ClientsApi.md +199 -0
  57. data/docs/Confirmation.md +19 -0
  58. data/docs/Content.md +41 -0
  59. data/docs/Conversation.md +37 -0
  60. data/docs/ConversationAllOf.md +29 -0
  61. data/docs/ConversationCreateBody.md +27 -0
  62. data/docs/ConversationCreateEvent.md +23 -0
  63. data/docs/ConversationCreateEventAllOf.md +17 -0
  64. data/docs/ConversationCreateEventAllOfPayload.md +25 -0
  65. data/docs/ConversationListFilter.md +19 -0
  66. data/docs/ConversationListResponse.md +21 -0
  67. data/docs/ConversationMessageDeliveryChannelEvent.md +23 -0
  68. data/docs/ConversationMessageDeliveryChannelEventAllOf.md +17 -0
  69. data/docs/ConversationMessageDeliveryFailureEvent.md +23 -0
  70. data/docs/ConversationMessageDeliveryFailureEventAllOf.md +17 -0
  71. data/docs/ConversationMessageDeliveryPayload.md +27 -0
  72. data/docs/ConversationMessageDeliveryPayloadDestination.md +19 -0
  73. data/docs/ConversationMessageDeliveryPayloadExternalMessages.md +17 -0
  74. data/docs/ConversationMessageDeliveryPayloadMessage.md +17 -0
  75. data/docs/ConversationMessageDeliveryUserEvent.md +23 -0
  76. data/docs/ConversationMessageEvent.md +23 -0
  77. data/docs/ConversationMessageEventAllOf.md +17 -0
  78. data/docs/ConversationMessageEventAllOfPayload.md +21 -0
  79. data/docs/ConversationPostbackEvent.md +23 -0
  80. data/docs/ConversationPostbackEventAllOf.md +17 -0
  81. data/docs/ConversationPostbackEventAllOfPayload.md +23 -0
  82. data/docs/ConversationReadEvent.md +23 -0
  83. data/docs/ConversationReadEventAllOf.md +17 -0
  84. data/docs/ConversationReadEventAllOfPayload.md +19 -0
  85. data/docs/ConversationResponse.md +17 -0
  86. data/docs/ConversationTruncated.md +23 -0
  87. data/docs/ConversationType.md +16 -0
  88. data/docs/ConversationTypingEvent.md +23 -0
  89. data/docs/ConversationTypingEventAllOf.md +17 -0
  90. data/docs/ConversationTypingEventAllOfPayload.md +19 -0
  91. data/docs/ConversationUpdateBody.md +23 -0
  92. data/docs/ConversationsApi.md +319 -0
  93. data/docs/Custom.md +19 -0
  94. data/docs/CustomAllOf.md +19 -0
  95. data/docs/CustomIntegrationApiKeysApi.md +258 -0
  96. data/docs/CustomUpdate.md +16 -0
  97. data/docs/Destination.md +19 -0
  98. data/docs/Device.md +35 -0
  99. data/docs/EventSubSchema.md +21 -0
  100. data/docs/ExtraChannelOptions.md +17 -0
  101. data/docs/ExtraChannelOptionsMessenger.md +19 -0
  102. data/docs/Field.md +35 -0
  103. data/docs/FileMessage.md +25 -0
  104. data/docs/FormMessage.md +21 -0
  105. data/docs/FormResponseMessage.md +21 -0
  106. data/docs/ImageMessage.md +23 -0
  107. data/docs/InlineObject.md +23 -0
  108. data/docs/Integration.md +23 -0
  109. data/docs/IntegrationApiKey.md +17 -0
  110. data/docs/IntegrationApiKeyListResponse.md +17 -0
  111. data/docs/IntegrationApiKeyResponse.md +17 -0
  112. data/docs/IntegrationId.md +17 -0
  113. data/docs/IntegrationListFilter.md +17 -0
  114. data/docs/IntegrationListResponse.md +21 -0
  115. data/docs/IntegrationResponse.md +17 -0
  116. data/docs/IntegrationType.md +17 -0
  117. data/docs/IntegrationUpdate.md +71 -0
  118. data/docs/IntegrationUpdateBase.md +17 -0
  119. data/docs/IntegrationsApi.md +319 -0
  120. data/docs/Ios.md +27 -0
  121. data/docs/IosAllOf.md +27 -0
  122. data/docs/IosUpdate.md +27 -0
  123. data/docs/IosUpdateAllOf.md +25 -0
  124. data/docs/Item.md +29 -0
  125. data/docs/Line.md +31 -0
  126. data/docs/LineAllOf.md +31 -0
  127. data/docs/LineUpdate.md +16 -0
  128. data/docs/Link.md +27 -0
  129. data/docs/Links.md +19 -0
  130. data/docs/ListMessage.md +21 -0
  131. data/docs/LocationMessage.md +23 -0
  132. data/docs/LocationMessageCoordinates.md +19 -0
  133. data/docs/LocationMessageLocation.md +19 -0
  134. data/docs/LocationRequest.md +21 -0
  135. data/docs/Mailgun.md +27 -0
  136. data/docs/MailgunAllOf.md +27 -0
  137. data/docs/MailgunUpdate.md +21 -0
  138. data/docs/MailgunUpdateAllOf.md +19 -0
  139. data/docs/MatchCriteria.md +27 -0
  140. data/docs/MatchCriteriaBase.md +21 -0
  141. data/docs/MatchCriteriaMailgun.md +25 -0
  142. data/docs/MatchCriteriaMailgunAllOf.md +21 -0
  143. data/docs/MatchCriteriaMessagebird.md +23 -0
  144. data/docs/MatchCriteriaMessagebirdAllOf.md +19 -0
  145. data/docs/MatchCriteriaTwilio.md +23 -0
  146. data/docs/MatchCriteriaTwilioAllOf.md +19 -0
  147. data/docs/MatchCriteriaWhatsapp.md +23 -0
  148. data/docs/MatchCriteriaWhatsappAllOf.md +19 -0
  149. data/docs/Message.md +31 -0
  150. data/docs/MessageBirdUpdate.md +16 -0
  151. data/docs/MessageListResponse.md +21 -0
  152. data/docs/MessageOverride.md +23 -0
  153. data/docs/MessageOverrideApple.md +17 -0
  154. data/docs/MessageOverrideLine.md +17 -0
  155. data/docs/MessageOverrideMessenger.md +17 -0
  156. data/docs/MessageOverridePayload.md +17 -0
  157. data/docs/MessageOverrideWhatsapp.md +17 -0
  158. data/docs/MessagePost.md +27 -0
  159. data/docs/MessagePostResponse.md +17 -0
  160. data/docs/MessageWebhook.md +31 -0
  161. data/docs/Messagebird.md +25 -0
  162. data/docs/MessagebirdAllOf.md +25 -0
  163. data/docs/MessagesApi.md +260 -0
  164. data/docs/Messenger.md +23 -0
  165. data/docs/MessengerAllOf.md +23 -0
  166. data/docs/MessengerUpdate.md +19 -0
  167. data/docs/MessengerUpdateAllOf.md +17 -0
  168. data/docs/Meta.md +21 -0
  169. data/docs/OAuthEndpointsApi.md +168 -0
  170. data/docs/OfferControlBody.md +19 -0
  171. data/docs/Page.md +21 -0
  172. data/docs/Participant.md +27 -0
  173. data/docs/ParticipantJoinBody.md +16 -0
  174. data/docs/ParticipantLeaveBody.md +21 -0
  175. data/docs/ParticipantLeaveBodyParticipantId.md +17 -0
  176. data/docs/ParticipantLeaveBodyUserExternalId.md +17 -0
  177. data/docs/ParticipantLeaveBodyUserId.md +17 -0
  178. data/docs/ParticipantListResponse.md +21 -0
  179. data/docs/ParticipantResponse.md +17 -0
  180. data/docs/ParticipantSubSchema.md +21 -0
  181. data/docs/ParticipantWithUserExternalId.md +19 -0
  182. data/docs/ParticipantWithUserId.md +19 -0
  183. data/docs/ParticipantsApi.md +199 -0
  184. data/docs/PassControlBody.md +19 -0
  185. data/docs/Postback.md +23 -0
  186. data/docs/PostbackWebhook.md +19 -0
  187. data/docs/PrechatCapture.md +23 -0
  188. data/docs/Profile.md +23 -0
  189. data/docs/QuotedMessage.md +21 -0
  190. data/docs/QuotedMessageExternalMessageId.md +19 -0
  191. data/docs/QuotedMessageMessage.md +19 -0
  192. data/docs/Referral.md +19 -0
  193. data/docs/ReferralDetails.md +21 -0
  194. data/docs/Reply.md +25 -0
  195. data/docs/Source.md +27 -0
  196. data/docs/SourceWebhook.md +27 -0
  197. data/docs/Status.md +16 -0
  198. data/docs/Switchboard.md +21 -0
  199. data/docs/SwitchboardAcceptControl.md +23 -0
  200. data/docs/SwitchboardAcceptControlAllOf.md +17 -0
  201. data/docs/SwitchboardAcceptControlAllOfPayload.md +19 -0
  202. data/docs/SwitchboardAcceptControlFailure.md +23 -0
  203. data/docs/SwitchboardAcceptControlFailureAllOf.md +17 -0
  204. data/docs/SwitchboardAcceptControlFailureAllOfPayload.md +21 -0
  205. data/docs/SwitchboardActionsApi.md +197 -0
  206. data/docs/SwitchboardIntegration.md +29 -0
  207. data/docs/SwitchboardIntegrationCreateBody.md +27 -0
  208. data/docs/SwitchboardIntegrationListResponse.md +17 -0
  209. data/docs/SwitchboardIntegrationResponse.md +17 -0
  210. data/docs/SwitchboardIntegrationUpdateBody.md +27 -0
  211. data/docs/SwitchboardIntegrationWebhook.md +23 -0
  212. data/docs/SwitchboardIntegrationsApi.md +260 -0
  213. data/docs/SwitchboardListResponse.md +17 -0
  214. data/docs/SwitchboardOfferControl.md +23 -0
  215. data/docs/SwitchboardOfferControlAllOf.md +17 -0
  216. data/docs/SwitchboardOfferControlAllOfPayload.md +19 -0
  217. data/docs/SwitchboardOfferControlFailure.md +23 -0
  218. data/docs/SwitchboardPassControl.md +23 -0
  219. data/docs/SwitchboardPassControlAllOf.md +17 -0
  220. data/docs/SwitchboardPassControlAllOfPayload.md +19 -0
  221. data/docs/SwitchboardPassControlFailure.md +23 -0
  222. data/docs/SwitchboardResponse.md +17 -0
  223. data/docs/SwitchboardUpdateBody.md +19 -0
  224. data/docs/SwitchboardsApi.md +250 -0
  225. data/docs/Target.md +17 -0
  226. data/docs/Telegram.md +23 -0
  227. data/docs/TelegramAllOf.md +23 -0
  228. data/docs/TelegramUpdate.md +16 -0
  229. data/docs/TextMessage.md +21 -0
  230. data/docs/Twilio.md +23 -0
  231. data/docs/TwilioAllOf.md +23 -0
  232. data/docs/TwilioUpdate.md +16 -0
  233. data/docs/Twitter.md +29 -0
  234. data/docs/TwitterAllOf.md +29 -0
  235. data/docs/TwitterUpdate.md +16 -0
  236. data/docs/User.md +25 -0
  237. data/docs/UserAllOf.md +21 -0
  238. data/docs/UserCreateBody.md +23 -0
  239. data/docs/UserMergeEvent.md +23 -0
  240. data/docs/UserMergeEventAllOf.md +17 -0
  241. data/docs/UserMergeEventAllOfPayload.md +21 -0
  242. data/docs/UserMergeEventAllOfPayloadMergedConversations.md +19 -0
  243. data/docs/UserMergeEventAllOfPayloadMergedUsers.md +19 -0
  244. data/docs/UserResponse.md +17 -0
  245. data/docs/UserTruncated.md +19 -0
  246. data/docs/UserUpdateBody.md +21 -0
  247. data/docs/UsersApi.md +315 -0
  248. data/docs/Viber.md +23 -0
  249. data/docs/ViberAllOf.md +23 -0
  250. data/docs/ViberUpdate.md +16 -0
  251. data/docs/Web.md +47 -0
  252. data/docs/WebAllOf.md +47 -0
  253. data/docs/WebUpdate.md +47 -0
  254. data/docs/WebUpdateAllOf.md +45 -0
  255. data/docs/Webhook.md +29 -0
  256. data/docs/WebhookBody.md +23 -0
  257. data/docs/WebhookCreateBody.md +16 -0
  258. data/docs/WebhookListResponse.md +17 -0
  259. data/docs/WebhookResponse.md +17 -0
  260. data/docs/WebhookSubSchema.md +19 -0
  261. data/docs/WebhooksApi.md +323 -0
  262. data/docs/Webview.md +33 -0
  263. data/docs/WhatsAppUpdate.md +23 -0
  264. data/docs/WhatsAppUpdateAllOf.md +21 -0
  265. data/docs/Whatsapp.md +25 -0
  266. data/docs/WhatsappAllOf.md +25 -0
  267. data/lib/sunshine-conversations-client.rb +306 -0
  268. data/lib/sunshine-conversations-client/api/activities_api.rb +95 -0
  269. data/lib/sunshine-conversations-client/api/app_keys_api.rb +287 -0
  270. data/lib/sunshine-conversations-client/api/apps_api.rb +339 -0
  271. data/lib/sunshine-conversations-client/api/attachments_api.rb +305 -0
  272. data/lib/sunshine-conversations-client/api/clients_api.rb +240 -0
  273. data/lib/sunshine-conversations-client/api/conversations_api.rb +373 -0
  274. data/lib/sunshine-conversations-client/api/custom_integration_api_keys_api.rb +311 -0
  275. data/lib/sunshine-conversations-client/api/integrations_api.rb +369 -0
  276. data/lib/sunshine-conversations-client/api/messages_api.rb +308 -0
  277. data/lib/sunshine-conversations-client/api/o_auth_endpoints_api.rb +213 -0
  278. data/lib/sunshine-conversations-client/api/participants_api.rb +242 -0
  279. data/lib/sunshine-conversations-client/api/switchboard_actions_api.rb +247 -0
  280. data/lib/sunshine-conversations-client/api/switchboard_integrations_api.rb +319 -0
  281. data/lib/sunshine-conversations-client/api/switchboards_api.rb +287 -0
  282. data/lib/sunshine-conversations-client/api/users_api.rb +369 -0
  283. data/lib/sunshine-conversations-client/api/webhooks_api.rb +393 -0
  284. data/lib/sunshine-conversations-client/api_client.rb +348 -0
  285. data/lib/sunshine-conversations-client/api_error.rb +54 -0
  286. data/lib/sunshine-conversations-client/configuration.rb +284 -0
  287. data/lib/sunshine-conversations-client/models/accept_control_body.rb +204 -0
  288. data/lib/sunshine-conversations-client/models/action.rb +421 -0
  289. data/lib/sunshine-conversations-client/models/action_subset.rb +409 -0
  290. data/lib/sunshine-conversations-client/models/activity.rb +265 -0
  291. data/lib/sunshine-conversations-client/models/activity_all_of.rb +213 -0
  292. data/lib/sunshine-conversations-client/models/activity_post.rb +266 -0
  293. data/lib/sunshine-conversations-client/models/activity_post_all_of.rb +204 -0
  294. data/lib/sunshine-conversations-client/models/activity_types.rb +238 -0
  295. data/lib/sunshine-conversations-client/models/android.rb +280 -0
  296. data/lib/sunshine-conversations-client/models/android_all_of.rb +268 -0
  297. data/lib/sunshine-conversations-client/models/android_update.rb +299 -0
  298. data/lib/sunshine-conversations-client/models/android_update_all_of.rb +256 -0
  299. data/lib/sunshine-conversations-client/models/api_key.rb +225 -0
  300. data/lib/sunshine-conversations-client/models/app.rb +234 -0
  301. data/lib/sunshine-conversations-client/models/app_create_body.rb +229 -0
  302. data/lib/sunshine-conversations-client/models/app_key.rb +224 -0
  303. data/lib/sunshine-conversations-client/models/app_key_create_body.rb +209 -0
  304. data/lib/sunshine-conversations-client/models/app_key_list_response.rb +203 -0
  305. data/lib/sunshine-conversations-client/models/app_key_response.rb +204 -0
  306. data/lib/sunshine-conversations-client/models/app_list_filter.rb +204 -0
  307. data/lib/sunshine-conversations-client/models/app_list_response.rb +221 -0
  308. data/lib/sunshine-conversations-client/models/app_response.rb +204 -0
  309. data/lib/sunshine-conversations-client/models/app_settings.rb +290 -0
  310. data/lib/sunshine-conversations-client/models/app_sub_schema.rb +205 -0
  311. data/lib/sunshine-conversations-client/models/app_update_body.rb +224 -0
  312. data/lib/sunshine-conversations-client/models/apple.rb +263 -0
  313. data/lib/sunshine-conversations-client/models/apple_all_of.rb +252 -0
  314. data/lib/sunshine-conversations-client/models/apple_update.rb +205 -0
  315. data/lib/sunshine-conversations-client/models/attachment_delete_body.rb +209 -0
  316. data/lib/sunshine-conversations-client/models/attachment_media_token_body.rb +208 -0
  317. data/lib/sunshine-conversations-client/models/attachment_media_token_response.rb +203 -0
  318. data/lib/sunshine-conversations-client/models/attachment_response.rb +204 -0
  319. data/lib/sunshine-conversations-client/models/attachment_schema.rb +214 -0
  320. data/lib/sunshine-conversations-client/models/attachment_upload_body.rb +208 -0
  321. data/lib/sunshine-conversations-client/models/author.rb +284 -0
  322. data/lib/sunshine-conversations-client/models/author_webhook.rb +264 -0
  323. data/lib/sunshine-conversations-client/models/buy.rb +262 -0
  324. data/lib/sunshine-conversations-client/models/carousel_message.rb +245 -0
  325. data/lib/sunshine-conversations-client/models/carousel_message_display_settings.rb +239 -0
  326. data/lib/sunshine-conversations-client/models/client.rb +345 -0
  327. data/lib/sunshine-conversations-client/models/client_association.rb +213 -0
  328. data/lib/sunshine-conversations-client/models/client_create.rb +236 -0
  329. data/lib/sunshine-conversations-client/models/client_list_response.rb +221 -0
  330. data/lib/sunshine-conversations-client/models/client_response.rb +203 -0
  331. data/lib/sunshine-conversations-client/models/client_type.rb +42 -0
  332. data/lib/sunshine-conversations-client/models/confirmation.rb +254 -0
  333. data/lib/sunshine-conversations-client/models/content.rb +380 -0
  334. data/lib/sunshine-conversations-client/models/conversation.rb +366 -0
  335. data/lib/sunshine-conversations-client/models/conversation_all_of.rb +317 -0
  336. data/lib/sunshine-conversations-client/models/conversation_create_body.rb +308 -0
  337. data/lib/sunshine-conversations-client/models/conversation_create_event.rb +241 -0
  338. data/lib/sunshine-conversations-client/models/conversation_create_event_all_of.rb +203 -0
  339. data/lib/sunshine-conversations-client/models/conversation_create_event_all_of_payload.rb +281 -0
  340. data/lib/sunshine-conversations-client/models/conversation_list_filter.rb +214 -0
  341. data/lib/sunshine-conversations-client/models/conversation_list_response.rb +221 -0
  342. data/lib/sunshine-conversations-client/models/conversation_message_delivery_channel_event.rb +241 -0
  343. data/lib/sunshine-conversations-client/models/conversation_message_delivery_channel_event_all_of.rb +203 -0
  344. data/lib/sunshine-conversations-client/models/conversation_message_delivery_failure_event.rb +241 -0
  345. data/lib/sunshine-conversations-client/models/conversation_message_delivery_failure_event_all_of.rb +203 -0
  346. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload.rb +253 -0
  347. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_destination.rb +215 -0
  348. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_external_messages.rb +204 -0
  349. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_message.rb +205 -0
  350. data/lib/sunshine-conversations-client/models/conversation_message_delivery_user_event.rb +241 -0
  351. data/lib/sunshine-conversations-client/models/conversation_message_event.rb +241 -0
  352. data/lib/sunshine-conversations-client/models/conversation_message_event_all_of.rb +203 -0
  353. data/lib/sunshine-conversations-client/models/conversation_message_event_all_of_payload.rb +224 -0
  354. data/lib/sunshine-conversations-client/models/conversation_postback_event.rb +241 -0
  355. data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of.rb +203 -0
  356. data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of_payload.rb +235 -0
  357. data/lib/sunshine-conversations-client/models/conversation_read_event.rb +241 -0
  358. data/lib/sunshine-conversations-client/models/conversation_read_event_all_of.rb +203 -0
  359. data/lib/sunshine-conversations-client/models/conversation_read_event_all_of_payload.rb +215 -0
  360. data/lib/sunshine-conversations-client/models/conversation_response.rb +204 -0
  361. data/lib/sunshine-conversations-client/models/conversation_truncated.rb +235 -0
  362. data/lib/sunshine-conversations-client/models/conversation_type.rb +33 -0
  363. data/lib/sunshine-conversations-client/models/conversation_typing_event.rb +241 -0
  364. data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of.rb +203 -0
  365. data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of_payload.rb +215 -0
  366. data/lib/sunshine-conversations-client/models/conversation_update_body.rb +285 -0
  367. data/lib/sunshine-conversations-client/models/custom.rb +232 -0
  368. data/lib/sunshine-conversations-client/models/custom_all_of.rb +220 -0
  369. data/lib/sunshine-conversations-client/models/custom_update.rb +205 -0
  370. data/lib/sunshine-conversations-client/models/destination.rb +239 -0
  371. data/lib/sunshine-conversations-client/models/device.rb +343 -0
  372. data/lib/sunshine-conversations-client/models/event_sub_schema.rb +224 -0
  373. data/lib/sunshine-conversations-client/models/extra_channel_options.rb +204 -0
  374. data/lib/sunshine-conversations-client/models/extra_channel_options_messenger.rb +251 -0
  375. data/lib/sunshine-conversations-client/models/field.rb +522 -0
  376. data/lib/sunshine-conversations-client/models/file_message.rb +256 -0
  377. data/lib/sunshine-conversations-client/models/form_message.rb +236 -0
  378. data/lib/sunshine-conversations-client/models/form_response_message.rb +236 -0
  379. data/lib/sunshine-conversations-client/models/image_message.rb +245 -0
  380. data/lib/sunshine-conversations-client/models/inline_object.rb +254 -0
  381. data/lib/sunshine-conversations-client/models/integration.rb +260 -0
  382. data/lib/sunshine-conversations-client/models/integration_api_key.rb +209 -0
  383. data/lib/sunshine-conversations-client/models/integration_api_key_list_response.rb +203 -0
  384. data/lib/sunshine-conversations-client/models/integration_api_key_response.rb +203 -0
  385. data/lib/sunshine-conversations-client/models/integration_id.rb +204 -0
  386. data/lib/sunshine-conversations-client/models/integration_list_filter.rb +204 -0
  387. data/lib/sunshine-conversations-client/models/integration_list_response.rb +221 -0
  388. data/lib/sunshine-conversations-client/models/integration_response.rb +203 -0
  389. data/lib/sunshine-conversations-client/models/integration_type.rb +204 -0
  390. data/lib/sunshine-conversations-client/models/integration_update.rb +619 -0
  391. data/lib/sunshine-conversations-client/models/integration_update_base.rb +229 -0
  392. data/lib/sunshine-conversations-client/models/ios.rb +284 -0
  393. data/lib/sunshine-conversations-client/models/ios_all_of.rb +272 -0
  394. data/lib/sunshine-conversations-client/models/ios_update.rb +303 -0
  395. data/lib/sunshine-conversations-client/models/ios_update_all_of.rb +260 -0
  396. data/lib/sunshine-conversations-client/models/item.rb +381 -0
  397. data/lib/sunshine-conversations-client/models/line.rb +313 -0
  398. data/lib/sunshine-conversations-client/models/line_all_of.rb +302 -0
  399. data/lib/sunshine-conversations-client/models/line_update.rb +205 -0
  400. data/lib/sunshine-conversations-client/models/link.rb +272 -0
  401. data/lib/sunshine-conversations-client/models/links.rb +215 -0
  402. data/lib/sunshine-conversations-client/models/list_message.rb +235 -0
  403. data/lib/sunshine-conversations-client/models/location_message.rb +245 -0
  404. data/lib/sunshine-conversations-client/models/location_message_coordinates.rb +225 -0
  405. data/lib/sunshine-conversations-client/models/location_message_location.rb +215 -0
  406. data/lib/sunshine-conversations-client/models/location_request.rb +238 -0
  407. data/lib/sunshine-conversations-client/models/mailgun.rb +356 -0
  408. data/lib/sunshine-conversations-client/models/mailgun_all_of.rb +345 -0
  409. data/lib/sunshine-conversations-client/models/mailgun_update.rb +273 -0
  410. data/lib/sunshine-conversations-client/models/mailgun_update_all_of.rb +230 -0
  411. data/lib/sunshine-conversations-client/models/match_criteria.rb +312 -0
  412. data/lib/sunshine-conversations-client/models/match_criteria_base.rb +237 -0
  413. data/lib/sunshine-conversations-client/models/match_criteria_mailgun.rb +273 -0
  414. data/lib/sunshine-conversations-client/models/match_criteria_mailgun_all_of.rb +234 -0
  415. data/lib/sunshine-conversations-client/models/match_criteria_messagebird.rb +261 -0
  416. data/lib/sunshine-conversations-client/models/match_criteria_messagebird_all_of.rb +222 -0
  417. data/lib/sunshine-conversations-client/models/match_criteria_twilio.rb +261 -0
  418. data/lib/sunshine-conversations-client/models/match_criteria_twilio_all_of.rb +222 -0
  419. data/lib/sunshine-conversations-client/models/match_criteria_whatsapp.rb +261 -0
  420. data/lib/sunshine-conversations-client/models/match_criteria_whatsapp_all_of.rb +222 -0
  421. data/lib/sunshine-conversations-client/models/message.rb +274 -0
  422. data/lib/sunshine-conversations-client/models/message_bird_update.rb +205 -0
  423. data/lib/sunshine-conversations-client/models/message_list_response.rb +221 -0
  424. data/lib/sunshine-conversations-client/models/message_override.rb +253 -0
  425. data/lib/sunshine-conversations-client/models/message_override_apple.rb +203 -0
  426. data/lib/sunshine-conversations-client/models/message_override_line.rb +203 -0
  427. data/lib/sunshine-conversations-client/models/message_override_messenger.rb +203 -0
  428. data/lib/sunshine-conversations-client/models/message_override_payload.rb +204 -0
  429. data/lib/sunshine-conversations-client/models/message_override_whatsapp.rb +203 -0
  430. data/lib/sunshine-conversations-client/models/message_post.rb +263 -0
  431. data/lib/sunshine-conversations-client/models/message_post_response.rb +203 -0
  432. data/lib/sunshine-conversations-client/models/message_webhook.rb +274 -0
  433. data/lib/sunshine-conversations-client/models/messagebird.rb +330 -0
  434. data/lib/sunshine-conversations-client/models/messagebird_all_of.rb +319 -0
  435. data/lib/sunshine-conversations-client/models/messenger.rb +263 -0
  436. data/lib/sunshine-conversations-client/models/messenger_all_of.rb +252 -0
  437. data/lib/sunshine-conversations-client/models/messenger_update.rb +247 -0
  438. data/lib/sunshine-conversations-client/models/messenger_update_all_of.rb +204 -0
  439. data/lib/sunshine-conversations-client/models/meta.rb +225 -0
  440. data/lib/sunshine-conversations-client/models/offer_control_body.rb +219 -0
  441. data/lib/sunshine-conversations-client/models/page.rb +250 -0
  442. data/lib/sunshine-conversations-client/models/participant.rb +255 -0
  443. data/lib/sunshine-conversations-client/models/participant_join_body.rb +205 -0
  444. data/lib/sunshine-conversations-client/models/participant_leave_body.rb +249 -0
  445. data/lib/sunshine-conversations-client/models/participant_leave_body_participant_id.rb +204 -0
  446. data/lib/sunshine-conversations-client/models/participant_leave_body_user_external_id.rb +204 -0
  447. data/lib/sunshine-conversations-client/models/participant_leave_body_user_id.rb +204 -0
  448. data/lib/sunshine-conversations-client/models/participant_list_response.rb +221 -0
  449. data/lib/sunshine-conversations-client/models/participant_response.rb +204 -0
  450. data/lib/sunshine-conversations-client/models/participant_sub_schema.rb +244 -0
  451. data/lib/sunshine-conversations-client/models/participant_with_user_external_id.rb +214 -0
  452. data/lib/sunshine-conversations-client/models/participant_with_user_id.rb +214 -0
  453. data/lib/sunshine-conversations-client/models/pass_control_body.rb +219 -0
  454. data/lib/sunshine-conversations-client/models/postback.rb +252 -0
  455. data/lib/sunshine-conversations-client/models/postback_webhook.rb +215 -0
  456. data/lib/sunshine-conversations-client/models/prechat_capture.rb +239 -0
  457. data/lib/sunshine-conversations-client/models/profile.rb +335 -0
  458. data/lib/sunshine-conversations-client/models/quoted_message.rb +249 -0
  459. data/lib/sunshine-conversations-client/models/quoted_message_external_message_id.rb +216 -0
  460. data/lib/sunshine-conversations-client/models/quoted_message_message.rb +215 -0
  461. data/lib/sunshine-conversations-client/models/referral.rb +214 -0
  462. data/lib/sunshine-conversations-client/models/referral_details.rb +226 -0
  463. data/lib/sunshine-conversations-client/models/reply.rb +260 -0
  464. data/lib/sunshine-conversations-client/models/source.rb +265 -0
  465. data/lib/sunshine-conversations-client/models/source_webhook.rb +258 -0
  466. data/lib/sunshine-conversations-client/models/status.rb +34 -0
  467. data/lib/sunshine-conversations-client/models/switchboard.rb +234 -0
  468. data/lib/sunshine-conversations-client/models/switchboard_accept_control.rb +241 -0
  469. data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of.rb +203 -0
  470. data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of_payload.rb +216 -0
  471. data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure.rb +241 -0
  472. data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of.rb +203 -0
  473. data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of_payload.rb +226 -0
  474. data/lib/sunshine-conversations-client/models/switchboard_integration.rb +333 -0
  475. data/lib/sunshine-conversations-client/models/switchboard_integration_create_body.rb +302 -0
  476. data/lib/sunshine-conversations-client/models/switchboard_integration_list_response.rb +203 -0
  477. data/lib/sunshine-conversations-client/models/switchboard_integration_response.rb +204 -0
  478. data/lib/sunshine-conversations-client/models/switchboard_integration_update_body.rb +294 -0
  479. data/lib/sunshine-conversations-client/models/switchboard_integration_webhook.rb +249 -0
  480. data/lib/sunshine-conversations-client/models/switchboard_list_response.rb +203 -0
  481. data/lib/sunshine-conversations-client/models/switchboard_offer_control.rb +241 -0
  482. data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of.rb +203 -0
  483. data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of_payload.rb +216 -0
  484. data/lib/sunshine-conversations-client/models/switchboard_offer_control_failure.rb +241 -0
  485. data/lib/sunshine-conversations-client/models/switchboard_pass_control.rb +241 -0
  486. data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of.rb +203 -0
  487. data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of_payload.rb +216 -0
  488. data/lib/sunshine-conversations-client/models/switchboard_pass_control_failure.rb +241 -0
  489. data/lib/sunshine-conversations-client/models/switchboard_response.rb +204 -0
  490. data/lib/sunshine-conversations-client/models/switchboard_update_body.rb +214 -0
  491. data/lib/sunshine-conversations-client/models/target.rb +210 -0
  492. data/lib/sunshine-conversations-client/models/telegram.rb +272 -0
  493. data/lib/sunshine-conversations-client/models/telegram_all_of.rb +261 -0
  494. data/lib/sunshine-conversations-client/models/telegram_update.rb +205 -0
  495. data/lib/sunshine-conversations-client/models/text_message.rb +245 -0
  496. data/lib/sunshine-conversations-client/models/twilio.rb +301 -0
  497. data/lib/sunshine-conversations-client/models/twilio_all_of.rb +290 -0
  498. data/lib/sunshine-conversations-client/models/twilio_update.rb +205 -0
  499. data/lib/sunshine-conversations-client/models/twitter.rb +419 -0
  500. data/lib/sunshine-conversations-client/models/twitter_all_of.rb +408 -0
  501. data/lib/sunshine-conversations-client/models/twitter_update.rb +205 -0
  502. data/lib/sunshine-conversations-client/models/user.rb +250 -0
  503. data/lib/sunshine-conversations-client/models/user_all_of.rb +221 -0
  504. data/lib/sunshine-conversations-client/models/user_create_body.rb +267 -0
  505. data/lib/sunshine-conversations-client/models/user_merge_event.rb +241 -0
  506. data/lib/sunshine-conversations-client/models/user_merge_event_all_of.rb +203 -0
  507. data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload.rb +225 -0
  508. data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_conversations.rb +215 -0
  509. data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_users.rb +215 -0
  510. data/lib/sunshine-conversations-client/models/user_response.rb +204 -0
  511. data/lib/sunshine-conversations-client/models/user_truncated.rb +215 -0
  512. data/lib/sunshine-conversations-client/models/user_update_body.rb +223 -0
  513. data/lib/sunshine-conversations-client/models/viber.rb +272 -0
  514. data/lib/sunshine-conversations-client/models/viber_all_of.rb +261 -0
  515. data/lib/sunshine-conversations-client/models/viber_update.rb +205 -0
  516. data/lib/sunshine-conversations-client/models/web.rb +383 -0
  517. data/lib/sunshine-conversations-client/models/web_all_of.rb +372 -0
  518. data/lib/sunshine-conversations-client/models/web_update.rb +402 -0
  519. data/lib/sunshine-conversations-client/models/web_update_all_of.rb +360 -0
  520. data/lib/sunshine-conversations-client/models/webhook.rb +277 -0
  521. data/lib/sunshine-conversations-client/models/webhook_body.rb +237 -0
  522. data/lib/sunshine-conversations-client/models/webhook_create_body.rb +205 -0
  523. data/lib/sunshine-conversations-client/models/webhook_list_response.rb +203 -0
  524. data/lib/sunshine-conversations-client/models/webhook_response.rb +204 -0
  525. data/lib/sunshine-conversations-client/models/webhook_sub_schema.rb +215 -0
  526. data/lib/sunshine-conversations-client/models/webview.rb +339 -0
  527. data/lib/sunshine-conversations-client/models/whats_app_update.rb +272 -0
  528. data/lib/sunshine-conversations-client/models/whats_app_update_all_of.rb +229 -0
  529. data/lib/sunshine-conversations-client/models/whatsapp.rb +268 -0
  530. data/lib/sunshine-conversations-client/models/whatsapp_all_of.rb +257 -0
  531. data/lib/sunshine-conversations-client/version.rb +12 -0
  532. data/spec/api_client_spec.rb +223 -0
  533. data/spec/configuration_spec.rb +39 -0
  534. data/spec/spec_helper.rb +108 -0
  535. data/sunshine-conversations-client.gemspec +36 -0
  536. metadata +641 -0
@@ -0,0 +1,215 @@
1
+ =begin
2
+ #Sunshine Conversations API
3
+
4
+ The version of the OpenAPI document: 9.1.0
5
+
6
+ Generated by: https://openapi-generator.tech
7
+ OpenAPI Generator version: 4.3.1
8
+ =end
9
+
10
+ require 'date'
11
+
12
+ module SunshineConversationsClient
13
+ class UserTruncated
14
+ # The unique ID of the user.
15
+ attr_accessor :id
16
+
17
+ # An optional ID that if specified can also be used to retrieve the user.
18
+ attr_accessor :external_id
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'id' => :'id',
24
+ :'external_id' => :'externalId'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'id' => :'String',
32
+ :'external_id' => :'String'
33
+ }
34
+ end
35
+
36
+ # List of attributes with nullable: true
37
+ def self.openapi_nullable
38
+ Set.new([
39
+ :'external_id'
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::UserTruncated` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::UserTruncated`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'id')
59
+ self.id = attributes[:'id']
60
+ end
61
+
62
+ if attributes.key?(:'external_id')
63
+ self.external_id = attributes[:'external_id']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ id == o.id &&
86
+ external_id == o.external_id
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [id, external_id].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if 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 # or else data not found in attributes(hash), not an issue as the data can be optional
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 :DateTime
135
+ DateTime.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
+ SunshineConversationsClient.const_get(type).build_from_hash(value)
166
+ end
167
+ end
168
+
169
+ # Returns the string representation of the object
170
+ # @return [String] String presentation of the object
171
+ def to_s
172
+ to_hash.to_s
173
+ end
174
+
175
+ # to_body is an alias to to_hash (backward compatibility)
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_body
178
+ to_hash
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+ end
215
+ end
@@ -0,0 +1,223 @@
1
+ =begin
2
+ #Sunshine Conversations API
3
+
4
+ The version of the OpenAPI document: 9.1.0
5
+
6
+ Generated by: https://openapi-generator.tech
7
+ OpenAPI Generator version: 4.3.1
8
+ =end
9
+
10
+ require 'date'
11
+
12
+ module SunshineConversationsClient
13
+ class UserUpdateBody
14
+ attr_accessor :signed_up_at
15
+
16
+ attr_accessor :profile
17
+
18
+ # Flat object containing custom properties. Strings, numbers and booleans are the only supported format that can be passed to metadata. The metadata is limited to 4KB in size.
19
+ attr_accessor :metadata
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'signed_up_at' => :'signedUpAt',
25
+ :'profile' => :'profile',
26
+ :'metadata' => :'metadata'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'signed_up_at' => :'String',
34
+ :'profile' => :'Profile',
35
+ :'metadata' => :'Object'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ :'metadata'
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::UserUpdateBody` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::UserUpdateBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'signed_up_at')
62
+ self.signed_up_at = attributes[:'signed_up_at']
63
+ end
64
+
65
+ if attributes.key?(:'profile')
66
+ self.profile = attributes[:'profile']
67
+ end
68
+
69
+ if attributes.key?(:'metadata')
70
+ self.metadata = attributes[:'metadata']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ signed_up_at == o.signed_up_at &&
93
+ profile == o.profile &&
94
+ metadata == o.metadata
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [signed_up_at, profile, metadata].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ SunshineConversationsClient.const_get(type).build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+ end
223
+ end
@@ -0,0 +1,272 @@
1
+ =begin
2
+ #Sunshine Conversations API
3
+
4
+ The version of the OpenAPI document: 9.1.0
5
+
6
+ Generated by: https://openapi-generator.tech
7
+ OpenAPI Generator version: 4.3.1
8
+ =end
9
+
10
+ require 'date'
11
+
12
+ module SunshineConversationsClient
13
+ class Viber < Integration
14
+ # The type of integration.
15
+ attr_accessor :type
16
+
17
+ # Viber Public Account token.
18
+ attr_accessor :token
19
+
20
+ # Unique URI of the Viber account.
21
+ attr_accessor :uri
22
+
23
+ # Unique ID of the Viber account.
24
+ attr_accessor :account_id
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'type' => :'type',
30
+ :'token' => :'token',
31
+ :'uri' => :'uri',
32
+ :'account_id' => :'accountId'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'type' => :'String',
40
+ :'token' => :'String',
41
+ :'uri' => :'String',
42
+ :'account_id' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # List of class defined in allOf (OpenAPI v3)
53
+ def self.openapi_all_of
54
+ [
55
+ :'Integration',
56
+ :'ViberAllOf'
57
+ ]
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Viber` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Viber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ # call parent's initialize
76
+ super(attributes)
77
+
78
+ if attributes.key?(:'type')
79
+ self.type = attributes[:'type']
80
+ else
81
+ self.type = 'viber'
82
+ end
83
+
84
+ if attributes.key?(:'token')
85
+ self.token = attributes[:'token']
86
+ end
87
+
88
+ if attributes.key?(:'uri')
89
+ self.uri = attributes[:'uri']
90
+ end
91
+
92
+ if attributes.key?(:'account_id')
93
+ self.account_id = attributes[:'account_id']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = super
101
+ if @token.nil?
102
+ invalid_properties.push('invalid value for "token", token cannot be nil.')
103
+ end
104
+
105
+ if @token.to_s.length < 1
106
+ invalid_properties.push('invalid value for "token", the character length must be great than or equal to 1.')
107
+ end
108
+
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ return false if @token.nil?
116
+ return false if @token.to_s.length < 1
117
+ true && super
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] token Value to be assigned
122
+ def token=(token)
123
+ if token.nil?
124
+ fail ArgumentError, 'token cannot be nil'
125
+ end
126
+
127
+ if token.to_s.length < 1
128
+ fail ArgumentError, 'invalid value for "token", the character length must be great than or equal to 1.'
129
+ end
130
+
131
+ @token = token
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ type == o.type &&
140
+ token == o.token &&
141
+ uri == o.uri &&
142
+ account_id == o.account_id && super(o)
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [type, token, uri, account_id].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ new.build_from_hash(attributes)
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+ super(attributes)
170
+ self.class.openapi_types.each_pair do |key, type|
171
+ if type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
175
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
176
+ end
177
+ elsif !attributes[self.class.attribute_map[key]].nil?
178
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
180
+ end
181
+
182
+ self
183
+ end
184
+
185
+ # Deserializes the data based on type
186
+ # @param string type Data type
187
+ # @param string value Value to be deserialized
188
+ # @return [Object] Deserialized data
189
+ def _deserialize(type, value)
190
+ case type.to_sym
191
+ when :DateTime
192
+ DateTime.parse(value)
193
+ when :Date
194
+ Date.parse(value)
195
+ when :String
196
+ value.to_s
197
+ when :Integer
198
+ value.to_i
199
+ when :Float
200
+ value.to_f
201
+ when :Boolean
202
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
203
+ true
204
+ else
205
+ false
206
+ end
207
+ when :Object
208
+ # generic object (usually a Hash), return directly
209
+ value
210
+ when /\AArray<(?<inner_type>.+)>\z/
211
+ inner_type = Regexp.last_match[:inner_type]
212
+ value.map { |v| _deserialize(inner_type, v) }
213
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
214
+ k_type = Regexp.last_match[:k_type]
215
+ v_type = Regexp.last_match[:v_type]
216
+ {}.tap do |hash|
217
+ value.each do |k, v|
218
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
219
+ end
220
+ end
221
+ else # model
222
+ SunshineConversationsClient.const_get(type).build_from_hash(value)
223
+ end
224
+ end
225
+
226
+ # Returns the string representation of the object
227
+ # @return [String] String presentation of the object
228
+ def to_s
229
+ to_hash.to_s
230
+ end
231
+
232
+ # to_body is an alias to to_hash (backward compatibility)
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_body
235
+ to_hash
236
+ end
237
+
238
+ # Returns the object in the form of hash
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_hash
241
+ hash = super
242
+ self.class.attribute_map.each_pair do |attr, param|
243
+ value = self.send(attr)
244
+ if value.nil?
245
+ is_nullable = self.class.openapi_nullable.include?(attr)
246
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
247
+ end
248
+
249
+ hash[param] = _to_hash(value)
250
+ end
251
+ hash
252
+ end
253
+
254
+ # Outputs non-array value in the form of hash
255
+ # For object, use to_hash. Otherwise, just return the value
256
+ # @param [Object] value Any valid value
257
+ # @return [Hash] Returns the value in the form of hash
258
+ def _to_hash(value)
259
+ if value.is_a?(Array)
260
+ value.compact.map { |v| _to_hash(v) }
261
+ elsif value.is_a?(Hash)
262
+ {}.tap do |hash|
263
+ value.each { |k, v| hash[k] = _to_hash(v) }
264
+ end
265
+ elsif value.respond_to? :to_hash
266
+ value.to_hash
267
+ else
268
+ value
269
+ end
270
+ end
271
+ end
272
+ end