sunshine-conversations-client 12.2.0 → 12.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG_RB.md +19 -0
  3. data/README.md +10 -5
  4. data/docs/Apple.md +2 -2
  5. data/docs/AppleAllOf.md +2 -2
  6. data/docs/AttachmentsApi.md +2 -2
  7. data/docs/Author.md +2 -2
  8. data/docs/AuthorMessages.md +27 -0
  9. data/docs/AuthorWebhook.md +1 -1
  10. data/docs/Business.md +27 -0
  11. data/docs/BusinessAllOf.md +19 -0
  12. data/docs/ConversationCreateEventAllOfPayload.md +1 -1
  13. data/docs/ConversationMessageDeliveryPayload.md +1 -1
  14. data/docs/ConversationPostbackEventAllOfPayload.md +1 -1
  15. data/docs/ConversationReferralEventAllOfPayload.md +1 -1
  16. data/docs/Message.md +1 -1
  17. data/docs/MessagePost.md +1 -1
  18. data/docs/User.md +10 -12
  19. data/docs/User2.md +27 -0
  20. data/docs/User2AllOf.md +23 -0
  21. data/docs/UserAllOf.md +2 -8
  22. data/docs/UserMergeEventAllOfPayloadMergedUsers.md +2 -2
  23. data/docs/UserResponse.md +1 -1
  24. data/docs/UserUpdateEventAllOfPayload.md +1 -1
  25. data/lib/sunshine-conversations-client/api/activities_api.rb +1 -1
  26. data/lib/sunshine-conversations-client/api/app_keys_api.rb +1 -1
  27. data/lib/sunshine-conversations-client/api/apps_api.rb +1 -1
  28. data/lib/sunshine-conversations-client/api/attachments_api.rb +3 -3
  29. data/lib/sunshine-conversations-client/api/clients_api.rb +1 -1
  30. data/lib/sunshine-conversations-client/api/conversations_api.rb +1 -1
  31. data/lib/sunshine-conversations-client/api/custom_integration_api_keys_api.rb +1 -1
  32. data/lib/sunshine-conversations-client/api/integrations_api.rb +1 -1
  33. data/lib/sunshine-conversations-client/api/messages_api.rb +1 -1
  34. data/lib/sunshine-conversations-client/api/o_auth_endpoints_api.rb +1 -1
  35. data/lib/sunshine-conversations-client/api/participants_api.rb +1 -1
  36. data/lib/sunshine-conversations-client/api/switchboard_actions_api.rb +1 -1
  37. data/lib/sunshine-conversations-client/api/switchboard_integrations_api.rb +1 -1
  38. data/lib/sunshine-conversations-client/api/switchboards_api.rb +1 -1
  39. data/lib/sunshine-conversations-client/api/users_api.rb +1 -1
  40. data/lib/sunshine-conversations-client/api/webhooks_api.rb +1 -1
  41. data/lib/sunshine-conversations-client/api_client.rb +1 -1
  42. data/lib/sunshine-conversations-client/api_error.rb +1 -1
  43. data/lib/sunshine-conversations-client/configuration.rb +1 -1
  44. data/lib/sunshine-conversations-client/models/accept_control_body.rb +1 -1
  45. data/lib/sunshine-conversations-client/models/action.rb +1 -1
  46. data/lib/sunshine-conversations-client/models/action_subset.rb +1 -1
  47. data/lib/sunshine-conversations-client/models/activity.rb +1 -1
  48. data/lib/sunshine-conversations-client/models/activity_all_of.rb +1 -1
  49. data/lib/sunshine-conversations-client/models/activity_post.rb +1 -1
  50. data/lib/sunshine-conversations-client/models/activity_post_all_of.rb +1 -1
  51. data/lib/sunshine-conversations-client/models/activity_types.rb +1 -1
  52. data/lib/sunshine-conversations-client/models/android.rb +1 -1
  53. data/lib/sunshine-conversations-client/models/android_all_of.rb +1 -1
  54. data/lib/sunshine-conversations-client/models/android_update.rb +1 -1
  55. data/lib/sunshine-conversations-client/models/android_update_all_of.rb +1 -1
  56. data/lib/sunshine-conversations-client/models/api_key.rb +1 -1
  57. data/lib/sunshine-conversations-client/models/app.rb +1 -1
  58. data/lib/sunshine-conversations-client/models/app_create_body.rb +1 -1
  59. data/lib/sunshine-conversations-client/models/app_key.rb +1 -1
  60. data/lib/sunshine-conversations-client/models/app_key_create_body.rb +1 -1
  61. data/lib/sunshine-conversations-client/models/app_key_list_response.rb +1 -1
  62. data/lib/sunshine-conversations-client/models/app_key_response.rb +1 -1
  63. data/lib/sunshine-conversations-client/models/app_list_filter.rb +1 -1
  64. data/lib/sunshine-conversations-client/models/app_list_response.rb +1 -1
  65. data/lib/sunshine-conversations-client/models/app_response.rb +1 -1
  66. data/lib/sunshine-conversations-client/models/app_settings.rb +1 -1
  67. data/lib/sunshine-conversations-client/models/app_sub_schema.rb +1 -1
  68. data/lib/sunshine-conversations-client/models/app_update_body.rb +1 -1
  69. data/lib/sunshine-conversations-client/models/apple.rb +3 -3
  70. data/lib/sunshine-conversations-client/models/apple_all_of.rb +3 -3
  71. data/lib/sunshine-conversations-client/models/apple_update.rb +1 -1
  72. data/lib/sunshine-conversations-client/models/attachment_delete_body.rb +1 -1
  73. data/lib/sunshine-conversations-client/models/attachment_media_token_body.rb +1 -1
  74. data/lib/sunshine-conversations-client/models/attachment_media_token_response.rb +1 -1
  75. data/lib/sunshine-conversations-client/models/attachment_response.rb +1 -1
  76. data/lib/sunshine-conversations-client/models/attachment_schema.rb +1 -1
  77. data/lib/sunshine-conversations-client/models/attachment_upload_body.rb +1 -1
  78. data/lib/sunshine-conversations-client/models/author.rb +3 -3
  79. data/lib/sunshine-conversations-client/models/author_messages.rb +321 -0
  80. data/lib/sunshine-conversations-client/models/author_webhook.rb +2 -2
  81. data/lib/sunshine-conversations-client/models/business.rb +300 -0
  82. data/lib/sunshine-conversations-client/models/business_all_of.rb +248 -0
  83. data/lib/sunshine-conversations-client/models/buy.rb +1 -1
  84. data/lib/sunshine-conversations-client/models/campaign.rb +1 -1
  85. data/lib/sunshine-conversations-client/models/carousel_message.rb +1 -1
  86. data/lib/sunshine-conversations-client/models/carousel_message_display_settings.rb +1 -1
  87. data/lib/sunshine-conversations-client/models/client.rb +1 -1
  88. data/lib/sunshine-conversations-client/models/client_add_event.rb +1 -1
  89. data/lib/sunshine-conversations-client/models/client_add_event_all_of.rb +1 -1
  90. data/lib/sunshine-conversations-client/models/client_add_event_all_of_payload.rb +1 -1
  91. data/lib/sunshine-conversations-client/models/client_association.rb +1 -1
  92. data/lib/sunshine-conversations-client/models/client_create.rb +1 -1
  93. data/lib/sunshine-conversations-client/models/client_list_response.rb +1 -1
  94. data/lib/sunshine-conversations-client/models/client_remove_event.rb +1 -1
  95. data/lib/sunshine-conversations-client/models/client_remove_event_all_of.rb +1 -1
  96. data/lib/sunshine-conversations-client/models/client_remove_event_all_of_payload.rb +1 -1
  97. data/lib/sunshine-conversations-client/models/client_response.rb +1 -1
  98. data/lib/sunshine-conversations-client/models/client_type.rb +1 -1
  99. data/lib/sunshine-conversations-client/models/client_update_event.rb +1 -1
  100. data/lib/sunshine-conversations-client/models/client_update_event_all_of.rb +1 -1
  101. data/lib/sunshine-conversations-client/models/client_update_event_all_of_payload.rb +1 -1
  102. data/lib/sunshine-conversations-client/models/confirmation.rb +1 -1
  103. data/lib/sunshine-conversations-client/models/content.rb +1 -1
  104. data/lib/sunshine-conversations-client/models/conversation.rb +1 -1
  105. data/lib/sunshine-conversations-client/models/conversation_all_of.rb +1 -1
  106. data/lib/sunshine-conversations-client/models/conversation_create_body.rb +1 -1
  107. data/lib/sunshine-conversations-client/models/conversation_create_event.rb +1 -1
  108. data/lib/sunshine-conversations-client/models/conversation_create_event_all_of.rb +1 -1
  109. data/lib/sunshine-conversations-client/models/conversation_create_event_all_of_payload.rb +2 -2
  110. data/lib/sunshine-conversations-client/models/conversation_join_event.rb +1 -1
  111. data/lib/sunshine-conversations-client/models/conversation_join_event_all_of.rb +1 -1
  112. data/lib/sunshine-conversations-client/models/conversation_join_event_all_of_payload.rb +1 -1
  113. data/lib/sunshine-conversations-client/models/conversation_leave_event.rb +1 -1
  114. data/lib/sunshine-conversations-client/models/conversation_leave_event_all_of.rb +1 -1
  115. data/lib/sunshine-conversations-client/models/conversation_leave_event_all_of_payload.rb +1 -1
  116. data/lib/sunshine-conversations-client/models/conversation_list_filter.rb +1 -1
  117. data/lib/sunshine-conversations-client/models/conversation_list_response.rb +1 -1
  118. data/lib/sunshine-conversations-client/models/conversation_message_delivery_channel_event.rb +1 -1
  119. data/lib/sunshine-conversations-client/models/conversation_message_delivery_channel_event_all_of.rb +1 -1
  120. data/lib/sunshine-conversations-client/models/conversation_message_delivery_failure_event.rb +1 -1
  121. data/lib/sunshine-conversations-client/models/conversation_message_delivery_failure_event_all_of.rb +1 -1
  122. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload.rb +2 -2
  123. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_destination.rb +1 -1
  124. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_external_messages.rb +1 -1
  125. data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_message.rb +1 -1
  126. data/lib/sunshine-conversations-client/models/conversation_message_delivery_user_event.rb +1 -1
  127. data/lib/sunshine-conversations-client/models/conversation_message_event.rb +1 -1
  128. data/lib/sunshine-conversations-client/models/conversation_message_event_all_of.rb +1 -1
  129. data/lib/sunshine-conversations-client/models/conversation_message_event_all_of_payload.rb +1 -1
  130. data/lib/sunshine-conversations-client/models/conversation_postback_event.rb +1 -1
  131. data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of.rb +1 -1
  132. data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of_payload.rb +2 -2
  133. data/lib/sunshine-conversations-client/models/conversation_read_event.rb +1 -1
  134. data/lib/sunshine-conversations-client/models/conversation_read_event_all_of.rb +1 -1
  135. data/lib/sunshine-conversations-client/models/conversation_read_event_all_of_payload.rb +1 -1
  136. data/lib/sunshine-conversations-client/models/conversation_referral_event.rb +1 -1
  137. data/lib/sunshine-conversations-client/models/conversation_referral_event_all_of.rb +1 -1
  138. data/lib/sunshine-conversations-client/models/conversation_referral_event_all_of_payload.rb +2 -2
  139. data/lib/sunshine-conversations-client/models/conversation_remove_event.rb +1 -1
  140. data/lib/sunshine-conversations-client/models/conversation_remove_event_all_of.rb +1 -1
  141. data/lib/sunshine-conversations-client/models/conversation_remove_event_all_of_payload.rb +1 -1
  142. data/lib/sunshine-conversations-client/models/conversation_response.rb +1 -1
  143. data/lib/sunshine-conversations-client/models/conversation_truncated.rb +1 -1
  144. data/lib/sunshine-conversations-client/models/conversation_type.rb +1 -1
  145. data/lib/sunshine-conversations-client/models/conversation_typing_event.rb +1 -1
  146. data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of.rb +1 -1
  147. data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of_payload.rb +1 -1
  148. data/lib/sunshine-conversations-client/models/conversation_update_body.rb +1 -1
  149. data/lib/sunshine-conversations-client/models/custom.rb +1 -1
  150. data/lib/sunshine-conversations-client/models/custom_all_of.rb +1 -1
  151. data/lib/sunshine-conversations-client/models/custom_update.rb +1 -1
  152. data/lib/sunshine-conversations-client/models/destination.rb +1 -1
  153. data/lib/sunshine-conversations-client/models/device.rb +1 -1
  154. data/lib/sunshine-conversations-client/models/event_sub_schema.rb +1 -1
  155. data/lib/sunshine-conversations-client/models/extra_channel_options.rb +1 -1
  156. data/lib/sunshine-conversations-client/models/extra_channel_options_messenger.rb +1 -1
  157. data/lib/sunshine-conversations-client/models/field.rb +1 -1
  158. data/lib/sunshine-conversations-client/models/file_message.rb +1 -1
  159. data/lib/sunshine-conversations-client/models/form_message.rb +1 -1
  160. data/lib/sunshine-conversations-client/models/form_message_field.rb +1 -1
  161. data/lib/sunshine-conversations-client/models/form_message_field_all_of.rb +1 -1
  162. data/lib/sunshine-conversations-client/models/form_response_message.rb +1 -1
  163. data/lib/sunshine-conversations-client/models/form_response_message_field.rb +1 -1
  164. data/lib/sunshine-conversations-client/models/form_response_message_field_all_of.rb +1 -1
  165. data/lib/sunshine-conversations-client/models/identity.rb +1 -1
  166. data/lib/sunshine-conversations-client/models/image_message.rb +1 -1
  167. data/lib/sunshine-conversations-client/models/inline_object.rb +1 -1
  168. data/lib/sunshine-conversations-client/models/instagram.rb +1 -1
  169. data/lib/sunshine-conversations-client/models/instagram_all_of.rb +1 -1
  170. data/lib/sunshine-conversations-client/models/instagram_update.rb +1 -1
  171. data/lib/sunshine-conversations-client/models/instagram_update_all_of.rb +1 -1
  172. data/lib/sunshine-conversations-client/models/integration.rb +1 -1
  173. data/lib/sunshine-conversations-client/models/integration_api_key.rb +1 -1
  174. data/lib/sunshine-conversations-client/models/integration_api_key_list_response.rb +1 -1
  175. data/lib/sunshine-conversations-client/models/integration_api_key_response.rb +1 -1
  176. data/lib/sunshine-conversations-client/models/integration_id.rb +1 -1
  177. data/lib/sunshine-conversations-client/models/integration_list_filter.rb +1 -1
  178. data/lib/sunshine-conversations-client/models/integration_list_response.rb +1 -1
  179. data/lib/sunshine-conversations-client/models/integration_response.rb +1 -1
  180. data/lib/sunshine-conversations-client/models/integration_type.rb +1 -1
  181. data/lib/sunshine-conversations-client/models/integration_update.rb +1 -1
  182. data/lib/sunshine-conversations-client/models/integration_update_base.rb +1 -1
  183. data/lib/sunshine-conversations-client/models/ios.rb +1 -1
  184. data/lib/sunshine-conversations-client/models/ios_all_of.rb +1 -1
  185. data/lib/sunshine-conversations-client/models/ios_update.rb +1 -1
  186. data/lib/sunshine-conversations-client/models/ios_update_all_of.rb +1 -1
  187. data/lib/sunshine-conversations-client/models/item.rb +1 -1
  188. data/lib/sunshine-conversations-client/models/line.rb +1 -1
  189. data/lib/sunshine-conversations-client/models/line_all_of.rb +1 -1
  190. data/lib/sunshine-conversations-client/models/line_update.rb +1 -1
  191. data/lib/sunshine-conversations-client/models/link.rb +1 -1
  192. data/lib/sunshine-conversations-client/models/links.rb +1 -1
  193. data/lib/sunshine-conversations-client/models/list_message.rb +1 -1
  194. data/lib/sunshine-conversations-client/models/location_message.rb +1 -1
  195. data/lib/sunshine-conversations-client/models/location_message_coordinates.rb +1 -1
  196. data/lib/sunshine-conversations-client/models/location_message_location.rb +1 -1
  197. data/lib/sunshine-conversations-client/models/location_request.rb +1 -1
  198. data/lib/sunshine-conversations-client/models/mailgun.rb +1 -1
  199. data/lib/sunshine-conversations-client/models/mailgun_all_of.rb +1 -1
  200. data/lib/sunshine-conversations-client/models/mailgun_update.rb +1 -1
  201. data/lib/sunshine-conversations-client/models/mailgun_update_all_of.rb +1 -1
  202. data/lib/sunshine-conversations-client/models/match_criteria.rb +1 -1
  203. data/lib/sunshine-conversations-client/models/match_criteria_base.rb +1 -1
  204. data/lib/sunshine-conversations-client/models/match_criteria_mailgun.rb +1 -1
  205. data/lib/sunshine-conversations-client/models/match_criteria_mailgun_all_of.rb +1 -1
  206. data/lib/sunshine-conversations-client/models/match_criteria_messagebird.rb +1 -1
  207. data/lib/sunshine-conversations-client/models/match_criteria_messagebird_all_of.rb +1 -1
  208. data/lib/sunshine-conversations-client/models/match_criteria_twilio.rb +1 -1
  209. data/lib/sunshine-conversations-client/models/match_criteria_twilio_all_of.rb +1 -1
  210. data/lib/sunshine-conversations-client/models/match_criteria_whatsapp.rb +1 -1
  211. data/lib/sunshine-conversations-client/models/match_criteria_whatsapp_all_of.rb +1 -1
  212. data/lib/sunshine-conversations-client/models/message.rb +2 -2
  213. data/lib/sunshine-conversations-client/models/message_bird_update.rb +1 -1
  214. data/lib/sunshine-conversations-client/models/message_list_response.rb +1 -1
  215. data/lib/sunshine-conversations-client/models/message_override.rb +2 -2
  216. data/lib/sunshine-conversations-client/models/message_override_apple.rb +1 -1
  217. data/lib/sunshine-conversations-client/models/message_override_line.rb +1 -1
  218. data/lib/sunshine-conversations-client/models/message_override_messenger.rb +1 -1
  219. data/lib/sunshine-conversations-client/models/message_override_payload.rb +1 -1
  220. data/lib/sunshine-conversations-client/models/message_override_whatsapp.rb +1 -1
  221. data/lib/sunshine-conversations-client/models/message_post.rb +2 -2
  222. data/lib/sunshine-conversations-client/models/message_post_response.rb +1 -1
  223. data/lib/sunshine-conversations-client/models/message_webhook.rb +1 -1
  224. data/lib/sunshine-conversations-client/models/messagebird.rb +1 -1
  225. data/lib/sunshine-conversations-client/models/messagebird_all_of.rb +1 -1
  226. data/lib/sunshine-conversations-client/models/messenger.rb +1 -1
  227. data/lib/sunshine-conversations-client/models/messenger_all_of.rb +1 -1
  228. data/lib/sunshine-conversations-client/models/messenger_update.rb +1 -1
  229. data/lib/sunshine-conversations-client/models/meta.rb +1 -1
  230. data/lib/sunshine-conversations-client/models/offer_control_body.rb +1 -1
  231. data/lib/sunshine-conversations-client/models/page.rb +1 -1
  232. data/lib/sunshine-conversations-client/models/participant.rb +1 -1
  233. data/lib/sunshine-conversations-client/models/participant_join_body.rb +1 -1
  234. data/lib/sunshine-conversations-client/models/participant_leave_body.rb +1 -1
  235. data/lib/sunshine-conversations-client/models/participant_leave_body_participant_id.rb +1 -1
  236. data/lib/sunshine-conversations-client/models/participant_leave_body_user_external_id.rb +1 -1
  237. data/lib/sunshine-conversations-client/models/participant_leave_body_user_id.rb +1 -1
  238. data/lib/sunshine-conversations-client/models/participant_list_response.rb +1 -1
  239. data/lib/sunshine-conversations-client/models/participant_response.rb +1 -1
  240. data/lib/sunshine-conversations-client/models/participant_sub_schema.rb +1 -1
  241. data/lib/sunshine-conversations-client/models/participant_with_user_external_id.rb +1 -1
  242. data/lib/sunshine-conversations-client/models/participant_with_user_id.rb +1 -1
  243. data/lib/sunshine-conversations-client/models/pass_control_body.rb +1 -1
  244. data/lib/sunshine-conversations-client/models/postback.rb +1 -1
  245. data/lib/sunshine-conversations-client/models/postback_webhook.rb +1 -1
  246. data/lib/sunshine-conversations-client/models/prechat_capture.rb +1 -1
  247. data/lib/sunshine-conversations-client/models/profile.rb +1 -1
  248. data/lib/sunshine-conversations-client/models/quoted_message.rb +1 -1
  249. data/lib/sunshine-conversations-client/models/quoted_message_external_message_id.rb +1 -1
  250. data/lib/sunshine-conversations-client/models/quoted_message_message.rb +1 -1
  251. data/lib/sunshine-conversations-client/models/referral.rb +1 -1
  252. data/lib/sunshine-conversations-client/models/referral_details.rb +1 -1
  253. data/lib/sunshine-conversations-client/models/reply.rb +1 -1
  254. data/lib/sunshine-conversations-client/models/source.rb +1 -1
  255. data/lib/sunshine-conversations-client/models/source_webhook.rb +1 -1
  256. data/lib/sunshine-conversations-client/models/source_with_campaign_webhook.rb +1 -1
  257. data/lib/sunshine-conversations-client/models/source_with_campaign_webhook_all_of.rb +1 -1
  258. data/lib/sunshine-conversations-client/models/status.rb +1 -1
  259. data/lib/sunshine-conversations-client/models/switchboard.rb +1 -1
  260. data/lib/sunshine-conversations-client/models/switchboard_accept_control.rb +1 -1
  261. data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of.rb +1 -1
  262. data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of_payload.rb +1 -1
  263. data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure.rb +1 -1
  264. data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of.rb +1 -1
  265. data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of_payload.rb +1 -1
  266. data/lib/sunshine-conversations-client/models/switchboard_integration.rb +1 -1
  267. data/lib/sunshine-conversations-client/models/switchboard_integration_create_body.rb +1 -1
  268. data/lib/sunshine-conversations-client/models/switchboard_integration_list_response.rb +1 -1
  269. data/lib/sunshine-conversations-client/models/switchboard_integration_response.rb +1 -1
  270. data/lib/sunshine-conversations-client/models/switchboard_integration_update_body.rb +1 -1
  271. data/lib/sunshine-conversations-client/models/switchboard_integration_webhook.rb +1 -1
  272. data/lib/sunshine-conversations-client/models/switchboard_list_response.rb +1 -1
  273. data/lib/sunshine-conversations-client/models/switchboard_offer_control.rb +1 -1
  274. data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of.rb +1 -1
  275. data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of_payload.rb +1 -1
  276. data/lib/sunshine-conversations-client/models/switchboard_offer_control_failure.rb +1 -1
  277. data/lib/sunshine-conversations-client/models/switchboard_pass_control.rb +1 -1
  278. data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of.rb +1 -1
  279. data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of_payload.rb +1 -1
  280. data/lib/sunshine-conversations-client/models/switchboard_pass_control_failure.rb +1 -1
  281. data/lib/sunshine-conversations-client/models/switchboard_response.rb +1 -1
  282. data/lib/sunshine-conversations-client/models/switchboard_update_body.rb +1 -1
  283. data/lib/sunshine-conversations-client/models/target.rb +1 -1
  284. data/lib/sunshine-conversations-client/models/telegram.rb +1 -1
  285. data/lib/sunshine-conversations-client/models/telegram_all_of.rb +1 -1
  286. data/lib/sunshine-conversations-client/models/telegram_update.rb +1 -1
  287. data/lib/sunshine-conversations-client/models/template_message.rb +1 -1
  288. data/lib/sunshine-conversations-client/models/text_message.rb +1 -1
  289. data/lib/sunshine-conversations-client/models/twilio.rb +1 -1
  290. data/lib/sunshine-conversations-client/models/twilio_all_of.rb +1 -1
  291. data/lib/sunshine-conversations-client/models/twilio_update.rb +1 -1
  292. data/lib/sunshine-conversations-client/models/twitter.rb +1 -1
  293. data/lib/sunshine-conversations-client/models/twitter_all_of.rb +1 -1
  294. data/lib/sunshine-conversations-client/models/twitter_update.rb +1 -1
  295. data/lib/sunshine-conversations-client/models/unity.rb +1 -1
  296. data/lib/sunshine-conversations-client/models/unity_all_of.rb +1 -1
  297. data/lib/sunshine-conversations-client/models/unity_update.rb +1 -1
  298. data/lib/sunshine-conversations-client/models/unity_update_all_of.rb +1 -1
  299. data/lib/sunshine-conversations-client/models/user.rb +81 -49
  300. data/lib/sunshine-conversations-client/models/user2.rb +259 -0
  301. data/lib/sunshine-conversations-client/models/user2_all_of.rb +230 -0
  302. data/lib/sunshine-conversations-client/models/user_all_of.rb +43 -34
  303. data/lib/sunshine-conversations-client/models/user_create_body.rb +1 -1
  304. data/lib/sunshine-conversations-client/models/user_merge_event.rb +1 -1
  305. data/lib/sunshine-conversations-client/models/user_merge_event_all_of.rb +1 -1
  306. data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload.rb +1 -1
  307. data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_clients.rb +1 -1
  308. data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_conversations.rb +1 -1
  309. data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_users.rb +3 -3
  310. data/lib/sunshine-conversations-client/models/user_response.rb +2 -2
  311. data/lib/sunshine-conversations-client/models/user_truncated.rb +1 -1
  312. data/lib/sunshine-conversations-client/models/user_update_body.rb +1 -1
  313. data/lib/sunshine-conversations-client/models/user_update_event.rb +1 -1
  314. data/lib/sunshine-conversations-client/models/user_update_event_all_of.rb +1 -1
  315. data/lib/sunshine-conversations-client/models/user_update_event_all_of_payload.rb +2 -2
  316. data/lib/sunshine-conversations-client/models/viber.rb +1 -1
  317. data/lib/sunshine-conversations-client/models/viber_all_of.rb +1 -1
  318. data/lib/sunshine-conversations-client/models/viber_update.rb +1 -1
  319. data/lib/sunshine-conversations-client/models/web.rb +1 -1
  320. data/lib/sunshine-conversations-client/models/web_all_of.rb +1 -1
  321. data/lib/sunshine-conversations-client/models/web_update.rb +1 -1
  322. data/lib/sunshine-conversations-client/models/web_update_all_of.rb +1 -1
  323. data/lib/sunshine-conversations-client/models/webhook.rb +1 -1
  324. data/lib/sunshine-conversations-client/models/webhook_body.rb +1 -1
  325. data/lib/sunshine-conversations-client/models/webhook_create_body.rb +1 -1
  326. data/lib/sunshine-conversations-client/models/webhook_list_response.rb +1 -1
  327. data/lib/sunshine-conversations-client/models/webhook_response.rb +1 -1
  328. data/lib/sunshine-conversations-client/models/webhook_sub_schema.rb +1 -1
  329. data/lib/sunshine-conversations-client/models/webview.rb +1 -1
  330. data/lib/sunshine-conversations-client/models/whats_app_update.rb +1 -1
  331. data/lib/sunshine-conversations-client/models/whats_app_update_all_of.rb +1 -1
  332. data/lib/sunshine-conversations-client/models/whatsapp.rb +1 -1
  333. data/lib/sunshine-conversations-client/models/whatsapp_all_of.rb +1 -1
  334. data/lib/sunshine-conversations-client/version.rb +2 -2
  335. data/lib/sunshine-conversations-client.rb +6 -1
  336. data/spec/api_client_spec.rb +1 -1
  337. data/spec/configuration_spec.rb +1 -1
  338. data/spec/spec_helper.rb +1 -1
  339. data/sunshine-conversations-client.gemspec +1 -1
  340. metadata +12 -2
@@ -0,0 +1,321 @@
1
+ =begin
2
+ #Sunshine Conversations API
3
+
4
+ The version of the OpenAPI document: 12.3.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 AuthorMessages
14
+ # The type of the author.
15
+ attr_accessor :type
16
+
17
+ # The id of the user. Only supported when `type` is user.
18
+ attr_accessor :user_id
19
+
20
+ # The externalId of the user. Only supported when `type` is user.
21
+ attr_accessor :user_external_id
22
+
23
+ # The display name of the message author.
24
+ attr_accessor :display_name
25
+
26
+ # A custom message icon URL. The image must be JPG, PNG, or GIF format.
27
+ attr_accessor :avatar_url
28
+
29
+ # A string array that indicates the author's subtypes. Messages with an \"AI\" subtype are generated by AI and a disclaimer is appended to the text of the message sent to the customer. For third-party channels, the disclaimer is applied for image, file, and text message types.
30
+ attr_accessor :subtypes
31
+
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'type' => :'type',
58
+ :'user_id' => :'userId',
59
+ :'user_external_id' => :'userExternalId',
60
+ :'display_name' => :'displayName',
61
+ :'avatar_url' => :'avatarUrl',
62
+ :'subtypes' => :'subtypes'
63
+ }
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'type' => :'String',
70
+ :'user_id' => :'String',
71
+ :'user_external_id' => :'String',
72
+ :'display_name' => :'String',
73
+ :'avatar_url' => :'String',
74
+ :'subtypes' => :'Array<String>'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # List of class defined in oneOf (OpenAPI v3)
85
+ def self.openapi_one_of
86
+ [
87
+ :'Business',
88
+ :'User'
89
+ ]
90
+ end
91
+
92
+ # discriminator's property name in OpenAPI v3
93
+ def self.openapi_discriminator_name
94
+ :'type'
95
+ end
96
+
97
+ # Initializes the object
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ def initialize(attributes = {})
100
+ if (!attributes.is_a?(Hash))
101
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::AuthorMessages` initialize method"
102
+ end
103
+
104
+ # check to see if the attribute exists and convert string to symbol for hash key
105
+ attributes = attributes.each_with_object({}) { |(k, v), h|
106
+ if (!self.class.attribute_map.key?(k.to_sym))
107
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::AuthorMessages`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
108
+ end
109
+ h[k.to_sym] = v
110
+ }
111
+
112
+ if attributes.key?(:'type')
113
+ self.type = attributes[:'type']
114
+ end
115
+
116
+ if attributes.key?(:'user_id')
117
+ self.user_id = attributes[:'user_id']
118
+ end
119
+
120
+ if attributes.key?(:'user_external_id')
121
+ self.user_external_id = attributes[:'user_external_id']
122
+ end
123
+
124
+ if attributes.key?(:'display_name')
125
+ self.display_name = attributes[:'display_name']
126
+ end
127
+
128
+ if attributes.key?(:'avatar_url')
129
+ self.avatar_url = attributes[:'avatar_url']
130
+ end
131
+
132
+ if attributes.key?(:'subtypes')
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ invalid_properties = Array.new
140
+ if @type.nil?
141
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
142
+ end
143
+
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ return false if @type.nil?
151
+ type_validator = EnumAttributeValidator.new('String', ["user"])
152
+ return false unless type_validator.valid?(@type)
153
+ _one_of_found = false
154
+ self.class.openapi_one_of.each do |_class|
155
+ _one_of = SunshineConversationsClient.const_get(_class).build_from_hash(self.to_hash)
156
+ if _one_of.valid?
157
+ if _one_of_found
158
+ return false
159
+ else
160
+ _one_of_found = true
161
+ end
162
+ end
163
+ end
164
+
165
+ if !_one_of_found
166
+ return false
167
+ end
168
+
169
+ true
170
+ end
171
+
172
+ # Custom attribute writer method checking allowed values (enum).
173
+ # @param [Object] type Object to be assigned
174
+ def type=(type)
175
+ validator = EnumAttributeValidator.new('String', ["user"])
176
+ unless validator.valid?(type)
177
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
178
+ end
179
+ @type = type
180
+ end
181
+
182
+ # Checks equality by comparing each attribute.
183
+ # @param [Object] Object to be compared
184
+ def ==(o)
185
+ return true if self.equal?(o)
186
+ self.class == o.class &&
187
+ type == o.type &&
188
+ user_id == o.user_id &&
189
+ user_external_id == o.user_external_id &&
190
+ display_name == o.display_name &&
191
+ avatar_url == o.avatar_url &&
192
+ subtypes == o.subtypes
193
+ end
194
+
195
+ # @see the `==` method
196
+ # @param [Object] Object to be compared
197
+ def eql?(o)
198
+ self == o
199
+ end
200
+
201
+ # Calculates hash code according to all attributes.
202
+ # @return [Integer] Hash code
203
+ def hash
204
+ [type, user_id, user_external_id, display_name, avatar_url, subtypes].hash
205
+ end
206
+
207
+ # Builds the object from hash
208
+ # @param [Hash] attributes Model attributes in the form of hash
209
+ # @return [Object] Returns the model itself
210
+ def self.build_from_hash(attributes)
211
+ new.build_from_hash(attributes)
212
+ end
213
+
214
+ # Builds the object from hash
215
+ # @param [Hash] attributes Model attributes in the form of hash
216
+ # @return [Object] Returns the model itself
217
+ def build_from_hash(attributes)
218
+ return nil unless attributes.is_a?(Hash)
219
+ self.class.openapi_types.each_pair do |key, type|
220
+ if type =~ /\AArray<(.*)>/i
221
+ # check to ensure the input is an array given that the attribute
222
+ # is documented as an array but the input is not
223
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
224
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
225
+ end
226
+ elsif !attributes[self.class.attribute_map[key]].nil?
227
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
228
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
229
+ end
230
+
231
+ self
232
+ end
233
+
234
+ # Deserializes the data based on type
235
+ # @param string type Data type
236
+ # @param string value Value to be deserialized
237
+ # @return [Object] Deserialized data
238
+ def _deserialize(type, value)
239
+ case type.to_sym
240
+ when :DateTime
241
+ DateTime.parse(value)
242
+ when :Date
243
+ Date.parse(value)
244
+ when :String
245
+ value.to_s
246
+ when :Integer
247
+ value.to_i
248
+ when :Float
249
+ value.to_f
250
+ when :Boolean
251
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
252
+ true
253
+ else
254
+ false
255
+ end
256
+ when :Object
257
+ # generic object (usually a Hash), return directly
258
+ value
259
+ when /\AArray<(?<inner_type>.+)>\z/
260
+ inner_type = Regexp.last_match[:inner_type]
261
+ value.map { |v| _deserialize(inner_type, v) }
262
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
263
+ k_type = Regexp.last_match[:k_type]
264
+ v_type = Regexp.last_match[:v_type]
265
+ {}.tap do |hash|
266
+ value.each do |k, v|
267
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
268
+ end
269
+ end
270
+ else # model
271
+ SunshineConversationsClient.const_get(type).build_from_hash(value)
272
+ end
273
+ end
274
+
275
+ # Returns the string representation of the object
276
+ # @return [String] String presentation of the object
277
+ def to_s
278
+ to_hash.to_s
279
+ end
280
+
281
+ # to_body is an alias to to_hash (backward compatibility)
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_body
284
+ to_hash
285
+ end
286
+
287
+ # Returns the object in the form of hash
288
+ # @return [Hash] Returns the object in the form of hash
289
+ def to_hash
290
+ hash = {}
291
+ self.class.attribute_map.each_pair do |attr, param|
292
+ value = self.send(attr)
293
+ if value.nil?
294
+ is_nullable = self.class.openapi_nullable.include?(attr)
295
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
296
+ end
297
+
298
+ hash[param] = _to_hash(value)
299
+ end
300
+ hash
301
+ end
302
+
303
+ # Outputs non-array value in the form of hash
304
+ # For object, use to_hash. Otherwise, just return the value
305
+ # @param [Object] value Any valid value
306
+ # @return [Hash] Returns the value in the form of hash
307
+ def _to_hash(value)
308
+ if value.is_a?(Array)
309
+ value.compact.map { |v| _to_hash(v) }
310
+ elsif value.is_a?(Hash)
311
+ {}.tap do |hash|
312
+ value.each { |k, v| hash[k] = _to_hash(v) }
313
+ end
314
+ elsif value.respond_to? :to_hash
315
+ value.to_hash
316
+ else
317
+ value
318
+ end
319
+ end
320
+ end
321
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Sunshine Conversations API
3
3
 
4
- The version of the OpenAPI document: 12.2.0
4
+ The version of the OpenAPI document: 12.3.0
5
5
 
6
6
  Generated by: https://openapi-generator.tech
7
7
  OpenAPI Generator version: 4.3.1
@@ -57,7 +57,7 @@ module SunshineConversationsClient
57
57
  {
58
58
  :'type' => :'String',
59
59
  :'user_id' => :'String',
60
- :'user' => :'User'
60
+ :'user' => :'User2'
61
61
  }
62
62
  end
63
63
 
@@ -0,0 +1,300 @@
1
+ =begin
2
+ #Sunshine Conversations API
3
+
4
+ The version of the OpenAPI document: 12.3.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 Business
14
+ # The author type.
15
+ attr_accessor :type
16
+
17
+ # The id of the user. Only supported when `type` is user.
18
+ attr_accessor :user_id
19
+
20
+ # The externalId of the user. Only supported when `type` is user.
21
+ attr_accessor :user_external_id
22
+
23
+ # The display name of the message author.
24
+ attr_accessor :display_name
25
+
26
+ # A custom message icon URL. The image must be JPG, PNG, or GIF format.
27
+ attr_accessor :avatar_url
28
+
29
+ # A string array that indicates the author's subtypes. Messages with an \"AI\" subtype are generated by AI and a disclaimer is appended to the text of the message sent to the customer. For third-party channels, the disclaimer is applied for image, file, and text message types.
30
+ attr_accessor :subtypes
31
+
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'type' => :'type',
58
+ :'user_id' => :'userId',
59
+ :'user_external_id' => :'userExternalId',
60
+ :'display_name' => :'displayName',
61
+ :'avatar_url' => :'avatarUrl',
62
+ :'subtypes' => :'subtypes'
63
+ }
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'type' => :'String',
70
+ :'user_id' => :'String',
71
+ :'user_external_id' => :'String',
72
+ :'display_name' => :'String',
73
+ :'avatar_url' => :'String',
74
+ :'subtypes' => :'Array<String>'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # List of class defined in allOf (OpenAPI v3)
85
+ def self.openapi_all_of
86
+ [
87
+ :'Author',
88
+ :'BusinessAllOf'
89
+ ]
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Business` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ attributes = attributes.each_with_object({}) { |(k, v), h|
101
+ if (!self.class.attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Business`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
103
+ end
104
+ h[k.to_sym] = v
105
+ }
106
+
107
+ if attributes.key?(:'type')
108
+ self.type = attributes[:'type']
109
+ end
110
+
111
+ if attributes.key?(:'user_id')
112
+ self.user_id = attributes[:'user_id']
113
+ end
114
+
115
+ if attributes.key?(:'user_external_id')
116
+ self.user_external_id = attributes[:'user_external_id']
117
+ end
118
+
119
+ if attributes.key?(:'display_name')
120
+ self.display_name = attributes[:'display_name']
121
+ end
122
+
123
+ if attributes.key?(:'avatar_url')
124
+ self.avatar_url = attributes[:'avatar_url']
125
+ end
126
+
127
+ if attributes.key?(:'subtypes')
128
+ end
129
+ end
130
+
131
+ # Show invalid properties with the reasons. Usually used together with valid?
132
+ # @return Array for valid properties with the reasons
133
+ def list_invalid_properties
134
+ invalid_properties = Array.new
135
+ if @type.nil?
136
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ return false if @type.nil?
146
+ type_validator = EnumAttributeValidator.new('String', ["business"])
147
+ return false unless type_validator.valid?(@type)
148
+ true
149
+ end
150
+
151
+ # Custom attribute writer method checking allowed values (enum).
152
+ # @param [Object] type Object to be assigned
153
+ def type=(type)
154
+ validator = EnumAttributeValidator.new('String', ["business"])
155
+ unless validator.valid?(type)
156
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
157
+ end
158
+ @type = type
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ type == o.type &&
167
+ user_id == o.user_id &&
168
+ user_external_id == o.user_external_id &&
169
+ display_name == o.display_name &&
170
+ avatar_url == o.avatar_url &&
171
+ subtypes == o.subtypes
172
+ end
173
+
174
+ # @see the `==` method
175
+ # @param [Object] Object to be compared
176
+ def eql?(o)
177
+ self == o
178
+ end
179
+
180
+ # Calculates hash code according to all attributes.
181
+ # @return [Integer] Hash code
182
+ def hash
183
+ [type, user_id, user_external_id, display_name, avatar_url, subtypes].hash
184
+ end
185
+
186
+ # Builds the object from hash
187
+ # @param [Hash] attributes Model attributes in the form of hash
188
+ # @return [Object] Returns the model itself
189
+ def self.build_from_hash(attributes)
190
+ new.build_from_hash(attributes)
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ self.class.openapi_types.each_pair do |key, type|
199
+ if type =~ /\AArray<(.*)>/i
200
+ # check to ensure the input is an array given that the attribute
201
+ # is documented as an array but the input is not
202
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
203
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
204
+ end
205
+ elsif !attributes[self.class.attribute_map[key]].nil?
206
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
207
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
208
+ end
209
+
210
+ self
211
+ end
212
+
213
+ # Deserializes the data based on type
214
+ # @param string type Data type
215
+ # @param string value Value to be deserialized
216
+ # @return [Object] Deserialized data
217
+ def _deserialize(type, value)
218
+ case type.to_sym
219
+ when :DateTime
220
+ DateTime.parse(value)
221
+ when :Date
222
+ Date.parse(value)
223
+ when :String
224
+ value.to_s
225
+ when :Integer
226
+ value.to_i
227
+ when :Float
228
+ value.to_f
229
+ when :Boolean
230
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
231
+ true
232
+ else
233
+ false
234
+ end
235
+ when :Object
236
+ # generic object (usually a Hash), return directly
237
+ value
238
+ when /\AArray<(?<inner_type>.+)>\z/
239
+ inner_type = Regexp.last_match[:inner_type]
240
+ value.map { |v| _deserialize(inner_type, v) }
241
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
242
+ k_type = Regexp.last_match[:k_type]
243
+ v_type = Regexp.last_match[:v_type]
244
+ {}.tap do |hash|
245
+ value.each do |k, v|
246
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
247
+ end
248
+ end
249
+ else # model
250
+ SunshineConversationsClient.const_get(type).build_from_hash(value)
251
+ end
252
+ end
253
+
254
+ # Returns the string representation of the object
255
+ # @return [String] String presentation of the object
256
+ def to_s
257
+ to_hash.to_s
258
+ end
259
+
260
+ # to_body is an alias to to_hash (backward compatibility)
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_body
263
+ to_hash
264
+ end
265
+
266
+ # Returns the object in the form of hash
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_hash
269
+ hash = {}
270
+ self.class.attribute_map.each_pair do |attr, param|
271
+ value = self.send(attr)
272
+ if value.nil?
273
+ is_nullable = self.class.openapi_nullable.include?(attr)
274
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
275
+ end
276
+
277
+ hash[param] = _to_hash(value)
278
+ end
279
+ hash
280
+ end
281
+
282
+ # Outputs non-array value in the form of hash
283
+ # For object, use to_hash. Otherwise, just return the value
284
+ # @param [Object] value Any valid value
285
+ # @return [Hash] Returns the value in the form of hash
286
+ def _to_hash(value)
287
+ if value.is_a?(Array)
288
+ value.compact.map { |v| _to_hash(v) }
289
+ elsif value.is_a?(Hash)
290
+ {}.tap do |hash|
291
+ value.each { |k, v| hash[k] = _to_hash(v) }
292
+ end
293
+ elsif value.respond_to? :to_hash
294
+ value.to_hash
295
+ else
296
+ value
297
+ end
298
+ end
299
+ end
300
+ end