sunshine-conversations-client 9.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG_RB.md +12 -0
- data/Gemfile +9 -0
- data/LICENSE +176 -0
- data/README.md +456 -0
- data/Rakefile +10 -0
- data/docs/AcceptControlBody.md +17 -0
- data/docs/Action.md +41 -0
- data/docs/ActionSubset.md +39 -0
- data/docs/ActivitiesApi.md +71 -0
- data/docs/Activity.md +21 -0
- data/docs/ActivityAllOf.md +19 -0
- data/docs/ActivityPost.md +19 -0
- data/docs/ActivityPostAllOf.md +17 -0
- data/docs/ActivityTypes.md +17 -0
- data/docs/Android.md +23 -0
- data/docs/AndroidAllOf.md +23 -0
- data/docs/AndroidUpdate.md +23 -0
- data/docs/AndroidUpdateAllOf.md +21 -0
- data/docs/ApiKey.md +21 -0
- data/docs/App.md +23 -0
- data/docs/AppCreateBody.md +21 -0
- data/docs/AppKey.md +21 -0
- data/docs/AppKeyCreateBody.md +17 -0
- data/docs/AppKeyListResponse.md +17 -0
- data/docs/AppKeyResponse.md +17 -0
- data/docs/AppKeysApi.md +250 -0
- data/docs/AppListFilter.md +17 -0
- data/docs/AppListResponse.md +21 -0
- data/docs/AppResponse.md +17 -0
- data/docs/AppSettings.md +31 -0
- data/docs/AppSubSchema.md +17 -0
- data/docs/AppUpdateBody.md +21 -0
- data/docs/Apple.md +23 -0
- data/docs/AppleAllOf.md +23 -0
- data/docs/AppleUpdate.md +16 -0
- data/docs/AppsApi.md +309 -0
- data/docs/AttachmentDeleteBody.md +17 -0
- data/docs/AttachmentMediaTokenBody.md +17 -0
- data/docs/AttachmentMediaTokenResponse.md +17 -0
- data/docs/AttachmentResponse.md +17 -0
- data/docs/AttachmentSchema.md +19 -0
- data/docs/AttachmentUploadBody.md +17 -0
- data/docs/AttachmentsApi.md +254 -0
- data/docs/Author.md +25 -0
- data/docs/AuthorWebhook.md +21 -0
- data/docs/Buy.md +25 -0
- data/docs/CarouselMessage.md +23 -0
- data/docs/CarouselMessageDisplaySettings.md +17 -0
- data/docs/Client.md +37 -0
- data/docs/ClientAssociation.md +19 -0
- data/docs/ClientCreate.md +21 -0
- data/docs/ClientListResponse.md +21 -0
- data/docs/ClientResponse.md +17 -0
- data/docs/ClientType.md +16 -0
- data/docs/ClientsApi.md +199 -0
- data/docs/Confirmation.md +19 -0
- data/docs/Content.md +41 -0
- data/docs/Conversation.md +37 -0
- data/docs/ConversationAllOf.md +29 -0
- data/docs/ConversationCreateBody.md +27 -0
- data/docs/ConversationCreateEvent.md +23 -0
- data/docs/ConversationCreateEventAllOf.md +17 -0
- data/docs/ConversationCreateEventAllOfPayload.md +25 -0
- data/docs/ConversationListFilter.md +19 -0
- data/docs/ConversationListResponse.md +21 -0
- data/docs/ConversationMessageDeliveryChannelEvent.md +23 -0
- data/docs/ConversationMessageDeliveryChannelEventAllOf.md +17 -0
- data/docs/ConversationMessageDeliveryFailureEvent.md +23 -0
- data/docs/ConversationMessageDeliveryFailureEventAllOf.md +17 -0
- data/docs/ConversationMessageDeliveryPayload.md +27 -0
- data/docs/ConversationMessageDeliveryPayloadDestination.md +19 -0
- data/docs/ConversationMessageDeliveryPayloadExternalMessages.md +17 -0
- data/docs/ConversationMessageDeliveryPayloadMessage.md +17 -0
- data/docs/ConversationMessageDeliveryUserEvent.md +23 -0
- data/docs/ConversationMessageEvent.md +23 -0
- data/docs/ConversationMessageEventAllOf.md +17 -0
- data/docs/ConversationMessageEventAllOfPayload.md +21 -0
- data/docs/ConversationPostbackEvent.md +23 -0
- data/docs/ConversationPostbackEventAllOf.md +17 -0
- data/docs/ConversationPostbackEventAllOfPayload.md +23 -0
- data/docs/ConversationReadEvent.md +23 -0
- data/docs/ConversationReadEventAllOf.md +17 -0
- data/docs/ConversationReadEventAllOfPayload.md +19 -0
- data/docs/ConversationResponse.md +17 -0
- data/docs/ConversationTruncated.md +23 -0
- data/docs/ConversationType.md +16 -0
- data/docs/ConversationTypingEvent.md +23 -0
- data/docs/ConversationTypingEventAllOf.md +17 -0
- data/docs/ConversationTypingEventAllOfPayload.md +19 -0
- data/docs/ConversationUpdateBody.md +23 -0
- data/docs/ConversationsApi.md +319 -0
- data/docs/Custom.md +19 -0
- data/docs/CustomAllOf.md +19 -0
- data/docs/CustomIntegrationApiKeysApi.md +258 -0
- data/docs/CustomUpdate.md +16 -0
- data/docs/Destination.md +19 -0
- data/docs/Device.md +35 -0
- data/docs/EventSubSchema.md +21 -0
- data/docs/ExtraChannelOptions.md +17 -0
- data/docs/ExtraChannelOptionsMessenger.md +19 -0
- data/docs/Field.md +35 -0
- data/docs/FileMessage.md +25 -0
- data/docs/FormMessage.md +21 -0
- data/docs/FormResponseMessage.md +21 -0
- data/docs/ImageMessage.md +23 -0
- data/docs/InlineObject.md +23 -0
- data/docs/Integration.md +23 -0
- data/docs/IntegrationApiKey.md +17 -0
- data/docs/IntegrationApiKeyListResponse.md +17 -0
- data/docs/IntegrationApiKeyResponse.md +17 -0
- data/docs/IntegrationId.md +17 -0
- data/docs/IntegrationListFilter.md +17 -0
- data/docs/IntegrationListResponse.md +21 -0
- data/docs/IntegrationResponse.md +17 -0
- data/docs/IntegrationType.md +17 -0
- data/docs/IntegrationUpdate.md +71 -0
- data/docs/IntegrationUpdateBase.md +17 -0
- data/docs/IntegrationsApi.md +319 -0
- data/docs/Ios.md +27 -0
- data/docs/IosAllOf.md +27 -0
- data/docs/IosUpdate.md +27 -0
- data/docs/IosUpdateAllOf.md +25 -0
- data/docs/Item.md +29 -0
- data/docs/Line.md +31 -0
- data/docs/LineAllOf.md +31 -0
- data/docs/LineUpdate.md +16 -0
- data/docs/Link.md +27 -0
- data/docs/Links.md +19 -0
- data/docs/ListMessage.md +21 -0
- data/docs/LocationMessage.md +23 -0
- data/docs/LocationMessageCoordinates.md +19 -0
- data/docs/LocationMessageLocation.md +19 -0
- data/docs/LocationRequest.md +21 -0
- data/docs/Mailgun.md +27 -0
- data/docs/MailgunAllOf.md +27 -0
- data/docs/MailgunUpdate.md +21 -0
- data/docs/MailgunUpdateAllOf.md +19 -0
- data/docs/MatchCriteria.md +27 -0
- data/docs/MatchCriteriaBase.md +21 -0
- data/docs/MatchCriteriaMailgun.md +25 -0
- data/docs/MatchCriteriaMailgunAllOf.md +21 -0
- data/docs/MatchCriteriaMessagebird.md +23 -0
- data/docs/MatchCriteriaMessagebirdAllOf.md +19 -0
- data/docs/MatchCriteriaTwilio.md +23 -0
- data/docs/MatchCriteriaTwilioAllOf.md +19 -0
- data/docs/MatchCriteriaWhatsapp.md +23 -0
- data/docs/MatchCriteriaWhatsappAllOf.md +19 -0
- data/docs/Message.md +31 -0
- data/docs/MessageBirdUpdate.md +16 -0
- data/docs/MessageListResponse.md +21 -0
- data/docs/MessageOverride.md +23 -0
- data/docs/MessageOverrideApple.md +17 -0
- data/docs/MessageOverrideLine.md +17 -0
- data/docs/MessageOverrideMessenger.md +17 -0
- data/docs/MessageOverridePayload.md +17 -0
- data/docs/MessageOverrideWhatsapp.md +17 -0
- data/docs/MessagePost.md +27 -0
- data/docs/MessagePostResponse.md +17 -0
- data/docs/MessageWebhook.md +31 -0
- data/docs/Messagebird.md +25 -0
- data/docs/MessagebirdAllOf.md +25 -0
- data/docs/MessagesApi.md +260 -0
- data/docs/Messenger.md +23 -0
- data/docs/MessengerAllOf.md +23 -0
- data/docs/MessengerUpdate.md +19 -0
- data/docs/MessengerUpdateAllOf.md +17 -0
- data/docs/Meta.md +21 -0
- data/docs/OAuthEndpointsApi.md +168 -0
- data/docs/OfferControlBody.md +19 -0
- data/docs/Page.md +21 -0
- data/docs/Participant.md +27 -0
- data/docs/ParticipantJoinBody.md +16 -0
- data/docs/ParticipantLeaveBody.md +21 -0
- data/docs/ParticipantLeaveBodyParticipantId.md +17 -0
- data/docs/ParticipantLeaveBodyUserExternalId.md +17 -0
- data/docs/ParticipantLeaveBodyUserId.md +17 -0
- data/docs/ParticipantListResponse.md +21 -0
- data/docs/ParticipantResponse.md +17 -0
- data/docs/ParticipantSubSchema.md +21 -0
- data/docs/ParticipantWithUserExternalId.md +19 -0
- data/docs/ParticipantWithUserId.md +19 -0
- data/docs/ParticipantsApi.md +199 -0
- data/docs/PassControlBody.md +19 -0
- data/docs/Postback.md +23 -0
- data/docs/PostbackWebhook.md +19 -0
- data/docs/PrechatCapture.md +23 -0
- data/docs/Profile.md +23 -0
- data/docs/QuotedMessage.md +21 -0
- data/docs/QuotedMessageExternalMessageId.md +19 -0
- data/docs/QuotedMessageMessage.md +19 -0
- data/docs/Referral.md +19 -0
- data/docs/ReferralDetails.md +21 -0
- data/docs/Reply.md +25 -0
- data/docs/Source.md +27 -0
- data/docs/SourceWebhook.md +27 -0
- data/docs/Status.md +16 -0
- data/docs/Switchboard.md +21 -0
- data/docs/SwitchboardAcceptControl.md +23 -0
- data/docs/SwitchboardAcceptControlAllOf.md +17 -0
- data/docs/SwitchboardAcceptControlAllOfPayload.md +19 -0
- data/docs/SwitchboardAcceptControlFailure.md +23 -0
- data/docs/SwitchboardAcceptControlFailureAllOf.md +17 -0
- data/docs/SwitchboardAcceptControlFailureAllOfPayload.md +21 -0
- data/docs/SwitchboardActionsApi.md +197 -0
- data/docs/SwitchboardIntegration.md +29 -0
- data/docs/SwitchboardIntegrationCreateBody.md +27 -0
- data/docs/SwitchboardIntegrationListResponse.md +17 -0
- data/docs/SwitchboardIntegrationResponse.md +17 -0
- data/docs/SwitchboardIntegrationUpdateBody.md +27 -0
- data/docs/SwitchboardIntegrationWebhook.md +23 -0
- data/docs/SwitchboardIntegrationsApi.md +260 -0
- data/docs/SwitchboardListResponse.md +17 -0
- data/docs/SwitchboardOfferControl.md +23 -0
- data/docs/SwitchboardOfferControlAllOf.md +17 -0
- data/docs/SwitchboardOfferControlAllOfPayload.md +19 -0
- data/docs/SwitchboardOfferControlFailure.md +23 -0
- data/docs/SwitchboardPassControl.md +23 -0
- data/docs/SwitchboardPassControlAllOf.md +17 -0
- data/docs/SwitchboardPassControlAllOfPayload.md +19 -0
- data/docs/SwitchboardPassControlFailure.md +23 -0
- data/docs/SwitchboardResponse.md +17 -0
- data/docs/SwitchboardUpdateBody.md +19 -0
- data/docs/SwitchboardsApi.md +250 -0
- data/docs/Target.md +17 -0
- data/docs/Telegram.md +23 -0
- data/docs/TelegramAllOf.md +23 -0
- data/docs/TelegramUpdate.md +16 -0
- data/docs/TextMessage.md +21 -0
- data/docs/Twilio.md +23 -0
- data/docs/TwilioAllOf.md +23 -0
- data/docs/TwilioUpdate.md +16 -0
- data/docs/Twitter.md +29 -0
- data/docs/TwitterAllOf.md +29 -0
- data/docs/TwitterUpdate.md +16 -0
- data/docs/User.md +25 -0
- data/docs/UserAllOf.md +21 -0
- data/docs/UserCreateBody.md +23 -0
- data/docs/UserMergeEvent.md +23 -0
- data/docs/UserMergeEventAllOf.md +17 -0
- data/docs/UserMergeEventAllOfPayload.md +21 -0
- data/docs/UserMergeEventAllOfPayloadMergedConversations.md +19 -0
- data/docs/UserMergeEventAllOfPayloadMergedUsers.md +19 -0
- data/docs/UserResponse.md +17 -0
- data/docs/UserTruncated.md +19 -0
- data/docs/UserUpdateBody.md +21 -0
- data/docs/UsersApi.md +315 -0
- data/docs/Viber.md +23 -0
- data/docs/ViberAllOf.md +23 -0
- data/docs/ViberUpdate.md +16 -0
- data/docs/Web.md +47 -0
- data/docs/WebAllOf.md +47 -0
- data/docs/WebUpdate.md +47 -0
- data/docs/WebUpdateAllOf.md +45 -0
- data/docs/Webhook.md +29 -0
- data/docs/WebhookBody.md +23 -0
- data/docs/WebhookCreateBody.md +16 -0
- data/docs/WebhookListResponse.md +17 -0
- data/docs/WebhookResponse.md +17 -0
- data/docs/WebhookSubSchema.md +19 -0
- data/docs/WebhooksApi.md +323 -0
- data/docs/Webview.md +33 -0
- data/docs/WhatsAppUpdate.md +23 -0
- data/docs/WhatsAppUpdateAllOf.md +21 -0
- data/docs/Whatsapp.md +25 -0
- data/docs/WhatsappAllOf.md +25 -0
- data/lib/sunshine-conversations-client.rb +306 -0
- data/lib/sunshine-conversations-client/api/activities_api.rb +95 -0
- data/lib/sunshine-conversations-client/api/app_keys_api.rb +287 -0
- data/lib/sunshine-conversations-client/api/apps_api.rb +339 -0
- data/lib/sunshine-conversations-client/api/attachments_api.rb +305 -0
- data/lib/sunshine-conversations-client/api/clients_api.rb +240 -0
- data/lib/sunshine-conversations-client/api/conversations_api.rb +373 -0
- data/lib/sunshine-conversations-client/api/custom_integration_api_keys_api.rb +311 -0
- data/lib/sunshine-conversations-client/api/integrations_api.rb +369 -0
- data/lib/sunshine-conversations-client/api/messages_api.rb +308 -0
- data/lib/sunshine-conversations-client/api/o_auth_endpoints_api.rb +213 -0
- data/lib/sunshine-conversations-client/api/participants_api.rb +242 -0
- data/lib/sunshine-conversations-client/api/switchboard_actions_api.rb +247 -0
- data/lib/sunshine-conversations-client/api/switchboard_integrations_api.rb +319 -0
- data/lib/sunshine-conversations-client/api/switchboards_api.rb +287 -0
- data/lib/sunshine-conversations-client/api/users_api.rb +369 -0
- data/lib/sunshine-conversations-client/api/webhooks_api.rb +393 -0
- data/lib/sunshine-conversations-client/api_client.rb +348 -0
- data/lib/sunshine-conversations-client/api_error.rb +54 -0
- data/lib/sunshine-conversations-client/configuration.rb +284 -0
- data/lib/sunshine-conversations-client/models/accept_control_body.rb +204 -0
- data/lib/sunshine-conversations-client/models/action.rb +421 -0
- data/lib/sunshine-conversations-client/models/action_subset.rb +409 -0
- data/lib/sunshine-conversations-client/models/activity.rb +265 -0
- data/lib/sunshine-conversations-client/models/activity_all_of.rb +213 -0
- data/lib/sunshine-conversations-client/models/activity_post.rb +266 -0
- data/lib/sunshine-conversations-client/models/activity_post_all_of.rb +204 -0
- data/lib/sunshine-conversations-client/models/activity_types.rb +238 -0
- data/lib/sunshine-conversations-client/models/android.rb +280 -0
- data/lib/sunshine-conversations-client/models/android_all_of.rb +268 -0
- data/lib/sunshine-conversations-client/models/android_update.rb +299 -0
- data/lib/sunshine-conversations-client/models/android_update_all_of.rb +256 -0
- data/lib/sunshine-conversations-client/models/api_key.rb +225 -0
- data/lib/sunshine-conversations-client/models/app.rb +234 -0
- data/lib/sunshine-conversations-client/models/app_create_body.rb +229 -0
- data/lib/sunshine-conversations-client/models/app_key.rb +224 -0
- data/lib/sunshine-conversations-client/models/app_key_create_body.rb +209 -0
- data/lib/sunshine-conversations-client/models/app_key_list_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/app_key_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/app_list_filter.rb +204 -0
- data/lib/sunshine-conversations-client/models/app_list_response.rb +221 -0
- data/lib/sunshine-conversations-client/models/app_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/app_settings.rb +290 -0
- data/lib/sunshine-conversations-client/models/app_sub_schema.rb +205 -0
- data/lib/sunshine-conversations-client/models/app_update_body.rb +224 -0
- data/lib/sunshine-conversations-client/models/apple.rb +263 -0
- data/lib/sunshine-conversations-client/models/apple_all_of.rb +252 -0
- data/lib/sunshine-conversations-client/models/apple_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/attachment_delete_body.rb +209 -0
- data/lib/sunshine-conversations-client/models/attachment_media_token_body.rb +208 -0
- data/lib/sunshine-conversations-client/models/attachment_media_token_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/attachment_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/attachment_schema.rb +214 -0
- data/lib/sunshine-conversations-client/models/attachment_upload_body.rb +208 -0
- data/lib/sunshine-conversations-client/models/author.rb +284 -0
- data/lib/sunshine-conversations-client/models/author_webhook.rb +264 -0
- data/lib/sunshine-conversations-client/models/buy.rb +262 -0
- data/lib/sunshine-conversations-client/models/carousel_message.rb +245 -0
- data/lib/sunshine-conversations-client/models/carousel_message_display_settings.rb +239 -0
- data/lib/sunshine-conversations-client/models/client.rb +345 -0
- data/lib/sunshine-conversations-client/models/client_association.rb +213 -0
- data/lib/sunshine-conversations-client/models/client_create.rb +236 -0
- data/lib/sunshine-conversations-client/models/client_list_response.rb +221 -0
- data/lib/sunshine-conversations-client/models/client_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/client_type.rb +42 -0
- data/lib/sunshine-conversations-client/models/confirmation.rb +254 -0
- data/lib/sunshine-conversations-client/models/content.rb +380 -0
- data/lib/sunshine-conversations-client/models/conversation.rb +366 -0
- data/lib/sunshine-conversations-client/models/conversation_all_of.rb +317 -0
- data/lib/sunshine-conversations-client/models/conversation_create_body.rb +308 -0
- data/lib/sunshine-conversations-client/models/conversation_create_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_create_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/conversation_create_event_all_of_payload.rb +281 -0
- data/lib/sunshine-conversations-client/models/conversation_list_filter.rb +214 -0
- data/lib/sunshine-conversations-client/models/conversation_list_response.rb +221 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_channel_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_channel_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_failure_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_failure_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload.rb +253 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_destination.rb +215 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_external_messages.rb +204 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_message.rb +205 -0
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_user_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_message_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_message_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/conversation_message_event_all_of_payload.rb +224 -0
- data/lib/sunshine-conversations-client/models/conversation_postback_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of_payload.rb +235 -0
- data/lib/sunshine-conversations-client/models/conversation_read_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_read_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/conversation_read_event_all_of_payload.rb +215 -0
- data/lib/sunshine-conversations-client/models/conversation_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/conversation_truncated.rb +235 -0
- data/lib/sunshine-conversations-client/models/conversation_type.rb +33 -0
- data/lib/sunshine-conversations-client/models/conversation_typing_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of_payload.rb +215 -0
- data/lib/sunshine-conversations-client/models/conversation_update_body.rb +285 -0
- data/lib/sunshine-conversations-client/models/custom.rb +232 -0
- data/lib/sunshine-conversations-client/models/custom_all_of.rb +220 -0
- data/lib/sunshine-conversations-client/models/custom_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/destination.rb +239 -0
- data/lib/sunshine-conversations-client/models/device.rb +343 -0
- data/lib/sunshine-conversations-client/models/event_sub_schema.rb +224 -0
- data/lib/sunshine-conversations-client/models/extra_channel_options.rb +204 -0
- data/lib/sunshine-conversations-client/models/extra_channel_options_messenger.rb +251 -0
- data/lib/sunshine-conversations-client/models/field.rb +522 -0
- data/lib/sunshine-conversations-client/models/file_message.rb +256 -0
- data/lib/sunshine-conversations-client/models/form_message.rb +236 -0
- data/lib/sunshine-conversations-client/models/form_response_message.rb +236 -0
- data/lib/sunshine-conversations-client/models/image_message.rb +245 -0
- data/lib/sunshine-conversations-client/models/inline_object.rb +254 -0
- data/lib/sunshine-conversations-client/models/integration.rb +260 -0
- data/lib/sunshine-conversations-client/models/integration_api_key.rb +209 -0
- data/lib/sunshine-conversations-client/models/integration_api_key_list_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/integration_api_key_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/integration_id.rb +204 -0
- data/lib/sunshine-conversations-client/models/integration_list_filter.rb +204 -0
- data/lib/sunshine-conversations-client/models/integration_list_response.rb +221 -0
- data/lib/sunshine-conversations-client/models/integration_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/integration_type.rb +204 -0
- data/lib/sunshine-conversations-client/models/integration_update.rb +619 -0
- data/lib/sunshine-conversations-client/models/integration_update_base.rb +229 -0
- data/lib/sunshine-conversations-client/models/ios.rb +284 -0
- data/lib/sunshine-conversations-client/models/ios_all_of.rb +272 -0
- data/lib/sunshine-conversations-client/models/ios_update.rb +303 -0
- data/lib/sunshine-conversations-client/models/ios_update_all_of.rb +260 -0
- data/lib/sunshine-conversations-client/models/item.rb +381 -0
- data/lib/sunshine-conversations-client/models/line.rb +313 -0
- data/lib/sunshine-conversations-client/models/line_all_of.rb +302 -0
- data/lib/sunshine-conversations-client/models/line_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/link.rb +272 -0
- data/lib/sunshine-conversations-client/models/links.rb +215 -0
- data/lib/sunshine-conversations-client/models/list_message.rb +235 -0
- data/lib/sunshine-conversations-client/models/location_message.rb +245 -0
- data/lib/sunshine-conversations-client/models/location_message_coordinates.rb +225 -0
- data/lib/sunshine-conversations-client/models/location_message_location.rb +215 -0
- data/lib/sunshine-conversations-client/models/location_request.rb +238 -0
- data/lib/sunshine-conversations-client/models/mailgun.rb +356 -0
- data/lib/sunshine-conversations-client/models/mailgun_all_of.rb +345 -0
- data/lib/sunshine-conversations-client/models/mailgun_update.rb +273 -0
- data/lib/sunshine-conversations-client/models/mailgun_update_all_of.rb +230 -0
- data/lib/sunshine-conversations-client/models/match_criteria.rb +312 -0
- data/lib/sunshine-conversations-client/models/match_criteria_base.rb +237 -0
- data/lib/sunshine-conversations-client/models/match_criteria_mailgun.rb +273 -0
- data/lib/sunshine-conversations-client/models/match_criteria_mailgun_all_of.rb +234 -0
- data/lib/sunshine-conversations-client/models/match_criteria_messagebird.rb +261 -0
- data/lib/sunshine-conversations-client/models/match_criteria_messagebird_all_of.rb +222 -0
- data/lib/sunshine-conversations-client/models/match_criteria_twilio.rb +261 -0
- data/lib/sunshine-conversations-client/models/match_criteria_twilio_all_of.rb +222 -0
- data/lib/sunshine-conversations-client/models/match_criteria_whatsapp.rb +261 -0
- data/lib/sunshine-conversations-client/models/match_criteria_whatsapp_all_of.rb +222 -0
- data/lib/sunshine-conversations-client/models/message.rb +274 -0
- data/lib/sunshine-conversations-client/models/message_bird_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/message_list_response.rb +221 -0
- data/lib/sunshine-conversations-client/models/message_override.rb +253 -0
- data/lib/sunshine-conversations-client/models/message_override_apple.rb +203 -0
- data/lib/sunshine-conversations-client/models/message_override_line.rb +203 -0
- data/lib/sunshine-conversations-client/models/message_override_messenger.rb +203 -0
- data/lib/sunshine-conversations-client/models/message_override_payload.rb +204 -0
- data/lib/sunshine-conversations-client/models/message_override_whatsapp.rb +203 -0
- data/lib/sunshine-conversations-client/models/message_post.rb +263 -0
- data/lib/sunshine-conversations-client/models/message_post_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/message_webhook.rb +274 -0
- data/lib/sunshine-conversations-client/models/messagebird.rb +330 -0
- data/lib/sunshine-conversations-client/models/messagebird_all_of.rb +319 -0
- data/lib/sunshine-conversations-client/models/messenger.rb +263 -0
- data/lib/sunshine-conversations-client/models/messenger_all_of.rb +252 -0
- data/lib/sunshine-conversations-client/models/messenger_update.rb +247 -0
- data/lib/sunshine-conversations-client/models/messenger_update_all_of.rb +204 -0
- data/lib/sunshine-conversations-client/models/meta.rb +225 -0
- data/lib/sunshine-conversations-client/models/offer_control_body.rb +219 -0
- data/lib/sunshine-conversations-client/models/page.rb +250 -0
- data/lib/sunshine-conversations-client/models/participant.rb +255 -0
- data/lib/sunshine-conversations-client/models/participant_join_body.rb +205 -0
- data/lib/sunshine-conversations-client/models/participant_leave_body.rb +249 -0
- data/lib/sunshine-conversations-client/models/participant_leave_body_participant_id.rb +204 -0
- data/lib/sunshine-conversations-client/models/participant_leave_body_user_external_id.rb +204 -0
- data/lib/sunshine-conversations-client/models/participant_leave_body_user_id.rb +204 -0
- data/lib/sunshine-conversations-client/models/participant_list_response.rb +221 -0
- data/lib/sunshine-conversations-client/models/participant_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/participant_sub_schema.rb +244 -0
- data/lib/sunshine-conversations-client/models/participant_with_user_external_id.rb +214 -0
- data/lib/sunshine-conversations-client/models/participant_with_user_id.rb +214 -0
- data/lib/sunshine-conversations-client/models/pass_control_body.rb +219 -0
- data/lib/sunshine-conversations-client/models/postback.rb +252 -0
- data/lib/sunshine-conversations-client/models/postback_webhook.rb +215 -0
- data/lib/sunshine-conversations-client/models/prechat_capture.rb +239 -0
- data/lib/sunshine-conversations-client/models/profile.rb +335 -0
- data/lib/sunshine-conversations-client/models/quoted_message.rb +249 -0
- data/lib/sunshine-conversations-client/models/quoted_message_external_message_id.rb +216 -0
- data/lib/sunshine-conversations-client/models/quoted_message_message.rb +215 -0
- data/lib/sunshine-conversations-client/models/referral.rb +214 -0
- data/lib/sunshine-conversations-client/models/referral_details.rb +226 -0
- data/lib/sunshine-conversations-client/models/reply.rb +260 -0
- data/lib/sunshine-conversations-client/models/source.rb +265 -0
- data/lib/sunshine-conversations-client/models/source_webhook.rb +258 -0
- data/lib/sunshine-conversations-client/models/status.rb +34 -0
- data/lib/sunshine-conversations-client/models/switchboard.rb +234 -0
- data/lib/sunshine-conversations-client/models/switchboard_accept_control.rb +241 -0
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of_payload.rb +216 -0
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure.rb +241 -0
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of_payload.rb +226 -0
- data/lib/sunshine-conversations-client/models/switchboard_integration.rb +333 -0
- data/lib/sunshine-conversations-client/models/switchboard_integration_create_body.rb +302 -0
- data/lib/sunshine-conversations-client/models/switchboard_integration_list_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/switchboard_integration_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/switchboard_integration_update_body.rb +294 -0
- data/lib/sunshine-conversations-client/models/switchboard_integration_webhook.rb +249 -0
- data/lib/sunshine-conversations-client/models/switchboard_list_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/switchboard_offer_control.rb +241 -0
- data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of_payload.rb +216 -0
- data/lib/sunshine-conversations-client/models/switchboard_offer_control_failure.rb +241 -0
- data/lib/sunshine-conversations-client/models/switchboard_pass_control.rb +241 -0
- data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of_payload.rb +216 -0
- data/lib/sunshine-conversations-client/models/switchboard_pass_control_failure.rb +241 -0
- data/lib/sunshine-conversations-client/models/switchboard_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/switchboard_update_body.rb +214 -0
- data/lib/sunshine-conversations-client/models/target.rb +210 -0
- data/lib/sunshine-conversations-client/models/telegram.rb +272 -0
- data/lib/sunshine-conversations-client/models/telegram_all_of.rb +261 -0
- data/lib/sunshine-conversations-client/models/telegram_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/text_message.rb +245 -0
- data/lib/sunshine-conversations-client/models/twilio.rb +301 -0
- data/lib/sunshine-conversations-client/models/twilio_all_of.rb +290 -0
- data/lib/sunshine-conversations-client/models/twilio_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/twitter.rb +419 -0
- data/lib/sunshine-conversations-client/models/twitter_all_of.rb +408 -0
- data/lib/sunshine-conversations-client/models/twitter_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/user.rb +250 -0
- data/lib/sunshine-conversations-client/models/user_all_of.rb +221 -0
- data/lib/sunshine-conversations-client/models/user_create_body.rb +267 -0
- data/lib/sunshine-conversations-client/models/user_merge_event.rb +241 -0
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of.rb +203 -0
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload.rb +225 -0
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_conversations.rb +215 -0
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_users.rb +215 -0
- data/lib/sunshine-conversations-client/models/user_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/user_truncated.rb +215 -0
- data/lib/sunshine-conversations-client/models/user_update_body.rb +223 -0
- data/lib/sunshine-conversations-client/models/viber.rb +272 -0
- data/lib/sunshine-conversations-client/models/viber_all_of.rb +261 -0
- data/lib/sunshine-conversations-client/models/viber_update.rb +205 -0
- data/lib/sunshine-conversations-client/models/web.rb +383 -0
- data/lib/sunshine-conversations-client/models/web_all_of.rb +372 -0
- data/lib/sunshine-conversations-client/models/web_update.rb +402 -0
- data/lib/sunshine-conversations-client/models/web_update_all_of.rb +360 -0
- data/lib/sunshine-conversations-client/models/webhook.rb +277 -0
- data/lib/sunshine-conversations-client/models/webhook_body.rb +237 -0
- data/lib/sunshine-conversations-client/models/webhook_create_body.rb +205 -0
- data/lib/sunshine-conversations-client/models/webhook_list_response.rb +203 -0
- data/lib/sunshine-conversations-client/models/webhook_response.rb +204 -0
- data/lib/sunshine-conversations-client/models/webhook_sub_schema.rb +215 -0
- data/lib/sunshine-conversations-client/models/webview.rb +339 -0
- data/lib/sunshine-conversations-client/models/whats_app_update.rb +272 -0
- data/lib/sunshine-conversations-client/models/whats_app_update_all_of.rb +229 -0
- data/lib/sunshine-conversations-client/models/whatsapp.rb +268 -0
- data/lib/sunshine-conversations-client/models/whatsapp_all_of.rb +257 -0
- data/lib/sunshine-conversations-client/version.rb +12 -0
- data/spec/api_client_spec.rb +223 -0
- data/spec/configuration_spec.rb +39 -0
- data/spec/spec_helper.rb +108 -0
- data/sunshine-conversations-client.gemspec +36 -0
- metadata +641 -0
@@ -0,0 +1,380 @@
|
|
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 Content
|
14
|
+
# The type of message.
|
15
|
+
attr_accessor :type
|
16
|
+
|
17
|
+
# The fallback text message used when location messages are not supported by the channel.
|
18
|
+
attr_accessor :text
|
19
|
+
|
20
|
+
# An array of objects representing the actions associated with the message. The array length is limited by the third party channel.
|
21
|
+
attr_accessor :actions
|
22
|
+
|
23
|
+
# An array of objects representing the items associated with the message. Only present in carousel and list type messages.
|
24
|
+
attr_accessor :items
|
25
|
+
|
26
|
+
attr_accessor :display_settings
|
27
|
+
|
28
|
+
# The URL for media, such as an image, attached to the message.
|
29
|
+
attr_accessor :media_url
|
30
|
+
|
31
|
+
# The size of the media.
|
32
|
+
attr_accessor :media_size
|
33
|
+
|
34
|
+
# The media type of the file.
|
35
|
+
attr_accessor :media_type
|
36
|
+
|
37
|
+
# true if the message should block the chat input on Web Messenger. form message only.
|
38
|
+
attr_accessor :block_chat_input
|
39
|
+
|
40
|
+
# Array of field objects that contain the submitted fields.
|
41
|
+
attr_accessor :fields
|
42
|
+
|
43
|
+
# A string containing the `label: value` of all fields, each separated by a newline character.
|
44
|
+
attr_accessor :text_fallback
|
45
|
+
|
46
|
+
attr_accessor :coordinates
|
47
|
+
|
48
|
+
attr_accessor :location
|
49
|
+
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
51
|
+
def self.attribute_map
|
52
|
+
{
|
53
|
+
:'type' => :'type',
|
54
|
+
:'text' => :'text',
|
55
|
+
:'actions' => :'actions',
|
56
|
+
:'items' => :'items',
|
57
|
+
:'display_settings' => :'displaySettings',
|
58
|
+
:'media_url' => :'mediaUrl',
|
59
|
+
:'media_size' => :'mediaSize',
|
60
|
+
:'media_type' => :'mediaType',
|
61
|
+
:'block_chat_input' => :'blockChatInput',
|
62
|
+
:'fields' => :'fields',
|
63
|
+
:'text_fallback' => :'textFallback',
|
64
|
+
:'coordinates' => :'coordinates',
|
65
|
+
:'location' => :'location'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
def self.openapi_types
|
71
|
+
{
|
72
|
+
:'type' => :'String',
|
73
|
+
:'text' => :'String',
|
74
|
+
:'actions' => :'Array<ActionSubset>',
|
75
|
+
:'items' => :'Array<Item>',
|
76
|
+
:'display_settings' => :'CarouselMessageDisplaySettings',
|
77
|
+
:'media_url' => :'String',
|
78
|
+
:'media_size' => :'Float',
|
79
|
+
:'media_type' => :'String',
|
80
|
+
:'block_chat_input' => :'Boolean',
|
81
|
+
:'fields' => :'Array<Field>',
|
82
|
+
:'text_fallback' => :'String',
|
83
|
+
:'coordinates' => :'LocationMessageCoordinates',
|
84
|
+
:'location' => :'LocationMessageLocation'
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
# List of attributes with nullable: true
|
89
|
+
def self.openapi_nullable
|
90
|
+
Set.new([
|
91
|
+
])
|
92
|
+
end
|
93
|
+
|
94
|
+
# List of class defined in oneOf (OpenAPI v3)
|
95
|
+
def self.openapi_one_of
|
96
|
+
[
|
97
|
+
:'CarouselMessage',
|
98
|
+
:'FileMessage',
|
99
|
+
:'FormMessage',
|
100
|
+
:'FormResponseMessage',
|
101
|
+
:'ImageMessage',
|
102
|
+
:'ListMessage',
|
103
|
+
:'LocationMessage',
|
104
|
+
:'TextMessage'
|
105
|
+
]
|
106
|
+
end
|
107
|
+
|
108
|
+
# discriminator's property name in OpenAPI v3
|
109
|
+
def self.openapi_discriminator_name
|
110
|
+
:'type'
|
111
|
+
end
|
112
|
+
|
113
|
+
# Initializes the object
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
def initialize(attributes = {})
|
116
|
+
if (!attributes.is_a?(Hash))
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Content` initialize method"
|
118
|
+
end
|
119
|
+
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
121
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
122
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Content`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
124
|
+
end
|
125
|
+
h[k.to_sym] = v
|
126
|
+
}
|
127
|
+
|
128
|
+
if attributes.key?(:'type')
|
129
|
+
self.type = attributes[:'type']
|
130
|
+
else
|
131
|
+
self.type = 'location'
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'text')
|
135
|
+
self.text = attributes[:'text']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'actions')
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'items')
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'display_settings')
|
145
|
+
self.display_settings = attributes[:'display_settings']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'media_url')
|
149
|
+
self.media_url = attributes[:'media_url']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'media_size')
|
153
|
+
self.media_size = attributes[:'media_size']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'media_type')
|
157
|
+
self.media_type = attributes[:'media_type']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'block_chat_input')
|
161
|
+
self.block_chat_input = attributes[:'block_chat_input']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'fields')
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.key?(:'text_fallback')
|
168
|
+
self.text_fallback = attributes[:'text_fallback']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'coordinates')
|
172
|
+
self.coordinates = attributes[:'coordinates']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'location')
|
176
|
+
self.location = attributes[:'location']
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
181
|
+
# @return Array for valid properties with the reasons
|
182
|
+
def list_invalid_properties
|
183
|
+
invalid_properties = Array.new
|
184
|
+
if @type.nil?
|
185
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
186
|
+
end
|
187
|
+
|
188
|
+
if @items.nil?
|
189
|
+
invalid_properties.push('invalid value for "items", items cannot be nil.')
|
190
|
+
end
|
191
|
+
|
192
|
+
if @media_url.nil?
|
193
|
+
invalid_properties.push('invalid value for "media_url", media_url cannot be nil.')
|
194
|
+
end
|
195
|
+
|
196
|
+
if @fields.nil?
|
197
|
+
invalid_properties.push('invalid value for "fields", fields cannot be nil.')
|
198
|
+
end
|
199
|
+
|
200
|
+
if @coordinates.nil?
|
201
|
+
invalid_properties.push('invalid value for "coordinates", coordinates cannot be nil.')
|
202
|
+
end
|
203
|
+
|
204
|
+
invalid_properties
|
205
|
+
end
|
206
|
+
|
207
|
+
# Check to see if the all the properties in the model are valid
|
208
|
+
# @return true if the model is valid
|
209
|
+
def valid?
|
210
|
+
return false if @type.nil?
|
211
|
+
return false if @items.nil?
|
212
|
+
return false if @media_url.nil?
|
213
|
+
return false if @fields.nil?
|
214
|
+
return false if @coordinates.nil?
|
215
|
+
_one_of_found = false
|
216
|
+
self.class.openapi_one_of.each do |_class|
|
217
|
+
_one_of = SunshineConversationsClient.const_get(_class).build_from_hash(self.to_hash)
|
218
|
+
if _one_of.valid?
|
219
|
+
if _one_of_found
|
220
|
+
return false
|
221
|
+
else
|
222
|
+
_one_of_found = true
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
if !_one_of_found
|
228
|
+
return false
|
229
|
+
end
|
230
|
+
|
231
|
+
true
|
232
|
+
end
|
233
|
+
|
234
|
+
# Checks equality by comparing each attribute.
|
235
|
+
# @param [Object] Object to be compared
|
236
|
+
def ==(o)
|
237
|
+
return true if self.equal?(o)
|
238
|
+
self.class == o.class &&
|
239
|
+
type == o.type &&
|
240
|
+
text == o.text &&
|
241
|
+
actions == o.actions &&
|
242
|
+
items == o.items &&
|
243
|
+
display_settings == o.display_settings &&
|
244
|
+
media_url == o.media_url &&
|
245
|
+
media_size == o.media_size &&
|
246
|
+
media_type == o.media_type &&
|
247
|
+
block_chat_input == o.block_chat_input &&
|
248
|
+
fields == o.fields &&
|
249
|
+
text_fallback == o.text_fallback &&
|
250
|
+
coordinates == o.coordinates &&
|
251
|
+
location == o.location
|
252
|
+
end
|
253
|
+
|
254
|
+
# @see the `==` method
|
255
|
+
# @param [Object] Object to be compared
|
256
|
+
def eql?(o)
|
257
|
+
self == o
|
258
|
+
end
|
259
|
+
|
260
|
+
# Calculates hash code according to all attributes.
|
261
|
+
# @return [Integer] Hash code
|
262
|
+
def hash
|
263
|
+
[type, text, actions, items, display_settings, media_url, media_size, media_type, block_chat_input, fields, text_fallback, coordinates, location].hash
|
264
|
+
end
|
265
|
+
|
266
|
+
# Builds the object from hash
|
267
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
268
|
+
# @return [Object] Returns the model itself
|
269
|
+
def self.build_from_hash(attributes)
|
270
|
+
new.build_from_hash(attributes)
|
271
|
+
end
|
272
|
+
|
273
|
+
# Builds the object from hash
|
274
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
275
|
+
# @return [Object] Returns the model itself
|
276
|
+
def build_from_hash(attributes)
|
277
|
+
return nil unless attributes.is_a?(Hash)
|
278
|
+
self.class.openapi_types.each_pair do |key, type|
|
279
|
+
if type =~ /\AArray<(.*)>/i
|
280
|
+
# check to ensure the input is an array given that the attribute
|
281
|
+
# is documented as an array but the input is not
|
282
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
283
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
284
|
+
end
|
285
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
286
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
287
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
288
|
+
end
|
289
|
+
|
290
|
+
self
|
291
|
+
end
|
292
|
+
|
293
|
+
# Deserializes the data based on type
|
294
|
+
# @param string type Data type
|
295
|
+
# @param string value Value to be deserialized
|
296
|
+
# @return [Object] Deserialized data
|
297
|
+
def _deserialize(type, value)
|
298
|
+
case type.to_sym
|
299
|
+
when :DateTime
|
300
|
+
DateTime.parse(value)
|
301
|
+
when :Date
|
302
|
+
Date.parse(value)
|
303
|
+
when :String
|
304
|
+
value.to_s
|
305
|
+
when :Integer
|
306
|
+
value.to_i
|
307
|
+
when :Float
|
308
|
+
value.to_f
|
309
|
+
when :Boolean
|
310
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
311
|
+
true
|
312
|
+
else
|
313
|
+
false
|
314
|
+
end
|
315
|
+
when :Object
|
316
|
+
# generic object (usually a Hash), return directly
|
317
|
+
value
|
318
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
319
|
+
inner_type = Regexp.last_match[:inner_type]
|
320
|
+
value.map { |v| _deserialize(inner_type, v) }
|
321
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
322
|
+
k_type = Regexp.last_match[:k_type]
|
323
|
+
v_type = Regexp.last_match[:v_type]
|
324
|
+
{}.tap do |hash|
|
325
|
+
value.each do |k, v|
|
326
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
327
|
+
end
|
328
|
+
end
|
329
|
+
else # model
|
330
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
331
|
+
end
|
332
|
+
end
|
333
|
+
|
334
|
+
# Returns the string representation of the object
|
335
|
+
# @return [String] String presentation of the object
|
336
|
+
def to_s
|
337
|
+
to_hash.to_s
|
338
|
+
end
|
339
|
+
|
340
|
+
# to_body is an alias to to_hash (backward compatibility)
|
341
|
+
# @return [Hash] Returns the object in the form of hash
|
342
|
+
def to_body
|
343
|
+
to_hash
|
344
|
+
end
|
345
|
+
|
346
|
+
# Returns the object in the form of hash
|
347
|
+
# @return [Hash] Returns the object in the form of hash
|
348
|
+
def to_hash
|
349
|
+
hash = {}
|
350
|
+
self.class.attribute_map.each_pair do |attr, param|
|
351
|
+
value = self.send(attr)
|
352
|
+
if value.nil?
|
353
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
354
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
355
|
+
end
|
356
|
+
|
357
|
+
hash[param] = _to_hash(value)
|
358
|
+
end
|
359
|
+
hash
|
360
|
+
end
|
361
|
+
|
362
|
+
# Outputs non-array value in the form of hash
|
363
|
+
# For object, use to_hash. Otherwise, just return the value
|
364
|
+
# @param [Object] value Any valid value
|
365
|
+
# @return [Hash] Returns the value in the form of hash
|
366
|
+
def _to_hash(value)
|
367
|
+
if value.is_a?(Array)
|
368
|
+
value.compact.map { |v| _to_hash(v) }
|
369
|
+
elsif value.is_a?(Hash)
|
370
|
+
{}.tap do |hash|
|
371
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
372
|
+
end
|
373
|
+
elsif value.respond_to? :to_hash
|
374
|
+
value.to_hash
|
375
|
+
else
|
376
|
+
value
|
377
|
+
end
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
@@ -0,0 +1,366 @@
|
|
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 Conversation
|
14
|
+
# The unique ID of the conversation.
|
15
|
+
attr_accessor :id
|
16
|
+
|
17
|
+
attr_accessor :type
|
18
|
+
|
19
|
+
# The current switchboard integration that is in control of the conversation. This field is omitted if no `activeSwitchboardIntegration` exists for the conversation.
|
20
|
+
attr_accessor :active_switchboard_integration
|
21
|
+
|
22
|
+
# The switchboard integration that is awaiting control. This field is omitted if no switchboard integration has been previously offered control.
|
23
|
+
attr_accessor :pending_switchboard_integration
|
24
|
+
|
25
|
+
# Whether the conversation is the default conversation for the user. Will be true for the first personal conversation created for the user, and false in all other cases.
|
26
|
+
attr_accessor :is_default
|
27
|
+
|
28
|
+
# A friendly name for the conversation, may be displayed to the business or the user.
|
29
|
+
attr_accessor :display_name
|
30
|
+
|
31
|
+
# A short text describing the conversation.
|
32
|
+
attr_accessor :description
|
33
|
+
|
34
|
+
# A custom conversation icon url. The image must be in either JPG, PNG, or GIF format
|
35
|
+
attr_accessor :icon_url
|
36
|
+
|
37
|
+
# 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.
|
38
|
+
attr_accessor :metadata
|
39
|
+
|
40
|
+
# A datetime string with the format YYYY-MM-DDThh:mm:ss.SSSZ representing the moment the conversation was last marked as read with role business.
|
41
|
+
attr_accessor :business_last_read
|
42
|
+
|
43
|
+
# A datetime string with the format YYYY-MM-DDThh:mm:ss.SSSZ representing the moment the last message was received in the conversation, or the creation time if no messages have been received yet.
|
44
|
+
attr_accessor :last_updated_at
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'id' => :'id',
|
50
|
+
:'type' => :'type',
|
51
|
+
:'active_switchboard_integration' => :'activeSwitchboardIntegration',
|
52
|
+
:'pending_switchboard_integration' => :'pendingSwitchboardIntegration',
|
53
|
+
:'is_default' => :'isDefault',
|
54
|
+
:'display_name' => :'displayName',
|
55
|
+
:'description' => :'description',
|
56
|
+
:'icon_url' => :'iconUrl',
|
57
|
+
:'metadata' => :'metadata',
|
58
|
+
:'business_last_read' => :'businessLastRead',
|
59
|
+
:'last_updated_at' => :'lastUpdatedAt'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'id' => :'String',
|
67
|
+
:'type' => :'ConversationType',
|
68
|
+
:'active_switchboard_integration' => :'SwitchboardIntegrationWebhook',
|
69
|
+
:'pending_switchboard_integration' => :'SwitchboardIntegrationWebhook',
|
70
|
+
:'is_default' => :'Boolean',
|
71
|
+
:'display_name' => :'String',
|
72
|
+
:'description' => :'String',
|
73
|
+
:'icon_url' => :'String',
|
74
|
+
:'metadata' => :'Object',
|
75
|
+
:'business_last_read' => :'String',
|
76
|
+
:'last_updated_at' => :'String'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
def self.openapi_nullable
|
82
|
+
Set.new([
|
83
|
+
:'active_switchboard_integration',
|
84
|
+
:'pending_switchboard_integration',
|
85
|
+
:'description',
|
86
|
+
:'icon_url',
|
87
|
+
:'metadata',
|
88
|
+
:'business_last_read',
|
89
|
+
:'last_updated_at'
|
90
|
+
])
|
91
|
+
end
|
92
|
+
|
93
|
+
# List of class defined in allOf (OpenAPI v3)
|
94
|
+
def self.openapi_all_of
|
95
|
+
[
|
96
|
+
:'ConversationAllOf',
|
97
|
+
:'ConversationTruncated'
|
98
|
+
]
|
99
|
+
end
|
100
|
+
|
101
|
+
# Initializes the object
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
def initialize(attributes = {})
|
104
|
+
if (!attributes.is_a?(Hash))
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Conversation` initialize method"
|
106
|
+
end
|
107
|
+
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
110
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Conversation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
112
|
+
end
|
113
|
+
h[k.to_sym] = v
|
114
|
+
}
|
115
|
+
|
116
|
+
if attributes.key?(:'id')
|
117
|
+
self.id = attributes[:'id']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'type')
|
121
|
+
self.type = attributes[:'type']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'active_switchboard_integration')
|
125
|
+
self.active_switchboard_integration = attributes[:'active_switchboard_integration']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'pending_switchboard_integration')
|
129
|
+
self.pending_switchboard_integration = attributes[:'pending_switchboard_integration']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'is_default')
|
133
|
+
self.is_default = attributes[:'is_default']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'display_name')
|
137
|
+
self.display_name = attributes[:'display_name']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'description')
|
141
|
+
self.description = attributes[:'description']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'icon_url')
|
145
|
+
self.icon_url = attributes[:'icon_url']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'metadata')
|
149
|
+
self.metadata = attributes[:'metadata']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'business_last_read')
|
153
|
+
self.business_last_read = attributes[:'business_last_read']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'last_updated_at')
|
157
|
+
self.last_updated_at = attributes[:'last_updated_at']
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
162
|
+
# @return Array for valid properties with the reasons
|
163
|
+
def list_invalid_properties
|
164
|
+
invalid_properties = Array.new
|
165
|
+
if !@description.nil? && @description.to_s.length > 100
|
166
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 100.')
|
167
|
+
end
|
168
|
+
|
169
|
+
if !@description.nil? && @description.to_s.length < 1
|
170
|
+
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
171
|
+
end
|
172
|
+
|
173
|
+
if !@icon_url.nil? && @icon_url.to_s.length > 2048
|
174
|
+
invalid_properties.push('invalid value for "icon_url", the character length must be smaller than or equal to 2048.')
|
175
|
+
end
|
176
|
+
|
177
|
+
if !@icon_url.nil? && @icon_url.to_s.length < 1
|
178
|
+
invalid_properties.push('invalid value for "icon_url", the character length must be great than or equal to 1.')
|
179
|
+
end
|
180
|
+
|
181
|
+
invalid_properties
|
182
|
+
end
|
183
|
+
|
184
|
+
# Check to see if the all the properties in the model are valid
|
185
|
+
# @return true if the model is valid
|
186
|
+
def valid?
|
187
|
+
return false if !@description.nil? && @description.to_s.length > 100
|
188
|
+
return false if !@description.nil? && @description.to_s.length < 1
|
189
|
+
return false if !@icon_url.nil? && @icon_url.to_s.length > 2048
|
190
|
+
return false if !@icon_url.nil? && @icon_url.to_s.length < 1
|
191
|
+
true
|
192
|
+
end
|
193
|
+
|
194
|
+
# Custom attribute writer method with validation
|
195
|
+
# @param [Object] description Value to be assigned
|
196
|
+
def description=(description)
|
197
|
+
if !description.nil? && description.to_s.length > 100
|
198
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 100.'
|
199
|
+
end
|
200
|
+
|
201
|
+
if !description.nil? && description.to_s.length < 1
|
202
|
+
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
|
203
|
+
end
|
204
|
+
|
205
|
+
@description = description
|
206
|
+
end
|
207
|
+
|
208
|
+
# Custom attribute writer method with validation
|
209
|
+
# @param [Object] icon_url Value to be assigned
|
210
|
+
def icon_url=(icon_url)
|
211
|
+
if !icon_url.nil? && icon_url.to_s.length > 2048
|
212
|
+
fail ArgumentError, 'invalid value for "icon_url", the character length must be smaller than or equal to 2048.'
|
213
|
+
end
|
214
|
+
|
215
|
+
if !icon_url.nil? && icon_url.to_s.length < 1
|
216
|
+
fail ArgumentError, 'invalid value for "icon_url", the character length must be great than or equal to 1.'
|
217
|
+
end
|
218
|
+
|
219
|
+
@icon_url = icon_url
|
220
|
+
end
|
221
|
+
|
222
|
+
# Checks equality by comparing each attribute.
|
223
|
+
# @param [Object] Object to be compared
|
224
|
+
def ==(o)
|
225
|
+
return true if self.equal?(o)
|
226
|
+
self.class == o.class &&
|
227
|
+
id == o.id &&
|
228
|
+
type == o.type &&
|
229
|
+
active_switchboard_integration == o.active_switchboard_integration &&
|
230
|
+
pending_switchboard_integration == o.pending_switchboard_integration &&
|
231
|
+
is_default == o.is_default &&
|
232
|
+
display_name == o.display_name &&
|
233
|
+
description == o.description &&
|
234
|
+
icon_url == o.icon_url &&
|
235
|
+
metadata == o.metadata &&
|
236
|
+
business_last_read == o.business_last_read &&
|
237
|
+
last_updated_at == o.last_updated_at
|
238
|
+
end
|
239
|
+
|
240
|
+
# @see the `==` method
|
241
|
+
# @param [Object] Object to be compared
|
242
|
+
def eql?(o)
|
243
|
+
self == o
|
244
|
+
end
|
245
|
+
|
246
|
+
# Calculates hash code according to all attributes.
|
247
|
+
# @return [Integer] Hash code
|
248
|
+
def hash
|
249
|
+
[id, type, active_switchboard_integration, pending_switchboard_integration, is_default, display_name, description, icon_url, metadata, business_last_read, last_updated_at].hash
|
250
|
+
end
|
251
|
+
|
252
|
+
# Builds the object from hash
|
253
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
254
|
+
# @return [Object] Returns the model itself
|
255
|
+
def self.build_from_hash(attributes)
|
256
|
+
new.build_from_hash(attributes)
|
257
|
+
end
|
258
|
+
|
259
|
+
# Builds the object from hash
|
260
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
261
|
+
# @return [Object] Returns the model itself
|
262
|
+
def build_from_hash(attributes)
|
263
|
+
return nil unless attributes.is_a?(Hash)
|
264
|
+
self.class.openapi_types.each_pair do |key, type|
|
265
|
+
if type =~ /\AArray<(.*)>/i
|
266
|
+
# check to ensure the input is an array given that the attribute
|
267
|
+
# is documented as an array but the input is not
|
268
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
269
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
270
|
+
end
|
271
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
272
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
273
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
274
|
+
end
|
275
|
+
|
276
|
+
self
|
277
|
+
end
|
278
|
+
|
279
|
+
# Deserializes the data based on type
|
280
|
+
# @param string type Data type
|
281
|
+
# @param string value Value to be deserialized
|
282
|
+
# @return [Object] Deserialized data
|
283
|
+
def _deserialize(type, value)
|
284
|
+
case type.to_sym
|
285
|
+
when :DateTime
|
286
|
+
DateTime.parse(value)
|
287
|
+
when :Date
|
288
|
+
Date.parse(value)
|
289
|
+
when :String
|
290
|
+
value.to_s
|
291
|
+
when :Integer
|
292
|
+
value.to_i
|
293
|
+
when :Float
|
294
|
+
value.to_f
|
295
|
+
when :Boolean
|
296
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
297
|
+
true
|
298
|
+
else
|
299
|
+
false
|
300
|
+
end
|
301
|
+
when :Object
|
302
|
+
# generic object (usually a Hash), return directly
|
303
|
+
value
|
304
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
305
|
+
inner_type = Regexp.last_match[:inner_type]
|
306
|
+
value.map { |v| _deserialize(inner_type, v) }
|
307
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
308
|
+
k_type = Regexp.last_match[:k_type]
|
309
|
+
v_type = Regexp.last_match[:v_type]
|
310
|
+
{}.tap do |hash|
|
311
|
+
value.each do |k, v|
|
312
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
313
|
+
end
|
314
|
+
end
|
315
|
+
else # model
|
316
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
# Returns the string representation of the object
|
321
|
+
# @return [String] String presentation of the object
|
322
|
+
def to_s
|
323
|
+
to_hash.to_s
|
324
|
+
end
|
325
|
+
|
326
|
+
# to_body is an alias to to_hash (backward compatibility)
|
327
|
+
# @return [Hash] Returns the object in the form of hash
|
328
|
+
def to_body
|
329
|
+
to_hash
|
330
|
+
end
|
331
|
+
|
332
|
+
# Returns the object in the form of hash
|
333
|
+
# @return [Hash] Returns the object in the form of hash
|
334
|
+
def to_hash
|
335
|
+
hash = {}
|
336
|
+
self.class.attribute_map.each_pair do |attr, param|
|
337
|
+
value = self.send(attr)
|
338
|
+
if value.nil?
|
339
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
340
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
341
|
+
end
|
342
|
+
|
343
|
+
hash[param] = _to_hash(value)
|
344
|
+
end
|
345
|
+
hash
|
346
|
+
end
|
347
|
+
|
348
|
+
# Outputs non-array value in the form of hash
|
349
|
+
# For object, use to_hash. Otherwise, just return the value
|
350
|
+
# @param [Object] value Any valid value
|
351
|
+
# @return [Hash] Returns the value in the form of hash
|
352
|
+
def _to_hash(value)
|
353
|
+
if value.is_a?(Array)
|
354
|
+
value.compact.map { |v| _to_hash(v) }
|
355
|
+
elsif value.is_a?(Hash)
|
356
|
+
{}.tap do |hash|
|
357
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
358
|
+
end
|
359
|
+
elsif value.respond_to? :to_hash
|
360
|
+
value.to_hash
|
361
|
+
else
|
362
|
+
value
|
363
|
+
end
|
364
|
+
end
|
365
|
+
end
|
366
|
+
end
|