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,421 @@
|
|
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 Action
|
14
|
+
# The type of action.
|
15
|
+
attr_accessor :type
|
16
|
+
|
17
|
+
# The button text.
|
18
|
+
attr_accessor :text
|
19
|
+
|
20
|
+
# The amount being charged. It needs to be specified in cents and is an integer (9.99$ -> 999).
|
21
|
+
attr_accessor :amount
|
22
|
+
|
23
|
+
# An ISO 4217 standard currency code in lowercase. Used for actions of type buy.
|
24
|
+
attr_accessor :currency
|
25
|
+
|
26
|
+
# 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.
|
27
|
+
attr_accessor :metadata
|
28
|
+
|
29
|
+
# The webview URI. This is the URI that will open in the webview when clicking the button.
|
30
|
+
attr_accessor :uri
|
31
|
+
|
32
|
+
# Boolean value indicating whether the action is the default action for a message item in Facebook Messenger.
|
33
|
+
attr_accessor :default
|
34
|
+
|
35
|
+
attr_accessor :extra_channel_options
|
36
|
+
|
37
|
+
# A string payload to help you identify the action context. Used when posting the reply. You can also use metadata for more complex needs.
|
38
|
+
attr_accessor :payload
|
39
|
+
|
40
|
+
# An icon to render next to the reply option.
|
41
|
+
attr_accessor :icon_url
|
42
|
+
|
43
|
+
# The size to display a webview. Used for actions of type webview.
|
44
|
+
attr_accessor :size
|
45
|
+
|
46
|
+
# The fallback uri for channels that don’t support webviews. Used for actions of type webview.
|
47
|
+
attr_accessor :fallback
|
48
|
+
|
49
|
+
# Boolean value indicating if the webview should open automatically. Only one action per message can be set to true. Currently only supported on the Web Messenger.
|
50
|
+
attr_accessor :open_on_receive
|
51
|
+
|
52
|
+
class EnumAttributeValidator
|
53
|
+
attr_reader :datatype
|
54
|
+
attr_reader :allowable_values
|
55
|
+
|
56
|
+
def initialize(datatype, allowable_values)
|
57
|
+
@allowable_values = allowable_values.map do |value|
|
58
|
+
case datatype.to_s
|
59
|
+
when /Integer/i
|
60
|
+
value.to_i
|
61
|
+
when /Float/i
|
62
|
+
value.to_f
|
63
|
+
else
|
64
|
+
value
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def valid?(value)
|
70
|
+
!value || allowable_values.include?(value)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
75
|
+
def self.attribute_map
|
76
|
+
{
|
77
|
+
:'type' => :'type',
|
78
|
+
:'text' => :'text',
|
79
|
+
:'amount' => :'amount',
|
80
|
+
:'currency' => :'currency',
|
81
|
+
:'metadata' => :'metadata',
|
82
|
+
:'uri' => :'uri',
|
83
|
+
:'default' => :'default',
|
84
|
+
:'extra_channel_options' => :'extraChannelOptions',
|
85
|
+
:'payload' => :'payload',
|
86
|
+
:'icon_url' => :'iconUrl',
|
87
|
+
:'size' => :'size',
|
88
|
+
:'fallback' => :'fallback',
|
89
|
+
:'open_on_receive' => :'openOnReceive'
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
93
|
+
# Attribute type mapping.
|
94
|
+
def self.openapi_types
|
95
|
+
{
|
96
|
+
:'type' => :'String',
|
97
|
+
:'text' => :'String',
|
98
|
+
:'amount' => :'Integer',
|
99
|
+
:'currency' => :'String',
|
100
|
+
:'metadata' => :'Object',
|
101
|
+
:'uri' => :'String',
|
102
|
+
:'default' => :'Boolean',
|
103
|
+
:'extra_channel_options' => :'ExtraChannelOptions',
|
104
|
+
:'payload' => :'String',
|
105
|
+
:'icon_url' => :'String',
|
106
|
+
:'size' => :'String',
|
107
|
+
:'fallback' => :'String',
|
108
|
+
:'open_on_receive' => :'Boolean'
|
109
|
+
}
|
110
|
+
end
|
111
|
+
|
112
|
+
# List of attributes with nullable: true
|
113
|
+
def self.openapi_nullable
|
114
|
+
Set.new([
|
115
|
+
:'metadata',
|
116
|
+
])
|
117
|
+
end
|
118
|
+
|
119
|
+
# List of class defined in oneOf (OpenAPI v3)
|
120
|
+
def self.openapi_one_of
|
121
|
+
[
|
122
|
+
:'Buy',
|
123
|
+
:'Link',
|
124
|
+
:'LocationRequest',
|
125
|
+
:'Postback',
|
126
|
+
:'Reply',
|
127
|
+
:'Webview'
|
128
|
+
]
|
129
|
+
end
|
130
|
+
|
131
|
+
# discriminator's property name in OpenAPI v3
|
132
|
+
def self.openapi_discriminator_name
|
133
|
+
:'type'
|
134
|
+
end
|
135
|
+
|
136
|
+
# Initializes the object
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
def initialize(attributes = {})
|
139
|
+
if (!attributes.is_a?(Hash))
|
140
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::Action` initialize method"
|
141
|
+
end
|
142
|
+
|
143
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
144
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
145
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
146
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::Action`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
147
|
+
end
|
148
|
+
h[k.to_sym] = v
|
149
|
+
}
|
150
|
+
|
151
|
+
if attributes.key?(:'type')
|
152
|
+
self.type = attributes[:'type']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'text')
|
156
|
+
self.text = attributes[:'text']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'amount')
|
160
|
+
self.amount = attributes[:'amount']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'currency')
|
164
|
+
self.currency = attributes[:'currency']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.key?(:'metadata')
|
168
|
+
self.metadata = attributes[:'metadata']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'uri')
|
172
|
+
self.uri = attributes[:'uri']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'default')
|
176
|
+
self.default = attributes[:'default']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.key?(:'extra_channel_options')
|
180
|
+
self.extra_channel_options = attributes[:'extra_channel_options']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'payload')
|
184
|
+
self.payload = attributes[:'payload']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.key?(:'icon_url')
|
188
|
+
self.icon_url = attributes[:'icon_url']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.key?(:'size')
|
192
|
+
self.size = attributes[:'size']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.key?(:'fallback')
|
196
|
+
self.fallback = attributes[:'fallback']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.key?(:'open_on_receive')
|
200
|
+
self.open_on_receive = attributes[:'open_on_receive']
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
205
|
+
# @return Array for valid properties with the reasons
|
206
|
+
def list_invalid_properties
|
207
|
+
invalid_properties = Array.new
|
208
|
+
if @type.nil?
|
209
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
210
|
+
end
|
211
|
+
|
212
|
+
if @text.nil?
|
213
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
214
|
+
end
|
215
|
+
|
216
|
+
if @amount.nil?
|
217
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
218
|
+
end
|
219
|
+
|
220
|
+
if @uri.nil?
|
221
|
+
invalid_properties.push('invalid value for "uri", uri cannot be nil.')
|
222
|
+
end
|
223
|
+
|
224
|
+
if @payload.nil?
|
225
|
+
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
226
|
+
end
|
227
|
+
|
228
|
+
if @fallback.nil?
|
229
|
+
invalid_properties.push('invalid value for "fallback", fallback cannot be nil.')
|
230
|
+
end
|
231
|
+
|
232
|
+
invalid_properties
|
233
|
+
end
|
234
|
+
|
235
|
+
# Check to see if the all the properties in the model are valid
|
236
|
+
# @return true if the model is valid
|
237
|
+
def valid?
|
238
|
+
return false if @type.nil?
|
239
|
+
return false if @text.nil?
|
240
|
+
return false if @amount.nil?
|
241
|
+
return false if @uri.nil?
|
242
|
+
return false if @payload.nil?
|
243
|
+
size_validator = EnumAttributeValidator.new('String', ["compact", "tall", "full"])
|
244
|
+
return false unless size_validator.valid?(@size)
|
245
|
+
return false if @fallback.nil?
|
246
|
+
_one_of_found = false
|
247
|
+
self.class.openapi_one_of.each do |_class|
|
248
|
+
_one_of = SunshineConversationsClient.const_get(_class).build_from_hash(self.to_hash)
|
249
|
+
if _one_of.valid?
|
250
|
+
if _one_of_found
|
251
|
+
return false
|
252
|
+
else
|
253
|
+
_one_of_found = true
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
if !_one_of_found
|
259
|
+
return false
|
260
|
+
end
|
261
|
+
|
262
|
+
true
|
263
|
+
end
|
264
|
+
|
265
|
+
# Custom attribute writer method checking allowed values (enum).
|
266
|
+
# @param [Object] size Object to be assigned
|
267
|
+
def size=(size)
|
268
|
+
validator = EnumAttributeValidator.new('String', ["compact", "tall", "full"])
|
269
|
+
unless validator.valid?(size)
|
270
|
+
fail ArgumentError, "invalid value for \"size\", must be one of #{validator.allowable_values}."
|
271
|
+
end
|
272
|
+
@size = size
|
273
|
+
end
|
274
|
+
|
275
|
+
# Checks equality by comparing each attribute.
|
276
|
+
# @param [Object] Object to be compared
|
277
|
+
def ==(o)
|
278
|
+
return true if self.equal?(o)
|
279
|
+
self.class == o.class &&
|
280
|
+
type == o.type &&
|
281
|
+
text == o.text &&
|
282
|
+
amount == o.amount &&
|
283
|
+
currency == o.currency &&
|
284
|
+
metadata == o.metadata &&
|
285
|
+
uri == o.uri &&
|
286
|
+
default == o.default &&
|
287
|
+
extra_channel_options == o.extra_channel_options &&
|
288
|
+
payload == o.payload &&
|
289
|
+
icon_url == o.icon_url &&
|
290
|
+
size == o.size &&
|
291
|
+
fallback == o.fallback &&
|
292
|
+
open_on_receive == o.open_on_receive
|
293
|
+
end
|
294
|
+
|
295
|
+
# @see the `==` method
|
296
|
+
# @param [Object] Object to be compared
|
297
|
+
def eql?(o)
|
298
|
+
self == o
|
299
|
+
end
|
300
|
+
|
301
|
+
# Calculates hash code according to all attributes.
|
302
|
+
# @return [Integer] Hash code
|
303
|
+
def hash
|
304
|
+
[type, text, amount, currency, metadata, uri, default, extra_channel_options, payload, icon_url, size, fallback, open_on_receive].hash
|
305
|
+
end
|
306
|
+
|
307
|
+
# Builds the object from hash
|
308
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
309
|
+
# @return [Object] Returns the model itself
|
310
|
+
def self.build_from_hash(attributes)
|
311
|
+
new.build_from_hash(attributes)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Builds the object from hash
|
315
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
316
|
+
# @return [Object] Returns the model itself
|
317
|
+
def build_from_hash(attributes)
|
318
|
+
return nil unless attributes.is_a?(Hash)
|
319
|
+
self.class.openapi_types.each_pair do |key, type|
|
320
|
+
if type =~ /\AArray<(.*)>/i
|
321
|
+
# check to ensure the input is an array given that the attribute
|
322
|
+
# is documented as an array but the input is not
|
323
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
324
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
325
|
+
end
|
326
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
327
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
328
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
329
|
+
end
|
330
|
+
|
331
|
+
self
|
332
|
+
end
|
333
|
+
|
334
|
+
# Deserializes the data based on type
|
335
|
+
# @param string type Data type
|
336
|
+
# @param string value Value to be deserialized
|
337
|
+
# @return [Object] Deserialized data
|
338
|
+
def _deserialize(type, value)
|
339
|
+
case type.to_sym
|
340
|
+
when :DateTime
|
341
|
+
DateTime.parse(value)
|
342
|
+
when :Date
|
343
|
+
Date.parse(value)
|
344
|
+
when :String
|
345
|
+
value.to_s
|
346
|
+
when :Integer
|
347
|
+
value.to_i
|
348
|
+
when :Float
|
349
|
+
value.to_f
|
350
|
+
when :Boolean
|
351
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
352
|
+
true
|
353
|
+
else
|
354
|
+
false
|
355
|
+
end
|
356
|
+
when :Object
|
357
|
+
# generic object (usually a Hash), return directly
|
358
|
+
value
|
359
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
360
|
+
inner_type = Regexp.last_match[:inner_type]
|
361
|
+
value.map { |v| _deserialize(inner_type, v) }
|
362
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
363
|
+
k_type = Regexp.last_match[:k_type]
|
364
|
+
v_type = Regexp.last_match[:v_type]
|
365
|
+
{}.tap do |hash|
|
366
|
+
value.each do |k, v|
|
367
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
368
|
+
end
|
369
|
+
end
|
370
|
+
else # model
|
371
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
# Returns the string representation of the object
|
376
|
+
# @return [String] String presentation of the object
|
377
|
+
def to_s
|
378
|
+
to_hash.to_s
|
379
|
+
end
|
380
|
+
|
381
|
+
# to_body is an alias to to_hash (backward compatibility)
|
382
|
+
# @return [Hash] Returns the object in the form of hash
|
383
|
+
def to_body
|
384
|
+
to_hash
|
385
|
+
end
|
386
|
+
|
387
|
+
# Returns the object in the form of hash
|
388
|
+
# @return [Hash] Returns the object in the form of hash
|
389
|
+
def to_hash
|
390
|
+
hash = {}
|
391
|
+
self.class.attribute_map.each_pair do |attr, param|
|
392
|
+
value = self.send(attr)
|
393
|
+
if value.nil?
|
394
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
395
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
396
|
+
end
|
397
|
+
|
398
|
+
hash[param] = _to_hash(value)
|
399
|
+
end
|
400
|
+
hash
|
401
|
+
end
|
402
|
+
|
403
|
+
# Outputs non-array value in the form of hash
|
404
|
+
# For object, use to_hash. Otherwise, just return the value
|
405
|
+
# @param [Object] value Any valid value
|
406
|
+
# @return [Hash] Returns the value in the form of hash
|
407
|
+
def _to_hash(value)
|
408
|
+
if value.is_a?(Array)
|
409
|
+
value.compact.map { |v| _to_hash(v) }
|
410
|
+
elsif value.is_a?(Hash)
|
411
|
+
{}.tap do |hash|
|
412
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
413
|
+
end
|
414
|
+
elsif value.respond_to? :to_hash
|
415
|
+
value.to_hash
|
416
|
+
else
|
417
|
+
value
|
418
|
+
end
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
@@ -0,0 +1,409 @@
|
|
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 ActionSubset
|
14
|
+
# The type of action.
|
15
|
+
attr_accessor :type
|
16
|
+
|
17
|
+
# The button text.
|
18
|
+
attr_accessor :text
|
19
|
+
|
20
|
+
# The amount being charged. It needs to be specified in cents and is an integer (9.99$ -> 999).
|
21
|
+
attr_accessor :amount
|
22
|
+
|
23
|
+
# An ISO 4217 standard currency code in lowercase. Used for actions of type buy.
|
24
|
+
attr_accessor :currency
|
25
|
+
|
26
|
+
# 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.
|
27
|
+
attr_accessor :metadata
|
28
|
+
|
29
|
+
# The webview URI. This is the URI that will open in the webview when clicking the button.
|
30
|
+
attr_accessor :uri
|
31
|
+
|
32
|
+
# Boolean value indicating whether the action is the default action for a message item in Facebook Messenger.
|
33
|
+
attr_accessor :default
|
34
|
+
|
35
|
+
attr_accessor :extra_channel_options
|
36
|
+
|
37
|
+
# The payload of a postback or reply button.
|
38
|
+
attr_accessor :payload
|
39
|
+
|
40
|
+
# The size to display a webview. Used for actions of type webview.
|
41
|
+
attr_accessor :size
|
42
|
+
|
43
|
+
# The fallback uri for channels that don’t support webviews. Used for actions of type webview.
|
44
|
+
attr_accessor :fallback
|
45
|
+
|
46
|
+
# Boolean value indicating if the webview should open automatically. Only one action per message can be set to true. Currently only supported on the Web Messenger.
|
47
|
+
attr_accessor :open_on_receive
|
48
|
+
|
49
|
+
class EnumAttributeValidator
|
50
|
+
attr_reader :datatype
|
51
|
+
attr_reader :allowable_values
|
52
|
+
|
53
|
+
def initialize(datatype, allowable_values)
|
54
|
+
@allowable_values = allowable_values.map do |value|
|
55
|
+
case datatype.to_s
|
56
|
+
when /Integer/i
|
57
|
+
value.to_i
|
58
|
+
when /Float/i
|
59
|
+
value.to_f
|
60
|
+
else
|
61
|
+
value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def valid?(value)
|
67
|
+
!value || allowable_values.include?(value)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
72
|
+
def self.attribute_map
|
73
|
+
{
|
74
|
+
:'type' => :'type',
|
75
|
+
:'text' => :'text',
|
76
|
+
:'amount' => :'amount',
|
77
|
+
:'currency' => :'currency',
|
78
|
+
:'metadata' => :'metadata',
|
79
|
+
:'uri' => :'uri',
|
80
|
+
:'default' => :'default',
|
81
|
+
:'extra_channel_options' => :'extraChannelOptions',
|
82
|
+
:'payload' => :'payload',
|
83
|
+
:'size' => :'size',
|
84
|
+
:'fallback' => :'fallback',
|
85
|
+
:'open_on_receive' => :'openOnReceive'
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
# Attribute type mapping.
|
90
|
+
def self.openapi_types
|
91
|
+
{
|
92
|
+
:'type' => :'String',
|
93
|
+
:'text' => :'String',
|
94
|
+
:'amount' => :'Integer',
|
95
|
+
:'currency' => :'String',
|
96
|
+
:'metadata' => :'Object',
|
97
|
+
:'uri' => :'String',
|
98
|
+
:'default' => :'Boolean',
|
99
|
+
:'extra_channel_options' => :'ExtraChannelOptions',
|
100
|
+
:'payload' => :'String',
|
101
|
+
:'size' => :'String',
|
102
|
+
:'fallback' => :'String',
|
103
|
+
:'open_on_receive' => :'Boolean'
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
# List of attributes with nullable: true
|
108
|
+
def self.openapi_nullable
|
109
|
+
Set.new([
|
110
|
+
:'metadata',
|
111
|
+
])
|
112
|
+
end
|
113
|
+
|
114
|
+
# List of class defined in oneOf (OpenAPI v3)
|
115
|
+
def self.openapi_one_of
|
116
|
+
[
|
117
|
+
:'Buy',
|
118
|
+
:'Link',
|
119
|
+
:'Postback',
|
120
|
+
:'Webview'
|
121
|
+
]
|
122
|
+
end
|
123
|
+
|
124
|
+
# discriminator's property name in OpenAPI v3
|
125
|
+
def self.openapi_discriminator_name
|
126
|
+
:'type'
|
127
|
+
end
|
128
|
+
|
129
|
+
# Initializes the object
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
def initialize(attributes = {})
|
132
|
+
if (!attributes.is_a?(Hash))
|
133
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SunshineConversationsClient::ActionSubset` initialize method"
|
134
|
+
end
|
135
|
+
|
136
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
137
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
138
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
139
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SunshineConversationsClient::ActionSubset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
140
|
+
end
|
141
|
+
h[k.to_sym] = v
|
142
|
+
}
|
143
|
+
|
144
|
+
if attributes.key?(:'type')
|
145
|
+
self.type = attributes[:'type']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'text')
|
149
|
+
self.text = attributes[:'text']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'amount')
|
153
|
+
self.amount = attributes[:'amount']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'currency')
|
157
|
+
self.currency = attributes[:'currency']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'metadata')
|
161
|
+
self.metadata = attributes[:'metadata']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'uri')
|
165
|
+
self.uri = attributes[:'uri']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes.key?(:'default')
|
169
|
+
self.default = attributes[:'default']
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.key?(:'extra_channel_options')
|
173
|
+
self.extra_channel_options = attributes[:'extra_channel_options']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.key?(:'payload')
|
177
|
+
self.payload = attributes[:'payload']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.key?(:'size')
|
181
|
+
self.size = attributes[:'size']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.key?(:'fallback')
|
185
|
+
self.fallback = attributes[:'fallback']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.key?(:'open_on_receive')
|
189
|
+
self.open_on_receive = attributes[:'open_on_receive']
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
194
|
+
# @return Array for valid properties with the reasons
|
195
|
+
def list_invalid_properties
|
196
|
+
invalid_properties = Array.new
|
197
|
+
if @type.nil?
|
198
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
199
|
+
end
|
200
|
+
|
201
|
+
if @text.nil?
|
202
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
203
|
+
end
|
204
|
+
|
205
|
+
if @amount.nil?
|
206
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
207
|
+
end
|
208
|
+
|
209
|
+
if @uri.nil?
|
210
|
+
invalid_properties.push('invalid value for "uri", uri cannot be nil.')
|
211
|
+
end
|
212
|
+
|
213
|
+
if @payload.nil?
|
214
|
+
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
215
|
+
end
|
216
|
+
|
217
|
+
if @fallback.nil?
|
218
|
+
invalid_properties.push('invalid value for "fallback", fallback cannot be nil.')
|
219
|
+
end
|
220
|
+
|
221
|
+
invalid_properties
|
222
|
+
end
|
223
|
+
|
224
|
+
# Check to see if the all the properties in the model are valid
|
225
|
+
# @return true if the model is valid
|
226
|
+
def valid?
|
227
|
+
return false if @type.nil?
|
228
|
+
return false if @text.nil?
|
229
|
+
return false if @amount.nil?
|
230
|
+
return false if @uri.nil?
|
231
|
+
return false if @payload.nil?
|
232
|
+
size_validator = EnumAttributeValidator.new('String', ["compact", "tall", "full"])
|
233
|
+
return false unless size_validator.valid?(@size)
|
234
|
+
return false if @fallback.nil?
|
235
|
+
_one_of_found = false
|
236
|
+
self.class.openapi_one_of.each do |_class|
|
237
|
+
_one_of = SunshineConversationsClient.const_get(_class).build_from_hash(self.to_hash)
|
238
|
+
if _one_of.valid?
|
239
|
+
if _one_of_found
|
240
|
+
return false
|
241
|
+
else
|
242
|
+
_one_of_found = true
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
if !_one_of_found
|
248
|
+
return false
|
249
|
+
end
|
250
|
+
|
251
|
+
true
|
252
|
+
end
|
253
|
+
|
254
|
+
# Custom attribute writer method checking allowed values (enum).
|
255
|
+
# @param [Object] size Object to be assigned
|
256
|
+
def size=(size)
|
257
|
+
validator = EnumAttributeValidator.new('String', ["compact", "tall", "full"])
|
258
|
+
unless validator.valid?(size)
|
259
|
+
fail ArgumentError, "invalid value for \"size\", must be one of #{validator.allowable_values}."
|
260
|
+
end
|
261
|
+
@size = size
|
262
|
+
end
|
263
|
+
|
264
|
+
# Checks equality by comparing each attribute.
|
265
|
+
# @param [Object] Object to be compared
|
266
|
+
def ==(o)
|
267
|
+
return true if self.equal?(o)
|
268
|
+
self.class == o.class &&
|
269
|
+
type == o.type &&
|
270
|
+
text == o.text &&
|
271
|
+
amount == o.amount &&
|
272
|
+
currency == o.currency &&
|
273
|
+
metadata == o.metadata &&
|
274
|
+
uri == o.uri &&
|
275
|
+
default == o.default &&
|
276
|
+
extra_channel_options == o.extra_channel_options &&
|
277
|
+
payload == o.payload &&
|
278
|
+
size == o.size &&
|
279
|
+
fallback == o.fallback &&
|
280
|
+
open_on_receive == o.open_on_receive
|
281
|
+
end
|
282
|
+
|
283
|
+
# @see the `==` method
|
284
|
+
# @param [Object] Object to be compared
|
285
|
+
def eql?(o)
|
286
|
+
self == o
|
287
|
+
end
|
288
|
+
|
289
|
+
# Calculates hash code according to all attributes.
|
290
|
+
# @return [Integer] Hash code
|
291
|
+
def hash
|
292
|
+
[type, text, amount, currency, metadata, uri, default, extra_channel_options, payload, size, fallback, open_on_receive].hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Builds the object from hash
|
296
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
297
|
+
# @return [Object] Returns the model itself
|
298
|
+
def self.build_from_hash(attributes)
|
299
|
+
new.build_from_hash(attributes)
|
300
|
+
end
|
301
|
+
|
302
|
+
# Builds the object from hash
|
303
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
304
|
+
# @return [Object] Returns the model itself
|
305
|
+
def build_from_hash(attributes)
|
306
|
+
return nil unless attributes.is_a?(Hash)
|
307
|
+
self.class.openapi_types.each_pair do |key, type|
|
308
|
+
if type =~ /\AArray<(.*)>/i
|
309
|
+
# check to ensure the input is an array given that the attribute
|
310
|
+
# is documented as an array but the input is not
|
311
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
312
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
313
|
+
end
|
314
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
315
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
316
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
317
|
+
end
|
318
|
+
|
319
|
+
self
|
320
|
+
end
|
321
|
+
|
322
|
+
# Deserializes the data based on type
|
323
|
+
# @param string type Data type
|
324
|
+
# @param string value Value to be deserialized
|
325
|
+
# @return [Object] Deserialized data
|
326
|
+
def _deserialize(type, value)
|
327
|
+
case type.to_sym
|
328
|
+
when :DateTime
|
329
|
+
DateTime.parse(value)
|
330
|
+
when :Date
|
331
|
+
Date.parse(value)
|
332
|
+
when :String
|
333
|
+
value.to_s
|
334
|
+
when :Integer
|
335
|
+
value.to_i
|
336
|
+
when :Float
|
337
|
+
value.to_f
|
338
|
+
when :Boolean
|
339
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
340
|
+
true
|
341
|
+
else
|
342
|
+
false
|
343
|
+
end
|
344
|
+
when :Object
|
345
|
+
# generic object (usually a Hash), return directly
|
346
|
+
value
|
347
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
348
|
+
inner_type = Regexp.last_match[:inner_type]
|
349
|
+
value.map { |v| _deserialize(inner_type, v) }
|
350
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
351
|
+
k_type = Regexp.last_match[:k_type]
|
352
|
+
v_type = Regexp.last_match[:v_type]
|
353
|
+
{}.tap do |hash|
|
354
|
+
value.each do |k, v|
|
355
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
356
|
+
end
|
357
|
+
end
|
358
|
+
else # model
|
359
|
+
SunshineConversationsClient.const_get(type).build_from_hash(value)
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
# Returns the string representation of the object
|
364
|
+
# @return [String] String presentation of the object
|
365
|
+
def to_s
|
366
|
+
to_hash.to_s
|
367
|
+
end
|
368
|
+
|
369
|
+
# to_body is an alias to to_hash (backward compatibility)
|
370
|
+
# @return [Hash] Returns the object in the form of hash
|
371
|
+
def to_body
|
372
|
+
to_hash
|
373
|
+
end
|
374
|
+
|
375
|
+
# Returns the object in the form of hash
|
376
|
+
# @return [Hash] Returns the object in the form of hash
|
377
|
+
def to_hash
|
378
|
+
hash = {}
|
379
|
+
self.class.attribute_map.each_pair do |attr, param|
|
380
|
+
value = self.send(attr)
|
381
|
+
if value.nil?
|
382
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
383
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
384
|
+
end
|
385
|
+
|
386
|
+
hash[param] = _to_hash(value)
|
387
|
+
end
|
388
|
+
hash
|
389
|
+
end
|
390
|
+
|
391
|
+
# Outputs non-array value in the form of hash
|
392
|
+
# For object, use to_hash. Otherwise, just return the value
|
393
|
+
# @param [Object] value Any valid value
|
394
|
+
# @return [Hash] Returns the value in the form of hash
|
395
|
+
def _to_hash(value)
|
396
|
+
if value.is_a?(Array)
|
397
|
+
value.compact.map { |v| _to_hash(v) }
|
398
|
+
elsif value.is_a?(Hash)
|
399
|
+
{}.tap do |hash|
|
400
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
401
|
+
end
|
402
|
+
elsif value.respond_to? :to_hash
|
403
|
+
value.to_hash
|
404
|
+
else
|
405
|
+
value
|
406
|
+
end
|
407
|
+
end
|
408
|
+
end
|
409
|
+
end
|