├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── config.yml └── workflows │ ├── pr-lint.yml │ └── test-and-deploy.yml ├── .gitignore ├── CHANGES.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── Doxyfile ├── ISSUE_TEMPLATE.md ├── LICENSE ├── Makefile ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── TROUBLESHOOTING.md ├── Twilio.sln ├── UPGRADE.md ├── VERSIONS.md ├── advanced-examples └── custom-http-client.md ├── examples ├── BearerTokenAuthentication.md ├── ListMessages.md └── PublicOAuthAuthentication.md ├── global.json ├── src └── Twilio │ ├── Annotations │ ├── Beta.cs │ ├── Deprecated.cs │ └── Preview.cs │ ├── AuthStrategies │ ├── AuthStrategy.cs │ ├── Base64UrlEncode.cs │ ├── BasicAuthStrategy.cs │ ├── NoAuthStrategy.cs │ └── TokenAuthStrategy.cs │ ├── Base │ ├── BearerToken │ │ └── TokenResourceSet.cs │ ├── IOptions.cs │ ├── Page.cs │ ├── Resource.cs │ └── ResourceSet.cs │ ├── Clients │ ├── Base64UrlEncoder.cs │ ├── BearerToken │ │ └── TwilioOrgsTokenRestClient.cs │ ├── ITwilioRestClient.cs │ ├── NoAuth │ │ └── TwilioNoAuthRestClient.cs │ └── TwilioRestClient.cs │ ├── Constant │ └── EnumConstants.cs │ ├── Converters │ ├── CustomConverters.cs │ ├── HttpMethodConverter.cs │ ├── MarshalConverter.cs │ ├── PhoneNumberConverter.cs │ ├── PrefixedCollapsibleMap.cs │ ├── Promoter.cs │ ├── Serializers.cs │ ├── StringEnumConverter.cs │ └── TwimlConverter.cs │ ├── Credential │ ├── ClientCredentialProvider.cs │ ├── CredentialProvider.cs │ └── OrgsCredentialProvider │ │ └── OrgsClientCredentialProvider.cs │ ├── Exceptions │ ├── ApiException.cs │ ├── CertificateValidationException.cs │ ├── RestException.cs │ └── TwilioException.cs │ ├── Http │ ├── BearerToken │ │ ├── ApiTokenManager.cs │ │ ├── OrgsTokenManager.cs │ │ ├── SystemNetTokenHttpClient.cs │ │ ├── TokenHttpClient.cs │ │ ├── TokenManager.cs │ │ └── TokenRequest.cs │ ├── HttpClient.cs │ ├── HttpMethod.cs │ ├── Net35 │ │ ├── WebBearerTokenRequestClient.cs │ │ ├── WebNoAuthRequestClient.cs │ │ ├── WebRequestClient.cs │ │ └── WebRequestWrappers.cs │ ├── NoAuth │ │ ├── NoAuthHttpClient.cs │ │ ├── NoAuthRequest.cs │ │ └── SystemNetNoAuthHttpClient.cs │ ├── Request.cs │ ├── Response.cs │ └── SystemNetHttpClient.cs │ ├── JWT │ ├── AccessToken │ │ ├── ChatGrant.cs │ │ ├── ConversationsGrant.cs │ │ ├── IGrant.cs │ │ ├── IpMessagingGrant.cs │ │ ├── PlaybackGrant.cs │ │ ├── SyncGrant.cs │ │ ├── TaskRouterGrant.cs │ │ ├── Token.cs │ │ ├── VideoGrant.cs │ │ └── VoiceGrant.cs │ ├── BaseJwt.cs │ ├── Client │ │ ├── ClientCapability.cs │ │ ├── EventStreamScope.cs │ │ ├── IScope.cs │ │ ├── IncomingClientScope.cs │ │ └── OutgoingClientScope.cs │ └── Taskrouter │ │ ├── Policy.cs │ │ ├── PolicyUtils.cs │ │ └── TaskRouterCapability.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Rest │ ├── Accounts │ │ └── V1 │ │ │ ├── AuthTokenPromotionOptions.cs │ │ │ ├── AuthTokenPromotionResource.cs │ │ │ ├── BulkConsentsOptions.cs │ │ │ ├── BulkConsentsResource.cs │ │ │ ├── BulkContactsOptions.cs │ │ │ ├── BulkContactsResource.cs │ │ │ ├── Credential │ │ │ ├── AwsOptions.cs │ │ │ ├── AwsResource.cs │ │ │ ├── PublicKeyOptions.cs │ │ │ └── PublicKeyResource.cs │ │ │ ├── SafelistOptions.cs │ │ │ ├── SafelistResource.cs │ │ │ ├── SecondaryAuthTokenOptions.cs │ │ │ └── SecondaryAuthTokenResource.cs │ ├── Api │ │ └── V2010 │ │ │ ├── Account │ │ │ ├── Address │ │ │ │ ├── DependentPhoneNumberOptions.cs │ │ │ │ └── DependentPhoneNumberResource.cs │ │ │ ├── AddressOptions.cs │ │ │ ├── AddressResource.cs │ │ │ ├── ApplicationOptions.cs │ │ │ ├── ApplicationResource.cs │ │ │ ├── AuthorizedConnectAppOptions.cs │ │ │ ├── AuthorizedConnectAppResource.cs │ │ │ ├── AvailablePhoneNumberCountry │ │ │ │ ├── LocalOptions.cs │ │ │ │ ├── LocalResource.cs │ │ │ │ ├── MachineToMachineOptions.cs │ │ │ │ ├── MachineToMachineResource.cs │ │ │ │ ├── MobileOptions.cs │ │ │ │ ├── MobileResource.cs │ │ │ │ ├── NationalOptions.cs │ │ │ │ ├── NationalResource.cs │ │ │ │ ├── SharedCostOptions.cs │ │ │ │ ├── SharedCostResource.cs │ │ │ │ ├── TollFreeOptions.cs │ │ │ │ ├── TollFreeResource.cs │ │ │ │ ├── VoipOptions.cs │ │ │ │ └── VoipResource.cs │ │ │ ├── AvailablePhoneNumberCountryOptions.cs │ │ │ ├── AvailablePhoneNumberCountryResource.cs │ │ │ ├── BalanceOptions.cs │ │ │ ├── BalanceResource.cs │ │ │ ├── Call │ │ │ │ ├── EventOptions.cs │ │ │ │ ├── EventResource.cs │ │ │ │ ├── NotificationOptions.cs │ │ │ │ ├── NotificationResource.cs │ │ │ │ ├── PaymentOptions.cs │ │ │ │ ├── PaymentResource.cs │ │ │ │ ├── RecordingOptions.cs │ │ │ │ ├── RecordingResource.cs │ │ │ │ ├── SiprecOptions.cs │ │ │ │ ├── SiprecResource.cs │ │ │ │ ├── StreamOptions.cs │ │ │ │ ├── StreamResource.cs │ │ │ │ ├── TranscriptionOptions.cs │ │ │ │ ├── TranscriptionResource.cs │ │ │ │ ├── UserDefinedMessageOptions.cs │ │ │ │ ├── UserDefinedMessageResource.cs │ │ │ │ ├── UserDefinedMessageSubscriptionOptions.cs │ │ │ │ └── UserDefinedMessageSubscriptionResource.cs │ │ │ ├── CallOptions.cs │ │ │ ├── CallResource.cs │ │ │ ├── Conference │ │ │ │ ├── ParticipantOptions.cs │ │ │ │ ├── ParticipantResource.cs │ │ │ │ ├── RecordingOptions.cs │ │ │ │ └── RecordingResource.cs │ │ │ ├── ConferenceOptions.cs │ │ │ ├── ConferenceResource.cs │ │ │ ├── ConnectAppOptions.cs │ │ │ ├── ConnectAppResource.cs │ │ │ ├── IncomingPhoneNumber │ │ │ │ ├── AssignedAddOn │ │ │ │ │ ├── AssignedAddOnExtensionOptions.cs │ │ │ │ │ └── AssignedAddOnExtensionResource.cs │ │ │ │ ├── AssignedAddOnOptions.cs │ │ │ │ ├── AssignedAddOnResource.cs │ │ │ │ ├── LocalOptions.cs │ │ │ │ ├── LocalResource.cs │ │ │ │ ├── MobileOptions.cs │ │ │ │ ├── MobileResource.cs │ │ │ │ ├── TollFreeOptions.cs │ │ │ │ └── TollFreeResource.cs │ │ │ ├── IncomingPhoneNumberOptions.cs │ │ │ ├── IncomingPhoneNumberResource.cs │ │ │ ├── KeyOptions.cs │ │ │ ├── KeyResource.cs │ │ │ ├── Message │ │ │ │ ├── FeedbackOptions.cs │ │ │ │ ├── FeedbackResource.cs │ │ │ │ ├── MediaOptions.cs │ │ │ │ └── MediaResource.cs │ │ │ ├── MessageOptions.cs │ │ │ ├── MessageResource.cs │ │ │ ├── NewKeyOptions.cs │ │ │ ├── NewKeyResource.cs │ │ │ ├── NewSigningKeyOptions.cs │ │ │ ├── NewSigningKeyResource.cs │ │ │ ├── NotificationOptions.cs │ │ │ ├── NotificationResource.cs │ │ │ ├── OutgoingCallerIdOptions.cs │ │ │ ├── OutgoingCallerIdResource.cs │ │ │ ├── Queue │ │ │ │ ├── MemberOptions.cs │ │ │ │ └── MemberResource.cs │ │ │ ├── QueueOptions.cs │ │ │ ├── QueueResource.cs │ │ │ ├── Recording │ │ │ │ ├── AddOnResult │ │ │ │ │ ├── Payload │ │ │ │ │ │ ├── DataOptions.cs │ │ │ │ │ │ └── DataResource.cs │ │ │ │ │ ├── PayloadOptions.cs │ │ │ │ │ └── PayloadResource.cs │ │ │ │ ├── AddOnResultOptions.cs │ │ │ │ ├── AddOnResultResource.cs │ │ │ │ ├── TranscriptionOptions.cs │ │ │ │ └── TranscriptionResource.cs │ │ │ ├── RecordingOptions.cs │ │ │ ├── RecordingResource.cs │ │ │ ├── ShortCodeOptions.cs │ │ │ ├── ShortCodeResource.cs │ │ │ ├── SigningKeyOptions.cs │ │ │ ├── SigningKeyResource.cs │ │ │ ├── Sip │ │ │ │ ├── CredentialList │ │ │ │ │ ├── CredentialOptions.cs │ │ │ │ │ └── CredentialResource.cs │ │ │ │ ├── CredentialListOptions.cs │ │ │ │ ├── CredentialListResource.cs │ │ │ │ ├── Domain │ │ │ │ │ ├── AuthTypes │ │ │ │ │ │ ├── AuthTypeCalls │ │ │ │ │ │ │ ├── AuthCallsCredentialListMappingOptions.cs │ │ │ │ │ │ │ ├── AuthCallsCredentialListMappingResource.cs │ │ │ │ │ │ │ ├── AuthCallsIpAccessControlListMappingOptions.cs │ │ │ │ │ │ │ └── AuthCallsIpAccessControlListMappingResource.cs │ │ │ │ │ │ └── AuthTypeRegistrations │ │ │ │ │ │ │ ├── AuthRegistrationsCredentialListMappingOptions.cs │ │ │ │ │ │ │ └── AuthRegistrationsCredentialListMappingResource.cs │ │ │ │ │ ├── CredentialListMappingOptions.cs │ │ │ │ │ ├── CredentialListMappingResource.cs │ │ │ │ │ ├── IpAccessControlListMappingOptions.cs │ │ │ │ │ └── IpAccessControlListMappingResource.cs │ │ │ │ ├── DomainOptions.cs │ │ │ │ ├── DomainResource.cs │ │ │ │ ├── IpAccessControlList │ │ │ │ │ ├── IpAddressOptions.cs │ │ │ │ │ └── IpAddressResource.cs │ │ │ │ ├── IpAccessControlListOptions.cs │ │ │ │ └── IpAccessControlListResource.cs │ │ │ ├── TokenOptions.cs │ │ │ ├── TokenResource.cs │ │ │ ├── TranscriptionOptions.cs │ │ │ ├── TranscriptionResource.cs │ │ │ ├── Usage │ │ │ │ ├── Record │ │ │ │ │ ├── AllTimeOptions.cs │ │ │ │ │ ├── AllTimeResource.cs │ │ │ │ │ ├── DailyOptions.cs │ │ │ │ │ ├── DailyResource.cs │ │ │ │ │ ├── LastMonthOptions.cs │ │ │ │ │ ├── LastMonthResource.cs │ │ │ │ │ ├── MonthlyOptions.cs │ │ │ │ │ ├── MonthlyResource.cs │ │ │ │ │ ├── ThisMonthOptions.cs │ │ │ │ │ ├── ThisMonthResource.cs │ │ │ │ │ ├── TodayOptions.cs │ │ │ │ │ ├── TodayResource.cs │ │ │ │ │ ├── YearlyOptions.cs │ │ │ │ │ ├── YearlyResource.cs │ │ │ │ │ ├── YesterdayOptions.cs │ │ │ │ │ └── YesterdayResource.cs │ │ │ │ ├── RecordOptions.cs │ │ │ │ ├── RecordResource.cs │ │ │ │ ├── TriggerOptions.cs │ │ │ │ └── TriggerResource.cs │ │ │ ├── ValidationRequestOptions.cs │ │ │ └── ValidationRequestResource.cs │ │ │ ├── AccountOptions.cs │ │ │ └── AccountResource.cs │ ├── Assistants │ │ └── V1 │ │ │ ├── Assistant │ │ │ ├── AssistantsKnowledgeOptions.cs │ │ │ ├── AssistantsKnowledgeResource.cs │ │ │ ├── AssistantsToolOptions.cs │ │ │ ├── AssistantsToolResource.cs │ │ │ ├── FeedbackOptions.cs │ │ │ ├── FeedbackResource.cs │ │ │ ├── MessageOptions.cs │ │ │ └── MessageResource.cs │ │ │ ├── AssistantOptions.cs │ │ │ ├── AssistantResource.cs │ │ │ ├── Knowledge │ │ │ ├── ChunkOptions.cs │ │ │ ├── ChunkResource.cs │ │ │ ├── KnowledgeStatusOptions.cs │ │ │ └── KnowledgeStatusResource.cs │ │ │ ├── KnowledgeOptions.cs │ │ │ ├── KnowledgeResource.cs │ │ │ ├── PolicyOptions.cs │ │ │ ├── PolicyResource.cs │ │ │ ├── Session │ │ │ ├── MessageOptions.cs │ │ │ └── MessageResource.cs │ │ │ ├── SessionOptions.cs │ │ │ ├── SessionResource.cs │ │ │ ├── ToolOptions.cs │ │ │ └── ToolResource.cs │ ├── Bulkexports │ │ └── V1 │ │ │ ├── Export │ │ │ ├── DayOptions.cs │ │ │ ├── DayResource.cs │ │ │ ├── ExportCustomJobOptions.cs │ │ │ ├── ExportCustomJobResource.cs │ │ │ ├── JobOptions.cs │ │ │ └── JobResource.cs │ │ │ ├── ExportConfigurationOptions.cs │ │ │ ├── ExportConfigurationResource.cs │ │ │ ├── ExportOptions.cs │ │ │ └── ExportResource.cs │ ├── Chat │ │ ├── V1 │ │ │ ├── CredentialOptions.cs │ │ │ ├── CredentialResource.cs │ │ │ ├── Service │ │ │ │ ├── Channel │ │ │ │ │ ├── InviteOptions.cs │ │ │ │ │ ├── InviteResource.cs │ │ │ │ │ ├── MemberOptions.cs │ │ │ │ │ ├── MemberResource.cs │ │ │ │ │ ├── MessageOptions.cs │ │ │ │ │ └── MessageResource.cs │ │ │ │ ├── ChannelOptions.cs │ │ │ │ ├── ChannelResource.cs │ │ │ │ ├── RoleOptions.cs │ │ │ │ ├── RoleResource.cs │ │ │ │ ├── User │ │ │ │ │ ├── UserChannelOptions.cs │ │ │ │ │ └── UserChannelResource.cs │ │ │ │ ├── UserOptions.cs │ │ │ │ └── UserResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ │ ├── V2 │ │ │ ├── CredentialOptions.cs │ │ │ ├── CredentialResource.cs │ │ │ ├── Service │ │ │ │ ├── BindingOptions.cs │ │ │ │ ├── BindingResource.cs │ │ │ │ ├── Channel │ │ │ │ │ ├── InviteOptions.cs │ │ │ │ │ ├── InviteResource.cs │ │ │ │ │ ├── MemberOptions.cs │ │ │ │ │ ├── MemberResource.cs │ │ │ │ │ ├── MessageOptions.cs │ │ │ │ │ ├── MessageResource.cs │ │ │ │ │ ├── WebhookOptions.cs │ │ │ │ │ └── WebhookResource.cs │ │ │ │ ├── ChannelOptions.cs │ │ │ │ ├── ChannelResource.cs │ │ │ │ ├── RoleOptions.cs │ │ │ │ ├── RoleResource.cs │ │ │ │ ├── User │ │ │ │ │ ├── UserBindingOptions.cs │ │ │ │ │ ├── UserBindingResource.cs │ │ │ │ │ ├── UserChannelOptions.cs │ │ │ │ │ └── UserChannelResource.cs │ │ │ │ ├── UserOptions.cs │ │ │ │ └── UserResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ │ └── V3 │ │ │ ├── ChannelOptions.cs │ │ │ └── ChannelResource.cs │ ├── Content │ │ ├── V1 │ │ │ ├── Content │ │ │ │ ├── ApprovalCreateOptions.cs │ │ │ │ ├── ApprovalCreateResource.cs │ │ │ │ ├── ApprovalFetchOptions.cs │ │ │ │ └── ApprovalFetchResource.cs │ │ │ ├── ContentAndApprovalsOptions.cs │ │ │ ├── ContentAndApprovalsResource.cs │ │ │ ├── ContentOptions.cs │ │ │ ├── ContentResource.cs │ │ │ ├── LegacyContentOptions.cs │ │ │ └── LegacyContentResource.cs │ │ └── V2 │ │ │ ├── ContentAndApprovalsOptions.cs │ │ │ ├── ContentAndApprovalsResource.cs │ │ │ ├── ContentOptions.cs │ │ │ └── ContentResource.cs │ ├── Conversations │ │ └── V1 │ │ │ ├── AddressConfigurationOptions.cs │ │ │ ├── AddressConfigurationResource.cs │ │ │ ├── Configuration │ │ │ ├── WebhookOptions.cs │ │ │ └── WebhookResource.cs │ │ │ ├── ConfigurationOptions.cs │ │ │ ├── ConfigurationResource.cs │ │ │ ├── Conversation │ │ │ ├── Message │ │ │ │ ├── DeliveryReceiptOptions.cs │ │ │ │ └── DeliveryReceiptResource.cs │ │ │ ├── MessageOptions.cs │ │ │ ├── MessageResource.cs │ │ │ ├── ParticipantOptions.cs │ │ │ ├── ParticipantResource.cs │ │ │ ├── WebhookOptions.cs │ │ │ └── WebhookResource.cs │ │ │ ├── ConversationOptions.cs │ │ │ ├── ConversationResource.cs │ │ │ ├── ConversationWithParticipantsOptions.cs │ │ │ ├── ConversationWithParticipantsResource.cs │ │ │ ├── CredentialOptions.cs │ │ │ ├── CredentialResource.cs │ │ │ ├── ParticipantConversationOptions.cs │ │ │ ├── ParticipantConversationResource.cs │ │ │ ├── RoleOptions.cs │ │ │ ├── RoleResource.cs │ │ │ ├── Service │ │ │ ├── BindingOptions.cs │ │ │ ├── BindingResource.cs │ │ │ ├── Configuration │ │ │ │ ├── NotificationOptions.cs │ │ │ │ ├── NotificationResource.cs │ │ │ │ ├── WebhookOptions.cs │ │ │ │ └── WebhookResource.cs │ │ │ ├── ConfigurationOptions.cs │ │ │ ├── ConfigurationResource.cs │ │ │ ├── Conversation │ │ │ │ ├── Message │ │ │ │ │ ├── DeliveryReceiptOptions.cs │ │ │ │ │ └── DeliveryReceiptResource.cs │ │ │ │ ├── MessageOptions.cs │ │ │ │ ├── MessageResource.cs │ │ │ │ ├── ParticipantOptions.cs │ │ │ │ ├── ParticipantResource.cs │ │ │ │ ├── WebhookOptions.cs │ │ │ │ └── WebhookResource.cs │ │ │ ├── ConversationOptions.cs │ │ │ ├── ConversationResource.cs │ │ │ ├── ConversationWithParticipantsOptions.cs │ │ │ ├── ConversationWithParticipantsResource.cs │ │ │ ├── ParticipantConversationOptions.cs │ │ │ ├── ParticipantConversationResource.cs │ │ │ ├── RoleOptions.cs │ │ │ ├── RoleResource.cs │ │ │ ├── User │ │ │ │ ├── UserConversationOptions.cs │ │ │ │ └── UserConversationResource.cs │ │ │ ├── UserOptions.cs │ │ │ └── UserResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ ├── ServiceResource.cs │ │ │ ├── User │ │ │ ├── UserConversationOptions.cs │ │ │ └── UserConversationResource.cs │ │ │ ├── UserOptions.cs │ │ │ └── UserResource.cs │ ├── Domain.cs │ ├── Events │ │ └── V1 │ │ │ ├── EventTypeOptions.cs │ │ │ ├── EventTypeResource.cs │ │ │ ├── Schema │ │ │ ├── SchemaVersionOptions.cs │ │ │ └── SchemaVersionResource.cs │ │ │ ├── SchemaOptions.cs │ │ │ ├── SchemaResource.cs │ │ │ ├── Sink │ │ │ ├── SinkTestOptions.cs │ │ │ ├── SinkTestResource.cs │ │ │ ├── SinkValidateOptions.cs │ │ │ └── SinkValidateResource.cs │ │ │ ├── SinkOptions.cs │ │ │ ├── SinkResource.cs │ │ │ ├── Subscription │ │ │ ├── SubscribedEventOptions.cs │ │ │ └── SubscribedEventResource.cs │ │ │ ├── SubscriptionOptions.cs │ │ │ └── SubscriptionResource.cs │ ├── FlexApi │ │ ├── V1 │ │ │ ├── AssessmentsOptions.cs │ │ │ ├── AssessmentsResource.cs │ │ │ ├── ChannelOptions.cs │ │ │ ├── ChannelResource.cs │ │ │ ├── ConfigurationOptions.cs │ │ │ ├── ConfigurationResource.cs │ │ │ ├── FlexFlowOptions.cs │ │ │ ├── FlexFlowResource.cs │ │ │ ├── InsightsAssessmentsCommentOptions.cs │ │ │ ├── InsightsAssessmentsCommentResource.cs │ │ │ ├── InsightsConversationsOptions.cs │ │ │ ├── InsightsConversationsResource.cs │ │ │ ├── InsightsQuestionnairesCategoryOptions.cs │ │ │ ├── InsightsQuestionnairesCategoryResource.cs │ │ │ ├── InsightsQuestionnairesOptions.cs │ │ │ ├── InsightsQuestionnairesQuestionOptions.cs │ │ │ ├── InsightsQuestionnairesQuestionResource.cs │ │ │ ├── InsightsQuestionnairesResource.cs │ │ │ ├── InsightsSegmentsOptions.cs │ │ │ ├── InsightsSegmentsResource.cs │ │ │ ├── InsightsSessionOptions.cs │ │ │ ├── InsightsSessionResource.cs │ │ │ ├── InsightsSettingsAnswerSetsOptions.cs │ │ │ ├── InsightsSettingsAnswerSetsResource.cs │ │ │ ├── InsightsSettingsCommentOptions.cs │ │ │ ├── InsightsSettingsCommentResource.cs │ │ │ ├── InsightsUserRolesOptions.cs │ │ │ ├── InsightsUserRolesResource.cs │ │ │ ├── Interaction │ │ │ │ ├── InteractionChannel │ │ │ │ │ ├── InteractionChannelInviteOptions.cs │ │ │ │ │ ├── InteractionChannelInviteResource.cs │ │ │ │ │ ├── InteractionChannelParticipantOptions.cs │ │ │ │ │ ├── InteractionChannelParticipantResource.cs │ │ │ │ │ ├── InteractionTransferOptions.cs │ │ │ │ │ └── InteractionTransferResource.cs │ │ │ │ ├── InteractionChannelOptions.cs │ │ │ │ └── InteractionChannelResource.cs │ │ │ ├── InteractionOptions.cs │ │ │ ├── InteractionResource.cs │ │ │ ├── Plugin │ │ │ │ ├── PluginVersionsOptions.cs │ │ │ │ └── PluginVersionsResource.cs │ │ │ ├── PluginArchiveOptions.cs │ │ │ ├── PluginArchiveResource.cs │ │ │ ├── PluginConfiguration │ │ │ │ ├── ConfiguredPluginOptions.cs │ │ │ │ └── ConfiguredPluginResource.cs │ │ │ ├── PluginConfigurationArchiveOptions.cs │ │ │ ├── PluginConfigurationArchiveResource.cs │ │ │ ├── PluginConfigurationOptions.cs │ │ │ ├── PluginConfigurationResource.cs │ │ │ ├── PluginOptions.cs │ │ │ ├── PluginReleaseOptions.cs │ │ │ ├── PluginReleaseResource.cs │ │ │ ├── PluginResource.cs │ │ │ ├── PluginVersionArchiveOptions.cs │ │ │ ├── PluginVersionArchiveResource.cs │ │ │ ├── ProvisioningStatusOptions.cs │ │ │ ├── ProvisioningStatusResource.cs │ │ │ ├── WebChannelOptions.cs │ │ │ └── WebChannelResource.cs │ │ └── V2 │ │ │ ├── FlexUserOptions.cs │ │ │ ├── FlexUserResource.cs │ │ │ ├── WebChannelsOptions.cs │ │ │ └── WebChannelsResource.cs │ ├── FrontlineApi │ │ └── V1 │ │ │ ├── UserOptions.cs │ │ │ └── UserResource.cs │ ├── Iam │ │ └── V1 │ │ │ ├── ApiKeyOptions.cs │ │ │ ├── ApiKeyResource.cs │ │ │ ├── GetApiKeysOptions.cs │ │ │ ├── GetApiKeysResource.cs │ │ │ ├── NewApiKeyOptions.cs │ │ │ ├── NewApiKeyResource.cs │ │ │ ├── TokenOptions.cs │ │ │ └── TokenResource.cs │ ├── Insights │ │ └── V1 │ │ │ ├── Call │ │ │ ├── AnnotationOptions.cs │ │ │ ├── AnnotationResource.cs │ │ │ ├── CallSummaryOptions.cs │ │ │ ├── CallSummaryResource.cs │ │ │ ├── EventOptions.cs │ │ │ ├── EventResource.cs │ │ │ ├── MetricOptions.cs │ │ │ └── MetricResource.cs │ │ │ ├── CallOptions.cs │ │ │ ├── CallResource.cs │ │ │ ├── CallSummariesOptions.cs │ │ │ ├── CallSummariesResource.cs │ │ │ ├── Conference │ │ │ ├── ConferenceParticipantOptions.cs │ │ │ └── ConferenceParticipantResource.cs │ │ │ ├── ConferenceOptions.cs │ │ │ ├── ConferenceResource.cs │ │ │ ├── Room │ │ │ ├── ParticipantOptions.cs │ │ │ └── ParticipantResource.cs │ │ │ ├── RoomOptions.cs │ │ │ ├── RoomResource.cs │ │ │ ├── SettingOptions.cs │ │ │ └── SettingResource.cs │ ├── Intelligence │ │ └── V2 │ │ │ ├── CustomOperatorOptions.cs │ │ │ ├── CustomOperatorResource.cs │ │ │ ├── OperatorAttachmentOptions.cs │ │ │ ├── OperatorAttachmentResource.cs │ │ │ ├── OperatorAttachmentsOptions.cs │ │ │ ├── OperatorAttachmentsResource.cs │ │ │ ├── OperatorOptions.cs │ │ │ ├── OperatorResource.cs │ │ │ ├── OperatorTypeOptions.cs │ │ │ ├── OperatorTypeResource.cs │ │ │ ├── PrebuiltOperatorOptions.cs │ │ │ ├── PrebuiltOperatorResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ ├── ServiceResource.cs │ │ │ ├── Transcript │ │ │ ├── MediaOptions.cs │ │ │ ├── MediaResource.cs │ │ │ ├── OperatorResultOptions.cs │ │ │ ├── OperatorResultResource.cs │ │ │ ├── SentenceOptions.cs │ │ │ └── SentenceResource.cs │ │ │ ├── TranscriptOptions.cs │ │ │ └── TranscriptResource.cs │ ├── IpMessaging │ │ ├── V1 │ │ │ ├── CredentialOptions.cs │ │ │ ├── CredentialResource.cs │ │ │ ├── Service │ │ │ │ ├── Channel │ │ │ │ │ ├── InviteOptions.cs │ │ │ │ │ ├── InviteResource.cs │ │ │ │ │ ├── MemberOptions.cs │ │ │ │ │ ├── MemberResource.cs │ │ │ │ │ ├── MessageOptions.cs │ │ │ │ │ └── MessageResource.cs │ │ │ │ ├── ChannelOptions.cs │ │ │ │ ├── ChannelResource.cs │ │ │ │ ├── RoleOptions.cs │ │ │ │ ├── RoleResource.cs │ │ │ │ ├── User │ │ │ │ │ ├── UserChannelOptions.cs │ │ │ │ │ └── UserChannelResource.cs │ │ │ │ ├── UserOptions.cs │ │ │ │ └── UserResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ │ └── V2 │ │ │ ├── CredentialOptions.cs │ │ │ ├── CredentialResource.cs │ │ │ ├── Service │ │ │ ├── BindingOptions.cs │ │ │ ├── BindingResource.cs │ │ │ ├── Channel │ │ │ │ ├── InviteOptions.cs │ │ │ │ ├── InviteResource.cs │ │ │ │ ├── MemberOptions.cs │ │ │ │ ├── MemberResource.cs │ │ │ │ ├── MessageOptions.cs │ │ │ │ ├── MessageResource.cs │ │ │ │ ├── WebhookOptions.cs │ │ │ │ └── WebhookResource.cs │ │ │ ├── ChannelOptions.cs │ │ │ ├── ChannelResource.cs │ │ │ ├── RoleOptions.cs │ │ │ ├── RoleResource.cs │ │ │ ├── User │ │ │ │ ├── UserBindingOptions.cs │ │ │ │ ├── UserBindingResource.cs │ │ │ │ ├── UserChannelOptions.cs │ │ │ │ └── UserChannelResource.cs │ │ │ ├── UserOptions.cs │ │ │ └── UserResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ ├── Knowledge │ │ └── V1 │ │ │ ├── Knowledge │ │ │ ├── ChunkOptions.cs │ │ │ ├── ChunkResource.cs │ │ │ ├── KnowledgeStatusOptions.cs │ │ │ └── KnowledgeStatusResource.cs │ │ │ ├── KnowledgeOptions.cs │ │ │ └── KnowledgeResource.cs │ ├── Lookups │ │ ├── V1 │ │ │ ├── PhoneNumberOptions.cs │ │ │ └── PhoneNumberResource.cs │ │ └── V2 │ │ │ ├── PhoneNumberOptions.cs │ │ │ └── PhoneNumberResource.cs │ ├── Marketplace │ │ └── V1 │ │ │ ├── AvailableAddOn │ │ │ ├── AvailableAddOnExtensionOptions.cs │ │ │ └── AvailableAddOnExtensionResource.cs │ │ │ ├── AvailableAddOnOptions.cs │ │ │ ├── AvailableAddOnResource.cs │ │ │ ├── InstalledAddOn │ │ │ ├── InstalledAddOnExtensionOptions.cs │ │ │ ├── InstalledAddOnExtensionResource.cs │ │ │ ├── InstalledAddOnUsageOptions.cs │ │ │ └── InstalledAddOnUsageResource.cs │ │ │ ├── InstalledAddOnOptions.cs │ │ │ ├── InstalledAddOnResource.cs │ │ │ ├── ModuleDataManagementOptions.cs │ │ │ ├── ModuleDataManagementResource.cs │ │ │ ├── ModuleDataOptions.cs │ │ │ ├── ModuleDataResource.cs │ │ │ ├── ReferralConversionOptions.cs │ │ │ └── ReferralConversionResource.cs │ ├── Messaging │ │ ├── V1 │ │ │ ├── BrandRegistration │ │ │ │ ├── BrandRegistrationOtpOptions.cs │ │ │ │ ├── BrandRegistrationOtpResource.cs │ │ │ │ ├── BrandVettingOptions.cs │ │ │ │ └── BrandVettingResource.cs │ │ │ ├── BrandRegistrationOptions.cs │ │ │ ├── BrandRegistrationResource.cs │ │ │ ├── DeactivationsOptions.cs │ │ │ ├── DeactivationsResource.cs │ │ │ ├── DomainCertsOptions.cs │ │ │ ├── DomainCertsResource.cs │ │ │ ├── DomainConfigMessagingServiceOptions.cs │ │ │ ├── DomainConfigMessagingServiceResource.cs │ │ │ ├── DomainConfigOptions.cs │ │ │ ├── DomainConfigResource.cs │ │ │ ├── ExternalCampaignOptions.cs │ │ │ ├── ExternalCampaignResource.cs │ │ │ ├── LinkshorteningMessagingServiceDomainAssociationOptions.cs │ │ │ ├── LinkshorteningMessagingServiceDomainAssociationResource.cs │ │ │ ├── LinkshorteningMessagingServiceOptions.cs │ │ │ ├── LinkshorteningMessagingServiceResource.cs │ │ │ ├── RequestManagedCertOptions.cs │ │ │ ├── RequestManagedCertResource.cs │ │ │ ├── Service │ │ │ │ ├── AlphaSenderOptions.cs │ │ │ │ ├── AlphaSenderResource.cs │ │ │ │ ├── ChannelSenderOptions.cs │ │ │ │ ├── ChannelSenderResource.cs │ │ │ │ ├── DestinationAlphaSenderOptions.cs │ │ │ │ ├── DestinationAlphaSenderResource.cs │ │ │ │ ├── PhoneNumberOptions.cs │ │ │ │ ├── PhoneNumberResource.cs │ │ │ │ ├── ShortCodeOptions.cs │ │ │ │ ├── ShortCodeResource.cs │ │ │ │ ├── UsAppToPersonOptions.cs │ │ │ │ ├── UsAppToPersonResource.cs │ │ │ │ ├── UsAppToPersonUsecaseOptions.cs │ │ │ │ └── UsAppToPersonUsecaseResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ ├── ServiceResource.cs │ │ │ ├── TollfreeVerificationOptions.cs │ │ │ ├── TollfreeVerificationResource.cs │ │ │ ├── UsecaseOptions.cs │ │ │ └── UsecaseResource.cs │ │ └── V2 │ │ │ ├── ChannelsSenderOptions.cs │ │ │ └── ChannelsSenderResource.cs │ ├── Microvisor │ │ └── V1 │ │ │ ├── AccountConfigOptions.cs │ │ │ ├── AccountConfigResource.cs │ │ │ ├── AccountSecretOptions.cs │ │ │ ├── AccountSecretResource.cs │ │ │ ├── App │ │ │ ├── AppManifestOptions.cs │ │ │ └── AppManifestResource.cs │ │ │ ├── AppOptions.cs │ │ │ ├── AppResource.cs │ │ │ ├── Device │ │ │ ├── DeviceConfigOptions.cs │ │ │ ├── DeviceConfigResource.cs │ │ │ ├── DeviceSecretOptions.cs │ │ │ └── DeviceSecretResource.cs │ │ │ ├── DeviceOptions.cs │ │ │ └── DeviceResource.cs │ ├── Monitor │ │ └── V1 │ │ │ ├── AlertOptions.cs │ │ │ ├── AlertResource.cs │ │ │ ├── EventOptions.cs │ │ │ └── EventResource.cs │ ├── Notify │ │ └── V1 │ │ │ ├── CredentialOptions.cs │ │ │ ├── CredentialResource.cs │ │ │ ├── Service │ │ │ ├── BindingOptions.cs │ │ │ ├── BindingResource.cs │ │ │ ├── NotificationOptions.cs │ │ │ └── NotificationResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ ├── Numbers │ │ ├── V1 │ │ │ ├── BulkEligibilityOptions.cs │ │ │ ├── BulkEligibilityResource.cs │ │ │ ├── EligibilityOptions.cs │ │ │ ├── EligibilityResource.cs │ │ │ ├── PortingPortInOptions.cs │ │ │ ├── PortingPortInPhoneNumberOptions.cs │ │ │ ├── PortingPortInPhoneNumberResource.cs │ │ │ ├── PortingPortInResource.cs │ │ │ ├── PortingPortabilityOptions.cs │ │ │ ├── PortingPortabilityResource.cs │ │ │ ├── PortingWebhookConfigurationDeleteOptions.cs │ │ │ ├── PortingWebhookConfigurationDeleteResource.cs │ │ │ ├── PortingWebhookConfigurationOptions.cs │ │ │ ├── PortingWebhookConfigurationResource.cs │ │ │ ├── SigningRequestConfigurationOptions.cs │ │ │ ├── SigningRequestConfigurationResource.cs │ │ │ ├── WebhookOptions.cs │ │ │ └── WebhookResource.cs │ │ └── V2 │ │ │ ├── AuthorizationDocument │ │ │ ├── DependentHostedNumberOrderOptions.cs │ │ │ └── DependentHostedNumberOrderResource.cs │ │ │ ├── AuthorizationDocumentOptions.cs │ │ │ ├── AuthorizationDocumentResource.cs │ │ │ ├── BulkHostedNumberOrderOptions.cs │ │ │ ├── BulkHostedNumberOrderResource.cs │ │ │ ├── BundleCloneOptions.cs │ │ │ ├── BundleCloneResource.cs │ │ │ ├── HostedNumberOrderOptions.cs │ │ │ ├── HostedNumberOrderResource.cs │ │ │ └── RegulatoryCompliance │ │ │ ├── Bundle │ │ │ ├── BundleCopyOptions.cs │ │ │ ├── BundleCopyResource.cs │ │ │ ├── EvaluationOptions.cs │ │ │ ├── EvaluationResource.cs │ │ │ ├── ItemAssignmentOptions.cs │ │ │ ├── ItemAssignmentResource.cs │ │ │ ├── ReplaceItemsOptions.cs │ │ │ └── ReplaceItemsResource.cs │ │ │ ├── BundleOptions.cs │ │ │ ├── BundleResource.cs │ │ │ ├── EndUserOptions.cs │ │ │ ├── EndUserResource.cs │ │ │ ├── EndUserTypeOptions.cs │ │ │ ├── EndUserTypeResource.cs │ │ │ ├── RegulationOptions.cs │ │ │ ├── RegulationResource.cs │ │ │ ├── SupportingDocumentOptions.cs │ │ │ ├── SupportingDocumentResource.cs │ │ │ ├── SupportingDocumentTypeOptions.cs │ │ │ └── SupportingDocumentTypeResource.cs │ ├── Oauth │ │ └── V1 │ │ │ ├── AuthorizeOptions.cs │ │ │ ├── AuthorizeResource.cs │ │ │ ├── TokenOptions.cs │ │ │ └── TokenResource.cs │ ├── Preview │ │ ├── HostedNumbers │ │ │ ├── AuthorizationDocument │ │ │ │ ├── DependentHostedNumberOrderOptions.cs │ │ │ │ └── DependentHostedNumberOrderResource.cs │ │ │ ├── AuthorizationDocumentOptions.cs │ │ │ ├── AuthorizationDocumentResource.cs │ │ │ ├── HostedNumberOrderOptions.cs │ │ │ └── HostedNumberOrderResource.cs │ │ ├── Marketplace │ │ │ ├── AvailableAddOn │ │ │ │ ├── AvailableAddOnExtensionOptions.cs │ │ │ │ └── AvailableAddOnExtensionResource.cs │ │ │ ├── AvailableAddOnOptions.cs │ │ │ ├── AvailableAddOnResource.cs │ │ │ ├── InstalledAddOn │ │ │ │ ├── InstalledAddOnExtensionOptions.cs │ │ │ │ └── InstalledAddOnExtensionResource.cs │ │ │ ├── InstalledAddOnOptions.cs │ │ │ └── InstalledAddOnResource.cs │ │ └── Wireless │ │ │ ├── CommandOptions.cs │ │ │ ├── CommandResource.cs │ │ │ ├── RatePlanOptions.cs │ │ │ ├── RatePlanResource.cs │ │ │ ├── Sim │ │ │ ├── UsageOptions.cs │ │ │ └── UsageResource.cs │ │ │ ├── SimOptions.cs │ │ │ └── SimResource.cs │ ├── PreviewIam │ │ ├── Organizations │ │ │ ├── AccountOptions.cs │ │ │ ├── AccountResource.cs │ │ │ ├── RoleAssignmentOptions.cs │ │ │ ├── RoleAssignmentResource.cs │ │ │ ├── UserOptions.cs │ │ │ └── UserResource.cs │ │ └── V1 │ │ │ ├── AuthorizeOptions.cs │ │ │ ├── AuthorizeResource.cs │ │ │ ├── TokenOptions.cs │ │ │ └── TokenResource.cs │ ├── Pricing │ │ ├── V1 │ │ │ ├── Messaging │ │ │ │ ├── CountryOptions.cs │ │ │ │ └── CountryResource.cs │ │ │ ├── PhoneNumber │ │ │ │ ├── CountryOptions.cs │ │ │ │ └── CountryResource.cs │ │ │ └── Voice │ │ │ │ ├── CountryOptions.cs │ │ │ │ ├── CountryResource.cs │ │ │ │ ├── NumberOptions.cs │ │ │ │ └── NumberResource.cs │ │ └── V2 │ │ │ ├── CountryOptions.cs │ │ │ ├── CountryResource.cs │ │ │ ├── NumberOptions.cs │ │ │ ├── NumberResource.cs │ │ │ └── Voice │ │ │ ├── CountryOptions.cs │ │ │ ├── CountryResource.cs │ │ │ ├── NumberOptions.cs │ │ │ └── NumberResource.cs │ ├── Proxy │ │ └── V1 │ │ │ ├── Service │ │ │ ├── PhoneNumberOptions.cs │ │ │ ├── PhoneNumberResource.cs │ │ │ ├── Session │ │ │ │ ├── InteractionOptions.cs │ │ │ │ ├── InteractionResource.cs │ │ │ │ ├── Participant │ │ │ │ │ ├── MessageInteractionOptions.cs │ │ │ │ │ └── MessageInteractionResource.cs │ │ │ │ ├── ParticipantOptions.cs │ │ │ │ └── ParticipantResource.cs │ │ │ ├── SessionOptions.cs │ │ │ ├── SessionResource.cs │ │ │ ├── ShortCodeOptions.cs │ │ │ └── ShortCodeResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ ├── Routes │ │ └── V2 │ │ │ ├── PhoneNumberOptions.cs │ │ │ ├── PhoneNumberResource.cs │ │ │ ├── SipDomainOptions.cs │ │ │ ├── SipDomainResource.cs │ │ │ ├── TrunkOptions.cs │ │ │ └── TrunkResource.cs │ ├── Serverless │ │ └── V1 │ │ │ ├── Service │ │ │ ├── Asset │ │ │ │ ├── AssetVersionOptions.cs │ │ │ │ └── AssetVersionResource.cs │ │ │ ├── AssetOptions.cs │ │ │ ├── AssetResource.cs │ │ │ ├── Build │ │ │ │ ├── BuildStatusOptions.cs │ │ │ │ └── BuildStatusResource.cs │ │ │ ├── BuildOptions.cs │ │ │ ├── BuildResource.cs │ │ │ ├── Environment │ │ │ │ ├── DeploymentOptions.cs │ │ │ │ ├── DeploymentResource.cs │ │ │ │ ├── LogOptions.cs │ │ │ │ ├── LogResource.cs │ │ │ │ ├── VariableOptions.cs │ │ │ │ └── VariableResource.cs │ │ │ ├── EnvironmentOptions.cs │ │ │ ├── EnvironmentResource.cs │ │ │ ├── Function │ │ │ │ ├── FunctionVersion │ │ │ │ │ ├── FunctionVersionContentOptions.cs │ │ │ │ │ └── FunctionVersionContentResource.cs │ │ │ │ ├── FunctionVersionOptions.cs │ │ │ │ └── FunctionVersionResource.cs │ │ │ ├── FunctionOptions.cs │ │ │ └── FunctionResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ ├── Studio │ │ ├── V1 │ │ │ ├── Flow │ │ │ │ ├── Engagement │ │ │ │ │ ├── EngagementContextOptions.cs │ │ │ │ │ ├── EngagementContextResource.cs │ │ │ │ │ ├── Step │ │ │ │ │ │ ├── StepContextOptions.cs │ │ │ │ │ │ └── StepContextResource.cs │ │ │ │ │ ├── StepOptions.cs │ │ │ │ │ └── StepResource.cs │ │ │ │ ├── EngagementOptions.cs │ │ │ │ ├── EngagementResource.cs │ │ │ │ ├── Execution │ │ │ │ │ ├── ExecutionContextOptions.cs │ │ │ │ │ ├── ExecutionContextResource.cs │ │ │ │ │ ├── ExecutionStep │ │ │ │ │ │ ├── ExecutionStepContextOptions.cs │ │ │ │ │ │ └── ExecutionStepContextResource.cs │ │ │ │ │ ├── ExecutionStepOptions.cs │ │ │ │ │ └── ExecutionStepResource.cs │ │ │ │ ├── ExecutionOptions.cs │ │ │ │ └── ExecutionResource.cs │ │ │ ├── FlowOptions.cs │ │ │ └── FlowResource.cs │ │ └── V2 │ │ │ ├── Flow │ │ │ ├── Execution │ │ │ │ ├── ExecutionContextOptions.cs │ │ │ │ ├── ExecutionContextResource.cs │ │ │ │ ├── ExecutionStep │ │ │ │ │ ├── ExecutionStepContextOptions.cs │ │ │ │ │ └── ExecutionStepContextResource.cs │ │ │ │ ├── ExecutionStepOptions.cs │ │ │ │ └── ExecutionStepResource.cs │ │ │ ├── ExecutionOptions.cs │ │ │ ├── ExecutionResource.cs │ │ │ ├── FlowRevisionOptions.cs │ │ │ ├── FlowRevisionResource.cs │ │ │ ├── FlowTestUserOptions.cs │ │ │ └── FlowTestUserResource.cs │ │ │ ├── FlowOptions.cs │ │ │ ├── FlowResource.cs │ │ │ ├── FlowValidateOptions.cs │ │ │ └── FlowValidateResource.cs │ ├── Supersim │ │ └── V1 │ │ │ ├── EsimProfileOptions.cs │ │ │ ├── EsimProfileResource.cs │ │ │ ├── FleetOptions.cs │ │ │ ├── FleetResource.cs │ │ │ ├── IpCommandOptions.cs │ │ │ ├── IpCommandResource.cs │ │ │ ├── NetworkAccessProfile │ │ │ ├── NetworkAccessProfileNetworkOptions.cs │ │ │ └── NetworkAccessProfileNetworkResource.cs │ │ │ ├── NetworkAccessProfileOptions.cs │ │ │ ├── NetworkAccessProfileResource.cs │ │ │ ├── NetworkOptions.cs │ │ │ ├── NetworkResource.cs │ │ │ ├── SettingsUpdateOptions.cs │ │ │ ├── SettingsUpdateResource.cs │ │ │ ├── Sim │ │ │ ├── BillingPeriodOptions.cs │ │ │ ├── BillingPeriodResource.cs │ │ │ ├── SimIpAddressOptions.cs │ │ │ └── SimIpAddressResource.cs │ │ │ ├── SimOptions.cs │ │ │ ├── SimResource.cs │ │ │ ├── SmsCommandOptions.cs │ │ │ ├── SmsCommandResource.cs │ │ │ ├── UsageRecordOptions.cs │ │ │ └── UsageRecordResource.cs │ ├── Sync │ │ └── V1 │ │ │ ├── Service │ │ │ ├── Document │ │ │ │ ├── DocumentPermissionOptions.cs │ │ │ │ └── DocumentPermissionResource.cs │ │ │ ├── DocumentOptions.cs │ │ │ ├── DocumentResource.cs │ │ │ ├── SyncList │ │ │ │ ├── SyncListItemOptions.cs │ │ │ │ ├── SyncListItemResource.cs │ │ │ │ ├── SyncListPermissionOptions.cs │ │ │ │ └── SyncListPermissionResource.cs │ │ │ ├── SyncListOptions.cs │ │ │ ├── SyncListResource.cs │ │ │ ├── SyncMap │ │ │ │ ├── SyncMapItemOptions.cs │ │ │ │ ├── SyncMapItemResource.cs │ │ │ │ ├── SyncMapPermissionOptions.cs │ │ │ │ └── SyncMapPermissionResource.cs │ │ │ ├── SyncMapOptions.cs │ │ │ ├── SyncMapResource.cs │ │ │ ├── SyncStream │ │ │ │ ├── StreamMessageOptions.cs │ │ │ │ └── StreamMessageResource.cs │ │ │ ├── SyncStreamOptions.cs │ │ │ └── SyncStreamResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ └── ServiceResource.cs │ ├── Taskrouter │ │ └── V1 │ │ │ ├── Workspace │ │ │ ├── ActivityOptions.cs │ │ │ ├── ActivityResource.cs │ │ │ ├── EventOptions.cs │ │ │ ├── EventResource.cs │ │ │ ├── Task │ │ │ │ ├── ReservationOptions.cs │ │ │ │ └── ReservationResource.cs │ │ │ ├── TaskChannelOptions.cs │ │ │ ├── TaskChannelResource.cs │ │ │ ├── TaskOptions.cs │ │ │ ├── TaskQueue │ │ │ │ ├── TaskQueueBulkRealTimeStatisticsOptions.cs │ │ │ │ ├── TaskQueueBulkRealTimeStatisticsResource.cs │ │ │ │ ├── TaskQueueCumulativeStatisticsOptions.cs │ │ │ │ ├── TaskQueueCumulativeStatisticsResource.cs │ │ │ │ ├── TaskQueueRealTimeStatisticsOptions.cs │ │ │ │ ├── TaskQueueRealTimeStatisticsResource.cs │ │ │ │ ├── TaskQueueStatisticsOptions.cs │ │ │ │ ├── TaskQueueStatisticsResource.cs │ │ │ │ ├── TaskQueuesStatisticsOptions.cs │ │ │ │ └── TaskQueuesStatisticsResource.cs │ │ │ ├── TaskQueueOptions.cs │ │ │ ├── TaskQueueResource.cs │ │ │ ├── TaskResource.cs │ │ │ ├── Worker │ │ │ │ ├── ReservationOptions.cs │ │ │ │ ├── ReservationResource.cs │ │ │ │ ├── WorkerChannelOptions.cs │ │ │ │ ├── WorkerChannelResource.cs │ │ │ │ ├── WorkerStatisticsOptions.cs │ │ │ │ ├── WorkerStatisticsResource.cs │ │ │ │ ├── WorkersCumulativeStatisticsOptions.cs │ │ │ │ ├── WorkersCumulativeStatisticsResource.cs │ │ │ │ ├── WorkersRealTimeStatisticsOptions.cs │ │ │ │ ├── WorkersRealTimeStatisticsResource.cs │ │ │ │ ├── WorkersStatisticsOptions.cs │ │ │ │ └── WorkersStatisticsResource.cs │ │ │ ├── WorkerOptions.cs │ │ │ ├── WorkerResource.cs │ │ │ ├── Workflow │ │ │ │ ├── WorkflowCumulativeStatisticsOptions.cs │ │ │ │ ├── WorkflowCumulativeStatisticsResource.cs │ │ │ │ ├── WorkflowRealTimeStatisticsOptions.cs │ │ │ │ ├── WorkflowRealTimeStatisticsResource.cs │ │ │ │ ├── WorkflowStatisticsOptions.cs │ │ │ │ └── WorkflowStatisticsResource.cs │ │ │ ├── WorkflowOptions.cs │ │ │ ├── WorkflowResource.cs │ │ │ ├── WorkspaceCumulativeStatisticsOptions.cs │ │ │ ├── WorkspaceCumulativeStatisticsResource.cs │ │ │ ├── WorkspaceRealTimeStatisticsOptions.cs │ │ │ ├── WorkspaceRealTimeStatisticsResource.cs │ │ │ ├── WorkspaceStatisticsOptions.cs │ │ │ └── WorkspaceStatisticsResource.cs │ │ │ ├── WorkspaceOptions.cs │ │ │ └── WorkspaceResource.cs │ ├── Trunking │ │ └── V1 │ │ │ ├── Trunk │ │ │ ├── CredentialListOptions.cs │ │ │ ├── CredentialListResource.cs │ │ │ ├── IpAccessControlListOptions.cs │ │ │ ├── IpAccessControlListResource.cs │ │ │ ├── OriginationUrlOptions.cs │ │ │ ├── OriginationUrlResource.cs │ │ │ ├── PhoneNumberOptions.cs │ │ │ ├── PhoneNumberResource.cs │ │ │ ├── RecordingOptions.cs │ │ │ └── RecordingResource.cs │ │ │ ├── TrunkOptions.cs │ │ │ └── TrunkResource.cs │ ├── Trusthub │ │ └── V1 │ │ │ ├── ComplianceInquiriesOptions.cs │ │ │ ├── ComplianceInquiriesResource.cs │ │ │ ├── ComplianceRegistrationInquiriesOptions.cs │ │ │ ├── ComplianceRegistrationInquiriesResource.cs │ │ │ ├── ComplianceTollfreeInquiriesOptions.cs │ │ │ ├── ComplianceTollfreeInquiriesResource.cs │ │ │ ├── CustomerProfiles │ │ │ ├── CustomerProfilesChannelEndpointAssignmentOptions.cs │ │ │ ├── CustomerProfilesChannelEndpointAssignmentResource.cs │ │ │ ├── CustomerProfilesEntityAssignmentsOptions.cs │ │ │ ├── CustomerProfilesEntityAssignmentsResource.cs │ │ │ ├── CustomerProfilesEvaluationsOptions.cs │ │ │ └── CustomerProfilesEvaluationsResource.cs │ │ │ ├── CustomerProfilesOptions.cs │ │ │ ├── CustomerProfilesResource.cs │ │ │ ├── EndUserOptions.cs │ │ │ ├── EndUserResource.cs │ │ │ ├── EndUserTypeOptions.cs │ │ │ ├── EndUserTypeResource.cs │ │ │ ├── PoliciesOptions.cs │ │ │ ├── PoliciesResource.cs │ │ │ ├── SupportingDocumentOptions.cs │ │ │ ├── SupportingDocumentResource.cs │ │ │ ├── SupportingDocumentTypeOptions.cs │ │ │ ├── SupportingDocumentTypeResource.cs │ │ │ ├── TrustProducts │ │ │ ├── TrustProductsChannelEndpointAssignmentOptions.cs │ │ │ ├── TrustProductsChannelEndpointAssignmentResource.cs │ │ │ ├── TrustProductsEntityAssignmentsOptions.cs │ │ │ ├── TrustProductsEntityAssignmentsResource.cs │ │ │ ├── TrustProductsEvaluationsOptions.cs │ │ │ └── TrustProductsEvaluationsResource.cs │ │ │ ├── TrustProductsOptions.cs │ │ │ └── TrustProductsResource.cs │ ├── Verify │ │ └── V2 │ │ │ ├── FormOptions.cs │ │ │ ├── FormResource.cs │ │ │ ├── SafelistOptions.cs │ │ │ ├── SafelistResource.cs │ │ │ ├── Service │ │ │ ├── AccessTokenOptions.cs │ │ │ ├── AccessTokenResource.cs │ │ │ ├── Entity │ │ │ │ ├── Challenge │ │ │ │ │ ├── NotificationOptions.cs │ │ │ │ │ └── NotificationResource.cs │ │ │ │ ├── ChallengeOptions.cs │ │ │ │ ├── ChallengeResource.cs │ │ │ │ ├── FactorOptions.cs │ │ │ │ ├── FactorResource.cs │ │ │ │ ├── NewFactorOptions.cs │ │ │ │ └── NewFactorResource.cs │ │ │ ├── EntityOptions.cs │ │ │ ├── EntityResource.cs │ │ │ ├── MessagingConfigurationOptions.cs │ │ │ ├── MessagingConfigurationResource.cs │ │ │ ├── RateLimit │ │ │ │ ├── BucketOptions.cs │ │ │ │ └── BucketResource.cs │ │ │ ├── RateLimitOptions.cs │ │ │ ├── RateLimitResource.cs │ │ │ ├── VerificationCheckOptions.cs │ │ │ ├── VerificationCheckResource.cs │ │ │ ├── VerificationOptions.cs │ │ │ ├── VerificationResource.cs │ │ │ ├── WebhookOptions.cs │ │ │ └── WebhookResource.cs │ │ │ ├── ServiceOptions.cs │ │ │ ├── ServiceResource.cs │ │ │ ├── TemplateOptions.cs │ │ │ ├── TemplateResource.cs │ │ │ ├── VerificationAttemptOptions.cs │ │ │ ├── VerificationAttemptResource.cs │ │ │ ├── VerificationAttemptsSummaryOptions.cs │ │ │ └── VerificationAttemptsSummaryResource.cs │ ├── Video │ │ └── V1 │ │ │ ├── CompositionHookOptions.cs │ │ │ ├── CompositionHookResource.cs │ │ │ ├── CompositionOptions.cs │ │ │ ├── CompositionResource.cs │ │ │ ├── CompositionSettingsOptions.cs │ │ │ ├── CompositionSettingsResource.cs │ │ │ ├── RecordingOptions.cs │ │ │ ├── RecordingResource.cs │ │ │ ├── RecordingSettingsOptions.cs │ │ │ ├── RecordingSettingsResource.cs │ │ │ ├── Room │ │ │ ├── Participant │ │ │ │ ├── AnonymizeOptions.cs │ │ │ │ ├── AnonymizeResource.cs │ │ │ │ ├── PublishedTrackOptions.cs │ │ │ │ ├── PublishedTrackResource.cs │ │ │ │ ├── SubscribeRulesOptions.cs │ │ │ │ ├── SubscribeRulesResource.cs │ │ │ │ ├── SubscribedTrackOptions.cs │ │ │ │ └── SubscribedTrackResource.cs │ │ │ ├── ParticipantOptions.cs │ │ │ ├── ParticipantResource.cs │ │ │ ├── RecordingRulesOptions.cs │ │ │ ├── RecordingRulesResource.cs │ │ │ ├── RoomRecordingOptions.cs │ │ │ └── RoomRecordingResource.cs │ │ │ ├── RoomOptions.cs │ │ │ └── RoomResource.cs │ ├── Voice │ │ └── V1 │ │ │ ├── ArchivedCallOptions.cs │ │ │ ├── ArchivedCallResource.cs │ │ │ ├── ByocTrunkOptions.cs │ │ │ ├── ByocTrunkResource.cs │ │ │ ├── ConnectionPolicy │ │ │ ├── ConnectionPolicyTargetOptions.cs │ │ │ └── ConnectionPolicyTargetResource.cs │ │ │ ├── ConnectionPolicyOptions.cs │ │ │ ├── ConnectionPolicyResource.cs │ │ │ ├── DialingPermissions │ │ │ ├── BulkCountryUpdateOptions.cs │ │ │ ├── BulkCountryUpdateResource.cs │ │ │ ├── Country │ │ │ │ ├── HighriskSpecialPrefixOptions.cs │ │ │ │ └── HighriskSpecialPrefixResource.cs │ │ │ ├── CountryOptions.cs │ │ │ ├── CountryResource.cs │ │ │ ├── SettingsOptions.cs │ │ │ └── SettingsResource.cs │ │ │ ├── IpRecordOptions.cs │ │ │ ├── IpRecordResource.cs │ │ │ ├── SourceIpMappingOptions.cs │ │ │ └── SourceIpMappingResource.cs │ └── Wireless │ │ └── V1 │ │ ├── CommandOptions.cs │ │ ├── CommandResource.cs │ │ ├── RatePlanOptions.cs │ │ ├── RatePlanResource.cs │ │ ├── Sim │ │ ├── DataSessionOptions.cs │ │ ├── DataSessionResource.cs │ │ ├── UsageRecordOptions.cs │ │ └── UsageRecordResource.cs │ │ ├── SimOptions.cs │ │ ├── SimResource.cs │ │ ├── UsageRecordOptions.cs │ │ └── UsageRecordResource.cs │ ├── Security │ └── RequestValidator.cs │ ├── TwiML │ ├── Fax │ │ └── Receive.cs │ ├── FaxResponse.cs │ ├── Messaging │ │ ├── Body.cs │ │ ├── Media.cs │ │ ├── Message.cs │ │ └── Redirect.cs │ ├── MessagingResponse.cs │ ├── Text.cs │ ├── TwiML.cs │ ├── Voice │ │ ├── Application.cs │ │ ├── ApplicationSid.cs │ │ ├── Assistant.cs │ │ ├── Autopilot.cs │ │ ├── Client.cs │ │ ├── Conference.cs │ │ ├── Config.cs │ │ ├── Connect.cs │ │ ├── Conversation.cs │ │ ├── ConversationRelay.cs │ │ ├── Dial.cs │ │ ├── Echo.cs │ │ ├── Enqueue.cs │ │ ├── Gather.cs │ │ ├── Hangup.cs │ │ ├── Identity.cs │ │ ├── Language.cs │ │ ├── Leave.cs │ │ ├── Number.cs │ │ ├── Parameter.cs │ │ ├── Pause.cs │ │ ├── Pay.cs │ │ ├── Play.cs │ │ ├── Prompt.cs │ │ ├── Queue.cs │ │ ├── Record.cs │ │ ├── Redirect.cs │ │ ├── Refer.cs │ │ ├── ReferSip.cs │ │ ├── Reject.cs │ │ ├── Room.cs │ │ ├── Say.cs │ │ ├── Sim.cs │ │ ├── Sip.cs │ │ ├── Siprec.cs │ │ ├── Sms.cs │ │ ├── SsmlBreak.cs │ │ ├── SsmlEmphasis.cs │ │ ├── SsmlLang.cs │ │ ├── SsmlP.cs │ │ ├── SsmlPhoneme.cs │ │ ├── SsmlProsody.cs │ │ ├── SsmlS.cs │ │ ├── SsmlSayAs.cs │ │ ├── SsmlSub.cs │ │ ├── SsmlW.cs │ │ ├── Start.cs │ │ ├── Stop.cs │ │ ├── Stream.cs │ │ ├── Task.cs │ │ ├── Transcription.cs │ │ └── VirtualAgent.cs │ └── VoiceResponse.cs │ ├── Twilio.cs │ ├── Twilio.csproj │ ├── TwilioOrgsTokenAuth.cs │ └── Types │ ├── Client.cs │ ├── EmptyUrl.cs │ ├── FeedbackIssue.cs │ ├── IEndpoint.cs │ ├── IceServer.cs │ ├── InboundCallPrice.cs │ ├── InboundSmsPrice.cs │ ├── OutboundCallPrice.cs │ ├── OutboundCallPriceWithOrigin.cs │ ├── OutboundPrefixPrice.cs │ ├── OutboundPrefixPriceWithOrigin.cs │ ├── OutboundSmsPrice.cs │ ├── PhoneNumber.cs │ ├── PhoneNumberCapabilities.cs │ ├── PhoneNumberPrice.cs │ ├── RecordingRule.cs │ ├── RecordingRulesUpdate.cs │ ├── StringEnum.cs │ ├── SubscribeRule.cs │ ├── SubscribeRulesUpdate.cs │ └── Twiml.cs └── test ├── Twilio.Benchmark ├── Program.cs ├── RequestValidatorOriginal.cs └── Twilio.Benchmark.csproj └── Twilio.Test ├── Clients └── TwilioRestClientTest.cs ├── ClusterTest.cs ├── Constant └── EnumConstantsTest.cs ├── Converters ├── MarshalConverterTest.cs ├── PrefixedCollapsibleMapTest.cs ├── SerializersTest.cs └── StringEnumConverterTest.cs ├── Http ├── RequestTest.cs ├── SystemNetHttpClientTest.cs └── WebRequestClientTest.cs ├── Jwt ├── AccessToken │ └── AccessTokenTest.cs ├── BaseJwtTest.cs ├── Client │ ├── ClientCapabilityTest.cs │ ├── EventStreamScopeTest.cs │ ├── IncomingClientScopeTest.cs │ └── OutgoingClientScopeTest.cs ├── DecodedJwt.cs └── Taskrouter │ ├── PolicyTest.cs │ └── TaskRouterCapabilityTest.cs ├── Program.cs ├── Security └── RequestValidatorTest.cs ├── TwiML ├── ApplicationSidTest.cs ├── ApplicationTest.cs ├── AssistantTest.cs ├── AutopilotTest.cs ├── BodyTest.cs ├── ClientTest.cs ├── ConferenceTest.cs ├── ConfigTest.cs ├── ConnectTest.cs ├── ConversationRelayTest.cs ├── ConversationTest.cs ├── DialTest.cs ├── EchoTest.cs ├── EnqueueTest.cs ├── FaxResponseTest.cs ├── GatherTest.cs ├── HangupTest.cs ├── IdentityTest.cs ├── LanguageTest.cs ├── LeaveTest.cs ├── MediaTest.cs ├── MessageTest.cs ├── MessagingResponseTest.cs ├── NumberTest.cs ├── ParameterTest.cs ├── PauseTest.cs ├── PayTest.cs ├── PlayTest.cs ├── PromptTest.cs ├── QueueTest.cs ├── ReceiveTest.cs ├── RecordTest.cs ├── RedirectTest.cs ├── ReferSipTest.cs ├── ReferTest.cs ├── RejectTest.cs ├── RoomTest.cs ├── SayTest.cs ├── SimTest.cs ├── SipTest.cs ├── SiprecTest.cs ├── SmsTest.cs ├── SsmlBreakTest.cs ├── SsmlEmphasisTest.cs ├── SsmlLangTest.cs ├── SsmlPTest.cs ├── SsmlPhonemeTest.cs ├── SsmlProsodyTest.cs ├── SsmlSTest.cs ├── SsmlSayAsTest.cs ├── SsmlSubTest.cs ├── SsmlWTest.cs ├── StartTest.cs ├── StopTest.cs ├── StreamTest.cs ├── TaskTest.cs ├── TranscriptionTest.cs ├── VirtualAgentTest.cs └── VoiceResponseTest.cs ├── Twilio.Test.csproj ├── TwilioTest.cs └── Types ├── ClientTest.cs └── StringEnumTest.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | * -crlf 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Twilio Support 3 | url: https://twilio.com/help/contact 4 | about: Get Support 5 | - name: Stack Overflow 6 | url: https://stackoverflow.com/questions/tagged/twilio-csharp+or+twilio+csharp 7 | about: Ask questions on Stack Overflow 8 | - name: Documentation 9 | url: https://www.twilio.com/docs/libraries/reference/twilio-csharp 10 | about: View Reference Documentation 11 | -------------------------------------------------------------------------------- /.github/workflows/pr-lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint PR 2 | on: 3 | pull_request_target: 4 | types: [ opened, edited, synchronize, reopened ] 5 | 6 | jobs: 7 | validate: 8 | name: Validate title 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: amannn/action-semantic-pull-request@v5 12 | with: 13 | types: | 14 | chore 15 | docs 16 | fix 17 | feat 18 | misc 19 | test 20 | env: 21 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | # Below dependecies are added from Dependencies menetion at 4 | # https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-1604 5 | RUN apt-get update \ 6 | && apt-get install -y --no-install-recommends \ 7 | apt-transport-https \ 8 | curl \ 9 | ca-certificates \ 10 | dirmngr \ 11 | gnupg \ 12 | libc6 \ 13 | libcurl3 \ 14 | libgcc1 \ 15 | libgssapi-krb5-2 \ 16 | libicu55 \ 17 | liblttng-ust0 \ 18 | libssl1.0.2 \ 19 | libstdc++6 \ 20 | libunwind8 \ 21 | libuuid1 \ 22 | make \ 23 | software-properties-common \ 24 | wget \ 25 | zlib1g \ 26 | && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ 27 | && apt-add-repository 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' \ 28 | && wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ 29 | && dpkg -i packages-microsoft-prod.deb \ 30 | && apt-get update \ 31 | && apt-get install -y \ 32 | dotnet-sdk-6.0 \ 33 | mono-complete \ 34 | && rm -rf /var/lib/apt/lists/* 35 | 36 | WORKDIR /twilio 37 | 38 | COPY src ./src 39 | COPY test ./test 40 | COPY Twilio.sln . 41 | COPY Makefile . 42 | 43 | RUN dotnet restore 44 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ### Issue Summary 10 | A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples. 11 | 12 | ### Steps to Reproduce 13 | 1. This is the first step 14 | 2. This is the second step 15 | 3. Further steps, etc. 16 | 17 | ### Code Snippet 18 | ```csharp 19 | # paste code here 20 | ``` 21 | 22 | ### Exception/Log 23 | ``` 24 | # paste exception/log here 25 | ``` 26 | 27 | ### Technical details: 28 | * twilio-csharp version: 29 | * csharp version: 30 | 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2023, Twilio, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 16 | 17 | # Fixes # 18 | 19 | A short description of what this PR does. 20 | 21 | ### Checklist 22 | - [x] I acknowledge that all my contributions will be made under the project's license 23 | - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar) 24 | - [ ] I have read the [Contribution Guidelines](https://github.com/twilio/twilio-csharp/blob/main/CONTRIBUTING.md) and my PR follows them 25 | - [ ] I have titled the PR appropriately 26 | - [ ] I have updated my branch with the main branch 27 | - [ ] I have added tests that prove my fix is effective or that my feature works 28 | - [ ] I have added the necessary documentation about the functionality in the appropriate .md file 29 | - [ ] I have added inline documentation to the code I modified 30 | 31 | If you have questions, please file a [support ticket](https://twilio.com/help/contact), or create a GitHub Issue in this repository. 32 | -------------------------------------------------------------------------------- /TROUBLESHOOTING.md: -------------------------------------------------------------------------------- 1 | For non-library Twilio issues, please check the [Twilio Support Help Center](https://support.twilio.com) first, and [file a support ticket](https://twilio.com/help/contact) if you don't find an answer to your question. 2 | 3 | If you can't find a solution below, please open an [issue](https://github.com/twilio/twilio-csharp/issues). 4 | 5 | ## Table of Contents 6 | 7 | * [Json.NET / Newtonsoft.Json Version Issues](#newtonsoft) 8 | 9 | 10 | ## Json.NET / Newtonsoft.Json Version Issues 11 | 12 | If you require a different version of Json.NET than what this helper library specifies, you can [enable binding redirection (automatic or manual)](https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection#enabling-automatic-binding-redirects-manually) or utilize this [quick fix](https://github.com/twilio/twilio-csharp/issues/422#issuecomment-416372586) for existing projects: 13 | 14 | In Visual Studio, open the Package Manager Console (Tools... NuGet Package Manager... Package Manager Console) and run the following command: `Get-Project –All | Add-BindingRedirect` -------------------------------------------------------------------------------- /VERSIONS.md: -------------------------------------------------------------------------------- 1 | # Versioning Strategy 2 | 3 | `twilio-csharp` uses a modified version of [Semantic Versioning][semver] for 4 | all changes to the helper library. It is strongly encouraged that you pin at 5 | least the major version and potentially the minor version to avoid pulling in 6 | breaking changes. 7 | 8 | Semantic Versions take the form of `MAJOR.MINOR.PATCH` 9 | 10 | When bugs are fixed in the library in a backwards-compatible way, the `PATCH` 11 | level will be incremented by one. When new features are added to the library 12 | in a backwards-compatible way, the `PATCH` level will be incremented by one. 13 | `PATCH` changes should _not_ break your code and are generally safe for upgrade. 14 | 15 | When a new large feature set comes online or a small breaking change is 16 | introduced, the `MINOR` version will be incremented by one and the `PATCH` 17 | version reset to zero. `MINOR` changes _may_ require some amount of manual code 18 | change for upgrade. These backwards-incompatible changes will generally be 19 | limited to a small number of function signature changes. 20 | 21 | The `MAJOR` version is used to indicate the family of technology represented by 22 | the helper library. Breaking changes that require extensive reworking of code 23 | will cause the `MAJOR` version to be incremented by one, and the `MINOR` and 24 | `PATCH` versions will be reset to zero. Twilio understands that this can be very 25 | disruptive, so we will only introduce this type of breaking change when 26 | absolutely necessary. New `MAJOR` versions will be communicated in advance with 27 | `Release Candidates` and a schedule. 28 | 29 | ## Supported Versions 30 | 31 | Only the current `MAJOR` version of `twilio-csharp` is supported. New 32 | features, functionality, bug fixes, and security updates will only be added to 33 | the current `MAJOR` version. 34 | 35 | [semver]: https://semver.org -------------------------------------------------------------------------------- /examples/BearerTokenAuthentication.md: -------------------------------------------------------------------------------- 1 | ```csharp 2 | using System; 3 | using Twilio; 4 | using Twilio.Base; 5 | using Twilio.Exceptions; 6 | using Twilio.Credential; 7 | using Twilio.Rest.Api.V2010.Account; 8 | using Twilio.Rest.PreviewIam.Organizations; 9 | 10 | //Find client id, client secret and organisation sid from admin center of your organisation 11 | //path account sid is the sid of the account withing the organisation 12 | class Program 13 | { 14 | static void Main(string[] args) 15 | { 16 | 17 | CredentialProvider credentialProvider = new OrgsClientCredentialProvider(CLIENT_ID, CLIENT_SECRET); 18 | TwilioClient.Init(credentialProvider); 19 | 20 | Twilio.Base.ResourceSet accountList = null; 21 | accountList = Twilio.Rest.PreviewIam.Organizations.AccountResource.Read(pathOrganizationSid: ORGS_SID); 22 | Console.WriteLine(accountList.ElementAt(0).FriendlyName); 23 | var account = Twilio.Rest.PreviewIam.Organizations.AccountResource.Fetch(pathOrganizationSid: ORGS_SID, pathAccountSid: PATH_ACCOUNT_SID); 24 | Console.WriteLine(account.FriendlyName); 25 | } 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /examples/ListMessages.md: -------------------------------------------------------------------------------- 1 | ```csharp 2 | using System; 3 | using Twilio; 4 | using Twilio.Base; 5 | using Twilio.Exceptions; 6 | using Twilio.Rest.Api.V2010.Account; 7 | 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | TwilioClient.Init("TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"); 13 | 14 | var messages = MessageResource.Read(limit: 20); 15 | foreach (var record in messages) { 16 | Console.WriteLine(record.Body); 17 | } 18 | } 19 | } 20 | 21 | ``` 22 | -------------------------------------------------------------------------------- /examples/PublicOAuthAuthentication.md: -------------------------------------------------------------------------------- 1 | ```csharp 2 | using Twilio; 3 | using Twilio.Credential; 4 | using Twilio.Rest.Api.V2010.Account; 5 | 6 | //Find client id, client secret of the OAuth App 7 | //Message sid in this example is the sid of any previously sent message 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | CredentialProvider credentialProvider = new ClientCredentialProvider(CLIENT_ID, CLIENT_SECRET); 13 | TwilioClient.Init(credentialProvider, ACCOUNT_SID); 14 | 15 | /* 16 | * Or use the following if accountSid is not required as a path parameter for an API or when setting accountSid in the API. 17 | TwilioClient.init(new ClientCredentialProvider(CLIENT_ID, CLIENT_SECRET)); 18 | */ 19 | 20 | FetchMessageOptions fm = new FetchMessageOptions(MESSAGE_SID); 21 | MessageResource m = MessageResource.Fetch(fm); 22 | Console.WriteLine(m.Body); 23 | } 24 | } 25 | ``` 26 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "6.0.419", 4 | "rollForward": "latestFeature" 5 | } 6 | } -------------------------------------------------------------------------------- /src/Twilio/Annotations/Beta.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Annotations 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] 6 | public class Beta : Attribute 7 | { 8 | public string Message { get; } 9 | 10 | public Beta(string message = "This feature is in beta and may change in future versions.") 11 | { 12 | Message = message; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Twilio/Annotations/Deprecated.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Annotations 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] 6 | public class Deprecated : Attribute 7 | { 8 | public string Message { get; } 9 | 10 | public Deprecated(string message = "This feature is deprecated") 11 | { 12 | Message = message; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Twilio/Annotations/Preview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Annotations 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false)] 6 | public sealed class Preview : Attribute 7 | { 8 | public string Value { get; } 9 | 10 | public Preview(string value = "This class/method is under preview and is subject to change. Use with caution.") 11 | { 12 | Value = value; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Twilio/AuthStrategies/AuthStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.AuthStrategies 2 | { 3 | public abstract class AuthStrategy 4 | { 5 | protected AuthStrategy(){} 6 | 7 | public abstract string GetAuthString(); 8 | 9 | public abstract bool RequiresAuthentication(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Twilio/AuthStrategies/Base64UrlEncode.cs: -------------------------------------------------------------------------------- 1 | #if NET35 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Web.Script.Serialization; 6 | using Twilio.Annotations; 7 | 8 | namespace Twilio.AuthStrategies{ 9 | 10 | [Beta] 11 | public abstract class Base64UrlEncode 12 | { 13 | public static string Decode(string base64Url) 14 | { 15 | // Replace URL-safe characters with Base64 characters 16 | string base64 = base64Url 17 | .Replace('-', '+') 18 | .Replace('_', '/'); 19 | 20 | // Add padding if necessary 21 | switch (base64.Length % 4) 22 | { 23 | case 2: base64 += "=="; break; 24 | case 3: base64 += "="; break; 25 | } 26 | 27 | byte[] bytes = Convert.FromBase64String(base64); 28 | return Encoding.UTF8.GetString(bytes); 29 | } 30 | } 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Twilio/AuthStrategies/BasicAuthStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace Twilio.AuthStrategies 5 | { 6 | public class BasicAuthStrategy : AuthStrategy 7 | { 8 | private string username; 9 | private string password; 10 | 11 | public BasicAuthStrategy(string username, string password) 12 | { 13 | this.username = username; 14 | this.password = password; 15 | } 16 | 17 | public override string GetAuthString() 18 | { 19 | var credentials = username + ":" + password; 20 | var encoded = System.Text.Encoding.UTF8.GetBytes(credentials); 21 | var finalEncoded = Convert.ToBase64String(encoded); 22 | return $"Basic {finalEncoded}"; 23 | } 24 | 25 | public override bool RequiresAuthentication() 26 | { 27 | return true; 28 | } 29 | 30 | public override bool Equals(object obj) 31 | { 32 | if (ReferenceEquals(this, obj)) return true; 33 | if (obj == null || GetType() != obj.GetType()) return false; 34 | var that = (BasicAuthStrategy)obj; 35 | return username == that.username && password == that.password; 36 | } 37 | 38 | public override int GetHashCode() 39 | { 40 | int hash = 17; 41 | hash = hash * 31 + (username != null ? username.GetHashCode() : 0); 42 | hash = hash * 31 + (password != null ? password.GetHashCode() : 0); 43 | return hash; 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Twilio/AuthStrategies/NoAuthStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.AuthStrategies 2 | { 3 | public class NoAuthStrategy : AuthStrategy 4 | { 5 | public NoAuthStrategy(){} 6 | 7 | public override string GetAuthString() 8 | { 9 | return string.Empty; 10 | } 11 | 12 | public override bool RequiresAuthentication() 13 | { 14 | return false; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Twilio/Base/Resource.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.Base 2 | { 3 | public abstract class Resource {} 4 | } -------------------------------------------------------------------------------- /src/Twilio/Clients/Base64UrlEncoder.cs: -------------------------------------------------------------------------------- 1 | #if NET35 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Web.Script.Serialization; 6 | using Twilio.Annotations; 7 | 8 | namespace Twilio.Clients{ 9 | 10 | [Beta] 11 | public abstract class Base64UrlEncoder 12 | { 13 | public static string Decode(string base64Url) 14 | { 15 | // Replace URL-safe characters with Base64 characters 16 | string base64 = base64Url 17 | .Replace('-', '+') 18 | .Replace('_', '/'); 19 | 20 | // Add padding if necessary 21 | switch (base64.Length % 4) 22 | { 23 | case 2: base64 += "=="; break; 24 | case 3: base64 += "="; break; 25 | } 26 | 27 | byte[] bytes = Convert.FromBase64String(base64); 28 | return Encoding.UTF8.GetString(bytes); 29 | } 30 | } 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Twilio/Clients/ITwilioRestClient.cs: -------------------------------------------------------------------------------- 1 | using Twilio.Http; 2 | 3 | namespace Twilio.Clients 4 | { 5 | /// 6 | /// Interface for a Twilio Client 7 | /// 8 | public interface ITwilioRestClient 9 | { 10 | /// 11 | /// Get the account sid all requests are made against 12 | /// 13 | string AccountSid { get; } 14 | 15 | /// 16 | /// Get the region requests are made against 17 | /// 18 | string Region { get; } 19 | 20 | /// 21 | /// Get the http client that makes requests 22 | /// 23 | HttpClient HttpClient { get; } 24 | 25 | /// 26 | /// Make a request to Twilio 27 | /// 28 | /// 29 | /// Request to make 30 | /// response of the request 31 | Response Request(Request request); 32 | 33 | #if !NET35 34 | /// 35 | /// Make a request to Twilio 36 | /// 37 | /// 38 | /// Request to make 39 | /// response of the request 40 | System.Threading.Tasks.Task RequestAsync(Request request); 41 | #endif 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Twilio/Constant/EnumConstants.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Twilio.Converters; 3 | using Twilio.Types; 4 | 5 | namespace Twilio.Constant 6 | { 7 | public class EnumConstants 8 | { 9 | [JsonConverter(typeof(StringEnumConverter))] 10 | public sealed class ContentTypeEnum : StringEnum 11 | { 12 | private ContentTypeEnum(string value) : base(value) {} 13 | public static readonly ContentTypeEnum JSON = new ContentTypeEnum("application/json"); 14 | public static readonly ContentTypeEnum SCIM = new ContentTypeEnum("application/scim"); 15 | public static readonly ContentTypeEnum FORM_URLENCODED = new ContentTypeEnum("application/x-www-form-urlencoded"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Twilio/Converters/MarshalConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Converters 4 | { 5 | /// 6 | /// Convert strings to objects 7 | /// 8 | public class MarshalConverter 9 | { 10 | /// 11 | /// Convert a date time string to a DateTime object 12 | /// 13 | /// date time string to convert 14 | /// Converted DateTime object 15 | public static DateTime DateTimeFromString(string dateTimeString) 16 | { 17 | return DateTime.Parse(dateTimeString); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/Twilio/Converters/PhoneNumberConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Linq; 4 | 5 | namespace Twilio.Converters 6 | { 7 | /// 8 | /// Convert between strings and a PhoneNumber 9 | /// 10 | public class PhoneNumberConverter : JsonConverter 11 | { 12 | /// 13 | /// Write value to JsonWriter 14 | /// 15 | /// Writer to write to 16 | /// Value to write 17 | /// unsued 18 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) 19 | { 20 | var t = value.ToString() != null 21 | ? JToken.FromObject(value.ToString()) 22 | : JValue.CreateNull(); 23 | t.WriteTo(writer); 24 | } 25 | 26 | /// 27 | /// Convert a string to a PhoneNumber 28 | /// 29 | /// JsonReader to read from 30 | /// unused 31 | /// unused 32 | /// unsued 33 | /// Converted PhoneNumber 34 | public override object ReadJson( 35 | JsonReader reader, 36 | Type objectType, 37 | object existingValue, 38 | JsonSerializer serializer 39 | ) 40 | { 41 | return new Types.PhoneNumber(reader.Value as string); 42 | } 43 | 44 | /// 45 | /// Determines if an object converted to a PhoneNumber 46 | /// 47 | /// Type of object 48 | /// true if an object can be converted; false otherwise 49 | public override bool CanConvert(Type objectType) 50 | { 51 | return objectType == typeof(Enum); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Twilio/Converters/PrefixedCollapsibleMap.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace Twilio.Converters 5 | { 6 | /// 7 | /// Flatten nested maps and give all entries a prefix 8 | /// 9 | public class PrefixedCollapsibleMap 10 | { 11 | private static Dictionary Flatten( 12 | Dictionary dict, 13 | Dictionary result, 14 | List previous 15 | ) 16 | { 17 | foreach (var entry in dict) 18 | { 19 | var next = new List(previous) { entry.Key }; 20 | 21 | if (entry.Value.GetType() == typeof(Dictionary)) 22 | { 23 | Flatten((Dictionary)entry.Value, result, next); 24 | } 25 | else 26 | { 27 | result.Add(string.Join(".", next.ToArray()), entry.Value.ToString()); 28 | } 29 | } 30 | 31 | return result; 32 | } 33 | 34 | /// 35 | /// Flatten Dictionary separating nested keys with a . 36 | /// 37 | /// Dictionary to flatten 38 | /// Prefix to give all entries 39 | /// Flattened Dictionary 40 | public static Dictionary Serialize( 41 | Dictionary inputDict, 42 | string prefix 43 | ) 44 | { 45 | if (inputDict == null || !inputDict.Any()) 46 | { 47 | return new Dictionary(); 48 | } 49 | 50 | var flattened = Flatten(inputDict, new Dictionary(), new List()); 51 | return flattened.ToDictionary(entry => prefix + "." + entry.Key, entry => entry.Value); 52 | } 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/Twilio/Converters/Promoter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Twilio.Converters 5 | { 6 | /// 7 | /// Promote objects 8 | /// 9 | public class Promoter 10 | { 11 | /// 12 | /// Convert a string URL to a Uri object 13 | /// 14 | /// URL to convert 15 | /// Converted Uri 16 | public static Uri UriFromString(string url) 17 | { 18 | return new Uri(url); 19 | } 20 | 21 | /// 22 | /// Promote a single entry to a List of one 23 | /// 24 | /// single entry to promote 25 | /// List of the single object 26 | public static List ListOfOne(T one) 27 | { 28 | return new List {one}; 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/Twilio/Converters/Serializers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Newtonsoft.Json; 4 | 5 | namespace Twilio.Converters 6 | { 7 | /// 8 | /// Serialization methods for various datatypes before making requests to the API 9 | /// 10 | public class Serializers 11 | { 12 | 13 | /// 14 | /// Produce a json string from input if possible 15 | /// 16 | /// Object to serialize to json 17 | /// A json string 18 | public static string JsonObject(object input) 19 | { 20 | return (input is string) ? (string) input : JsonConvert.SerializeObject(input); 21 | } 22 | 23 | /// 24 | /// Produce a ISO 8601 UTC compatible string from input if possible 25 | /// 26 | /// DateTime instance to serialize to string 27 | /// A string 28 | public static string DateTimeIso8601(DateTime? input) 29 | { 30 | if (input == null) return null; 31 | 32 | return input.Value.ToString("yyyy-MM-ddTHH:mm:ssZ"); 33 | } 34 | 35 | public static string Url(Uri input) 36 | { 37 | if (input == null) 38 | { 39 | return null; 40 | } 41 | 42 | string originalString = input.OriginalString; 43 | if (input is Types.EmptyUri && Types.EmptyUri.Uri.Equals(originalString)) 44 | { 45 | return string.Empty; 46 | } 47 | 48 | return originalString; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Twilio/Converters/TwimlConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Linq; 4 | 5 | namespace Twilio.Converters 6 | { 7 | /// 8 | /// Convert between strings and a Twiml 9 | /// 10 | public class TwimlConverter : JsonConverter 11 | { 12 | /// 13 | /// Write value to JsonWriter 14 | /// 15 | /// Writer to write to 16 | /// Value to write 17 | /// unused 18 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) 19 | { 20 | var t = JToken.FromObject(value.ToString()); 21 | t.WriteTo(writer); 22 | } 23 | 24 | /// 25 | /// Convert a string to a Twiml 26 | /// 27 | /// JsonReader to read from 28 | /// unused 29 | /// unused 30 | /// unused 31 | /// Converted Twiml 32 | public override object ReadJson( 33 | JsonReader reader, 34 | Type objectType, 35 | object existingValue, 36 | JsonSerializer serializer 37 | ) 38 | { 39 | return new Types.Twiml(reader.Value as string); 40 | } 41 | 42 | /// 43 | /// Determines if an object converted to a Twiml 44 | /// 45 | /// Type of object 46 | /// true if an object can be converted; false otherwise 47 | public override bool CanConvert(Type objectType) 48 | { 49 | return objectType == typeof(Enum); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Twilio/Credential/CredentialProvider.cs: -------------------------------------------------------------------------------- 1 | using Twilio.AuthStrategies; 2 | 3 | namespace Twilio.Credential 4 | { 5 | public abstract class CredentialProvider 6 | { 7 | protected CredentialProvider(){} 8 | public abstract AuthStrategy ToAuthStrategy(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Twilio/Exceptions/CertificateValidationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Twilio.Http; 3 | 4 | namespace Twilio.Exceptions 5 | { 6 | /// 7 | /// Error thrown specifically when validating SSL connection 8 | /// 9 | public class CertificateValidationException : TwilioException 10 | { 11 | /// 12 | /// Request object that triggered the exception 13 | /// 14 | public Request Request { get; } 15 | 16 | /// 17 | /// Response object that triggered the exception, if available 18 | /// 19 | public Response Response { get; } 20 | 21 | /// 22 | /// Construct a CertificateValidationException 23 | /// 24 | /// Error message 25 | /// The Request that triggered the exception 26 | /// The Response (if available) that triggered the exception 27 | public CertificateValidationException(string message, Request request, Response response) 28 | : base(message) 29 | { 30 | Request = request; 31 | Response = response; 32 | } 33 | 34 | /// 35 | /// Construct a CertificateValidationException 36 | /// 37 | /// Error message 38 | /// The parent exception 39 | /// The Request that triggered the exception 40 | public CertificateValidationException(string message, Exception exception, Request request) 41 | : base(message, exception) 42 | { 43 | Request = request; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Twilio/Http/BearerToken/TokenHttpClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Twilio.Annotations; 3 | 4 | namespace Twilio.Http.BearerToken 5 | { 6 | /// 7 | /// Base http client used to make Twilio requests 8 | /// 9 | [Deprecated] 10 | public abstract class TokenHttpClient 11 | { 12 | /// 13 | /// The last request made by this client 14 | /// 15 | public TokenRequest LastRequest { get; protected set; } 16 | 17 | /// 18 | /// The last response received by this client 19 | /// 20 | public Response LastResponse { get; protected set; } 21 | 22 | /// 23 | /// Make a request to Twilio, returns non-2XX responses as well 24 | /// 25 | /// 26 | /// request to make 27 | /// throws exception on network or connection errors. 28 | /// response of the request 29 | public abstract Response MakeRequest(TokenRequest request); 30 | 31 | #if !NET35 32 | /// 33 | /// Make an async request to Twilio, returns non-2XX responses as well 34 | /// 35 | /// 36 | /// request to make 37 | /// throws exception on network or connection errors. 38 | /// response of the request 39 | public abstract System.Threading.Tasks.Task MakeRequestAsync(TokenRequest request); 40 | #endif 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Twilio/Http/BearerToken/TokenManager.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Twilio.Http.BearerToken 3 | { 4 | /// 5 | /// Interface for a Token Manager 6 | /// 7 | public interface TokenManager 8 | { 9 | 10 | /// 11 | /// Fetch/Create an access token 12 | /// 13 | /// 14 | /// access token fetched from token endpoint 15 | string fetchAccessToken(); 16 | 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/Twilio/Http/HttpClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Http 4 | { 5 | /// 6 | /// Base http client used to make Twilio requests 7 | /// 8 | public abstract class HttpClient 9 | { 10 | /// 11 | /// The last request made by this client 12 | /// 13 | public Request LastRequest { get; protected set; } 14 | 15 | /// 16 | /// The last response received by this client 17 | /// 18 | public Response LastResponse { get; protected set; } 19 | 20 | /// 21 | /// Make a request to Twilio, returns non-2XX responses as well 22 | /// 23 | /// 24 | /// request to make 25 | /// throws exception on network or connection errors. 26 | /// response of the request 27 | public abstract Response MakeRequest(Request request); 28 | 29 | #if !NET35 30 | /// 31 | /// Make an async request to Twilio, returns non-2XX responses as well 32 | /// 33 | /// 34 | /// request to make 35 | /// throws exception on network or connection errors. 36 | /// response of the request 37 | public abstract System.Threading.Tasks.Task MakeRequestAsync(Request request); 38 | #endif 39 | 40 | /// 41 | /// Set the authentication string for the request 42 | /// 43 | /// 44 | /// username of the request 45 | /// password of the request 46 | /// authentication string 47 | public string Authentication(string username, string password) 48 | { 49 | var credentials = username + ":" + password; 50 | var encoded = System.Text.Encoding.UTF8.GetBytes(credentials); 51 | return Convert.ToBase64String(encoded); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Twilio/Http/NoAuth/NoAuthHttpClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Twilio.Annotations; 3 | 4 | namespace Twilio.Http.NoAuth 5 | { 6 | /// 7 | /// Base http client used to make Twilio requests 8 | /// 9 | [Deprecated] 10 | public abstract class NoAuthHttpClient 11 | { 12 | /// 13 | /// The last request made by this client 14 | /// 15 | public NoAuthRequest LastRequest { get; protected set; } 16 | 17 | /// 18 | /// The last response received by this client 19 | /// 20 | public Response LastResponse { get; protected set; } 21 | 22 | /// 23 | /// Make a request to Twilio, returns non-2XX responses as well 24 | /// 25 | /// 26 | /// request to make 27 | /// throws exception on network or connection errors. 28 | /// response of the request 29 | public abstract Response MakeRequest(NoAuthRequest request); 30 | 31 | #if !NET35 32 | /// 33 | /// Make an async request to Twilio, returns non-2XX responses as well 34 | /// 35 | /// 36 | /// request to make 37 | /// throws exception on network or connection errors. 38 | /// response of the request 39 | public abstract System.Threading.Tasks.Task MakeRequestAsync(NoAuthRequest request); 40 | #endif 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Twilio/Http/Response.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | #if NET35 4 | using Headers = System.Net.WebHeaderCollection; 5 | #else 6 | using Headers = System.Net.Http.Headers.HttpResponseHeaders; 7 | #endif 8 | 9 | namespace Twilio.Http 10 | { 11 | /// 12 | /// Twilio response 13 | /// 14 | public class Response 15 | { 16 | /// 17 | /// HTTP status code 18 | /// 19 | public HttpStatusCode StatusCode { get; } 20 | 21 | /// 22 | /// Content string 23 | /// 24 | public string Content { get; } 25 | 26 | /// 27 | /// Headers 28 | /// 29 | public Headers Headers { get; } 30 | 31 | /// 32 | /// Create a new Response 33 | /// 34 | /// HTTP status code 35 | /// Content string 36 | /// Headers 37 | public Response(HttpStatusCode statusCode, string content, Headers headers = null) 38 | { 39 | StatusCode = statusCode; 40 | Content = content; 41 | Headers = headers; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Twilio/JWT/AccessToken/ConversationsGrant.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Twilio.Jwt.AccessToken 4 | { 5 | /// 6 | /// Grant to use for Twilio Conversations 7 | /// 8 | [System.Obsolete("ConversationsGrant is deprecated, use VideoGrant instead")] 9 | public class ConversationsGrant : IGrant 10 | { 11 | /// 12 | /// Configuration profile SID for the grant 13 | /// 14 | public string ConfigurationProfileSid { get; set; } 15 | 16 | /// 17 | /// Get the grant key 18 | /// 19 | /// 20 | /// grant key 21 | public string Key 22 | { 23 | get 24 | { 25 | return "rtc"; 26 | } 27 | } 28 | 29 | /// 30 | /// Get the grant payload 31 | /// 32 | /// 33 | /// grant payload 34 | public object Payload 35 | { 36 | get 37 | { 38 | var payload = new Dictionary(); 39 | if (ConfigurationProfileSid != null) 40 | { 41 | payload.Add("configuration_profile_sid", ConfigurationProfileSid); 42 | } 43 | 44 | return payload; 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Twilio/JWT/AccessToken/IGrant.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.Jwt.AccessToken 2 | { 3 | /// 4 | /// Grant used in Access Tokens 5 | /// 6 | public interface IGrant 7 | { 8 | /// 9 | /// Get the name of the grant. 10 | /// 11 | /// 12 | /// String - the name of the grant 13 | string Key { get; } 14 | 15 | /// 16 | /// Get the data of the grant 17 | /// 18 | /// 19 | /// Object - the data of the grant 20 | object Payload { get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Twilio/JWT/AccessToken/PlaybackGrant.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Twilio.Jwt.AccessToken 4 | { 5 | /// 6 | /// Grant to expose Twilio Live 7 | /// 8 | public class PlaybackGrant : IGrant 9 | { 10 | /// 11 | /// Grant payload 12 | /// 13 | public Dictionary Grant { get; set; } 14 | 15 | /// 16 | /// Get the playback grant key 17 | /// 18 | /// 19 | /// the playback grant key 20 | public string Key 21 | { 22 | get 23 | { 24 | return "player"; 25 | } 26 | } 27 | 28 | /// 29 | /// Get the playback grant payload 30 | /// 31 | /// 32 | /// the video grant payload 33 | public object Payload 34 | { 35 | get 36 | { 37 | return Grant; 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Twilio/JWT/AccessToken/SyncGrant.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Twilio.Jwt.AccessToken 4 | { 5 | /// 6 | /// Grant for Twilio Sync 7 | /// 8 | public class SyncGrant : IGrant 9 | { 10 | /// 11 | /// Sync service SID 12 | /// 13 | public string ServiceSid { get; set; } 14 | 15 | /// 16 | /// Endpoint ID 17 | /// 18 | public string EndpointId { get; set; } 19 | 20 | /// 21 | /// Get the grant key 22 | /// 23 | /// 24 | /// the grant key 25 | public string Key 26 | { 27 | get 28 | { 29 | return "data_sync"; 30 | } 31 | } 32 | 33 | /// 34 | /// Get the grant payload 35 | /// 36 | /// 37 | /// the grant payload 38 | public object Payload 39 | { 40 | get 41 | { 42 | var payload = new Dictionary(); 43 | 44 | if (ServiceSid != null) 45 | { 46 | payload.Add("service_sid", ServiceSid); 47 | } 48 | 49 | if (EndpointId != null) 50 | { 51 | payload.Add("endpoint_id", EndpointId); 52 | } 53 | 54 | return payload; 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Twilio/JWT/AccessToken/TaskRouterGrant.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Twilio.Jwt.AccessToken 4 | { 5 | /// 6 | /// Grant to use for Twilio TaskRouter 7 | /// 8 | public class TaskRouterGrant : IGrant 9 | { 10 | /// 11 | /// Workspace SID 12 | /// 13 | public string WorkspaceSid { get; set; } 14 | 15 | /// 16 | /// Worker SID 17 | /// 18 | public string WorkerSid { get; set; } 19 | 20 | /// 21 | /// Role 22 | /// 23 | public string Role { get; set; } 24 | 25 | /// 26 | /// Get the grant name 27 | /// 28 | /// 29 | /// name of the grant 30 | public string Key 31 | { 32 | get 33 | { 34 | return "task_router"; 35 | } 36 | } 37 | 38 | /// 39 | /// Get the grant payload 40 | /// 41 | /// 42 | /// payload of the grant 43 | public object Payload 44 | { 45 | get 46 | { 47 | var payload = new Dictionary(); 48 | 49 | if (WorkspaceSid != null) 50 | { 51 | payload.Add("workspace_sid", WorkspaceSid); 52 | } 53 | if (WorkerSid != null) 54 | { 55 | payload.Add("worker_sid", WorkerSid); 56 | } 57 | if (Role != null) 58 | { 59 | payload.Add("role", Role); 60 | } 61 | 62 | return payload; 63 | } 64 | } 65 | 66 | } 67 | } -------------------------------------------------------------------------------- /src/Twilio/JWT/AccessToken/VideoGrant.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Twilio.Jwt.AccessToken 4 | { 5 | /// 6 | /// Grant to expose Twilio Video 7 | /// 8 | public class VideoGrant : IGrant 9 | { 10 | /// 11 | /// Configuration profile SID 12 | /// 13 | [System.Obsolete("ConfigurationProfileSid is deprecated, use Room instead")] 14 | public string ConfigurationProfileSid { get; set; } 15 | 16 | /// 17 | /// Roome SID or name 18 | /// 19 | public string Room { get; set; } 20 | 21 | /// 22 | /// Get the Video grant key 23 | /// 24 | /// 25 | /// the video grant key 26 | public string Key 27 | { 28 | get 29 | { 30 | return "video"; 31 | } 32 | } 33 | 34 | /// 35 | /// Get the video grant payload 36 | /// 37 | /// 38 | /// the video grant payload 39 | public object Payload 40 | { 41 | get 42 | { 43 | var payload = new Dictionary(); 44 | if (ConfigurationProfileSid != null) 45 | { 46 | payload.Add("configuration_profile_sid", ConfigurationProfileSid); 47 | } 48 | if (Room != null) 49 | { 50 | payload.Add("room", Room); 51 | } 52 | 53 | return payload; 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Twilio/JWT/Client/ClientCapability.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Twilio.Jwt 5 | { 6 | /// 7 | /// JWT for Twilio Client 8 | /// 9 | public class ClientCapability : BaseJwt 10 | { 11 | private readonly HashSet _scopes; 12 | 13 | /// 14 | /// Create a new Client JWT 15 | /// 16 | /// Twilio Account SID 17 | /// Twilio auth token 18 | /// JWT expiration 19 | /// Scopes to give access to 20 | public ClientCapability( 21 | string accountSid, 22 | string authToken, 23 | DateTime? expiration = null, 24 | HashSet scopes = null 25 | ) : base (authToken, accountSid, expiration.HasValue ? expiration.Value : DateTime.UtcNow.AddSeconds(3600)) 26 | { 27 | this._scopes = scopes; 28 | } 29 | 30 | /// 31 | /// JWT headers 32 | /// 33 | public override Dictionary Headers 34 | { 35 | get 36 | { 37 | return new Dictionary(); 38 | } 39 | } 40 | 41 | /// 42 | /// Get the JWT claims in JSON format 43 | /// 44 | public override Dictionary Claims 45 | { 46 | get 47 | { 48 | var claims = new Dictionary(); 49 | if (_scopes != null) 50 | { 51 | var scopes = new List(); 52 | foreach (var scope in _scopes) 53 | { 54 | scopes.Add(scope.Payload); 55 | } 56 | 57 | claims.Add("scope", String.Join(" ", scopes.ToArray())); 58 | } 59 | 60 | return claims; 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/Twilio/JWT/Client/EventStreamScope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | #if !NET35 5 | using System.Net; 6 | #else 7 | using System.Web; 8 | #endif 9 | 10 | namespace Twilio.Jwt.Client 11 | { 12 | /// 13 | /// Event stream scope for client capabilities 14 | /// 15 | public class EventStreamScope : IScope 16 | { 17 | private static readonly string Scope = "scope:stream:subscribe"; 18 | 19 | private readonly Dictionary _filters; 20 | 21 | /// 22 | /// Create a new EventStreamScope 23 | /// 24 | /// filters to use 25 | public EventStreamScope(Dictionary filters = null) 26 | { 27 | this._filters = filters; 28 | } 29 | 30 | /// 31 | /// Generate scope payload 32 | /// 33 | public string Payload 34 | { 35 | get 36 | { 37 | var queryArgs = new List(); 38 | queryArgs.Add("path=/2010-04-01/Events"); 39 | 40 | if (_filters != null) 41 | { 42 | queryArgs.Add(BuildParameter("appParams", GetFilterParams())); 43 | } 44 | 45 | var queryString = String.Join("&", queryArgs.ToArray()); 46 | return Scope + "?" + queryString; 47 | } 48 | } 49 | 50 | private string GetFilterParams() 51 | { 52 | var queryParams = new List(); 53 | foreach (var entry in _filters) 54 | { 55 | queryParams.Add(BuildParameter(entry.Key, entry.Value)); 56 | } 57 | 58 | return String.Join("&", queryParams.ToArray()); 59 | } 60 | 61 | private string BuildParameter(string k, string v) 62 | { 63 | #if !NET35 64 | return WebUtility.UrlEncode(k) + "=" + WebUtility.UrlEncode(v); 65 | #else 66 | return HttpUtility.UrlEncode(k) + "=" + HttpUtility.UrlEncode(v); 67 | #endif 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/Twilio/JWT/Client/IScope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Jwt 4 | { 5 | /// 6 | /// Scope interface of client capabilities 7 | /// 8 | public interface IScope 9 | { 10 | /// 11 | /// Generate the scope payload 12 | /// 13 | string Payload { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Twilio/JWT/Client/IncomingClientScope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Jwt.Client 4 | { 5 | /// 6 | /// Incoming client scope for client capabilities 7 | /// 8 | public class IncomingClientScope : IScope 9 | { 10 | private static readonly string Scope = "scope:client:incoming"; 11 | 12 | private readonly string _clientName; 13 | 14 | /// 15 | /// Create a new IncomingClientScope 16 | /// 17 | /// Client name 18 | public IncomingClientScope(string clientName) 19 | { 20 | this._clientName = clientName; 21 | } 22 | 23 | /// 24 | /// Generate scope payload 25 | /// 26 | public string Payload 27 | { 28 | get 29 | { 30 | var query = "clientName=" + _clientName; 31 | return Scope + "?" + query; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Twilio/JWT/Taskrouter/PolicyUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Twilio.Http; 4 | 5 | namespace Twilio.Jwt.Taskrouter 6 | { 7 | /// 8 | /// Utility class for generating Policies 9 | /// 10 | public class PolicyUtils 11 | { 12 | private static readonly string TaskRouterEventUrl = "https://event-bridge.twilio.com/v1/wschannels"; 13 | 14 | private PolicyUtils() {} 15 | 16 | /// 17 | /// Generate default event bridge policies 18 | /// 19 | /// Twilio account SID 20 | /// TaskRouter channel ID 21 | /// Default event bridge policies 22 | public static List DefaultEventBridgePolicies(string accountSid, string channelId) 23 | { 24 | var url = TaskRouterEventUrl + "/" + accountSid + "/" + channelId; 25 | return new List 26 | { 27 | { new Policy(url, HttpMethod.Get) }, 28 | { new Policy(url, HttpMethod.Post) } 29 | }; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Twilio/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 8 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 9 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 10 | 11 | internal class AssemblyInfomation 12 | { 13 | public const string AssemblyInformationalVersion = "7.11.2"; 14 | } 15 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Accounts/V1/AuthTokenPromotionOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Accounts 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Accounts.V1 25 | { 26 | /// Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error. 27 | public class UpdateAuthTokenPromotionOptions : IOptions 28 | { 29 | 30 | 31 | 32 | 33 | 34 | /// Generate the necessary parameters 35 | public List> GetParams() 36 | { 37 | var p = new List>(); 38 | 39 | return p; 40 | } 41 | 42 | 43 | 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Accounts 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Accounts.V1 25 | { 26 | 27 | /// Create a new secondary Auth Token 28 | public class CreateSecondaryAuthTokenOptions : IOptions 29 | { 30 | 31 | 32 | 33 | 34 | /// Generate the necessary parameters 35 | public List> GetParams() 36 | { 37 | var p = new List>(); 38 | 39 | return p; 40 | } 41 | 42 | 43 | 44 | } 45 | /// Delete the secondary Auth Token from your account 46 | public class DeleteSecondaryAuthTokenOptions : IOptions 47 | { 48 | 49 | 50 | 51 | 52 | 53 | /// Generate the necessary parameters 54 | public List> GetParams() 55 | { 56 | var p = new List>(); 57 | 58 | return p; 59 | } 60 | 61 | 62 | 63 | } 64 | 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Api/V2010/Account/BalanceOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Api 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Api.V2010.Account 25 | { 26 | /// Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information 27 | public class FetchBalanceOptions : IOptions 28 | { 29 | 30 | /// The unique SID identifier of the Account. 31 | public string PathAccountSid { get; set; } 32 | 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | return p; 43 | } 44 | 45 | 46 | 47 | } 48 | 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Api/V2010/Account/Call/EventOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Api 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Api.V2010.Account.Call 25 | { 26 | /// Retrieve a list of all events for a call. 27 | public class ReadEventOptions : ReadOptions 28 | { 29 | 30 | /// The unique SID identifier of the Call. 31 | public string PathCallSid { get; } 32 | 33 | /// The unique SID identifier of the Account. 34 | public string PathAccountSid { get; set; } 35 | 36 | 37 | 38 | /// Construct a new ListCallEventOptions 39 | /// The unique SID identifier of the Call. 40 | public ReadEventOptions(string pathCallSid) 41 | { 42 | PathCallSid = pathCallSid; 43 | } 44 | 45 | 46 | /// Generate the necessary parameters 47 | public List> GetParams() 48 | { 49 | var p = new List>(); 50 | 51 | if (PageSize != null) 52 | { 53 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 54 | } 55 | return p; 56 | } 57 | 58 | 59 | 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Api 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Api.V2010.Account 25 | { 26 | 27 | /// create 28 | public class CreateNewKeyOptions : IOptions 29 | { 30 | 31 | /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. 32 | public string PathAccountSid { get; set; } 33 | 34 | /// A descriptive string that you create to describe the resource. It can be up to 64 characters long. 35 | public string FriendlyName { get; set; } 36 | 37 | 38 | 39 | 40 | /// Generate the necessary parameters 41 | public List> GetParams() 42 | { 43 | var p = new List>(); 44 | 45 | if (FriendlyName != null) 46 | { 47 | p.Add(new KeyValuePair("FriendlyName", FriendlyName)); 48 | } 49 | return p; 50 | } 51 | 52 | 53 | 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Api 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Api.V2010.Account 25 | { 26 | 27 | /// Create a new Signing Key for the account making the request. 28 | public class CreateNewSigningKeyOptions : IOptions 29 | { 30 | 31 | /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. 32 | public string PathAccountSid { get; set; } 33 | 34 | /// A descriptive string that you create to describe the resource. It can be up to 64 characters long. 35 | public string FriendlyName { get; set; } 36 | 37 | 38 | 39 | 40 | /// Generate the necessary parameters 41 | public List> GetParams() 42 | { 43 | var p = new List>(); 44 | 45 | if (FriendlyName != null) 46 | { 47 | p.Add(new KeyValuePair("FriendlyName", FriendlyName)); 48 | } 49 | return p; 50 | } 51 | 52 | 53 | 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Api/V2010/Account/TokenOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Api 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Api.V2010.Account 25 | { 26 | 27 | /// Create a new token for ICE servers 28 | public class CreateTokenOptions : IOptions 29 | { 30 | 31 | /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. 32 | public string PathAccountSid { get; set; } 33 | 34 | /// The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). 35 | public int? Ttl { get; set; } 36 | 37 | 38 | 39 | 40 | /// Generate the necessary parameters 41 | public List> GetParams() 42 | { 43 | var p = new List>(); 44 | 45 | if (Ttl != null) 46 | { 47 | p.Add(new KeyValuePair("Ttl", Ttl.ToString())); 48 | } 49 | return p; 50 | } 51 | 52 | 53 | 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Assistants/V1/Knowledge/ChunkOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Assistants 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Assistants.V1.Knowledge 25 | { 26 | /// List knowledge chunks 27 | public class ReadChunkOptions : ReadOptions 28 | { 29 | 30 | /// The knowledge ID. 31 | public string PathId { get; } 32 | 33 | 34 | 35 | /// Construct a new ListKnowledgeChunksOptions 36 | /// The knowledge ID. 37 | public ReadChunkOptions(string pathId) 38 | { 39 | PathId = pathId; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | if (PageSize != null) 49 | { 50 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 51 | } 52 | return p; 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Assistants/V1/Knowledge/KnowledgeStatusOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Assistants 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Assistants.V1.Knowledge 25 | { 26 | /// Get knowledge status 27 | public class FetchKnowledgeStatusOptions : IOptions 28 | { 29 | 30 | /// the Knowledge ID. 31 | public string PathId { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchKnowledgeStatusOptions 36 | /// the Knowledge ID. 37 | public FetchKnowledgeStatusOptions(string pathId) 38 | { 39 | PathId = pathId; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Assistants/V1/PolicyOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Assistants 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Assistants.V1 25 | { 26 | /// List policies 27 | public class ReadPolicyOptions : ReadOptions 28 | { 29 | 30 | /// The tool ID. 31 | public string ToolId { get; set; } 32 | 33 | /// The knowledge ID. 34 | public string KnowledgeId { get; set; } 35 | 36 | 37 | 38 | 39 | 40 | /// Generate the necessary parameters 41 | public List> GetParams() 42 | { 43 | var p = new List>(); 44 | 45 | if (ToolId != null) 46 | { 47 | p.Add(new KeyValuePair("ToolId", ToolId)); 48 | } 49 | if (KnowledgeId != null) 50 | { 51 | p.Add(new KeyValuePair("KnowledgeId", KnowledgeId)); 52 | } 53 | if (PageSize != null) 54 | { 55 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 56 | } 57 | return p; 58 | } 59 | 60 | 61 | 62 | } 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Assistants/V1/Session/MessageOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Assistants 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Assistants.V1.Session 25 | { 26 | /// List messages 27 | public class ReadMessageOptions : ReadOptions 28 | { 29 | 30 | /// Session id or name 31 | public string PathSessionId { get; } 32 | 33 | 34 | 35 | /// Construct a new ListMessagesOptions 36 | /// Session id or name 37 | public ReadMessageOptions(string pathSessionId) 38 | { 39 | PathSessionId = pathSessionId; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | if (PageSize != null) 49 | { 50 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 51 | } 52 | return p; 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Bulkexports/V1/ExportOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Bulkexports 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Bulkexports.V1 25 | { 26 | /// Fetch a specific Export. 27 | public class FetchExportOptions : IOptions 28 | { 29 | 30 | /// The type of communication – Messages, Calls, Conferences, and Participants 31 | public string PathResourceType { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchExportOptions 36 | /// The type of communication – Messages, Calls, Conferences, and Participants 37 | public FetchExportOptions(string pathResourceType) 38 | { 39 | PathResourceType = pathResourceType; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Content/V1/Content/ApprovalCreateOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Content 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Content.V1.Content 25 | { 26 | 27 | /// create 28 | public class CreateApprovalCreateOptions : IOptions 29 | { 30 | 31 | 32 | public string PathContentSid { get; } 33 | 34 | 35 | public ApprovalCreateResource.ContentApprovalRequest ContentApprovalRequest { get; } 36 | 37 | 38 | /// Construct a new CreateApprovalCreateOptions 39 | /// 40 | /// 41 | public CreateApprovalCreateOptions(string pathContentSid, ApprovalCreateResource.ContentApprovalRequest contentApprovalRequest) 42 | { 43 | PathContentSid = pathContentSid; 44 | ContentApprovalRequest = contentApprovalRequest; 45 | } 46 | 47 | 48 | /// Generate the request body 49 | public string GetBody() 50 | { 51 | string body = ""; 52 | 53 | if (ContentApprovalRequest != null) 54 | { 55 | body = ApprovalCreateResource.ToJson(ContentApprovalRequest); 56 | } 57 | return body; 58 | } 59 | 60 | 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Content 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Content.V1.Content 25 | { 26 | /// Fetch a Content resource's approval status by its unique Content Sid 27 | public class FetchApprovalFetchOptions : IOptions 28 | { 29 | 30 | /// The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch. 31 | public string PathSid { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchApprovalFetchOptions 36 | /// The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch. 37 | public FetchApprovalFetchOptions(string pathSid) 38 | { 39 | PathSid = pathSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Content/V1/ContentAndApprovalsOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Content 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Content.V1 25 | { 26 | /// Retrieve a list of Contents with approval statuses belonging to the account used to make the request 27 | public class ReadContentAndApprovalsOptions : ReadOptions 28 | { 29 | 30 | 31 | 32 | 33 | 34 | /// Generate the necessary parameters 35 | public List> GetParams() 36 | { 37 | var p = new List>(); 38 | 39 | if (PageSize != null) 40 | { 41 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 42 | } 43 | return p; 44 | } 45 | 46 | 47 | 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Content/V1/LegacyContentOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Content 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Content.V1 25 | { 26 | /// Retrieve a list of Legacy Contents belonging to the account used to make the request 27 | public class ReadLegacyContentOptions : ReadOptions 28 | { 29 | 30 | 31 | 32 | 33 | 34 | /// Generate the necessary parameters 35 | public List> GetParams() 36 | { 37 | var p = new List>(); 38 | 39 | if (PageSize != null) 40 | { 41 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 42 | } 43 | return p; 44 | } 45 | 46 | 47 | 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Events/V1/SchemaOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Events 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Events.V1 25 | { 26 | /// Fetch a specific schema with its nested versions. 27 | public class FetchSchemaOptions : IOptions 28 | { 29 | 30 | /// The unique identifier of the schema. Each schema can have multiple versions, that share the same id. 31 | public string PathId { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchSchemaOptions 36 | /// The unique identifier of the schema. Each schema can have multiple versions, that share the same id. 37 | public FetchSchemaOptions(string pathId) 38 | { 39 | PathId = pathId; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Events/V1/Sink/SinkTestOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Events 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Events.V1.Sink 25 | { 26 | 27 | /// Create a new Sink Test Event for the given Sink. 28 | public class CreateSinkTestOptions : IOptions 29 | { 30 | 31 | /// A 34 character string that uniquely identifies the Sink to be Tested. 32 | public string PathSid { get; } 33 | 34 | 35 | /// Construct a new CreateSinkTestOptions 36 | /// A 34 character string that uniquely identifies the Sink to be Tested. 37 | public CreateSinkTestOptions(string pathSid) 38 | { 39 | PathSid = pathSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Flex 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.FlexApi.V1 25 | { 26 | /// fetch 27 | public class FetchConfigurationOptions : IOptions 28 | { 29 | 30 | /// The Pinned UI version of the Configuration resource to fetch. 31 | public string UiVersion { get; set; } 32 | 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | if (UiVersion != null) 43 | { 44 | p.Add(new KeyValuePair("UiVersion", UiVersion)); 45 | } 46 | return p; 47 | } 48 | 49 | 50 | 51 | } 52 | 53 | 54 | /// update 55 | public class UpdateConfigurationOptions : IOptions 56 | { 57 | 58 | 59 | public object Body { get; set; } 60 | 61 | 62 | 63 | 64 | 65 | /// Generate the request body 66 | public string GetBody() 67 | { 68 | string body = ""; 69 | 70 | if (Body != null) 71 | { 72 | body = ConfigurationResource.ToJson(Body); 73 | } 74 | return body; 75 | } 76 | 77 | 78 | } 79 | 80 | 81 | } 82 | 83 | -------------------------------------------------------------------------------- /src/Twilio/Rest/FlexApi/V1/InsightsSessionOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Flex 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.FlexApi.V1 25 | { 26 | 27 | /// To obtain session details for fetching reports and dashboards 28 | public class CreateInsightsSessionOptions : IOptions 29 | { 30 | 31 | /// The Authorization HTTP request header 32 | public string Authorization { get; set; } 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | return p; 43 | } 44 | 45 | 46 | /// Generate the necessary header parameters 47 | public List> GetHeaderParams() 48 | { 49 | var p = new List>(); 50 | if (Authorization != null) 51 | { 52 | p.Add(new KeyValuePair("Authorization", Authorization)); 53 | } 54 | return p; 55 | } 56 | 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Flex 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.FlexApi.V1 25 | { 26 | /// To get the Answer Set Settings for an Account 27 | public class FetchInsightsSettingsAnswerSetsOptions : IOptions 28 | { 29 | 30 | /// The Authorization HTTP request header 31 | public string Authorization { get; set; } 32 | 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | return p; 43 | } 44 | 45 | 46 | /// Generate the necessary header parameters 47 | public List> GetHeaderParams() 48 | { 49 | var p = new List>(); 50 | if (Authorization != null) 51 | { 52 | p.Add(new KeyValuePair("Authorization", Authorization)); 53 | } 54 | return p; 55 | } 56 | 57 | } 58 | 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Flex 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.FlexApi.V1 25 | { 26 | /// To get the Comment Settings for an Account 27 | public class FetchInsightsSettingsCommentOptions : IOptions 28 | { 29 | 30 | /// The Authorization HTTP request header 31 | public string Authorization { get; set; } 32 | 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | return p; 43 | } 44 | 45 | 46 | /// Generate the necessary header parameters 47 | public List> GetHeaderParams() 48 | { 49 | var p = new List>(); 50 | if (Authorization != null) 51 | { 52 | p.Add(new KeyValuePair("Authorization", Authorization)); 53 | } 54 | return p; 55 | } 56 | 57 | } 58 | 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/Twilio/Rest/FlexApi/V1/InsightsUserRolesOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Flex 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.FlexApi.V1 25 | { 26 | /// This is used by Flex UI and Quality Management to fetch the Flex Insights roles for the user 27 | public class FetchInsightsUserRolesOptions : IOptions 28 | { 29 | 30 | /// The Authorization HTTP request header 31 | public string Authorization { get; set; } 32 | 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | return p; 43 | } 44 | 45 | 46 | /// Generate the necessary header parameters 47 | public List> GetHeaderParams() 48 | { 49 | var p = new List>(); 50 | if (Authorization != null) 51 | { 52 | p.Add(new KeyValuePair("Authorization", Authorization)); 53 | } 54 | return p; 55 | } 56 | 57 | } 58 | 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/Twilio/Rest/FlexApi/V1/ProvisioningStatusOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Flex 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.FlexApi.V1 25 | { 26 | /// fetch 27 | public class FetchProvisioningStatusOptions : IOptions 28 | { 29 | 30 | 31 | 32 | 33 | 34 | /// Generate the necessary parameters 35 | public List> GetParams() 36 | { 37 | var p = new List>(); 38 | 39 | return p; 40 | } 41 | 42 | 43 | 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Iam/V1/GetApiKeysOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Iam 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Iam.V1 25 | { 26 | /// Retrieve a list of all Keys for a account. 27 | public class ReadGetApiKeysOptions : ReadOptions 28 | { 29 | 30 | /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. 31 | public string AccountSid { get; } 32 | 33 | 34 | 35 | /// Construct a new ListGetKeysOptions 36 | /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. 37 | public ReadGetApiKeysOptions(string accountSid) 38 | { 39 | AccountSid = accountSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | if (AccountSid != null) 49 | { 50 | p.Add(new KeyValuePair("AccountSid", AccountSid)); 51 | } 52 | if (PageSize != null) 53 | { 54 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 55 | } 56 | return p; 57 | } 58 | 59 | 60 | 61 | } 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Insights 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Insights.V1.Call 25 | { 26 | /// Get a specific Call Summary. 27 | public class FetchCallSummaryOptions : IOptions 28 | { 29 | 30 | /// The unique SID identifier of the Call. 31 | public string PathCallSid { get; } 32 | 33 | /// The Processing State of this Call Summary. One of `complete`, `partial` or `all`. 34 | public CallSummaryResource.ProcessingStateEnum ProcessingState { get; set; } 35 | 36 | 37 | 38 | /// Construct a new FetchSummaryOptions 39 | /// The unique SID identifier of the Call. 40 | public FetchCallSummaryOptions(string pathCallSid) 41 | { 42 | PathCallSid = pathCallSid; 43 | } 44 | 45 | 46 | /// Generate the necessary parameters 47 | public List> GetParams() 48 | { 49 | var p = new List>(); 50 | 51 | if (ProcessingState != null) 52 | { 53 | p.Add(new KeyValuePair("ProcessingState", ProcessingState.ToString())); 54 | } 55 | return p; 56 | } 57 | 58 | 59 | 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Insights/V1/CallOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Insights 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Insights.V1 25 | { 26 | /// fetch 27 | public class FetchCallOptions : IOptions 28 | { 29 | 30 | 31 | public string PathSid { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchCallOptions 36 | /// 37 | public FetchCallOptions(string pathSid) 38 | { 39 | PathSid = pathSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Intelligence/V2/OperatorAttachmentsOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Intelligence 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Intelligence.V2 25 | { 26 | /// Retrieve Operators attached to a Service. 27 | public class FetchOperatorAttachmentsOptions : IOptions 28 | { 29 | 30 | /// The unique SID identifier of the Service. 31 | public string PathServiceSid { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchOperatorAttachmentsOptions 36 | /// The unique SID identifier of the Service. 37 | public FetchOperatorAttachmentsOptions(string pathServiceSid) 38 | { 39 | PathServiceSid = pathServiceSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Intelligence/V2/Transcript/MediaOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Intelligence 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Intelligence.V2.Transcript 25 | { 26 | /// Get download URLs for media if possible 27 | public class FetchMediaOptions : IOptions 28 | { 29 | 30 | /// The unique SID identifier of the Transcript. 31 | public string PathSid { get; } 32 | 33 | /// Grant access to PII Redacted/Unredacted Media. If redaction is enabled, the default is `true` to access redacted media. 34 | public bool? Redacted { get; set; } 35 | 36 | 37 | 38 | /// Construct a new FetchMediaOptions 39 | /// The unique SID identifier of the Transcript. 40 | public FetchMediaOptions(string pathSid) 41 | { 42 | PathSid = pathSid; 43 | } 44 | 45 | 46 | /// Generate the necessary parameters 47 | public List> GetParams() 48 | { 49 | var p = new List>(); 50 | 51 | if (Redacted != null) 52 | { 53 | p.Add(new KeyValuePair("Redacted", Redacted.Value.ToString().ToLower())); 54 | } 55 | return p; 56 | } 57 | 58 | 59 | 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Ip_messaging 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.IpMessaging.V1.Service.User 25 | { 26 | /// read 27 | public class ReadUserChannelOptions : ReadOptions 28 | { 29 | 30 | 31 | public string PathServiceSid { get; } 32 | 33 | 34 | public string PathUserSid { get; } 35 | 36 | 37 | 38 | /// Construct a new ListUserChannelOptions 39 | /// 40 | /// 41 | public ReadUserChannelOptions(string pathServiceSid, string pathUserSid) 42 | { 43 | PathServiceSid = pathServiceSid; 44 | PathUserSid = pathUserSid; 45 | } 46 | 47 | 48 | /// Generate the necessary parameters 49 | public List> GetParams() 50 | { 51 | var p = new List>(); 52 | 53 | if (PageSize != null) 54 | { 55 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 56 | } 57 | return p; 58 | } 59 | 60 | 61 | 62 | } 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Knowledge/V1/Knowledge/ChunkOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Knowledge 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Knowledge.V1.Knowledge 25 | { 26 | /// List knowledge chunks 27 | public class ReadChunkOptions : ReadOptions 28 | { 29 | 30 | /// The knowledge ID. 31 | public string PathId { get; } 32 | 33 | 34 | 35 | /// Construct a new ListKnowledgeChunksOptions 36 | /// The knowledge ID. 37 | public ReadChunkOptions(string pathId) 38 | { 39 | PathId = pathId; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | if (PageSize != null) 49 | { 50 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 51 | } 52 | return p; 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Knowledge/V1/Knowledge/KnowledgeStatusOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Knowledge 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Knowledge.V1.Knowledge 25 | { 26 | /// Get knowledge status 27 | public class FetchKnowledgeStatusOptions : IOptions 28 | { 29 | 30 | /// the Knowledge ID. 31 | public string PathId { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchKnowledgeStatusOptions 36 | /// the Knowledge ID. 37 | public FetchKnowledgeStatusOptions(string pathId) 38 | { 39 | PathId = pathId; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Marketplace/V1/ReferralConversionOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Marketplace 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Marketplace.V1 25 | { 26 | 27 | /// create 28 | public class CreateReferralConversionOptions : IOptions 29 | { 30 | 31 | 32 | public ReferralConversionResource.CreateReferralConversionRequest CreateReferralConversionRequest { get; } 33 | 34 | 35 | /// Construct a new CreateReferralConversionOptions 36 | /// 37 | public CreateReferralConversionOptions(ReferralConversionResource.CreateReferralConversionRequest createReferralConversionRequest) 38 | { 39 | CreateReferralConversionRequest = createReferralConversionRequest; 40 | } 41 | 42 | 43 | /// Generate the request body 44 | public string GetBody() 45 | { 46 | string body = ""; 47 | 48 | if (CreateReferralConversionRequest != null) 49 | { 50 | body = ReferralConversionResource.ToJson(CreateReferralConversionRequest); 51 | } 52 | return body; 53 | } 54 | 55 | 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Messaging 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Messaging.V1.BrandRegistration 25 | { 26 | 27 | /// create 28 | public class CreateBrandRegistrationOtpOptions : IOptions 29 | { 30 | 31 | /// Brand Registration Sid of Sole Proprietor Brand. 32 | public string PathBrandRegistrationSid { get; } 33 | 34 | 35 | /// Construct a new CreateBrandRegistrationOtpOptions 36 | /// Brand Registration Sid of Sole Proprietor Brand. 37 | public CreateBrandRegistrationOtpOptions(string pathBrandRegistrationSid) 38 | { 39 | PathBrandRegistrationSid = pathBrandRegistrationSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Messaging/V1/DeactivationsOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Messaging 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Messaging.V1 25 | { 26 | /// Fetch a list of all United States numbers that have been deactivated on a specific date. 27 | public class FetchDeactivationsOptions : IOptions 28 | { 29 | 30 | /// The request will return a list of all United States Phone Numbers that were deactivated on the day specified by this parameter. This date should be specified in YYYY-MM-DD format. 31 | public DateTime? Date { get; set; } 32 | 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | if (Date != null) 43 | { 44 | p.Add(new KeyValuePair("Date", Date.Value.ToString("yyyy-MM-dd"))); 45 | } 46 | return p; 47 | } 48 | 49 | 50 | 51 | } 52 | 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Messaging 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Messaging.V1 25 | { 26 | /// fetch 27 | public class FetchDomainConfigMessagingServiceOptions : IOptions 28 | { 29 | 30 | /// Unique string used to identify the Messaging service that this domain should be associated with. 31 | public string PathMessagingServiceSid { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchDomainConfigMessagingServiceOptions 36 | /// Unique string used to identify the Messaging service that this domain should be associated with. 37 | public FetchDomainConfigMessagingServiceOptions(string pathMessagingServiceSid) 38 | { 39 | PathMessagingServiceSid = pathMessagingServiceSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Messaging 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Messaging.V1 25 | { 26 | /// fetch 27 | public class FetchLinkshorteningMessagingServiceDomainAssociationOptions : IOptions 28 | { 29 | 30 | /// Unique string used to identify the Messaging service that this domain should be associated with. 31 | public string PathMessagingServiceSid { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchLinkshorteningMessagingServiceDomainAssociationOptions 36 | /// Unique string used to identify the Messaging service that this domain should be associated with. 37 | public FetchLinkshorteningMessagingServiceDomainAssociationOptions(string pathMessagingServiceSid) 38 | { 39 | PathMessagingServiceSid = pathMessagingServiceSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Messaging/V1/RequestManagedCertOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Messaging 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Messaging.V1 25 | { 26 | /// update 27 | public class UpdateRequestManagedCertOptions : IOptions 28 | { 29 | 30 | /// Unique string used to identify the domain that this certificate should be associated with. 31 | public string PathDomainSid { get; } 32 | 33 | 34 | 35 | /// Construct a new UpdateRequestManagedCertOptions 36 | /// Unique string used to identify the domain that this certificate should be associated with. 37 | public UpdateRequestManagedCertOptions(string pathDomainSid) 38 | { 39 | PathDomainSid = pathDomainSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Messaging/V1/UsecaseOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Messaging 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Messaging.V1 25 | { 26 | /// fetch 27 | public class FetchUsecaseOptions : IOptions 28 | { 29 | 30 | 31 | 32 | 33 | 34 | /// Generate the necessary parameters 35 | public List> GetParams() 36 | { 37 | var p = new List>(); 38 | 39 | return p; 40 | } 41 | 42 | 43 | 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Microvisor/V1/App/AppManifestOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Microvisor 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Microvisor.V1.App 25 | { 26 | /// Retrieve the Manifest for an App. 27 | public class FetchAppManifestOptions : IOptions 28 | { 29 | 30 | /// A 34-character string that uniquely identifies this App. 31 | public string PathAppSid { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchAppManifestOptions 36 | /// A 34-character string that uniquely identifies this App. 37 | public FetchAppManifestOptions(string pathAppSid) 38 | { 39 | PathAppSid = pathAppSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Numbers/V1/EligibilityOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Numbers 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Numbers.V1 25 | { 26 | 27 | /// Create an eligibility check for a number that you want to host in Twilio. 28 | public class CreateEligibilityOptions : IOptions 29 | { 30 | 31 | 32 | public object Body { get; set; } 33 | 34 | 35 | 36 | 37 | /// Generate the request body 38 | public string GetBody() 39 | { 40 | string body = ""; 41 | 42 | if (Body != null) 43 | { 44 | body = EligibilityResource.ToJson(Body); 45 | } 46 | return body; 47 | } 48 | 49 | 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Numbers/V1/PortingWebhookConfigurationDeleteOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Numbers 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Numbers.V1 25 | { 26 | /// Allows the client to delete a webhook configuration. 27 | public class DeletePortingWebhookConfigurationDeleteOptions : IOptions 28 | { 29 | 30 | /// The webhook type for the configuration to be delete. `PORT_IN`, `PORT_OUT` 31 | public PortingWebhookConfigurationDeleteResource.WebhookTypeEnum PathWebhookType { get; } 32 | 33 | 34 | 35 | /// Construct a new DeletePortingWebhookConfigurationDeleteOptions 36 | /// The webhook type for the configuration to be delete. `PORT_IN`, `PORT_OUT` 37 | public DeletePortingWebhookConfigurationDeleteOptions(PortingWebhookConfigurationDeleteResource.WebhookTypeEnum pathWebhookType) 38 | { 39 | PathWebhookType = pathWebhookType; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Numbers/V1/PortingWebhookConfigurationOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Numbers 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Numbers.V1 25 | { 26 | 27 | /// Create a Webhook Configuration 28 | public class CreatePortingWebhookConfigurationOptions : IOptions 29 | { 30 | 31 | 32 | public object Body { get; set; } 33 | 34 | 35 | 36 | 37 | /// Generate the request body 38 | public string GetBody() 39 | { 40 | string body = ""; 41 | 42 | if (Body != null) 43 | { 44 | body = PortingWebhookConfigurationResource.ToJson(Body); 45 | } 46 | return body; 47 | } 48 | 49 | 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Numbers/V1/WebhookOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Numbers 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Numbers.V1 25 | { 26 | /// Allows to fetch the webhook configuration 27 | public class FetchWebhookOptions : IOptions 28 | { 29 | 30 | 31 | 32 | 33 | 34 | /// Generate the necessary parameters 35 | public List> GetParams() 36 | { 37 | var p = new List>(); 38 | 39 | return p; 40 | } 41 | 42 | 43 | 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Preview 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Preview.Wireless.Sim 25 | { 26 | /// fetch 27 | public class FetchUsageOptions : IOptions 28 | { 29 | 30 | 31 | public string PathSimSid { get; } 32 | 33 | 34 | public string End { get; set; } 35 | 36 | 37 | public string Start { get; set; } 38 | 39 | 40 | 41 | /// Construct a new FetchWirelessUsageOptions 42 | /// 43 | public FetchUsageOptions(string pathSimSid) 44 | { 45 | PathSimSid = pathSimSid; 46 | } 47 | 48 | 49 | /// Generate the necessary parameters 50 | public List> GetParams() 51 | { 52 | var p = new List>(); 53 | 54 | if (End != null) 55 | { 56 | p.Add(new KeyValuePair("End", End)); 57 | } 58 | if (Start != null) 59 | { 60 | p.Add(new KeyValuePair("Start", Start)); 61 | } 62 | return p; 63 | } 64 | 65 | 66 | 67 | } 68 | 69 | 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Pricing/V1/Voice/NumberOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Pricing 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Pricing.V1.Voice 25 | { 26 | /// fetch 27 | public class FetchNumberOptions : IOptions 28 | { 29 | 30 | /// The phone number to fetch. 31 | public Types.PhoneNumber PathNumber { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchVoiceNumberOptions 36 | /// The phone number to fetch. 37 | public FetchNumberOptions(Types.PhoneNumber pathNumber) 38 | { 39 | PathNumber = pathNumber; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Serverless 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Serverless.V1.Service.Build 25 | { 26 | /// Retrieve a specific Build resource. 27 | public class FetchBuildStatusOptions : IOptions 28 | { 29 | 30 | /// The SID of the Service to fetch the Build resource from. 31 | public string PathServiceSid { get; } 32 | 33 | /// The SID of the Build resource to fetch. 34 | public string PathSid { get; } 35 | 36 | 37 | 38 | /// Construct a new FetchBuildStatusOptions 39 | /// The SID of the Service to fetch the Build resource from. 40 | /// The SID of the Build resource to fetch. 41 | public FetchBuildStatusOptions(string pathServiceSid, string pathSid) 42 | { 43 | PathServiceSid = pathServiceSid; 44 | PathSid = pathSid; 45 | } 46 | 47 | 48 | /// Generate the necessary parameters 49 | public List> GetParams() 50 | { 51 | var p = new List>(); 52 | 53 | return p; 54 | } 55 | 56 | 57 | 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Studio 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Studio.V1.Flow.Engagement 25 | { 26 | /// Retrieve the most recent context for an Engagement. 27 | public class FetchEngagementContextOptions : IOptions 28 | { 29 | 30 | /// The SID of the Flow. 31 | public string PathFlowSid { get; } 32 | 33 | /// The SID of the Engagement. 34 | public string PathEngagementSid { get; } 35 | 36 | 37 | 38 | /// Construct a new FetchEngagementContextOptions 39 | /// The SID of the Flow. 40 | /// The SID of the Engagement. 41 | public FetchEngagementContextOptions(string pathFlowSid, string pathEngagementSid) 42 | { 43 | PathFlowSid = pathFlowSid; 44 | PathEngagementSid = pathEngagementSid; 45 | } 46 | 47 | 48 | /// Generate the necessary parameters 49 | public List> GetParams() 50 | { 51 | var p = new List>(); 52 | 53 | return p; 54 | } 55 | 56 | 57 | 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Studio 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Studio.V1.Flow.Execution 25 | { 26 | /// Retrieve the most recent context for an Execution. 27 | public class FetchExecutionContextOptions : IOptions 28 | { 29 | 30 | /// The SID of the Flow with the Execution context to fetch. 31 | public string PathFlowSid { get; } 32 | 33 | /// The SID of the Execution context to fetch. 34 | public string PathExecutionSid { get; } 35 | 36 | 37 | 38 | /// Construct a new FetchExecutionContextOptions 39 | /// The SID of the Flow with the Execution context to fetch. 40 | /// The SID of the Execution context to fetch. 41 | public FetchExecutionContextOptions(string pathFlowSid, string pathExecutionSid) 42 | { 43 | PathFlowSid = pathFlowSid; 44 | PathExecutionSid = pathExecutionSid; 45 | } 46 | 47 | 48 | /// Generate the necessary parameters 49 | public List> GetParams() 50 | { 51 | var p = new List>(); 52 | 53 | return p; 54 | } 55 | 56 | 57 | 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Studio 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Studio.V2.Flow.Execution 25 | { 26 | /// Retrieve the most recent context for an Execution. 27 | public class FetchExecutionContextOptions : IOptions 28 | { 29 | 30 | /// The SID of the Flow with the Execution context to fetch. 31 | public string PathFlowSid { get; } 32 | 33 | /// The SID of the Execution context to fetch. 34 | public string PathExecutionSid { get; } 35 | 36 | 37 | 38 | /// Construct a new FetchExecutionContextOptions 39 | /// The SID of the Flow with the Execution context to fetch. 40 | /// The SID of the Execution context to fetch. 41 | public FetchExecutionContextOptions(string pathFlowSid, string pathExecutionSid) 42 | { 43 | PathFlowSid = pathFlowSid; 44 | PathExecutionSid = pathExecutionSid; 45 | } 46 | 47 | 48 | /// Generate the necessary parameters 49 | public List> GetParams() 50 | { 51 | var p = new List>(); 52 | 53 | return p; 54 | } 55 | 56 | 57 | 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Supersim/V1/SettingsUpdateOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Supersim 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Supersim.V1 25 | { 26 | /// Retrieve a list of Settings Updates. 27 | public class ReadSettingsUpdateOptions : ReadOptions 28 | { 29 | 30 | /// Filter the Settings Updates by a Super SIM's SID or UniqueName. 31 | public string Sim { get; set; } 32 | 33 | /// Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`. 34 | public SettingsUpdateResource.StatusEnum Status { get; set; } 35 | 36 | 37 | 38 | 39 | 40 | /// Generate the necessary parameters 41 | public List> GetParams() 42 | { 43 | var p = new List>(); 44 | 45 | if (Sim != null) 46 | { 47 | p.Add(new KeyValuePair("Sim", Sim)); 48 | } 49 | if (Status != null) 50 | { 51 | p.Add(new KeyValuePair("Status", Status.ToString())); 52 | } 53 | if (PageSize != null) 54 | { 55 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 56 | } 57 | return p; 58 | } 59 | 60 | 61 | 62 | } 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Supersim 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Supersim.V1.Sim 25 | { 26 | /// Retrieve a list of Billing Periods for a Super SIM. 27 | public class ReadBillingPeriodOptions : ReadOptions 28 | { 29 | 30 | /// The SID of the Super SIM to list Billing Periods for. 31 | public string PathSimSid { get; } 32 | 33 | 34 | 35 | /// Construct a new ListBillingPeriodOptions 36 | /// The SID of the Super SIM to list Billing Periods for. 37 | public ReadBillingPeriodOptions(string pathSimSid) 38 | { 39 | PathSimSid = pathSimSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | if (PageSize != null) 49 | { 50 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 51 | } 52 | return p; 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Supersim 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Supersim.V1.Sim 25 | { 26 | /// Retrieve a list of IP Addresses for the given Super SIM. 27 | public class ReadSimIpAddressOptions : ReadOptions 28 | { 29 | 30 | /// The SID of the Super SIM to list IP Addresses for. 31 | public string PathSimSid { get; } 32 | 33 | 34 | 35 | /// Construct a new ListSimIpAddressOptions 36 | /// The SID of the Super SIM to list IP Addresses for. 37 | public ReadSimIpAddressOptions(string pathSimSid) 38 | { 39 | PathSimSid = pathSimSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | if (PageSize != null) 49 | { 50 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 51 | } 52 | return p; 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueBulkRealTimeStatisticsOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Taskrouter 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Taskrouter.V1.Workspace.TaskQueue 25 | { 26 | 27 | /// Fetch a Task Queue Real Time Statistics in bulk for the array of TaskQueue SIDs, support upto 50 in a request. 28 | public class CreateTaskQueueBulkRealTimeStatisticsOptions : IOptions 29 | { 30 | 31 | /// The unique SID identifier of the Workspace. 32 | public string PathWorkspaceSid { get; } 33 | 34 | 35 | public object Body { get; set; } 36 | 37 | 38 | /// Construct a new CreateTaskQueueBulkRealTimeStatisticsOptions 39 | /// The unique SID identifier of the Workspace. 40 | public CreateTaskQueueBulkRealTimeStatisticsOptions(string pathWorkspaceSid) 41 | { 42 | PathWorkspaceSid = pathWorkspaceSid; 43 | } 44 | 45 | 46 | /// Generate the request body 47 | public string GetBody() 48 | { 49 | string body = ""; 50 | 51 | if (Body != null) 52 | { 53 | body = TaskQueueBulkRealTimeStatisticsResource.ToJson(Body); 54 | } 55 | return body; 56 | } 57 | 58 | 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Verify/V2/FormOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Verify 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Verify.V2 25 | { 26 | /// Fetch the forms for a specific Form Type. 27 | public class FetchFormOptions : IOptions 28 | { 29 | 30 | /// The Type of this Form. Currently only `form-push` is supported. 31 | public FormResource.FormTypesEnum PathFormType { get; } 32 | 33 | 34 | 35 | /// Construct a new FetchFormOptions 36 | /// The Type of this Form. Currently only `form-push` is supported. 37 | public FetchFormOptions(FormResource.FormTypesEnum pathFormType) 38 | { 39 | PathFormType = pathFormType; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | return p; 49 | } 50 | 51 | 52 | 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Verify/V2/TemplateOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Verify 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Verify.V2 25 | { 26 | /// List all the available templates for a given Account. 27 | public class ReadTemplateOptions : ReadOptions 28 | { 29 | 30 | /// String filter used to query templates with a given friendly name. 31 | public string FriendlyName { get; set; } 32 | 33 | 34 | 35 | 36 | 37 | /// Generate the necessary parameters 38 | public List> GetParams() 39 | { 40 | var p = new List>(); 41 | 42 | if (FriendlyName != null) 43 | { 44 | p.Add(new KeyValuePair("FriendlyName", FriendlyName)); 45 | } 46 | if (PageSize != null) 47 | { 48 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 49 | } 50 | return p; 51 | } 52 | 53 | 54 | 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Video 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Video.V1.Room.Participant 25 | { 26 | /// update 27 | public class UpdateAnonymizeOptions : IOptions 28 | { 29 | 30 | /// The SID of the room with the participant to update. 31 | public string PathRoomSid { get; } 32 | 33 | /// The SID of the RoomParticipant resource to update. 34 | public string PathSid { get; } 35 | 36 | 37 | 38 | /// Construct a new UpdateRoomParticipantAnonymizeOptions 39 | /// The SID of the room with the participant to update. 40 | /// The SID of the RoomParticipant resource to update. 41 | public UpdateAnonymizeOptions(string pathRoomSid, string pathSid) 42 | { 43 | PathRoomSid = pathRoomSid; 44 | PathSid = pathSid; 45 | } 46 | 47 | 48 | /// Generate the necessary parameters 49 | public List> GetParams() 50 | { 51 | var p = new List>(); 52 | 53 | return p; 54 | } 55 | 56 | 57 | 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Voice/V1/ArchivedCallOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Voice 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Voice.V1 25 | { 26 | /// Delete an archived call record from Bulk Export. Note: this does not also delete the record from the Voice API. 27 | public class DeleteArchivedCallOptions : IOptions 28 | { 29 | 30 | /// The date of the Call in UTC. 31 | public DateTime? PathDate { get; } 32 | 33 | /// The Twilio-provided Call SID that uniquely identifies the Call resource to delete 34 | public string PathSid { get; } 35 | 36 | 37 | 38 | /// Construct a new DeleteArchivedCallOptions 39 | /// The date of the Call in UTC. 40 | /// The Twilio-provided Call SID that uniquely identifies the Call resource to delete 41 | public DeleteArchivedCallOptions(DateTime? pathDate, string pathSid) 42 | { 43 | PathDate = pathDate; 44 | PathSid = pathSid; 45 | } 46 | 47 | 48 | /// Generate the necessary parameters 49 | public List> GetParams() 50 | { 51 | var p = new List>(); 52 | 53 | return p; 54 | } 55 | 56 | 57 | 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was generated by 3 | * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | * 7 | * Twilio - Wireless 8 | * This is the public Twilio REST API. 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator. 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | 16 | using System; 17 | using System.Collections.Generic; 18 | using Twilio.Base; 19 | using Twilio.Converters; 20 | 21 | 22 | 23 | 24 | namespace Twilio.Rest.Wireless.V1.Sim 25 | { 26 | /// read 27 | public class ReadDataSessionOptions : ReadOptions 28 | { 29 | 30 | /// The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) with the Data Sessions to read. 31 | public string PathSimSid { get; } 32 | 33 | 34 | 35 | /// Construct a new ListDataSessionOptions 36 | /// The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) with the Data Sessions to read. 37 | public ReadDataSessionOptions(string pathSimSid) 38 | { 39 | PathSimSid = pathSimSid; 40 | } 41 | 42 | 43 | /// Generate the necessary parameters 44 | public List> GetParams() 45 | { 46 | var p = new List>(); 47 | 48 | if (PageSize != null) 49 | { 50 | p.Add(new KeyValuePair("PageSize", PageSize.ToString())); 51 | } 52 | return p; 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/Twilio/TwiML/Messaging/Body.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.IO; 7 | using System.Text; 8 | using System.Xml.Linq; 9 | 10 | namespace Twilio.TwiML.Messaging 11 | { 12 | 13 | /// 14 | /// Body TwiML Noun 15 | /// 16 | public class Body : TwiML 17 | { 18 | /// 19 | /// Message Body 20 | /// 21 | public string Message { get; set; } 22 | 23 | /// 24 | /// Create a new Body 25 | /// 26 | /// Message Body, the body of the TwiML Element. 27 | public Body(string message = null) : base("Body") 28 | { 29 | this.Message = message; 30 | } 31 | 32 | /// 33 | /// Return the body of the TwiML tag 34 | /// 35 | protected override string GetElementBody() 36 | { 37 | return this.Message != null ? this.Message : string.Empty; 38 | } 39 | 40 | /// 41 | /// Append a child TwiML element to this element returning this element to allow chaining. 42 | /// 43 | /// Child TwiML element to add 44 | public new Body Append(TwiML childElem) 45 | { 46 | return (Body) base.Append(childElem); 47 | } 48 | 49 | /// 50 | /// Add freeform key-value attributes to the generated xml 51 | /// 52 | /// Option key 53 | /// Option value 54 | public new Body SetOption(string key, object value) 55 | { 56 | return (Body) base.SetOption(key, value); 57 | } 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Messaging/Media.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System; 7 | using System.IO; 8 | using System.Text; 9 | using System.Xml.Linq; 10 | using Twilio.Converters; 11 | 12 | namespace Twilio.TwiML.Messaging 13 | { 14 | 15 | /// 16 | /// Media TwiML Noun 17 | /// 18 | public class Media : TwiML 19 | { 20 | /// 21 | /// Media URL 22 | /// 23 | public Uri Url { get; set; } 24 | 25 | /// 26 | /// Create a new Media 27 | /// 28 | /// Media URL, the body of the TwiML Element. 29 | public Media(Uri url = null) : base("Media") 30 | { 31 | this.Url = url; 32 | } 33 | 34 | /// 35 | /// Return the body of the TwiML tag 36 | /// 37 | protected override string GetElementBody() 38 | { 39 | return this.Url != null ? Serializers.Url(this.Url) : string.Empty; 40 | } 41 | 42 | /// 43 | /// Append a child TwiML element to this element returning this element to allow chaining. 44 | /// 45 | /// Child TwiML element to add 46 | public new Media Append(TwiML childElem) 47 | { 48 | return (Media) base.Append(childElem); 49 | } 50 | 51 | /// 52 | /// Add freeform key-value attributes to the generated xml 53 | /// 54 | /// Option key 55 | /// Option value 56 | public new Media SetOption(string key, object value) 57 | { 58 | return (Media) base.SetOption(key, value); 59 | } 60 | } 61 | 62 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Text.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Linq; 2 | 3 | namespace Twilio.TwiML 4 | { 5 | internal class Text : TwiML 6 | { 7 | private readonly string _content; 8 | 9 | internal Text(string content) : base(null) 10 | { 11 | _content = content; 12 | } 13 | 14 | protected override XNode ToXml() 15 | { 16 | return new XText(_content); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/ApplicationSid.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.IO; 7 | using System.Text; 8 | using System.Xml.Linq; 9 | 10 | namespace Twilio.TwiML.Voice 11 | { 12 | 13 | /// 14 | /// ApplicationSid TwiML Noun 15 | /// 16 | public class ApplicationSid : TwiML 17 | { 18 | /// 19 | /// Application sid to dial 20 | /// 21 | public string Sid { get; set; } 22 | 23 | /// 24 | /// Create a new ApplicationSid 25 | /// 26 | /// Application sid to dial, the body of the TwiML Element. 27 | public ApplicationSid(string sid = null) : base("ApplicationSid") 28 | { 29 | this.Sid = sid; 30 | } 31 | 32 | /// 33 | /// Return the body of the TwiML tag 34 | /// 35 | protected override string GetElementBody() 36 | { 37 | return this.Sid != null ? this.Sid : string.Empty; 38 | } 39 | 40 | /// 41 | /// Append a child TwiML element to this element returning this element to allow chaining. 42 | /// 43 | /// Child TwiML element to add 44 | public new ApplicationSid Append(TwiML childElem) 45 | { 46 | return (ApplicationSid) base.Append(childElem); 47 | } 48 | 49 | /// 50 | /// Add freeform key-value attributes to the generated xml 51 | /// 52 | /// Option key 53 | /// Option value 54 | public new ApplicationSid SetOption(string key, object value) 55 | { 56 | return (ApplicationSid) base.SetOption(key, value); 57 | } 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/Autopilot.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.IO; 7 | using System.Text; 8 | using System.Xml.Linq; 9 | 10 | namespace Twilio.TwiML.Voice 11 | { 12 | 13 | /// 14 | /// Autopilot TwiML Noun 15 | /// 16 | public class Autopilot : TwiML 17 | { 18 | /// 19 | /// Autopilot assistant sid or unique name 20 | /// 21 | public string Name { get; set; } 22 | 23 | /// 24 | /// Create a new Autopilot 25 | /// 26 | /// Autopilot assistant sid or unique name, the body of the TwiML Element. 27 | public Autopilot(string name = null) : base("Autopilot") 28 | { 29 | this.Name = name; 30 | } 31 | 32 | /// 33 | /// Return the body of the TwiML tag 34 | /// 35 | protected override string GetElementBody() 36 | { 37 | return this.Name != null ? this.Name : string.Empty; 38 | } 39 | 40 | /// 41 | /// Append a child TwiML element to this element returning this element to allow chaining. 42 | /// 43 | /// Child TwiML element to add 44 | public new Autopilot Append(TwiML childElem) 45 | { 46 | return (Autopilot) base.Append(childElem); 47 | } 48 | 49 | /// 50 | /// Add freeform key-value attributes to the generated xml 51 | /// 52 | /// Option key 53 | /// Option value 54 | public new Autopilot SetOption(string key, object value) 55 | { 56 | return (Autopilot) base.SetOption(key, value); 57 | } 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/Echo.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.IO; 7 | using System.Text; 8 | using System.Xml.Linq; 9 | 10 | namespace Twilio.TwiML.Voice 11 | { 12 | 13 | /// 14 | /// Echo TwiML Verb 15 | /// 16 | public class Echo : TwiML 17 | { 18 | /// 19 | /// Create a new Echo 20 | /// 21 | public Echo() : base("Echo") 22 | { 23 | } 24 | 25 | /// 26 | /// Append a child TwiML element to this element returning this element to allow chaining. 27 | /// 28 | /// Child TwiML element to add 29 | public new Echo Append(TwiML childElem) 30 | { 31 | return (Echo) base.Append(childElem); 32 | } 33 | 34 | /// 35 | /// Add freeform key-value attributes to the generated xml 36 | /// 37 | /// Option key 38 | /// Option value 39 | public new Echo SetOption(string key, object value) 40 | { 41 | return (Echo) base.SetOption(key, value); 42 | } 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/Identity.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.IO; 7 | using System.Text; 8 | using System.Xml.Linq; 9 | 10 | namespace Twilio.TwiML.Voice 11 | { 12 | 13 | /// 14 | /// Identity TwiML Noun 15 | /// 16 | public class Identity : TwiML 17 | { 18 | /// 19 | /// Identity of the client to dial 20 | /// 21 | public string ClientIdentity { get; set; } 22 | 23 | /// 24 | /// Create a new Identity 25 | /// 26 | /// Identity of the client to dial, the body of the TwiML Element. 27 | public Identity(string clientIdentity = null) : base("Identity") 28 | { 29 | this.ClientIdentity = clientIdentity; 30 | } 31 | 32 | /// 33 | /// Return the body of the TwiML tag 34 | /// 35 | protected override string GetElementBody() 36 | { 37 | return this.ClientIdentity != null ? this.ClientIdentity : string.Empty; 38 | } 39 | 40 | /// 41 | /// Append a child TwiML element to this element returning this element to allow chaining. 42 | /// 43 | /// Child TwiML element to add 44 | public new Identity Append(TwiML childElem) 45 | { 46 | return (Identity) base.Append(childElem); 47 | } 48 | 49 | /// 50 | /// Add freeform key-value attributes to the generated xml 51 | /// 52 | /// Option key 53 | /// Option value 54 | public new Identity SetOption(string key, object value) 55 | { 56 | return (Identity) base.SetOption(key, value); 57 | } 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/Leave.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.IO; 7 | using System.Text; 8 | using System.Xml.Linq; 9 | 10 | namespace Twilio.TwiML.Voice 11 | { 12 | 13 | /// 14 | /// Leave TwiML Verb 15 | /// 16 | public class Leave : TwiML 17 | { 18 | /// 19 | /// Create a new Leave 20 | /// 21 | public Leave() : base("Leave") 22 | { 23 | } 24 | 25 | /// 26 | /// Append a child TwiML element to this element returning this element to allow chaining. 27 | /// 28 | /// Child TwiML element to add 29 | public new Leave Append(TwiML childElem) 30 | { 31 | return (Leave) base.Append(childElem); 32 | } 33 | 34 | /// 35 | /// Add freeform key-value attributes to the generated xml 36 | /// 37 | /// Option key 38 | /// Option value 39 | public new Leave SetOption(string key, object value) 40 | { 41 | return (Leave) base.SetOption(key, value); 42 | } 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/Pause.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.Collections.Generic; 7 | using System.IO; 8 | using System.Text; 9 | using System.Xml.Linq; 10 | 11 | namespace Twilio.TwiML.Voice 12 | { 13 | 14 | /// 15 | /// Pause TwiML Verb 16 | /// 17 | public class Pause : TwiML 18 | { 19 | /// 20 | /// Length in seconds to pause 21 | /// 22 | public int? Length { get; set; } 23 | 24 | /// 25 | /// Create a new Pause 26 | /// 27 | /// Length in seconds to pause 28 | public Pause(int? length = null) : base("Pause") 29 | { 30 | this.Length = length; 31 | } 32 | 33 | /// 34 | /// Return the attributes of the TwiML tag 35 | /// 36 | protected override List GetElementAttributes() 37 | { 38 | var attributes = new List(); 39 | if (this.Length != null) 40 | { 41 | attributes.Add(new XAttribute("length", this.Length.ToString())); 42 | } 43 | return attributes; 44 | } 45 | 46 | /// 47 | /// Append a child TwiML element to this element returning this element to allow chaining. 48 | /// 49 | /// Child TwiML element to add 50 | public new Pause Append(TwiML childElem) 51 | { 52 | return (Pause) base.Append(childElem); 53 | } 54 | 55 | /// 56 | /// Add freeform key-value attributes to the generated xml 57 | /// 58 | /// Option key 59 | /// Option value 60 | public new Pause SetOption(string key, object value) 61 | { 62 | return (Pause) base.SetOption(key, value); 63 | } 64 | } 65 | 66 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/ReferSip.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System; 7 | using System.IO; 8 | using System.Text; 9 | using System.Xml.Linq; 10 | using Twilio.Converters; 11 | 12 | namespace Twilio.TwiML.Voice 13 | { 14 | 15 | /// 16 | /// Sip TwiML Noun used in Refer 17 | /// 18 | public class ReferSip : TwiML 19 | { 20 | /// 21 | /// SIP URL 22 | /// 23 | public Uri SipUrl { get; set; } 24 | 25 | /// 26 | /// Create a new ReferSip 27 | /// 28 | /// SIP URL, the body of the TwiML Element. 29 | public ReferSip(Uri sipUrl = null) : base("Sip") 30 | { 31 | this.SipUrl = sipUrl; 32 | } 33 | 34 | /// 35 | /// Return the body of the TwiML tag 36 | /// 37 | protected override string GetElementBody() 38 | { 39 | return this.SipUrl != null ? Serializers.Url(this.SipUrl) : string.Empty; 40 | } 41 | 42 | /// 43 | /// Append a child TwiML element to this element returning this element to allow chaining. 44 | /// 45 | /// Child TwiML element to add 46 | public new ReferSip Append(TwiML childElem) 47 | { 48 | return (ReferSip) base.Append(childElem); 49 | } 50 | 51 | /// 52 | /// Add freeform key-value attributes to the generated xml 53 | /// 54 | /// Option key 55 | /// Option value 56 | public new ReferSip SetOption(string key, object value) 57 | { 58 | return (ReferSip) base.SetOption(key, value); 59 | } 60 | } 61 | 62 | } -------------------------------------------------------------------------------- /src/Twilio/TwiML/Voice/Sim.cs: -------------------------------------------------------------------------------- 1 | /// This code was generated by 2 | /// \ / _ _ _| _ _ 3 | /// | (_)\/(_)(_|\/| |(/_ v1.0.0 4 | /// / / 5 | 6 | using System.IO; 7 | using System.Text; 8 | using System.Xml.Linq; 9 | 10 | namespace Twilio.TwiML.Voice 11 | { 12 | 13 | /// 14 | /// Sim TwiML Noun 15 | /// 16 | public class Sim : TwiML 17 | { 18 | /// 19 | /// SIM SID 20 | /// 21 | public string SimSid { get; set; } 22 | 23 | /// 24 | /// Create a new Sim 25 | /// 26 | /// SIM SID, the body of the TwiML Element. 27 | public Sim(string simSid = null) : base("Sim") 28 | { 29 | this.SimSid = simSid; 30 | } 31 | 32 | /// 33 | /// Return the body of the TwiML tag 34 | /// 35 | protected override string GetElementBody() 36 | { 37 | return this.SimSid != null ? this.SimSid.ToString() : string.Empty; 38 | } 39 | 40 | /// 41 | /// Append a child TwiML element to this element returning this element to allow chaining. 42 | /// 43 | /// Child TwiML element to add 44 | public new Sim Append(TwiML childElem) 45 | { 46 | return (Sim) base.Append(childElem); 47 | } 48 | 49 | /// 50 | /// Add freeform key-value attributes to the generated xml 51 | /// 52 | /// Option key 53 | /// Option value 54 | public new Sim SetOption(string key, object value) 55 | { 56 | return (Sim) base.SetOption(key, value); 57 | } 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /src/Twilio/Types/Client.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.Types 2 | { 3 | /// 4 | /// Client Endpoint 5 | /// 6 | public class Client : IEndpoint 7 | { 8 | public const string PREFIX = "client:"; 9 | 10 | private readonly string _client; 11 | 12 | /// 13 | /// Create new client 14 | /// 15 | /// Client name 16 | public Client(string client) 17 | { 18 | if (!client.ToLower().StartsWith(PREFIX)) 19 | { 20 | client = PREFIX + client; 21 | } 22 | 23 | _client = client; 24 | } 25 | 26 | /// 27 | /// Convert to string 28 | /// 29 | /// String representation 30 | public override string ToString() 31 | { 32 | return _client; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Twilio/Types/EmptyUrl.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace Twilio.Types { 4 | 5 | public class EmptyUri : System.Uri 6 | { 7 | public static readonly string Uri = "https://this.is.empty.url"; 8 | 9 | public EmptyUri() : base(Uri) {} 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/Twilio/Types/FeedbackIssue.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Twilio.Types 4 | { 5 | /// 6 | /// Feedback issue POCO 7 | /// 8 | public class FeedbackIssue 9 | { 10 | /// 11 | /// Number of occurrences 12 | /// 13 | [JsonProperty("count")] 14 | public int Count { get; } 15 | 16 | /// 17 | /// Description of issue 18 | /// 19 | [JsonProperty("description")] 20 | public string Description { get; } 21 | 22 | /// 23 | /// Percentage of calls affected 24 | /// 25 | [JsonProperty("percentage_of_total_calls")] 26 | public string PercentageOfTotalCalls { get; } 27 | 28 | /// 29 | /// Create new FeedbackIssue 30 | /// 31 | /// Number of occurrences 32 | /// Description of issue 33 | /// Percentage of calls affected 34 | public FeedbackIssue(int count, string description, string percentageOfTotalCalls) 35 | { 36 | Count = count; 37 | Description = description; 38 | PercentageOfTotalCalls = percentageOfTotalCalls; 39 | } 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/Twilio/Types/IEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.Types 2 | { 3 | /// 4 | /// Endpoint of a call 5 | /// 6 | public interface IEndpoint 7 | { 8 | /// 9 | /// Generate string representation 10 | /// 11 | /// String representation 12 | string ToString(); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/Twilio/Types/IceServer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace Twilio.Types 5 | { 6 | /// 7 | /// Ice Server POCO 8 | /// 9 | public class IceServer 10 | { 11 | /// 12 | /// Ice Server credential 13 | /// 14 | [JsonProperty("credential")] 15 | public string Credential { get; } 16 | 17 | /// 18 | /// Username for server 19 | /// 20 | [JsonProperty("username")] 21 | public string Username { get; } 22 | 23 | /// 24 | /// Server URL 25 | /// 26 | [JsonProperty("url")] 27 | public Uri Url { get; } 28 | 29 | /// 30 | /// Server URL 31 | /// 32 | [JsonProperty("urls")] 33 | public Uri Urls { get; } 34 | 35 | /// 36 | /// Create a new IceServer 37 | /// 38 | /// Ice Server credential 39 | /// Server username 40 | /// Server URL 41 | /// Server URL 42 | public IceServer(string credential, string username, Uri url, Uri urls) { 43 | Credential = credential; 44 | Username = username; 45 | Url = url; 46 | Urls = urls; 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/Twilio/Types/OutboundCallPrice.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Twilio.Types 4 | { 5 | /// 6 | /// POCO for outbound call prices 7 | /// 8 | public class OutboundCallPrice 9 | { 10 | /// 11 | /// Base price of outbound call 12 | /// 13 | [JsonProperty("base_price")] 14 | public double? BasePrice { get; } 15 | 16 | /// 17 | /// Current price of outbound call 18 | /// 19 | /// 20 | [JsonProperty("current_price")] 21 | public double? CurrentPrice { get; } 22 | 23 | /// 24 | /// Create a new OutboundCallPrice 25 | /// 26 | /// Base price of call 27 | /// Current price of call 28 | public OutboundCallPrice (double basePrice, double currentPrice) 29 | { 30 | BasePrice = basePrice; 31 | CurrentPrice = currentPrice; 32 | } 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/Twilio/Types/OutboundCallPriceWithOrigin.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace Twilio.Types 5 | { 6 | /// 7 | /// POCO for outbound call price with origin 8 | /// 9 | public class OutboundCallPriceWithOrigin { 10 | 11 | /// 12 | /// Base price of outbound call 13 | /// 14 | [JsonProperty("base_price")] 15 | public double? BasePrice { get; } 16 | 17 | /// 18 | /// Current price of outbound call 19 | /// 20 | /// 21 | [JsonProperty("current_price")] 22 | public double? CurrentPrice { get; } 23 | 24 | /// 25 | /// List of origination prefixes of outbound call 26 | /// 27 | /// 28 | [JsonProperty("origination_prefixes")] 29 | public List OriginationPrefixes { get; } 30 | 31 | /// 32 | /// Create a new OutboundCallPriceWithOrigin 33 | /// 34 | /// Base price of call 35 | /// Current price of call 36 | /// List of origination prefixes of call 37 | public OutboundCallPriceWithOrigin (double basePrice, double currentPrice, List originationPrefixes) { 38 | BasePrice = basePrice; 39 | CurrentPrice = currentPrice; 40 | OriginationPrefixes = originationPrefixes; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Twilio/Types/OutboundPrefixPrice.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace Twilio.Types 5 | { 6 | /// 7 | /// POCO for outbound prefix prices 8 | /// 9 | public class OutboundPrefixPrice 10 | { 11 | /// 12 | /// Prefix list 13 | /// 14 | [JsonProperty("prefixes")] 15 | public List Prefixes { get; } 16 | 17 | /// 18 | /// Prefix friendly name 19 | /// 20 | [JsonProperty("friendly_name")] 21 | public string FriendlyName { get; } 22 | 23 | /// 24 | /// Base price for prefix 25 | /// 26 | [JsonProperty("base_price")] 27 | public double? BasePrice { get; } 28 | 29 | /// 30 | /// Current price of prefix 31 | /// 32 | [JsonProperty("current_price")] 33 | public double? CurrentPrice { get; } 34 | 35 | /// 36 | /// Create a new OutboundPrefixPrice 37 | /// 38 | /// List of prefixes 39 | /// Prefix friendly name 40 | /// Base price of prefix 41 | /// Current price of prefix 42 | public OutboundPrefixPrice ( 43 | List prefixes, 44 | string friendlyName, 45 | double basePrice, 46 | double currentPrice 47 | ) 48 | { 49 | Prefixes = prefixes; 50 | FriendlyName = friendlyName; 51 | BasePrice = basePrice; 52 | CurrentPrice = currentPrice; 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/Twilio/Types/OutboundSmsPrice.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace Twilio.Types 5 | { 6 | /// 7 | /// POCO to represent an outbound SMS price 8 | /// 9 | public class OutboundSmsPrice 10 | { 11 | /// 12 | /// SMS mcc 13 | /// 14 | [JsonProperty("mcc")] 15 | public string Mcc { get; } 16 | 17 | /// 18 | /// SMS mnc 19 | /// 20 | [JsonProperty("mnc")] 21 | public string Mnc { get; } 22 | 23 | /// 24 | /// Carrier name 25 | /// 26 | [JsonProperty("carrier")] 27 | public string Carrier { get; } 28 | 29 | /// 30 | /// List of prices 31 | /// 32 | [JsonProperty("prices")] 33 | public List Prices { get; } 34 | 35 | /// 36 | /// Create a new OutboundSmsPrice 37 | /// 38 | /// SMS mcc 39 | /// SMS mnc 40 | /// Carrier name 41 | /// List of prices 42 | public OutboundSmsPrice ( 43 | string mcc, 44 | string mnc, 45 | string carrier, 46 | List prices 47 | ) 48 | { 49 | Mcc = mcc; 50 | Mnc = mnc; 51 | Carrier = carrier; 52 | Prices = prices; 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/Twilio/Types/PhoneNumber.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.Types 2 | { 3 | /// 4 | /// Phone number endpoint 5 | /// 6 | public class PhoneNumber : IEndpoint 7 | { 8 | private readonly string _number; 9 | 10 | /// 11 | /// Create a new PhoneNumber 12 | /// 13 | /// Phone number 14 | public PhoneNumber(string number) 15 | { 16 | _number = number; 17 | } 18 | 19 | /// 20 | /// Add implicit constructor for PhoneNumber to make it assignable from string 21 | /// 22 | /// Phone number 23 | /// 24 | public static implicit operator PhoneNumber(string number) 25 | { 26 | return new PhoneNumber(number); 27 | } 28 | 29 | /// 30 | /// Convert to string 31 | /// 32 | /// String representation 33 | public override string ToString() 34 | { 35 | return _number; 36 | } 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/Twilio/Types/PhoneNumberCapabilities.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Twilio.Types 4 | { 5 | /// 6 | /// Capabilities of a phone number 7 | /// 8 | public class PhoneNumberCapabilities 9 | { 10 | /// 11 | /// MMS capable 12 | /// 13 | [JsonProperty("mms")] 14 | public bool Mms { get; } 15 | 16 | /// 17 | /// SMS capable 18 | /// 19 | [JsonProperty("sms")] 20 | public bool Sms { get; } 21 | 22 | /// 23 | /// Voice capable 24 | /// 25 | [JsonProperty("voice")] 26 | public bool Voice { get; } 27 | 28 | /// 29 | /// Fax capable 30 | /// 31 | [JsonProperty("fax")] 32 | public bool Fax { get; } 33 | 34 | /// 35 | /// Create a new PhoneNumberCapability 36 | /// 37 | /// MMS capable 38 | /// SMS capable 39 | /// Voice capable 40 | /// Fax capable 41 | public PhoneNumberCapabilities (bool mms, bool sms, bool voice, bool fax) 42 | { 43 | Mms = mms; 44 | Sms = sms; 45 | Voice = voice; 46 | Fax = fax; 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/Twilio/Types/RecordingRulesUpdate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | using Twilio.Converters; 4 | 5 | /// 6 | /// Recording Rule Update - Used to update the list of Recording Rules 7 | /// 8 | namespace Twilio.Types 9 | { 10 | public class RecordingRulesUpdate 11 | { 12 | [JsonProperty("rules")] 13 | public List Rules { get; private set; } 14 | 15 | public RecordingRulesUpdate ( 16 | [JsonProperty("rules")] 17 | List rules 18 | ) 19 | { 20 | Rules = rules; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Twilio/Types/SubscribeRulesUpdate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | using Twilio.Converters; 4 | 5 | /// 6 | /// Subscribe Rule Update - Used to update the list of Subscribe Rules 7 | /// 8 | /// For more information see: 9 | /// Specifying Subscribe Rules 10 | /// 11 | namespace Twilio.Types 12 | { 13 | public class SubscribeRulesUpdate 14 | { 15 | [JsonProperty("rules")] 16 | public List Rules { get; private set; } 17 | 18 | public SubscribeRulesUpdate ( 19 | [JsonProperty("rules")] 20 | List rules 21 | ) 22 | { 23 | Rules = rules; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Twilio/Types/Twiml.cs: -------------------------------------------------------------------------------- 1 | namespace Twilio.Types 2 | { 3 | /// 4 | /// Twiml endpoint 5 | /// 6 | public class Twiml 7 | { 8 | private readonly string _twiml; 9 | 10 | /// 11 | /// Create a new Twiml 12 | /// 13 | /// Twiml 14 | public Twiml(string twiml) 15 | { 16 | _twiml = twiml; 17 | } 18 | 19 | /// 20 | /// Add implicit constructor for Twiml to make it assignable from string 21 | /// 22 | /// Twiml 23 | /// 24 | public static implicit operator Twiml(string twiml) 25 | { 26 | return new Twiml(twiml); 27 | } 28 | 29 | /// 30 | /// Convert to string 31 | /// 32 | /// String representation 33 | public override string ToString() 34 | { 35 | return _twiml; 36 | } 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /test/Twilio.Benchmark/Twilio.Benchmark.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | enable 7 | disable 8 | false 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/Twilio.Test/Constant/EnumConstantsTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Twilio.Constant; 3 | 4 | namespace Twilio.Tests.Constant 5 | { 6 | [TestFixture] 7 | public class EnumConstantsTest 8 | { 9 | [Test] 10 | public void EnumConstantComparison() 11 | { 12 | var jsonContentType = EnumConstants.ContentTypeEnum.JSON; 13 | var formUrlEncodedType = EnumConstants.ContentTypeEnum.FORM_URLENCODED; 14 | Assert.AreEqual("application/json", jsonContentType.ToString()); 15 | Assert.AreEqual("application/x-www-form-urlencoded", formUrlEncodedType.ToString()); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/Twilio.Test/Converters/MarshalConverterTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Twilio.Converters; 3 | 4 | namespace Twilio.Tests.Converters 5 | { 6 | [TestFixture] 7 | public class MarshalConverterTest : TwilioTest 8 | { 9 | [Test] 10 | public void TestDifferentDateTimeParsing() 11 | { 12 | var dtIso = MarshalConverter.DateTimeFromString("2016-06-07T16:31:31Z"); 13 | var dtRfc = MarshalConverter.DateTimeFromString("Tue, 07 Jun 2016 16:31:31 +0000"); 14 | Assert.AreEqual(dtIso,dtRfc); 15 | } 16 | 17 | [Test] 18 | public void TestIsoCorrectness() 19 | { 20 | var dtIso = MarshalConverter.DateTimeFromString("2016-06-07T16:31:31Z"); 21 | Assert.AreEqual(dtIso.Day, 7); 22 | Assert.AreEqual(dtIso.Month, 6); 23 | Assert.AreEqual(dtIso.Year, 2016); 24 | Assert.AreEqual(dtIso.ToUniversalTime().Hour, 16); 25 | Assert.AreEqual(dtIso.Minute, 31); 26 | Assert.AreEqual(dtIso.Second, 31); 27 | } 28 | 29 | [Test] 30 | public void TestRfcCorrectness() 31 | { 32 | var dtRfc = MarshalConverter.DateTimeFromString("Tue, 07 Jun 2016 16:31:31 +0000"); 33 | Assert.AreEqual(dtRfc.Day, 7); 34 | Assert.AreEqual(dtRfc.Month, 6); 35 | Assert.AreEqual(dtRfc.Year, 2016); 36 | Assert.AreEqual(dtRfc.ToUniversalTime().Hour, 16); 37 | Assert.AreEqual(dtRfc.Minute, 31); 38 | Assert.AreEqual(dtRfc.Second, 31); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /test/Twilio.Test/Converters/PrefixedCollapsibleMapTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NUnit.Framework; 3 | using Twilio.Converters; 4 | 5 | namespace Twilio.Tests.Converters 6 | { 7 | [TestFixture] 8 | public class PrefixedCollapsibleMapTest : TwilioTest { 9 | 10 | [Test] 11 | public void TestNullSerialize() 12 | { 13 | var result = PrefixedCollapsibleMap.Serialize(null, "really"); 14 | CollectionAssert.AreEquivalent(new Dictionary(), result); 15 | } 16 | 17 | [Test] 18 | public void TestEmptySerialize() 19 | { 20 | var result = PrefixedCollapsibleMap.Serialize(new Dictionary(), "really"); 21 | CollectionAssert.AreEquivalent(new Dictionary(), result); 22 | } 23 | 24 | [Test] 25 | public void TestNormalSerialize() { 26 | 27 | var inputDict = new Dictionary 28 | { 29 | {"foo", "bar"}, 30 | {"super", new Dictionary {{"cool", "people"}, {"fun", "times"}}} 31 | }; 32 | 33 | var result = PrefixedCollapsibleMap.Serialize( 34 | inputDict, 35 | "really" 36 | ); 37 | 38 | var expected = new Dictionary 39 | { 40 | {"really.foo", "bar"}, 41 | {"really.super.cool", "people"}, 42 | {"really.super.fun", "times"} 43 | }; 44 | 45 | CollectionAssert.AreEquivalent(expected, result); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /test/Twilio.Test/Converters/StringEnumConverterTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | using NUnit.Framework; 4 | using Twilio.Converters; 5 | using Twilio.Types; 6 | 7 | namespace Twilio.Tests.Converters 8 | { 9 | [TestFixture] 10 | public class StringEnumConverterTest : TwilioTest 11 | { 12 | class StatusClass 13 | { 14 | [JsonProperty("status")] 15 | [JsonConverter(typeof(StringEnumConverter))] 16 | public StatusEnum Status { get; private set; } 17 | 18 | [JsonProperty("status_list")] 19 | [JsonConverter(typeof(StringEnumConverter))] 20 | public List StatusList { get; private set; } 21 | } 22 | 23 | class StatusEnum : StringEnum 24 | { 25 | private StatusEnum(string value) : base(value) { } 26 | public StatusEnum() { } 27 | public static implicit operator StatusEnum(string value) 28 | { 29 | return new StatusEnum(value); 30 | } 31 | 32 | public static readonly StatusEnum Awe = new StatusEnum("awe"); 33 | public static readonly StatusEnum Some = new StatusEnum("some"); 34 | } 35 | 36 | [Test] 37 | public void TestBasicDeserialize() 38 | { 39 | var input = "{\"status\":\"awe\",\"status_list\":[\"some\"]}"; 40 | var result = JsonConvert.DeserializeObject(input); 41 | Assert.AreEqual(StatusEnum.Awe, result.Status); 42 | Assert.AreEqual(new[] { StatusEnum.Some }, result.StatusList); 43 | } 44 | 45 | [Test] 46 | public void TestNullDeserialize() 47 | { 48 | var input = "{\"status\":null,\"status_list\":null}"; 49 | var result = JsonConvert.DeserializeObject(input); 50 | Assert.Null(result.Status); 51 | Assert.Null(result.StatusList); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /test/Twilio.Test/Jwt/Client/ClientCapabilityTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NUnit.Framework; 4 | using Twilio.Jwt; 5 | using Twilio.Jwt.Client; 6 | 7 | namespace Twilio.Tests.Jwt.Client 8 | { 9 | [TestFixture] 10 | public class ClientCapabilityTest 11 | { 12 | private static readonly string AccountSid = "AC123"; 13 | private static readonly string Secret = "superdupersecretsecret"; 14 | 15 | [Test] 16 | public void TestEmptyToken() 17 | { 18 | var jwt = new ClientCapability(AccountSid, Secret).ToJwt(); 19 | 20 | var token = new DecodedJwt(jwt, Secret); 21 | var payload = token.Payload; 22 | 23 | Assert.AreEqual(AccountSid, payload["iss"]); 24 | Assert.Greater(Convert.ToInt64(payload["exp"]), BaseJwt.ConvertToUnixTimestamp(DateTime.UtcNow)); 25 | } 26 | 27 | [Test] 28 | public void TestToken() 29 | { 30 | var scopes = new HashSet 31 | { 32 | { new IncomingClientScope("incomingClient") }, 33 | { new EventStreamScope() }, 34 | { new OutgoingClientScope("AP123") } 35 | }; 36 | 37 | var jwt = new ClientCapability(AccountSid, Secret, scopes: scopes).ToJwt(); 38 | 39 | var token = new DecodedJwt(jwt, Secret); 40 | var payload = token.Payload; 41 | 42 | Assert.AreEqual(AccountSid, payload["iss"]); 43 | Assert.Greater(Convert.ToInt64(payload["exp"]), BaseJwt.ConvertToUnixTimestamp(DateTime.UtcNow)); 44 | 45 | Assert.AreEqual( 46 | "scope:client:incoming?clientName=incomingClient " + 47 | "scope:stream:subscribe?path=/2010-04-01/Events " + 48 | "scope:client:outgoing?appSid=AP123", 49 | payload["scope"] 50 | ); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /test/Twilio.Test/Jwt/Client/EventStreamScopeTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System; 3 | using System.Collections.Generic; 4 | using Twilio.Jwt.Client; 5 | 6 | namespace Twilio.Tests.Jwt.Client 7 | { 8 | [TestFixture] 9 | public class EventStreamScopeTest 10 | { 11 | #if NET35 12 | private const string expectedPayload = "scope:stream:subscribe?path=/2010-04-01/Events&appParams=foo%3dbar"; 13 | #else 14 | private const string expectedPayload = "scope:stream:subscribe?path=/2010-04-01/Events&appParams=foo%3Dbar"; 15 | #endif 16 | 17 | [Test] 18 | public void TestGenerate() 19 | { 20 | var filters = new Dictionary { { "foo", "bar" } }; 21 | var scope = new EventStreamScope(filters: filters); 22 | 23 | Assert.AreEqual( 24 | expectedPayload, 25 | scope.Payload 26 | ); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/Twilio.Test/Jwt/Client/IncomingClientScopeTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | using Twilio.Jwt.Client; 4 | 5 | namespace Twilio.Tests.Jwt.Client 6 | { 7 | [TestFixture] 8 | public class IncomingClientScopeTest 9 | { 10 | [Test] 11 | public void TestGenerate() 12 | { 13 | var scope = new IncomingClientScope("foobar"); 14 | Assert.AreEqual( 15 | "scope:client:incoming?clientName=foobar", 16 | scope.Payload 17 | ); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/Twilio.Test/Jwt/Client/OutgoingClientScopeTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NUnit.Framework; 4 | using Twilio.Jwt.Client; 5 | 6 | namespace Twilio.Tests.Jwt.Client 7 | { 8 | [TestFixture] 9 | public class OutgoingClientScopeTest 10 | { 11 | #if NET35 12 | private const string expectedPayload = "scope:client:outgoing?appSid=AP123&clientName=CL123&appParams=foo%3dbar"; 13 | #else 14 | private const string expectedPayload = "scope:client:outgoing?appSid=AP123&clientName=CL123&appParams=foo%3Dbar"; 15 | #endif 16 | 17 | [Test] 18 | public void TestGenerate() 19 | { 20 | var parameters = new Dictionary { { "foo", "bar" } }; 21 | var scope = new OutgoingClientScope("AP123", clientName: "CL123", parameters: parameters); 22 | 23 | Assert.AreEqual( 24 | expectedPayload, 25 | scope.Payload 26 | ); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/Twilio.Test/Jwt/Taskrouter/PolicyTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System; 3 | using System.Collections.Generic; 4 | using Twilio.Jwt.Taskrouter; 5 | using Twilio.Http; 6 | 7 | namespace Twilio.Tests.Jwt.Taskrouter 8 | { 9 | [TestFixture] 10 | public class PolicyTest 11 | { 12 | [Test] 13 | public void TestToJson() 14 | { 15 | var filter = new Dictionary 16 | { 17 | { "foo", Policy.FilterRequirement.Required } 18 | }; 19 | 20 | var policy = new Policy("http://localhost", HttpMethod.Get, queryFilter: filter); 21 | 22 | var result = new Dictionary 23 | { 24 | { "url", "http://localhost" }, 25 | { "method", "GET" }, 26 | { 27 | "query_filter", new Dictionary 28 | { 29 | { "foo", new Dictionary 30 | { 31 | { "required", true } 32 | } 33 | } 34 | } 35 | }, 36 | { "post_filter", new Dictionary() }, 37 | { "allow", true } 38 | }; 39 | 40 | Assert.AreEqual(result, policy.ToDict()); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /test/Twilio.Test/Jwt/Taskrouter/TaskRouterCapabilityTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NUnit.Framework; 4 | using Twilio.Jwt; 5 | using Twilio.Jwt.Taskrouter; 6 | using Twilio.Http; 7 | 8 | namespace Twilio.Tests.Jwt.Taskrouter 9 | { 10 | [TestFixture] 11 | public class TaskRouterCapabilityTest 12 | { 13 | private static readonly string AccountSid = "AC123"; 14 | private static readonly string AuthToken = "superdupersecretsecret"; 15 | private static readonly string WorkspaceSid = "WS123"; 16 | private static readonly string WorkerSid = "WK123"; 17 | 18 | [Test] 19 | public void TestToken() 20 | { 21 | var policies = new List 22 | { 23 | { new Policy("https://taskrouter.twilio.com/v1/Workspaces", HttpMethod.Get) } 24 | }; 25 | 26 | var jwt = new TaskRouterCapability(AccountSid, AuthToken, WorkspaceSid, WorkerSid, policies: policies).ToJwt(); 27 | 28 | var token = new DecodedJwt(jwt, AuthToken); 29 | var payload = token.Payload; 30 | 31 | Assert.AreEqual(WorkspaceSid, payload["workspace_sid"]); 32 | Assert.AreEqual(WorkerSid, payload["channel"]); 33 | Assert.AreEqual(AccountSid, payload["account_sid"]); 34 | Assert.AreEqual(AccountSid, payload["iss"]); 35 | 36 | Assert.Greater(Convert.ToInt64(payload["exp"]), BaseJwt.ConvertToUnixTimestamp(DateTime.UtcNow)); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/Twilio.Test/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using NUnitLite; 4 | 5 | namespace Twilio.Tests 6 | { 7 | class Program 8 | { 9 | static int Main(string[] args) 10 | { 11 | #if NET35 12 | return new AutoRun(typeof(TwilioTest).Assembly).Execute(args); 13 | #else 14 | return new AutoRun(typeof(TwilioTest).GetTypeInfo().Assembly).Execute(args); 15 | #endif 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/Twilio.Test/Twilio.Test.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Exe 4 | Twilio.Tests 5 | net6.0 6 | enable 7 | false 8 | $(NoWarn);CS1591 9 | $(NoWarn);CS1587 10 | CS8765CS1587;CS1591;CS1570;CS1573;CS1572;CS8618;CS8603;CS8625;CS8604;CS8765 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | all 22 | runtime; build; native; contentfiles; analyzers 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/Twilio.Test/TwilioTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Twilio.Tests 4 | { 5 | public class TwilioTest 6 | { 7 | public string Serialize(object obj) => obj.ToString(); 8 | public string Serialize(DateTime date) => date.ToString("yyyy-MM-dd"); 9 | public string Serialize(bool boolean) => boolean.ToString().ToLower(); 10 | public string Serialize(Uri url) => url.AbsoluteUri.TrimEnd('/'); 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /test/Twilio.Test/Types/ClientTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | using Twilio.Types; 4 | 5 | namespace Twilio.Tests.Types 6 | { 7 | [TestFixture] 8 | public class ClientTest 9 | { 10 | [Test] 11 | public void TestToString() 12 | { 13 | Assert.AreEqual("client:me", new Client("me").ToString()); 14 | Assert.AreEqual("client:YOU", new Client("YOU").ToString()); 15 | Assert.AreEqual("CLIENT:HIM", new Client("CLIENT:HIM").ToString()); 16 | Assert.AreEqual("cLiEnT:her", new Client("cLiEnT:her").ToString()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/Twilio.Test/Types/StringEnumTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | using Twilio.Types; 4 | 5 | namespace Twilio.Tests.Types 6 | { 7 | [TestFixture] 8 | public class StringEnumTest 9 | { 10 | public sealed class Enum1 : StringEnum 11 | { 12 | private Enum1(string value) : base(value) { } 13 | public Enum1() { } 14 | 15 | public static readonly Enum1 V1 = new Enum1("v1"); 16 | public static readonly Enum1 V2 = new Enum1("v2"); 17 | } 18 | 19 | public sealed class Enum2 : StringEnum 20 | { 21 | private Enum2(string value) : base(value) { } 22 | public Enum2() { } 23 | 24 | public static readonly Enum2 V1 = new Enum2("v1"); 25 | public static readonly Enum2 V2 = new Enum2("v2"); 26 | } 27 | 28 | [Test] 29 | public void TestEnumComparison() 30 | { 31 | Assert.AreNotEqual(Enum1.V1, Enum1.V2); 32 | Assert.AreNotEqual(Enum2.V2, Enum1.V2); 33 | Assert.AreEqual(Enum1.V1, Enum1.V1); 34 | } 35 | 36 | public class Instance 37 | { 38 | public Enum1 E1 { get; set; } 39 | } 40 | 41 | [Test] 42 | public void TestInstance() 43 | { 44 | var i = new Instance 45 | { 46 | E1 = Enum1.V1 47 | }; 48 | 49 | Assert.AreNotEqual(i.E1, Enum2.V1); 50 | Assert.AreEqual(i.E1, Enum1.V1); 51 | Assert.IsTrue(i.E1 == Enum1.V1); 52 | } 53 | } 54 | } 55 | --------------------------------------------------------------------------------