sunshine-conversations-client 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +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,239 @@
|
|
|
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
|
+
# Settings to adjust the carousel layout.
|
|
14
|
+
class CarouselMessageDisplaySettings
|
|
15
|
+
# Specifies how to display all carousel images. Valid values are horizontal (default) and square. Only supported in Facebook Messenger, Web Messenger, Android SDK and iOS SDK carousels.
|
|
16
|
+
attr_accessor :image_aspect_ratio
|
|
17
|
+
|
|
18
|
+
class EnumAttributeValidator
|
|
19
|
+
attr_reader :datatype
|
|
20
|
+
attr_reader :allowable_values
|
|
21
|
+
|
|
22
|
+
def initialize(datatype, allowable_values)
|
|
23
|
+
@allowable_values = allowable_values.map do |value|
|
|
24
|
+
case datatype.to_s
|
|
25
|
+
when /Integer/i
|
|
26
|
+
value.to_i
|
|
27
|
+
when /Float/i
|
|
28
|
+
value.to_f
|
|
29
|
+
else
|
|
30
|
+
value
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def valid?(value)
|
|
36
|
+
!value || allowable_values.include?(value)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
|
+
def self.attribute_map
|
|
42
|
+
{
|
|
43
|
+
:'image_aspect_ratio' => :'imageAspectRatio'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'image_aspect_ratio' => :'String'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List of attributes with nullable: true
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::CarouselMessageDisplaySettings` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::CarouselMessageDisplaySettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'image_aspect_ratio')
|
|
76
|
+
self.image_aspect_ratio = attributes[:'image_aspect_ratio']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
image_aspect_ratio_validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
91
|
+
return false unless image_aspect_ratio_validator.valid?(@image_aspect_ratio)
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
96
|
+
# @param [Object] image_aspect_ratio Object to be assigned
|
|
97
|
+
def image_aspect_ratio=(image_aspect_ratio)
|
|
98
|
+
validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
99
|
+
unless validator.valid?(image_aspect_ratio)
|
|
100
|
+
fail ArgumentError, "invalid value for \"image_aspect_ratio\", must be one of #{validator.allowable_values}."
|
|
101
|
+
end
|
|
102
|
+
@image_aspect_ratio = image_aspect_ratio
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
image_aspect_ratio == o.image_aspect_ratio
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[image_aspect_ratio].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
new.build_from_hash(attributes)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Builds the object from hash
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
# @return [Object] Returns the model itself
|
|
135
|
+
def build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
138
|
+
if type =~ /\AArray<(.*)>/i
|
|
139
|
+
# check to ensure the input is an array given that the attribute
|
|
140
|
+
# is documented as an array but the input is not
|
|
141
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
142
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
143
|
+
end
|
|
144
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
145
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
146
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
self
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Deserializes the data based on type
|
|
153
|
+
# @param string type Data type
|
|
154
|
+
# @param string value Value to be deserialized
|
|
155
|
+
# @return [Object] Deserialized data
|
|
156
|
+
def _deserialize(type, value)
|
|
157
|
+
case type.to_sym
|
|
158
|
+
when :DateTime
|
|
159
|
+
DateTime.parse(value)
|
|
160
|
+
when :Date
|
|
161
|
+
Date.parse(value)
|
|
162
|
+
when :String
|
|
163
|
+
value.to_s
|
|
164
|
+
when :Integer
|
|
165
|
+
value.to_i
|
|
166
|
+
when :Float
|
|
167
|
+
value.to_f
|
|
168
|
+
when :Boolean
|
|
169
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
170
|
+
true
|
|
171
|
+
else
|
|
172
|
+
false
|
|
173
|
+
end
|
|
174
|
+
when :Object
|
|
175
|
+
# generic object (usually a Hash), return directly
|
|
176
|
+
value
|
|
177
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
178
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
179
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
180
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
181
|
+
k_type = Regexp.last_match[:k_type]
|
|
182
|
+
v_type = Regexp.last_match[:v_type]
|
|
183
|
+
{}.tap do |hash|
|
|
184
|
+
value.each do |k, v|
|
|
185
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
else # model
|
|
189
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the string representation of the object
|
|
194
|
+
# @return [String] String presentation of the object
|
|
195
|
+
def to_s
|
|
196
|
+
to_hash.to_s
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_body
|
|
202
|
+
to_hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Returns the object in the form of hash
|
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
|
207
|
+
def to_hash
|
|
208
|
+
hash = {}
|
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
210
|
+
value = self.send(attr)
|
|
211
|
+
if value.nil?
|
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
hash[param] = _to_hash(value)
|
|
217
|
+
end
|
|
218
|
+
hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Outputs non-array value in the form of hash
|
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
223
|
+
# @param [Object] value Any valid value
|
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
|
225
|
+
def _to_hash(value)
|
|
226
|
+
if value.is_a?(Array)
|
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
|
228
|
+
elsif value.is_a?(Hash)
|
|
229
|
+
{}.tap do |hash|
|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
231
|
+
end
|
|
232
|
+
elsif value.respond_to? :to_hash
|
|
233
|
+
value.to_hash
|
|
234
|
+
else
|
|
235
|
+
value
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
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
|
+
class Client
|
|
14
|
+
# The unique ID of the client.
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
attr_accessor :type
|
|
18
|
+
|
|
19
|
+
# The client status. Indicates if the client is able to receive messages or not. Can be pending, inactive, active, or blocked.
|
|
20
|
+
attr_accessor :status
|
|
21
|
+
|
|
22
|
+
# The ID of the integration that the client was created for. Unused for clients of type sdk, as they incorporate multiple integrations.
|
|
23
|
+
attr_accessor :integration_id
|
|
24
|
+
|
|
25
|
+
# The ID of the user on an external channel. For example, the user’s phone number for Twilio, or their page-scoped user ID for Facebook Messenger. Applies only to non-SDK clients.
|
|
26
|
+
attr_accessor :external_id
|
|
27
|
+
|
|
28
|
+
# A datetime string with the format `YYYY-MM-DDThh:mm:ss.SSSZ` representing the last time the user interacted with this client.
|
|
29
|
+
attr_accessor :last_seen
|
|
30
|
+
|
|
31
|
+
# A timestamp signifying when the client was added to the user. Formatted as `YYYY-MM-DDThh:mm:ss.SSSZ`.
|
|
32
|
+
attr_accessor :linked_at
|
|
33
|
+
|
|
34
|
+
# The user's display name on the channel.
|
|
35
|
+
attr_accessor :display_name
|
|
36
|
+
|
|
37
|
+
# The URL for the user's avatar on the channel.
|
|
38
|
+
attr_accessor :avatar_url
|
|
39
|
+
|
|
40
|
+
# A flat curated object with properties that vary for each client platform. All keys are optional and not guaranteed to be available.
|
|
41
|
+
attr_accessor :info
|
|
42
|
+
|
|
43
|
+
# An object with raw properties that vary for each client platform. All keys are optional and not guaranteed to be available.
|
|
44
|
+
attr_accessor :raw
|
|
45
|
+
|
|
46
|
+
class EnumAttributeValidator
|
|
47
|
+
attr_reader :datatype
|
|
48
|
+
attr_reader :allowable_values
|
|
49
|
+
|
|
50
|
+
def initialize(datatype, allowable_values)
|
|
51
|
+
@allowable_values = allowable_values.map do |value|
|
|
52
|
+
case datatype.to_s
|
|
53
|
+
when /Integer/i
|
|
54
|
+
value.to_i
|
|
55
|
+
when /Float/i
|
|
56
|
+
value.to_f
|
|
57
|
+
else
|
|
58
|
+
value
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def valid?(value)
|
|
64
|
+
!value || allowable_values.include?(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
69
|
+
def self.attribute_map
|
|
70
|
+
{
|
|
71
|
+
:'id' => :'id',
|
|
72
|
+
:'type' => :'type',
|
|
73
|
+
:'status' => :'status',
|
|
74
|
+
:'integration_id' => :'integrationId',
|
|
75
|
+
:'external_id' => :'externalId',
|
|
76
|
+
:'last_seen' => :'lastSeen',
|
|
77
|
+
:'linked_at' => :'linkedAt',
|
|
78
|
+
:'display_name' => :'displayName',
|
|
79
|
+
:'avatar_url' => :'avatarUrl',
|
|
80
|
+
:'info' => :'info',
|
|
81
|
+
:'raw' => :'raw'
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Attribute type mapping.
|
|
86
|
+
def self.openapi_types
|
|
87
|
+
{
|
|
88
|
+
:'id' => :'String',
|
|
89
|
+
:'type' => :'ClientType',
|
|
90
|
+
:'status' => :'String',
|
|
91
|
+
:'integration_id' => :'String',
|
|
92
|
+
:'external_id' => :'String',
|
|
93
|
+
:'last_seen' => :'String',
|
|
94
|
+
:'linked_at' => :'String',
|
|
95
|
+
:'display_name' => :'String',
|
|
96
|
+
:'avatar_url' => :'String',
|
|
97
|
+
:'info' => :'Object',
|
|
98
|
+
:'raw' => :'Object'
|
|
99
|
+
}
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# List of attributes with nullable: true
|
|
103
|
+
def self.openapi_nullable
|
|
104
|
+
Set.new([
|
|
105
|
+
:'integration_id',
|
|
106
|
+
:'external_id',
|
|
107
|
+
:'last_seen',
|
|
108
|
+
:'linked_at',
|
|
109
|
+
:'display_name',
|
|
110
|
+
:'avatar_url',
|
|
111
|
+
:'info',
|
|
112
|
+
:'raw'
|
|
113
|
+
])
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Initializes the object
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
def initialize(attributes = {})
|
|
119
|
+
if (!attributes.is_a?(Hash))
|
|
120
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Client` initialize method"
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
124
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
125
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
126
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Client`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
127
|
+
end
|
|
128
|
+
h[k.to_sym] = v
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'id')
|
|
132
|
+
self.id = attributes[:'id']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'type')
|
|
136
|
+
self.type = attributes[:'type']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'status')
|
|
140
|
+
self.status = attributes[:'status']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'integration_id')
|
|
144
|
+
self.integration_id = attributes[:'integration_id']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'external_id')
|
|
148
|
+
self.external_id = attributes[:'external_id']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'last_seen')
|
|
152
|
+
self.last_seen = attributes[:'last_seen']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'linked_at')
|
|
156
|
+
self.linked_at = attributes[:'linked_at']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'display_name')
|
|
160
|
+
self.display_name = attributes[:'display_name']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'avatar_url')
|
|
164
|
+
self.avatar_url = attributes[:'avatar_url']
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'info')
|
|
168
|
+
self.info = attributes[:'info']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'raw')
|
|
172
|
+
self.raw = attributes[:'raw']
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
177
|
+
# @return Array for valid properties with the reasons
|
|
178
|
+
def list_invalid_properties
|
|
179
|
+
invalid_properties = Array.new
|
|
180
|
+
invalid_properties
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Check to see if the all the properties in the model are valid
|
|
184
|
+
# @return true if the model is valid
|
|
185
|
+
def valid?
|
|
186
|
+
status_validator = EnumAttributeValidator.new('String', ["active", "blocked", "inactive", "pending"])
|
|
187
|
+
return false unless status_validator.valid?(@status)
|
|
188
|
+
true
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
192
|
+
# @param [Object] status Object to be assigned
|
|
193
|
+
def status=(status)
|
|
194
|
+
validator = EnumAttributeValidator.new('String', ["active", "blocked", "inactive", "pending"])
|
|
195
|
+
unless validator.valid?(status)
|
|
196
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
197
|
+
end
|
|
198
|
+
@status = status
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Checks equality by comparing each attribute.
|
|
202
|
+
# @param [Object] Object to be compared
|
|
203
|
+
def ==(o)
|
|
204
|
+
return true if self.equal?(o)
|
|
205
|
+
self.class == o.class &&
|
|
206
|
+
id == o.id &&
|
|
207
|
+
type == o.type &&
|
|
208
|
+
status == o.status &&
|
|
209
|
+
integration_id == o.integration_id &&
|
|
210
|
+
external_id == o.external_id &&
|
|
211
|
+
last_seen == o.last_seen &&
|
|
212
|
+
linked_at == o.linked_at &&
|
|
213
|
+
display_name == o.display_name &&
|
|
214
|
+
avatar_url == o.avatar_url &&
|
|
215
|
+
info == o.info &&
|
|
216
|
+
raw == o.raw
|
|
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
|
+
[id, type, status, integration_id, external_id, last_seen, linked_at, display_name, avatar_url, info, raw].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
|