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,213 @@
|
|
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 'cgi'
|
11
|
+
|
12
|
+
module SunshineConversationsClient
|
13
|
+
class OAuthEndpointsApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Authorize
|
20
|
+
# This endpoint begins the OAuth flow. It relies on a browser session for authentication. If the user is not logged in to Sunshine Conversations they will be redirected to the login page. If the user has many apps, they will first be prompted to select the one they wish to integrate with. They will then be presented with an Allow/Deny dialog, describing details of the access your integration is requesting.
|
21
|
+
# @param client_id [String] Your integration’s unique identifier
|
22
|
+
# @param response_type [String] For now the only acceptable value is code.
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [String] :state You may pass in any arbitrary string value here which will be returned to you along with the code via browser redirect.
|
25
|
+
# @option opts [String] :redirect_uri You may pass in a redirect_uri to determine which URI the response is redirected to. This URI must be contained in the list configured by your integration. If this option is not passed, the first URI present in the list will be used.
|
26
|
+
# @return [nil]
|
27
|
+
def authorize(client_id, response_type, opts = {})
|
28
|
+
authorize_with_http_info(client_id, response_type, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Authorize
|
33
|
+
# This endpoint begins the OAuth flow. It relies on a browser session for authentication. If the user is not logged in to Sunshine Conversations they will be redirected to the login page. If the user has many apps, they will first be prompted to select the one they wish to integrate with. They will then be presented with an Allow/Deny dialog, describing details of the access your integration is requesting.
|
34
|
+
# @param client_id [String] Your integration’s unique identifier
|
35
|
+
# @param response_type [String] For now the only acceptable value is code.
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :state You may pass in any arbitrary string value here which will be returned to you along with the code via browser redirect.
|
38
|
+
# @option opts [String] :redirect_uri You may pass in a redirect_uri to determine which URI the response is redirected to. This URI must be contained in the list configured by your integration. If this option is not passed, the first URI present in the list will be used.
|
39
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
40
|
+
def authorize_with_http_info(client_id, response_type, opts = {})
|
41
|
+
if @api_client.config.debugging
|
42
|
+
@api_client.config.logger.debug 'Calling API: OAuthEndpointsApi.authorize ...'
|
43
|
+
end
|
44
|
+
# verify the required parameter 'client_id' is set
|
45
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling OAuthEndpointsApi.authorize"
|
47
|
+
end
|
48
|
+
# verify the required parameter 'response_type' is set
|
49
|
+
if @api_client.config.client_side_validation && response_type.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'response_type' when calling OAuthEndpointsApi.authorize"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = '/oauth/authorize'
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = opts[:query_params] || {}
|
57
|
+
query_params[:'client_id'] = client_id
|
58
|
+
query_params[:'response_type'] = response_type
|
59
|
+
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
60
|
+
query_params[:'redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
|
61
|
+
|
62
|
+
# header parameters
|
63
|
+
header_params = opts[:header_params] || {}
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = opts[:form_params] || {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = opts[:body]
|
70
|
+
|
71
|
+
# return_type
|
72
|
+
return_type = opts[:return_type]
|
73
|
+
|
74
|
+
# auth_names
|
75
|
+
auth_names = opts[:auth_names] || []
|
76
|
+
|
77
|
+
new_options = opts.merge(
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: OAuthEndpointsApi#authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
93
|
+
# Get Token
|
94
|
+
# This endpoint is used to exchange an authorization code for an access token. It should only be used in server-to-server calls.
|
95
|
+
# @param inline_object [InlineObject]
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Object]
|
98
|
+
def get_token(inline_object, opts = {})
|
99
|
+
data, _status_code, _headers = get_token_with_http_info(inline_object, opts)
|
100
|
+
data
|
101
|
+
end
|
102
|
+
|
103
|
+
# Get Token
|
104
|
+
# This endpoint is used to exchange an authorization code for an access token. It should only be used in server-to-server calls.
|
105
|
+
# @param inline_object [InlineObject]
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
108
|
+
def get_token_with_http_info(inline_object, opts = {})
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug 'Calling API: OAuthEndpointsApi.get_token ...'
|
111
|
+
end
|
112
|
+
# verify the required parameter 'inline_object' is set
|
113
|
+
if @api_client.config.client_side_validation && inline_object.nil?
|
114
|
+
fail ArgumentError, "Missing the required parameter 'inline_object' when calling OAuthEndpointsApi.get_token"
|
115
|
+
end
|
116
|
+
# resource path
|
117
|
+
local_var_path = '/oauth/token'
|
118
|
+
|
119
|
+
# query parameters
|
120
|
+
query_params = opts[:query_params] || {}
|
121
|
+
|
122
|
+
# header parameters
|
123
|
+
header_params = opts[:header_params] || {}
|
124
|
+
# HTTP header 'Accept' (if needed)
|
125
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
126
|
+
# HTTP header 'Content-Type'
|
127
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = opts[:form_params] || {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = opts[:body] || @api_client.object_to_http_body(inline_object)
|
134
|
+
|
135
|
+
# return_type
|
136
|
+
return_type = opts[:return_type] || 'Object'
|
137
|
+
|
138
|
+
# auth_names
|
139
|
+
auth_names = opts[:auth_names] || []
|
140
|
+
|
141
|
+
new_options = opts.merge(
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type
|
148
|
+
)
|
149
|
+
|
150
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: OAuthEndpointsApi#get_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# Revoke Access
|
158
|
+
# This endpoint is used to revoke your integration’s access to the user’s Sunshine Conversations app. Revoking access means your integration will no longer be able to interact with the app, and any webhooks the integration had previously configured will be removed. Calling this endpoint is equivalent to the user removing your integration manually in the Sunshine Conversations web app. Your integration’s `removeUrl` (if configured) will also be called when an integration is removed in this way.
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @return [Object]
|
161
|
+
def revoke_access(opts = {})
|
162
|
+
data, _status_code, _headers = revoke_access_with_http_info(opts)
|
163
|
+
data
|
164
|
+
end
|
165
|
+
|
166
|
+
# Revoke Access
|
167
|
+
# This endpoint is used to revoke your integration’s access to the user’s Sunshine Conversations app. Revoking access means your integration will no longer be able to interact with the app, and any webhooks the integration had previously configured will be removed. Calling this endpoint is equivalent to the user removing your integration manually in the Sunshine Conversations web app. Your integration’s `removeUrl` (if configured) will also be called when an integration is removed in this way.
|
168
|
+
# @param [Hash] opts the optional parameters
|
169
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
170
|
+
def revoke_access_with_http_info(opts = {})
|
171
|
+
if @api_client.config.debugging
|
172
|
+
@api_client.config.logger.debug 'Calling API: OAuthEndpointsApi.revoke_access ...'
|
173
|
+
end
|
174
|
+
# resource path
|
175
|
+
local_var_path = '/oauth/authorization'
|
176
|
+
|
177
|
+
# query parameters
|
178
|
+
query_params = opts[:query_params] || {}
|
179
|
+
|
180
|
+
# header parameters
|
181
|
+
header_params = opts[:header_params] || {}
|
182
|
+
# HTTP header 'Accept' (if needed)
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
184
|
+
|
185
|
+
# form parameters
|
186
|
+
form_params = opts[:form_params] || {}
|
187
|
+
|
188
|
+
# http body (model)
|
189
|
+
post_body = opts[:body]
|
190
|
+
|
191
|
+
# return_type
|
192
|
+
return_type = opts[:return_type] || 'Object'
|
193
|
+
|
194
|
+
# auth_names
|
195
|
+
auth_names = opts[:auth_names] || ['basicAuth', 'bearerAuth']
|
196
|
+
|
197
|
+
new_options = opts.merge(
|
198
|
+
:header_params => header_params,
|
199
|
+
:query_params => query_params,
|
200
|
+
:form_params => form_params,
|
201
|
+
:body => post_body,
|
202
|
+
:auth_names => auth_names,
|
203
|
+
:return_type => return_type
|
204
|
+
)
|
205
|
+
|
206
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
207
|
+
if @api_client.config.debugging
|
208
|
+
@api_client.config.logger.debug "API called: OAuthEndpointsApi#revoke_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
209
|
+
end
|
210
|
+
return data, status_code, headers
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
@@ -0,0 +1,242 @@
|
|
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 'cgi'
|
11
|
+
|
12
|
+
module SunshineConversationsClient
|
13
|
+
class ParticipantsApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Join Conversation
|
20
|
+
# Adds a user to a conversation using either their userId or userExternalId. The endpoint only supports adding a participant to a sdkGroup conversation.
|
21
|
+
# @param app_id [String] Identifies the app.
|
22
|
+
# @param conversation_id [String] Identifies the conversation.
|
23
|
+
# @param participant_join_body [ParticipantJoinBody]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [ParticipantResponse]
|
26
|
+
def join_conversation(app_id, conversation_id, participant_join_body, opts = {})
|
27
|
+
data, _status_code, _headers = join_conversation_with_http_info(app_id, conversation_id, participant_join_body, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Join Conversation
|
32
|
+
# Adds a user to a conversation using either their userId or userExternalId. The endpoint only supports adding a participant to a sdkGroup conversation.
|
33
|
+
# @param app_id [String] Identifies the app.
|
34
|
+
# @param conversation_id [String] Identifies the conversation.
|
35
|
+
# @param participant_join_body [ParticipantJoinBody]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(ParticipantResponse, Integer, Hash)>] ParticipantResponse data, response status code and response headers
|
38
|
+
def join_conversation_with_http_info(app_id, conversation_id, participant_join_body, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug 'Calling API: ParticipantsApi.join_conversation ...'
|
41
|
+
end
|
42
|
+
# verify the required parameter 'app_id' is set
|
43
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ParticipantsApi.join_conversation"
|
45
|
+
end
|
46
|
+
# verify the required parameter 'conversation_id' is set
|
47
|
+
if @api_client.config.client_side_validation && conversation_id.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ParticipantsApi.join_conversation"
|
49
|
+
end
|
50
|
+
# verify the required parameter 'participant_join_body' is set
|
51
|
+
if @api_client.config.client_side_validation && participant_join_body.nil?
|
52
|
+
fail ArgumentError, "Missing the required parameter 'participant_join_body' when calling ParticipantsApi.join_conversation"
|
53
|
+
end
|
54
|
+
# resource path
|
55
|
+
local_var_path = '/v2/apps/{appId}/conversations/{conversationId}/join'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s))
|
56
|
+
|
57
|
+
# query parameters
|
58
|
+
query_params = opts[:query_params] || {}
|
59
|
+
|
60
|
+
# header parameters
|
61
|
+
header_params = opts[:header_params] || {}
|
62
|
+
# HTTP header 'Accept' (if needed)
|
63
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
64
|
+
# HTTP header 'Content-Type'
|
65
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
66
|
+
|
67
|
+
# form parameters
|
68
|
+
form_params = opts[:form_params] || {}
|
69
|
+
|
70
|
+
# http body (model)
|
71
|
+
post_body = opts[:body] || @api_client.object_to_http_body(participant_join_body)
|
72
|
+
|
73
|
+
# return_type
|
74
|
+
return_type = opts[:return_type] || 'ParticipantResponse'
|
75
|
+
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:auth_names] || ['basicAuth', 'bearerAuth']
|
78
|
+
|
79
|
+
new_options = opts.merge(
|
80
|
+
:header_params => header_params,
|
81
|
+
:query_params => query_params,
|
82
|
+
:form_params => form_params,
|
83
|
+
:body => post_body,
|
84
|
+
:auth_names => auth_names,
|
85
|
+
:return_type => return_type
|
86
|
+
)
|
87
|
+
|
88
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: ParticipantsApi#join_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
95
|
+
# Leave Conversation
|
96
|
+
# Removes a user from a conversation using either their userId, userExternalId, or participantId.
|
97
|
+
# @param app_id [String] Identifies the app.
|
98
|
+
# @param conversation_id [String] Identifies the conversation.
|
99
|
+
# @param participant_leave_body [ParticipantLeaveBody]
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [Object]
|
102
|
+
def leave_conversation(app_id, conversation_id, participant_leave_body, opts = {})
|
103
|
+
data, _status_code, _headers = leave_conversation_with_http_info(app_id, conversation_id, participant_leave_body, opts)
|
104
|
+
data
|
105
|
+
end
|
106
|
+
|
107
|
+
# Leave Conversation
|
108
|
+
# Removes a user from a conversation using either their userId, userExternalId, or participantId.
|
109
|
+
# @param app_id [String] Identifies the app.
|
110
|
+
# @param conversation_id [String] Identifies the conversation.
|
111
|
+
# @param participant_leave_body [ParticipantLeaveBody]
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
114
|
+
def leave_conversation_with_http_info(app_id, conversation_id, participant_leave_body, opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug 'Calling API: ParticipantsApi.leave_conversation ...'
|
117
|
+
end
|
118
|
+
# verify the required parameter 'app_id' is set
|
119
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ParticipantsApi.leave_conversation"
|
121
|
+
end
|
122
|
+
# verify the required parameter 'conversation_id' is set
|
123
|
+
if @api_client.config.client_side_validation && conversation_id.nil?
|
124
|
+
fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ParticipantsApi.leave_conversation"
|
125
|
+
end
|
126
|
+
# verify the required parameter 'participant_leave_body' is set
|
127
|
+
if @api_client.config.client_side_validation && participant_leave_body.nil?
|
128
|
+
fail ArgumentError, "Missing the required parameter 'participant_leave_body' when calling ParticipantsApi.leave_conversation"
|
129
|
+
end
|
130
|
+
# resource path
|
131
|
+
local_var_path = '/v2/apps/{appId}/conversations/{conversationId}/leave'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s))
|
132
|
+
|
133
|
+
# query parameters
|
134
|
+
query_params = opts[:query_params] || {}
|
135
|
+
|
136
|
+
# header parameters
|
137
|
+
header_params = opts[:header_params] || {}
|
138
|
+
# HTTP header 'Accept' (if needed)
|
139
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
140
|
+
# HTTP header 'Content-Type'
|
141
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
142
|
+
|
143
|
+
# form parameters
|
144
|
+
form_params = opts[:form_params] || {}
|
145
|
+
|
146
|
+
# http body (model)
|
147
|
+
post_body = opts[:body] || @api_client.object_to_http_body(participant_leave_body)
|
148
|
+
|
149
|
+
# return_type
|
150
|
+
return_type = opts[:return_type] || 'Object'
|
151
|
+
|
152
|
+
# auth_names
|
153
|
+
auth_names = opts[:auth_names] || ['basicAuth', 'bearerAuth']
|
154
|
+
|
155
|
+
new_options = opts.merge(
|
156
|
+
:header_params => header_params,
|
157
|
+
:query_params => query_params,
|
158
|
+
:form_params => form_params,
|
159
|
+
:body => post_body,
|
160
|
+
:auth_names => auth_names,
|
161
|
+
:return_type => return_type
|
162
|
+
)
|
163
|
+
|
164
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug "API called: ParticipantsApi#leave_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
167
|
+
end
|
168
|
+
return data, status_code, headers
|
169
|
+
end
|
170
|
+
|
171
|
+
# List Participants
|
172
|
+
# Lists all the participants of a particular conversation. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). ```shell /v2/apps/:appId/conversations/:conversationId/participants?page[before]=26508c10541a4b0ff472e5e2 ```
|
173
|
+
# @param app_id [String] Identifies the app.
|
174
|
+
# @param conversation_id [String] Identifies the conversation.
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [Page] :page Contains parameters for applying cursor pagination.
|
177
|
+
# @return [ParticipantListResponse]
|
178
|
+
def list_participants(app_id, conversation_id, opts = {})
|
179
|
+
data, _status_code, _headers = list_participants_with_http_info(app_id, conversation_id, opts)
|
180
|
+
data
|
181
|
+
end
|
182
|
+
|
183
|
+
# List Participants
|
184
|
+
# Lists all the participants of a particular conversation. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). ```shell /v2/apps/:appId/conversations/:conversationId/participants?page[before]=26508c10541a4b0ff472e5e2 ```
|
185
|
+
# @param app_id [String] Identifies the app.
|
186
|
+
# @param conversation_id [String] Identifies the conversation.
|
187
|
+
# @param [Hash] opts the optional parameters
|
188
|
+
# @option opts [Page] :page Contains parameters for applying cursor pagination.
|
189
|
+
# @return [Array<(ParticipantListResponse, Integer, Hash)>] ParticipantListResponse data, response status code and response headers
|
190
|
+
def list_participants_with_http_info(app_id, conversation_id, opts = {})
|
191
|
+
if @api_client.config.debugging
|
192
|
+
@api_client.config.logger.debug 'Calling API: ParticipantsApi.list_participants ...'
|
193
|
+
end
|
194
|
+
# verify the required parameter 'app_id' is set
|
195
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
196
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ParticipantsApi.list_participants"
|
197
|
+
end
|
198
|
+
# verify the required parameter 'conversation_id' is set
|
199
|
+
if @api_client.config.client_side_validation && conversation_id.nil?
|
200
|
+
fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ParticipantsApi.list_participants"
|
201
|
+
end
|
202
|
+
# resource path
|
203
|
+
local_var_path = '/v2/apps/{appId}/conversations/{conversationId}/participants'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s))
|
204
|
+
|
205
|
+
# query parameters
|
206
|
+
query_params = opts[:query_params] || {}
|
207
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
208
|
+
|
209
|
+
# header parameters
|
210
|
+
header_params = opts[:header_params] || {}
|
211
|
+
# HTTP header 'Accept' (if needed)
|
212
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
213
|
+
|
214
|
+
# form parameters
|
215
|
+
form_params = opts[:form_params] || {}
|
216
|
+
|
217
|
+
# http body (model)
|
218
|
+
post_body = opts[:body]
|
219
|
+
|
220
|
+
# return_type
|
221
|
+
return_type = opts[:return_type] || 'ParticipantListResponse'
|
222
|
+
|
223
|
+
# auth_names
|
224
|
+
auth_names = opts[:auth_names] || ['basicAuth', 'bearerAuth']
|
225
|
+
|
226
|
+
new_options = opts.merge(
|
227
|
+
:header_params => header_params,
|
228
|
+
:query_params => query_params,
|
229
|
+
:form_params => form_params,
|
230
|
+
:body => post_body,
|
231
|
+
:auth_names => auth_names,
|
232
|
+
:return_type => return_type
|
233
|
+
)
|
234
|
+
|
235
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
236
|
+
if @api_client.config.debugging
|
237
|
+
@api_client.config.logger.debug "API called: ParticipantsApi#list_participants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
238
|
+
end
|
239
|
+
return data, status_code, headers
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|