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,225 @@
|
|
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
|
+
# Response metadata.
|
14
|
+
class Meta
|
15
|
+
# A flag that indicates if there are more records that can be fetched.
|
16
|
+
attr_accessor :has_more
|
17
|
+
|
18
|
+
# A record id that can be used as a `page[after]` parameter in a new request to get the next page. Not specified if there are no subsequent pages.
|
19
|
+
attr_accessor :after_cursor
|
20
|
+
|
21
|
+
# A record id that can be used as a `page[before]` parameter in a new request to get the previous page. Not specified if there are no previous pages.
|
22
|
+
attr_accessor :before_cursor
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'has_more' => :'hasMore',
|
28
|
+
:'after_cursor' => :'afterCursor',
|
29
|
+
:'before_cursor' => :'beforeCursor'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'has_more' => :'Boolean',
|
37
|
+
:'after_cursor' => :'String',
|
38
|
+
:'before_cursor' => :'String'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# List of attributes with nullable: true
|
43
|
+
def self.openapi_nullable
|
44
|
+
Set.new([
|
45
|
+
])
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Meta` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'has_more')
|
64
|
+
self.has_more = attributes[:'has_more']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.key?(:'after_cursor')
|
68
|
+
self.after_cursor = attributes[:'after_cursor']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'before_cursor')
|
72
|
+
self.before_cursor = attributes[:'before_cursor']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properties with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
invalid_properties = Array.new
|
80
|
+
invalid_properties
|
81
|
+
end
|
82
|
+
|
83
|
+
# Check to see if the all the properties in the model are valid
|
84
|
+
# @return true if the model is valid
|
85
|
+
def valid?
|
86
|
+
true
|
87
|
+
end
|
88
|
+
|
89
|
+
# Checks equality by comparing each attribute.
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
has_more == o.has_more &&
|
95
|
+
after_cursor == o.after_cursor &&
|
96
|
+
before_cursor == o.before_cursor
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
def hash
|
108
|
+
[has_more, after_cursor, before_cursor].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def self.build_from_hash(attributes)
|
115
|
+
new.build_from_hash(attributes)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.openapi_types.each_pair do |key, type|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :DateTime
|
145
|
+
DateTime.parse(value)
|
146
|
+
when :Date
|
147
|
+
Date.parse(value)
|
148
|
+
when :String
|
149
|
+
value.to_s
|
150
|
+
when :Integer
|
151
|
+
value.to_i
|
152
|
+
when :Float
|
153
|
+
value.to_f
|
154
|
+
when :Boolean
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
|
+
true
|
157
|
+
else
|
158
|
+
false
|
159
|
+
end
|
160
|
+
when :Object
|
161
|
+
# generic object (usually a Hash), return directly
|
162
|
+
value
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each do |k, v|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else # model
|
175
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
@@ -0,0 +1,219 @@
|
|
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 OfferControlBody
|
14
|
+
# The id or the name of the switchboard integration that will become pending. Also supports the `next` keyword to offer control to the next switchboard integration designated in the switchboard hierarchy configuration. This cannot match the active switchboard integration.
|
15
|
+
attr_accessor :switchboard_integration
|
16
|
+
|
17
|
+
# Flat object containing custom properties. Strings, numbers and booleans are the only supported format that can be passed to metadata. The metadata is limited to 4KB in size. The metadata object will be included in the `switchboard:offerControl` and `switchboard:offerControl:failure` webhooks.
|
18
|
+
attr_accessor :metadata
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'switchboard_integration' => :'switchboardIntegration',
|
24
|
+
:'metadata' => :'metadata'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'switchboard_integration' => :'String',
|
32
|
+
:'metadata' => :'Object'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# List of attributes with nullable: true
|
37
|
+
def self.openapi_nullable
|
38
|
+
Set.new([
|
39
|
+
])
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::OfferControlBody` initialize method"
|
47
|
+
end
|
48
|
+
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::OfferControlBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
+
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
56
|
+
|
57
|
+
if attributes.key?(:'switchboard_integration')
|
58
|
+
self.switchboard_integration = attributes[:'switchboard_integration']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.key?(:'metadata')
|
62
|
+
self.metadata = attributes[:'metadata']
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
invalid_properties = Array.new
|
70
|
+
if @switchboard_integration.nil?
|
71
|
+
invalid_properties.push('invalid value for "switchboard_integration", switchboard_integration cannot be nil.')
|
72
|
+
end
|
73
|
+
|
74
|
+
invalid_properties
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
def valid?
|
80
|
+
return false if @switchboard_integration.nil?
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def ==(o)
|
87
|
+
return true if self.equal?(o)
|
88
|
+
self.class == o.class &&
|
89
|
+
switchboard_integration == o.switchboard_integration &&
|
90
|
+
metadata == o.metadata
|
91
|
+
end
|
92
|
+
|
93
|
+
# @see the `==` method
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def eql?(o)
|
96
|
+
self == o
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Integer] Hash code
|
101
|
+
def hash
|
102
|
+
[switchboard_integration, metadata].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def self.build_from_hash(attributes)
|
109
|
+
new.build_from_hash(attributes)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
self.class.openapi_types.each_pair do |key, type|
|
118
|
+
if type =~ /\AArray<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
123
|
+
end
|
124
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
127
|
+
end
|
128
|
+
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserializes the data based on type
|
133
|
+
# @param string type Data type
|
134
|
+
# @param string value Value to be deserialized
|
135
|
+
# @return [Object] Deserialized data
|
136
|
+
def _deserialize(type, value)
|
137
|
+
case type.to_sym
|
138
|
+
when :DateTime
|
139
|
+
DateTime.parse(value)
|
140
|
+
when :Date
|
141
|
+
Date.parse(value)
|
142
|
+
when :String
|
143
|
+
value.to_s
|
144
|
+
when :Integer
|
145
|
+
value.to_i
|
146
|
+
when :Float
|
147
|
+
value.to_f
|
148
|
+
when :Boolean
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
150
|
+
true
|
151
|
+
else
|
152
|
+
false
|
153
|
+
end
|
154
|
+
when :Object
|
155
|
+
# generic object (usually a Hash), return directly
|
156
|
+
value
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each do |k, v|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
else # model
|
169
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
if value.nil?
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
194
|
+
end
|
195
|
+
|
196
|
+
hash[param] = _to_hash(value)
|
197
|
+
end
|
198
|
+
hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Outputs non-array value in the form of hash
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
203
|
+
# @param [Object] value Any valid value
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
205
|
+
def _to_hash(value)
|
206
|
+
if value.is_a?(Array)
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
208
|
+
elsif value.is_a?(Hash)
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
+
end
|
212
|
+
elsif value.respond_to? :to_hash
|
213
|
+
value.to_hash
|
214
|
+
else
|
215
|
+
value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,250 @@
|
|
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 Page
|
14
|
+
# A record id. Results will only contain the records that come after the specified record. Only one of `after` or `before` can be provided, not both.
|
15
|
+
attr_accessor :after
|
16
|
+
|
17
|
+
# A record id. Results will only contain the records that come before the specified record. Only one of `after` or `before` can be provided, not both.
|
18
|
+
attr_accessor :before
|
19
|
+
|
20
|
+
# The number of records to return.
|
21
|
+
attr_accessor :size
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'after' => :'after',
|
27
|
+
:'before' => :'before',
|
28
|
+
:'size' => :'size'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'after' => :'String',
|
36
|
+
:'before' => :'String',
|
37
|
+
:'size' => :'Integer'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# List of attributes with nullable: true
|
42
|
+
def self.openapi_nullable
|
43
|
+
Set.new([
|
44
|
+
])
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
if (!attributes.is_a?(Hash))
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Page` initialize method"
|
52
|
+
end
|
53
|
+
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Page`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
+
end
|
59
|
+
h[k.to_sym] = v
|
60
|
+
}
|
61
|
+
|
62
|
+
if attributes.key?(:'after')
|
63
|
+
self.after = attributes[:'after']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.key?(:'before')
|
67
|
+
self.before = attributes[:'before']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'size')
|
71
|
+
self.size = attributes[:'size']
|
72
|
+
else
|
73
|
+
self.size = 25
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
if !@size.nil? && @size > 100
|
82
|
+
invalid_properties.push('invalid value for "size", must be smaller than or equal to 100.')
|
83
|
+
end
|
84
|
+
|
85
|
+
if !@size.nil? && @size < 0
|
86
|
+
invalid_properties.push('invalid value for "size", must be greater than or equal to 0.')
|
87
|
+
end
|
88
|
+
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
return false if !@size.nil? && @size > 100
|
96
|
+
return false if !@size.nil? && @size < 0
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Custom attribute writer method with validation
|
101
|
+
# @param [Object] size Value to be assigned
|
102
|
+
def size=(size)
|
103
|
+
if !size.nil? && size > 100
|
104
|
+
fail ArgumentError, 'invalid value for "size", must be smaller than or equal to 100.'
|
105
|
+
end
|
106
|
+
|
107
|
+
if !size.nil? && size < 0
|
108
|
+
fail ArgumentError, 'invalid value for "size", must be greater than or equal to 0.'
|
109
|
+
end
|
110
|
+
|
111
|
+
@size = size
|
112
|
+
end
|
113
|
+
|
114
|
+
# Checks equality by comparing each attribute.
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def ==(o)
|
117
|
+
return true if self.equal?(o)
|
118
|
+
self.class == o.class &&
|
119
|
+
after == o.after &&
|
120
|
+
before == o.before &&
|
121
|
+
size == o.size
|
122
|
+
end
|
123
|
+
|
124
|
+
# @see the `==` method
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def eql?(o)
|
127
|
+
self == o
|
128
|
+
end
|
129
|
+
|
130
|
+
# Calculates hash code according to all attributes.
|
131
|
+
# @return [Integer] Hash code
|
132
|
+
def hash
|
133
|
+
[after, before, size].hash
|
134
|
+
end
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def self.build_from_hash(attributes)
|
140
|
+
new.build_from_hash(attributes)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def build_from_hash(attributes)
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if type =~ /\AArray<(.*)>/i
|
150
|
+
# check to ensure the input is an array given that the attribute
|
151
|
+
# is documented as an array but the input is not
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
154
|
+
end
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
157
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
158
|
+
end
|
159
|
+
|
160
|
+
self
|
161
|
+
end
|
162
|
+
|
163
|
+
# Deserializes the data based on type
|
164
|
+
# @param string type Data type
|
165
|
+
# @param string value Value to be deserialized
|
166
|
+
# @return [Object] Deserialized data
|
167
|
+
def _deserialize(type, value)
|
168
|
+
case type.to_sym
|
169
|
+
when :DateTime
|
170
|
+
DateTime.parse(value)
|
171
|
+
when :Date
|
172
|
+
Date.parse(value)
|
173
|
+
when :String
|
174
|
+
value.to_s
|
175
|
+
when :Integer
|
176
|
+
value.to_i
|
177
|
+
when :Float
|
178
|
+
value.to_f
|
179
|
+
when :Boolean
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
181
|
+
true
|
182
|
+
else
|
183
|
+
false
|
184
|
+
end
|
185
|
+
when :Object
|
186
|
+
# generic object (usually a Hash), return directly
|
187
|
+
value
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each do |k, v|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
else # model
|
200
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the string representation of the object
|
205
|
+
# @return [String] String presentation of the object
|
206
|
+
def to_s
|
207
|
+
to_hash.to_s
|
208
|
+
end
|
209
|
+
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_body
|
213
|
+
to_hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the object in the form of hash
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
218
|
+
def to_hash
|
219
|
+
hash = {}
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
221
|
+
value = self.send(attr)
|
222
|
+
if value.nil?
|
223
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
224
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
225
|
+
end
|
226
|
+
|
227
|
+
hash[param] = _to_hash(value)
|
228
|
+
end
|
229
|
+
hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Outputs non-array value in the form of hash
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
234
|
+
# @param [Object] value Any valid value
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
236
|
+
def _to_hash(value)
|
237
|
+
if value.is_a?(Array)
|
238
|
+
value.compact.map { |v| _to_hash(v) }
|
239
|
+
elsif value.is_a?(Hash)
|
240
|
+
{}.tap do |hash|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
242
|
+
end
|
243
|
+
elsif value.respond_to? :to_hash
|
244
|
+
value.to_hash
|
245
|
+
else
|
246
|
+
value
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|