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,356 @@
|
|
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 Mailgun < Integration
|
14
|
+
# The type of integration.
|
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
|
+
:'from_address'
|
60
|
+
])
|
61
|
+
end
|
62
|
+
|
63
|
+
# List of class defined in allOf (OpenAPI v3)
|
64
|
+
def self.openapi_all_of
|
65
|
+
[
|
66
|
+
:'Integration',
|
67
|
+
:'MailgunAllOf'
|
68
|
+
]
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Mailgun` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Mailgun`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
# call parent's initialize
|
87
|
+
super(attributes)
|
88
|
+
|
89
|
+
if attributes.key?(:'type')
|
90
|
+
self.type = attributes[:'type']
|
91
|
+
else
|
92
|
+
self.type = 'mailgun'
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'api_key')
|
96
|
+
self.api_key = attributes[:'api_key']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'domain')
|
100
|
+
self.domain = attributes[:'domain']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'incoming_address')
|
104
|
+
self.incoming_address = attributes[:'incoming_address']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'hide_unsubscribe_link')
|
108
|
+
self.hide_unsubscribe_link = attributes[:'hide_unsubscribe_link']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'from_address')
|
112
|
+
self.from_address = attributes[:'from_address']
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
117
|
+
# @return Array for valid properties with the reasons
|
118
|
+
def list_invalid_properties
|
119
|
+
invalid_properties = super
|
120
|
+
if @api_key.nil?
|
121
|
+
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
122
|
+
end
|
123
|
+
|
124
|
+
if @api_key.to_s.length < 1
|
125
|
+
invalid_properties.push('invalid value for "api_key", the character length must be great than or equal to 1.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if @domain.nil?
|
129
|
+
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if @domain.to_s.length < 1
|
133
|
+
invalid_properties.push('invalid value for "domain", the character length must be great than or equal to 1.')
|
134
|
+
end
|
135
|
+
|
136
|
+
if @incoming_address.nil?
|
137
|
+
invalid_properties.push('invalid value for "incoming_address", incoming_address cannot be nil.')
|
138
|
+
end
|
139
|
+
|
140
|
+
if @incoming_address.to_s.length < 1
|
141
|
+
invalid_properties.push('invalid value for "incoming_address", the character length must be great than or equal to 1.')
|
142
|
+
end
|
143
|
+
|
144
|
+
if !@from_address.nil? && @from_address.to_s.length < 1
|
145
|
+
invalid_properties.push('invalid value for "from_address", the character length must be great than or equal to 1.')
|
146
|
+
end
|
147
|
+
|
148
|
+
invalid_properties
|
149
|
+
end
|
150
|
+
|
151
|
+
# Check to see if the all the properties in the model are valid
|
152
|
+
# @return true if the model is valid
|
153
|
+
def valid?
|
154
|
+
return false if @api_key.nil?
|
155
|
+
return false if @api_key.to_s.length < 1
|
156
|
+
return false if @domain.nil?
|
157
|
+
return false if @domain.to_s.length < 1
|
158
|
+
return false if @incoming_address.nil?
|
159
|
+
return false if @incoming_address.to_s.length < 1
|
160
|
+
return false if !@from_address.nil? && @from_address.to_s.length < 1
|
161
|
+
true && super
|
162
|
+
end
|
163
|
+
|
164
|
+
# Custom attribute writer method with validation
|
165
|
+
# @param [Object] api_key Value to be assigned
|
166
|
+
def api_key=(api_key)
|
167
|
+
if api_key.nil?
|
168
|
+
fail ArgumentError, 'api_key cannot be nil'
|
169
|
+
end
|
170
|
+
|
171
|
+
if api_key.to_s.length < 1
|
172
|
+
fail ArgumentError, 'invalid value for "api_key", the character length must be great than or equal to 1.'
|
173
|
+
end
|
174
|
+
|
175
|
+
@api_key = api_key
|
176
|
+
end
|
177
|
+
|
178
|
+
# Custom attribute writer method with validation
|
179
|
+
# @param [Object] domain Value to be assigned
|
180
|
+
def domain=(domain)
|
181
|
+
if domain.nil?
|
182
|
+
fail ArgumentError, 'domain cannot be nil'
|
183
|
+
end
|
184
|
+
|
185
|
+
if domain.to_s.length < 1
|
186
|
+
fail ArgumentError, 'invalid value for "domain", the character length must be great than or equal to 1.'
|
187
|
+
end
|
188
|
+
|
189
|
+
@domain = domain
|
190
|
+
end
|
191
|
+
|
192
|
+
# Custom attribute writer method with validation
|
193
|
+
# @param [Object] incoming_address Value to be assigned
|
194
|
+
def incoming_address=(incoming_address)
|
195
|
+
if incoming_address.nil?
|
196
|
+
fail ArgumentError, 'incoming_address cannot be nil'
|
197
|
+
end
|
198
|
+
|
199
|
+
if incoming_address.to_s.length < 1
|
200
|
+
fail ArgumentError, 'invalid value for "incoming_address", the character length must be great than or equal to 1.'
|
201
|
+
end
|
202
|
+
|
203
|
+
@incoming_address = incoming_address
|
204
|
+
end
|
205
|
+
|
206
|
+
# Custom attribute writer method with validation
|
207
|
+
# @param [Object] from_address Value to be assigned
|
208
|
+
def from_address=(from_address)
|
209
|
+
if !from_address.nil? && from_address.to_s.length < 1
|
210
|
+
fail ArgumentError, 'invalid value for "from_address", the character length must be great than or equal to 1.'
|
211
|
+
end
|
212
|
+
|
213
|
+
@from_address = from_address
|
214
|
+
end
|
215
|
+
|
216
|
+
# Checks equality by comparing each attribute.
|
217
|
+
# @param [Object] Object to be compared
|
218
|
+
def ==(o)
|
219
|
+
return true if self.equal?(o)
|
220
|
+
self.class == o.class &&
|
221
|
+
type == o.type &&
|
222
|
+
api_key == o.api_key &&
|
223
|
+
domain == o.domain &&
|
224
|
+
incoming_address == o.incoming_address &&
|
225
|
+
hide_unsubscribe_link == o.hide_unsubscribe_link &&
|
226
|
+
from_address == o.from_address && super(o)
|
227
|
+
end
|
228
|
+
|
229
|
+
# @see the `==` method
|
230
|
+
# @param [Object] Object to be compared
|
231
|
+
def eql?(o)
|
232
|
+
self == o
|
233
|
+
end
|
234
|
+
|
235
|
+
# Calculates hash code according to all attributes.
|
236
|
+
# @return [Integer] Hash code
|
237
|
+
def hash
|
238
|
+
[type, api_key, domain, incoming_address, hide_unsubscribe_link, from_address].hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Builds the object from hash
|
242
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
243
|
+
# @return [Object] Returns the model itself
|
244
|
+
def self.build_from_hash(attributes)
|
245
|
+
new.build_from_hash(attributes)
|
246
|
+
end
|
247
|
+
|
248
|
+
# Builds the object from hash
|
249
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
250
|
+
# @return [Object] Returns the model itself
|
251
|
+
def build_from_hash(attributes)
|
252
|
+
return nil unless attributes.is_a?(Hash)
|
253
|
+
super(attributes)
|
254
|
+
self.class.openapi_types.each_pair do |key, type|
|
255
|
+
if type =~ /\AArray<(.*)>/i
|
256
|
+
# check to ensure the input is an array given that the attribute
|
257
|
+
# is documented as an array but the input is not
|
258
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
259
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
260
|
+
end
|
261
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
262
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
263
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
264
|
+
end
|
265
|
+
|
266
|
+
self
|
267
|
+
end
|
268
|
+
|
269
|
+
# Deserializes the data based on type
|
270
|
+
# @param string type Data type
|
271
|
+
# @param string value Value to be deserialized
|
272
|
+
# @return [Object] Deserialized data
|
273
|
+
def _deserialize(type, value)
|
274
|
+
case type.to_sym
|
275
|
+
when :DateTime
|
276
|
+
DateTime.parse(value)
|
277
|
+
when :Date
|
278
|
+
Date.parse(value)
|
279
|
+
when :String
|
280
|
+
value.to_s
|
281
|
+
when :Integer
|
282
|
+
value.to_i
|
283
|
+
when :Float
|
284
|
+
value.to_f
|
285
|
+
when :Boolean
|
286
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
287
|
+
true
|
288
|
+
else
|
289
|
+
false
|
290
|
+
end
|
291
|
+
when :Object
|
292
|
+
# generic object (usually a Hash), return directly
|
293
|
+
value
|
294
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
295
|
+
inner_type = Regexp.last_match[:inner_type]
|
296
|
+
value.map { |v| _deserialize(inner_type, v) }
|
297
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
298
|
+
k_type = Regexp.last_match[:k_type]
|
299
|
+
v_type = Regexp.last_match[:v_type]
|
300
|
+
{}.tap do |hash|
|
301
|
+
value.each do |k, v|
|
302
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
else # model
|
306
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
# Returns the string representation of the object
|
311
|
+
# @return [String] String presentation of the object
|
312
|
+
def to_s
|
313
|
+
to_hash.to_s
|
314
|
+
end
|
315
|
+
|
316
|
+
# to_body is an alias to to_hash (backward compatibility)
|
317
|
+
# @return [Hash] Returns the object in the form of hash
|
318
|
+
def to_body
|
319
|
+
to_hash
|
320
|
+
end
|
321
|
+
|
322
|
+
# Returns the object in the form of hash
|
323
|
+
# @return [Hash] Returns the object in the form of hash
|
324
|
+
def to_hash
|
325
|
+
hash = super
|
326
|
+
self.class.attribute_map.each_pair do |attr, param|
|
327
|
+
value = self.send(attr)
|
328
|
+
if value.nil?
|
329
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
330
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
331
|
+
end
|
332
|
+
|
333
|
+
hash[param] = _to_hash(value)
|
334
|
+
end
|
335
|
+
hash
|
336
|
+
end
|
337
|
+
|
338
|
+
# Outputs non-array value in the form of hash
|
339
|
+
# For object, use to_hash. Otherwise, just return the value
|
340
|
+
# @param [Object] value Any valid value
|
341
|
+
# @return [Hash] Returns the value in the form of hash
|
342
|
+
def _to_hash(value)
|
343
|
+
if value.is_a?(Array)
|
344
|
+
value.compact.map { |v| _to_hash(v) }
|
345
|
+
elsif value.is_a?(Hash)
|
346
|
+
{}.tap do |hash|
|
347
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
348
|
+
end
|
349
|
+
elsif value.respond_to? :to_hash
|
350
|
+
value.to_hash
|
351
|
+
else
|
352
|
+
value
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
@@ -0,0 +1,345 @@
|
|
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
|
+
# 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.
|
14
|
+
class MailgunAllOf
|
15
|
+
# The type of integration.
|
16
|
+
attr_accessor :type
|
17
|
+
|
18
|
+
# The public API key of your Mailgun account.
|
19
|
+
attr_accessor :api_key
|
20
|
+
|
21
|
+
# The domain used to relay email. This domain must be configured and verified in your Mailgun account.
|
22
|
+
attr_accessor :domain
|
23
|
+
|
24
|
+
# Sunshine Conversations will receive all emails sent to this address. It will also be used as the Reply-To address.
|
25
|
+
attr_accessor :incoming_address
|
26
|
+
|
27
|
+
# 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.
|
28
|
+
attr_accessor :hide_unsubscribe_link
|
29
|
+
|
30
|
+
# 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.
|
31
|
+
attr_accessor :from_address
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'type' => :'type',
|
37
|
+
:'api_key' => :'apiKey',
|
38
|
+
:'domain' => :'domain',
|
39
|
+
:'incoming_address' => :'incomingAddress',
|
40
|
+
:'hide_unsubscribe_link' => :'hideUnsubscribeLink',
|
41
|
+
:'from_address' => :'fromAddress'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'type' => :'String',
|
49
|
+
:'api_key' => :'String',
|
50
|
+
:'domain' => :'String',
|
51
|
+
:'incoming_address' => :'String',
|
52
|
+
:'hide_unsubscribe_link' => :'Boolean',
|
53
|
+
:'from_address' => :'String'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# List of attributes with nullable: true
|
58
|
+
def self.openapi_nullable
|
59
|
+
Set.new([
|
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.nil?
|
111
|
+
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
112
|
+
end
|
113
|
+
|
114
|
+
if @api_key.to_s.length < 1
|
115
|
+
invalid_properties.push('invalid value for "api_key", the character length must be great than or equal to 1.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if @domain.nil?
|
119
|
+
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
120
|
+
end
|
121
|
+
|
122
|
+
if @domain.to_s.length < 1
|
123
|
+
invalid_properties.push('invalid value for "domain", the character length must be great than or equal to 1.')
|
124
|
+
end
|
125
|
+
|
126
|
+
if @incoming_address.nil?
|
127
|
+
invalid_properties.push('invalid value for "incoming_address", incoming_address cannot be nil.')
|
128
|
+
end
|
129
|
+
|
130
|
+
if @incoming_address.to_s.length < 1
|
131
|
+
invalid_properties.push('invalid value for "incoming_address", the character length must be great than or equal to 1.')
|
132
|
+
end
|
133
|
+
|
134
|
+
if !@from_address.nil? && @from_address.to_s.length < 1
|
135
|
+
invalid_properties.push('invalid value for "from_address", the character length must be great than or equal to 1.')
|
136
|
+
end
|
137
|
+
|
138
|
+
invalid_properties
|
139
|
+
end
|
140
|
+
|
141
|
+
# Check to see if the all the properties in the model are valid
|
142
|
+
# @return true if the model is valid
|
143
|
+
def valid?
|
144
|
+
return false if @api_key.nil?
|
145
|
+
return false if @api_key.to_s.length < 1
|
146
|
+
return false if @domain.nil?
|
147
|
+
return false if @domain.to_s.length < 1
|
148
|
+
return false if @incoming_address.nil?
|
149
|
+
return false if @incoming_address.to_s.length < 1
|
150
|
+
return false if !@from_address.nil? && @from_address.to_s.length < 1
|
151
|
+
true
|
152
|
+
end
|
153
|
+
|
154
|
+
# Custom attribute writer method with validation
|
155
|
+
# @param [Object] api_key Value to be assigned
|
156
|
+
def api_key=(api_key)
|
157
|
+
if api_key.nil?
|
158
|
+
fail ArgumentError, 'api_key cannot be nil'
|
159
|
+
end
|
160
|
+
|
161
|
+
if api_key.to_s.length < 1
|
162
|
+
fail ArgumentError, 'invalid value for "api_key", the character length must be great than or equal to 1.'
|
163
|
+
end
|
164
|
+
|
165
|
+
@api_key = api_key
|
166
|
+
end
|
167
|
+
|
168
|
+
# Custom attribute writer method with validation
|
169
|
+
# @param [Object] domain Value to be assigned
|
170
|
+
def domain=(domain)
|
171
|
+
if domain.nil?
|
172
|
+
fail ArgumentError, 'domain cannot be nil'
|
173
|
+
end
|
174
|
+
|
175
|
+
if domain.to_s.length < 1
|
176
|
+
fail ArgumentError, 'invalid value for "domain", the character length must be great than or equal to 1.'
|
177
|
+
end
|
178
|
+
|
179
|
+
@domain = domain
|
180
|
+
end
|
181
|
+
|
182
|
+
# Custom attribute writer method with validation
|
183
|
+
# @param [Object] incoming_address Value to be assigned
|
184
|
+
def incoming_address=(incoming_address)
|
185
|
+
if incoming_address.nil?
|
186
|
+
fail ArgumentError, 'incoming_address cannot be nil'
|
187
|
+
end
|
188
|
+
|
189
|
+
if incoming_address.to_s.length < 1
|
190
|
+
fail ArgumentError, 'invalid value for "incoming_address", the character length must be great than or equal to 1.'
|
191
|
+
end
|
192
|
+
|
193
|
+
@incoming_address = incoming_address
|
194
|
+
end
|
195
|
+
|
196
|
+
# Custom attribute writer method with validation
|
197
|
+
# @param [Object] from_address Value to be assigned
|
198
|
+
def from_address=(from_address)
|
199
|
+
if !from_address.nil? && from_address.to_s.length < 1
|
200
|
+
fail ArgumentError, 'invalid value for "from_address", the character length must be great than or equal to 1.'
|
201
|
+
end
|
202
|
+
|
203
|
+
@from_address = from_address
|
204
|
+
end
|
205
|
+
|
206
|
+
# Checks equality by comparing each attribute.
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def ==(o)
|
209
|
+
return true if self.equal?(o)
|
210
|
+
self.class == o.class &&
|
211
|
+
type == o.type &&
|
212
|
+
api_key == o.api_key &&
|
213
|
+
domain == o.domain &&
|
214
|
+
incoming_address == o.incoming_address &&
|
215
|
+
hide_unsubscribe_link == o.hide_unsubscribe_link &&
|
216
|
+
from_address == o.from_address
|
217
|
+
end
|
218
|
+
|
219
|
+
# @see the `==` method
|
220
|
+
# @param [Object] Object to be compared
|
221
|
+
def eql?(o)
|
222
|
+
self == o
|
223
|
+
end
|
224
|
+
|
225
|
+
# Calculates hash code according to all attributes.
|
226
|
+
# @return [Integer] Hash code
|
227
|
+
def hash
|
228
|
+
[type, api_key, domain, incoming_address, hide_unsubscribe_link, from_address].hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# Builds the object from hash
|
232
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
233
|
+
# @return [Object] Returns the model itself
|
234
|
+
def self.build_from_hash(attributes)
|
235
|
+
new.build_from_hash(attributes)
|
236
|
+
end
|
237
|
+
|
238
|
+
# Builds the object from hash
|
239
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
240
|
+
# @return [Object] Returns the model itself
|
241
|
+
def build_from_hash(attributes)
|
242
|
+
return nil unless attributes.is_a?(Hash)
|
243
|
+
self.class.openapi_types.each_pair do |key, type|
|
244
|
+
if type =~ /\AArray<(.*)>/i
|
245
|
+
# check to ensure the input is an array given that the attribute
|
246
|
+
# is documented as an array but the input is not
|
247
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
248
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
249
|
+
end
|
250
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
251
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
252
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
253
|
+
end
|
254
|
+
|
255
|
+
self
|
256
|
+
end
|
257
|
+
|
258
|
+
# Deserializes the data based on type
|
259
|
+
# @param string type Data type
|
260
|
+
# @param string value Value to be deserialized
|
261
|
+
# @return [Object] Deserialized data
|
262
|
+
def _deserialize(type, value)
|
263
|
+
case type.to_sym
|
264
|
+
when :DateTime
|
265
|
+
DateTime.parse(value)
|
266
|
+
when :Date
|
267
|
+
Date.parse(value)
|
268
|
+
when :String
|
269
|
+
value.to_s
|
270
|
+
when :Integer
|
271
|
+
value.to_i
|
272
|
+
when :Float
|
273
|
+
value.to_f
|
274
|
+
when :Boolean
|
275
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
276
|
+
true
|
277
|
+
else
|
278
|
+
false
|
279
|
+
end
|
280
|
+
when :Object
|
281
|
+
# generic object (usually a Hash), return directly
|
282
|
+
value
|
283
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
284
|
+
inner_type = Regexp.last_match[:inner_type]
|
285
|
+
value.map { |v| _deserialize(inner_type, v) }
|
286
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
287
|
+
k_type = Regexp.last_match[:k_type]
|
288
|
+
v_type = Regexp.last_match[:v_type]
|
289
|
+
{}.tap do |hash|
|
290
|
+
value.each do |k, v|
|
291
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
else # model
|
295
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
# Returns the string representation of the object
|
300
|
+
# @return [String] String presentation of the object
|
301
|
+
def to_s
|
302
|
+
to_hash.to_s
|
303
|
+
end
|
304
|
+
|
305
|
+
# to_body is an alias to to_hash (backward compatibility)
|
306
|
+
# @return [Hash] Returns the object in the form of hash
|
307
|
+
def to_body
|
308
|
+
to_hash
|
309
|
+
end
|
310
|
+
|
311
|
+
# Returns the object in the form of hash
|
312
|
+
# @return [Hash] Returns the object in the form of hash
|
313
|
+
def to_hash
|
314
|
+
hash = {}
|
315
|
+
self.class.attribute_map.each_pair do |attr, param|
|
316
|
+
value = self.send(attr)
|
317
|
+
if value.nil?
|
318
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
319
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
320
|
+
end
|
321
|
+
|
322
|
+
hash[param] = _to_hash(value)
|
323
|
+
end
|
324
|
+
hash
|
325
|
+
end
|
326
|
+
|
327
|
+
# Outputs non-array value in the form of hash
|
328
|
+
# For object, use to_hash. Otherwise, just return the value
|
329
|
+
# @param [Object] value Any valid value
|
330
|
+
# @return [Hash] Returns the value in the form of hash
|
331
|
+
def _to_hash(value)
|
332
|
+
if value.is_a?(Array)
|
333
|
+
value.compact.map { |v| _to_hash(v) }
|
334
|
+
elsif value.is_a?(Hash)
|
335
|
+
{}.tap do |hash|
|
336
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
337
|
+
end
|
338
|
+
elsif value.respond_to? :to_hash
|
339
|
+
value.to_hash
|
340
|
+
else
|
341
|
+
value
|
342
|
+
end
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|