sunshine-conversations-client 16.0.1 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG_RB.md +7 -0
- data/README.md +20 -72
- data/docs/AcceptControlBody.md +8 -7
- data/docs/Action.md +64 -34
- data/docs/ActionSubset.md +60 -32
- data/docs/ActivitiesApi.md +2 -2
- data/docs/Activity.md +12 -11
- data/docs/ActivityMessage.md +69 -9
- data/docs/ActivityPost.md +10 -9
- data/docs/ActivityTypes.md +8 -7
- data/docs/Android.md +28 -27
- data/docs/AndroidUpdate.md +24 -23
- data/docs/ApiKey.md +12 -11
- data/docs/App.md +14 -13
- data/docs/AppCreateBody.md +12 -11
- data/docs/AppKey.md +12 -11
- data/docs/AppKeyCreateBody.md +8 -7
- data/docs/AppKeyListResponse.md +8 -7
- data/docs/AppKeyResponse.md +8 -7
- data/docs/AppKeysApi.md +7 -7
- data/docs/AppListFilter.md +8 -7
- data/docs/AppListResponse.md +12 -11
- data/docs/AppResponse.md +8 -7
- data/docs/AppSettings.md +20 -19
- data/docs/AppSubSchema.md +8 -7
- data/docs/AppUpdateBody.md +12 -11
- data/docs/Apple.md +20 -19
- data/docs/AppleMessageOverridePayload.md +10 -9
- data/docs/AppleUpdate.md +12 -11
- data/docs/AppsApi.md +7 -7
- data/docs/AttachmentDeleteBody.md +8 -7
- data/docs/AttachmentResponse.md +8 -7
- data/docs/AttachmentSchema.md +10 -9
- data/docs/AttachmentsApi.md +7 -7
- data/docs/Author.md +18 -17
- data/docs/AuthorWebhook.md +12 -11
- data/docs/Buy.md +16 -15
- data/docs/Campaign.md +8 -7
- data/docs/CarouselMessage.md +16 -15
- data/docs/CarouselMessageDisplaySettings.md +8 -7
- data/docs/Client.md +28 -27
- data/docs/ClientAddEvent.md +14 -13
- data/docs/ClientAddEventAllOfPayload.md +16 -15
- data/docs/ClientAssociation.md +10 -9
- data/docs/ClientCreate.md +12 -11
- data/docs/ClientListResponse.md +12 -11
- data/docs/ClientRemoveEvent.md +14 -13
- data/docs/ClientRemoveEventAllOfPayload.md +18 -17
- data/docs/ClientResponse.md +8 -7
- data/docs/ClientType.md +4 -5
- data/docs/ClientUpdateEvent.md +14 -13
- data/docs/ClientUpdateEventAllOfPayload.md +14 -13
- data/docs/ClientsApi.md +9 -9
- data/docs/Confirmation.md +10 -9
- data/docs/Content.md +93 -48
- data/docs/Conversation.md +30 -29
- data/docs/ConversationCreateBody.md +18 -17
- data/docs/ConversationCreateEvent.md +14 -13
- data/docs/ConversationCreateEventAllOfPayload.md +16 -15
- data/docs/ConversationJoinEvent.md +14 -13
- data/docs/ConversationJoinEventAllOfPayload.md +10 -9
- data/docs/ConversationLeaveEvent.md +14 -13
- data/docs/ConversationLeaveEventAllOfPayload.md +10 -9
- data/docs/ConversationListFilter.md +10 -9
- data/docs/ConversationListResponse.md +12 -11
- data/docs/ConversationMessageDeliveryChannelEvent.md +14 -13
- data/docs/ConversationMessageDeliveryFailureEvent.md +14 -13
- data/docs/ConversationMessageDeliveryFailureEventAllOfPayload.md +30 -0
- data/docs/ConversationMessageDeliveryFailureEventAllOfPayloadAllOfError.md +20 -0
- data/docs/ConversationMessageDeliveryPayload.md +18 -17
- data/docs/ConversationMessageDeliveryPayloadDestination.md +10 -9
- data/docs/ConversationMessageDeliveryPayloadExternalMessagesInner.md +18 -0
- data/docs/ConversationMessageDeliveryPayloadMessage.md +8 -7
- data/docs/ConversationMessageDeliveryUserEvent.md +14 -13
- data/docs/ConversationMessageEvent.md +14 -13
- data/docs/ConversationMessageEventAllOfPayload.md +12 -11
- data/docs/ConversationPostbackEvent.md +14 -13
- data/docs/ConversationPostbackEventAllOfPayload.md +14 -13
- data/docs/ConversationReadEvent.md +14 -13
- data/docs/ConversationReadEventAllOfPayload.md +10 -9
- data/docs/ConversationReadEventAllOfPayloadActivity.md +22 -0
- data/docs/ConversationReferralEvent.md +14 -13
- data/docs/ConversationReferralEventAllOfPayload.md +14 -13
- data/docs/ConversationRemoveEvent.md +14 -13
- data/docs/ConversationRemoveEventAllOfPayload.md +8 -7
- data/docs/ConversationResponse.md +8 -7
- data/docs/ConversationTruncated.md +16 -15
- data/docs/ConversationType.md +4 -5
- data/docs/ConversationTypingEvent.md +14 -13
- data/docs/ConversationTypingEventAllOfPayload.md +10 -9
- data/docs/ConversationTypingEventAllOfPayloadActivity.md +22 -0
- data/docs/ConversationUpdateBody.md +14 -13
- data/docs/ConversationsApi.md +16 -16
- data/docs/ConversionEventsBody.md +41 -11
- data/docs/Custom.md +10 -9
- data/docs/CustomIntegrationApiKeysApi.md +11 -11
- data/docs/CustomUpdate.md +8 -7
- data/docs/DefaultResponder.md +8 -7
- data/docs/DefaultResponderDefaultResponder.md +20 -19
- data/docs/DefaultResponderId.md +8 -7
- data/docs/Destination.md +39 -9
- data/docs/Device.md +26 -25
- data/docs/DeviceListResponse.md +8 -7
- data/docs/DeviceResponse.md +8 -7
- data/docs/DevicesApi.md +5 -5
- data/docs/DownloadMessageRefBody.md +10 -6
- data/docs/DownloadMessageRefBodyAllOfApple.md +8 -7
- data/docs/DownloadMessageRefBodyAllOfAppleInteractiveDataRef.md +16 -15
- data/docs/Error.md +10 -9
- data/docs/ErrorResponse.md +8 -7
- data/docs/EventSubSchema.md +12 -11
- data/docs/ExtraChannelOptions.md +8 -7
- data/docs/ExtraChannelOptionsMessenger.md +10 -9
- data/docs/Field.md +18 -17
- data/docs/FileMessage.md +26 -25
- data/docs/FormMessage.md +14 -13
- data/docs/FormMessageField.md +26 -25
- data/docs/FormOptionsInner.md +20 -0
- data/docs/FormResponseMessage.md +12 -11
- data/docs/FormResponseMessageField.md +20 -19
- data/docs/GetToken200Response.md +20 -0
- data/docs/GetTokenRequest.md +24 -0
- data/docs/Identity.md +12 -11
- data/docs/ImageMessage.md +28 -27
- data/docs/Instagram.md +30 -29
- data/docs/InstagramConversionEventsBody.md +8 -7
- data/docs/InstagramUpdate.md +12 -11
- data/docs/Integration.md +14 -13
- data/docs/IntegrationApiKey.md +8 -7
- data/docs/IntegrationApiKeyListResponse.md +8 -7
- data/docs/IntegrationApiKeyResponse.md +8 -7
- data/docs/IntegrationId.md +8 -7
- data/docs/IntegrationListFilter.md +8 -7
- data/docs/IntegrationListResponse.md +12 -11
- data/docs/IntegrationResponse.md +8 -7
- data/docs/IntegrationType.md +8 -7
- data/docs/IntegrationUpdate.md +70 -76
- data/docs/IntegrationUpdateBase.md +10 -9
- data/docs/IntegrationsApi.md +11 -11
- data/docs/Ios.md +26 -25
- data/docs/IosUpdate.md +22 -21
- data/docs/Item.md +22 -21
- data/docs/Line.md +26 -25
- data/docs/LineUpdate.md +10 -6
- data/docs/Link.md +18 -17
- data/docs/Links.md +10 -9
- data/docs/ListMessage.md +14 -13
- data/docs/LocationMessage.md +16 -15
- data/docs/LocationMessageCoordinates.md +10 -9
- data/docs/LocationMessageLocation.md +10 -9
- data/docs/LocationRequest.md +12 -11
- data/docs/Mailgun.md +22 -21
- data/docs/MailgunUpdate.md +14 -13
- data/docs/MatchCriteria.md +76 -18
- data/docs/MatchCriteriaBase.md +12 -11
- data/docs/MatchCriteriaMailgun.md +16 -15
- data/docs/MatchCriteriaMessagebird.md +14 -13
- data/docs/MatchCriteriaTwilio.md +14 -13
- data/docs/MatchCriteriaWhatsapp.md +14 -13
- data/docs/Message.md +24 -23
- data/docs/MessageBirdUpdate.md +10 -6
- data/docs/MessageListResponse.md +12 -11
- data/docs/MessageOverride.md +14 -13
- data/docs/MessageOverrideApple.md +8 -7
- data/docs/MessageOverrideLine.md +8 -7
- data/docs/MessageOverrideMessenger.md +8 -7
- data/docs/MessageOverridePayload.md +8 -7
- data/docs/MessageOverrideWhatsapp.md +8 -7
- data/docs/MessagePost.md +18 -17
- data/docs/MessagePostResponse.md +8 -7
- data/docs/MessageWebhook.md +22 -21
- data/docs/MessageWebhookSource.md +30 -0
- data/docs/Messagebird.md +20 -19
- data/docs/MessagesApi.md +11 -11
- data/docs/Messenger.md +22 -21
- data/docs/MessengerConversionEventsBody.md +8 -7
- data/docs/MessengerUpdate.md +12 -11
- data/docs/Meta.md +12 -11
- data/docs/MetaConversionEvent.md +8 -7
- data/docs/MetaConversionEventPayload.md +8 -7
- data/docs/OAuthEndpointsApi.md +9 -9
- data/docs/OfferControlBody.md +10 -9
- data/docs/Page.md +12 -11
- data/docs/Participant.md +18 -17
- data/docs/ParticipantJoinBody.md +12 -6
- data/docs/ParticipantLeaveBody.md +41 -11
- data/docs/ParticipantLeaveBodyParticipantId.md +8 -7
- data/docs/ParticipantLeaveBodyUserExternalId.md +8 -7
- data/docs/ParticipantLeaveBodyUserId.md +8 -7
- data/docs/ParticipantListResponse.md +12 -11
- data/docs/ParticipantResponse.md +8 -7
- data/docs/ParticipantSubSchema.md +12 -11
- data/docs/ParticipantWithUserExternalId.md +10 -9
- data/docs/ParticipantWithUserId.md +10 -9
- data/docs/ParticipantsApi.md +7 -7
- data/docs/PassControlBody.md +12 -11
- data/docs/Postback.md +14 -13
- data/docs/PostbackWebhook.md +10 -9
- data/docs/PrechatCapture.md +14 -13
- data/docs/Profile.md +16 -15
- data/docs/QuotedMessage.md +69 -11
- data/docs/QuotedMessageExternalMessageId.md +10 -9
- data/docs/QuotedMessageMessage.md +10 -9
- data/docs/Referral.md +10 -9
- data/docs/ReferralDetails.md +12 -11
- data/docs/ReleaseControlBody.md +10 -9
- data/docs/Reply.md +16 -15
- data/docs/Source.md +18 -17
- data/docs/SourceWebhook.md +18 -17
- data/docs/SourceWithCampaignWebhook.md +20 -19
- data/docs/Status.md +4 -5
- data/docs/Switchboard.md +12 -11
- data/docs/SwitchboardAcceptControl.md +14 -13
- data/docs/SwitchboardAcceptControlAllOfPayload.md +10 -9
- data/docs/SwitchboardAcceptControlFailure.md +14 -13
- data/docs/SwitchboardAcceptControlFailureAllOfPayload.md +12 -11
- data/docs/SwitchboardActionsApi.md +12 -12
- data/docs/SwitchboardIntegration.md +20 -19
- data/docs/SwitchboardIntegrationCreateBody.md +18 -17
- data/docs/SwitchboardIntegrationListResponse.md +8 -7
- data/docs/SwitchboardIntegrationResponse.md +8 -7
- data/docs/SwitchboardIntegrationUpdateBody.md +18 -17
- data/docs/SwitchboardIntegrationWebhook.md +14 -13
- data/docs/SwitchboardIntegrationsApi.md +10 -10
- data/docs/SwitchboardListResponse.md +8 -7
- data/docs/SwitchboardOfferControl.md +14 -13
- data/docs/SwitchboardOfferControlAllOfPayload.md +10 -9
- data/docs/SwitchboardOfferControlFailure.md +14 -13
- data/docs/SwitchboardPassControl.md +14 -13
- data/docs/SwitchboardPassControlAllOfPayload.md +12 -11
- data/docs/SwitchboardPassControlFailure.md +14 -13
- data/docs/SwitchboardReleaseControl.md +14 -13
- data/docs/SwitchboardReleaseControlAllOfPayload.md +12 -11
- data/docs/SwitchboardResponse.md +8 -7
- data/docs/SwitchboardUpdateBody.md +10 -9
- data/docs/SwitchboardsApi.md +7 -7
- data/docs/SyncUserBody.md +8 -7
- data/docs/Target.md +8 -7
- data/docs/Telegram.md +18 -17
- data/docs/TelegramUpdate.md +10 -6
- data/docs/TemplateMessage.md +12 -11
- data/docs/TextMessage.md +20 -19
- data/docs/TicketClosed.md +10 -9
- data/docs/TransferToEmail.md +10 -9
- data/docs/Twilio.md +20 -19
- data/docs/TwilioUpdate.md +10 -6
- data/docs/Twitter.md +24 -23
- data/docs/TwitterUpdate.md +10 -6
- data/docs/Unity.md +18 -17
- data/docs/UnityUpdate.md +14 -13
- data/docs/User.md +24 -23
- data/docs/UserCreateBody.md +16 -15
- data/docs/UserMergeEvent.md +14 -13
- data/docs/UserMergeEventAllOfPayload.md +16 -15
- data/docs/UserMergeEventAllOfPayloadMergedClients.md +10 -9
- data/docs/UserMergeEventAllOfPayloadMergedConversations.md +10 -9
- data/docs/UserMergeEventAllOfPayloadMergedUsers.md +10 -9
- data/docs/UserRemoveEvent.md +14 -13
- data/docs/UserRemoveEventAllOfPayload.md +8 -7
- data/docs/UserResponse.md +8 -7
- data/docs/UserTruncated.md +14 -13
- data/docs/UserUpdateBody.md +14 -13
- data/docs/UserUpdateEvent.md +14 -13
- data/docs/UserUpdateEventAllOfPayload.md +12 -11
- data/docs/UsersApi.md +14 -14
- data/docs/Viber.md +18 -17
- data/docs/ViberUpdate.md +10 -6
- data/docs/Web.md +46 -45
- data/docs/WebUpdate.md +42 -41
- data/docs/Webhook.md +20 -19
- data/docs/WebhookBody.md +14 -13
- data/docs/WebhookCreateBody.md +14 -6
- data/docs/WebhookListResponse.md +8 -7
- data/docs/WebhookResponse.md +8 -7
- data/docs/WebhookSubSchema.md +10 -9
- data/docs/WebhooksApi.md +15 -15
- data/docs/Webview.md +24 -23
- data/docs/WhatsAppConversionEventsBody.md +8 -7
- data/docs/WhatsAppUpdate.md +16 -15
- data/docs/Whatsapp.md +20 -19
- data/lib/sunshine-conversations-client/api/activities_api.rb +11 -7
- data/lib/sunshine-conversations-client/api/app_keys_api.rb +26 -19
- data/lib/sunshine-conversations-client/api/apps_api.rb +35 -24
- data/lib/sunshine-conversations-client/api/attachments_api.rb +20 -12
- data/lib/sunshine-conversations-client/api/clients_api.rb +21 -15
- data/lib/sunshine-conversations-client/api/conversations_api.rb +53 -34
- data/lib/sunshine-conversations-client/api/custom_integration_api_keys_api.rb +26 -19
- data/lib/sunshine-conversations-client/api/devices_api.rb +12 -10
- data/lib/sunshine-conversations-client/api/integrations_api.rb +35 -24
- data/lib/sunshine-conversations-client/api/messages_api.rb +26 -19
- data/lib/sunshine-conversations-client/api/o_auth_endpoints_api.rb +36 -29
- data/lib/sunshine-conversations-client/api/participants_api.rb +25 -16
- data/lib/sunshine-conversations-client/api/switchboard_actions_api.rb +38 -22
- data/lib/sunshine-conversations-client/api/switchboard_integrations_api.rb +30 -20
- data/lib/sunshine-conversations-client/api/switchboards_api.rb +26 -19
- data/lib/sunshine-conversations-client/api/users_api.rb +44 -29
- data/lib/sunshine-conversations-client/api/webhooks_api.rb +35 -24
- data/lib/sunshine-conversations-client/api_client.rb +54 -9
- data/lib/sunshine-conversations-client/api_error.rb +3 -2
- data/lib/sunshine-conversations-client/configuration.rb +27 -29
- data/lib/sunshine-conversations-client/models/accept_control_body.rb +28 -25
- data/lib/sunshine-conversations-client/models/action.rb +30 -406
- data/lib/sunshine-conversations-client/models/action_subset.rb +24 -390
- data/lib/sunshine-conversations-client/models/activity.rb +24 -25
- data/lib/sunshine-conversations-client/models/activity_message.rb +30 -227
- data/lib/sunshine-conversations-client/models/activity_post.rb +42 -43
- data/lib/sunshine-conversations-client/models/activity_types.rb +23 -23
- data/lib/sunshine-conversations-client/models/android.rb +68 -47
- data/lib/sunshine-conversations-client/models/android_update.rb +24 -25
- data/lib/sunshine-conversations-client/models/api_key.rb +49 -24
- data/lib/sunshine-conversations-client/models/app.rb +52 -24
- data/lib/sunshine-conversations-client/models/app_create_body.rb +55 -24
- data/lib/sunshine-conversations-client/models/app_key.rb +24 -24
- data/lib/sunshine-conversations-client/models/app_key_create_body.rb +51 -23
- data/lib/sunshine-conversations-client/models/app_key_list_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/app_key_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/app_list_filter.rb +23 -23
- data/lib/sunshine-conversations-client/models/app_list_response.rb +27 -24
- data/lib/sunshine-conversations-client/models/app_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/app_settings.rb +24 -24
- data/lib/sunshine-conversations-client/models/app_sub_schema.rb +23 -23
- data/lib/sunshine-conversations-client/models/app_update_body.rb +51 -24
- data/lib/sunshine-conversations-client/models/apple.rb +67 -46
- data/lib/sunshine-conversations-client/models/apple_message_override_payload.rb +27 -24
- data/lib/sunshine-conversations-client/models/apple_update.rb +24 -25
- data/lib/sunshine-conversations-client/models/attachment_delete_body.rb +23 -23
- data/lib/sunshine-conversations-client/models/attachment_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/attachment_schema.rb +24 -24
- data/lib/sunshine-conversations-client/models/author.rb +51 -24
- data/lib/sunshine-conversations-client/models/author_webhook.rb +24 -24
- data/lib/sunshine-conversations-client/models/buy.rb +27 -24
- data/lib/sunshine-conversations-client/models/campaign.rb +23 -23
- data/lib/sunshine-conversations-client/models/carousel_message.rb +55 -24
- data/lib/sunshine-conversations-client/models/carousel_message_display_settings.rb +23 -23
- data/lib/sunshine-conversations-client/models/client.rb +24 -24
- data/lib/sunshine-conversations-client/models/client_add_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/client_add_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/client_association.rb +46 -24
- data/lib/sunshine-conversations-client/models/client_create.rb +24 -24
- data/lib/sunshine-conversations-client/models/client_list_response.rb +27 -24
- data/lib/sunshine-conversations-client/models/client_remove_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/client_remove_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/client_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/client_type.rb +9 -5
- data/lib/sunshine-conversations-client/models/client_update_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/client_update_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/confirmation.rb +24 -24
- data/lib/sunshine-conversations-client/models/content.rb +52 -502
- data/lib/sunshine-conversations-client/models/conversation.rb +74 -25
- data/lib/sunshine-conversations-client/models/conversation_create_body.rb +92 -24
- data/lib/sunshine-conversations-client/models/conversation_create_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_create_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/conversation_join_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_join_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/conversation_leave_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_leave_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/conversation_list_filter.rb +24 -24
- data/lib/sunshine-conversations-client/models/conversation_list_response.rb +27 -24
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_channel_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_failure_event.rb +25 -26
- data/lib/sunshine-conversations-client/models/{conversation_message_delivery_channel_event_all_of.rb → conversation_message_delivery_failure_event_all_of_payload.rb} +101 -33
- data/lib/sunshine-conversations-client/models/{conversation_message_delivery_failure_event_all_of.rb → conversation_message_delivery_failure_event_all_of_payload_all_of_error.rb} +45 -33
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload.rb +28 -25
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_destination.rb +24 -24
- data/lib/sunshine-conversations-client/models/{conversation_message_delivery_payload_external_messages.rb → conversation_message_delivery_payload_external_messages_inner.rb} +26 -26
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_payload_message.rb +23 -23
- data/lib/sunshine-conversations-client/models/conversation_message_delivery_user_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_message_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_message_event_all_of_payload.rb +27 -24
- data/lib/sunshine-conversations-client/models/conversation_postback_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/conversation_read_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_read_event_all_of_payload.rb +25 -26
- data/lib/sunshine-conversations-client/models/{custom_all_of.rb → conversation_read_event_all_of_payload_activity.rb} +53 -40
- data/lib/sunshine-conversations-client/models/conversation_referral_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_referral_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/conversation_remove_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_remove_event_all_of_payload.rb +23 -23
- data/lib/sunshine-conversations-client/models/conversation_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/conversation_truncated.rb +49 -24
- data/lib/sunshine-conversations-client/models/conversation_type.rb +9 -5
- data/lib/sunshine-conversations-client/models/conversation_typing_event.rb +24 -25
- data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of_payload.rb +25 -26
- data/lib/sunshine-conversations-client/models/{activity_all_of.rb → conversation_typing_event_all_of_payload_activity.rb} +45 -27
- data/lib/sunshine-conversations-client/models/conversation_update_body.rb +52 -24
- data/lib/sunshine-conversations-client/models/conversion_events_body.rb +78 -221
- data/lib/sunshine-conversations-client/models/custom.rb +77 -25
- data/lib/sunshine-conversations-client/models/custom_update.rb +23 -23
- data/lib/sunshine-conversations-client/models/default_responder.rb +23 -23
- data/lib/sunshine-conversations-client/models/default_responder_default_responder.rb +24 -24
- data/lib/sunshine-conversations-client/models/default_responder_id.rb +23 -23
- data/lib/sunshine-conversations-client/models/destination.rb +77 -213
- data/lib/sunshine-conversations-client/models/device.rb +27 -24
- data/lib/sunshine-conversations-client/models/device_list_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/device_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/download_message_ref_body.rb +52 -39
- data/lib/sunshine-conversations-client/models/download_message_ref_body_all_of_apple.rb +23 -23
- data/lib/sunshine-conversations-client/models/download_message_ref_body_all_of_apple_interactive_data_ref.rb +24 -24
- data/lib/sunshine-conversations-client/models/error.rb +24 -24
- data/lib/sunshine-conversations-client/models/error_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/event_sub_schema.rb +24 -24
- data/lib/sunshine-conversations-client/models/extra_channel_options.rb +23 -23
- data/lib/sunshine-conversations-client/models/extra_channel_options_messenger.rb +24 -24
- data/lib/sunshine-conversations-client/models/field.rb +27 -24
- data/lib/sunshine-conversations-client/models/file_message.rb +24 -24
- data/lib/sunshine-conversations-client/models/form_message.rb +55 -24
- data/lib/sunshine-conversations-client/models/form_message_field.rb +47 -27
- data/lib/sunshine-conversations-client/models/{viber_all_of.rb → form_options_inner.rb} +82 -72
- data/lib/sunshine-conversations-client/models/form_response_message.rb +55 -24
- data/lib/sunshine-conversations-client/models/form_response_message_field.rb +28 -26
- data/lib/sunshine-conversations-client/models/{user_merge_event_all_of.rb → get_token200_response.rb} +44 -33
- data/lib/sunshine-conversations-client/models/{inline_object.rb → get_token_request.rb} +27 -27
- data/lib/sunshine-conversations-client/models/identity.rb +24 -24
- data/lib/sunshine-conversations-client/models/image_message.rb +27 -24
- data/lib/sunshine-conversations-client/models/instagram.rb +68 -47
- data/lib/sunshine-conversations-client/models/instagram_conversion_events_body.rb +23 -23
- data/lib/sunshine-conversations-client/models/instagram_update.rb +24 -25
- data/lib/sunshine-conversations-client/models/integration.rb +46 -24
- data/lib/sunshine-conversations-client/models/integration_api_key.rb +23 -23
- data/lib/sunshine-conversations-client/models/integration_api_key_list_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/integration_api_key_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/integration_id.rb +23 -23
- data/lib/sunshine-conversations-client/models/integration_list_filter.rb +23 -23
- data/lib/sunshine-conversations-client/models/integration_list_response.rb +27 -24
- data/lib/sunshine-conversations-client/models/integration_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/integration_type.rb +23 -23
- data/lib/sunshine-conversations-client/models/integration_update.rb +95 -724
- data/lib/sunshine-conversations-client/models/integration_update_base.rb +24 -24
- data/lib/sunshine-conversations-client/models/ios.rb +69 -48
- data/lib/sunshine-conversations-client/models/ios_update.rb +25 -26
- data/lib/sunshine-conversations-client/models/item.rb +58 -24
- data/lib/sunshine-conversations-client/models/line.rb +68 -47
- data/lib/sunshine-conversations-client/models/line_update.rb +74 -32
- data/lib/sunshine-conversations-client/models/link.rb +27 -24
- data/lib/sunshine-conversations-client/models/links.rb +24 -24
- data/lib/sunshine-conversations-client/models/list_message.rb +82 -24
- data/lib/sunshine-conversations-client/models/location_message.rb +24 -24
- data/lib/sunshine-conversations-client/models/location_message_coordinates.rb +24 -24
- data/lib/sunshine-conversations-client/models/location_message_location.rb +24 -24
- data/lib/sunshine-conversations-client/models/location_request.rb +27 -24
- data/lib/sunshine-conversations-client/models/mailgun.rb +70 -49
- data/lib/sunshine-conversations-client/models/mailgun_update.rb +25 -26
- data/lib/sunshine-conversations-client/models/match_criteria.rb +34 -289
- data/lib/sunshine-conversations-client/models/match_criteria_base.rb +24 -24
- data/lib/sunshine-conversations-client/models/match_criteria_mailgun.rb +25 -26
- data/lib/sunshine-conversations-client/models/match_criteria_messagebird.rb +25 -26
- data/lib/sunshine-conversations-client/models/match_criteria_twilio.rb +25 -26
- data/lib/sunshine-conversations-client/models/match_criteria_whatsapp.rb +25 -26
- data/lib/sunshine-conversations-client/models/message.rb +29 -26
- data/lib/sunshine-conversations-client/models/message_bird_update.rb +74 -32
- data/lib/sunshine-conversations-client/models/message_list_response.rb +27 -24
- data/lib/sunshine-conversations-client/models/message_override.rb +79 -228
- data/lib/sunshine-conversations-client/models/message_override_apple.rb +23 -23
- data/lib/sunshine-conversations-client/models/message_override_line.rb +23 -23
- data/lib/sunshine-conversations-client/models/message_override_messenger.rb +23 -23
- data/lib/sunshine-conversations-client/models/message_override_payload.rb +23 -23
- data/lib/sunshine-conversations-client/models/message_override_whatsapp.rb +23 -23
- data/lib/sunshine-conversations-client/models/message_post.rb +27 -24
- data/lib/sunshine-conversations-client/models/message_post_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/message_webhook.rb +30 -27
- data/lib/sunshine-conversations-client/models/{apple_all_of.rb → message_webhook_source.rb} +91 -86
- data/lib/sunshine-conversations-client/models/messagebird.rb +69 -48
- data/lib/sunshine-conversations-client/models/messenger.rb +69 -48
- data/lib/sunshine-conversations-client/models/messenger_conversion_events_body.rb +23 -23
- data/lib/sunshine-conversations-client/models/messenger_update.rb +24 -25
- data/lib/sunshine-conversations-client/models/meta.rb +24 -24
- data/lib/sunshine-conversations-client/models/meta_conversion_event.rb +23 -23
- data/lib/sunshine-conversations-client/models/meta_conversion_event_payload.rb +26 -23
- data/lib/sunshine-conversations-client/models/offer_control_body.rb +29 -26
- data/lib/sunshine-conversations-client/models/page.rb +24 -24
- data/lib/sunshine-conversations-client/models/participant.rb +27 -24
- data/lib/sunshine-conversations-client/models/participant_join_body.rb +58 -32
- data/lib/sunshine-conversations-client/models/participant_leave_body.rb +78 -224
- data/lib/sunshine-conversations-client/models/participant_leave_body_participant_id.rb +23 -23
- data/lib/sunshine-conversations-client/models/participant_leave_body_user_external_id.rb +23 -23
- data/lib/sunshine-conversations-client/models/participant_leave_body_user_id.rb +23 -23
- data/lib/sunshine-conversations-client/models/participant_list_response.rb +27 -24
- data/lib/sunshine-conversations-client/models/participant_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/participant_sub_schema.rb +77 -220
- data/lib/sunshine-conversations-client/models/participant_with_user_external_id.rb +24 -24
- data/lib/sunshine-conversations-client/models/participant_with_user_id.rb +24 -24
- data/lib/sunshine-conversations-client/models/pass_control_body.rb +29 -26
- data/lib/sunshine-conversations-client/models/postback.rb +27 -24
- data/lib/sunshine-conversations-client/models/postback_webhook.rb +27 -24
- data/lib/sunshine-conversations-client/models/prechat_capture.rb +27 -24
- data/lib/sunshine-conversations-client/models/profile.rb +24 -24
- data/lib/sunshine-conversations-client/models/quoted_message.rb +30 -237
- data/lib/sunshine-conversations-client/models/quoted_message_external_message_id.rb +24 -24
- data/lib/sunshine-conversations-client/models/quoted_message_message.rb +24 -24
- data/lib/sunshine-conversations-client/models/referral.rb +24 -24
- data/lib/sunshine-conversations-client/models/referral_details.rb +24 -24
- data/lib/sunshine-conversations-client/models/release_control_body.rb +29 -26
- data/lib/sunshine-conversations-client/models/reply.rb +27 -24
- data/lib/sunshine-conversations-client/models/source.rb +24 -24
- data/lib/sunshine-conversations-client/models/source_webhook.rb +24 -24
- data/lib/sunshine-conversations-client/models/source_with_campaign_webhook.rb +25 -26
- data/lib/sunshine-conversations-client/models/status.rb +9 -5
- data/lib/sunshine-conversations-client/models/switchboard.rb +24 -24
- data/lib/sunshine-conversations-client/models/switchboard_accept_control.rb +25 -26
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of_payload.rb +27 -24
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure.rb +25 -26
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of_payload.rb +27 -24
- data/lib/sunshine-conversations-client/models/switchboard_integration.rb +24 -24
- data/lib/sunshine-conversations-client/models/switchboard_integration_create_body.rb +25 -24
- data/lib/sunshine-conversations-client/models/switchboard_integration_list_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/switchboard_integration_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/switchboard_integration_update_body.rb +24 -24
- data/lib/sunshine-conversations-client/models/switchboard_integration_webhook.rb +24 -24
- data/lib/sunshine-conversations-client/models/switchboard_list_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/switchboard_offer_control.rb +25 -26
- data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of_payload.rb +27 -24
- data/lib/sunshine-conversations-client/models/switchboard_offer_control_failure.rb +25 -26
- data/lib/sunshine-conversations-client/models/switchboard_pass_control.rb +25 -26
- data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of_payload.rb +27 -24
- data/lib/sunshine-conversations-client/models/switchboard_pass_control_failure.rb +25 -26
- data/lib/sunshine-conversations-client/models/switchboard_release_control.rb +25 -26
- data/lib/sunshine-conversations-client/models/switchboard_release_control_all_of_payload.rb +27 -24
- data/lib/sunshine-conversations-client/models/switchboard_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/switchboard_update_body.rb +24 -24
- data/lib/sunshine-conversations-client/models/sync_user_body.rb +23 -23
- data/lib/sunshine-conversations-client/models/target.rb +23 -23
- data/lib/sunshine-conversations-client/models/telegram.rb +69 -48
- data/lib/sunshine-conversations-client/models/telegram_update.rb +74 -32
- data/lib/sunshine-conversations-client/models/template_message.rb +24 -24
- data/lib/sunshine-conversations-client/models/text_message.rb +27 -24
- data/lib/sunshine-conversations-client/models/ticket_closed.rb +27 -24
- data/lib/sunshine-conversations-client/models/transfer_to_email.rb +27 -24
- data/lib/sunshine-conversations-client/models/twilio.rb +69 -48
- data/lib/sunshine-conversations-client/models/twilio_update.rb +74 -32
- data/lib/sunshine-conversations-client/models/twitter.rb +50 -51
- data/lib/sunshine-conversations-client/models/twitter_update.rb +74 -32
- data/lib/sunshine-conversations-client/models/unity.rb +68 -47
- data/lib/sunshine-conversations-client/models/unity_update.rb +25 -26
- data/lib/sunshine-conversations-client/models/user.rb +34 -27
- data/lib/sunshine-conversations-client/models/user_create_body.rb +27 -24
- data/lib/sunshine-conversations-client/models/user_merge_event.rb +25 -26
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload.rb +28 -26
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_clients.rb +24 -24
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_conversations.rb +24 -24
- data/lib/sunshine-conversations-client/models/user_merge_event_all_of_payload_merged_users.rb +24 -24
- data/lib/sunshine-conversations-client/models/user_remove_event.rb +25 -26
- data/lib/sunshine-conversations-client/models/user_remove_event_all_of_payload.rb +23 -23
- data/lib/sunshine-conversations-client/models/user_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/user_truncated.rb +24 -24
- data/lib/sunshine-conversations-client/models/user_update_body.rb +29 -24
- data/lib/sunshine-conversations-client/models/user_update_event.rb +25 -26
- data/lib/sunshine-conversations-client/models/user_update_event_all_of_payload.rb +24 -24
- data/lib/sunshine-conversations-client/models/viber.rb +69 -48
- data/lib/sunshine-conversations-client/models/viber_update.rb +74 -32
- data/lib/sunshine-conversations-client/models/web.rb +75 -48
- data/lib/sunshine-conversations-client/models/web_update.rb +31 -26
- data/lib/sunshine-conversations-client/models/webhook.rb +27 -24
- data/lib/sunshine-conversations-client/models/webhook_body.rb +27 -24
- data/lib/sunshine-conversations-client/models/webhook_create_body.rb +84 -32
- data/lib/sunshine-conversations-client/models/webhook_list_response.rb +26 -23
- data/lib/sunshine-conversations-client/models/webhook_response.rb +23 -23
- data/lib/sunshine-conversations-client/models/webhook_sub_schema.rb +24 -24
- data/lib/sunshine-conversations-client/models/webview.rb +27 -24
- data/lib/sunshine-conversations-client/models/whats_app_conversion_events_body.rb +23 -23
- data/lib/sunshine-conversations-client/models/whats_app_update.rb +25 -26
- data/lib/sunshine-conversations-client/models/whatsapp.rb +70 -49
- data/lib/sunshine-conversations-client/version.rb +3 -3
- data/lib/sunshine-conversations-client.rb +11 -63
- data/spec/spec_helper.rb +2 -2
- data/sunshine-conversations-client.gemspec +5 -5
- metadata +21 -149
- data/docs/ActivityAllOf.md +0 -19
- data/docs/ActivityPostAllOf.md +0 -17
- data/docs/AndroidAllOf.md +0 -33
- data/docs/AndroidUpdateAllOf.md +0 -29
- data/docs/AppleAllOf.md +0 -25
- data/docs/AppleUpdateAllOf.md +0 -17
- data/docs/AttachmentUploadBody.md +0 -17
- data/docs/ClientAddEventAllOf.md +0 -17
- data/docs/ClientRemoveEventAllOf.md +0 -17
- data/docs/ClientUpdateEventAllOf.md +0 -17
- data/docs/ConversationAllOf.md +0 -29
- data/docs/ConversationCreateEventAllOf.md +0 -17
- data/docs/ConversationJoinEventAllOf.md +0 -17
- data/docs/ConversationLeaveEventAllOf.md +0 -17
- data/docs/ConversationMessageDeliveryChannelEventAllOf.md +0 -17
- data/docs/ConversationMessageDeliveryFailureEventAllOf.md +0 -17
- data/docs/ConversationMessageDeliveryPayloadExternalMessages.md +0 -17
- data/docs/ConversationMessageEventAllOf.md +0 -17
- data/docs/ConversationPostbackEventAllOf.md +0 -17
- data/docs/ConversationReadEventAllOf.md +0 -17
- data/docs/ConversationReferralEventAllOf.md +0 -17
- data/docs/ConversationRemoveEventAllOf.md +0 -17
- data/docs/ConversationTypingEventAllOf.md +0 -17
- data/docs/CustomAllOf.md +0 -19
- data/docs/DownloadMessageRefBodyAllOf.md +0 -19
- data/docs/FormMessageFieldAllOf.md +0 -23
- data/docs/FormResponseMessageFieldAllOf.md +0 -17
- data/docs/InlineObject.md +0 -23
- data/docs/InstagramAllOf.md +0 -35
- data/docs/InstagramUpdateAllOf.md +0 -17
- data/docs/IosAllOf.md +0 -31
- data/docs/IosUpdateAllOf.md +0 -27
- data/docs/LineAllOf.md +0 -31
- data/docs/MailgunAllOf.md +0 -27
- data/docs/MailgunUpdateAllOf.md +0 -19
- data/docs/MatchCriteriaMailgunAllOf.md +0 -21
- data/docs/MatchCriteriaMessagebirdAllOf.md +0 -19
- data/docs/MatchCriteriaTwilioAllOf.md +0 -19
- data/docs/MatchCriteriaWhatsappAllOf.md +0 -19
- data/docs/MessagebirdAllOf.md +0 -25
- data/docs/MessengerAllOf.md +0 -27
- data/docs/SourceWithCampaignWebhookAllOf.md +0 -17
- data/docs/SwitchboardAcceptControlAllOf.md +0 -17
- data/docs/SwitchboardAcceptControlFailureAllOf.md +0 -17
- data/docs/SwitchboardOfferControlAllOf.md +0 -17
- data/docs/SwitchboardPassControlAllOf.md +0 -17
- data/docs/SwitchboardReleaseControlAllOf.md +0 -17
- data/docs/TelegramAllOf.md +0 -23
- data/docs/TwilioAllOf.md +0 -25
- data/docs/TwitterAllOf.md +0 -29
- data/docs/UnityAllOf.md +0 -23
- data/docs/UnityUpdateAllOf.md +0 -19
- data/docs/UserAllOf.md +0 -25
- data/docs/UserMergeEventAllOf.md +0 -17
- data/docs/UserRemoveEventAllOf.md +0 -17
- data/docs/UserUpdateEventAllOf.md +0 -17
- data/docs/ViberAllOf.md +0 -23
- data/docs/WebAllOf.md +0 -51
- data/docs/WebUpdateAllOf.md +0 -47
- data/docs/WhatsAppUpdateAllOf.md +0 -21
- data/docs/WhatsappAllOf.md +0 -25
- data/lib/sunshine-conversations-client/models/activity_post_all_of.rb +0 -204
- data/lib/sunshine-conversations-client/models/android_all_of.rb +0 -366
- data/lib/sunshine-conversations-client/models/android_update_all_of.rb +0 -344
- data/lib/sunshine-conversations-client/models/apple_update_all_of.rb +0 -219
- data/lib/sunshine-conversations-client/models/attachment_upload_body.rb +0 -208
- data/lib/sunshine-conversations-client/models/client_add_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/client_remove_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/client_update_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_all_of.rb +0 -316
- data/lib/sunshine-conversations-client/models/conversation_create_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_join_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_leave_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_message_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_postback_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_read_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_referral_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_remove_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/conversation_typing_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/download_message_ref_body_all_of.rb +0 -213
- data/lib/sunshine-conversations-client/models/form_message_field_all_of.rb +0 -310
- data/lib/sunshine-conversations-client/models/form_response_message_field_all_of.rb +0 -205
- data/lib/sunshine-conversations-client/models/instagram_all_of.rb +0 -303
- data/lib/sunshine-conversations-client/models/instagram_update_all_of.rb +0 -204
- data/lib/sunshine-conversations-client/models/ios_all_of.rb +0 -292
- data/lib/sunshine-conversations-client/models/ios_update_all_of.rb +0 -270
- data/lib/sunshine-conversations-client/models/line_all_of.rb +0 -291
- data/lib/sunshine-conversations-client/models/mailgun_all_of.rb +0 -336
- data/lib/sunshine-conversations-client/models/mailgun_update_all_of.rb +0 -230
- data/lib/sunshine-conversations-client/models/match_criteria_mailgun_all_of.rb +0 -234
- data/lib/sunshine-conversations-client/models/match_criteria_messagebird_all_of.rb +0 -222
- data/lib/sunshine-conversations-client/models/match_criteria_twilio_all_of.rb +0 -222
- data/lib/sunshine-conversations-client/models/match_criteria_whatsapp_all_of.rb +0 -222
- data/lib/sunshine-conversations-client/models/messagebird_all_of.rb +0 -302
- data/lib/sunshine-conversations-client/models/messenger_all_of.rb +0 -263
- data/lib/sunshine-conversations-client/models/source_with_campaign_webhook_all_of.rb +0 -204
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/switchboard_accept_control_failure_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/switchboard_offer_control_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/switchboard_pass_control_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/switchboard_release_control_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/telegram_all_of.rb +0 -252
- data/lib/sunshine-conversations-client/models/twilio_all_of.rb +0 -297
- data/lib/sunshine-conversations-client/models/twitter_all_of.rb +0 -400
- data/lib/sunshine-conversations-client/models/unity_all_of.rb +0 -236
- data/lib/sunshine-conversations-client/models/unity_update_all_of.rb +0 -214
- data/lib/sunshine-conversations-client/models/user_all_of.rb +0 -239
- data/lib/sunshine-conversations-client/models/user_remove_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/user_update_event_all_of.rb +0 -203
- data/lib/sunshine-conversations-client/models/web_all_of.rb +0 -391
- data/lib/sunshine-conversations-client/models/web_update_all_of.rb +0 -370
- data/lib/sunshine-conversations-client/models/whats_app_update_all_of.rb +0 -229
- data/lib/sunshine-conversations-client/models/whatsapp_all_of.rb +0 -252
- data/spec/api_client_spec.rb +0 -223
- data/spec/configuration_spec.rb +0 -39
@@ -1,291 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Sunshine Conversations API
|
3
|
-
|
4
|
-
The version of the OpenAPI document: 16.0.1
|
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 LineAllOf
|
14
|
-
# For LINE, each of your customers will need to manually configure a webhook in their LINE configuration page that will point to Sunshine Conversations servers. You must instruct your customers how to configure this manually on their LINE bot page. Once you’ve acquired all the required information, call the Create Integration endpoint. Then, using the returned integration _id, your customer must set the Callback URL field in their LINE Business Center page. The URL should look like the following: `https://app.smooch.io:443/api/line/webhooks/{appId}/{integrationId}`.
|
15
|
-
attr_accessor :type
|
16
|
-
|
17
|
-
# LINE Channel ID. Can be omitted along with `channelSecret` to integrate LINE to setup a webhook before receiving the `channelId` and `channelSecret` back from LINE.
|
18
|
-
attr_accessor :channel_id
|
19
|
-
|
20
|
-
# LINE Channel Secret. Can be omitted along with `channelId` to integrate LINE to setup a webhook before receiving the `channelId` and `channelSecret` back from LINE.
|
21
|
-
attr_accessor :channel_secret
|
22
|
-
|
23
|
-
# LINE Channel Access Token.
|
24
|
-
attr_accessor :channel_access_token
|
25
|
-
|
26
|
-
# LINE Service Code.
|
27
|
-
attr_accessor :service_code
|
28
|
-
|
29
|
-
# LINE Switcher Secret.
|
30
|
-
attr_accessor :switcher_secret
|
31
|
-
|
32
|
-
# URL provided by LINE in the [Developer Console](https://developers.line.biz/console/).
|
33
|
-
attr_accessor :qr_code_url
|
34
|
-
|
35
|
-
# LINE Basic ID. Is automatically set when qrCodeUrl is updated.
|
36
|
-
attr_accessor :line_id
|
37
|
-
|
38
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
-
def self.attribute_map
|
40
|
-
{
|
41
|
-
:'type' => :'type',
|
42
|
-
:'channel_id' => :'channelId',
|
43
|
-
:'channel_secret' => :'channelSecret',
|
44
|
-
:'channel_access_token' => :'channelAccessToken',
|
45
|
-
:'service_code' => :'serviceCode',
|
46
|
-
:'switcher_secret' => :'switcherSecret',
|
47
|
-
:'qr_code_url' => :'qrCodeUrl',
|
48
|
-
:'line_id' => :'lineId'
|
49
|
-
}
|
50
|
-
end
|
51
|
-
|
52
|
-
# Attribute type mapping.
|
53
|
-
def self.openapi_types
|
54
|
-
{
|
55
|
-
:'type' => :'String',
|
56
|
-
:'channel_id' => :'String',
|
57
|
-
:'channel_secret' => :'String',
|
58
|
-
:'channel_access_token' => :'String',
|
59
|
-
:'service_code' => :'String',
|
60
|
-
:'switcher_secret' => :'String',
|
61
|
-
:'qr_code_url' => :'String',
|
62
|
-
:'line_id' => :'String'
|
63
|
-
}
|
64
|
-
end
|
65
|
-
|
66
|
-
# List of attributes with nullable: true
|
67
|
-
def self.openapi_nullable
|
68
|
-
Set.new([
|
69
|
-
])
|
70
|
-
end
|
71
|
-
|
72
|
-
# Initializes the object
|
73
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
-
def initialize(attributes = {})
|
75
|
-
if (!attributes.is_a?(Hash))
|
76
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::LineAllOf` initialize method"
|
77
|
-
end
|
78
|
-
|
79
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
80
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
81
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
82
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::LineAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
83
|
-
end
|
84
|
-
h[k.to_sym] = v
|
85
|
-
}
|
86
|
-
|
87
|
-
if attributes.key?(:'type')
|
88
|
-
self.type = attributes[:'type']
|
89
|
-
else
|
90
|
-
self.type = 'line'
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.key?(:'channel_id')
|
94
|
-
self.channel_id = attributes[:'channel_id']
|
95
|
-
end
|
96
|
-
|
97
|
-
if attributes.key?(:'channel_secret')
|
98
|
-
self.channel_secret = attributes[:'channel_secret']
|
99
|
-
end
|
100
|
-
|
101
|
-
if attributes.key?(:'channel_access_token')
|
102
|
-
self.channel_access_token = attributes[:'channel_access_token']
|
103
|
-
end
|
104
|
-
|
105
|
-
if attributes.key?(:'service_code')
|
106
|
-
self.service_code = attributes[:'service_code']
|
107
|
-
end
|
108
|
-
|
109
|
-
if attributes.key?(:'switcher_secret')
|
110
|
-
self.switcher_secret = attributes[:'switcher_secret']
|
111
|
-
end
|
112
|
-
|
113
|
-
if attributes.key?(:'qr_code_url')
|
114
|
-
self.qr_code_url = attributes[:'qr_code_url']
|
115
|
-
end
|
116
|
-
|
117
|
-
if attributes.key?(:'line_id')
|
118
|
-
self.line_id = attributes[:'line_id']
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
123
|
-
# @return Array for valid properties with the reasons
|
124
|
-
def list_invalid_properties
|
125
|
-
invalid_properties = Array.new
|
126
|
-
if !@switcher_secret.nil? && @switcher_secret.to_s.length < 1
|
127
|
-
invalid_properties.push('invalid value for "switcher_secret", the character length must be great than or equal to 1.')
|
128
|
-
end
|
129
|
-
|
130
|
-
invalid_properties
|
131
|
-
end
|
132
|
-
|
133
|
-
# Check to see if the all the properties in the model are valid
|
134
|
-
# @return true if the model is valid
|
135
|
-
def valid?
|
136
|
-
return false if !@switcher_secret.nil? && @switcher_secret.to_s.length < 1
|
137
|
-
true
|
138
|
-
end
|
139
|
-
|
140
|
-
# Custom attribute writer method with validation
|
141
|
-
# @param [Object] switcher_secret Value to be assigned
|
142
|
-
def switcher_secret=(switcher_secret)
|
143
|
-
if !switcher_secret.nil? && switcher_secret.to_s.length < 1
|
144
|
-
fail ArgumentError, 'invalid value for "switcher_secret", the character length must be great than or equal to 1.'
|
145
|
-
end
|
146
|
-
|
147
|
-
@switcher_secret = switcher_secret
|
148
|
-
end
|
149
|
-
|
150
|
-
# Checks equality by comparing each attribute.
|
151
|
-
# @param [Object] Object to be compared
|
152
|
-
def ==(o)
|
153
|
-
return true if self.equal?(o)
|
154
|
-
self.class == o.class &&
|
155
|
-
type == o.type &&
|
156
|
-
channel_id == o.channel_id &&
|
157
|
-
channel_secret == o.channel_secret &&
|
158
|
-
channel_access_token == o.channel_access_token &&
|
159
|
-
service_code == o.service_code &&
|
160
|
-
switcher_secret == o.switcher_secret &&
|
161
|
-
qr_code_url == o.qr_code_url &&
|
162
|
-
line_id == o.line_id
|
163
|
-
end
|
164
|
-
|
165
|
-
# @see the `==` method
|
166
|
-
# @param [Object] Object to be compared
|
167
|
-
def eql?(o)
|
168
|
-
self == o
|
169
|
-
end
|
170
|
-
|
171
|
-
# Calculates hash code according to all attributes.
|
172
|
-
# @return [Integer] Hash code
|
173
|
-
def hash
|
174
|
-
[type, channel_id, channel_secret, channel_access_token, service_code, switcher_secret, qr_code_url, line_id].hash
|
175
|
-
end
|
176
|
-
|
177
|
-
# Builds the object from hash
|
178
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
179
|
-
# @return [Object] Returns the model itself
|
180
|
-
def self.build_from_hash(attributes)
|
181
|
-
new.build_from_hash(attributes)
|
182
|
-
end
|
183
|
-
|
184
|
-
# Builds the object from hash
|
185
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
186
|
-
# @return [Object] Returns the model itself
|
187
|
-
def build_from_hash(attributes)
|
188
|
-
return nil unless attributes.is_a?(Hash)
|
189
|
-
self.class.openapi_types.each_pair do |key, type|
|
190
|
-
if type =~ /\AArray<(.*)>/i
|
191
|
-
# check to ensure the input is an array given that the attribute
|
192
|
-
# is documented as an array but the input is not
|
193
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
194
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
195
|
-
end
|
196
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
197
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
198
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
199
|
-
end
|
200
|
-
|
201
|
-
self
|
202
|
-
end
|
203
|
-
|
204
|
-
# Deserializes the data based on type
|
205
|
-
# @param string type Data type
|
206
|
-
# @param string value Value to be deserialized
|
207
|
-
# @return [Object] Deserialized data
|
208
|
-
def _deserialize(type, value)
|
209
|
-
case type.to_sym
|
210
|
-
when :DateTime
|
211
|
-
DateTime.parse(value)
|
212
|
-
when :Date
|
213
|
-
Date.parse(value)
|
214
|
-
when :String
|
215
|
-
value.to_s
|
216
|
-
when :Integer
|
217
|
-
value.to_i
|
218
|
-
when :Float
|
219
|
-
value.to_f
|
220
|
-
when :Boolean
|
221
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
222
|
-
true
|
223
|
-
else
|
224
|
-
false
|
225
|
-
end
|
226
|
-
when :Object
|
227
|
-
# generic object (usually a Hash), return directly
|
228
|
-
value
|
229
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
230
|
-
inner_type = Regexp.last_match[:inner_type]
|
231
|
-
value.map { |v| _deserialize(inner_type, v) }
|
232
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
233
|
-
k_type = Regexp.last_match[:k_type]
|
234
|
-
v_type = Regexp.last_match[:v_type]
|
235
|
-
{}.tap do |hash|
|
236
|
-
value.each do |k, v|
|
237
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
238
|
-
end
|
239
|
-
end
|
240
|
-
else # model
|
241
|
-
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
242
|
-
end
|
243
|
-
end
|
244
|
-
|
245
|
-
# Returns the string representation of the object
|
246
|
-
# @return [String] String presentation of the object
|
247
|
-
def to_s
|
248
|
-
to_hash.to_s
|
249
|
-
end
|
250
|
-
|
251
|
-
# to_body is an alias to to_hash (backward compatibility)
|
252
|
-
# @return [Hash] Returns the object in the form of hash
|
253
|
-
def to_body
|
254
|
-
to_hash
|
255
|
-
end
|
256
|
-
|
257
|
-
# Returns the object in the form of hash
|
258
|
-
# @return [Hash] Returns the object in the form of hash
|
259
|
-
def to_hash
|
260
|
-
hash = {}
|
261
|
-
self.class.attribute_map.each_pair do |attr, param|
|
262
|
-
value = self.send(attr)
|
263
|
-
if value.nil?
|
264
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
265
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
266
|
-
end
|
267
|
-
|
268
|
-
hash[param] = _to_hash(value)
|
269
|
-
end
|
270
|
-
hash
|
271
|
-
end
|
272
|
-
|
273
|
-
# Outputs non-array value in the form of hash
|
274
|
-
# For object, use to_hash. Otherwise, just return the value
|
275
|
-
# @param [Object] value Any valid value
|
276
|
-
# @return [Hash] Returns the value in the form of hash
|
277
|
-
def _to_hash(value)
|
278
|
-
if value.is_a?(Array)
|
279
|
-
value.compact.map { |v| _to_hash(v) }
|
280
|
-
elsif value.is_a?(Hash)
|
281
|
-
{}.tap do |hash|
|
282
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
283
|
-
end
|
284
|
-
elsif value.respond_to? :to_hash
|
285
|
-
value.to_hash
|
286
|
-
else
|
287
|
-
value
|
288
|
-
end
|
289
|
-
end
|
290
|
-
end
|
291
|
-
end
|
@@ -1,336 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Sunshine Conversations API
|
3
|
-
|
4
|
-
The version of the OpenAPI document: 16.0.1
|
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 MailgunAllOf
|
14
|
-
# To configure a Mailgun integration, visit the API Keys tab in the settings page of the Mailgun dashboard and copy your active API key. Call the Create Integration endpoint with your API Key, a domain you have configured in Mailgun, and the incoming address you would like to use. Must have the same domain as the one specified in the domain parameter.
|
15
|
-
attr_accessor :type
|
16
|
-
|
17
|
-
# The public API key of your Mailgun account.
|
18
|
-
attr_accessor :api_key
|
19
|
-
|
20
|
-
# The domain used to relay email. This domain must be configured and verified in your Mailgun account.
|
21
|
-
attr_accessor :domain
|
22
|
-
|
23
|
-
# Sunshine Conversations will receive all emails sent to this address. It will also be used as the Reply-To address.
|
24
|
-
attr_accessor :incoming_address
|
25
|
-
|
26
|
-
# A boolean value indicating whether the unsubscribe link should be omitted from outgoing emails. When enabled, it is expected that the business is providing the user a way to unsubscribe by some other means. By default, the unsubscribe link will be included in all outgoing emails.
|
27
|
-
attr_accessor :hide_unsubscribe_link
|
28
|
-
|
29
|
-
# Email address to use as the From and Reply-To address if it must be different from incomingAddress. Only use this option if the address that you supply is configured to forward emails to the incomingAddress, otherwise user replies will be lost. You must also make sure that the domain is properly configured as a mail provider so as to not be flagged as spam by the user’s email client. May be unset with null.
|
30
|
-
attr_accessor :from_address
|
31
|
-
|
32
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
-
def self.attribute_map
|
34
|
-
{
|
35
|
-
:'type' => :'type',
|
36
|
-
:'api_key' => :'apiKey',
|
37
|
-
:'domain' => :'domain',
|
38
|
-
:'incoming_address' => :'incomingAddress',
|
39
|
-
:'hide_unsubscribe_link' => :'hideUnsubscribeLink',
|
40
|
-
:'from_address' => :'fromAddress'
|
41
|
-
}
|
42
|
-
end
|
43
|
-
|
44
|
-
# Attribute type mapping.
|
45
|
-
def self.openapi_types
|
46
|
-
{
|
47
|
-
:'type' => :'String',
|
48
|
-
:'api_key' => :'String',
|
49
|
-
:'domain' => :'String',
|
50
|
-
:'incoming_address' => :'String',
|
51
|
-
:'hide_unsubscribe_link' => :'Boolean',
|
52
|
-
:'from_address' => :'String'
|
53
|
-
}
|
54
|
-
end
|
55
|
-
|
56
|
-
# List of attributes with nullable: true
|
57
|
-
def self.openapi_nullable
|
58
|
-
Set.new([
|
59
|
-
:'api_key',
|
60
|
-
:'from_address'
|
61
|
-
])
|
62
|
-
end
|
63
|
-
|
64
|
-
# Initializes the object
|
65
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
-
def initialize(attributes = {})
|
67
|
-
if (!attributes.is_a?(Hash))
|
68
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::MailgunAllOf` initialize method"
|
69
|
-
end
|
70
|
-
|
71
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
72
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
73
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
74
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::MailgunAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
75
|
-
end
|
76
|
-
h[k.to_sym] = v
|
77
|
-
}
|
78
|
-
|
79
|
-
if attributes.key?(:'type')
|
80
|
-
self.type = attributes[:'type']
|
81
|
-
else
|
82
|
-
self.type = 'mailgun'
|
83
|
-
end
|
84
|
-
|
85
|
-
if attributes.key?(:'api_key')
|
86
|
-
self.api_key = attributes[:'api_key']
|
87
|
-
end
|
88
|
-
|
89
|
-
if attributes.key?(:'domain')
|
90
|
-
self.domain = attributes[:'domain']
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.key?(:'incoming_address')
|
94
|
-
self.incoming_address = attributes[:'incoming_address']
|
95
|
-
end
|
96
|
-
|
97
|
-
if attributes.key?(:'hide_unsubscribe_link')
|
98
|
-
self.hide_unsubscribe_link = attributes[:'hide_unsubscribe_link']
|
99
|
-
end
|
100
|
-
|
101
|
-
if attributes.key?(:'from_address')
|
102
|
-
self.from_address = attributes[:'from_address']
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
107
|
-
# @return Array for valid properties with the reasons
|
108
|
-
def list_invalid_properties
|
109
|
-
invalid_properties = Array.new
|
110
|
-
if @api_key.to_s.length < 1
|
111
|
-
invalid_properties.push('invalid value for "api_key", the character length must be great than or equal to 1.')
|
112
|
-
end
|
113
|
-
|
114
|
-
if @domain.nil?
|
115
|
-
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
116
|
-
end
|
117
|
-
|
118
|
-
if @domain.to_s.length < 1
|
119
|
-
invalid_properties.push('invalid value for "domain", the character length must be great than or equal to 1.')
|
120
|
-
end
|
121
|
-
|
122
|
-
if @incoming_address.nil?
|
123
|
-
invalid_properties.push('invalid value for "incoming_address", incoming_address cannot be nil.')
|
124
|
-
end
|
125
|
-
|
126
|
-
if @incoming_address.to_s.length < 1
|
127
|
-
invalid_properties.push('invalid value for "incoming_address", the character length must be great than or equal to 1.')
|
128
|
-
end
|
129
|
-
|
130
|
-
if !@from_address.nil? && @from_address.to_s.length < 1
|
131
|
-
invalid_properties.push('invalid value for "from_address", the character length must be great than or equal to 1.')
|
132
|
-
end
|
133
|
-
|
134
|
-
invalid_properties
|
135
|
-
end
|
136
|
-
|
137
|
-
# Check to see if the all the properties in the model are valid
|
138
|
-
# @return true if the model is valid
|
139
|
-
def valid?
|
140
|
-
return false if @api_key.to_s.length < 1
|
141
|
-
return false if @domain.nil?
|
142
|
-
return false if @domain.to_s.length < 1
|
143
|
-
return false if @incoming_address.nil?
|
144
|
-
return false if @incoming_address.to_s.length < 1
|
145
|
-
return false if !@from_address.nil? && @from_address.to_s.length < 1
|
146
|
-
true
|
147
|
-
end
|
148
|
-
|
149
|
-
# Custom attribute writer method with validation
|
150
|
-
# @param [Object] api_key Value to be assigned
|
151
|
-
def api_key=(api_key)
|
152
|
-
if api_key.to_s.length < 1
|
153
|
-
fail ArgumentError, 'invalid value for "api_key", the character length must be great than or equal to 1.'
|
154
|
-
end
|
155
|
-
|
156
|
-
@api_key = api_key
|
157
|
-
end
|
158
|
-
|
159
|
-
# Custom attribute writer method with validation
|
160
|
-
# @param [Object] domain Value to be assigned
|
161
|
-
def domain=(domain)
|
162
|
-
if domain.nil?
|
163
|
-
fail ArgumentError, 'domain cannot be nil'
|
164
|
-
end
|
165
|
-
|
166
|
-
if domain.to_s.length < 1
|
167
|
-
fail ArgumentError, 'invalid value for "domain", the character length must be great than or equal to 1.'
|
168
|
-
end
|
169
|
-
|
170
|
-
@domain = domain
|
171
|
-
end
|
172
|
-
|
173
|
-
# Custom attribute writer method with validation
|
174
|
-
# @param [Object] incoming_address Value to be assigned
|
175
|
-
def incoming_address=(incoming_address)
|
176
|
-
if incoming_address.nil?
|
177
|
-
fail ArgumentError, 'incoming_address cannot be nil'
|
178
|
-
end
|
179
|
-
|
180
|
-
if incoming_address.to_s.length < 1
|
181
|
-
fail ArgumentError, 'invalid value for "incoming_address", the character length must be great than or equal to 1.'
|
182
|
-
end
|
183
|
-
|
184
|
-
@incoming_address = incoming_address
|
185
|
-
end
|
186
|
-
|
187
|
-
# Custom attribute writer method with validation
|
188
|
-
# @param [Object] from_address Value to be assigned
|
189
|
-
def from_address=(from_address)
|
190
|
-
if !from_address.nil? && from_address.to_s.length < 1
|
191
|
-
fail ArgumentError, 'invalid value for "from_address", the character length must be great than or equal to 1.'
|
192
|
-
end
|
193
|
-
|
194
|
-
@from_address = from_address
|
195
|
-
end
|
196
|
-
|
197
|
-
# Checks equality by comparing each attribute.
|
198
|
-
# @param [Object] Object to be compared
|
199
|
-
def ==(o)
|
200
|
-
return true if self.equal?(o)
|
201
|
-
self.class == o.class &&
|
202
|
-
type == o.type &&
|
203
|
-
api_key == o.api_key &&
|
204
|
-
domain == o.domain &&
|
205
|
-
incoming_address == o.incoming_address &&
|
206
|
-
hide_unsubscribe_link == o.hide_unsubscribe_link &&
|
207
|
-
from_address == o.from_address
|
208
|
-
end
|
209
|
-
|
210
|
-
# @see the `==` method
|
211
|
-
# @param [Object] Object to be compared
|
212
|
-
def eql?(o)
|
213
|
-
self == o
|
214
|
-
end
|
215
|
-
|
216
|
-
# Calculates hash code according to all attributes.
|
217
|
-
# @return [Integer] Hash code
|
218
|
-
def hash
|
219
|
-
[type, api_key, domain, incoming_address, hide_unsubscribe_link, from_address].hash
|
220
|
-
end
|
221
|
-
|
222
|
-
# Builds the object from hash
|
223
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
224
|
-
# @return [Object] Returns the model itself
|
225
|
-
def self.build_from_hash(attributes)
|
226
|
-
new.build_from_hash(attributes)
|
227
|
-
end
|
228
|
-
|
229
|
-
# Builds the object from hash
|
230
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
231
|
-
# @return [Object] Returns the model itself
|
232
|
-
def build_from_hash(attributes)
|
233
|
-
return nil unless attributes.is_a?(Hash)
|
234
|
-
self.class.openapi_types.each_pair do |key, type|
|
235
|
-
if type =~ /\AArray<(.*)>/i
|
236
|
-
# check to ensure the input is an array given that the attribute
|
237
|
-
# is documented as an array but the input is not
|
238
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
239
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
240
|
-
end
|
241
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
242
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
243
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
244
|
-
end
|
245
|
-
|
246
|
-
self
|
247
|
-
end
|
248
|
-
|
249
|
-
# Deserializes the data based on type
|
250
|
-
# @param string type Data type
|
251
|
-
# @param string value Value to be deserialized
|
252
|
-
# @return [Object] Deserialized data
|
253
|
-
def _deserialize(type, value)
|
254
|
-
case type.to_sym
|
255
|
-
when :DateTime
|
256
|
-
DateTime.parse(value)
|
257
|
-
when :Date
|
258
|
-
Date.parse(value)
|
259
|
-
when :String
|
260
|
-
value.to_s
|
261
|
-
when :Integer
|
262
|
-
value.to_i
|
263
|
-
when :Float
|
264
|
-
value.to_f
|
265
|
-
when :Boolean
|
266
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
267
|
-
true
|
268
|
-
else
|
269
|
-
false
|
270
|
-
end
|
271
|
-
when :Object
|
272
|
-
# generic object (usually a Hash), return directly
|
273
|
-
value
|
274
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
275
|
-
inner_type = Regexp.last_match[:inner_type]
|
276
|
-
value.map { |v| _deserialize(inner_type, v) }
|
277
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
278
|
-
k_type = Regexp.last_match[:k_type]
|
279
|
-
v_type = Regexp.last_match[:v_type]
|
280
|
-
{}.tap do |hash|
|
281
|
-
value.each do |k, v|
|
282
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
283
|
-
end
|
284
|
-
end
|
285
|
-
else # model
|
286
|
-
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
287
|
-
end
|
288
|
-
end
|
289
|
-
|
290
|
-
# Returns the string representation of the object
|
291
|
-
# @return [String] String presentation of the object
|
292
|
-
def to_s
|
293
|
-
to_hash.to_s
|
294
|
-
end
|
295
|
-
|
296
|
-
# to_body is an alias to to_hash (backward compatibility)
|
297
|
-
# @return [Hash] Returns the object in the form of hash
|
298
|
-
def to_body
|
299
|
-
to_hash
|
300
|
-
end
|
301
|
-
|
302
|
-
# Returns the object in the form of hash
|
303
|
-
# @return [Hash] Returns the object in the form of hash
|
304
|
-
def to_hash
|
305
|
-
hash = {}
|
306
|
-
self.class.attribute_map.each_pair do |attr, param|
|
307
|
-
value = self.send(attr)
|
308
|
-
if value.nil?
|
309
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
310
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
311
|
-
end
|
312
|
-
|
313
|
-
hash[param] = _to_hash(value)
|
314
|
-
end
|
315
|
-
hash
|
316
|
-
end
|
317
|
-
|
318
|
-
# Outputs non-array value in the form of hash
|
319
|
-
# For object, use to_hash. Otherwise, just return the value
|
320
|
-
# @param [Object] value Any valid value
|
321
|
-
# @return [Hash] Returns the value in the form of hash
|
322
|
-
def _to_hash(value)
|
323
|
-
if value.is_a?(Array)
|
324
|
-
value.compact.map { |v| _to_hash(v) }
|
325
|
-
elsif value.is_a?(Hash)
|
326
|
-
{}.tap do |hash|
|
327
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
328
|
-
end
|
329
|
-
elsif value.respond_to? :to_hash
|
330
|
-
value.to_hash
|
331
|
-
else
|
332
|
-
value
|
333
|
-
end
|
334
|
-
end
|
335
|
-
end
|
336
|
-
end
|