diff --git a/README.md b/README.md index 8ba3fd21..2e4f290d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.telnyx.sdk telnyx - 2.7.1 + 2.8.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.telnyx.sdk:telnyx:2.7.1" +compile "com.telnyx.sdk:telnyx:2.8.0" ``` ### Others @@ -57,7 +57,7 @@ mvn clean package Then manually install the following JARs: -- `target/telnyx-2.7.1.jar` +- `target/telnyx-2.8.0.jar` - `target/lib/*.jar` ## JDK Support @@ -195,6 +195,7 @@ Class | Method | HTTP request | Description *CsvDownloadsApi* | [**listCsvDownloads**](docs/CsvDownloadsApi.md#listCsvDownloads) | **GET** /phone_numbers/csv_downloads | List CSV downloads *CsvDownloadsApi* | [**retrieveCsvDownload**](docs/CsvDownloadsApi.md#retrieveCsvDownload) | **GET** /phone_numbers/csv_downloads/{id} | Retrieve a CSV download *DebuggingApi* | [**listCallEvents**](docs/DebuggingApi.md#listCallEvents) | **GET** /call_events | List call events +*DetailRecordsApi* | [**detailRecordsSearch**](docs/DetailRecordsApi.md#detailRecordsSearch) | **GET** /detail_records | *FqdNsApi* | [**createFqdn**](docs/FqdNsApi.md#createFqdn) | **POST** /fqdns | Create an FQDN *FqdNsApi* | [**deleteFqdn**](docs/FqdNsApi.md#deleteFqdn) | **DELETE** /fqdns/{id} | Delete an FQDN *FqdNsApi* | [**listFqdns**](docs/FqdNsApi.md#listFqdns) | **GET** /fqdns | List FQDNs @@ -297,9 +298,9 @@ Class | Method | HTTP request | Description *TeXmlApplicationsApi* | [**getTexmlApplication**](docs/TeXmlApplicationsApi.md#getTexmlApplication) | **GET** /texml_applications/{id} | Retrieve a TeXML Application *TeXmlApplicationsApi* | [**updateTexmlApplication**](docs/TeXmlApplicationsApi.md#updateTexmlApplication) | **PATCH** /texml_applications/{id} | Update a TeXML Application *VerifyApi* | [**createVerificationCall**](docs/VerifyApi.md#createVerificationCall) | **POST** /verifications/call | Trigger a Call verification -*VerifyApi* | [**createVerificationFlashcall**](docs/VerifyApi.md#createVerificationFlashcall) | **POST** /verifications/flashcall | Trigger a flash call verification +*VerifyApi* | [**createVerificationFlashcall**](docs/VerifyApi.md#createVerificationFlashcall) | **POST** /verifications/flashcall | Trigger a Flash call verification *VerifyApi* | [**createVerificationPSD2**](docs/VerifyApi.md#createVerificationPSD2) | **POST** /verifications/psd2 | Trigger a PSD2 verification -*VerifyApi* | [**createVerificationSMS**](docs/VerifyApi.md#createVerificationSMS) | **POST** /verifications/sms | Trigger an SMS verification +*VerifyApi* | [**createVerificationSMS**](docs/VerifyApi.md#createVerificationSMS) | **POST** /verifications/sms | Trigger a SMS verification *VerifyApi* | [**createVerificationWhatsapp**](docs/VerifyApi.md#createVerificationWhatsapp) | **POST** /verifications/whatsapp | Trigger a Whatsapp verification *VerifyApi* | [**createVerifyProfile**](docs/VerifyApi.md#createVerifyProfile) | **POST** /verify_profiles | Create a Verify profile *VerifyApi* | [**deleteVerifyProfile**](docs/VerifyApi.md#deleteVerifyProfile) | **DELETE** /verify_profiles/{verify_profile_id} | Delete a Verify profile @@ -405,12 +406,16 @@ Class | Method | HTTP request | Description - [ConferenceCreated](docs/ConferenceCreated.md) - [ConferenceCreatedEvent](docs/ConferenceCreatedEvent.md) - [ConferenceCreatedPayload](docs/ConferenceCreatedPayload.md) + - [ConferenceDetailRecord](docs/ConferenceDetailRecord.md) - [ConferenceEnded](docs/ConferenceEnded.md) - [ConferenceEndedBy](docs/ConferenceEndedBy.md) - [ConferenceEndedEvent](docs/ConferenceEndedEvent.md) - [ConferenceEndedPayload](docs/ConferenceEndedPayload.md) + - [ConferenceFloorChangedEvent](docs/ConferenceFloorChangedEvent.md) + - [ConferenceFloorChangedEventPayload](docs/ConferenceFloorChangedEventPayload.md) - [ConferenceHoldRequest](docs/ConferenceHoldRequest.md) - [ConferenceMuteRequest](docs/ConferenceMuteRequest.md) + - [ConferenceParticipantDetailRecord](docs/ConferenceParticipantDetailRecord.md) - [ConferenceParticipantJoined](docs/ConferenceParticipantJoined.md) - [ConferenceParticipantJoinedEvent](docs/ConferenceParticipantJoinedEvent.md) - [ConferenceParticipantJoinedPayload](docs/ConferenceParticipantJoinedPayload.md) @@ -491,7 +496,11 @@ Class | Method | HTTP request | Description - [CredentialOutbound](docs/CredentialOutbound.md) - [CsvDownload](docs/CsvDownload.md) - [Currencies](docs/Currencies.md) + - [Currency](docs/Currency.md) - [CustomSipHeader](docs/CustomSipHeader.md) + - [DetailRecord](docs/DetailRecord.md) + - [DetailRecordsSearchResponse](docs/DetailRecordsSearchResponse.md) + - [Direction](docs/Direction.md) - [DtmfType](docs/DtmfType.md) - [EmergencySettings](docs/EmergencySettings.md) - [EncryptedMedia](docs/EncryptedMedia.md) @@ -581,7 +590,12 @@ Class | Method | HTTP request | Description - [ListVerifyProfilesResponse](docs/ListVerifyProfilesResponse.md) - [Loopcount](docs/Loopcount.md) - [MediaFeatures](docs/MediaFeatures.md) + - [MessageCost](docs/MessageCost.md) + - [MessageDetailRecord](docs/MessageDetailRecord.md) + - [MessageRate](docs/MessageRate.md) - [MessageResponse](docs/MessageResponse.md) + - [MessageStatus](docs/MessageStatus.md) + - [MessageType](docs/MessageType.md) - [MessagingFeatureSet](docs/MessagingFeatureSet.md) - [MessagingHostedNumberOrder](docs/MessagingHostedNumberOrder.md) - [MessagingProfile](docs/MessagingProfile.md) @@ -611,6 +625,7 @@ Class | Method | HTTP request | Description - [OutboundIp](docs/OutboundIp.md) - [OutboundMessage](docs/OutboundMessage.md) - [OutboundMessageEvent](docs/OutboundMessageEvent.md) + - [OutboundMessageEventMeta](docs/OutboundMessageEventMeta.md) - [OutboundMessagePayload](docs/OutboundMessagePayload.md) - [OutboundMessagePayloadFrom](docs/OutboundMessagePayloadFrom.md) - [OutboundMessagePayloadMedia](docs/OutboundMessagePayloadMedia.md) @@ -621,6 +636,7 @@ Class | Method | HTTP request | Description - [PaginationMetaSimple](docs/PaginationMetaSimple.md) - [Participant](docs/Participant.md) - [ParticipantConference](docs/ParticipantConference.md) + - [PassThroughFee](docs/PassThroughFee.md) - [PauseRecordingRequest](docs/PauseRecordingRequest.md) - [PhoneNumber](docs/PhoneNumber.md) - [PhoneNumberDeletedDetailed](docs/PhoneNumberDeletedDetailed.md) @@ -646,6 +662,7 @@ Class | Method | HTTP request | Description - [PlayAudioUrlRequest](docs/PlayAudioUrlRequest.md) - [PlaybackStopRequest](docs/PlaybackStopRequest.md) - [Portability](docs/Portability.md) + - [Product](docs/Product.md) - [Queue](docs/Queue.md) - [QueueCall](docs/QueueCall.md) - [QueueCallResponse](docs/QueueCallResponse.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index e8dd6e01..052e9df0 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -34,6 +34,8 @@ tags: name: Credentials - description: Call Control debugging name: Debugging +- description: Detail Records operations + name: Detail Records - description: FQDN connection operations name: FQDN Connections - description: FQDN operations @@ -1706,7 +1708,7 @@ paths: *Notes:* - - When `overlay` is enabled, `loop` is limited to 1, and `target_legs` is limited to `self`. + - When `overlay` is enabled, `target_legs` is limited to `self`. - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing. **Expected Webhooks:** @@ -2609,6 +2611,21 @@ paths: description: The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL. x-callback-request: true + conferenceFloorChanged: + '{$request.body#/webhook_url}': + post: + operationId: conferenceFloorChanged_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConferenceFloorChangedEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true description: | Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. @@ -2619,6 +2636,7 @@ paths: - `conference.participant.left` - `conference.ended` - `conference.recording.saved` + - `conference.floor.changed` operationId: createConference requestBody: content: @@ -3823,6 +3841,127 @@ paths: x-latency-category: responsive x-contentType: application/json x-accepts: application/json + /detail_records: + get: + description: Search for any detail record across the Telnyx Platform + operationId: DetailRecordsSearch + parameters: + - description: Filter by the given record type + examples: + filter[record_type]=messaging: + summary: Searches for messaging detail records + value: messaging + explode: true + in: query + name: filter[record_type] + required: true + schema: + type: string + style: form + - description: Filter by the given user-friendly date range + examples: + filter[date_range]=today: + summary: Searches for records with timestamp starting at `00:00:00` of + the current day + value: today + filter[date_range]=last_3_days: + summary: Searches for records with timestamp starting at `00:00:00` since + 3 days ago + value: last_3_days + explode: true + in: query + name: filter[date_range] + required: false + schema: + type: string + style: form + - description: Filter records + examples: + filter[created_at][gte]=2021-06-22: + summary: Searches for records with `created_at` starting at `2021-06-22` + value: 2021-06-22 + filter[created_at][lt]=2021-06-23: + summary: Searches for records with `created_at` ending at `2021-06-22` + value: 2021-06-23 + filter[direction]=inbound: + summary: Searches for records which have the property `direction` equal + to `inbound` + value: inbound + filter[cld][starts_with]=123: + summary: Searches for records which have the property `cld` starting with + the prefix `123` + value: "123" + filter[cld][ends_with]=789: + summary: Searches for records which have the property `cld` ending with + the suffix `789` + value: "789" + filter[cld][contains]=456: + summary: Searches for records which have the property `cld` containing + the pattern `456` + value: "456" + explode: true + in: query + name: filter + required: false + schema: + additionalProperties: true + type: object + style: form + - description: Page number + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + format: int32 + minimum: 1 + type: integer + style: form + - description: Page size + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + format: int32 + maximum: 50 + minimum: 1 + type: integer + style: form + - description: Specifies the sort order for results + examples: + sort=created_at: + summary: Sorts search results using the `created_at` date-time in ascending + order + value: created_at + sort=-created_at: + summary: Sorts search results using the `created_at` date-time in descending + order + value: created_at + explode: true + in: query + name: sort + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DetailRecordsSearchResponse' + description: Successful + security: + - bearerAuth: [] + tags: + - Detail Records + x-latency-category: interactive + x-accepts: application/json /fax_applications: get: description: This endpoint returns a list of your Fax Applications inside the @@ -4322,7 +4461,7 @@ paths: x-accepts: application/json /faxes/{id}/actions/refresh: post: - description: This endpoint refreshes the media_url expiration for inbound faxes + description: Refreshes the inbound fax's media_url when it has expired operationId: RefreshFax parameters: - description: The unique identifier of a fax. @@ -8961,7 +9100,7 @@ paths: schema: $ref: '#/components/schemas/Errors' description: Bad Request - summary: Trigger a flash call verification + summary: Trigger a Flash call verification tags: - Verify x-latency-category: responsive @@ -9017,7 +9156,7 @@ paths: schema: $ref: '#/components/schemas/Errors' description: Bad Request - summary: Trigger an SMS verification + summary: Trigger a SMS verification tags: - Verify x-latency-category: responsive @@ -12459,6 +12598,75 @@ components: $ref: '#/components/schemas/ConferenceCreated' title: Conference Created Event type: object + ConferenceDetailRecord: + properties: + id: + description: Conference id + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + name: + description: Conference name + example: My Conference + type: string + user_id: + description: User id + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + started_at: + description: Conference start time + example: 2020-07-01T00:00:00-06:00 + format: date-time + type: string + ended_at: + description: Conference end time + example: 2020-07-01T00:00:00-06:00 + format: date-time + type: string + expires_at: + description: Conference expiry time + example: 2020-07-01T00:00:00-06:00 + format: date-time + type: string + region: + description: Region where the conference is hosted + example: ch1 + type: string + call_leg_id: + description: Telnyx UUID that identifies the conference call leg + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + call_session_id: + description: Telnyx UUID that identifies with conference call session + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + connection_id: + description: Connection id + example: "1583941447772537867" + type: string + call_sec: + description: Duration of the conference call in seconds + example: 100 + type: integer + participant_count: + description: Number of participants that joined the conference call + example: 5 + type: integer + participant_call_sec: + description: Sum of the conference call duration for all participants in + seconds + example: 100 + type: integer + is_telnyx_billable: + description: Indicates whether Telnyx billing charges might be applicable + example: false + type: boolean + record_type: + default: conference_detail_record + example: conference_detail_record + type: string + required: + - record_type + type: object ConferenceEnded: example: record_type: event @@ -12517,6 +12725,42 @@ components: $ref: '#/components/schemas/ConferenceEnded' title: Conference Ended Event type: object + ConferenceFloorChangedEvent: + example: + record_type: event + event_type: conference.floor.changed + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - conference.floor.changed + example: conference.floor.changed + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + payload: + $ref: '#/components/schemas/ConferenceFloorChangedEvent_payload' + title: Conference Floor Changed + type: object ConferenceHoldRequest: example: call_control_ids: @@ -12549,6 +12793,83 @@ components: type: array title: Conference Mute Request type: object + ConferenceParticipantDetailRecord: + properties: + id: + description: Participant id + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + user_id: + description: User id + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + conference_id: + description: Conference id + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + joined_at: + description: Participant join time + example: 2020-07-01T00:00:00-06:00 + format: date-time + type: string + left_at: + description: Participant leave time + example: 2020-07-01T00:00:00-06:00 + format: date-time + type: string + destination_number: + description: Number called by the participant to join the conference + example: +18005550199 + type: string + originating_number: + description: Participant origin number used in the conference call + example: +18005550199 + type: string + call_leg_id: + description: Telnyx UUID that identifies the conference call leg + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + call_session_id: + description: Telnyx UUID that identifies with conference call session + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + call_sec: + description: Duration of the conference call in seconds + example: 100 + type: integer + billed_sec: + description: Duration of the conference call for billing purposes + example: 120 + type: integer + is_telnyx_billable: + description: Indicates whether Telnyx billing charges might be applicable + example: true + type: boolean + rate: + description: Currency amount per billing unit used to calculate the Telnyx + billing cost + example: "0.002" + type: string + rate_measured_in: + description: Billing unit used to calculate the Telnyx billing cost + example: minutes + type: string + cost: + description: Currency amount for Telnyx billing cost + example: "0.004" + type: string + currency: + description: Telnyx account currency used to describe monetary values, including + billing cost + example: USD + type: string + record_type: + default: conference_participant_detail_record + example: conference_participant_detail_record + type: string + required: + - record_type + type: object ConferenceParticipantJoined: example: record_type: event @@ -15111,7 +15432,6 @@ components: description: The request body when creating a verification. example: verify_profile_id: 12ade33a-21c0-473b-b055-b3c836e1c292 - app_name: Example Secure App phone_number: +13035551234 timeout_secs: 300 properties: @@ -15128,11 +15448,6 @@ components: description: The number of seconds the verification code is valid for. example: 300 type: integer - app_name: - description: The name that identifies the application requesting 2fa in - the verification message. - example: Example Secure App - type: string required: - phone_number - verify_profile_id @@ -15626,6 +15941,16 @@ components: example: USD title: Currencies type: string + Currency: + description: User currency + enum: + - AUD + - CAD + - EUR + - GBP + - USD + example: USD + type: string CustomSipHeader: example: name: head_1 @@ -15644,6 +15969,40 @@ components: - value title: Custom SIP Header type: object + DetailRecord: + description: An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records + discriminator: + propertyName: record_type + oneOf: + - $ref: '#/components/schemas/MessageDetailRecord' + - $ref: '#/components/schemas/ConferenceDetailRecord' + - $ref: '#/components/schemas/ConferenceParticipantDetailRecord' + required: + - record_type + type: object + DetailRecordsSearchResponse: + example: + data: + - null + - null + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 + properties: + data: + items: + $ref: '#/components/schemas/DetailRecord' + type: array + meta: + $ref: '#/components/schemas/PaginationMeta' + type: object + Direction: + enum: + - INBOUND + - OUTBOUND + type: string DtmfType: default: RFC 2833 description: Sets the type of DTMF digits sent from Telnyx to this Connection. @@ -15817,13 +16176,17 @@ components: - sending - delivered - failed + - initiated + - receiving + - media.processing + - received example: queued type: string webhook_url: description: URL that will receive fax webhooks type: string webhook_failover_url: - description: Optional failover URL that will receive fax webhooks if `webhook_url` + description: Optional failover URL that will receive fax webhooks if webhook_url doesn't return a 2XX response type: string store_media: @@ -16881,6 +17244,7 @@ components: id: 7ee4241c-f127-47e5-9c34-3aac291f8058 type: SMS messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 + organization_id: b448f9cc-a842-4784-98e9-03c1a5872950 from: phone_number: +18665550001 carrier: T-MOBILE USA, INC. @@ -16942,6 +17306,7 @@ components: id: 7ee4241c-f127-47e5-9c34-3aac291f8058 type: SMS messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 + organization_id: b448f9cc-a842-4784-98e9-03c1a5872950 from: phone_number: +18665550001 carrier: T-MOBILE USA, INC. @@ -16977,6 +17342,7 @@ components: id: 7ee4241c-f127-47e5-9c34-3aac291f8058 type: SMS messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 + organization_id: b448f9cc-a842-4784-98e9-03c1a5872950 from: phone_number: +18665550001 status: delivered @@ -17319,6 +17685,7 @@ components: whisper_call_control_ids: - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + beep_enabled: always properties: call_control_id: description: Unique identifier and token for controlling the call @@ -17391,6 +17758,17 @@ components: items: type: string type: array + beep_enabled: + description: Whether a beep sound should be played when the participant + joins and/or leaves the conference. Can be used to override the conference-level + setting. + enum: + - always + - never + - on_enter + - on_exit + example: on_exit + type: string required: - call_control_id title: Join Conference Request @@ -17564,6 +17942,136 @@ components: only controls whether one will be accepted. type: boolean type: object + MessageCost: + properties: + amount: + description: Final cost. Cost is calculated as rate * parts + example: 0.1 + type: number + currency: + $ref: '#/components/schemas/Currency' + type: object + MessageDetailRecord: + properties: + id: + description: Message id + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + created_at: + description: Message sent time + example: 2020-07-01T00:00:00-06:00 + format: date-time + type: string + outbound_profile_name: + description: Configured profile name. New profiles can be created and configured + on Telnyx portal + example: configured-profile-name + type: string + outbound_profile_id: + description: Configured profile id. New profiles can be created and configured + on Telnyx portal + example: 30ef55db-c4a2-4c4a-9804-a68077973d07 + type: string + direction: + $ref: '#/components/schemas/Direction' + parts: + description: Number of parts this message has. Max number of character is + 160. If message contains more characters then that it will be broken down + in multiple parts + example: 2 + type: integer + status: + $ref: '#/components/schemas/MessageStatus' + cld: + description: The destination number for a call, or the callee + example: +1555123456 + type: string + cli: + description: The number associated with the person initiating the call, + or the caller + example: +1555123456 + type: string + rate: + $ref: '#/components/schemas/MessageRate' + cost: + $ref: '#/components/schemas/MessageCost' + country_iso: + description: Cld number ISO country code. + example: US + type: string + message_type: + $ref: '#/components/schemas/MessageType' + errors: + description: Error returned by the gateway in case sending of message failed. + example: US + items: + description: Error returned by the gateway in case sending of message + failed. + example: "40001" + type: string + properties: + empty: + type: boolean + type: array + normalized_carrier: + description: Cld carrier. + example: T-Mobile + type: string + pass_through_fee: + $ref: '#/components/schemas/PassThroughFee' + tags: + description: User tag. + example: tag1 + type: string + mcc: + description: Mobile country code. + example: "204" + type: string + mnc: + description: Mobile network code. + example: "01" + type: string + product: + $ref: '#/components/schemas/Product' + record_type: + default: message_detail_record + example: message_detail_record + type: string + user_id: + description: User id + example: 3ca7bd3d-7d82-4e07-9df4-009123068320 + type: string + required: + - record_type + type: object + MessageRate: + properties: + amount: + description: Rate applied to the message + example: 0.1 + type: number + currency: + $ref: '#/components/schemas/Currency' + type: object + MessageStatus: + description: Message status + enum: + - GW_TIMEOUT + - DELIVERED + - DLR_UNCONFIRMED + - DLR_TIMEOUT + - RECEIVED + - GW_REJECT + - FAILED + example: DELIVERED + type: string + MessageType: + description: Type of message + enum: + - SMS + - MMS + example: SMS + type: string MessagingFeatureSet: description: | The set of features available for a specific messaging use case (SMS or MMS). Features @@ -18438,9 +18946,10 @@ components: payload: record_type: message direction: outbound - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + id: 40385f64-5717-4562-b3fc-2c963f66afa6 type: MMS - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + messaging_profile_id: 4000eba1-a0c0-4563-9925-b25e842a7cb6 + organization_id: b448f9cc-a842-4784-98e9-03c1a5872950 from: phone_number: +18445550001 carrier: TELNYX LLC @@ -18503,9 +19012,10 @@ components: payload: record_type: message direction: outbound - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + id: 40385f64-5717-4562-b3fc-2c963f66afa6 type: MMS - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + messaging_profile_id: 4000eba1-a0c0-4563-9925-b25e842a7cb6 + organization_id: b448f9cc-a842-4784-98e9-03c1a5872950 from: phone_number: +18445550001 carrier: TELNYX LLC @@ -18534,17 +19044,23 @@ components: completed_at: null valid_until: null errors: [] + meta: + delivered_to: https://www.example.com/hooks + attempt: 1 properties: data: $ref: '#/components/schemas/OutboundMessage' + meta: + $ref: '#/components/schemas/OutboundMessageEvent_meta' type: object OutboundMessagePayload: example: record_type: message direction: outbound - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + id: 40385f64-5717-4562-b3fc-2c963f66afa6 type: MMS - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + messaging_profile_id: 4000eba1-a0c0-4563-9925-b25e842a7cb6 + organization_id: b448f9cc-a842-4784-98e9-03c1a5872950 from: phone_number: +18445550001 carrier: TELNYX LLC @@ -18600,6 +19116,10 @@ components: messaging_profile_id: description: Unique identifier for a messaging profile. type: string + organization_id: + description: The id of the organization the messaging profile belongs to. + format: uuid + type: string from: $ref: '#/components/schemas/OutboundMessagePayload_from' to: @@ -18938,6 +19458,15 @@ components: - whisper_call_control_ids title: Participant type: object + PassThroughFee: + properties: + amount: + description: Normalized carrier pass through fee + example: 0.1 + type: number + currency: + $ref: '#/components/schemas/Currency' + type: object PauseRecordingRequest: example: command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 @@ -19027,6 +19556,7 @@ components: caller_id_name_enabled: true call_recording_enabled: true t38_fax_gateway_enabled: true + phone_number_type: longcode purchased_at: 2019-10-23T18:10:00.000Z created_at: 2019-10-23T18:10:00.000Z updated_at: 2019-10-24T18:10:00.000Z @@ -19129,6 +19659,13 @@ components: number. readOnly: true type: boolean + phone_number_type: + description: The phone number's type. + enum: + - longcode + - tollfree + readOnly: true + type: string purchased_at: description: ISO 8601 formatted date indicating the time the request was made to purchase the number. @@ -19167,6 +19704,7 @@ components: caller_id_name_enabled: true call_recording_enabled: true t38_fax_gateway_enabled: true + phone_number_type: longcode purchased_at: 2019-10-23T18:10:00.000Z created_at: 2019-10-23T18:10:00.000Z updated_at: 2019-10-24T18:10:00.000Z @@ -19269,6 +19807,13 @@ components: number. readOnly: true type: boolean + phone_number_type: + description: The phone number's type. + enum: + - longcode + - tollfree + readOnly: true + type: string purchased_at: description: ISO 8601 formatted date indicating when the resource was purchased. readOnly: true @@ -19752,6 +20297,7 @@ components: example: true type: boolean stop: + default: all description: When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being @@ -19879,6 +20425,17 @@ components: example: Illinois type: string type: object + Product: + description: Used product + enum: + - LONG_CODE + - SHORT_CODE + - SHORT_CODE_FTEU + - TOLL_FREE + - ALPHANUMERIC_ID + - RCS + example: LONG_CODE + type: string Queue: example: record_type: queue @@ -24044,9 +24601,10 @@ components: data: record_type: message direction: outbound - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + id: 40385f64-5717-4562-b3fc-2c963f66afa6 type: MMS - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + messaging_profile_id: 4000eba1-a0c0-4563-9925-b25e842a7cb6 + organization_id: b448f9cc-a842-4784-98e9-03c1a5872950 from: phone_number: +18445550001 carrier: TELNYX LLC @@ -24806,6 +25364,7 @@ components: caller_id_name_enabled: true call_recording_enabled: true t38_fax_gateway_enabled: true + phone_number_type: longcode purchased_at: 2019-10-23T18:10:00.000Z created_at: 2019-10-23T18:10:00.000Z updated_at: 2019-10-24T18:10:00.000Z @@ -24830,6 +25389,7 @@ components: caller_id_name_enabled: true call_recording_enabled: true t38_fax_gateway_enabled: true + phone_number_type: longcode purchased_at: 2019-10-23T18:10:00.000Z created_at: 2019-10-23T18:10:00.000Z updated_at: 2019-10-24T18:10:00.000Z @@ -25221,6 +25781,7 @@ components: caller_id_name_enabled: true call_recording_enabled: true t38_fax_gateway_enabled: true + phone_number_type: longcode purchased_at: 2019-10-23T18:10:00.000Z created_at: 2019-10-23T18:10:00.000Z updated_at: 2019-10-24T18:10:00.000Z @@ -25253,6 +25814,7 @@ components: caller_id_name_enabled: true call_recording_enabled: true t38_fax_gateway_enabled: true + phone_number_type: longcode purchased_at: 2019-10-23T18:10:00.000Z created_at: 2019-10-23T18:10:00.000Z updated_at: 2019-10-24T18:10:00.000Z @@ -26805,6 +27367,38 @@ components: - time_exceeded type: string type: object + ConferenceFloorChangedEvent_payload: + properties: + call_control_id: + description: Call Control ID of the new speaker. + example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + type: string + connection_id: + description: Telnyx connection ID used in the call. + example: 7267xxxxxxxxxxxxxx + type: string + call_leg_id: + description: Call Leg ID of the new speaker. + example: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + type: string + call_session_id: + description: Call Session ID of the new speaker. + example: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + type: string + client_state: + description: State received from a command. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + conference_id: + description: Conference ID that had a speaker change event. + example: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521Z + format: date-time + type: string + type: object ConferenceParticipantJoined_payload: properties: call_control_id: @@ -27482,6 +28076,21 @@ components: readOnly: true type: number type: object + OutboundMessageEvent_meta: + example: + delivered_to: https://www.example.com/hooks + attempt: 1 + properties: + attempt: + description: Number of attempts to deliver the webhook event. + example: 1 + type: integer + delivered_to: + description: The webhook URL the event was delivered to. + example: https://www.example.com/hooks + format: url + type: string + type: object OutboundMessagePayload_from: properties: phone_number: diff --git a/build.gradle b/build.gradle index 672725ad..a4b2cdfe 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.telnyx.sdk' -version = '2.7.1' +version = '2.8.0' buildscript { repositories { @@ -101,8 +101,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.10.3" - jackson_databind_version = "2.10.4" + jackson_version = "2.12.4" + jackson_databind_version = "2.12.4" jackson_databind_nullable_version = "0.2.1" jersey_version = "2.27" junit_version = "4.13" diff --git a/build.sbt b/build.sbt index 3e09a739..74533ebe 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.telnyx.sdk", name := "telnyx", - version := "2.7.1", + version := "2.8.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/docs/CallCommandsApi.md b/docs/CallCommandsApi.md index 8f5deba6..253bc577 100644 --- a/docs/CallCommandsApi.md +++ b/docs/CallCommandsApi.md @@ -903,7 +903,7 @@ the audio files will be placed in a queue awaiting playback. *Notes:* -- When `overlay` is enabled, `loop` is limited to 1, and `target_legs` is limited to `self`. +- When `overlay` is enabled, `target_legs` is limited to `self`. - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing. **Expected Webhooks:** diff --git a/docs/ConferenceCommandsApi.md b/docs/ConferenceCommandsApi.md index 29a1714d..9839deb5 100644 --- a/docs/ConferenceCommandsApi.md +++ b/docs/ConferenceCommandsApi.md @@ -959,6 +959,7 @@ Create a conference from an existing call leg using a `call_control_id` and a co - `conference.participant.left` - `conference.ended` - `conference.recording.saved` +- `conference.floor.changed` ### Example diff --git a/docs/ConferenceDetailRecord.md b/docs/ConferenceDetailRecord.md new file mode 100644 index 00000000..e6e70acb --- /dev/null +++ b/docs/ConferenceDetailRecord.md @@ -0,0 +1,26 @@ + + +# ConferenceDetailRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Conference id | [optional] +**name** | **String** | Conference name | [optional] +**userId** | **String** | User id | [optional] +**startedAt** | [**OffsetDateTime**](OffsetDateTime.md) | Conference start time | [optional] +**endedAt** | [**OffsetDateTime**](OffsetDateTime.md) | Conference end time | [optional] +**expiresAt** | [**OffsetDateTime**](OffsetDateTime.md) | Conference expiry time | [optional] +**region** | **String** | Region where the conference is hosted | [optional] +**callLegId** | **String** | Telnyx UUID that identifies the conference call leg | [optional] +**callSessionId** | **String** | Telnyx UUID that identifies with conference call session | [optional] +**connectionId** | **String** | Connection id | [optional] +**callSec** | **Integer** | Duration of the conference call in seconds | [optional] +**participantCount** | **Integer** | Number of participants that joined the conference call | [optional] +**participantCallSec** | **Integer** | Sum of the conference call duration for all participants in seconds | [optional] +**isTelnyxBillable** | **Boolean** | Indicates whether Telnyx billing charges might be applicable | [optional] +**recordType** | **String** | | + + + diff --git a/docs/ConferenceFloorChangedEvent.md b/docs/ConferenceFloorChangedEvent.md new file mode 100644 index 00000000..2b28680d --- /dev/null +++ b/docs/ConferenceFloorChangedEvent.md @@ -0,0 +1,31 @@ + + +# ConferenceFloorChangedEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recordType** | [**RecordTypeEnum**](#RecordTypeEnum) | Identifies the type of the resource. | [optional] +**eventType** | [**EventTypeEnum**](#EventTypeEnum) | The type of event being delivered. | [optional] +**id** | [**UUID**](UUID.md) | Identifies the type of resource. | [optional] +**payload** | [**ConferenceFloorChangedEventPayload**](ConferenceFloorChangedEventPayload.md) | | [optional] + + + +## Enum: RecordTypeEnum + +Name | Value +---- | ----- +EVENT | "event" + + + +## Enum: EventTypeEnum + +Name | Value +---- | ----- +CONFERENCE_FLOOR_CHANGED | "conference.floor.changed" + + + diff --git a/docs/ConferenceFloorChangedEventPayload.md b/docs/ConferenceFloorChangedEventPayload.md new file mode 100644 index 00000000..e5c05b23 --- /dev/null +++ b/docs/ConferenceFloorChangedEventPayload.md @@ -0,0 +1,18 @@ + + +# ConferenceFloorChangedEventPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callControlId** | **String** | Call Control ID of the new speaker. | [optional] +**connectionId** | **String** | Telnyx connection ID used in the call. | [optional] +**callLegId** | **String** | Call Leg ID of the new speaker. | [optional] +**callSessionId** | **String** | Call Session ID of the new speaker. | [optional] +**clientState** | **String** | State received from a command. | [optional] +**conferenceId** | **String** | Conference ID that had a speaker change event. | [optional] +**occurredAt** | [**OffsetDateTime**](OffsetDateTime.md) | ISO 8601 datetime of when the event occurred. | [optional] + + + diff --git a/docs/ConferenceParticipantDetailRecord.md b/docs/ConferenceParticipantDetailRecord.md new file mode 100644 index 00000000..e661e977 --- /dev/null +++ b/docs/ConferenceParticipantDetailRecord.md @@ -0,0 +1,28 @@ + + +# ConferenceParticipantDetailRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Participant id | [optional] +**userId** | **String** | User id | [optional] +**conferenceId** | **String** | Conference id | [optional] +**joinedAt** | [**OffsetDateTime**](OffsetDateTime.md) | Participant join time | [optional] +**leftAt** | [**OffsetDateTime**](OffsetDateTime.md) | Participant leave time | [optional] +**destinationNumber** | **String** | Number called by the participant to join the conference | [optional] +**originatingNumber** | **String** | Participant origin number used in the conference call | [optional] +**callLegId** | **String** | Telnyx UUID that identifies the conference call leg | [optional] +**callSessionId** | **String** | Telnyx UUID that identifies with conference call session | [optional] +**callSec** | **Integer** | Duration of the conference call in seconds | [optional] +**billedSec** | **Integer** | Duration of the conference call for billing purposes | [optional] +**isTelnyxBillable** | **Boolean** | Indicates whether Telnyx billing charges might be applicable | [optional] +**rate** | **String** | Currency amount per billing unit used to calculate the Telnyx billing cost | [optional] +**rateMeasuredIn** | **String** | Billing unit used to calculate the Telnyx billing cost | [optional] +**cost** | **String** | Currency amount for Telnyx billing cost | [optional] +**currency** | **String** | Telnyx account currency used to describe monetary values, including billing cost | [optional] +**recordType** | **String** | | + + + diff --git a/docs/CreateVerificationRequestWhatsapp.md b/docs/CreateVerificationRequestWhatsapp.md index 07e8ef56..392ecdc3 100644 --- a/docs/CreateVerificationRequestWhatsapp.md +++ b/docs/CreateVerificationRequestWhatsapp.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **phoneNumber** | **String** | +E164 formatted phone number. | **verifyProfileId** | [**UUID**](UUID.md) | The identifier of the associated Verify profile. | **timeoutSecs** | **Integer** | The number of seconds the verification code is valid for. | [optional] -**appName** | **String** | The name that identifies the application requesting 2fa in the verification message. | [optional] diff --git a/docs/Currency.md b/docs/Currency.md new file mode 100644 index 00000000..6186b705 --- /dev/null +++ b/docs/Currency.md @@ -0,0 +1,19 @@ + + +# Currency + +## Enum + + +* `AUD` (value: `"AUD"`) + +* `CAD` (value: `"CAD"`) + +* `EUR` (value: `"EUR"`) + +* `GBP` (value: `"GBP"`) + +* `USD` (value: `"USD"`) + + + diff --git a/docs/DetailRecord.md b/docs/DetailRecord.md new file mode 100644 index 00000000..dd6d47cc --- /dev/null +++ b/docs/DetailRecord.md @@ -0,0 +1,48 @@ + + +# DetailRecord + +An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records + +## oneOf schemas +* [ConferenceDetailRecord](ConferenceDetailRecord.md) +* [ConferenceParticipantDetailRecord](ConferenceParticipantDetailRecord.md) +* [MessageDetailRecord](MessageDetailRecord.md) + +## Example +```java +// Import classes: +import com.telnyx.sdk.model.DetailRecord; +import com.telnyx.sdk.model.ConferenceDetailRecord; +import com.telnyx.sdk.model.ConferenceParticipantDetailRecord; +import com.telnyx.sdk.model.MessageDetailRecord; + +public class Example { + public static void main(String[] args) { + DetailRecord exampleDetailRecord = new DetailRecord(); + + // create a new ConferenceDetailRecord + ConferenceDetailRecord exampleConferenceDetailRecord = new ConferenceDetailRecord(); + // set DetailRecord to ConferenceDetailRecord + exampleDetailRecord.setActualInstance(exampleConferenceDetailRecord); + // to get back the ConferenceDetailRecord set earlier + ConferenceDetailRecord testConferenceDetailRecord = (ConferenceDetailRecord) exampleDetailRecord.getActualInstance(); + + // create a new ConferenceParticipantDetailRecord + ConferenceParticipantDetailRecord exampleConferenceParticipantDetailRecord = new ConferenceParticipantDetailRecord(); + // set DetailRecord to ConferenceParticipantDetailRecord + exampleDetailRecord.setActualInstance(exampleConferenceParticipantDetailRecord); + // to get back the ConferenceParticipantDetailRecord set earlier + ConferenceParticipantDetailRecord testConferenceParticipantDetailRecord = (ConferenceParticipantDetailRecord) exampleDetailRecord.getActualInstance(); + + // create a new MessageDetailRecord + MessageDetailRecord exampleMessageDetailRecord = new MessageDetailRecord(); + // set DetailRecord to MessageDetailRecord + exampleDetailRecord.setActualInstance(exampleMessageDetailRecord); + // to get back the MessageDetailRecord set earlier + MessageDetailRecord testMessageDetailRecord = (MessageDetailRecord) exampleDetailRecord.getActualInstance(); + } +} +``` + + diff --git a/docs/DetailRecordsApi.md b/docs/DetailRecordsApi.md new file mode 100644 index 00000000..91a18eb9 --- /dev/null +++ b/docs/DetailRecordsApi.md @@ -0,0 +1,89 @@ +# DetailRecordsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**detailRecordsSearch**](DetailRecordsApi.md#detailRecordsSearch) | **GET** /detail_records | + + + +## detailRecordsSearch + +> DetailRecordsSearchResponse detailRecordsSearch(filterRecordType, filterDateRange, filter, pageNumber, pageSize, sort) + + + +Search for any detail record across the Telnyx Platform + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.DetailRecordsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + DetailRecordsApi apiInstance = new DetailRecordsApi(defaultClient); + String filterRecordType = messaging; // String | Filter by the given record type + String filterDateRange = today; // String | Filter by the given user-friendly date range + Map filter = 2021-06-22; // Map | Filter records + Integer pageNumber = 1; // Integer | Page number + Integer pageSize = 20; // Integer | Page size + List sort = created_at; // List | Specifies the sort order for results + try { + DetailRecordsSearchResponse result = apiInstance.detailRecordsSearch(filterRecordType, filterDateRange, filter, pageNumber, pageSize, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DetailRecordsApi#detailRecordsSearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filterRecordType** | **String**| Filter by the given record type | + **filterDateRange** | **String**| Filter by the given user-friendly date range | [optional] + **filter** | [**Map<String, Object>**](Object.md)| Filter records | [optional] + **pageNumber** | **Integer**| Page number | [optional] [default to 1] + **pageSize** | **Integer**| Page size | [optional] [default to 20] + **sort** | [**List<String>**](String.md)| Specifies the sort order for results | [optional] + +### Return type + +[**DetailRecordsSearchResponse**](DetailRecordsSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful | - | + diff --git a/docs/DetailRecordsSearchResponse.md b/docs/DetailRecordsSearchResponse.md new file mode 100644 index 00000000..a73914a2 --- /dev/null +++ b/docs/DetailRecordsSearchResponse.md @@ -0,0 +1,13 @@ + + +# DetailRecordsSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<DetailRecord>**](DetailRecord.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/Direction.md b/docs/Direction.md new file mode 100644 index 00000000..c954fa84 --- /dev/null +++ b/docs/Direction.md @@ -0,0 +1,13 @@ + + +# Direction + +## Enum + + +* `INBOUND` (value: `"INBOUND"`) + +* `OUTBOUND` (value: `"OUTBOUND"`) + + + diff --git a/docs/Fax.md b/docs/Fax.md index 4629342b..f3f1c8f0 100644 --- a/docs/Fax.md +++ b/docs/Fax.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **quality** | **String** | The quality of the fax. Can be normal, high, very_high | [optional] **status** | [**StatusEnum**](#StatusEnum) | Status of the fax | [optional] **webhookUrl** | **String** | URL that will receive fax webhooks | [optional] -**webhookFailoverUrl** | **String** | Optional failover URL that will receive fax webhooks if `webhook_url` doesn't return a 2XX response | [optional] +**webhookFailoverUrl** | **String** | Optional failover URL that will receive fax webhooks if webhook_url doesn't return a 2XX response | [optional] **storeMedia** | **Boolean** | Should fax media be stored on temporary URL | [optional] **storedMediaUrl** | **String** | If store_media was set to true, this is a link to temporary location. Link expires after 7 days. | [optional] **createdAt** | **String** | ISO 8601 timestamp when resource was created | [optional] @@ -50,6 +50,10 @@ MEDIA_PROCESSED | "media.processed" SENDING | "sending" DELIVERED | "delivered" FAILED | "failed" +INITIATED | "initiated" +RECEIVING | "receiving" +MEDIA_PROCESSING | "media.processing" +RECEIVED | "received" diff --git a/docs/JoinConferenceRequest.md b/docs/JoinConferenceRequest.md index 09ae472f..e738a802 100644 --- a/docs/JoinConferenceRequest.md +++ b/docs/JoinConferenceRequest.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **startConferenceOnEnter** | **Boolean** | Whether the conference should be started after the participant joins the conference. Defaults to \"false\". | [optional] **supervisorRole** | [**SupervisorRoleEnum**](#SupervisorRoleEnum) | Sets the joining participant as a supervisor for the conference. A conference can have multiple supervisors. \"barge\" means the supervisor enters the conference as a normal participant. This is the same as \"none\". \"monitor\" means the supervisor is muted but can hear all participants. \"whisper\" means that only the specified \"whisper_call_control_ids\" can hear the supervisor. Defaults to \"none\". | [optional] **whisperCallControlIds** | **List<String>** | Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only. | [optional] +**beepEnabled** | [**BeepEnabledEnum**](#BeepEnabledEnum) | Whether a beep sound should be played when the participant joins and/or leaves the conference. Can be used to override the conference-level setting. | [optional] @@ -31,3 +32,14 @@ WHISPER | "whisper" +## Enum: BeepEnabledEnum + +Name | Value +---- | ----- +ALWAYS | "always" +NEVER | "never" +ON_ENTER | "on_enter" +ON_EXIT | "on_exit" + + + diff --git a/docs/MessageCost.md b/docs/MessageCost.md new file mode 100644 index 00000000..14120b61 --- /dev/null +++ b/docs/MessageCost.md @@ -0,0 +1,13 @@ + + +# MessageCost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | [**BigDecimal**](BigDecimal.md) | Final cost. Cost is calculated as rate * parts | [optional] +**currency** | [**Currency**](Currency.md) | | [optional] + + + diff --git a/docs/MessageDetailRecord.md b/docs/MessageDetailRecord.md new file mode 100644 index 00000000..b042269e --- /dev/null +++ b/docs/MessageDetailRecord.md @@ -0,0 +1,33 @@ + + +# MessageDetailRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Message id | [optional] +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Message sent time | [optional] +**outboundProfileName** | **String** | Configured profile name. New profiles can be created and configured on Telnyx portal | [optional] +**outboundProfileId** | **String** | Configured profile id. New profiles can be created and configured on Telnyx portal | [optional] +**direction** | [**Direction**](Direction.md) | | [optional] +**parts** | **Integer** | Number of parts this message has. Max number of character is 160. If message contains more characters then that it will be broken down in multiple parts | [optional] +**status** | [**MessageStatus**](MessageStatus.md) | | [optional] +**cld** | **String** | The destination number for a call, or the callee | [optional] +**cli** | **String** | The number associated with the person initiating the call, or the caller | [optional] +**rate** | [**MessageRate**](MessageRate.md) | | [optional] +**cost** | [**MessageCost**](MessageCost.md) | | [optional] +**countryIso** | **String** | Cld number ISO country code. | [optional] +**messageType** | [**MessageType**](MessageType.md) | | [optional] +**errors** | **List<String>** | Error returned by the gateway in case sending of message failed. | [optional] +**normalizedCarrier** | **String** | Cld carrier. | [optional] +**passThroughFee** | [**PassThroughFee**](PassThroughFee.md) | | [optional] +**tags** | **String** | User tag. | [optional] +**mcc** | **String** | Mobile country code. | [optional] +**mnc** | **String** | Mobile network code. | [optional] +**product** | [**Product**](Product.md) | | [optional] +**recordType** | **String** | | +**userId** | **String** | User id | [optional] + + + diff --git a/docs/MessageRate.md b/docs/MessageRate.md new file mode 100644 index 00000000..a93c62d5 --- /dev/null +++ b/docs/MessageRate.md @@ -0,0 +1,13 @@ + + +# MessageRate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | [**BigDecimal**](BigDecimal.md) | Rate applied to the message | [optional] +**currency** | [**Currency**](Currency.md) | | [optional] + + + diff --git a/docs/MessageStatus.md b/docs/MessageStatus.md new file mode 100644 index 00000000..119ed063 --- /dev/null +++ b/docs/MessageStatus.md @@ -0,0 +1,23 @@ + + +# MessageStatus + +## Enum + + +* `GW_TIMEOUT` (value: `"GW_TIMEOUT"`) + +* `DELIVERED` (value: `"DELIVERED"`) + +* `DLR_UNCONFIRMED` (value: `"DLR_UNCONFIRMED"`) + +* `DLR_TIMEOUT` (value: `"DLR_TIMEOUT"`) + +* `RECEIVED` (value: `"RECEIVED"`) + +* `GW_REJECT` (value: `"GW_REJECT"`) + +* `FAILED` (value: `"FAILED"`) + + + diff --git a/docs/MessageType.md b/docs/MessageType.md new file mode 100644 index 00000000..126c4305 --- /dev/null +++ b/docs/MessageType.md @@ -0,0 +1,13 @@ + + +# MessageType + +## Enum + + +* `SMS` (value: `"SMS"`) + +* `MMS` (value: `"MMS"`) + + + diff --git a/docs/OutboundMessageEvent.md b/docs/OutboundMessageEvent.md index d81fab61..25c278ec 100644 --- a/docs/OutboundMessageEvent.md +++ b/docs/OutboundMessageEvent.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**OutboundMessage**](OutboundMessage.md) | | [optional] +**meta** | [**OutboundMessageEventMeta**](OutboundMessageEventMeta.md) | | [optional] diff --git a/docs/OutboundMessageEventMeta.md b/docs/OutboundMessageEventMeta.md new file mode 100644 index 00000000..8fa121fb --- /dev/null +++ b/docs/OutboundMessageEventMeta.md @@ -0,0 +1,13 @@ + + +# OutboundMessageEventMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attempt** | **Integer** | Number of attempts to deliver the webhook event. | [optional] +**deliveredTo** | **String** | The webhook URL the event was delivered to. | [optional] + + + diff --git a/docs/OutboundMessagePayload.md b/docs/OutboundMessagePayload.md index 827dde31..c4e5b3e4 100644 --- a/docs/OutboundMessagePayload.md +++ b/docs/OutboundMessagePayload.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **id** | [**UUID**](UUID.md) | Identifies the type of resource. | [optional] **type** | [**TypeEnum**](#TypeEnum) | The type of message. | [optional] **messagingProfileId** | **String** | Unique identifier for a messaging profile. | [optional] +**organizationId** | [**UUID**](UUID.md) | The id of the organization the messaging profile belongs to. | [optional] **from** | [**OutboundMessagePayloadFrom**](OutboundMessagePayloadFrom.md) | | [optional] **to** | [**List<OutboundMessagePayloadTo>**](OutboundMessagePayloadTo.md) | | [optional] **text** | **String** | Message body (i.e., content) as a non-empty string. **Required for SMS** | [optional] diff --git a/docs/PassThroughFee.md b/docs/PassThroughFee.md new file mode 100644 index 00000000..b5a87724 --- /dev/null +++ b/docs/PassThroughFee.md @@ -0,0 +1,13 @@ + + +# PassThroughFee + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | [**BigDecimal**](BigDecimal.md) | Normalized carrier pass through fee | [optional] +**currency** | [**Currency**](Currency.md) | | [optional] + + + diff --git a/docs/PhoneNumberDeletedDetailed.md b/docs/PhoneNumberDeletedDetailed.md index cc56a4f7..d0136c52 100644 --- a/docs/PhoneNumberDeletedDetailed.md +++ b/docs/PhoneNumberDeletedDetailed.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **callerIdNameEnabled** | **Boolean** | Indicates whether caller ID is enabled for this number. | [optional] [readonly] **callRecordingEnabled** | **Boolean** | Indicates whether call recording is enabled for this number. | [optional] [readonly] **t38FaxGatewayEnabled** | **Boolean** | Indicates whether T38 Fax Gateway for inbound calls to this number. | [optional] [readonly] +**phoneNumberType** | [**PhoneNumberTypeEnum**](#PhoneNumberTypeEnum) | The phone number's type. | [optional] [readonly] **purchasedAt** | **String** | ISO 8601 formatted date indicating the time the request was made to purchase the number. | [optional] [readonly] **createdAt** | **String** | ISO 8601 formatted date indicating when the time it took to activate after the purchase. | [optional] [readonly] **updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] [readonly] @@ -47,3 +48,12 @@ PORT_OUT_PENDING | "port-out-pending" +## Enum: PhoneNumberTypeEnum + +Name | Value +---- | ----- +LONGCODE | "longcode" +TOLLFREE | "tollfree" + + + diff --git a/docs/PhoneNumberDetailed.md b/docs/PhoneNumberDetailed.md index 165e641f..2270d8e3 100644 --- a/docs/PhoneNumberDetailed.md +++ b/docs/PhoneNumberDetailed.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **callerIdNameEnabled** | **Boolean** | Indicates whether caller ID is enabled for this number. | [optional] [readonly] **callRecordingEnabled** | **Boolean** | Indicates whether call recording is enabled for this number. | [optional] [readonly] **t38FaxGatewayEnabled** | **Boolean** | Indicates whether T38 Fax Gateway for inbound calls to this number. | [optional] [readonly] +**phoneNumberType** | [**PhoneNumberTypeEnum**](#PhoneNumberTypeEnum) | The phone number's type. | [optional] [readonly] **purchasedAt** | **String** | ISO 8601 formatted date indicating when the resource was purchased. | [optional] [readonly] **createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] [readonly] @@ -46,3 +47,12 @@ PORT_OUT_PENDING | "port-out-pending" +## Enum: PhoneNumberTypeEnum + +Name | Value +---- | ----- +LONGCODE | "longcode" +TOLLFREE | "tollfree" + + + diff --git a/docs/Product.md b/docs/Product.md new file mode 100644 index 00000000..8f95cb1c --- /dev/null +++ b/docs/Product.md @@ -0,0 +1,21 @@ + + +# Product + +## Enum + + +* `LONG_CODE` (value: `"LONG_CODE"`) + +* `SHORT_CODE` (value: `"SHORT_CODE"`) + +* `SHORT_CODE_FTEU` (value: `"SHORT_CODE_FTEU"`) + +* `TOLL_FREE` (value: `"TOLL_FREE"`) + +* `ALPHANUMERIC_ID` (value: `"ALPHANUMERIC_ID"`) + +* `RCS` (value: `"RCS"`) + + + diff --git a/docs/ProgrammableFaxCommandsApi.md b/docs/ProgrammableFaxCommandsApi.md index 3ead0683..7b0704b3 100644 --- a/docs/ProgrammableFaxCommandsApi.md +++ b/docs/ProgrammableFaxCommandsApi.md @@ -169,7 +169,7 @@ Name | Type | Description | Notes Refresh a fax -This endpoint refreshes the media_url expiration for inbound faxes +Refreshes the inbound fax's media_url when it has expired ### Example diff --git a/docs/VerifyApi.md b/docs/VerifyApi.md index 2bd59e48..702464a7 100644 --- a/docs/VerifyApi.md +++ b/docs/VerifyApi.md @@ -5,9 +5,9 @@ All URIs are relative to *https://api.telnyx.com/v2* Method | HTTP request | Description ------------- | ------------- | ------------- [**createVerificationCall**](VerifyApi.md#createVerificationCall) | **POST** /verifications/call | Trigger a Call verification -[**createVerificationFlashcall**](VerifyApi.md#createVerificationFlashcall) | **POST** /verifications/flashcall | Trigger a flash call verification +[**createVerificationFlashcall**](VerifyApi.md#createVerificationFlashcall) | **POST** /verifications/flashcall | Trigger a Flash call verification [**createVerificationPSD2**](VerifyApi.md#createVerificationPSD2) | **POST** /verifications/psd2 | Trigger a PSD2 verification -[**createVerificationSMS**](VerifyApi.md#createVerificationSMS) | **POST** /verifications/sms | Trigger an SMS verification +[**createVerificationSMS**](VerifyApi.md#createVerificationSMS) | **POST** /verifications/sms | Trigger a SMS verification [**createVerificationWhatsapp**](VerifyApi.md#createVerificationWhatsapp) | **POST** /verifications/whatsapp | Trigger a Whatsapp verification [**createVerifyProfile**](VerifyApi.md#createVerifyProfile) | **POST** /verify_profiles | Create a Verify profile [**deleteVerifyProfile**](VerifyApi.md#deleteVerifyProfile) | **DELETE** /verify_profiles/{verify_profile_id} | Delete a Verify profile @@ -93,7 +93,7 @@ Name | Type | Description | Notes > CreateVerificationResponse createVerificationFlashcall(createVerificationRequestFlashcall) -Trigger a flash call verification +Trigger a Flash call verification ### Example @@ -231,7 +231,7 @@ Name | Type | Description | Notes > CreateVerificationResponse createVerificationSMS(createVerificationRequestSMS) -Trigger an SMS verification +Trigger a SMS verification ### Example diff --git a/openapi-configuration/jersey2/build.gradle.mustache b/openapi-configuration/jersey2/build.gradle.mustache index 6c25e49a..a55faff5 100644 --- a/openapi-configuration/jersey2/build.gradle.mustache +++ b/openapi-configuration/jersey2/build.gradle.mustache @@ -142,13 +142,13 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.10.3" - jackson_databind_version = "2.10.4" + jackson_version = "2.12.4" + jackson_databind_version = "2.12.4" {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} {{#threetenbp}} - jackson_threetenbp_version = "2.9.10" + jackson_threetenbp_version = "2.12.2" {{/threetenbp}} jersey_version = "1.19.4" jodatime_version = "2.9.9" diff --git a/openapi-configuration/jersey2/libraries/jersey2/build.gradle.mustache b/openapi-configuration/jersey2/libraries/jersey2/build.gradle.mustache index da115dbf..4e8cdaf9 100644 --- a/openapi-configuration/jersey2/libraries/jersey2/build.gradle.mustache +++ b/openapi-configuration/jersey2/libraries/jersey2/build.gradle.mustache @@ -125,8 +125,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.10.3" - jackson_databind_version = "2.10.4" + jackson_version = "2.12.4" + jackson_databind_version = "2.12.4" {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} @@ -140,7 +140,7 @@ ext { {{/supportJava6}} junit_version = "4.13" {{#threetenbp}} - threetenbp_version = "2.9.10" + threetenbp_version = "2.12.2" {{/threetenbp}} {{#hasOAuthMethods}} scribejava_apis_version = "6.9.0" diff --git a/openapi-configuration/open-api_java_sdk_config.json b/openapi-configuration/open-api_java_sdk_config.json index 24284e39..667c4e10 100644 --- a/openapi-configuration/open-api_java_sdk_config.json +++ b/openapi-configuration/open-api_java_sdk_config.json @@ -1,5 +1,5 @@ { - "artifactVersion" : "2.7.1", + "artifactVersion" : "2.8.0", "java8" : true, "dateLibrary" : "java8", "groupId" : "com.telnyx.sdk", diff --git a/openapi-configuration/spec3.json b/openapi-configuration/spec3.json index c63f9884..745826d3 100644 --- a/openapi-configuration/spec3.json +++ b/openapi-configuration/spec3.json @@ -64,6 +64,10 @@ "name": "Debugging", "description": "Call Control debugging" }, + { + "name": "Detail Records", + "description": "Detail Records operations" + }, { "name": "FQDN Connections", "description": "FQDN connection operations" @@ -1636,7 +1640,7 @@ "/calls/{call_control_id}/actions/playback_start": { "post": { "summary": "Play audio URL", - "description": "Play an audio file on the call. If multiple play audio commands are issued consecutively,\nthe audio files will be placed in a queue awaiting playback.\n\n*Notes:*\n\n- When `overlay` is enabled, `loop` is limited to 1, and `target_legs` is limited to `self`.\n- A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing.\n\n**Expected Webhooks:**\n\n- `call.playback.started`\n- `call.playback.ended`\n", + "description": "Play an audio file on the call. If multiple play audio commands are issued consecutively,\nthe audio files will be placed in a queue awaiting playback.\n\n*Notes:*\n\n- When `overlay` is enabled, `target_legs` is limited to `self`.\n- A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing.\n\n**Expected Webhooks:**\n\n- `call.playback.started`\n- `call.playback.ended`\n", "operationId": "callPlaybackStart", "tags": [ "Call Commands" @@ -2475,7 +2479,7 @@ }, "post": { "summary": "Create conference", - "description": "Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants.\n\n**Expected Webhooks:**\n\n- `conference.created`\n- `conference.participant.joined`\n- `conference.participant.left`\n- `conference.ended`\n- `conference.recording.saved`\n", + "description": "Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants.\n\n**Expected Webhooks:**\n\n- `conference.created`\n- `conference.participant.joined`\n- `conference.participant.left`\n- `conference.ended`\n- `conference.recording.saved`\n- `conference.floor.changed`\n", "operationId": "createConference", "tags": [ "Conference Commands" @@ -2586,6 +2590,27 @@ } } } + }, + "conferenceFloorChanged": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConferenceFloorChangedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } + } } }, "x-latency-category": "interactive" @@ -3855,6 +3880,149 @@ "x-latency-category": "responsive" } }, + "/detail_records": { + "get": { + "tags": [ + "Detail Records" + ], + "description": "Search for any detail record across the Telnyx Platform", + "operationId": "DetailRecordsSearch", + "parameters": [ + { + "name": "filter[record_type]", + "in": "query", + "description": "Filter by the given record type", + "required": true, + "schema": { + "type": "string" + }, + "examples": { + "filter[record_type]=messaging": { + "value": "messaging", + "summary": "Searches for messaging detail records" + } + } + }, + { + "name": "filter[date_range]", + "in": "query", + "description": "Filter by the given user-friendly date range", + "required": false, + "schema": { + "type": "string" + }, + "examples": { + "filter[date_range]=today": { + "value": "today", + "summary": "Searches for records with timestamp starting at `00:00:00` of the current day" + }, + "filter[date_range]=last_3_days": { + "value": "last_3_days", + "summary": "Searches for records with timestamp starting at `00:00:00` since 3 days ago" + } + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter records", + "required": false, + "schema": { + "type": "object", + "additionalProperties": true + }, + "examples": { + "filter[created_at][gte]=2021-06-22": { + "value": "2021-06-22", + "summary": "Searches for records with `created_at` starting at `2021-06-22`" + }, + "filter[created_at][lt]=2021-06-23": { + "value": "2021-06-23", + "summary": "Searches for records with `created_at` ending at `2021-06-22`" + }, + "filter[direction]=inbound": { + "value": "inbound", + "summary": "Searches for records which have the property `direction` equal to `inbound`" + }, + "filter[cld][starts_with]=123": { + "value": "123", + "summary": "Searches for records which have the property `cld` starting with the prefix `123`" + }, + "filter[cld][ends_with]=789": { + "value": "789", + "summary": "Searches for records which have the property `cld` ending with the suffix `789`" + }, + "filter[cld][contains]=456": { + "value": "456", + "summary": "Searches for records which have the property `cld` containing the pattern `456`" + } + } + }, + { + "name": "page[number]", + "in": "query", + "description": "Page number", + "schema": { + "type": "integer", + "format": "int32", + "default": 1, + "minimum": 1 + } + }, + { + "name": "page[size]", + "in": "query", + "description": "Page size", + "schema": { + "type": "integer", + "format": "int32", + "default": 20, + "minimum": 1, + "maximum": 50 + } + }, + { + "name": "sort", + "description": "Specifies the sort order for results", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "sort=created_at": { + "value": "created_at", + "summary": "Sorts search results using the `created_at` date-time in ascending order" + }, + "sort=-created_at": { + "value": "created_at", + "summary": "Sorts search results using the `created_at` date-time in descending order" + } + } + } + ], + "responses": { + "200": { + "description": "Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DetailRecordsSearchResponse" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "x-latency-category": "interactive" + } + }, "/fax_applications": { "get": { "description": "This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx.", @@ -4318,7 +4486,7 @@ "/faxes/{id}/actions/refresh": { "post": { "summary": "Refresh a fax", - "description": "This endpoint refreshes the media_url expiration for inbound faxes", + "description": "Refreshes the inbound fax's media_url when it has expired", "operationId": "RefreshFax", "tags": [ "Programmable Fax Commands" @@ -8382,7 +8550,7 @@ "tags": [ "Verify" ], - "summary": "Trigger a flash call verification", + "summary": "Trigger a Flash call verification", "operationId": "createVerificationFlashcall", "requestBody": { "content": { @@ -8452,7 +8620,7 @@ "tags": [ "Verify" ], - "summary": "Trigger an SMS verification", + "summary": "Trigger a SMS verification", "operationId": "createVerificationSMS", "requestBody": { "content": { @@ -14047,6 +14215,92 @@ } } }, + "ConferenceDetailRecord": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Conference id", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "name": { + "type": "string", + "description": "Conference name", + "example": "My Conference" + }, + "user_id": { + "type": "string", + "description": "User id", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "started_at": { + "type": "string", + "description": "Conference start time", + "format": "date-time", + "example": "2020-07-01T00:00:00-06:00" + }, + "ended_at": { + "type": "string", + "description": "Conference end time", + "format": "date-time", + "example": "2020-07-01T00:00:00-06:00" + }, + "expires_at": { + "type": "string", + "description": "Conference expiry time", + "format": "date-time", + "example": "2020-07-01T00:00:00-06:00" + }, + "region": { + "type": "string", + "description": "Region where the conference is hosted", + "example": "ch1" + }, + "call_leg_id": { + "type": "string", + "description": "Telnyx UUID that identifies the conference call leg", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "call_session_id": { + "type": "string", + "description": "Telnyx UUID that identifies with conference call session", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "connection_id": { + "type": "string", + "description": "Connection id", + "example": "1583941447772537867" + }, + "call_sec": { + "type": "integer", + "description": "Duration of the conference call in seconds", + "example": 100 + }, + "participant_count": { + "type": "integer", + "description": "Number of participants that joined the conference call", + "example": 5 + }, + "participant_call_sec": { + "type": "integer", + "description": "Sum of the conference call duration for all participants in seconds", + "example": 100 + }, + "is_telnyx_billable": { + "type": "boolean", + "description": "Indicates whether Telnyx billing charges might be applicable", + "example": false + }, + "record_type": { + "type": "string", + "example": "conference_detail_record", + "default": "conference_detail_record" + } + }, + "required": [ + "record_type" + ] + }, "ConferenceEnded": { "type": "object", "title": "Conference Ended", @@ -14150,6 +14404,90 @@ } } }, + "ConferenceFloorChangedEvent": { + "type": "object", + "title": "Conference Floor Changed", + "example": { + "record_type": "event", + "event_type": "conference.floor.changed", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "occured_at": "2018-02-02T22:25:27.521Z" + } + }, + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "conference.floor.changed", + "enum": [ + "conference.floor.changed" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call Control ID of the new speaker." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "Call Leg ID of the new speaker." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "Call Session ID of the new speaker." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "conference_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "Conference ID that had a speaker change event." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." + } + } + } + } + }, "ConferenceHoldRequest": { "type": "object", "title": "Conference Hold Request", @@ -14192,6 +14530,101 @@ ] } }, + "ConferenceParticipantDetailRecord": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Participant id", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "user_id": { + "type": "string", + "description": "User id", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "conference_id": { + "type": "string", + "description": "Conference id", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "joined_at": { + "type": "string", + "description": "Participant join time", + "format": "date-time", + "example": "2020-07-01T00:00:00-06:00" + }, + "left_at": { + "type": "string", + "description": "Participant leave time", + "format": "date-time", + "example": "2020-07-01T00:00:00-06:00" + }, + "destination_number": { + "type": "string", + "description": "Number called by the participant to join the conference", + "example": "+18005550199" + }, + "originating_number": { + "type": "string", + "description": "Participant origin number used in the conference call", + "example": "+18005550199" + }, + "call_leg_id": { + "type": "string", + "description": "Telnyx UUID that identifies the conference call leg", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "call_session_id": { + "type": "string", + "description": "Telnyx UUID that identifies with conference call session", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "call_sec": { + "type": "integer", + "description": "Duration of the conference call in seconds", + "example": 100 + }, + "billed_sec": { + "type": "integer", + "description": "Duration of the conference call for billing purposes", + "example": 120 + }, + "is_telnyx_billable": { + "type": "boolean", + "description": "Indicates whether Telnyx billing charges might be applicable", + "example": true + }, + "rate": { + "type": "string", + "description": "Currency amount per billing unit used to calculate the Telnyx billing cost", + "example": "0.002" + }, + "rate_measured_in": { + "type": "string", + "description": "Billing unit used to calculate the Telnyx billing cost", + "example": "minutes" + }, + "cost": { + "type": "string", + "description": "Currency amount for Telnyx billing cost", + "example": "0.004" + }, + "currency": { + "type": "string", + "description": "Telnyx account currency used to describe monetary values, including billing cost", + "example": "USD" + }, + "record_type": { + "type": "string", + "example": "conference_participant_detail_record", + "default": "conference_participant_detail_record" + } + }, + "required": [ + "record_type" + ] + }, "ConferenceParticipantJoined": { "type": "object", "title": "Conference Participant Joined", @@ -17479,11 +17912,6 @@ "type": "integer", "example": 300, "description": "The number of seconds the verification code is valid for." - }, - "app_name": { - "example": "Example Secure App", - "description": "The name that identifies the application requesting 2fa in the verification message.", - "type": "string" } } }, @@ -18001,6 +18429,18 @@ "example": "USD", "description": "The supported currencies." }, + "Currency": { + "type": "string", + "description": "User currency", + "example": "USD", + "enum": [ + "AUD", + "CAD", + "EUR", + "GBP", + "USD" + ] + }, "CustomSipHeader": { "type": "object", "title": "Custom SIP Header", @@ -18025,6 +18465,48 @@ "value": "val_1" } }, + "DetailRecord": { + "type": "object", + "description": "An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records", + "oneOf": [ + { + "$ref": "#/components/schemas/MessageDetailRecord" + }, + { + "$ref": "#/components/schemas/ConferenceDetailRecord" + }, + { + "$ref": "#/components/schemas/ConferenceParticipantDetailRecord" + } + ], + "required": [ + "record_type" + ], + "discriminator": { + "propertyName": "record_type" + } + }, + "DetailRecordsSearchResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DetailRecord" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + }, + "Direction": { + "type": "string", + "enum": [ + "INBOUND", + "OUTBOUND" + ] + }, "DtmfType": { "title": "DTMF Type", "type": "string", @@ -18234,7 +18716,11 @@ "media.processed", "sending", "delivered", - "failed" + "failed", + "initiated", + "receiving", + "media.processing", + "received" ] }, "webhook_url": { @@ -18242,7 +18728,7 @@ "type": "string" }, "webhook_failover_url": { - "description": "Optional failover URL that will receive fax webhooks if `webhook_url` doesn't return a 2XX response", + "description": "Optional failover URL that will receive fax webhooks if webhook_url doesn't return a 2XX response", "type": "string" }, "store_media": { @@ -19764,6 +20250,7 @@ "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", "type": "SMS", "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", + "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", "from": { "phone_number": "+18665550001", "carrier": "T-MOBILE USA, INC.", @@ -20069,6 +20556,7 @@ "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", "type": "SMS", "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", + "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", "from": { "phone_number": "+18665550001", "status": "delivered", @@ -20408,6 +20896,17 @@ "items": { "type": "string" } + }, + "beep_enabled": { + "description": "Whether a beep sound should be played when the participant joins and/or leaves the conference. Can be used to override the conference-level setting.", + "enum": [ + "always", + "never", + "on_enter", + "on_exit" + ], + "example": "on_exit", + "type": "string" } }, "example": { @@ -20423,7 +20922,8 @@ "whisper_call_control_ids": [ "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" - ] + ], + "beep_enabled": "always" } }, "LeaveQueueRequest": { @@ -20531,6 +21031,170 @@ "t38_fax_gateway_enabled": true } }, + "MessageCost": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Final cost. Cost is calculated as rate * parts", + "example": 0.1 + }, + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + }, + "MessageDetailRecord": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Message id", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + }, + "created_at": { + "type": "string", + "description": "Message sent time", + "format": "date-time", + "example": "2020-07-01T00:00:00-06:00" + }, + "outbound_profile_name": { + "type": "string", + "description": "Configured profile name. New profiles can be created and configured on Telnyx portal", + "example": "configured-profile-name" + }, + "outbound_profile_id": { + "type": "string", + "description": "Configured profile id. New profiles can be created and configured on Telnyx portal", + "example": "30ef55db-c4a2-4c4a-9804-a68077973d07" + }, + "direction": { + "$ref": "#/components/schemas/Direction" + }, + "parts": { + "type": "integer", + "description": "Number of parts this message has. Max number of character is 160. If message contains more characters then that it will be broken down in multiple parts", + "example": 2 + }, + "status": { + "$ref": "#/components/schemas/MessageStatus" + }, + "cld": { + "type": "string", + "description": "The destination number for a call, or the callee", + "example": "+1555123456" + }, + "cli": { + "type": "string", + "description": "The number associated with the person initiating the call, or the caller", + "example": "+1555123456" + }, + "rate": { + "$ref": "#/components/schemas/MessageRate" + }, + "cost": { + "$ref": "#/components/schemas/MessageCost" + }, + "country_iso": { + "type": "string", + "description": "Cld number ISO country code.", + "example": "US" + }, + "message_type": { + "$ref": "#/components/schemas/MessageType" + }, + "errors": { + "type": "array", + "properties": { + "empty": { + "type": "boolean" + } + }, + "description": "Error returned by the gateway in case sending of message failed.", + "example": "US", + "items": { + "type": "string", + "description": "Error returned by the gateway in case sending of message failed.", + "example": "40001" + } + }, + "normalized_carrier": { + "type": "string", + "description": "Cld carrier.", + "example": "T-Mobile" + }, + "pass_through_fee": { + "$ref": "#/components/schemas/PassThroughFee" + }, + "tags": { + "type": "string", + "description": "User tag.", + "example": "tag1" + }, + "mcc": { + "type": "string", + "description": "Mobile country code.", + "example": "204" + }, + "mnc": { + "type": "string", + "description": "Mobile network code.", + "example": "01" + }, + "product": { + "$ref": "#/components/schemas/Product" + }, + "record_type": { + "type": "string", + "example": "message_detail_record", + "default": "message_detail_record" + }, + "user_id": { + "type": "string", + "description": "User id", + "example": "3ca7bd3d-7d82-4e07-9df4-009123068320" + } + }, + "required": [ + "record_type" + ] + }, + "MessageRate": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Rate applied to the message", + "example": 0.1 + }, + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + }, + "MessageStatus": { + "type": "string", + "description": "Message status", + "example": "DELIVERED", + "enum": [ + "GW_TIMEOUT", + "DELIVERED", + "DLR_UNCONFIRMED", + "DLR_TIMEOUT", + "RECEIVED", + "GW_REJECT", + "FAILED" + ] + }, + "MessageType": { + "type": "string", + "description": "Type of message", + "example": "SMS", + "enum": [ + "SMS", + "MMS" + ] + }, "MessagingFeatureSet": { "type": "object", "nullable": true, @@ -21517,9 +22181,10 @@ "payload": { "record_type": "message", "direction": "outbound", - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "id": "40385f64-5717-4562-b3fc-2c963f66afa6", "type": "MMS", - "messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6", + "messaging_profile_id": "4000eba1-a0c0-4563-9925-b25e842a7cb6", + "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", "from": { "phone_number": "+18445550001", "carrier": "TELNYX LLC", @@ -21564,6 +22229,22 @@ "properties": { "data": { "$ref": "#/components/schemas/OutboundMessage" + }, + "meta": { + "type": "object", + "properties": { + "attempt": { + "type": "integer", + "example": 1, + "description": "Number of attempts to deliver the webhook event." + }, + "delivered_to": { + "type": "string", + "format": "url", + "example": "https://www.example.com/hooks", + "description": "The webhook URL the event was delivered to." + } + } } } }, @@ -21603,6 +22284,11 @@ "type": "string", "description": "Unique identifier for a messaging profile." }, + "organization_id": { + "type": "string", + "format": "uuid", + "description": "The id of the organization the messaging profile belongs to." + }, "from": { "type": "object", "properties": { @@ -21787,9 +22473,10 @@ "example": { "record_type": "message", "direction": "outbound", - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "id": "40385f64-5717-4562-b3fc-2c963f66afa6", "type": "MMS", - "messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6", + "messaging_profile_id": "4000eba1-a0c0-4563-9925-b25e842a7cb6", + "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950", "from": { "phone_number": "+18445550001", "carrier": "TELNYX LLC", @@ -22154,6 +22841,19 @@ } } }, + "PassThroughFee": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Normalized carrier pass through fee", + "example": 0.1 + }, + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + }, "PauseRecordingRequest": { "type": "object", "title": "Pause Recording Request", @@ -22258,6 +22958,7 @@ "caller_id_name_enabled": true, "call_recording_enabled": true, "t38_fax_gateway_enabled": true, + "phone_number_type": "longcode", "purchased_at": "2019-10-23T18:10:00.000Z", "created_at": "2019-10-23T18:10:00.000Z", "updated_at": "2019-10-24T18:10:00.000Z" @@ -22368,6 +23069,15 @@ "description": "Indicates whether T38 Fax Gateway for inbound calls to this number.", "readOnly": true }, + "phone_number_type": { + "type": "string", + "description": "The phone number's type.", + "enum": [ + "longcode", + "tollfree" + ], + "readOnly": true + }, "purchased_at": { "type": "string", "description": "ISO 8601 formatted date indicating the time the request was made to purchase the number.", @@ -22410,6 +23120,7 @@ "caller_id_name_enabled": true, "call_recording_enabled": true, "t38_fax_gateway_enabled": true, + "phone_number_type": "longcode", "purchased_at": "2019-10-23T18:10:00.000Z", "created_at": "2019-10-23T18:10:00.000Z", "updated_at": "2019-10-24T18:10:00.000Z" @@ -22520,6 +23231,15 @@ "description": "Indicates whether T38 Fax Gateway for inbound calls to this number.", "readOnly": true }, + "phone_number_type": { + "type": "string", + "description": "The phone number's type.", + "enum": [ + "longcode", + "tollfree" + ], + "readOnly": true + }, "purchased_at": { "type": "string", "description": "ISO 8601 formatted date indicating when the resource was purchased.", @@ -23144,7 +23864,8 @@ "stop": { "description": "When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue.", "type": "string", - "example": "current" + "example": "current", + "default": "all" }, "target_legs": { "description": "Specifies the leg or legs on which audio will be played. If supplied, the value must be either `self`, `opposite` or `both`.", @@ -23274,6 +23995,19 @@ } } }, + "Product": { + "type": "string", + "description": "Used product", + "example": "LONG_CODE", + "enum": [ + "LONG_CODE", + "SHORT_CODE", + "SHORT_CODE_FTEU", + "TOLL_FREE", + "ALPHANUMERIC_ID", + "RCS" + ] + }, "Queue": { "type": "object", "title": "Queue", diff --git a/pom.xml b/pom.xml index 32857fb0..48d92ec9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ telnyx jar telnyx - 2.7.1 + 2.8.0 https://github.com/team-telnyx/telnyx-java/ Telnyx Java SDK diff --git a/src/main/java/com/telnyx/sdk/api/CallCommandsApi.java b/src/main/java/com/telnyx/sdk/api/CallCommandsApi.java index 5e80b85e..03311df4 100644 --- a/src/main/java/com/telnyx/sdk/api/CallCommandsApi.java +++ b/src/main/java/com/telnyx/sdk/api/CallCommandsApi.java @@ -835,7 +835,7 @@ public ApiResponse callHangupWithHttpInfo(String cal } /** * Play audio URL - * Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback. *Notes:* - When `overlay` is enabled, `loop` is limited to 1, and `target_legs` is limited to `self`. - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing. **Expected Webhooks:** - `call.playback.started` - `call.playback.ended` + * Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback. *Notes:* - When `overlay` is enabled, `target_legs` is limited to `self`. - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing. **Expected Webhooks:** - `call.playback.started` - `call.playback.ended` * @param callControlId Unique identifier and token for controlling the call (required) * @param playAudioUrlRequest Play audio URL request (required) * @return CallControlCommandResponse @@ -853,7 +853,7 @@ public CallControlCommandResponse callPlaybackStart(String callControlId, PlayAu /** * Play audio URL - * Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback. *Notes:* - When `overlay` is enabled, `loop` is limited to 1, and `target_legs` is limited to `self`. - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing. **Expected Webhooks:** - `call.playback.started` - `call.playback.ended` + * Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback. *Notes:* - When `overlay` is enabled, `target_legs` is limited to `self`. - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing. **Expected Webhooks:** - `call.playback.started` - `call.playback.ended` * @param callControlId Unique identifier and token for controlling the call (required) * @param playAudioUrlRequest Play audio URL request (required) * @return ApiResponse<CallControlCommandResponse> diff --git a/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java b/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java index d1c22a84..013a38cd 100644 --- a/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java +++ b/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java @@ -1031,7 +1031,7 @@ public ApiResponse conferenceUpdateWithHttpInfo(Strin } /** * Create conference - * Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. **Expected Webhooks:** - `conference.created` - `conference.participant.joined` - `conference.participant.left` - `conference.ended` - `conference.recording.saved` + * Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. **Expected Webhooks:** - `conference.created` - `conference.participant.joined` - `conference.participant.left` - `conference.ended` - `conference.recording.saved` - `conference.floor.changed` * @param createConferenceRequest Create a conference (required) * @return ConferenceResponse * @throws ApiException if fails to make API call @@ -1049,7 +1049,7 @@ public ConferenceResponse createConference(CreateConferenceRequest createConfere /** * Create conference - * Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. **Expected Webhooks:** - `conference.created` - `conference.participant.joined` - `conference.participant.left` - `conference.ended` - `conference.recording.saved` + * Create a conference from an existing call leg using a `call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. **Expected Webhooks:** - `conference.created` - `conference.participant.joined` - `conference.participant.left` - `conference.ended` - `conference.recording.saved` - `conference.floor.changed` * @param createConferenceRequest Create a conference (required) * @return ApiResponse<ConferenceResponse> * @throws ApiException if fails to make API call diff --git a/src/main/java/com/telnyx/sdk/api/DetailRecordsApi.java b/src/main/java/com/telnyx/sdk/api/DetailRecordsApi.java new file mode 100644 index 00000000..1c2c3c84 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/DetailRecordsApi.java @@ -0,0 +1,131 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.DetailRecordsSearchResponse; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DetailRecordsApi { + private ApiClient apiClient; + + public DetailRecordsApi() { + this(Configuration.getDefaultApiClient()); + } + + public DetailRecordsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * Search for any detail record across the Telnyx Platform + * @param filterRecordType Filter by the given record type (required) + * @param filterDateRange Filter by the given user-friendly date range (optional) + * @param filter Filter records (optional, default to new HashMap<>()) + * @param pageNumber Page number (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @param sort Specifies the sort order for results (optional, default to new ArrayList<>()) + * @return DetailRecordsSearchResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful -
+ */ + public DetailRecordsSearchResponse detailRecordsSearch(String filterRecordType, String filterDateRange, Map filter, Integer pageNumber, Integer pageSize, List sort) throws ApiException { + return detailRecordsSearchWithHttpInfo(filterRecordType, filterDateRange, filter, pageNumber, pageSize, sort).getData(); + } + + /** + * + * Search for any detail record across the Telnyx Platform + * @param filterRecordType Filter by the given record type (required) + * @param filterDateRange Filter by the given user-friendly date range (optional) + * @param filter Filter records (optional, default to new HashMap<>()) + * @param pageNumber Page number (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @param sort Specifies the sort order for results (optional, default to new ArrayList<>()) + * @return ApiResponse<DetailRecordsSearchResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful -
+ */ + public ApiResponse detailRecordsSearchWithHttpInfo(String filterRecordType, String filterDateRange, Map filter, Integer pageNumber, Integer pageSize, List sort) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'filterRecordType' is set + if (filterRecordType == null) { + throw new ApiException(400, "Missing the required parameter 'filterRecordType' when calling detailRecordsSearch"); + } + + // create path and map variables + String localVarPath = "/detail_records"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[record_type]", filterRecordType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[date_range]", filterDateRange)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("DetailRecordsApi.detailRecordsSearch", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApi.java b/src/main/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApi.java index 186c1458..8eec5c34 100644 --- a/src/main/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApi.java +++ b/src/main/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApi.java @@ -207,7 +207,7 @@ public ApiResponse listFaxesWithHttpInfo(OffsetDateTime filte } /** * Refresh a fax - * This endpoint refreshes the media_url expiration for inbound faxes + * Refreshes the inbound fax's media_url when it has expired * @param id The unique identifier of a fax. (required) * @return RefreshFaxResponse * @throws ApiException if fails to make API call @@ -225,7 +225,7 @@ public RefreshFaxResponse refreshFax(UUID id) throws ApiException { /** * Refresh a fax - * This endpoint refreshes the media_url expiration for inbound faxes + * Refreshes the inbound fax's media_url when it has expired * @param id The unique identifier of a fax. (required) * @return ApiResponse<RefreshFaxResponse> * @throws ApiException if fails to make API call diff --git a/src/main/java/com/telnyx/sdk/api/VerifyApi.java b/src/main/java/com/telnyx/sdk/api/VerifyApi.java index dfd6d715..fc306ff9 100644 --- a/src/main/java/com/telnyx/sdk/api/VerifyApi.java +++ b/src/main/java/com/telnyx/sdk/api/VerifyApi.java @@ -130,7 +130,7 @@ public ApiResponse createVerificationCallWithHttpInf localVarAuthNames, localVarReturnType, false); } /** - * Trigger a flash call verification + * Trigger a Flash call verification * * @param createVerificationRequestFlashcall (required) * @return CreateVerificationResponse @@ -147,7 +147,7 @@ public CreateVerificationResponse createVerificationFlashcall(CreateVerification } /** - * Trigger a flash call verification + * Trigger a Flash call verification * * @param createVerificationRequestFlashcall (required) * @return ApiResponse<CreateVerificationResponse> @@ -268,7 +268,7 @@ public ApiResponse createVerificationPSD2WithHttpInf localVarAuthNames, localVarReturnType, false); } /** - * Trigger an SMS verification + * Trigger a SMS verification * * @param createVerificationRequestSMS (required) * @return CreateVerificationResponse @@ -285,7 +285,7 @@ public CreateVerificationResponse createVerificationSMS(CreateVerificationReques } /** - * Trigger an SMS verification + * Trigger a SMS verification * * @param createVerificationRequestSMS (required) * @return ApiResponse<CreateVerificationResponse> diff --git a/src/main/java/com/telnyx/sdk/model/ConferenceDetailRecord.java b/src/main/java/com/telnyx/sdk/model/ConferenceDetailRecord.java new file mode 100644 index 00000000..c4fb2f7a --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ConferenceDetailRecord.java @@ -0,0 +1,529 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ConferenceDetailRecord + */ +@JsonPropertyOrder({ + ConferenceDetailRecord.JSON_PROPERTY_ID, + ConferenceDetailRecord.JSON_PROPERTY_NAME, + ConferenceDetailRecord.JSON_PROPERTY_USER_ID, + ConferenceDetailRecord.JSON_PROPERTY_STARTED_AT, + ConferenceDetailRecord.JSON_PROPERTY_ENDED_AT, + ConferenceDetailRecord.JSON_PROPERTY_EXPIRES_AT, + ConferenceDetailRecord.JSON_PROPERTY_REGION, + ConferenceDetailRecord.JSON_PROPERTY_CALL_LEG_ID, + ConferenceDetailRecord.JSON_PROPERTY_CALL_SESSION_ID, + ConferenceDetailRecord.JSON_PROPERTY_CONNECTION_ID, + ConferenceDetailRecord.JSON_PROPERTY_CALL_SEC, + ConferenceDetailRecord.JSON_PROPERTY_PARTICIPANT_COUNT, + ConferenceDetailRecord.JSON_PROPERTY_PARTICIPANT_CALL_SEC, + ConferenceDetailRecord.JSON_PROPERTY_IS_TELNYX_BILLABLE, + ConferenceDetailRecord.JSON_PROPERTY_RECORD_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConferenceDetailRecord { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private String userId; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private OffsetDateTime startedAt; + + public static final String JSON_PROPERTY_ENDED_AT = "ended_at"; + private OffsetDateTime endedAt; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + private OffsetDateTime expiresAt; + + public static final String JSON_PROPERTY_REGION = "region"; + private String region; + + public static final String JSON_PROPERTY_CALL_LEG_ID = "call_leg_id"; + private String callLegId; + + public static final String JSON_PROPERTY_CALL_SESSION_ID = "call_session_id"; + private String callSessionId; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_CALL_SEC = "call_sec"; + private Integer callSec; + + public static final String JSON_PROPERTY_PARTICIPANT_COUNT = "participant_count"; + private Integer participantCount; + + public static final String JSON_PROPERTY_PARTICIPANT_CALL_SEC = "participant_call_sec"; + private Integer participantCallSec; + + public static final String JSON_PROPERTY_IS_TELNYX_BILLABLE = "is_telnyx_billable"; + private Boolean isTelnyxBillable; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType = "conference_detail_record"; + + + public ConferenceDetailRecord id(String id) { + this.id = id; + return this; + } + + /** + * Conference id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Conference id") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ConferenceDetailRecord name(String name) { + this.name = name; + return this; + } + + /** + * Conference name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "My Conference", value = "Conference name") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public ConferenceDetailRecord userId(String userId) { + this.userId = userId; + return this; + } + + /** + * User id + * @return userId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "User id") + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + public ConferenceDetailRecord startedAt(OffsetDateTime startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Conference start time + * @return startedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-07-01T00:00-06:00", value = "Conference start time") + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getStartedAt() { + return startedAt; + } + + + public void setStartedAt(OffsetDateTime startedAt) { + this.startedAt = startedAt; + } + + + public ConferenceDetailRecord endedAt(OffsetDateTime endedAt) { + this.endedAt = endedAt; + return this; + } + + /** + * Conference end time + * @return endedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-07-01T00:00-06:00", value = "Conference end time") + @JsonProperty(JSON_PROPERTY_ENDED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEndedAt() { + return endedAt; + } + + + public void setEndedAt(OffsetDateTime endedAt) { + this.endedAt = endedAt; + } + + + public ConferenceDetailRecord expiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Conference expiry time + * @return expiresAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-07-01T00:00-06:00", value = "Conference expiry time") + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + + public void setExpiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + + public ConferenceDetailRecord region(String region) { + this.region = region; + return this; + } + + /** + * Region where the conference is hosted + * @return region + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ch1", value = "Region where the conference is hosted") + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRegion() { + return region; + } + + + public void setRegion(String region) { + this.region = region; + } + + + public ConferenceDetailRecord callLegId(String callLegId) { + this.callLegId = callLegId; + return this; + } + + /** + * Telnyx UUID that identifies the conference call leg + * @return callLegId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Telnyx UUID that identifies the conference call leg") + @JsonProperty(JSON_PROPERTY_CALL_LEG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallLegId() { + return callLegId; + } + + + public void setCallLegId(String callLegId) { + this.callLegId = callLegId; + } + + + public ConferenceDetailRecord callSessionId(String callSessionId) { + this.callSessionId = callSessionId; + return this; + } + + /** + * Telnyx UUID that identifies with conference call session + * @return callSessionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Telnyx UUID that identifies with conference call session") + @JsonProperty(JSON_PROPERTY_CALL_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallSessionId() { + return callSessionId; + } + + + public void setCallSessionId(String callSessionId) { + this.callSessionId = callSessionId; + } + + + public ConferenceDetailRecord connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Connection id + * @return connectionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1583941447772537867", value = "Connection id") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public ConferenceDetailRecord callSec(Integer callSec) { + this.callSec = callSec; + return this; + } + + /** + * Duration of the conference call in seconds + * @return callSec + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "100", value = "Duration of the conference call in seconds") + @JsonProperty(JSON_PROPERTY_CALL_SEC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCallSec() { + return callSec; + } + + + public void setCallSec(Integer callSec) { + this.callSec = callSec; + } + + + public ConferenceDetailRecord participantCount(Integer participantCount) { + this.participantCount = participantCount; + return this; + } + + /** + * Number of participants that joined the conference call + * @return participantCount + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5", value = "Number of participants that joined the conference call") + @JsonProperty(JSON_PROPERTY_PARTICIPANT_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getParticipantCount() { + return participantCount; + } + + + public void setParticipantCount(Integer participantCount) { + this.participantCount = participantCount; + } + + + public ConferenceDetailRecord participantCallSec(Integer participantCallSec) { + this.participantCallSec = participantCallSec; + return this; + } + + /** + * Sum of the conference call duration for all participants in seconds + * @return participantCallSec + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "100", value = "Sum of the conference call duration for all participants in seconds") + @JsonProperty(JSON_PROPERTY_PARTICIPANT_CALL_SEC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getParticipantCallSec() { + return participantCallSec; + } + + + public void setParticipantCallSec(Integer participantCallSec) { + this.participantCallSec = participantCallSec; + } + + + public ConferenceDetailRecord isTelnyxBillable(Boolean isTelnyxBillable) { + this.isTelnyxBillable = isTelnyxBillable; + return this; + } + + /** + * Indicates whether Telnyx billing charges might be applicable + * @return isTelnyxBillable + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Indicates whether Telnyx billing charges might be applicable") + @JsonProperty(JSON_PROPERTY_IS_TELNYX_BILLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsTelnyxBillable() { + return isTelnyxBillable; + } + + + public void setIsTelnyxBillable(Boolean isTelnyxBillable) { + this.isTelnyxBillable = isTelnyxBillable; + } + + + public ConferenceDetailRecord recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Get recordType + * @return recordType + **/ + @ApiModelProperty(example = "conference_detail_record", required = true, value = "") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + /** + * Return true if this ConferenceDetailRecord object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConferenceDetailRecord conferenceDetailRecord = (ConferenceDetailRecord) o; + return Objects.equals(this.id, conferenceDetailRecord.id) && + Objects.equals(this.name, conferenceDetailRecord.name) && + Objects.equals(this.userId, conferenceDetailRecord.userId) && + Objects.equals(this.startedAt, conferenceDetailRecord.startedAt) && + Objects.equals(this.endedAt, conferenceDetailRecord.endedAt) && + Objects.equals(this.expiresAt, conferenceDetailRecord.expiresAt) && + Objects.equals(this.region, conferenceDetailRecord.region) && + Objects.equals(this.callLegId, conferenceDetailRecord.callLegId) && + Objects.equals(this.callSessionId, conferenceDetailRecord.callSessionId) && + Objects.equals(this.connectionId, conferenceDetailRecord.connectionId) && + Objects.equals(this.callSec, conferenceDetailRecord.callSec) && + Objects.equals(this.participantCount, conferenceDetailRecord.participantCount) && + Objects.equals(this.participantCallSec, conferenceDetailRecord.participantCallSec) && + Objects.equals(this.isTelnyxBillable, conferenceDetailRecord.isTelnyxBillable) && + Objects.equals(this.recordType, conferenceDetailRecord.recordType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, userId, startedAt, endedAt, expiresAt, region, callLegId, callSessionId, connectionId, callSec, participantCount, participantCallSec, isTelnyxBillable, recordType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConferenceDetailRecord {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" endedAt: ").append(toIndentedString(endedAt)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" callLegId: ").append(toIndentedString(callLegId)).append("\n"); + sb.append(" callSessionId: ").append(toIndentedString(callSessionId)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" callSec: ").append(toIndentedString(callSec)).append("\n"); + sb.append(" participantCount: ").append(toIndentedString(participantCount)).append("\n"); + sb.append(" participantCallSec: ").append(toIndentedString(participantCallSec)).append("\n"); + sb.append(" isTelnyxBillable: ").append(toIndentedString(isTelnyxBillable)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ConferenceFloorChangedEvent.java b/src/main/java/com/telnyx/sdk/model/ConferenceFloorChangedEvent.java new file mode 100644 index 00000000..c8249217 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ConferenceFloorChangedEvent.java @@ -0,0 +1,267 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.ConferenceFloorChangedEventPayload; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ConferenceFloorChangedEvent + */ +@JsonPropertyOrder({ + ConferenceFloorChangedEvent.JSON_PROPERTY_RECORD_TYPE, + ConferenceFloorChangedEvent.JSON_PROPERTY_EVENT_TYPE, + ConferenceFloorChangedEvent.JSON_PROPERTY_ID, + ConferenceFloorChangedEvent.JSON_PROPERTY_PAYLOAD +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConferenceFloorChangedEvent { + /** + * Identifies the type of the resource. + */ + public enum RecordTypeEnum { + EVENT("event"); + + private String value; + + RecordTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RecordTypeEnum fromValue(String value) { + for (RecordTypeEnum b : RecordTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private RecordTypeEnum recordType; + + /** + * The type of event being delivered. + */ + public enum EventTypeEnum { + CONFERENCE_FLOOR_CHANGED("conference.floor.changed"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; + private EventTypeEnum eventType; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + private ConferenceFloorChangedEventPayload payload; + + + public ConferenceFloorChangedEvent recordType(RecordTypeEnum recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "event", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecordTypeEnum getRecordType() { + return recordType; + } + + + public void setRecordType(RecordTypeEnum recordType) { + this.recordType = recordType; + } + + + public ConferenceFloorChangedEvent eventType(EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of event being delivered. + * @return eventType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "conference.floor.changed", value = "The type of event being delivered.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EventTypeEnum getEventType() { + return eventType; + } + + + public void setEventType(EventTypeEnum eventType) { + this.eventType = eventType; + } + + + public ConferenceFloorChangedEvent id(UUID id) { + this.id = id; + return this; + } + + /** + * Identifies the type of resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", value = "Identifies the type of resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UUID getId() { + return id; + } + + + public void setId(UUID id) { + this.id = id; + } + + + public ConferenceFloorChangedEvent payload(ConferenceFloorChangedEventPayload payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * @return payload + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConferenceFloorChangedEventPayload getPayload() { + return payload; + } + + + public void setPayload(ConferenceFloorChangedEventPayload payload) { + this.payload = payload; + } + + + /** + * Return true if this ConferenceFloorChangedEvent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConferenceFloorChangedEvent conferenceFloorChangedEvent = (ConferenceFloorChangedEvent) o; + return Objects.equals(this.recordType, conferenceFloorChangedEvent.recordType) && + Objects.equals(this.eventType, conferenceFloorChangedEvent.eventType) && + Objects.equals(this.id, conferenceFloorChangedEvent.id) && + Objects.equals(this.payload, conferenceFloorChangedEvent.payload); + } + + @Override + public int hashCode() { + return Objects.hash(recordType, eventType, id, payload); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConferenceFloorChangedEvent {\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ConferenceFloorChangedEventPayload.java b/src/main/java/com/telnyx/sdk/model/ConferenceFloorChangedEventPayload.java new file mode 100644 index 00000000..26ccf3bf --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ConferenceFloorChangedEventPayload.java @@ -0,0 +1,290 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ConferenceFloorChangedEventPayload + */ +@JsonPropertyOrder({ + ConferenceFloorChangedEventPayload.JSON_PROPERTY_CALL_CONTROL_ID, + ConferenceFloorChangedEventPayload.JSON_PROPERTY_CONNECTION_ID, + ConferenceFloorChangedEventPayload.JSON_PROPERTY_CALL_LEG_ID, + ConferenceFloorChangedEventPayload.JSON_PROPERTY_CALL_SESSION_ID, + ConferenceFloorChangedEventPayload.JSON_PROPERTY_CLIENT_STATE, + ConferenceFloorChangedEventPayload.JSON_PROPERTY_CONFERENCE_ID, + ConferenceFloorChangedEventPayload.JSON_PROPERTY_OCCURRED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConferenceFloorChangedEventPayload { + public static final String JSON_PROPERTY_CALL_CONTROL_ID = "call_control_id"; + private String callControlId; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_CALL_LEG_ID = "call_leg_id"; + private String callLegId; + + public static final String JSON_PROPERTY_CALL_SESSION_ID = "call_session_id"; + private String callSessionId; + + public static final String JSON_PROPERTY_CLIENT_STATE = "client_state"; + private String clientState; + + public static final String JSON_PROPERTY_CONFERENCE_ID = "conference_id"; + private String conferenceId; + + public static final String JSON_PROPERTY_OCCURRED_AT = "occurred_at"; + private OffsetDateTime occurredAt; + + + public ConferenceFloorChangedEventPayload callControlId(String callControlId) { + this.callControlId = callControlId; + return this; + } + + /** + * Call Control ID of the new speaker. + * @return callControlId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", value = "Call Control ID of the new speaker.") + @JsonProperty(JSON_PROPERTY_CALL_CONTROL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallControlId() { + return callControlId; + } + + + public void setCallControlId(String callControlId) { + this.callControlId = callControlId; + } + + + public ConferenceFloorChangedEventPayload connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Telnyx connection ID used in the call. + * @return connectionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "7267xxxxxxxxxxxxxx", value = "Telnyx connection ID used in the call.") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public ConferenceFloorChangedEventPayload callLegId(String callLegId) { + this.callLegId = callLegId; + return this; + } + + /** + * Call Leg ID of the new speaker. + * @return callLegId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", value = "Call Leg ID of the new speaker.") + @JsonProperty(JSON_PROPERTY_CALL_LEG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallLegId() { + return callLegId; + } + + + public void setCallLegId(String callLegId) { + this.callLegId = callLegId; + } + + + public ConferenceFloorChangedEventPayload callSessionId(String callSessionId) { + this.callSessionId = callSessionId; + return this; + } + + /** + * Call Session ID of the new speaker. + * @return callSessionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", value = "Call Session ID of the new speaker.") + @JsonProperty(JSON_PROPERTY_CALL_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallSessionId() { + return callSessionId; + } + + + public void setCallSessionId(String callSessionId) { + this.callSessionId = callSessionId; + } + + + public ConferenceFloorChangedEventPayload clientState(String clientState) { + this.clientState = clientState; + return this; + } + + /** + * State received from a command. + * @return clientState + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "aGF2ZSBhIG5pY2UgZGF5ID1d", value = "State received from a command.") + @JsonProperty(JSON_PROPERTY_CLIENT_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getClientState() { + return clientState; + } + + + public void setClientState(String clientState) { + this.clientState = clientState; + } + + + public ConferenceFloorChangedEventPayload conferenceId(String conferenceId) { + this.conferenceId = conferenceId; + return this; + } + + /** + * Conference ID that had a speaker change event. + * @return conferenceId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", value = "Conference ID that had a speaker change event.") + @JsonProperty(JSON_PROPERTY_CONFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConferenceId() { + return conferenceId; + } + + + public void setConferenceId(String conferenceId) { + this.conferenceId = conferenceId; + } + + + public ConferenceFloorChangedEventPayload occurredAt(OffsetDateTime occurredAt) { + this.occurredAt = occurredAt; + return this; + } + + /** + * ISO 8601 datetime of when the event occurred. + * @return occurredAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 datetime of when the event occurred.") + @JsonProperty(JSON_PROPERTY_OCCURRED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getOccurredAt() { + return occurredAt; + } + + + public void setOccurredAt(OffsetDateTime occurredAt) { + this.occurredAt = occurredAt; + } + + + /** + * Return true if this ConferenceFloorChangedEvent_payload object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConferenceFloorChangedEventPayload conferenceFloorChangedEventPayload = (ConferenceFloorChangedEventPayload) o; + return Objects.equals(this.callControlId, conferenceFloorChangedEventPayload.callControlId) && + Objects.equals(this.connectionId, conferenceFloorChangedEventPayload.connectionId) && + Objects.equals(this.callLegId, conferenceFloorChangedEventPayload.callLegId) && + Objects.equals(this.callSessionId, conferenceFloorChangedEventPayload.callSessionId) && + Objects.equals(this.clientState, conferenceFloorChangedEventPayload.clientState) && + Objects.equals(this.conferenceId, conferenceFloorChangedEventPayload.conferenceId) && + Objects.equals(this.occurredAt, conferenceFloorChangedEventPayload.occurredAt); + } + + @Override + public int hashCode() { + return Objects.hash(callControlId, connectionId, callLegId, callSessionId, clientState, conferenceId, occurredAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConferenceFloorChangedEventPayload {\n"); + sb.append(" callControlId: ").append(toIndentedString(callControlId)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" callLegId: ").append(toIndentedString(callLegId)).append("\n"); + sb.append(" callSessionId: ").append(toIndentedString(callSessionId)).append("\n"); + sb.append(" clientState: ").append(toIndentedString(clientState)).append("\n"); + sb.append(" conferenceId: ").append(toIndentedString(conferenceId)).append("\n"); + sb.append(" occurredAt: ").append(toIndentedString(occurredAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ConferenceParticipantDetailRecord.java b/src/main/java/com/telnyx/sdk/model/ConferenceParticipantDetailRecord.java new file mode 100644 index 00000000..b790dd13 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ConferenceParticipantDetailRecord.java @@ -0,0 +1,589 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ConferenceParticipantDetailRecord + */ +@JsonPropertyOrder({ + ConferenceParticipantDetailRecord.JSON_PROPERTY_ID, + ConferenceParticipantDetailRecord.JSON_PROPERTY_USER_ID, + ConferenceParticipantDetailRecord.JSON_PROPERTY_CONFERENCE_ID, + ConferenceParticipantDetailRecord.JSON_PROPERTY_JOINED_AT, + ConferenceParticipantDetailRecord.JSON_PROPERTY_LEFT_AT, + ConferenceParticipantDetailRecord.JSON_PROPERTY_DESTINATION_NUMBER, + ConferenceParticipantDetailRecord.JSON_PROPERTY_ORIGINATING_NUMBER, + ConferenceParticipantDetailRecord.JSON_PROPERTY_CALL_LEG_ID, + ConferenceParticipantDetailRecord.JSON_PROPERTY_CALL_SESSION_ID, + ConferenceParticipantDetailRecord.JSON_PROPERTY_CALL_SEC, + ConferenceParticipantDetailRecord.JSON_PROPERTY_BILLED_SEC, + ConferenceParticipantDetailRecord.JSON_PROPERTY_IS_TELNYX_BILLABLE, + ConferenceParticipantDetailRecord.JSON_PROPERTY_RATE, + ConferenceParticipantDetailRecord.JSON_PROPERTY_RATE_MEASURED_IN, + ConferenceParticipantDetailRecord.JSON_PROPERTY_COST, + ConferenceParticipantDetailRecord.JSON_PROPERTY_CURRENCY, + ConferenceParticipantDetailRecord.JSON_PROPERTY_RECORD_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConferenceParticipantDetailRecord { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private String userId; + + public static final String JSON_PROPERTY_CONFERENCE_ID = "conference_id"; + private String conferenceId; + + public static final String JSON_PROPERTY_JOINED_AT = "joined_at"; + private OffsetDateTime joinedAt; + + public static final String JSON_PROPERTY_LEFT_AT = "left_at"; + private OffsetDateTime leftAt; + + public static final String JSON_PROPERTY_DESTINATION_NUMBER = "destination_number"; + private String destinationNumber; + + public static final String JSON_PROPERTY_ORIGINATING_NUMBER = "originating_number"; + private String originatingNumber; + + public static final String JSON_PROPERTY_CALL_LEG_ID = "call_leg_id"; + private String callLegId; + + public static final String JSON_PROPERTY_CALL_SESSION_ID = "call_session_id"; + private String callSessionId; + + public static final String JSON_PROPERTY_CALL_SEC = "call_sec"; + private Integer callSec; + + public static final String JSON_PROPERTY_BILLED_SEC = "billed_sec"; + private Integer billedSec; + + public static final String JSON_PROPERTY_IS_TELNYX_BILLABLE = "is_telnyx_billable"; + private Boolean isTelnyxBillable; + + public static final String JSON_PROPERTY_RATE = "rate"; + private String rate; + + public static final String JSON_PROPERTY_RATE_MEASURED_IN = "rate_measured_in"; + private String rateMeasuredIn; + + public static final String JSON_PROPERTY_COST = "cost"; + private String cost; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType = "conference_participant_detail_record"; + + + public ConferenceParticipantDetailRecord id(String id) { + this.id = id; + return this; + } + + /** + * Participant id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Participant id") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ConferenceParticipantDetailRecord userId(String userId) { + this.userId = userId; + return this; + } + + /** + * User id + * @return userId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "User id") + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + public ConferenceParticipantDetailRecord conferenceId(String conferenceId) { + this.conferenceId = conferenceId; + return this; + } + + /** + * Conference id + * @return conferenceId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Conference id") + @JsonProperty(JSON_PROPERTY_CONFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConferenceId() { + return conferenceId; + } + + + public void setConferenceId(String conferenceId) { + this.conferenceId = conferenceId; + } + + + public ConferenceParticipantDetailRecord joinedAt(OffsetDateTime joinedAt) { + this.joinedAt = joinedAt; + return this; + } + + /** + * Participant join time + * @return joinedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-07-01T00:00-06:00", value = "Participant join time") + @JsonProperty(JSON_PROPERTY_JOINED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getJoinedAt() { + return joinedAt; + } + + + public void setJoinedAt(OffsetDateTime joinedAt) { + this.joinedAt = joinedAt; + } + + + public ConferenceParticipantDetailRecord leftAt(OffsetDateTime leftAt) { + this.leftAt = leftAt; + return this; + } + + /** + * Participant leave time + * @return leftAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-07-01T00:00-06:00", value = "Participant leave time") + @JsonProperty(JSON_PROPERTY_LEFT_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getLeftAt() { + return leftAt; + } + + + public void setLeftAt(OffsetDateTime leftAt) { + this.leftAt = leftAt; + } + + + public ConferenceParticipantDetailRecord destinationNumber(String destinationNumber) { + this.destinationNumber = destinationNumber; + return this; + } + + /** + * Number called by the participant to join the conference + * @return destinationNumber + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "+18005550199", value = "Number called by the participant to join the conference") + @JsonProperty(JSON_PROPERTY_DESTINATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDestinationNumber() { + return destinationNumber; + } + + + public void setDestinationNumber(String destinationNumber) { + this.destinationNumber = destinationNumber; + } + + + public ConferenceParticipantDetailRecord originatingNumber(String originatingNumber) { + this.originatingNumber = originatingNumber; + return this; + } + + /** + * Participant origin number used in the conference call + * @return originatingNumber + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "+18005550199", value = "Participant origin number used in the conference call") + @JsonProperty(JSON_PROPERTY_ORIGINATING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOriginatingNumber() { + return originatingNumber; + } + + + public void setOriginatingNumber(String originatingNumber) { + this.originatingNumber = originatingNumber; + } + + + public ConferenceParticipantDetailRecord callLegId(String callLegId) { + this.callLegId = callLegId; + return this; + } + + /** + * Telnyx UUID that identifies the conference call leg + * @return callLegId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Telnyx UUID that identifies the conference call leg") + @JsonProperty(JSON_PROPERTY_CALL_LEG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallLegId() { + return callLegId; + } + + + public void setCallLegId(String callLegId) { + this.callLegId = callLegId; + } + + + public ConferenceParticipantDetailRecord callSessionId(String callSessionId) { + this.callSessionId = callSessionId; + return this; + } + + /** + * Telnyx UUID that identifies with conference call session + * @return callSessionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Telnyx UUID that identifies with conference call session") + @JsonProperty(JSON_PROPERTY_CALL_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCallSessionId() { + return callSessionId; + } + + + public void setCallSessionId(String callSessionId) { + this.callSessionId = callSessionId; + } + + + public ConferenceParticipantDetailRecord callSec(Integer callSec) { + this.callSec = callSec; + return this; + } + + /** + * Duration of the conference call in seconds + * @return callSec + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "100", value = "Duration of the conference call in seconds") + @JsonProperty(JSON_PROPERTY_CALL_SEC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCallSec() { + return callSec; + } + + + public void setCallSec(Integer callSec) { + this.callSec = callSec; + } + + + public ConferenceParticipantDetailRecord billedSec(Integer billedSec) { + this.billedSec = billedSec; + return this; + } + + /** + * Duration of the conference call for billing purposes + * @return billedSec + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "120", value = "Duration of the conference call for billing purposes") + @JsonProperty(JSON_PROPERTY_BILLED_SEC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getBilledSec() { + return billedSec; + } + + + public void setBilledSec(Integer billedSec) { + this.billedSec = billedSec; + } + + + public ConferenceParticipantDetailRecord isTelnyxBillable(Boolean isTelnyxBillable) { + this.isTelnyxBillable = isTelnyxBillable; + return this; + } + + /** + * Indicates whether Telnyx billing charges might be applicable + * @return isTelnyxBillable + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Indicates whether Telnyx billing charges might be applicable") + @JsonProperty(JSON_PROPERTY_IS_TELNYX_BILLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsTelnyxBillable() { + return isTelnyxBillable; + } + + + public void setIsTelnyxBillable(Boolean isTelnyxBillable) { + this.isTelnyxBillable = isTelnyxBillable; + } + + + public ConferenceParticipantDetailRecord rate(String rate) { + this.rate = rate; + return this; + } + + /** + * Currency amount per billing unit used to calculate the Telnyx billing cost + * @return rate + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0.002", value = "Currency amount per billing unit used to calculate the Telnyx billing cost") + @JsonProperty(JSON_PROPERTY_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRate() { + return rate; + } + + + public void setRate(String rate) { + this.rate = rate; + } + + + public ConferenceParticipantDetailRecord rateMeasuredIn(String rateMeasuredIn) { + this.rateMeasuredIn = rateMeasuredIn; + return this; + } + + /** + * Billing unit used to calculate the Telnyx billing cost + * @return rateMeasuredIn + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "minutes", value = "Billing unit used to calculate the Telnyx billing cost") + @JsonProperty(JSON_PROPERTY_RATE_MEASURED_IN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRateMeasuredIn() { + return rateMeasuredIn; + } + + + public void setRateMeasuredIn(String rateMeasuredIn) { + this.rateMeasuredIn = rateMeasuredIn; + } + + + public ConferenceParticipantDetailRecord cost(String cost) { + this.cost = cost; + return this; + } + + /** + * Currency amount for Telnyx billing cost + * @return cost + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0.004", value = "Currency amount for Telnyx billing cost") + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCost() { + return cost; + } + + + public void setCost(String cost) { + this.cost = cost; + } + + + public ConferenceParticipantDetailRecord currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Telnyx account currency used to describe monetary values, including billing cost + * @return currency + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "USD", value = "Telnyx account currency used to describe monetary values, including billing cost") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrency() { + return currency; + } + + + public void setCurrency(String currency) { + this.currency = currency; + } + + + public ConferenceParticipantDetailRecord recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Get recordType + * @return recordType + **/ + @ApiModelProperty(example = "conference_participant_detail_record", required = true, value = "") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + /** + * Return true if this ConferenceParticipantDetailRecord object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConferenceParticipantDetailRecord conferenceParticipantDetailRecord = (ConferenceParticipantDetailRecord) o; + return Objects.equals(this.id, conferenceParticipantDetailRecord.id) && + Objects.equals(this.userId, conferenceParticipantDetailRecord.userId) && + Objects.equals(this.conferenceId, conferenceParticipantDetailRecord.conferenceId) && + Objects.equals(this.joinedAt, conferenceParticipantDetailRecord.joinedAt) && + Objects.equals(this.leftAt, conferenceParticipantDetailRecord.leftAt) && + Objects.equals(this.destinationNumber, conferenceParticipantDetailRecord.destinationNumber) && + Objects.equals(this.originatingNumber, conferenceParticipantDetailRecord.originatingNumber) && + Objects.equals(this.callLegId, conferenceParticipantDetailRecord.callLegId) && + Objects.equals(this.callSessionId, conferenceParticipantDetailRecord.callSessionId) && + Objects.equals(this.callSec, conferenceParticipantDetailRecord.callSec) && + Objects.equals(this.billedSec, conferenceParticipantDetailRecord.billedSec) && + Objects.equals(this.isTelnyxBillable, conferenceParticipantDetailRecord.isTelnyxBillable) && + Objects.equals(this.rate, conferenceParticipantDetailRecord.rate) && + Objects.equals(this.rateMeasuredIn, conferenceParticipantDetailRecord.rateMeasuredIn) && + Objects.equals(this.cost, conferenceParticipantDetailRecord.cost) && + Objects.equals(this.currency, conferenceParticipantDetailRecord.currency) && + Objects.equals(this.recordType, conferenceParticipantDetailRecord.recordType); + } + + @Override + public int hashCode() { + return Objects.hash(id, userId, conferenceId, joinedAt, leftAt, destinationNumber, originatingNumber, callLegId, callSessionId, callSec, billedSec, isTelnyxBillable, rate, rateMeasuredIn, cost, currency, recordType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConferenceParticipantDetailRecord {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" conferenceId: ").append(toIndentedString(conferenceId)).append("\n"); + sb.append(" joinedAt: ").append(toIndentedString(joinedAt)).append("\n"); + sb.append(" leftAt: ").append(toIndentedString(leftAt)).append("\n"); + sb.append(" destinationNumber: ").append(toIndentedString(destinationNumber)).append("\n"); + sb.append(" originatingNumber: ").append(toIndentedString(originatingNumber)).append("\n"); + sb.append(" callLegId: ").append(toIndentedString(callLegId)).append("\n"); + sb.append(" callSessionId: ").append(toIndentedString(callSessionId)).append("\n"); + sb.append(" callSec: ").append(toIndentedString(callSec)).append("\n"); + sb.append(" billedSec: ").append(toIndentedString(billedSec)).append("\n"); + sb.append(" isTelnyxBillable: ").append(toIndentedString(isTelnyxBillable)).append("\n"); + sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); + sb.append(" rateMeasuredIn: ").append(toIndentedString(rateMeasuredIn)).append("\n"); + sb.append(" cost: ").append(toIndentedString(cost)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateVerificationRequestWhatsapp.java b/src/main/java/com/telnyx/sdk/model/CreateVerificationRequestWhatsapp.java index 96f3b251..86794cb3 100644 --- a/src/main/java/com/telnyx/sdk/model/CreateVerificationRequestWhatsapp.java +++ b/src/main/java/com/telnyx/sdk/model/CreateVerificationRequestWhatsapp.java @@ -36,8 +36,7 @@ @JsonPropertyOrder({ CreateVerificationRequestWhatsapp.JSON_PROPERTY_PHONE_NUMBER, CreateVerificationRequestWhatsapp.JSON_PROPERTY_VERIFY_PROFILE_ID, - CreateVerificationRequestWhatsapp.JSON_PROPERTY_TIMEOUT_SECS, - CreateVerificationRequestWhatsapp.JSON_PROPERTY_APP_NAME + CreateVerificationRequestWhatsapp.JSON_PROPERTY_TIMEOUT_SECS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateVerificationRequestWhatsapp { @@ -50,9 +49,6 @@ public class CreateVerificationRequestWhatsapp { public static final String JSON_PROPERTY_TIMEOUT_SECS = "timeout_secs"; private Integer timeoutSecs; - public static final String JSON_PROPERTY_APP_NAME = "app_name"; - private String appName; - public CreateVerificationRequestWhatsapp phoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -124,30 +120,6 @@ public void setTimeoutSecs(Integer timeoutSecs) { } - public CreateVerificationRequestWhatsapp appName(String appName) { - this.appName = appName; - return this; - } - - /** - * The name that identifies the application requesting 2fa in the verification message. - * @return appName - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Example Secure App", value = "The name that identifies the application requesting 2fa in the verification message.") - @JsonProperty(JSON_PROPERTY_APP_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAppName() { - return appName; - } - - - public void setAppName(String appName) { - this.appName = appName; - } - - /** * Return true if this CreateVerificationRequestWhatsapp object is equal to o. */ @@ -162,13 +134,12 @@ public boolean equals(Object o) { CreateVerificationRequestWhatsapp createVerificationRequestWhatsapp = (CreateVerificationRequestWhatsapp) o; return Objects.equals(this.phoneNumber, createVerificationRequestWhatsapp.phoneNumber) && Objects.equals(this.verifyProfileId, createVerificationRequestWhatsapp.verifyProfileId) && - Objects.equals(this.timeoutSecs, createVerificationRequestWhatsapp.timeoutSecs) && - Objects.equals(this.appName, createVerificationRequestWhatsapp.appName); + Objects.equals(this.timeoutSecs, createVerificationRequestWhatsapp.timeoutSecs); } @Override public int hashCode() { - return Objects.hash(phoneNumber, verifyProfileId, timeoutSecs, appName); + return Objects.hash(phoneNumber, verifyProfileId, timeoutSecs); } @@ -179,7 +150,6 @@ public String toString() { sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" verifyProfileId: ").append(toIndentedString(verifyProfileId)).append("\n"); sb.append(" timeoutSecs: ").append(toIndentedString(timeoutSecs)).append("\n"); - sb.append(" appName: ").append(toIndentedString(appName)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/telnyx/sdk/model/Currency.java b/src/main/java/com/telnyx/sdk/model/Currency.java new file mode 100644 index 00000000..adb94b0f --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/Currency.java @@ -0,0 +1,69 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * User currency + */ +public enum Currency { + + AUD("AUD"), + + CAD("CAD"), + + EUR("EUR"), + + GBP("GBP"), + + USD("USD"); + + private String value; + + Currency(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Currency fromValue(String value) { + for (Currency b : Currency.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/DetailRecord.java b/src/main/java/com/telnyx/sdk/model/DetailRecord.java new file mode 100644 index 00000000..e1d3cba6 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/DetailRecord.java @@ -0,0 +1,319 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.ConferenceDetailRecord; +import com.telnyx.sdk.model.ConferenceParticipantDetailRecord; +import com.telnyx.sdk.model.Direction; +import com.telnyx.sdk.model.MessageDetailRecord; +import com.telnyx.sdk.model.MessageStatus; +import com.telnyx.sdk.model.MessageType; +import com.telnyx.sdk.model.PassThroughFee; +import com.telnyx.sdk.model.Product; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import javax.ws.rs.core.GenericType; +import javax.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.telnyx.sdk.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = DetailRecord.DetailRecordDeserializer.class) +@JsonSerialize(using = DetailRecord.DetailRecordSerializer.class) +public class DetailRecord extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(DetailRecord.class.getName()); + + public static class DetailRecordSerializer extends StdSerializer { + public DetailRecordSerializer(Class t) { + super(t); + } + + public DetailRecordSerializer() { + this(null); + } + + @Override + public void serialize(DetailRecord value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class DetailRecordDeserializer extends StdDeserializer { + public DetailRecordDeserializer() { + this(DetailRecord.class); + } + + public DetailRecordDeserializer(Class vc) { + super(vc); + } + + @Override + public DetailRecord deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize ConferenceDetailRecord + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ConferenceDetailRecord.class.equals(Integer.class) || ConferenceDetailRecord.class.equals(Long.class) || ConferenceDetailRecord.class.equals(Float.class) || ConferenceDetailRecord.class.equals(Double.class) || ConferenceDetailRecord.class.equals(Boolean.class) || ConferenceDetailRecord.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ConferenceDetailRecord.class.equals(Integer.class) || ConferenceDetailRecord.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ConferenceDetailRecord.class.equals(Float.class) || ConferenceDetailRecord.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ConferenceDetailRecord.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ConferenceDetailRecord.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ConferenceDetailRecord.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ConferenceDetailRecord'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ConferenceDetailRecord'", e); + } + + // deserialize ConferenceParticipantDetailRecord + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ConferenceParticipantDetailRecord.class.equals(Integer.class) || ConferenceParticipantDetailRecord.class.equals(Long.class) || ConferenceParticipantDetailRecord.class.equals(Float.class) || ConferenceParticipantDetailRecord.class.equals(Double.class) || ConferenceParticipantDetailRecord.class.equals(Boolean.class) || ConferenceParticipantDetailRecord.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ConferenceParticipantDetailRecord.class.equals(Integer.class) || ConferenceParticipantDetailRecord.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ConferenceParticipantDetailRecord.class.equals(Float.class) || ConferenceParticipantDetailRecord.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ConferenceParticipantDetailRecord.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ConferenceParticipantDetailRecord.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ConferenceParticipantDetailRecord.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ConferenceParticipantDetailRecord'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ConferenceParticipantDetailRecord'", e); + } + + // deserialize MessageDetailRecord + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MessageDetailRecord.class.equals(Integer.class) || MessageDetailRecord.class.equals(Long.class) || MessageDetailRecord.class.equals(Float.class) || MessageDetailRecord.class.equals(Double.class) || MessageDetailRecord.class.equals(Boolean.class) || MessageDetailRecord.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MessageDetailRecord.class.equals(Integer.class) || MessageDetailRecord.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MessageDetailRecord.class.equals(Float.class) || MessageDetailRecord.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (MessageDetailRecord.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MessageDetailRecord.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(MessageDetailRecord.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'MessageDetailRecord'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MessageDetailRecord'", e); + } + + if (match == 1) { + DetailRecord ret = new DetailRecord(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for DetailRecord: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public DetailRecord getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "DetailRecord cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public final static Map schemas = new HashMap(); + + public DetailRecord() { + super("oneOf", Boolean.FALSE); + } + + public DetailRecord(ConferenceDetailRecord o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DetailRecord(ConferenceParticipantDetailRecord o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DetailRecord(MessageDetailRecord o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ConferenceDetailRecord", new GenericType() { + }); + schemas.put("ConferenceParticipantDetailRecord", new GenericType() { + }); + schemas.put("MessageDetailRecord", new GenericType() { + }); + JSON.registerDescendants(DetailRecord.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ConferenceDetailRecord", ConferenceDetailRecord.class); + mappings.put("ConferenceParticipantDetailRecord", ConferenceParticipantDetailRecord.class); + mappings.put("MessageDetailRecord", MessageDetailRecord.class); + mappings.put("DetailRecord", DetailRecord.class); + JSON.registerDiscriminator(DetailRecord.class, "record_type", mappings); + } + + @Override + public Map getSchemas() { + return DetailRecord.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * ConferenceDetailRecord, ConferenceParticipantDetailRecord, MessageDetailRecord + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ConferenceDetailRecord.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ConferenceParticipantDetailRecord.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(MessageDetailRecord.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be ConferenceDetailRecord, ConferenceParticipantDetailRecord, MessageDetailRecord"); + } + + /** + * Get the actual instance, which can be the following: + * ConferenceDetailRecord, ConferenceParticipantDetailRecord, MessageDetailRecord + * + * @return The actual instance (ConferenceDetailRecord, ConferenceParticipantDetailRecord, MessageDetailRecord) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ConferenceDetailRecord`. If the actual instanct is not `ConferenceDetailRecord`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ConferenceDetailRecord` + * @throws ClassCastException if the instance is not `ConferenceDetailRecord` + */ + public ConferenceDetailRecord getConferenceDetailRecord() throws ClassCastException { + return (ConferenceDetailRecord)super.getActualInstance(); + } + + /** + * Get the actual instance of `ConferenceParticipantDetailRecord`. If the actual instanct is not `ConferenceParticipantDetailRecord`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ConferenceParticipantDetailRecord` + * @throws ClassCastException if the instance is not `ConferenceParticipantDetailRecord` + */ + public ConferenceParticipantDetailRecord getConferenceParticipantDetailRecord() throws ClassCastException { + return (ConferenceParticipantDetailRecord)super.getActualInstance(); + } + + /** + * Get the actual instance of `MessageDetailRecord`. If the actual instanct is not `MessageDetailRecord`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MessageDetailRecord` + * @throws ClassCastException if the instance is not `MessageDetailRecord` + */ + public MessageDetailRecord getMessageDetailRecord() throws ClassCastException { + return (MessageDetailRecord)super.getActualInstance(); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/DetailRecordsSearchResponse.java b/src/main/java/com/telnyx/sdk/model/DetailRecordsSearchResponse.java new file mode 100644 index 00000000..233e27cc --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/DetailRecordsSearchResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.DetailRecord; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * DetailRecordsSearchResponse + */ +@JsonPropertyOrder({ + DetailRecordsSearchResponse.JSON_PROPERTY_DATA, + DetailRecordsSearchResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DetailRecordsSearchResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public DetailRecordsSearchResponse data(List data) { + this.data = data; + return this; + } + + public DetailRecordsSearchResponse addDataItem(DetailRecord dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public DetailRecordsSearchResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this DetailRecordsSearchResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetailRecordsSearchResponse detailRecordsSearchResponse = (DetailRecordsSearchResponse) o; + return Objects.equals(this.data, detailRecordsSearchResponse.data) && + Objects.equals(this.meta, detailRecordsSearchResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DetailRecordsSearchResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/Direction.java b/src/main/java/com/telnyx/sdk/model/Direction.java new file mode 100644 index 00000000..b96fe0c1 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/Direction.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets Direction + */ +public enum Direction { + + INBOUND("INBOUND"), + + OUTBOUND("OUTBOUND"); + + private String value; + + Direction(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Direction fromValue(String value) { + for (Direction b : Direction.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/Fax.java b/src/main/java/com/telnyx/sdk/model/Fax.java index db2a0ffe..155f6d04 100644 --- a/src/main/java/com/telnyx/sdk/model/Fax.java +++ b/src/main/java/com/telnyx/sdk/model/Fax.java @@ -155,7 +155,15 @@ public enum StatusEnum { DELIVERED("delivered"), - FAILED("failed"); + FAILED("failed"), + + INITIATED("initiated"), + + RECEIVING("receiving"), + + MEDIA_PROCESSING("media.processing"), + + RECEIVED("received"); private String value; @@ -452,11 +460,11 @@ public Fax webhookFailoverUrl(String webhookFailoverUrl) { } /** - * Optional failover URL that will receive fax webhooks if `webhook_url` doesn't return a 2XX response + * Optional failover URL that will receive fax webhooks if webhook_url doesn't return a 2XX response * @return webhookFailoverUrl **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional failover URL that will receive fax webhooks if `webhook_url` doesn't return a 2XX response") + @ApiModelProperty(value = "Optional failover URL that will receive fax webhooks if webhook_url doesn't return a 2XX response") @JsonProperty(JSON_PROPERTY_WEBHOOK_FAILOVER_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/telnyx/sdk/model/JoinConferenceRequest.java b/src/main/java/com/telnyx/sdk/model/JoinConferenceRequest.java index ed389782..b3e3a320 100644 --- a/src/main/java/com/telnyx/sdk/model/JoinConferenceRequest.java +++ b/src/main/java/com/telnyx/sdk/model/JoinConferenceRequest.java @@ -44,7 +44,8 @@ JoinConferenceRequest.JSON_PROPERTY_MUTE, JoinConferenceRequest.JSON_PROPERTY_START_CONFERENCE_ON_ENTER, JoinConferenceRequest.JSON_PROPERTY_SUPERVISOR_ROLE, - JoinConferenceRequest.JSON_PROPERTY_WHISPER_CALL_CONTROL_IDS + JoinConferenceRequest.JSON_PROPERTY_WHISPER_CALL_CONTROL_IDS, + JoinConferenceRequest.JSON_PROPERTY_BEEP_ENABLED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class JoinConferenceRequest { @@ -120,6 +121,48 @@ public static SupervisorRoleEnum fromValue(String value) { public static final String JSON_PROPERTY_WHISPER_CALL_CONTROL_IDS = "whisper_call_control_ids"; private List whisperCallControlIds = null; + /** + * Whether a beep sound should be played when the participant joins and/or leaves the conference. Can be used to override the conference-level setting. + */ + public enum BeepEnabledEnum { + ALWAYS("always"), + + NEVER("never"), + + ON_ENTER("on_enter"), + + ON_EXIT("on_exit"); + + private String value; + + BeepEnabledEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BeepEnabledEnum fromValue(String value) { + for (BeepEnabledEnum b : BeepEnabledEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_BEEP_ENABLED = "beep_enabled"; + private BeepEnabledEnum beepEnabled; + public JoinConferenceRequest callControlId(String callControlId) { this.callControlId = callControlId; @@ -392,6 +435,30 @@ public void setWhisperCallControlIds(List whisperCallControlIds) { } + public JoinConferenceRequest beepEnabled(BeepEnabledEnum beepEnabled) { + this.beepEnabled = beepEnabled; + return this; + } + + /** + * Whether a beep sound should be played when the participant joins and/or leaves the conference. Can be used to override the conference-level setting. + * @return beepEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "on_exit", value = "Whether a beep sound should be played when the participant joins and/or leaves the conference. Can be used to override the conference-level setting.") + @JsonProperty(JSON_PROPERTY_BEEP_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BeepEnabledEnum getBeepEnabled() { + return beepEnabled; + } + + + public void setBeepEnabled(BeepEnabledEnum beepEnabled) { + this.beepEnabled = beepEnabled; + } + + /** * Return true if this JoinConferenceRequest object is equal to o. */ @@ -414,12 +481,13 @@ public boolean equals(Object o) { Objects.equals(this.mute, joinConferenceRequest.mute) && Objects.equals(this.startConferenceOnEnter, joinConferenceRequest.startConferenceOnEnter) && Objects.equals(this.supervisorRole, joinConferenceRequest.supervisorRole) && - Objects.equals(this.whisperCallControlIds, joinConferenceRequest.whisperCallControlIds); + Objects.equals(this.whisperCallControlIds, joinConferenceRequest.whisperCallControlIds) && + Objects.equals(this.beepEnabled, joinConferenceRequest.beepEnabled); } @Override public int hashCode() { - return Objects.hash(callControlId, clientState, commandId, endConferenceOnExit, softEndConferenceOnExit, hold, holdAudioUrl, mute, startConferenceOnEnter, supervisorRole, whisperCallControlIds); + return Objects.hash(callControlId, clientState, commandId, endConferenceOnExit, softEndConferenceOnExit, hold, holdAudioUrl, mute, startConferenceOnEnter, supervisorRole, whisperCallControlIds, beepEnabled); } @@ -438,6 +506,7 @@ public String toString() { sb.append(" startConferenceOnEnter: ").append(toIndentedString(startConferenceOnEnter)).append("\n"); sb.append(" supervisorRole: ").append(toIndentedString(supervisorRole)).append("\n"); sb.append(" whisperCallControlIds: ").append(toIndentedString(whisperCallControlIds)).append("\n"); + sb.append(" beepEnabled: ").append(toIndentedString(beepEnabled)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/telnyx/sdk/model/MessageCost.java b/src/main/java/com/telnyx/sdk/model/MessageCost.java new file mode 100644 index 00000000..9f0c3d7d --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/MessageCost.java @@ -0,0 +1,141 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Currency; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * MessageCost + */ +@JsonPropertyOrder({ + MessageCost.JSON_PROPERTY_AMOUNT, + MessageCost.JSON_PROPERTY_CURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MessageCost { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private BigDecimal amount; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private Currency currency; + + + public MessageCost amount(BigDecimal amount) { + this.amount = amount; + return this; + } + + /** + * Final cost. Cost is calculated as rate * parts + * @return amount + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0.1", value = "Final cost. Cost is calculated as rate * parts") + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getAmount() { + return amount; + } + + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + + public MessageCost currency(Currency currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Currency getCurrency() { + return currency; + } + + + public void setCurrency(Currency currency) { + this.currency = currency; + } + + + /** + * Return true if this MessageCost object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MessageCost messageCost = (MessageCost) o; + return Objects.equals(this.amount, messageCost.amount) && + Objects.equals(this.currency, messageCost.currency); + } + + @Override + public int hashCode() { + return Objects.hash(amount, currency); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MessageCost {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/MessageDetailRecord.java b/src/main/java/com/telnyx/sdk/model/MessageDetailRecord.java new file mode 100644 index 00000000..6e40c69b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/MessageDetailRecord.java @@ -0,0 +1,756 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Direction; +import com.telnyx.sdk.model.MessageCost; +import com.telnyx.sdk.model.MessageRate; +import com.telnyx.sdk.model.MessageStatus; +import com.telnyx.sdk.model.MessageType; +import com.telnyx.sdk.model.PassThroughFee; +import com.telnyx.sdk.model.Product; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * MessageDetailRecord + */ +@JsonPropertyOrder({ + MessageDetailRecord.JSON_PROPERTY_ID, + MessageDetailRecord.JSON_PROPERTY_CREATED_AT, + MessageDetailRecord.JSON_PROPERTY_OUTBOUND_PROFILE_NAME, + MessageDetailRecord.JSON_PROPERTY_OUTBOUND_PROFILE_ID, + MessageDetailRecord.JSON_PROPERTY_DIRECTION, + MessageDetailRecord.JSON_PROPERTY_PARTS, + MessageDetailRecord.JSON_PROPERTY_STATUS, + MessageDetailRecord.JSON_PROPERTY_CLD, + MessageDetailRecord.JSON_PROPERTY_CLI, + MessageDetailRecord.JSON_PROPERTY_RATE, + MessageDetailRecord.JSON_PROPERTY_COST, + MessageDetailRecord.JSON_PROPERTY_COUNTRY_ISO, + MessageDetailRecord.JSON_PROPERTY_MESSAGE_TYPE, + MessageDetailRecord.JSON_PROPERTY_ERRORS, + MessageDetailRecord.JSON_PROPERTY_NORMALIZED_CARRIER, + MessageDetailRecord.JSON_PROPERTY_PASS_THROUGH_FEE, + MessageDetailRecord.JSON_PROPERTY_TAGS, + MessageDetailRecord.JSON_PROPERTY_MCC, + MessageDetailRecord.JSON_PROPERTY_MNC, + MessageDetailRecord.JSON_PROPERTY_PRODUCT, + MessageDetailRecord.JSON_PROPERTY_RECORD_TYPE, + MessageDetailRecord.JSON_PROPERTY_USER_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MessageDetailRecord { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_OUTBOUND_PROFILE_NAME = "outbound_profile_name"; + private String outboundProfileName; + + public static final String JSON_PROPERTY_OUTBOUND_PROFILE_ID = "outbound_profile_id"; + private String outboundProfileId; + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private Direction direction; + + public static final String JSON_PROPERTY_PARTS = "parts"; + private Integer parts; + + public static final String JSON_PROPERTY_STATUS = "status"; + private MessageStatus status; + + public static final String JSON_PROPERTY_CLD = "cld"; + private String cld; + + public static final String JSON_PROPERTY_CLI = "cli"; + private String cli; + + public static final String JSON_PROPERTY_RATE = "rate"; + private MessageRate rate; + + public static final String JSON_PROPERTY_COST = "cost"; + private MessageCost cost; + + public static final String JSON_PROPERTY_COUNTRY_ISO = "country_iso"; + private String countryIso; + + public static final String JSON_PROPERTY_MESSAGE_TYPE = "message_type"; + private MessageType messageType; + + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors = null; + + public static final String JSON_PROPERTY_NORMALIZED_CARRIER = "normalized_carrier"; + private String normalizedCarrier; + + public static final String JSON_PROPERTY_PASS_THROUGH_FEE = "pass_through_fee"; + private PassThroughFee passThroughFee; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private String tags; + + public static final String JSON_PROPERTY_MCC = "mcc"; + private String mcc; + + public static final String JSON_PROPERTY_MNC = "mnc"; + private String mnc; + + public static final String JSON_PROPERTY_PRODUCT = "product"; + private Product product; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType = "message_detail_record"; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private String userId; + + + public MessageDetailRecord id(String id) { + this.id = id; + return this; + } + + /** + * Message id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "Message id") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public MessageDetailRecord createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Message sent time + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-07-01T00:00-06:00", value = "Message sent time") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public MessageDetailRecord outboundProfileName(String outboundProfileName) { + this.outboundProfileName = outboundProfileName; + return this; + } + + /** + * Configured profile name. New profiles can be created and configured on Telnyx portal + * @return outboundProfileName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "configured-profile-name", value = "Configured profile name. New profiles can be created and configured on Telnyx portal") + @JsonProperty(JSON_PROPERTY_OUTBOUND_PROFILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutboundProfileName() { + return outboundProfileName; + } + + + public void setOutboundProfileName(String outboundProfileName) { + this.outboundProfileName = outboundProfileName; + } + + + public MessageDetailRecord outboundProfileId(String outboundProfileId) { + this.outboundProfileId = outboundProfileId; + return this; + } + + /** + * Configured profile id. New profiles can be created and configured on Telnyx portal + * @return outboundProfileId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "30ef55db-c4a2-4c4a-9804-a68077973d07", value = "Configured profile id. New profiles can be created and configured on Telnyx portal") + @JsonProperty(JSON_PROPERTY_OUTBOUND_PROFILE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutboundProfileId() { + return outboundProfileId; + } + + + public void setOutboundProfileId(String outboundProfileId) { + this.outboundProfileId = outboundProfileId; + } + + + public MessageDetailRecord direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Direction getDirection() { + return direction; + } + + + public void setDirection(Direction direction) { + this.direction = direction; + } + + + public MessageDetailRecord parts(Integer parts) { + this.parts = parts; + return this; + } + + /** + * Number of parts this message has. Max number of character is 160. If message contains more characters then that it will be broken down in multiple parts + * @return parts + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2", value = "Number of parts this message has. Max number of character is 160. If message contains more characters then that it will be broken down in multiple parts") + @JsonProperty(JSON_PROPERTY_PARTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getParts() { + return parts; + } + + + public void setParts(Integer parts) { + this.parts = parts; + } + + + public MessageDetailRecord status(MessageStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public MessageStatus getStatus() { + return status; + } + + + public void setStatus(MessageStatus status) { + this.status = status; + } + + + public MessageDetailRecord cld(String cld) { + this.cld = cld; + return this; + } + + /** + * The destination number for a call, or the callee + * @return cld + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "+1555123456", value = "The destination number for a call, or the callee") + @JsonProperty(JSON_PROPERTY_CLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCld() { + return cld; + } + + + public void setCld(String cld) { + this.cld = cld; + } + + + public MessageDetailRecord cli(String cli) { + this.cli = cli; + return this; + } + + /** + * The number associated with the person initiating the call, or the caller + * @return cli + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "+1555123456", value = "The number associated with the person initiating the call, or the caller") + @JsonProperty(JSON_PROPERTY_CLI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCli() { + return cli; + } + + + public void setCli(String cli) { + this.cli = cli; + } + + + public MessageDetailRecord rate(MessageRate rate) { + this.rate = rate; + return this; + } + + /** + * Get rate + * @return rate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public MessageRate getRate() { + return rate; + } + + + public void setRate(MessageRate rate) { + this.rate = rate; + } + + + public MessageDetailRecord cost(MessageCost cost) { + this.cost = cost; + return this; + } + + /** + * Get cost + * @return cost + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public MessageCost getCost() { + return cost; + } + + + public void setCost(MessageCost cost) { + this.cost = cost; + } + + + public MessageDetailRecord countryIso(String countryIso) { + this.countryIso = countryIso; + return this; + } + + /** + * Cld number ISO country code. + * @return countryIso + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "US", value = "Cld number ISO country code.") + @JsonProperty(JSON_PROPERTY_COUNTRY_ISO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCountryIso() { + return countryIso; + } + + + public void setCountryIso(String countryIso) { + this.countryIso = countryIso; + } + + + public MessageDetailRecord messageType(MessageType messageType) { + this.messageType = messageType; + return this; + } + + /** + * Get messageType + * @return messageType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public MessageType getMessageType() { + return messageType; + } + + + public void setMessageType(MessageType messageType) { + this.messageType = messageType; + } + + + public MessageDetailRecord errors(List errors) { + this.errors = errors; + return this; + } + + public MessageDetailRecord addErrorsItem(String errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Error returned by the gateway in case sending of message failed. + * @return errors + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "US", value = "Error returned by the gateway in case sending of message failed.") + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getErrors() { + return errors; + } + + + public void setErrors(List errors) { + this.errors = errors; + } + + + public MessageDetailRecord normalizedCarrier(String normalizedCarrier) { + this.normalizedCarrier = normalizedCarrier; + return this; + } + + /** + * Cld carrier. + * @return normalizedCarrier + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "T-Mobile", value = "Cld carrier.") + @JsonProperty(JSON_PROPERTY_NORMALIZED_CARRIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNormalizedCarrier() { + return normalizedCarrier; + } + + + public void setNormalizedCarrier(String normalizedCarrier) { + this.normalizedCarrier = normalizedCarrier; + } + + + public MessageDetailRecord passThroughFee(PassThroughFee passThroughFee) { + this.passThroughFee = passThroughFee; + return this; + } + + /** + * Get passThroughFee + * @return passThroughFee + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PASS_THROUGH_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PassThroughFee getPassThroughFee() { + return passThroughFee; + } + + + public void setPassThroughFee(PassThroughFee passThroughFee) { + this.passThroughFee = passThroughFee; + } + + + public MessageDetailRecord tags(String tags) { + this.tags = tags; + return this; + } + + /** + * User tag. + * @return tags + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "tag1", value = "User tag.") + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTags() { + return tags; + } + + + public void setTags(String tags) { + this.tags = tags; + } + + + public MessageDetailRecord mcc(String mcc) { + this.mcc = mcc; + return this; + } + + /** + * Mobile country code. + * @return mcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "204", value = "Mobile country code.") + @JsonProperty(JSON_PROPERTY_MCC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMcc() { + return mcc; + } + + + public void setMcc(String mcc) { + this.mcc = mcc; + } + + + public MessageDetailRecord mnc(String mnc) { + this.mnc = mnc; + return this; + } + + /** + * Mobile network code. + * @return mnc + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "01", value = "Mobile network code.") + @JsonProperty(JSON_PROPERTY_MNC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMnc() { + return mnc; + } + + + public void setMnc(String mnc) { + this.mnc = mnc; + } + + + public MessageDetailRecord product(Product product) { + this.product = product; + return this; + } + + /** + * Get product + * @return product + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PRODUCT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Product getProduct() { + return product; + } + + + public void setProduct(Product product) { + this.product = product; + } + + + public MessageDetailRecord recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Get recordType + * @return recordType + **/ + @ApiModelProperty(example = "message_detail_record", required = true, value = "") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public MessageDetailRecord userId(String userId) { + this.userId = userId; + return this; + } + + /** + * User id + * @return userId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "3ca7bd3d-7d82-4e07-9df4-009123068320", value = "User id") + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + /** + * Return true if this MessageDetailRecord object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MessageDetailRecord messageDetailRecord = (MessageDetailRecord) o; + return Objects.equals(this.id, messageDetailRecord.id) && + Objects.equals(this.createdAt, messageDetailRecord.createdAt) && + Objects.equals(this.outboundProfileName, messageDetailRecord.outboundProfileName) && + Objects.equals(this.outboundProfileId, messageDetailRecord.outboundProfileId) && + Objects.equals(this.direction, messageDetailRecord.direction) && + Objects.equals(this.parts, messageDetailRecord.parts) && + Objects.equals(this.status, messageDetailRecord.status) && + Objects.equals(this.cld, messageDetailRecord.cld) && + Objects.equals(this.cli, messageDetailRecord.cli) && + Objects.equals(this.rate, messageDetailRecord.rate) && + Objects.equals(this.cost, messageDetailRecord.cost) && + Objects.equals(this.countryIso, messageDetailRecord.countryIso) && + Objects.equals(this.messageType, messageDetailRecord.messageType) && + Objects.equals(this.errors, messageDetailRecord.errors) && + Objects.equals(this.normalizedCarrier, messageDetailRecord.normalizedCarrier) && + Objects.equals(this.passThroughFee, messageDetailRecord.passThroughFee) && + Objects.equals(this.tags, messageDetailRecord.tags) && + Objects.equals(this.mcc, messageDetailRecord.mcc) && + Objects.equals(this.mnc, messageDetailRecord.mnc) && + Objects.equals(this.product, messageDetailRecord.product) && + Objects.equals(this.recordType, messageDetailRecord.recordType) && + Objects.equals(this.userId, messageDetailRecord.userId); + } + + @Override + public int hashCode() { + return Objects.hash(id, createdAt, outboundProfileName, outboundProfileId, direction, parts, status, cld, cli, rate, cost, countryIso, messageType, errors, normalizedCarrier, passThroughFee, tags, mcc, mnc, product, recordType, userId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MessageDetailRecord {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" outboundProfileName: ").append(toIndentedString(outboundProfileName)).append("\n"); + sb.append(" outboundProfileId: ").append(toIndentedString(outboundProfileId)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" parts: ").append(toIndentedString(parts)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" cld: ").append(toIndentedString(cld)).append("\n"); + sb.append(" cli: ").append(toIndentedString(cli)).append("\n"); + sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); + sb.append(" cost: ").append(toIndentedString(cost)).append("\n"); + sb.append(" countryIso: ").append(toIndentedString(countryIso)).append("\n"); + sb.append(" messageType: ").append(toIndentedString(messageType)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" normalizedCarrier: ").append(toIndentedString(normalizedCarrier)).append("\n"); + sb.append(" passThroughFee: ").append(toIndentedString(passThroughFee)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" mcc: ").append(toIndentedString(mcc)).append("\n"); + sb.append(" mnc: ").append(toIndentedString(mnc)).append("\n"); + sb.append(" product: ").append(toIndentedString(product)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/MessageRate.java b/src/main/java/com/telnyx/sdk/model/MessageRate.java new file mode 100644 index 00000000..8a2eaae8 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/MessageRate.java @@ -0,0 +1,141 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Currency; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * MessageRate + */ +@JsonPropertyOrder({ + MessageRate.JSON_PROPERTY_AMOUNT, + MessageRate.JSON_PROPERTY_CURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MessageRate { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private BigDecimal amount; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private Currency currency; + + + public MessageRate amount(BigDecimal amount) { + this.amount = amount; + return this; + } + + /** + * Rate applied to the message + * @return amount + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0.1", value = "Rate applied to the message") + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getAmount() { + return amount; + } + + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + + public MessageRate currency(Currency currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Currency getCurrency() { + return currency; + } + + + public void setCurrency(Currency currency) { + this.currency = currency; + } + + + /** + * Return true if this MessageRate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MessageRate messageRate = (MessageRate) o; + return Objects.equals(this.amount, messageRate.amount) && + Objects.equals(this.currency, messageRate.currency); + } + + @Override + public int hashCode() { + return Objects.hash(amount, currency); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MessageRate {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/MessageStatus.java b/src/main/java/com/telnyx/sdk/model/MessageStatus.java new file mode 100644 index 00000000..9ccae846 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/MessageStatus.java @@ -0,0 +1,73 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Message status + */ +public enum MessageStatus { + + GW_TIMEOUT("GW_TIMEOUT"), + + DELIVERED("DELIVERED"), + + DLR_UNCONFIRMED("DLR_UNCONFIRMED"), + + DLR_TIMEOUT("DLR_TIMEOUT"), + + RECEIVED("RECEIVED"), + + GW_REJECT("GW_REJECT"), + + FAILED("FAILED"); + + private String value; + + MessageStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MessageStatus fromValue(String value) { + for (MessageStatus b : MessageStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/MessageType.java b/src/main/java/com/telnyx/sdk/model/MessageType.java new file mode 100644 index 00000000..45579d57 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/MessageType.java @@ -0,0 +1,63 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of message + */ +public enum MessageType { + + SMS("SMS"), + + MMS("MMS"); + + private String value; + + MessageType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MessageType fromValue(String value) { + for (MessageType b : MessageType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/OutboundMessageEvent.java b/src/main/java/com/telnyx/sdk/model/OutboundMessageEvent.java index bc51936d..b2f4fef0 100644 --- a/src/main/java/com/telnyx/sdk/model/OutboundMessageEvent.java +++ b/src/main/java/com/telnyx/sdk/model/OutboundMessageEvent.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.telnyx.sdk.model.OutboundMessage; +import com.telnyx.sdk.model.OutboundMessageEventMeta; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -33,13 +34,17 @@ * OutboundMessageEvent */ @JsonPropertyOrder({ - OutboundMessageEvent.JSON_PROPERTY_DATA + OutboundMessageEvent.JSON_PROPERTY_DATA, + OutboundMessageEvent.JSON_PROPERTY_META }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class OutboundMessageEvent { public static final String JSON_PROPERTY_DATA = "data"; private OutboundMessage data; + public static final String JSON_PROPERTY_META = "meta"; + private OutboundMessageEventMeta meta; + public OutboundMessageEvent data(OutboundMessage data) { this.data = data; @@ -65,6 +70,30 @@ public void setData(OutboundMessage data) { } + public OutboundMessageEvent meta(OutboundMessageEventMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundMessageEventMeta getMeta() { + return meta; + } + + + public void setMeta(OutboundMessageEventMeta meta) { + this.meta = meta; + } + + /** * Return true if this OutboundMessageEvent object is equal to o. */ @@ -77,12 +106,13 @@ public boolean equals(Object o) { return false; } OutboundMessageEvent outboundMessageEvent = (OutboundMessageEvent) o; - return Objects.equals(this.data, outboundMessageEvent.data); + return Objects.equals(this.data, outboundMessageEvent.data) && + Objects.equals(this.meta, outboundMessageEvent.meta); } @Override public int hashCode() { - return Objects.hash(data); + return Objects.hash(data, meta); } @@ -91,6 +121,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OutboundMessageEvent {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/telnyx/sdk/model/OutboundMessageEventMeta.java b/src/main/java/com/telnyx/sdk/model/OutboundMessageEventMeta.java new file mode 100644 index 00000000..26359985 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/OutboundMessageEventMeta.java @@ -0,0 +1,139 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * OutboundMessageEventMeta + */ +@JsonPropertyOrder({ + OutboundMessageEventMeta.JSON_PROPERTY_ATTEMPT, + OutboundMessageEventMeta.JSON_PROPERTY_DELIVERED_TO +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OutboundMessageEventMeta { + public static final String JSON_PROPERTY_ATTEMPT = "attempt"; + private Integer attempt; + + public static final String JSON_PROPERTY_DELIVERED_TO = "delivered_to"; + private String deliveredTo; + + + public OutboundMessageEventMeta attempt(Integer attempt) { + this.attempt = attempt; + return this; + } + + /** + * Number of attempts to deliver the webhook event. + * @return attempt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Number of attempts to deliver the webhook event.") + @JsonProperty(JSON_PROPERTY_ATTEMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getAttempt() { + return attempt; + } + + + public void setAttempt(Integer attempt) { + this.attempt = attempt; + } + + + public OutboundMessageEventMeta deliveredTo(String deliveredTo) { + this.deliveredTo = deliveredTo; + return this; + } + + /** + * The webhook URL the event was delivered to. + * @return deliveredTo + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://www.example.com/hooks", value = "The webhook URL the event was delivered to.") + @JsonProperty(JSON_PROPERTY_DELIVERED_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDeliveredTo() { + return deliveredTo; + } + + + public void setDeliveredTo(String deliveredTo) { + this.deliveredTo = deliveredTo; + } + + + /** + * Return true if this OutboundMessageEvent_meta object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundMessageEventMeta outboundMessageEventMeta = (OutboundMessageEventMeta) o; + return Objects.equals(this.attempt, outboundMessageEventMeta.attempt) && + Objects.equals(this.deliveredTo, outboundMessageEventMeta.deliveredTo); + } + + @Override + public int hashCode() { + return Objects.hash(attempt, deliveredTo); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundMessageEventMeta {\n"); + sb.append(" attempt: ").append(toIndentedString(attempt)).append("\n"); + sb.append(" deliveredTo: ").append(toIndentedString(deliveredTo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/OutboundMessagePayload.java b/src/main/java/com/telnyx/sdk/model/OutboundMessagePayload.java index 99c52aab..74a2c2fa 100644 --- a/src/main/java/com/telnyx/sdk/model/OutboundMessagePayload.java +++ b/src/main/java/com/telnyx/sdk/model/OutboundMessagePayload.java @@ -49,6 +49,7 @@ OutboundMessagePayload.JSON_PROPERTY_ID, OutboundMessagePayload.JSON_PROPERTY_TYPE, OutboundMessagePayload.JSON_PROPERTY_MESSAGING_PROFILE_ID, + OutboundMessagePayload.JSON_PROPERTY_ORGANIZATION_ID, OutboundMessagePayload.JSON_PROPERTY_FROM, OutboundMessagePayload.JSON_PROPERTY_TO, OutboundMessagePayload.JSON_PROPERTY_TEXT, @@ -184,6 +185,9 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_MESSAGING_PROFILE_ID = "messaging_profile_id"; private String messagingProfileId; + public static final String JSON_PROPERTY_ORGANIZATION_ID = "organization_id"; + private UUID organizationId; + public static final String JSON_PROPERTY_FROM = "from"; private OutboundMessagePayloadFrom from; @@ -353,6 +357,30 @@ public void setMessagingProfileId(String messagingProfileId) { } + public OutboundMessagePayload organizationId(UUID organizationId) { + this.organizationId = organizationId; + return this; + } + + /** + * The id of the organization the messaging profile belongs to. + * @return organizationId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The id of the organization the messaging profile belongs to.") + @JsonProperty(JSON_PROPERTY_ORGANIZATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UUID getOrganizationId() { + return organizationId; + } + + + public void setOrganizationId(UUID organizationId) { + this.organizationId = organizationId; + } + + public OutboundMessagePayload from(OutboundMessagePayloadFrom from) { this.from = from; return this; @@ -838,6 +866,7 @@ public boolean equals(Object o) { Objects.equals(this.id, outboundMessagePayload.id) && Objects.equals(this.type, outboundMessagePayload.type) && Objects.equals(this.messagingProfileId, outboundMessagePayload.messagingProfileId) && + Objects.equals(this.organizationId, outboundMessagePayload.organizationId) && Objects.equals(this.from, outboundMessagePayload.from) && Objects.equals(this.to, outboundMessagePayload.to) && Objects.equals(this.text, outboundMessagePayload.text) && @@ -858,7 +887,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(recordType, direction, id, type, messagingProfileId, from, to, text, subject, media, webhookUrl, webhookFailoverUrl, encoding, parts, tags, cost, receivedAt, sentAt, completedAt, validUntil, errors); + return Objects.hash(recordType, direction, id, type, messagingProfileId, organizationId, from, to, text, subject, media, webhookUrl, webhookFailoverUrl, encoding, parts, tags, cost, receivedAt, sentAt, completedAt, validUntil, errors); } @@ -871,6 +900,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" messagingProfileId: ").append(toIndentedString(messagingProfileId)).append("\n"); + sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); sb.append(" to: ").append(toIndentedString(to)).append("\n"); sb.append(" text: ").append(toIndentedString(text)).append("\n"); diff --git a/src/main/java/com/telnyx/sdk/model/PassThroughFee.java b/src/main/java/com/telnyx/sdk/model/PassThroughFee.java new file mode 100644 index 00000000..f2fe9a45 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PassThroughFee.java @@ -0,0 +1,141 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Currency; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PassThroughFee + */ +@JsonPropertyOrder({ + PassThroughFee.JSON_PROPERTY_AMOUNT, + PassThroughFee.JSON_PROPERTY_CURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PassThroughFee { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private BigDecimal amount; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private Currency currency; + + + public PassThroughFee amount(BigDecimal amount) { + this.amount = amount; + return this; + } + + /** + * Normalized carrier pass through fee + * @return amount + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0.1", value = "Normalized carrier pass through fee") + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getAmount() { + return amount; + } + + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + + public PassThroughFee currency(Currency currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Currency getCurrency() { + return currency; + } + + + public void setCurrency(Currency currency) { + this.currency = currency; + } + + + /** + * Return true if this PassThroughFee object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PassThroughFee passThroughFee = (PassThroughFee) o; + return Objects.equals(this.amount, passThroughFee.amount) && + Objects.equals(this.currency, passThroughFee.currency); + } + + @Override + public int hashCode() { + return Objects.hash(amount, currency); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PassThroughFee {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumberDeletedDetailed.java b/src/main/java/com/telnyx/sdk/model/PhoneNumberDeletedDetailed.java index 7a39077a..fb357b4e 100644 --- a/src/main/java/com/telnyx/sdk/model/PhoneNumberDeletedDetailed.java +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumberDeletedDetailed.java @@ -53,6 +53,7 @@ PhoneNumberDeletedDetailed.JSON_PROPERTY_CALLER_ID_NAME_ENABLED, PhoneNumberDeletedDetailed.JSON_PROPERTY_CALL_RECORDING_ENABLED, PhoneNumberDeletedDetailed.JSON_PROPERTY_T38_FAX_GATEWAY_ENABLED, + PhoneNumberDeletedDetailed.JSON_PROPERTY_PHONE_NUMBER_TYPE, PhoneNumberDeletedDetailed.JSON_PROPERTY_PURCHASED_AT, PhoneNumberDeletedDetailed.JSON_PROPERTY_CREATED_AT, PhoneNumberDeletedDetailed.JSON_PROPERTY_UPDATED_AT @@ -165,6 +166,44 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_T38_FAX_GATEWAY_ENABLED = "t38_fax_gateway_enabled"; private Boolean t38FaxGatewayEnabled; + /** + * The phone number's type. + */ + public enum PhoneNumberTypeEnum { + LONGCODE("longcode"), + + TOLLFREE("tollfree"); + + private String value; + + PhoneNumberTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PhoneNumberTypeEnum fromValue(String value) { + for (PhoneNumberTypeEnum b : PhoneNumberTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PHONE_NUMBER_TYPE = "phone_number_type"; + private PhoneNumberTypeEnum phoneNumberType; + public static final String JSON_PROPERTY_PURCHASED_AT = "purchased_at"; private String purchasedAt; @@ -543,6 +582,22 @@ public Boolean getT38FaxGatewayEnabled() { + /** + * The phone number's type. + * @return phoneNumberType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The phone number's type.") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PhoneNumberTypeEnum getPhoneNumberType() { + return phoneNumberType; + } + + + + /** * ISO 8601 formatted date indicating the time the request was made to purchase the number. * @return purchasedAt @@ -622,6 +677,7 @@ public boolean equals(Object o) { Objects.equals(this.callerIdNameEnabled, phoneNumberDeletedDetailed.callerIdNameEnabled) && Objects.equals(this.callRecordingEnabled, phoneNumberDeletedDetailed.callRecordingEnabled) && Objects.equals(this.t38FaxGatewayEnabled, phoneNumberDeletedDetailed.t38FaxGatewayEnabled) && + Objects.equals(this.phoneNumberType, phoneNumberDeletedDetailed.phoneNumberType) && Objects.equals(this.purchasedAt, phoneNumberDeletedDetailed.purchasedAt) && Objects.equals(this.createdAt, phoneNumberDeletedDetailed.createdAt) && Objects.equals(this.updatedAt, phoneNumberDeletedDetailed.updatedAt); @@ -629,7 +685,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, recordType, phoneNumber, status, tags, externalPin, connectionName, customerReference, connectionId, messagingProfileId, messagingProfileName, billingGroupId, emergencyEnabled, emergencyAddressId, callForwardingEnabled, cnamListingEnabled, callerIdNameEnabled, callRecordingEnabled, t38FaxGatewayEnabled, purchasedAt, createdAt, updatedAt); + return Objects.hash(id, recordType, phoneNumber, status, tags, externalPin, connectionName, customerReference, connectionId, messagingProfileId, messagingProfileName, billingGroupId, emergencyEnabled, emergencyAddressId, callForwardingEnabled, cnamListingEnabled, callerIdNameEnabled, callRecordingEnabled, t38FaxGatewayEnabled, phoneNumberType, purchasedAt, createdAt, updatedAt); } @@ -656,6 +712,7 @@ public String toString() { sb.append(" callerIdNameEnabled: ").append(toIndentedString(callerIdNameEnabled)).append("\n"); sb.append(" callRecordingEnabled: ").append(toIndentedString(callRecordingEnabled)).append("\n"); sb.append(" t38FaxGatewayEnabled: ").append(toIndentedString(t38FaxGatewayEnabled)).append("\n"); + sb.append(" phoneNumberType: ").append(toIndentedString(phoneNumberType)).append("\n"); sb.append(" purchasedAt: ").append(toIndentedString(purchasedAt)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java b/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java index 23bde344..92248f74 100644 --- a/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java @@ -53,6 +53,7 @@ PhoneNumberDetailed.JSON_PROPERTY_CALLER_ID_NAME_ENABLED, PhoneNumberDetailed.JSON_PROPERTY_CALL_RECORDING_ENABLED, PhoneNumberDetailed.JSON_PROPERTY_T38_FAX_GATEWAY_ENABLED, + PhoneNumberDetailed.JSON_PROPERTY_PHONE_NUMBER_TYPE, PhoneNumberDetailed.JSON_PROPERTY_PURCHASED_AT, PhoneNumberDetailed.JSON_PROPERTY_CREATED_AT }) @@ -164,6 +165,44 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_T38_FAX_GATEWAY_ENABLED = "t38_fax_gateway_enabled"; private Boolean t38FaxGatewayEnabled; + /** + * The phone number's type. + */ + public enum PhoneNumberTypeEnum { + LONGCODE("longcode"), + + TOLLFREE("tollfree"); + + private String value; + + PhoneNumberTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PhoneNumberTypeEnum fromValue(String value) { + for (PhoneNumberTypeEnum b : PhoneNumberTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PHONE_NUMBER_TYPE = "phone_number_type"; + private PhoneNumberTypeEnum phoneNumberType; + public static final String JSON_PROPERTY_PURCHASED_AT = "purchased_at"; private String purchasedAt; @@ -539,6 +578,22 @@ public Boolean getT38FaxGatewayEnabled() { + /** + * The phone number's type. + * @return phoneNumberType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The phone number's type.") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PhoneNumberTypeEnum getPhoneNumberType() { + return phoneNumberType; + } + + + + /** * ISO 8601 formatted date indicating when the resource was purchased. * @return purchasedAt @@ -602,13 +657,14 @@ public boolean equals(Object o) { Objects.equals(this.callerIdNameEnabled, phoneNumberDetailed.callerIdNameEnabled) && Objects.equals(this.callRecordingEnabled, phoneNumberDetailed.callRecordingEnabled) && Objects.equals(this.t38FaxGatewayEnabled, phoneNumberDetailed.t38FaxGatewayEnabled) && + Objects.equals(this.phoneNumberType, phoneNumberDetailed.phoneNumberType) && Objects.equals(this.purchasedAt, phoneNumberDetailed.purchasedAt) && Objects.equals(this.createdAt, phoneNumberDetailed.createdAt); } @Override public int hashCode() { - return Objects.hash(id, recordType, phoneNumber, status, tags, externalPin, connectionName, customerReference, connectionId, messagingProfileId, messagingProfileName, billingGroupId, emergencyEnabled, emergencyAddressId, callForwardingEnabled, cnamListingEnabled, callerIdNameEnabled, callRecordingEnabled, t38FaxGatewayEnabled, purchasedAt, createdAt); + return Objects.hash(id, recordType, phoneNumber, status, tags, externalPin, connectionName, customerReference, connectionId, messagingProfileId, messagingProfileName, billingGroupId, emergencyEnabled, emergencyAddressId, callForwardingEnabled, cnamListingEnabled, callerIdNameEnabled, callRecordingEnabled, t38FaxGatewayEnabled, phoneNumberType, purchasedAt, createdAt); } @@ -635,6 +691,7 @@ public String toString() { sb.append(" callerIdNameEnabled: ").append(toIndentedString(callerIdNameEnabled)).append("\n"); sb.append(" callRecordingEnabled: ").append(toIndentedString(callRecordingEnabled)).append("\n"); sb.append(" t38FaxGatewayEnabled: ").append(toIndentedString(t38FaxGatewayEnabled)).append("\n"); + sb.append(" phoneNumberType: ").append(toIndentedString(phoneNumberType)).append("\n"); sb.append(" purchasedAt: ").append(toIndentedString(purchasedAt)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/telnyx/sdk/model/PlayAudioUrlRequest.java b/src/main/java/com/telnyx/sdk/model/PlayAudioUrlRequest.java index 9bdf2e8f..32e26d82 100644 --- a/src/main/java/com/telnyx/sdk/model/PlayAudioUrlRequest.java +++ b/src/main/java/com/telnyx/sdk/model/PlayAudioUrlRequest.java @@ -53,7 +53,7 @@ public class PlayAudioUrlRequest { private Boolean overlay = false; public static final String JSON_PROPERTY_STOP = "stop"; - private String stop; + private String stop = "all"; public static final String JSON_PROPERTY_TARGET_LEGS = "target_legs"; private String targetLegs = "self"; diff --git a/src/main/java/com/telnyx/sdk/model/Product.java b/src/main/java/com/telnyx/sdk/model/Product.java new file mode 100644 index 00000000..b8a2054f --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/Product.java @@ -0,0 +1,71 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Used product + */ +public enum Product { + + LONG_CODE("LONG_CODE"), + + SHORT_CODE("SHORT_CODE"), + + SHORT_CODE_FTEU("SHORT_CODE_FTEU"), + + TOLL_FREE("TOLL_FREE"), + + ALPHANUMERIC_ID("ALPHANUMERIC_ID"), + + RCS("RCS"); + + private String value; + + Product(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Product fromValue(String value) { + for (Product b : Product.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java b/src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java index 80c7bf94..51e104dd 100644 --- a/src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java +++ b/src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java @@ -17,22 +17,17 @@ import com.telnyx.sdk.ApiException; import com.telnyx.sdk.Configuration; import com.telnyx.sdk.auth.HttpBearerAuth; -import com.telnyx.sdk.model.AnchorsiteOverride; -import com.telnyx.sdk.model.ConnectionResponse; -import com.telnyx.sdk.model.ConnectionRtcpSettings; -import com.telnyx.sdk.model.CreateInboundIpRequest; -import com.telnyx.sdk.model.CreateIpConnectionRequest; -import com.telnyx.sdk.model.DtmfType; -import com.telnyx.sdk.model.EncryptedMedia; -import com.telnyx.sdk.model.ListConnectionsResponse; -import com.telnyx.sdk.model.OutboundIp; +import com.telnyx.sdk.model.*; +import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import java.util.Collections; +import static java.lang.Thread.sleep; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; /** * API tests for ConnectionsApi @@ -40,6 +35,7 @@ public class ConnectionsApiTest { private final ConnectionsApi api = new ConnectionsApi(); + private IpConnection existingConnection; @Before public void setup() { @@ -49,6 +45,24 @@ public void setup() { HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); bearerAuth.setBearerToken(TestConfiguration.API_KEY); + try { + existingConnection = new IpConnectionsApi().createIpConnection(prepareSampleCreateIpConnectionRequest()).getData(); + } catch (Exception e) { + e.printStackTrace(); + fail("Test Setup Failure - Unable to create existing connection: " + e.getMessage()); + } + } + + @After + public void tearDown() throws InterruptedException { + try { + new IpConnectionsApi().deleteIpConnection(existingConnection.getId()); + } catch (ApiException e) { + //ignore; + } + + //todo: Find a better way to avoid rate limiting during integration testing against production system + //sleep(100); } /** @@ -92,11 +106,8 @@ public void listConnections_defaultParams_returnsNotNullListOfConnections() thro */ @Test public void retrieveConnection_connectionIdProvided_returnsConnection() throws ApiException { - //given - String id = new IpConnectionsApi().createIpConnection(prepareSampleCreateIpConnectionRequest()).getData().getId(); - //when - ConnectionResponse response = api.retrieveConnection(id); + ConnectionResponse response = api.retrieveConnection(existingConnection.getId()); //then assertNotNull(response); @@ -106,7 +117,7 @@ private CreateIpConnectionRequest prepareSampleCreateIpConnectionRequest() { return new CreateIpConnectionRequest() .active(true) .anchorsiteOverride(AnchorsiteOverride.CHICAGO_IL) - .connectionName("some_connection") + .connectionName("connections_api_test_" + System.currentTimeMillis()) .defaultOnHoldComfortNoiseEnabled(true) .dtmfType(DtmfType.RFC_2833) .encodeContactHeaderEnabled(false) @@ -123,25 +134,25 @@ private CreateIpConnectionRequest prepareSampleCreateIpConnectionRequest() { .privacyZoneEnabled(true) .sipCompactHeadersEnabled(true) .sipRegion(CreateInboundIpRequest.SipRegionEnum.US) - .sipSubdomain("test") + .sipSubdomain("example.sip.telnyx.com" + System.currentTimeMillis()) .sipSubdomainReceiveSettings(CreateInboundIpRequest.SipSubdomainReceiveSettingsEnum.ONLY_MY_CONNECTIONS) .timeout1xxSecs(10) .timeout2xxSecs(20) ) .onnetT38PassthroughEnabled(false) .outbound(new OutboundIp() - .aniOverride("test") + .aniOverride("+15555551234") .aniOverrideType(OutboundIp.AniOverrideTypeEnum.ALWAYS) .callParkingEnabled(true) .channelLimit(10) .generateRingbackTone(true) .instantRingbackEnabled(true) .ipAuthenticationMethod(OutboundIp.IpAuthenticationMethodEnum.TOKEN) - .ipAuthenticationToken("test") - .localization("test") - .outboundVoiceProfileId("123") + .ipAuthenticationToken("token" + System.currentTimeMillis()) + .localization("GB") + .outboundVoiceProfileId(TestConfiguration.EXISTING_OUTBOUND_VOICE_PROFILE_ID) .t38ReinviteSource(OutboundIp.T38ReinviteSourceEnum.TELNYX) - .techPrefix("test") + .techPrefix("7777") ) .rtcpSettings(new ConnectionRtcpSettings() .captureEnabled(true) diff --git a/src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java b/src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java index 58f8868b..32ebccd1 100644 --- a/src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java +++ b/src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java @@ -17,22 +17,15 @@ import com.telnyx.sdk.ApiException; import com.telnyx.sdk.Configuration; import com.telnyx.sdk.auth.HttpBearerAuth; -import com.telnyx.sdk.model.AnchorsiteOverride; -import com.telnyx.sdk.model.ConnectionRtcpSettings; -import com.telnyx.sdk.model.CreateCredentialConnectionRequest; -import com.telnyx.sdk.model.CredentialConnectionResponse; -import com.telnyx.sdk.model.CredentialInbound; -import com.telnyx.sdk.model.CredentialOutbound; -import com.telnyx.sdk.model.DtmfType; -import com.telnyx.sdk.model.EncryptedMedia; -import com.telnyx.sdk.model.ListCredentialConnectionsResponse; -import com.telnyx.sdk.model.UpdateCredentialConnectionRequest; +import com.telnyx.sdk.model.*; +import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import java.util.Collections; +import static java.lang.Thread.sleep; import static org.junit.Assert.*; /** @@ -41,6 +34,9 @@ public class CredentialConnectionsApiTest { private final CredentialConnectionsApi api = new CredentialConnectionsApi(); + private OutboundVoiceProfilesApi outboundVoiceProfilesApi; + private CredentialConnection existingCredentialConnection; + private String existingOutboundVoiceProfileId; @Before public void setup() { @@ -49,6 +45,30 @@ public void setup() { HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); bearerAuth.setBearerToken(TestConfiguration.API_KEY); + + try { + outboundVoiceProfilesApi = new OutboundVoiceProfilesApi(); + CreateOutboundVoiceProfileRequest createOutboundVoiceProfileRequest = new CreateOutboundVoiceProfileRequest().name("test-name-" + System.currentTimeMillis()); + existingOutboundVoiceProfileId = outboundVoiceProfilesApi.createOutboundVoiceProfile(createOutboundVoiceProfileRequest).getData().getId(); + existingCredentialConnection = api.createCredentialConnection(prepareSampleCreateCredentialConnectionRequest("existing_credential_connection_test")).getData(); + } catch (Exception e) { + e.printStackTrace(); + fail("Test Setup Failure - Unable to create existing connection: " + e.getMessage()); + } + } + + @After + public void tearDown() throws InterruptedException { + try { + outboundVoiceProfilesApi.deleteOutboundVoiceProfile(existingOutboundVoiceProfileId); + api.deleteCredentialConnection(existingCredentialConnection.getId()); + } catch (ApiException e) { + e.printStackTrace(); + //ignore + } + + //todo: Find a better way to avoid rate limiting during integration testing against production system + //sleep(100); } /** @@ -61,13 +81,24 @@ public void setup() { @Test public void createCredentialConnection_defaultParams_returnsCreatedCredentialConnection() throws ApiException { //given - CreateCredentialConnectionRequest createCredentialConnectionRequest = prepareSampleCreateCredentialConnectionRequest(); + CreateOutboundVoiceProfileRequest createOutboundVoiceProfileRequest = new CreateOutboundVoiceProfileRequest().name("ovp_create_credential_connections_test_" + System.currentTimeMillis()); + String ovpId = outboundVoiceProfilesApi.createOutboundVoiceProfile(createOutboundVoiceProfileRequest).getData().getId(); + CreateCredentialConnectionRequest createCredentialConnectionRequest = prepareSampleCreateCredentialConnectionRequest("create_credential_connection_test_" + System.currentTimeMillis()); //when CredentialConnectionResponse response = api.createCredentialConnection(createCredentialConnectionRequest); //then assertNotNull(response); + + //clean up + try { + outboundVoiceProfilesApi.deleteOutboundVoiceProfile(ovpId); + api.deleteCredentialConnection(response.getData().getId()); + } catch (Exception e) { + e.printStackTrace(); + //ignore + } } /** @@ -80,16 +111,13 @@ public void createCredentialConnection_defaultParams_returnsCreatedCredentialCon @Test @Ignore public void deleteCredentialConnection_credentialConnectionIdProvided_credentialConnectionWouldNotReturnAnymore() throws ApiException { - //given - String id = api.createCredentialConnection(prepareSampleCreateCredentialConnectionRequest()).getData().getId(); - //when - CredentialConnectionResponse response = api.deleteCredentialConnection(id); + CredentialConnectionResponse response = api.deleteCredentialConnection(existingCredentialConnection.getId()); //then assertNotNull(response); - CredentialConnectionResponse retrievedCredentialConnection = api.retrieveCredentialConnection(id); + CredentialConnectionResponse retrievedCredentialConnection = api.retrieveCredentialConnection(existingCredentialConnection.getId()); assertNull(retrievedCredentialConnection); } @@ -128,11 +156,8 @@ public void listCredentialConnections_defaultParams_returnsNotNullListOfCredenti */ @Test public void retrieveCredentialConnection_credentialConnectionIdProvided_returnsCredentialConnection() throws ApiException { - //given - String id = api.createCredentialConnection(prepareSampleCreateCredentialConnectionRequest()).getData().getId(); - //when - CredentialConnectionResponse response = api.retrieveCredentialConnection(id); + CredentialConnectionResponse response = api.retrieveCredentialConnection(existingCredentialConnection.getId()); //then assertNotNull(response); @@ -148,11 +173,10 @@ public void retrieveCredentialConnection_credentialConnectionIdProvided_returnsC @Test public void updateCredentialConnection_changedParams_returnsUpdatedCredentialConnection() throws ApiException { //given - String id = api.createCredentialConnection(prepareSampleCreateCredentialConnectionRequest()).getData().getId(); UpdateCredentialConnectionRequest updateCredentialConnectionRequest = prepareSampleUpdateCredentialConnectionRequest(); //when - CredentialConnectionResponse response = api.updateCredentialConnection(id, updateCredentialConnectionRequest); + CredentialConnectionResponse response = api.updateCredentialConnection(existingCredentialConnection.getId(), updateCredentialConnectionRequest); //then assertNotNull(response); @@ -161,13 +185,13 @@ public void updateCredentialConnection_changedParams_returnsUpdatedCredentialCon assertEquals(updateCredentialConnectionRequest.getOutbound().getLocalization(), response.getData().getOutbound().getLocalization()); } - private CreateCredentialConnectionRequest prepareSampleCreateCredentialConnectionRequest() { + private CreateCredentialConnectionRequest prepareSampleCreateCredentialConnectionRequest(String connectionName) { return new CreateCredentialConnectionRequest() - .userName("MyUser") + .userName("MyUser" + System.currentTimeMillis()) .password("my123secure456password789") .active(true) .anchorsiteOverride(AnchorsiteOverride.CHICAGO_IL) - .connectionName("some_connection") + .connectionName(connectionName) .defaultOnHoldComfortNoiseEnabled(true) .dtmfType(DtmfType.RFC_2833) .encodeContactHeaderEnabled(false) @@ -187,14 +211,14 @@ private CreateCredentialConnectionRequest prepareSampleCreateCredentialConnectio ) .onnetT38PassthroughEnabled(false) .outbound(new CredentialOutbound() - .aniOverride("test") + .aniOverride("+15555551234") .aniOverrideType(CredentialOutbound.AniOverrideTypeEnum.ALWAYS) .callParkingEnabled(true) .channelLimit(10) .generateRingbackTone(true) .instantRingbackEnabled(true) - .localization("test") - .outboundVoiceProfileId("123") + .localization("US") + .outboundVoiceProfileId(existingOutboundVoiceProfileId) .t38ReinviteSource(CredentialOutbound.T38ReinviteSourceEnum.TELNYX) ) .rtcpSettings(new ConnectionRtcpSettings() @@ -209,11 +233,11 @@ private CreateCredentialConnectionRequest prepareSampleCreateCredentialConnectio private UpdateCredentialConnectionRequest prepareSampleUpdateCredentialConnectionRequest() { return new UpdateCredentialConnectionRequest() - .userName("MyUser") + .userName("MyUser" + System.currentTimeMillis()) .password("my123secure456password789") .active(true) .anchorsiteOverride(AnchorsiteOverride.SAN_JOSE_CA) - .connectionName("another_connection") + .connectionName("credential_connections_update_test") .defaultOnHoldComfortNoiseEnabled(true) .dtmfType(DtmfType.RFC_2833) .encodeContactHeaderEnabled(false) @@ -233,14 +257,14 @@ private UpdateCredentialConnectionRequest prepareSampleUpdateCredentialConnectio ) .onnetT38PassthroughEnabled(false) .outbound(new CredentialOutbound() - .aniOverride("test2") + .aniOverride("+15555551234") .aniOverrideType(CredentialOutbound.AniOverrideTypeEnum.ALWAYS) .callParkingEnabled(true) .channelLimit(10) .generateRingbackTone(true) .instantRingbackEnabled(true) - .localization("test2") - .outboundVoiceProfileId("123") + .localization("US") + .outboundVoiceProfileId(existingOutboundVoiceProfileId) .t38ReinviteSource(CredentialOutbound.T38ReinviteSourceEnum.TELNYX) ) .rtcpSettings(new ConnectionRtcpSettings() diff --git a/src/test/java/com/telnyx/sdk/api/DetailRecordsApiTest.java b/src/test/java/com/telnyx/sdk/api/DetailRecordsApiTest.java new file mode 100644 index 00000000..92e4c641 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/DetailRecordsApiTest.java @@ -0,0 +1,56 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.DetailRecordsSearchResponse; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DetailRecordsApi + */ +public class DetailRecordsApiTest { + + private final DetailRecordsApi api = new DetailRecordsApi(); + + /** + * + * + * Search for any detail record across the Telnyx Platform + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void detailRecordsSearchTest() throws ApiException { + //String filterRecordType = null; + //String filterDateRange = null; + //Map filter = null; + //Integer pageNumber = null; + //Integer pageSize = null; + //List sort = null; + //DetailRecordsSearchResponse response = api.detailRecordsSearch(filterRecordType, filterDateRange, filter, pageNumber, pageSize, sort); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java b/src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java index 628e0f08..55aef0c8 100644 --- a/src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java +++ b/src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java @@ -61,6 +61,7 @@ public void tearDown() throws InterruptedException { api.deleteFqdn(existingFqdn.getId()); fqdnConnectionsApi.deleteFqdnConnection(existingFqdnConnection.getId()); } catch (ApiException e) { + e.printStackTrace(); //ignore } diff --git a/src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java b/src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java index 7df4d658..eaf4805b 100644 --- a/src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java +++ b/src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java @@ -41,9 +41,10 @@ public void setup() { bearerAuth.setBearerToken(TestConfiguration.API_KEY); try { - CreateFqdnConnectionRequest createFqdnConnectionRequest = new CreateFqdnConnectionRequest().connectionName("test-fqdn-connection-" + System.currentTimeMillis()); + CreateFqdnConnectionRequest createFqdnConnectionRequest = new CreateFqdnConnectionRequest().connectionName("test-existing-fqdn-connection-" + System.currentTimeMillis()); existingFqdnConnection = api.createFqdnConnection(createFqdnConnectionRequest).getData(); } catch (Exception e) { + e.printStackTrace(); fail("Test Setup Failure - Unable to create fqdn connection: " + e.getMessage()); } } @@ -53,6 +54,7 @@ public void tearDown() throws InterruptedException { try { api.deleteFqdnConnection(existingFqdnConnection.getId()); } catch (ApiException e) { + e.printStackTrace(); //ignore } @@ -79,7 +81,7 @@ public void createFqdnConnection_whenRequestIsValid_returnsCreatedFqdnConnection .privacyZoneEnabled(true) .sipCompactHeadersEnabled(false) .sipRegion(InboundFqdn.SipRegionEnum.EUROPE) - .sipSubdomain("example.sip.telnyx.com") + .sipSubdomain("example2.sip.telnyx.com") .sipSubdomainReceiveSettings(InboundFqdn.SipSubdomainReceiveSettingsEnum.ONLY_MY_CONNECTIONS) .timeout1xxSecs(1) .timeout2xxSecs(2); @@ -190,7 +192,7 @@ public void updateFqdnConnection_whenRequestIsValid_returnsUpdatedFqdnConnection UpdateFqdnConnectionRequest updateFqdnConnectionRequest = new UpdateFqdnConnectionRequest() .active(false) .anchorsiteOverride(AnchorsiteOverride.AMSTERDAM_NETHERLANDS) - .connectionName("test-fqdn-connection") + .connectionName("test-update-fqdn-connection") .defaultOnHoldComfortNoiseEnabled(false) .dtmfType(DtmfType.INBAND) .encodeContactHeaderEnabled(true) @@ -224,7 +226,7 @@ public void updateFqdnConnection_whenRequestIsValid_returnsUpdatedFqdnConnection @Ignore("Ignoring this test until we clean up the spec to remove default values on update request objects") public void updateFqdnConnection_whenNullableFieldNotIncluded_doesNotUpdateNullableFieldToDefaultValue() throws ApiException { CreateFqdnConnectionRequest createFqdnConnectionRequest = new CreateFqdnConnectionRequest() - .connectionName("test-fqdn-connection-" + System.currentTimeMillis()) + .connectionName("test-update-fqdn-connection-" + System.currentTimeMillis()) .transportProtocol(FqdnConnectionTransportProtocol.TLS); FqdnConnection existingTLSConnectionRequest = api.createFqdnConnection(createFqdnConnectionRequest).getData(); diff --git a/src/test/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApiTest.java b/src/test/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApiTest.java index 3183c85d..31153b32 100644 --- a/src/test/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApiTest.java +++ b/src/test/java/com/telnyx/sdk/api/ProgrammableFaxCommandsApiTest.java @@ -24,6 +24,7 @@ import com.telnyx.sdk.model.SendFaxResponse; import java.util.UUID; import org.junit.Assert; +import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -33,6 +34,8 @@ import java.util.List; import java.util.Map; +import static org.junit.Assert.assertNotNull; + /** * API tests for ProgrammableFaxCommandsApi */ @@ -40,6 +43,15 @@ public class ProgrammableFaxCommandsApiTest { private final ProgrammableFaxCommandsApi api = new ProgrammableFaxCommandsApi(); + @Before + public void setup() { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath(TestConfiguration.MOCK_SERVER_URL); + + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken(TestConfiguration.API_KEY); + } + /** * Delete a fax * diff --git a/src/test/java/com/telnyx/sdk/api/TestConfiguration.java b/src/test/java/com/telnyx/sdk/api/TestConfiguration.java index 9ef45ea5..93286972 100644 --- a/src/test/java/com/telnyx/sdk/api/TestConfiguration.java +++ b/src/test/java/com/telnyx/sdk/api/TestConfiguration.java @@ -4,6 +4,7 @@ public class TestConfiguration { public static final String TEST_FROM_NUMBER = "+15555551234"; public static final String TEST_TO_NUMBER = "+15555551234"; public static final String EXISTING_MESSAGING_PROFILE_ID = "400174d8-9abf-4cd0-af88-8f5715f5f78e"; + public static final String EXISTING_OUTBOUND_VOICE_PROFILE_ID = "1471498194310399320"; public static final String EXISTING_CONNECTION_ID = "6a09cdc3-8948-47f0-aa62-74ac943d6c58"; public static final String EMERGENCY_ADDRESS_ID = "1315261609962112019"; public static final String API_KEY = "KEYSUPERSECRET"; diff --git a/src/test/java/com/telnyx/sdk/model/ConferenceDetailRecordTest.java b/src/test/java/com/telnyx/sdk/model/ConferenceDetailRecordTest.java new file mode 100644 index 00000000..a489a7a9 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ConferenceDetailRecordTest.java @@ -0,0 +1,163 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ConferenceDetailRecord + */ +public class ConferenceDetailRecordTest { + private final ConferenceDetailRecord model = new ConferenceDetailRecord(); + + /** + * Model tests for ConferenceDetailRecord + */ + @Test + public void testConferenceDetailRecord() { + // TODO: test ConferenceDetailRecord + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'startedAt' + */ + @Test + public void startedAtTest() { + // TODO: test startedAt + } + + /** + * Test the property 'endedAt' + */ + @Test + public void endedAtTest() { + // TODO: test endedAt + } + + /** + * Test the property 'expiresAt' + */ + @Test + public void expiresAtTest() { + // TODO: test expiresAt + } + + /** + * Test the property 'region' + */ + @Test + public void regionTest() { + // TODO: test region + } + + /** + * Test the property 'callLegId' + */ + @Test + public void callLegIdTest() { + // TODO: test callLegId + } + + /** + * Test the property 'callSessionId' + */ + @Test + public void callSessionIdTest() { + // TODO: test callSessionId + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'callSec' + */ + @Test + public void callSecTest() { + // TODO: test callSec + } + + /** + * Test the property 'participantCount' + */ + @Test + public void participantCountTest() { + // TODO: test participantCount + } + + /** + * Test the property 'participantCallSec' + */ + @Test + public void participantCallSecTest() { + // TODO: test participantCallSec + } + + /** + * Test the property 'isTelnyxBillable' + */ + @Test + public void isTelnyxBillableTest() { + // TODO: test isTelnyxBillable + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ConferenceFloorChangedEventPayloadTest.java b/src/test/java/com/telnyx/sdk/model/ConferenceFloorChangedEventPayloadTest.java new file mode 100644 index 00000000..13e40c50 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ConferenceFloorChangedEventPayloadTest.java @@ -0,0 +1,99 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ConferenceFloorChangedEventPayload + */ +public class ConferenceFloorChangedEventPayloadTest { + private final ConferenceFloorChangedEventPayload model = new ConferenceFloorChangedEventPayload(); + + /** + * Model tests for ConferenceFloorChangedEventPayload + */ + @Test + public void testConferenceFloorChangedEventPayload() { + // TODO: test ConferenceFloorChangedEventPayload + } + + /** + * Test the property 'callControlId' + */ + @Test + public void callControlIdTest() { + // TODO: test callControlId + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'callLegId' + */ + @Test + public void callLegIdTest() { + // TODO: test callLegId + } + + /** + * Test the property 'callSessionId' + */ + @Test + public void callSessionIdTest() { + // TODO: test callSessionId + } + + /** + * Test the property 'clientState' + */ + @Test + public void clientStateTest() { + // TODO: test clientState + } + + /** + * Test the property 'conferenceId' + */ + @Test + public void conferenceIdTest() { + // TODO: test conferenceId + } + + /** + * Test the property 'occurredAt' + */ + @Test + public void occurredAtTest() { + // TODO: test occurredAt + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ConferenceFloorChangedEventTest.java b/src/test/java/com/telnyx/sdk/model/ConferenceFloorChangedEventTest.java new file mode 100644 index 00000000..d0ad6cbb --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ConferenceFloorChangedEventTest.java @@ -0,0 +1,76 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.ConferenceFloorChangedEventPayload; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.UUID; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ConferenceFloorChangedEvent + */ +public class ConferenceFloorChangedEventTest { + private final ConferenceFloorChangedEvent model = new ConferenceFloorChangedEvent(); + + /** + * Model tests for ConferenceFloorChangedEvent + */ + @Test + public void testConferenceFloorChangedEvent() { + // TODO: test ConferenceFloorChangedEvent + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'eventType' + */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'payload' + */ + @Test + public void payloadTest() { + // TODO: test payload + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ConferenceParticipantDetailRecordTest.java b/src/test/java/com/telnyx/sdk/model/ConferenceParticipantDetailRecordTest.java new file mode 100644 index 00000000..4b85129d --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ConferenceParticipantDetailRecordTest.java @@ -0,0 +1,179 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ConferenceParticipantDetailRecord + */ +public class ConferenceParticipantDetailRecordTest { + private final ConferenceParticipantDetailRecord model = new ConferenceParticipantDetailRecord(); + + /** + * Model tests for ConferenceParticipantDetailRecord + */ + @Test + public void testConferenceParticipantDetailRecord() { + // TODO: test ConferenceParticipantDetailRecord + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'conferenceId' + */ + @Test + public void conferenceIdTest() { + // TODO: test conferenceId + } + + /** + * Test the property 'joinedAt' + */ + @Test + public void joinedAtTest() { + // TODO: test joinedAt + } + + /** + * Test the property 'leftAt' + */ + @Test + public void leftAtTest() { + // TODO: test leftAt + } + + /** + * Test the property 'destinationNumber' + */ + @Test + public void destinationNumberTest() { + // TODO: test destinationNumber + } + + /** + * Test the property 'originatingNumber' + */ + @Test + public void originatingNumberTest() { + // TODO: test originatingNumber + } + + /** + * Test the property 'callLegId' + */ + @Test + public void callLegIdTest() { + // TODO: test callLegId + } + + /** + * Test the property 'callSessionId' + */ + @Test + public void callSessionIdTest() { + // TODO: test callSessionId + } + + /** + * Test the property 'callSec' + */ + @Test + public void callSecTest() { + // TODO: test callSec + } + + /** + * Test the property 'billedSec' + */ + @Test + public void billedSecTest() { + // TODO: test billedSec + } + + /** + * Test the property 'isTelnyxBillable' + */ + @Test + public void isTelnyxBillableTest() { + // TODO: test isTelnyxBillable + } + + /** + * Test the property 'rate' + */ + @Test + public void rateTest() { + // TODO: test rate + } + + /** + * Test the property 'rateMeasuredIn' + */ + @Test + public void rateMeasuredInTest() { + // TODO: test rateMeasuredIn + } + + /** + * Test the property 'cost' + */ + @Test + public void costTest() { + // TODO: test cost + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CurrencyTest.java b/src/test/java/com/telnyx/sdk/model/CurrencyTest.java new file mode 100644 index 00000000..61585e12 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CurrencyTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Currency + */ +public class CurrencyTest { + /** + * Model tests for Currency + */ + @Test + public void testCurrency() { + // TODO: test Currency + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/DetailRecordTest.java b/src/test/java/com/telnyx/sdk/model/DetailRecordTest.java new file mode 100644 index 00000000..ca7bc10b --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/DetailRecordTest.java @@ -0,0 +1,391 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.ConferenceDetailRecord; +import com.telnyx.sdk.model.ConferenceParticipantDetailRecord; +import com.telnyx.sdk.model.Direction; +import com.telnyx.sdk.model.MessageDetailRecord; +import com.telnyx.sdk.model.MessageStatus; +import com.telnyx.sdk.model.MessageType; +import com.telnyx.sdk.model.PassThroughFee; +import com.telnyx.sdk.model.Product; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for DetailRecord + */ +public class DetailRecordTest { + private final DetailRecord model = new DetailRecord(); + + /** + * Model tests for DetailRecord + */ + @Test + public void testDetailRecord() { + // TODO: test DetailRecord + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'outboundProfileName' + */ + @Test + public void outboundProfileNameTest() { + // TODO: test outboundProfileName + } + + /** + * Test the property 'outboundProfileId' + */ + @Test + public void outboundProfileIdTest() { + // TODO: test outboundProfileId + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'parts' + */ + @Test + public void partsTest() { + // TODO: test parts + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'cld' + */ + @Test + public void cldTest() { + // TODO: test cld + } + + /** + * Test the property 'cli' + */ + @Test + public void cliTest() { + // TODO: test cli + } + + /** + * Test the property 'rate' + */ + @Test + public void rateTest() { + // TODO: test rate + } + + /** + * Test the property 'cost' + */ + @Test + public void costTest() { + // TODO: test cost + } + + /** + * Test the property 'countryIso' + */ + @Test + public void countryIsoTest() { + // TODO: test countryIso + } + + /** + * Test the property 'messageType' + */ + @Test + public void messageTypeTest() { + // TODO: test messageType + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + + /** + * Test the property 'normalizedCarrier' + */ + @Test + public void normalizedCarrierTest() { + // TODO: test normalizedCarrier + } + + /** + * Test the property 'passThroughFee' + */ + @Test + public void passThroughFeeTest() { + // TODO: test passThroughFee + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'mcc' + */ + @Test + public void mccTest() { + // TODO: test mcc + } + + /** + * Test the property 'mnc' + */ + @Test + public void mncTest() { + // TODO: test mnc + } + + /** + * Test the property 'product' + */ + @Test + public void productTest() { + // TODO: test product + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'startedAt' + */ + @Test + public void startedAtTest() { + // TODO: test startedAt + } + + /** + * Test the property 'endedAt' + */ + @Test + public void endedAtTest() { + // TODO: test endedAt + } + + /** + * Test the property 'expiresAt' + */ + @Test + public void expiresAtTest() { + // TODO: test expiresAt + } + + /** + * Test the property 'region' + */ + @Test + public void regionTest() { + // TODO: test region + } + + /** + * Test the property 'callLegId' + */ + @Test + public void callLegIdTest() { + // TODO: test callLegId + } + + /** + * Test the property 'callSessionId' + */ + @Test + public void callSessionIdTest() { + // TODO: test callSessionId + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'callSec' + */ + @Test + public void callSecTest() { + // TODO: test callSec + } + + /** + * Test the property 'participantCount' + */ + @Test + public void participantCountTest() { + // TODO: test participantCount + } + + /** + * Test the property 'participantCallSec' + */ + @Test + public void participantCallSecTest() { + // TODO: test participantCallSec + } + + /** + * Test the property 'isTelnyxBillable' + */ + @Test + public void isTelnyxBillableTest() { + // TODO: test isTelnyxBillable + } + + /** + * Test the property 'conferenceId' + */ + @Test + public void conferenceIdTest() { + // TODO: test conferenceId + } + + /** + * Test the property 'joinedAt' + */ + @Test + public void joinedAtTest() { + // TODO: test joinedAt + } + + /** + * Test the property 'leftAt' + */ + @Test + public void leftAtTest() { + // TODO: test leftAt + } + + /** + * Test the property 'destinationNumber' + */ + @Test + public void destinationNumberTest() { + // TODO: test destinationNumber + } + + /** + * Test the property 'originatingNumber' + */ + @Test + public void originatingNumberTest() { + // TODO: test originatingNumber + } + + /** + * Test the property 'billedSec' + */ + @Test + public void billedSecTest() { + // TODO: test billedSec + } + + /** + * Test the property 'rateMeasuredIn' + */ + @Test + public void rateMeasuredInTest() { + // TODO: test rateMeasuredIn + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/DetailRecordsSearchResponseTest.java b/src/test/java/com/telnyx/sdk/model/DetailRecordsSearchResponseTest.java new file mode 100644 index 00000000..f4165b08 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/DetailRecordsSearchResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.DetailRecord; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for DetailRecordsSearchResponse + */ +public class DetailRecordsSearchResponseTest { + private final DetailRecordsSearchResponse model = new DetailRecordsSearchResponse(); + + /** + * Model tests for DetailRecordsSearchResponse + */ + @Test + public void testDetailRecordsSearchResponse() { + // TODO: test DetailRecordsSearchResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/DirectionTest.java b/src/test/java/com/telnyx/sdk/model/DirectionTest.java new file mode 100644 index 00000000..de5e8e10 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/DirectionTest.java @@ -0,0 +1,33 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Direction + */ +public class DirectionTest { + /** + * Model tests for Direction + */ + @Test + public void testDirection() { + // TODO: test Direction + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/FaxTest.java b/src/test/java/com/telnyx/sdk/model/FaxTest.java index be325067..8f4b6a9f 100644 --- a/src/test/java/com/telnyx/sdk/model/FaxTest.java +++ b/src/test/java/com/telnyx/sdk/model/FaxTest.java @@ -25,6 +25,8 @@ import org.junit.Ignore; import org.junit.Test; +import static org.junit.Assert.assertEquals; + /** * Model tests for Fax @@ -109,7 +111,19 @@ public void qualityTest() { */ @Test public void statusTest() { - // TODO: test status + //valid outbound statuses + assertEquals(Fax.StatusEnum.QUEUED,Fax.StatusEnum.fromValue("queued")); + assertEquals(Fax.StatusEnum.MEDIA_PROCESSED,Fax.StatusEnum.fromValue("media.processed")); + assertEquals(Fax.StatusEnum.SENDING,Fax.StatusEnum.fromValue("sending")); + assertEquals(Fax.StatusEnum.DELIVERED,Fax.StatusEnum.fromValue("delivered")); + assertEquals(Fax.StatusEnum.FAILED,Fax.StatusEnum.fromValue("failed")); + + //valid inbound statuses + assertEquals(Fax.StatusEnum.INITIATED,Fax.StatusEnum.fromValue("initiated")); + assertEquals(Fax.StatusEnum.RECEIVING,Fax.StatusEnum.fromValue("receiving")); + assertEquals(Fax.StatusEnum.MEDIA_PROCESSING,Fax.StatusEnum.fromValue("media.processing")); + assertEquals(Fax.StatusEnum.RECEIVED,Fax.StatusEnum.fromValue("received")); + assertEquals(Fax.StatusEnum.FAILED,Fax.StatusEnum.fromValue("failed")); } /** diff --git a/src/test/java/com/telnyx/sdk/model/MessageCostTest.java b/src/test/java/com/telnyx/sdk/model/MessageCostTest.java new file mode 100644 index 00000000..1875df13 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/MessageCostTest.java @@ -0,0 +1,60 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Currency; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MessageCost + */ +public class MessageCostTest { + private final MessageCost model = new MessageCost(); + + /** + * Model tests for MessageCost + */ + @Test + public void testMessageCost() { + // TODO: test MessageCost + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/MessageDetailRecordTest.java b/src/test/java/com/telnyx/sdk/model/MessageDetailRecordTest.java new file mode 100644 index 00000000..99efa329 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/MessageDetailRecordTest.java @@ -0,0 +1,228 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Direction; +import com.telnyx.sdk.model.MessageCost; +import com.telnyx.sdk.model.MessageRate; +import com.telnyx.sdk.model.MessageStatus; +import com.telnyx.sdk.model.MessageType; +import com.telnyx.sdk.model.PassThroughFee; +import com.telnyx.sdk.model.Product; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MessageDetailRecord + */ +public class MessageDetailRecordTest { + private final MessageDetailRecord model = new MessageDetailRecord(); + + /** + * Model tests for MessageDetailRecord + */ + @Test + public void testMessageDetailRecord() { + // TODO: test MessageDetailRecord + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'outboundProfileName' + */ + @Test + public void outboundProfileNameTest() { + // TODO: test outboundProfileName + } + + /** + * Test the property 'outboundProfileId' + */ + @Test + public void outboundProfileIdTest() { + // TODO: test outboundProfileId + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'parts' + */ + @Test + public void partsTest() { + // TODO: test parts + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'cld' + */ + @Test + public void cldTest() { + // TODO: test cld + } + + /** + * Test the property 'cli' + */ + @Test + public void cliTest() { + // TODO: test cli + } + + /** + * Test the property 'rate' + */ + @Test + public void rateTest() { + // TODO: test rate + } + + /** + * Test the property 'cost' + */ + @Test + public void costTest() { + // TODO: test cost + } + + /** + * Test the property 'countryIso' + */ + @Test + public void countryIsoTest() { + // TODO: test countryIso + } + + /** + * Test the property 'messageType' + */ + @Test + public void messageTypeTest() { + // TODO: test messageType + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + + /** + * Test the property 'normalizedCarrier' + */ + @Test + public void normalizedCarrierTest() { + // TODO: test normalizedCarrier + } + + /** + * Test the property 'passThroughFee' + */ + @Test + public void passThroughFeeTest() { + // TODO: test passThroughFee + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'mcc' + */ + @Test + public void mccTest() { + // TODO: test mcc + } + + /** + * Test the property 'mnc' + */ + @Test + public void mncTest() { + // TODO: test mnc + } + + /** + * Test the property 'product' + */ + @Test + public void productTest() { + // TODO: test product + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/MessageRateTest.java b/src/test/java/com/telnyx/sdk/model/MessageRateTest.java new file mode 100644 index 00000000..b162bc2b --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/MessageRateTest.java @@ -0,0 +1,60 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Currency; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MessageRate + */ +public class MessageRateTest { + private final MessageRate model = new MessageRate(); + + /** + * Model tests for MessageRate + */ + @Test + public void testMessageRate() { + // TODO: test MessageRate + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/MessageStatusTest.java b/src/test/java/com/telnyx/sdk/model/MessageStatusTest.java new file mode 100644 index 00000000..5e8db1b4 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/MessageStatusTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MessageStatus + */ +public class MessageStatusTest { + /** + * Model tests for MessageStatus + */ + @Test + public void testMessageStatus() { + // TODO: test MessageStatus + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/MessageTypeTest.java b/src/test/java/com/telnyx/sdk/model/MessageTypeTest.java new file mode 100644 index 00000000..5dc239cd --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/MessageTypeTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MessageType + */ +public class MessageTypeTest { + /** + * Model tests for MessageType + */ + @Test + public void testMessageType() { + // TODO: test MessageType + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/OutboundMessageEventMetaTest.java b/src/test/java/com/telnyx/sdk/model/OutboundMessageEventMetaTest.java new file mode 100644 index 00000000..19cb4179 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/OutboundMessageEventMetaTest.java @@ -0,0 +1,58 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OutboundMessageEventMeta + */ +public class OutboundMessageEventMetaTest { + private final OutboundMessageEventMeta model = new OutboundMessageEventMeta(); + + /** + * Model tests for OutboundMessageEventMeta + */ + @Test + public void testOutboundMessageEventMeta() { + // TODO: test OutboundMessageEventMeta + } + + /** + * Test the property 'attempt' + */ + @Test + public void attemptTest() { + // TODO: test attempt + } + + /** + * Test the property 'deliveredTo' + */ + @Test + public void deliveredToTest() { + // TODO: test deliveredTo + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PassThroughFeeTest.java b/src/test/java/com/telnyx/sdk/model/PassThroughFeeTest.java new file mode 100644 index 00000000..6904b111 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PassThroughFeeTest.java @@ -0,0 +1,60 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Currency; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PassThroughFee + */ +public class PassThroughFeeTest { + private final PassThroughFee model = new PassThroughFee(); + + /** + * Model tests for PassThroughFee + */ + @Test + public void testPassThroughFee() { + // TODO: test PassThroughFee + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ProductTest.java b/src/test/java/com/telnyx/sdk/model/ProductTest.java new file mode 100644 index 00000000..b1689746 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ProductTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Product + */ +public class ProductTest { + /** + * Model tests for Product + */ + @Test + public void testProduct() { + // TODO: test Product + } + +}