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,203 @@
|
|
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 IntegrationResponse
|
14
|
+
attr_accessor :integration
|
15
|
+
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:'integration' => :'integration'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Attribute type mapping.
|
24
|
+
def self.openapi_types
|
25
|
+
{
|
26
|
+
:'integration' => :'Integration'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# List of attributes with nullable: true
|
31
|
+
def self.openapi_nullable
|
32
|
+
Set.new([
|
33
|
+
])
|
34
|
+
end
|
35
|
+
|
36
|
+
# Initializes the object
|
37
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
38
|
+
def initialize(attributes = {})
|
39
|
+
if (!attributes.is_a?(Hash))
|
40
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::IntegrationResponse` initialize method"
|
41
|
+
end
|
42
|
+
|
43
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
44
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
45
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
46
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::IntegrationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
47
|
+
end
|
48
|
+
h[k.to_sym] = v
|
49
|
+
}
|
50
|
+
|
51
|
+
if attributes.key?(:'integration')
|
52
|
+
self.integration = attributes[:'integration']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
invalid_properties
|
61
|
+
end
|
62
|
+
|
63
|
+
# Check to see if the all the properties in the model are valid
|
64
|
+
# @return true if the model is valid
|
65
|
+
def valid?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
integration == o.integration
|
75
|
+
end
|
76
|
+
|
77
|
+
# @see the `==` method
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def eql?(o)
|
80
|
+
self == o
|
81
|
+
end
|
82
|
+
|
83
|
+
# Calculates hash code according to all attributes.
|
84
|
+
# @return [Integer] Hash code
|
85
|
+
def hash
|
86
|
+
[integration].hash
|
87
|
+
end
|
88
|
+
|
89
|
+
# Builds the object from hash
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
91
|
+
# @return [Object] Returns the model itself
|
92
|
+
def self.build_from_hash(attributes)
|
93
|
+
new.build_from_hash(attributes)
|
94
|
+
end
|
95
|
+
|
96
|
+
# Builds the object from hash
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
# @return [Object] Returns the model itself
|
99
|
+
def build_from_hash(attributes)
|
100
|
+
return nil unless attributes.is_a?(Hash)
|
101
|
+
self.class.openapi_types.each_pair do |key, type|
|
102
|
+
if type =~ /\AArray<(.*)>/i
|
103
|
+
# check to ensure the input is an array given that the attribute
|
104
|
+
# is documented as an array but the input is not
|
105
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
106
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
107
|
+
end
|
108
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
109
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
110
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
111
|
+
end
|
112
|
+
|
113
|
+
self
|
114
|
+
end
|
115
|
+
|
116
|
+
# Deserializes the data based on type
|
117
|
+
# @param string type Data type
|
118
|
+
# @param string value Value to be deserialized
|
119
|
+
# @return [Object] Deserialized data
|
120
|
+
def _deserialize(type, value)
|
121
|
+
case type.to_sym
|
122
|
+
when :DateTime
|
123
|
+
DateTime.parse(value)
|
124
|
+
when :Date
|
125
|
+
Date.parse(value)
|
126
|
+
when :String
|
127
|
+
value.to_s
|
128
|
+
when :Integer
|
129
|
+
value.to_i
|
130
|
+
when :Float
|
131
|
+
value.to_f
|
132
|
+
when :Boolean
|
133
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
|
+
true
|
135
|
+
else
|
136
|
+
false
|
137
|
+
end
|
138
|
+
when :Object
|
139
|
+
# generic object (usually a Hash), return directly
|
140
|
+
value
|
141
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
142
|
+
inner_type = Regexp.last_match[:inner_type]
|
143
|
+
value.map { |v| _deserialize(inner_type, v) }
|
144
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
145
|
+
k_type = Regexp.last_match[:k_type]
|
146
|
+
v_type = Regexp.last_match[:v_type]
|
147
|
+
{}.tap do |hash|
|
148
|
+
value.each do |k, v|
|
149
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else # model
|
153
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the string representation of the object
|
158
|
+
# @return [String] String presentation of the object
|
159
|
+
def to_s
|
160
|
+
to_hash.to_s
|
161
|
+
end
|
162
|
+
|
163
|
+
# to_body is an alias to to_hash (backward compatibility)
|
164
|
+
# @return [Hash] Returns the object in the form of hash
|
165
|
+
def to_body
|
166
|
+
to_hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Returns the object in the form of hash
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
171
|
+
def to_hash
|
172
|
+
hash = {}
|
173
|
+
self.class.attribute_map.each_pair do |attr, param|
|
174
|
+
value = self.send(attr)
|
175
|
+
if value.nil?
|
176
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
177
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
178
|
+
end
|
179
|
+
|
180
|
+
hash[param] = _to_hash(value)
|
181
|
+
end
|
182
|
+
hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Outputs non-array value in the form of hash
|
186
|
+
# For object, use to_hash. Otherwise, just return the value
|
187
|
+
# @param [Object] value Any valid value
|
188
|
+
# @return [Hash] Returns the value in the form of hash
|
189
|
+
def _to_hash(value)
|
190
|
+
if value.is_a?(Array)
|
191
|
+
value.compact.map { |v| _to_hash(v) }
|
192
|
+
elsif value.is_a?(Hash)
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
195
|
+
end
|
196
|
+
elsif value.respond_to? :to_hash
|
197
|
+
value.to_hash
|
198
|
+
else
|
199
|
+
value
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
@@ -0,0 +1,204 @@
|
|
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 IntegrationType
|
14
|
+
# The type of the integration to deliver the message to. Will return an error if the user does not have a client of that type attached to the conversation.
|
15
|
+
attr_accessor :integration_type
|
16
|
+
|
17
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:'integration_type' => :'integrationType'
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# Attribute type mapping.
|
25
|
+
def self.openapi_types
|
26
|
+
{
|
27
|
+
:'integration_type' => :'String'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# List of attributes with nullable: true
|
32
|
+
def self.openapi_nullable
|
33
|
+
Set.new([
|
34
|
+
])
|
35
|
+
end
|
36
|
+
|
37
|
+
# Initializes the object
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
39
|
+
def initialize(attributes = {})
|
40
|
+
if (!attributes.is_a?(Hash))
|
41
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::IntegrationType` initialize method"
|
42
|
+
end
|
43
|
+
|
44
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
46
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
47
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::IntegrationType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
48
|
+
end
|
49
|
+
h[k.to_sym] = v
|
50
|
+
}
|
51
|
+
|
52
|
+
if attributes.key?(:'integration_type')
|
53
|
+
self.integration_type = attributes[:'integration_type']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
58
|
+
# @return Array for valid properties with the reasons
|
59
|
+
def list_invalid_properties
|
60
|
+
invalid_properties = Array.new
|
61
|
+
invalid_properties
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
def valid?
|
67
|
+
true
|
68
|
+
end
|
69
|
+
|
70
|
+
# Checks equality by comparing each attribute.
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def ==(o)
|
73
|
+
return true if self.equal?(o)
|
74
|
+
self.class == o.class &&
|
75
|
+
integration_type == o.integration_type
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Integer] Hash code
|
86
|
+
def hash
|
87
|
+
[integration_type].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def self.build_from_hash(attributes)
|
94
|
+
new.build_from_hash(attributes)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def build_from_hash(attributes)
|
101
|
+
return nil unless attributes.is_a?(Hash)
|
102
|
+
self.class.openapi_types.each_pair do |key, type|
|
103
|
+
if type =~ /\AArray<(.*)>/i
|
104
|
+
# check to ensure the input is an array given that the attribute
|
105
|
+
# is documented as an array but the input is not
|
106
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
107
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
108
|
+
end
|
109
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
110
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
111
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
112
|
+
end
|
113
|
+
|
114
|
+
self
|
115
|
+
end
|
116
|
+
|
117
|
+
# Deserializes the data based on type
|
118
|
+
# @param string type Data type
|
119
|
+
# @param string value Value to be deserialized
|
120
|
+
# @return [Object] Deserialized data
|
121
|
+
def _deserialize(type, value)
|
122
|
+
case type.to_sym
|
123
|
+
when :DateTime
|
124
|
+
DateTime.parse(value)
|
125
|
+
when :Date
|
126
|
+
Date.parse(value)
|
127
|
+
when :String
|
128
|
+
value.to_s
|
129
|
+
when :Integer
|
130
|
+
value.to_i
|
131
|
+
when :Float
|
132
|
+
value.to_f
|
133
|
+
when :Boolean
|
134
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
135
|
+
true
|
136
|
+
else
|
137
|
+
false
|
138
|
+
end
|
139
|
+
when :Object
|
140
|
+
# generic object (usually a Hash), return directly
|
141
|
+
value
|
142
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
143
|
+
inner_type = Regexp.last_match[:inner_type]
|
144
|
+
value.map { |v| _deserialize(inner_type, v) }
|
145
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
146
|
+
k_type = Regexp.last_match[:k_type]
|
147
|
+
v_type = Regexp.last_match[:v_type]
|
148
|
+
{}.tap do |hash|
|
149
|
+
value.each do |k, v|
|
150
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
else # model
|
154
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Returns the string representation of the object
|
159
|
+
# @return [String] String presentation of the object
|
160
|
+
def to_s
|
161
|
+
to_hash.to_s
|
162
|
+
end
|
163
|
+
|
164
|
+
# to_body is an alias to to_hash (backward compatibility)
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_body
|
167
|
+
to_hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the object in the form of hash
|
171
|
+
# @return [Hash] Returns the object in the form of hash
|
172
|
+
def to_hash
|
173
|
+
hash = {}
|
174
|
+
self.class.attribute_map.each_pair do |attr, param|
|
175
|
+
value = self.send(attr)
|
176
|
+
if value.nil?
|
177
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
178
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
179
|
+
end
|
180
|
+
|
181
|
+
hash[param] = _to_hash(value)
|
182
|
+
end
|
183
|
+
hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Outputs non-array value in the form of hash
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
188
|
+
# @param [Object] value Any valid value
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
190
|
+
def _to_hash(value)
|
191
|
+
if value.is_a?(Array)
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
193
|
+
elsif value.is_a?(Hash)
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
196
|
+
end
|
197
|
+
elsif value.respond_to? :to_hash
|
198
|
+
value.to_hash
|
199
|
+
else
|
200
|
+
value
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
@@ -0,0 +1,619 @@
|
|
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 IntegrationUpdate
|
14
|
+
# A human-friendly name used to identify the integration. `displayName` can be unset by changing it to `null`.
|
15
|
+
attr_accessor :display_name
|
16
|
+
|
17
|
+
# Your server key from the fcm console.
|
18
|
+
attr_accessor :server_key
|
19
|
+
|
20
|
+
# Your sender id from the fcm console.
|
21
|
+
attr_accessor :sender_id
|
22
|
+
|
23
|
+
# Allows users to create more than one conversation on the web messenger integration.
|
24
|
+
attr_accessor :can_user_create_more_conversations
|
25
|
+
|
26
|
+
# The binary of your APN certificate base64 encoded.
|
27
|
+
attr_accessor :certificate
|
28
|
+
|
29
|
+
# The password for your APN certificate.
|
30
|
+
attr_accessor :password
|
31
|
+
|
32
|
+
# The APN environment to connect to (Production, if true, or Sandbox). Defaults to value inferred from certificate if not specified.
|
33
|
+
attr_accessor :production
|
34
|
+
|
35
|
+
# Use the unread count of the conversation as the application badge.
|
36
|
+
attr_accessor :auto_update_badge
|
37
|
+
|
38
|
+
# 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.
|
39
|
+
attr_accessor :hide_unsubscribe_link
|
40
|
+
|
41
|
+
# 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.
|
42
|
+
attr_accessor :from_address
|
43
|
+
|
44
|
+
# A Facebook Page Access Token.
|
45
|
+
attr_accessor :page_access_token
|
46
|
+
|
47
|
+
# This color will be used in the messenger header and the button or tab in idle state. Must be a 3 or 6-character hexadecimal color.
|
48
|
+
attr_accessor :brand_color
|
49
|
+
|
50
|
+
# When true, the introduction pane will be pinned at the top of the conversation instead of scrolling with it.
|
51
|
+
attr_accessor :fixed_intro_pane
|
52
|
+
|
53
|
+
# This color will be used for customer messages, quick replies and actions in the footer. Must be a 3 or 6-character hexadecimal color.
|
54
|
+
attr_accessor :conversation_color
|
55
|
+
|
56
|
+
# This color will be used for call-to-actions inside your messages. Must be a 3 or 6-character hexadecimal color.
|
57
|
+
attr_accessor :action_color
|
58
|
+
|
59
|
+
# Choose how the messenger will appear on your website. Must be either button or tab.
|
60
|
+
attr_accessor :display_style
|
61
|
+
|
62
|
+
# With the button style Web Messenger, you have the option of selecting your own button icon. The image must be at least 200 x 200 pixels and must be in either JPG, PNG, or GIF format.
|
63
|
+
attr_accessor :button_icon_url
|
64
|
+
|
65
|
+
# With the button style Web Messenger, you have the option of specifying the button width.
|
66
|
+
attr_accessor :button_width
|
67
|
+
|
68
|
+
# With the button style Web Messenger, you have the option of specifying the button height.
|
69
|
+
attr_accessor :button_height
|
70
|
+
|
71
|
+
# Array of integration IDs, order will be reflected in the Web Messenger. When set, only integrations from this list will be displayed in the Web Messenger. If unset, all integrations will be displayed.
|
72
|
+
attr_accessor :integration_order
|
73
|
+
|
74
|
+
# A custom business name for the Web Messenger.
|
75
|
+
attr_accessor :business_name
|
76
|
+
|
77
|
+
# A custom business icon url for the Web Messenger. The image must be at least 200 x 200 pixels and must be in either JPG, PNG, or GIF format.
|
78
|
+
attr_accessor :business_icon_url
|
79
|
+
|
80
|
+
# A background image url for the conversation. Image will be tiled to fit the window.
|
81
|
+
attr_accessor :background_image_url
|
82
|
+
|
83
|
+
# A list of origins to whitelist. When set, only the origins from this list will be able to initialize the Web Messenger. If unset, all origins are whitelisted. The elements in the list should follow the serialized-origin format from RFC 6454: scheme \"://\" host [ \":\" port ], where scheme is http or https.
|
84
|
+
attr_accessor :origin_whitelist
|
85
|
+
|
86
|
+
# Object whose properties can be set to specify the add-on’s options. See the [guide](https://docs.smooch.io/guide/web-messenger/#prechat-capture) to learn more about Prechat Capture.
|
87
|
+
attr_accessor :prechat_capture
|
88
|
+
|
89
|
+
# Specify a fallback language to use when sending WhatsApp message template using the short hand syntax. Defaults to en_US. See WhatsApp documentation for more info.
|
90
|
+
attr_accessor :hsm_fallback_language
|
91
|
+
|
92
|
+
# The business ID associated with the WhatsApp account. In combination with accountManagementAccessToken, it’s used for Message Template Reconstruction.
|
93
|
+
attr_accessor :account_id
|
94
|
+
|
95
|
+
# An access token associated with the accountId used to query the WhatsApp Account Management API. In combination with accountId, it’s used for Message Template Reconstruction.
|
96
|
+
attr_accessor :account_management_access_token
|
97
|
+
|
98
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
99
|
+
def self.attribute_map
|
100
|
+
{
|
101
|
+
:'display_name' => :'displayName',
|
102
|
+
:'server_key' => :'serverKey',
|
103
|
+
:'sender_id' => :'senderId',
|
104
|
+
:'can_user_create_more_conversations' => :'canUserCreateMoreConversations',
|
105
|
+
:'certificate' => :'certificate',
|
106
|
+
:'password' => :'password',
|
107
|
+
:'production' => :'production',
|
108
|
+
:'auto_update_badge' => :'autoUpdateBadge',
|
109
|
+
:'hide_unsubscribe_link' => :'hideUnsubscribeLink',
|
110
|
+
:'from_address' => :'fromAddress',
|
111
|
+
:'page_access_token' => :'pageAccessToken',
|
112
|
+
:'brand_color' => :'brandColor',
|
113
|
+
:'fixed_intro_pane' => :'fixedIntroPane',
|
114
|
+
:'conversation_color' => :'conversationColor',
|
115
|
+
:'action_color' => :'actionColor',
|
116
|
+
:'display_style' => :'displayStyle',
|
117
|
+
:'button_icon_url' => :'buttonIconUrl',
|
118
|
+
:'button_width' => :'buttonWidth',
|
119
|
+
:'button_height' => :'buttonHeight',
|
120
|
+
:'integration_order' => :'integrationOrder',
|
121
|
+
:'business_name' => :'businessName',
|
122
|
+
:'business_icon_url' => :'businessIconUrl',
|
123
|
+
:'background_image_url' => :'backgroundImageUrl',
|
124
|
+
:'origin_whitelist' => :'originWhitelist',
|
125
|
+
:'prechat_capture' => :'prechatCapture',
|
126
|
+
:'hsm_fallback_language' => :'hsmFallbackLanguage',
|
127
|
+
:'account_id' => :'accountId',
|
128
|
+
:'account_management_access_token' => :'accountManagementAccessToken'
|
129
|
+
}
|
130
|
+
end
|
131
|
+
|
132
|
+
# Attribute type mapping.
|
133
|
+
def self.openapi_types
|
134
|
+
{
|
135
|
+
:'display_name' => :'String',
|
136
|
+
:'server_key' => :'String',
|
137
|
+
:'sender_id' => :'String',
|
138
|
+
:'can_user_create_more_conversations' => :'Boolean',
|
139
|
+
:'certificate' => :'String',
|
140
|
+
:'password' => :'String',
|
141
|
+
:'production' => :'Boolean',
|
142
|
+
:'auto_update_badge' => :'Boolean',
|
143
|
+
:'hide_unsubscribe_link' => :'Boolean',
|
144
|
+
:'from_address' => :'String',
|
145
|
+
:'page_access_token' => :'String',
|
146
|
+
:'brand_color' => :'String',
|
147
|
+
:'fixed_intro_pane' => :'Boolean',
|
148
|
+
:'conversation_color' => :'String',
|
149
|
+
:'action_color' => :'String',
|
150
|
+
:'display_style' => :'String',
|
151
|
+
:'button_icon_url' => :'String',
|
152
|
+
:'button_width' => :'String',
|
153
|
+
:'button_height' => :'String',
|
154
|
+
:'integration_order' => :'Array<String>',
|
155
|
+
:'business_name' => :'String',
|
156
|
+
:'business_icon_url' => :'String',
|
157
|
+
:'background_image_url' => :'String',
|
158
|
+
:'origin_whitelist' => :'Array<String>',
|
159
|
+
:'prechat_capture' => :'PrechatCapture',
|
160
|
+
:'hsm_fallback_language' => :'String',
|
161
|
+
:'account_id' => :'String',
|
162
|
+
:'account_management_access_token' => :'String'
|
163
|
+
}
|
164
|
+
end
|
165
|
+
|
166
|
+
# List of attributes with nullable: true
|
167
|
+
def self.openapi_nullable
|
168
|
+
Set.new([
|
169
|
+
:'display_name',
|
170
|
+
:'server_key',
|
171
|
+
:'sender_id',
|
172
|
+
:'certificate',
|
173
|
+
:'from_address',
|
174
|
+
:'button_icon_url',
|
175
|
+
:'integration_order',
|
176
|
+
:'origin_whitelist',
|
177
|
+
:'hsm_fallback_language',
|
178
|
+
:'account_id',
|
179
|
+
:'account_management_access_token'
|
180
|
+
])
|
181
|
+
end
|
182
|
+
|
183
|
+
# List of class defined in oneOf (OpenAPI v3)
|
184
|
+
def self.openapi_one_of
|
185
|
+
[
|
186
|
+
:'AndroidUpdate',
|
187
|
+
:'AppleUpdate',
|
188
|
+
:'CustomUpdate',
|
189
|
+
:'IosUpdate',
|
190
|
+
:'LineUpdate',
|
191
|
+
:'MailgunUpdate',
|
192
|
+
:'MessageBirdUpdate',
|
193
|
+
:'MessengerUpdate',
|
194
|
+
:'TelegramUpdate',
|
195
|
+
:'TwilioUpdate',
|
196
|
+
:'TwitterUpdate',
|
197
|
+
:'ViberUpdate',
|
198
|
+
:'WebUpdate',
|
199
|
+
:'WhatsAppUpdate'
|
200
|
+
]
|
201
|
+
end
|
202
|
+
|
203
|
+
# Initializes the object
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
205
|
+
def initialize(attributes = {})
|
206
|
+
if (!attributes.is_a?(Hash))
|
207
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::IntegrationUpdate` initialize method"
|
208
|
+
end
|
209
|
+
|
210
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
211
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
212
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
213
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::IntegrationUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
214
|
+
end
|
215
|
+
h[k.to_sym] = v
|
216
|
+
}
|
217
|
+
|
218
|
+
if attributes.key?(:'display_name')
|
219
|
+
self.display_name = attributes[:'display_name']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'server_key')
|
223
|
+
self.server_key = attributes[:'server_key']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'sender_id')
|
227
|
+
self.sender_id = attributes[:'sender_id']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'can_user_create_more_conversations')
|
231
|
+
self.can_user_create_more_conversations = attributes[:'can_user_create_more_conversations']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'certificate')
|
235
|
+
self.certificate = attributes[:'certificate']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.key?(:'password')
|
239
|
+
self.password = attributes[:'password']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.key?(:'production')
|
243
|
+
self.production = attributes[:'production']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.key?(:'auto_update_badge')
|
247
|
+
self.auto_update_badge = attributes[:'auto_update_badge']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'hide_unsubscribe_link')
|
251
|
+
self.hide_unsubscribe_link = attributes[:'hide_unsubscribe_link']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.key?(:'from_address')
|
255
|
+
self.from_address = attributes[:'from_address']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.key?(:'page_access_token')
|
259
|
+
self.page_access_token = attributes[:'page_access_token']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.key?(:'brand_color')
|
263
|
+
self.brand_color = attributes[:'brand_color']
|
264
|
+
else
|
265
|
+
self.brand_color = '65758e'
|
266
|
+
end
|
267
|
+
|
268
|
+
if attributes.key?(:'fixed_intro_pane')
|
269
|
+
self.fixed_intro_pane = attributes[:'fixed_intro_pane']
|
270
|
+
else
|
271
|
+
self.fixed_intro_pane = false
|
272
|
+
end
|
273
|
+
|
274
|
+
if attributes.key?(:'conversation_color')
|
275
|
+
self.conversation_color = attributes[:'conversation_color']
|
276
|
+
else
|
277
|
+
self.conversation_color = '0099ff'
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.key?(:'action_color')
|
281
|
+
self.action_color = attributes[:'action_color']
|
282
|
+
else
|
283
|
+
self.action_color = '0099ff'
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes.key?(:'display_style')
|
287
|
+
self.display_style = attributes[:'display_style']
|
288
|
+
else
|
289
|
+
self.display_style = 'button'
|
290
|
+
end
|
291
|
+
|
292
|
+
if attributes.key?(:'button_icon_url')
|
293
|
+
self.button_icon_url = attributes[:'button_icon_url']
|
294
|
+
end
|
295
|
+
|
296
|
+
if attributes.key?(:'button_width')
|
297
|
+
self.button_width = attributes[:'button_width']
|
298
|
+
else
|
299
|
+
self.button_width = '58'
|
300
|
+
end
|
301
|
+
|
302
|
+
if attributes.key?(:'button_height')
|
303
|
+
self.button_height = attributes[:'button_height']
|
304
|
+
else
|
305
|
+
self.button_height = '58'
|
306
|
+
end
|
307
|
+
|
308
|
+
if attributes.key?(:'integration_order')
|
309
|
+
end
|
310
|
+
|
311
|
+
if attributes.key?(:'business_name')
|
312
|
+
self.business_name = attributes[:'business_name']
|
313
|
+
end
|
314
|
+
|
315
|
+
if attributes.key?(:'business_icon_url')
|
316
|
+
self.business_icon_url = attributes[:'business_icon_url']
|
317
|
+
end
|
318
|
+
|
319
|
+
if attributes.key?(:'background_image_url')
|
320
|
+
self.background_image_url = attributes[:'background_image_url']
|
321
|
+
end
|
322
|
+
|
323
|
+
if attributes.key?(:'origin_whitelist')
|
324
|
+
end
|
325
|
+
|
326
|
+
if attributes.key?(:'prechat_capture')
|
327
|
+
self.prechat_capture = attributes[:'prechat_capture']
|
328
|
+
end
|
329
|
+
|
330
|
+
if attributes.key?(:'hsm_fallback_language')
|
331
|
+
self.hsm_fallback_language = attributes[:'hsm_fallback_language']
|
332
|
+
else
|
333
|
+
self.hsm_fallback_language = 'en_US'
|
334
|
+
end
|
335
|
+
|
336
|
+
if attributes.key?(:'account_id')
|
337
|
+
self.account_id = attributes[:'account_id']
|
338
|
+
end
|
339
|
+
|
340
|
+
if attributes.key?(:'account_management_access_token')
|
341
|
+
self.account_management_access_token = attributes[:'account_management_access_token']
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
346
|
+
# @return Array for valid properties with the reasons
|
347
|
+
def list_invalid_properties
|
348
|
+
invalid_properties = Array.new
|
349
|
+
if !@display_name.nil? && @display_name.to_s.length > 100
|
350
|
+
invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 100.')
|
351
|
+
end
|
352
|
+
|
353
|
+
if !@display_name.nil? && @display_name.to_s.length < 1
|
354
|
+
invalid_properties.push('invalid value for "display_name", the character length must be great than or equal to 1.')
|
355
|
+
end
|
356
|
+
|
357
|
+
if !@server_key.nil? && @server_key.to_s.length < 1
|
358
|
+
invalid_properties.push('invalid value for "server_key", the character length must be great than or equal to 1.')
|
359
|
+
end
|
360
|
+
|
361
|
+
if !@sender_id.nil? && @sender_id.to_s.length < 1
|
362
|
+
invalid_properties.push('invalid value for "sender_id", the character length must be great than or equal to 1.')
|
363
|
+
end
|
364
|
+
|
365
|
+
if !@certificate.nil? && @certificate.to_s.length < 1
|
366
|
+
invalid_properties.push('invalid value for "certificate", the character length must be great than or equal to 1.')
|
367
|
+
end
|
368
|
+
|
369
|
+
if !@from_address.nil? && @from_address.to_s.length < 1
|
370
|
+
invalid_properties.push('invalid value for "from_address", the character length must be great than or equal to 1.')
|
371
|
+
end
|
372
|
+
|
373
|
+
invalid_properties
|
374
|
+
end
|
375
|
+
|
376
|
+
# Check to see if the all the properties in the model are valid
|
377
|
+
# @return true if the model is valid
|
378
|
+
def valid?
|
379
|
+
return false if !@display_name.nil? && @display_name.to_s.length > 100
|
380
|
+
return false if !@display_name.nil? && @display_name.to_s.length < 1
|
381
|
+
return false if !@server_key.nil? && @server_key.to_s.length < 1
|
382
|
+
return false if !@sender_id.nil? && @sender_id.to_s.length < 1
|
383
|
+
return false if !@certificate.nil? && @certificate.to_s.length < 1
|
384
|
+
return false if !@from_address.nil? && @from_address.to_s.length < 1
|
385
|
+
_one_of_found = false
|
386
|
+
self.class.openapi_one_of.each do |_class|
|
387
|
+
_one_of = SunshineConversationsClient.const_get(_class).build_from_hash(self.to_hash)
|
388
|
+
if _one_of.valid?
|
389
|
+
if _one_of_found
|
390
|
+
return false
|
391
|
+
else
|
392
|
+
_one_of_found = true
|
393
|
+
end
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
if !_one_of_found
|
398
|
+
return false
|
399
|
+
end
|
400
|
+
|
401
|
+
true
|
402
|
+
end
|
403
|
+
|
404
|
+
# Custom attribute writer method with validation
|
405
|
+
# @param [Object] display_name Value to be assigned
|
406
|
+
def display_name=(display_name)
|
407
|
+
if !display_name.nil? && display_name.to_s.length > 100
|
408
|
+
fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 100.'
|
409
|
+
end
|
410
|
+
|
411
|
+
if !display_name.nil? && display_name.to_s.length < 1
|
412
|
+
fail ArgumentError, 'invalid value for "display_name", the character length must be great than or equal to 1.'
|
413
|
+
end
|
414
|
+
|
415
|
+
@display_name = display_name
|
416
|
+
end
|
417
|
+
|
418
|
+
# Custom attribute writer method with validation
|
419
|
+
# @param [Object] server_key Value to be assigned
|
420
|
+
def server_key=(server_key)
|
421
|
+
if !server_key.nil? && server_key.to_s.length < 1
|
422
|
+
fail ArgumentError, 'invalid value for "server_key", the character length must be great than or equal to 1.'
|
423
|
+
end
|
424
|
+
|
425
|
+
@server_key = server_key
|
426
|
+
end
|
427
|
+
|
428
|
+
# Custom attribute writer method with validation
|
429
|
+
# @param [Object] sender_id Value to be assigned
|
430
|
+
def sender_id=(sender_id)
|
431
|
+
if !sender_id.nil? && sender_id.to_s.length < 1
|
432
|
+
fail ArgumentError, 'invalid value for "sender_id", the character length must be great than or equal to 1.'
|
433
|
+
end
|
434
|
+
|
435
|
+
@sender_id = sender_id
|
436
|
+
end
|
437
|
+
|
438
|
+
# Custom attribute writer method with validation
|
439
|
+
# @param [Object] certificate Value to be assigned
|
440
|
+
def certificate=(certificate)
|
441
|
+
if !certificate.nil? && certificate.to_s.length < 1
|
442
|
+
fail ArgumentError, 'invalid value for "certificate", the character length must be great than or equal to 1.'
|
443
|
+
end
|
444
|
+
|
445
|
+
@certificate = certificate
|
446
|
+
end
|
447
|
+
|
448
|
+
# Custom attribute writer method with validation
|
449
|
+
# @param [Object] from_address Value to be assigned
|
450
|
+
def from_address=(from_address)
|
451
|
+
if !from_address.nil? && from_address.to_s.length < 1
|
452
|
+
fail ArgumentError, 'invalid value for "from_address", the character length must be great than or equal to 1.'
|
453
|
+
end
|
454
|
+
|
455
|
+
@from_address = from_address
|
456
|
+
end
|
457
|
+
|
458
|
+
# Checks equality by comparing each attribute.
|
459
|
+
# @param [Object] Object to be compared
|
460
|
+
def ==(o)
|
461
|
+
return true if self.equal?(o)
|
462
|
+
self.class == o.class &&
|
463
|
+
display_name == o.display_name &&
|
464
|
+
server_key == o.server_key &&
|
465
|
+
sender_id == o.sender_id &&
|
466
|
+
can_user_create_more_conversations == o.can_user_create_more_conversations &&
|
467
|
+
certificate == o.certificate &&
|
468
|
+
password == o.password &&
|
469
|
+
production == o.production &&
|
470
|
+
auto_update_badge == o.auto_update_badge &&
|
471
|
+
hide_unsubscribe_link == o.hide_unsubscribe_link &&
|
472
|
+
from_address == o.from_address &&
|
473
|
+
page_access_token == o.page_access_token &&
|
474
|
+
brand_color == o.brand_color &&
|
475
|
+
fixed_intro_pane == o.fixed_intro_pane &&
|
476
|
+
conversation_color == o.conversation_color &&
|
477
|
+
action_color == o.action_color &&
|
478
|
+
display_style == o.display_style &&
|
479
|
+
button_icon_url == o.button_icon_url &&
|
480
|
+
button_width == o.button_width &&
|
481
|
+
button_height == o.button_height &&
|
482
|
+
integration_order == o.integration_order &&
|
483
|
+
business_name == o.business_name &&
|
484
|
+
business_icon_url == o.business_icon_url &&
|
485
|
+
background_image_url == o.background_image_url &&
|
486
|
+
origin_whitelist == o.origin_whitelist &&
|
487
|
+
prechat_capture == o.prechat_capture &&
|
488
|
+
hsm_fallback_language == o.hsm_fallback_language &&
|
489
|
+
account_id == o.account_id &&
|
490
|
+
account_management_access_token == o.account_management_access_token
|
491
|
+
end
|
492
|
+
|
493
|
+
# @see the `==` method
|
494
|
+
# @param [Object] Object to be compared
|
495
|
+
def eql?(o)
|
496
|
+
self == o
|
497
|
+
end
|
498
|
+
|
499
|
+
# Calculates hash code according to all attributes.
|
500
|
+
# @return [Integer] Hash code
|
501
|
+
def hash
|
502
|
+
[display_name, server_key, sender_id, can_user_create_more_conversations, certificate, password, production, auto_update_badge, hide_unsubscribe_link, from_address, page_access_token, brand_color, fixed_intro_pane, conversation_color, action_color, display_style, button_icon_url, button_width, button_height, integration_order, business_name, business_icon_url, background_image_url, origin_whitelist, prechat_capture, hsm_fallback_language, account_id, account_management_access_token].hash
|
503
|
+
end
|
504
|
+
|
505
|
+
# Builds the object from hash
|
506
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
507
|
+
# @return [Object] Returns the model itself
|
508
|
+
def self.build_from_hash(attributes)
|
509
|
+
new.build_from_hash(attributes)
|
510
|
+
end
|
511
|
+
|
512
|
+
# Builds the object from hash
|
513
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
514
|
+
# @return [Object] Returns the model itself
|
515
|
+
def build_from_hash(attributes)
|
516
|
+
return nil unless attributes.is_a?(Hash)
|
517
|
+
self.class.openapi_types.each_pair do |key, type|
|
518
|
+
if type =~ /\AArray<(.*)>/i
|
519
|
+
# check to ensure the input is an array given that the attribute
|
520
|
+
# is documented as an array but the input is not
|
521
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
522
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
523
|
+
end
|
524
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
525
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
526
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
527
|
+
end
|
528
|
+
|
529
|
+
self
|
530
|
+
end
|
531
|
+
|
532
|
+
# Deserializes the data based on type
|
533
|
+
# @param string type Data type
|
534
|
+
# @param string value Value to be deserialized
|
535
|
+
# @return [Object] Deserialized data
|
536
|
+
def _deserialize(type, value)
|
537
|
+
case type.to_sym
|
538
|
+
when :DateTime
|
539
|
+
DateTime.parse(value)
|
540
|
+
when :Date
|
541
|
+
Date.parse(value)
|
542
|
+
when :String
|
543
|
+
value.to_s
|
544
|
+
when :Integer
|
545
|
+
value.to_i
|
546
|
+
when :Float
|
547
|
+
value.to_f
|
548
|
+
when :Boolean
|
549
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
550
|
+
true
|
551
|
+
else
|
552
|
+
false
|
553
|
+
end
|
554
|
+
when :Object
|
555
|
+
# generic object (usually a Hash), return directly
|
556
|
+
value
|
557
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
558
|
+
inner_type = Regexp.last_match[:inner_type]
|
559
|
+
value.map { |v| _deserialize(inner_type, v) }
|
560
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
561
|
+
k_type = Regexp.last_match[:k_type]
|
562
|
+
v_type = Regexp.last_match[:v_type]
|
563
|
+
{}.tap do |hash|
|
564
|
+
value.each do |k, v|
|
565
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
566
|
+
end
|
567
|
+
end
|
568
|
+
else # model
|
569
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
570
|
+
end
|
571
|
+
end
|
572
|
+
|
573
|
+
# Returns the string representation of the object
|
574
|
+
# @return [String] String presentation of the object
|
575
|
+
def to_s
|
576
|
+
to_hash.to_s
|
577
|
+
end
|
578
|
+
|
579
|
+
# to_body is an alias to to_hash (backward compatibility)
|
580
|
+
# @return [Hash] Returns the object in the form of hash
|
581
|
+
def to_body
|
582
|
+
to_hash
|
583
|
+
end
|
584
|
+
|
585
|
+
# Returns the object in the form of hash
|
586
|
+
# @return [Hash] Returns the object in the form of hash
|
587
|
+
def to_hash
|
588
|
+
hash = {}
|
589
|
+
self.class.attribute_map.each_pair do |attr, param|
|
590
|
+
value = self.send(attr)
|
591
|
+
if value.nil?
|
592
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
593
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
594
|
+
end
|
595
|
+
|
596
|
+
hash[param] = _to_hash(value)
|
597
|
+
end
|
598
|
+
hash
|
599
|
+
end
|
600
|
+
|
601
|
+
# Outputs non-array value in the form of hash
|
602
|
+
# For object, use to_hash. Otherwise, just return the value
|
603
|
+
# @param [Object] value Any valid value
|
604
|
+
# @return [Hash] Returns the value in the form of hash
|
605
|
+
def _to_hash(value)
|
606
|
+
if value.is_a?(Array)
|
607
|
+
value.compact.map { |v| _to_hash(v) }
|
608
|
+
elsif value.is_a?(Hash)
|
609
|
+
{}.tap do |hash|
|
610
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
611
|
+
end
|
612
|
+
elsif value.respond_to? :to_hash
|
613
|
+
value.to_hash
|
614
|
+
else
|
615
|
+
value
|
616
|
+
end
|
617
|
+
end
|
618
|
+
end
|
619
|
+
end
|