From 82922634ae6e942068f3a9d07fc556eaa7792991 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 26 Aug 2025 14:07:04 +0000 Subject: [PATCH 1/3] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 6 + README.md | 3 + api/openapi.yaml | 457 +++++++++++++++++- bandwidth.yml | 254 ++++++++++ docs/BusinessEntityTypeEnum.md | 19 + docs/BusinessRegistrationTypeEnum.md | 13 + docs/ListMessageItem.md | 6 + docs/MessageTypeEnum.md | 2 + docs/MessagesApi.md | 30 +- docs/OptInWorkflow.md | 1 + docs/ProductTypeEnum.md | 27 ++ docs/TfvSubmissionInfo.md | 3 + docs/VerificationRequest.md | 5 + docs/VerificationUpdateRequest.md | 5 + .../com/bandwidth/sdk/api/MessagesApi.java | 115 ++++- .../sdk/model/BusinessEntityTypeEnum.java | 84 ++++ .../model/BusinessRegistrationTypeEnum.java | 78 +++ .../bandwidth/sdk/model/ListMessageItem.java | 178 ++++++- .../bandwidth/sdk/model/MessageTypeEnum.java | 4 +- .../bandwidth/sdk/model/OptInWorkflow.java | 46 +- .../bandwidth/sdk/model/ProductTypeEnum.java | 92 ++++ .../sdk/model/TfvSubmissionInfo.java | 98 +++- .../sdk/model/VerificationRequest.java | 155 +++++- .../sdk/model/VerificationUpdateRequest.java | 155 +++++- 24 files changed, 1795 insertions(+), 41 deletions(-) create mode 100644 docs/BusinessEntityTypeEnum.md create mode 100644 docs/BusinessRegistrationTypeEnum.md create mode 100644 docs/ProductTypeEnum.md create mode 100644 src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java create mode 100644 src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java create mode 100644 src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ab8d54cd..a1c64a70 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -10,6 +10,8 @@ docs/AnswerCallback.md docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md +docs/BusinessEntityTypeEnum.md +docs/BusinessRegistrationTypeEnum.md docs/CallDirectionEnum.md docs/CallRecordingMetadata.md docs/CallState.md @@ -99,6 +101,7 @@ docs/OptInWorkflow.md docs/PageInfo.md docs/PhoneNumberLookupApi.md docs/PriorityEnum.md +docs/ProductTypeEnum.md docs/RbmActionBase.md docs/RbmActionDial.md docs/RbmActionOpenUrl.md @@ -210,6 +213,8 @@ src/main/java/com/bandwidth/sdk/model/AnswerCallback.java src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java +src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java src/main/java/com/bandwidth/sdk/model/CallState.java @@ -292,6 +297,7 @@ src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelList src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java src/main/java/com/bandwidth/sdk/model/PageInfo.java src/main/java/com/bandwidth/sdk/model/PriorityEnum.java +src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java src/main/java/com/bandwidth/sdk/model/RbmActionBase.java src/main/java/com/bandwidth/sdk/model/RbmActionDial.java src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java diff --git a/README.md b/README.md index 826d40b1..c8fda26d 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,8 @@ Class | Method | HTTP request | Description - [BlockedWebhook](docs/BlockedWebhook.md) - [BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) + - [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md) + - [BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md) - [CallDirectionEnum](docs/CallDirectionEnum.md) - [CallRecordingMetadata](docs/CallRecordingMetadata.md) - [CallState](docs/CallState.md) @@ -264,6 +266,7 @@ Class | Method | HTTP request | Description - [OptInWorkflow](docs/OptInWorkflow.md) - [PageInfo](docs/PageInfo.md) - [PriorityEnum](docs/PriorityEnum.md) + - [ProductTypeEnum](docs/ProductTypeEnum.md) - [RbmActionBase](docs/RbmActionBase.md) - [RbmActionDial](docs/RbmActionDial.md) - [RbmActionOpenUrl](docs/RbmActionOpenUrl.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 7b15df9f..c68f2404 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -521,6 +521,120 @@ paths: schema: type: string style: form + - description: The minimum Bandwidth latency of the message in seconds. Only + available for accounts with the Advanced Quality Metrics feature enabled. + example: 5 + explode: true + in: query + name: fromBwLatency + required: false + schema: + type: integer + style: form + - description: A boolean value indicating whether the message is queued in the + Bandwidth network. + example: true + explode: true + in: query + name: bwQueued + required: false + schema: + type: boolean + style: form + - description: Messaging product associated with the message. + example: P2P + explode: true + in: query + name: product + required: false + schema: + $ref: '#/components/schemas/productTypeEnum' + style: form + - description: Location Id associated with the message. + example: 123ABC + explode: true + in: query + name: location + required: false + schema: + type: string + style: form + - description: A boolean value indicating whether the message is queued in the + carrier network. Only available for OUTBOUND messages from accounts with + the Advanced Quality Metrics feature enabled. + example: true + explode: true + in: query + name: carrierQueued + required: false + schema: + type: boolean + style: form + - description: The minimum carrier latency of the message in seconds. Only available + for OUTBOUND messages from accounts with the Advanced Quality Metrics feature + enabled. + example: 50 + explode: true + in: query + name: fromCarrierLatency + required: false + schema: + type: integer + style: form + - description: Calling number country in A3 format. + example: USA + explode: true + in: query + name: callingNumberCountryA3 + required: false + schema: + type: string + style: form + - description: Called number country in A3 format. + example: USA + explode: true + in: query + name: calledNumberCountryA3 + required: false + schema: + type: string + style: form + - description: Segment count (start range). + example: 1 + explode: true + in: query + name: fromSegmentCount + required: false + schema: + type: integer + style: form + - description: Segment count (end range). + example: 3 + explode: true + in: query + name: toSegmentCount + required: false + schema: + type: integer + style: form + - description: Message size (start range). + example: 100 + explode: true + in: query + name: fromMessageSize + required: false + schema: + type: integer + style: form + - description: Message size (end range). + example: 120 + explode: true + in: query + name: toMessageSize + required: false + schema: + type: integer + style: form - description: The field and direction to sort by combined with a colon. Direction is either asc or desc. example: sourceTn:desc @@ -6359,6 +6473,132 @@ components: schema: type: string style: form + fromBwLatency: + description: The minimum Bandwidth latency of the message in seconds. Only available + for accounts with the Advanced Quality Metrics feature enabled. + example: 5 + explode: true + in: query + name: fromBwLatency + required: false + schema: + type: integer + style: form + bwQueued: + description: A boolean value indicating whether the message is queued in the + Bandwidth network. + example: true + explode: true + in: query + name: bwQueued + required: false + schema: + type: boolean + style: form + product: + description: Messaging product associated with the message. + example: P2P + explode: true + in: query + name: product + required: false + schema: + $ref: '#/components/schemas/productTypeEnum' + style: form + location: + description: Location Id associated with the message. + example: 123ABC + explode: true + in: query + name: location + required: false + schema: + type: string + style: form + carrierQueued: + description: A boolean value indicating whether the message is queued in the + carrier network. Only available for OUTBOUND messages from accounts with the + Advanced Quality Metrics feature enabled. + example: true + explode: true + in: query + name: carrierQueued + required: false + schema: + type: boolean + style: form + fromCarrierLatency: + description: The minimum carrier latency of the message in seconds. Only available + for OUTBOUND messages from accounts with the Advanced Quality Metrics feature + enabled. + example: 50 + explode: true + in: query + name: fromCarrierLatency + required: false + schema: + type: integer + style: form + callingNumberCountryA3: + description: Calling number country in A3 format. + example: USA + explode: true + in: query + name: callingNumberCountryA3 + required: false + schema: + type: string + style: form + calledNumberCountryA3: + description: Called number country in A3 format. + example: USA + explode: true + in: query + name: calledNumberCountryA3 + required: false + schema: + type: string + style: form + fromSegmentCount: + description: Segment count (start range). + example: 1 + explode: true + in: query + name: fromSegmentCount + required: false + schema: + type: integer + style: form + toSegmentCount: + description: Segment count (end range). + example: 3 + explode: true + in: query + name: toSegmentCount + required: false + schema: + type: integer + style: form + fromMessageSize: + description: Message size (start range). + example: 100 + explode: true + in: query + name: fromMessageSize + required: false + schema: + type: integer + style: form + toMessageSize: + description: Message size (end range). + example: 120 + explode: true + in: query + name: toMessageSize + required: false + schema: + type: integer + style: form sort: description: The field and direction to sort by combined with a colon. Direction is either asc or desc. @@ -7708,8 +7948,23 @@ components: enum: - sms - mms + - rcs example: sms type: string + productTypeEnum: + description: The type of product associated with the message. + enum: + - LOCAL_A2P + - P2P + - SHORT_CODE_REACH + - TOLL_FREE + - HOSTED_SHORT_CODE + - ALPHA_NUMERIC + - RBM_MEDIA + - RBM_RICH + - RBM_CONVERSATIONAL + example: P2P + type: string fieldError: example: fieldName: from @@ -7734,39 +7989,51 @@ components: nextPageToken: GL83PD3C prevPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 messages: - - sourceTn: "+15554443333" + - callingNumberCountryA3: USA + product: P2P + sourceTn: "+15554443333" messageLength: 18 campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 + calledNumberCountryA3: USA destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED receiveTime: 2020-04-07T14:03:07Z accountId: "9900000" messageDirection: INBOUND + carrierLatency: 20 messageType: sms carrierName: other recipientCount: 1 campaignClass: T + bwLatency: 20 attachmentCount: 1 + location: 123ID messageSize: 27 - - sourceTn: "+15554443333" + - callingNumberCountryA3: USA + product: P2P + sourceTn: "+15554443333" messageLength: 18 campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 + calledNumberCountryA3: USA destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED receiveTime: 2020-04-07T14:03:07Z accountId: "9900000" messageDirection: INBOUND + carrierLatency: 20 messageType: sms carrierName: other recipientCount: 1 campaignClass: T + bwLatency: 20 attachmentCount: 1 + location: 123ID messageSize: 27 totalCount: 100 properties: @@ -7785,22 +8052,28 @@ components: type: object listMessageItem: example: + callingNumberCountryA3: USA + product: P2P sourceTn: "+15554443333" messageLength: 18 campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 + calledNumberCountryA3: USA destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED receiveTime: 2020-04-07T14:03:07Z accountId: "9900000" messageDirection: INBOUND + carrierLatency: 20 messageType: sms carrierName: other recipientCount: 1 campaignClass: T + bwLatency: 20 attachmentCount: 1 + location: 123ID messageSize: 27 properties: messageId: @@ -7874,6 +8147,39 @@ components: example: CJEUMDK nullable: true type: string + bwLatency: + description: The Bandwidth latency of the message in seconds. Only available + for accounts with the Advanced Quality Metrics feature enabled. + example: 20 + nullable: true + type: integer + carrierLatency: + description: The carrier latency of the message in seconds. Only available + for OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + example: 20 + nullable: true + type: integer + callingNumberCountryA3: + description: The A3 country code of the calling number. + example: USA + nullable: true + type: string + calledNumberCountryA3: + description: The A3 country code of the called number. + example: USA + nullable: true + type: string + product: + description: The messaging product associated with the message. + example: P2P + nullable: true + type: string + location: + description: The location ID associated with this message. + example: 123ID + nullable: true + type: string title: listMessageItem type: object pageInfo: @@ -12942,6 +13248,47 @@ components: description: The company 'Doing Business As'. example: Another Company Name Inc. type: string + businessRegistrationNumber: + description: "US Federal Tax ID Number (EIN) or Canada Business Number (CBN).\ + \ Optional until early 2026. If a value is provided for this field, a value\ + \ must be provided for `businessRegistrationType` and `businessEntityType`.\ + \ Available starting October 1st, 2025." + example: 12-3456789 + maxLength: 500 + nullable: true + type: string + businessRegistrationTypeEnum: + description: "The type of business registration number. Optional until early\ + \ 2026; required if `businessRegistrationNumber` is provided. Available starting\ + \ October 1st, 2025." + enum: + - EIN + - CBN + nullable: true + type: string + businessEntityTypeEnum: + description: "The type of registered business. If no option is applicable, please\ + \ provide \"SOLE_PROPRIETOR\" as a value. Optional until early 2026; required\ + \ if `businessRegistrationNumber` is provided. Available starting October\ + \ 1st, 2025." + enum: + - SOLE_PROPRIETOR + - PRIVATE_PROFIT + - PUBLIC_PROFIT + - NON_PROFIT + - GOVERNMENT + nullable: true + type: string + helpMessageResponse: + description: A message that gets sent to users requesting help. + example: Please contact support for assistance. + maxLength: 500 + nullable: true + type: string + ageGatedContent: + description: Indicates whether the content is age-gated. + example: false + type: boolean additionalDenialReason: properties: statusCode: @@ -13050,6 +13397,29 @@ components: description: The company 'Doing Business As'. example: Another Company Name Inc. type: string + businessRegistrationNumber: + description: "US Federal Tax ID Number (EIN) or Canada Business Number (CBN).\ + \ Optional until early 2026. If a value is provided for this field, a\ + \ value must be provided for `businessRegistrationType` and `businessEntityType`.\ + \ Available starting October 1st, 2025." + example: 12-3456789 + maxLength: 500 + nullable: true + type: string + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + description: A message that gets sent to users requesting help. + example: Please contact support for assistance. + maxLength: 500 + nullable: true + type: string + ageGatedContent: + description: Indicates whether the content is age-gated. + example: false + type: boolean required: - businessAddress - businessContact @@ -13121,6 +13491,29 @@ components: description: The company 'Doing Business As'. example: Another Company Name Inc. type: string + businessRegistrationNumber: + description: "US Federal Tax ID Number (EIN) or Canada Business Number (CBN).\ + \ Optional until early 2026. If a value is provided for this field, a\ + \ value must be provided for `businessRegistrationType` and `businessEntityType`.\ + \ Available starting October 1st, 2025." + example: 12-3456789 + maxLength: 500 + nullable: true + type: string + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + description: A message that gets sent to users requesting help. + example: Please contact support for assistance. + maxLength: 500 + nullable: true + type: string + ageGatedContent: + description: Indicates whether the content is age-gated. + example: false + type: boolean required: - businessAddress - businessContact @@ -13415,6 +13808,7 @@ components: imageUrls: - https://www.example.com/path/to/resource - https://www.example.com/path/to/resource + confirmationResponse: Thank you for opting in! description: Opt In Flow nullable: false properties: @@ -13434,6 +13828,12 @@ components: .[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&//=]*)" type: string type: array + confirmationResponse: + example: Thank you for opting in! + maxLength: 500 + minLength: 0 + nullable: true + type: string required: - description - imageUrls @@ -13744,16 +14144,26 @@ components: modifiedDateTime: 2021-06-08T06:45:13Z submission: additionalInformation: Any additional information - useCase: 2FA termsAndConditionsUrl: http://your-company.com/termsAndConditions businessDba: Another Company Name Inc. - isvReseller: Test ISV businessContact: firstName: John lastName: Doe phoneNumber: "+19192654500" email: foo@bar.com messageVolume: 10000 + businessEntityType: SOLE_PROPRIETOR + businessRegistrationType: EIN + privacyPolicyUrl: http://your-company.com/privacyPolicy + optInWorkflow: + imageUrls: + - https://www.example.com/path/to/resource + - https://www.example.com/path/to/resource + confirmationResponse: Thank you for opting in! + description: Opt In Flow + useCase: 2FA + isvReseller: Test ISV + businessRegistrationNumber: 12-3456789 productionMessageContent: Production message content businessAddress: zip: "27606" @@ -13763,13 +14173,7 @@ components: name: Bandwidth Inc. state: NC url: https://www.example.com/path/to/resource - privacyPolicyUrl: http://your-company.com/privacyPolicy useCaseSummary: Text summarizing the use case for the toll-free number - optInWorkflow: - imageUrls: - - https://www.example.com/path/to/resource - - https://www.example.com/path/to/resource - description: Opt In Flow declineReasonDescription: Invalid Information - Can't Validate URL - Website is not accessible / not available status: VERIFIED @@ -13828,16 +14232,26 @@ components: tfvSubmissionInfo: example: additionalInformation: Any additional information - useCase: 2FA termsAndConditionsUrl: http://your-company.com/termsAndConditions businessDba: Another Company Name Inc. - isvReseller: Test ISV businessContact: firstName: John lastName: Doe phoneNumber: "+19192654500" email: foo@bar.com messageVolume: 10000 + businessEntityType: SOLE_PROPRIETOR + businessRegistrationType: EIN + privacyPolicyUrl: http://your-company.com/privacyPolicy + optInWorkflow: + imageUrls: + - https://www.example.com/path/to/resource + - https://www.example.com/path/to/resource + confirmationResponse: Thank you for opting in! + description: Opt In Flow + useCase: 2FA + isvReseller: Test ISV + businessRegistrationNumber: 12-3456789 productionMessageContent: Production message content businessAddress: zip: "27606" @@ -13847,13 +14261,7 @@ components: name: Bandwidth Inc. state: NC url: https://www.example.com/path/to/resource - privacyPolicyUrl: http://your-company.com/privacyPolicy useCaseSummary: Text summarizing the use case for the toll-free number - optInWorkflow: - imageUrls: - - https://www.example.com/path/to/resource - - https://www.example.com/path/to/resource - description: Opt In Flow properties: businessAddress: $ref: '#/components/schemas/address' @@ -13914,6 +14322,19 @@ components: description: The company 'Doing Business As'. example: Another Company Name Inc. type: string + businessRegistrationNumber: + description: "US Federal Tax ID Number (EIN) or Canada Business Number (CBN).\ + \ Optional until early 2026. If a value is provided for this field, a\ + \ value must be provided for `businessRegistrationType` and `businessEntityType`.\ + \ Available starting October 1st, 2025." + example: 12-3456789 + maxLength: 500 + nullable: true + type: string + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' type: object tfvStatusEnum: enum: diff --git a/bandwidth.yml b/bandwidth.yml index 4b3681cb..004fb91b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -179,6 +179,18 @@ paths: - $ref: '#/components/parameters/fromDateTime' - $ref: '#/components/parameters/toDateTime' - $ref: '#/components/parameters/campaignId' + - $ref: '#/components/parameters/fromBwLatency' + - $ref: '#/components/parameters/bwQueued' + - $ref: '#/components/parameters/product' + - $ref: '#/components/parameters/location' + - $ref: '#/components/parameters/carrierQueued' + - $ref: '#/components/parameters/fromCarrierLatency' + - $ref: '#/components/parameters/callingNumberCountryA3' + - $ref: '#/components/parameters/calledNumberCountryA3' + - $ref: '#/components/parameters/fromSegmentCount' + - $ref: '#/components/parameters/toSegmentCount' + - $ref: '#/components/parameters/fromMessageSize' + - $ref: '#/components/parameters/toMessageSize' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/pageToken' - $ref: '#/components/parameters/limit' @@ -1716,7 +1728,22 @@ components: enum: - sms - mms + - rcs example: sms + productTypeEnum: + type: string + description: The type of product associated with the message. + enum: + - LOCAL_A2P + - P2P + - SHORT_CODE_REACH + - TOLL_FREE + - HOSTED_SHORT_CODE + - ALPHA_NUMERIC + - RBM_MEDIA + - RBM_RICH + - RBM_CONVERSATIONAL + example: P2P fieldError: type: object properties: @@ -1819,6 +1846,41 @@ components: description: The campaign ID of the message if it has one. nullable: true example: CJEUMDK + bwLatency: + type: integer + description: >- + The Bandwidth latency of the message in seconds. Only available for + accounts with the Advanced Quality Metrics feature enabled. + nullable: true + example: 20 + carrierLatency: + type: integer + description: >- + The carrier latency of the message in seconds. Only available for + OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + nullable: true + example: 20 + callingNumberCountryA3: + type: string + description: The A3 country code of the calling number. + nullable: true + example: USA + calledNumberCountryA3: + type: string + description: The A3 country code of the called number. + nullable: true + example: USA + product: + type: string + description: The messaging product associated with the message. + nullable: true + example: P2P + location: + type: string + description: The location ID associated with this message. + nullable: true + example: 123ID pageInfo: title: PageInfo type: object @@ -5478,6 +5540,50 @@ components: description: The company 'Doing Business As'. example: Another Company Name Inc. type: string + businessRegistrationNumber: + type: string + description: >- + US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional + until early 2026. If a value is provided for this field, a value must be + provided for `businessRegistrationType` and `businessEntityType`. + Available starting October 1st, 2025. + nullable: true + maxLength: 500 + example: 12-3456789 + businessRegistrationTypeEnum: + type: string + description: >- + The type of business registration number. Optional until early 2026; + required if `businessRegistrationNumber` is provided. Available starting + October 1st, 2025. + enum: + - EIN + - CBN + nullable: true + businessEntityTypeEnum: + type: string + description: >- + The type of registered business. If no option is applicable, please + provide "SOLE_PROPRIETOR" as a value. Optional until early 2026; + required if `businessRegistrationNumber` is provided. Available starting + October 1st, 2025. + enum: + - SOLE_PROPRIETOR + - PRIVATE_PROFIT + - PUBLIC_PROFIT + - NON_PROFIT + - GOVERNMENT + nullable: true + helpMessageResponse: + type: string + description: A message that gets sent to users requesting help. + nullable: true + maxLength: 500 + example: Please contact support for assistance. + ageGatedContent: + type: boolean + description: Indicates whether the content is age-gated. + example: false additionalDenialReason: properties: statusCode: @@ -5564,6 +5670,16 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' verificationUpdateRequest: type: object required: @@ -5603,6 +5719,16 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' tfvBasicAuthentication: type: object properties: @@ -5806,6 +5932,12 @@ components: example: https://www.example.com/path/to/resource pattern: >- ^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*) + confirmationResponse: + type: string + minLength: 0 + maxLength: 500 + nullable: true + example: Thank you for opting in! isvReseller: type: string description: ISV name. @@ -6079,6 +6211,22 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + description: >- + US Federal Tax ID Number (EIN) or Canada Business Number (CBN). + Available starting October 1st, 2025. + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + description: >- + The type of business registration number. Available starting October + 1st, 2025. + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + description: >- + The type of registered business. If no option is applicable, please + provide "SOLE_PROPRIETOR" as a value. Available starting October + 1st, 2025. tfvStatusEnum: type: string enum: @@ -6940,6 +7088,112 @@ components: example: CJEUMDK schema: type: string + fromBwLatency: + in: query + name: fromBwLatency + required: false + description: >- + The minimum Bandwidth latency of the message in seconds. Only available + for accounts with the Advanced Quality Metrics feature enabled. + example: 5 + schema: + type: integer + bwQueued: + in: query + name: bwQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the + Bandwidth network. + example: true + schema: + type: boolean + product: + in: query + name: product + required: false + description: Messaging product associated with the message. + example: P2P + schema: + $ref: '#/components/schemas/productTypeEnum' + location: + in: query + name: location + required: false + description: Location Id associated with the message. + example: 123ABC + schema: + type: string + carrierQueued: + in: query + name: carrierQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the carrier + network. Only available for OUTBOUND messages from accounts with the + Advanced Quality Metrics feature enabled. + example: true + schema: + type: boolean + fromCarrierLatency: + in: query + name: fromCarrierLatency + required: false + description: >- + The minimum carrier latency of the message in seconds. Only available + for OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + example: 50 + schema: + type: integer + callingNumberCountryA3: + in: query + name: callingNumberCountryA3 + required: false + description: Calling number country in A3 format. + example: USA + schema: + type: string + calledNumberCountryA3: + in: query + name: calledNumberCountryA3 + required: false + description: Called number country in A3 format. + example: USA + schema: + type: string + fromSegmentCount: + in: query + name: fromSegmentCount + required: false + description: Segment count (start range). + example: 1 + schema: + type: integer + toSegmentCount: + in: query + name: toSegmentCount + required: false + description: Segment count (end range). + example: 3 + schema: + type: integer + fromMessageSize: + in: query + name: fromMessageSize + required: false + description: Message size (start range). + example: 100 + schema: + type: integer + toMessageSize: + in: query + name: toMessageSize + required: false + description: Message size (end range). + example: 120 + schema: + type: integer sort: in: query name: sort diff --git a/docs/BusinessEntityTypeEnum.md b/docs/BusinessEntityTypeEnum.md new file mode 100644 index 00000000..11b4414c --- /dev/null +++ b/docs/BusinessEntityTypeEnum.md @@ -0,0 +1,19 @@ + + +# BusinessEntityTypeEnum + +## Enum + + +* `SOLE_PROPRIETOR` (value: `"SOLE_PROPRIETOR"`) + +* `PRIVATE_PROFIT` (value: `"PRIVATE_PROFIT"`) + +* `PUBLIC_PROFIT` (value: `"PUBLIC_PROFIT"`) + +* `NON_PROFIT` (value: `"NON_PROFIT"`) + +* `GOVERNMENT` (value: `"GOVERNMENT"`) + + + diff --git a/docs/BusinessRegistrationTypeEnum.md b/docs/BusinessRegistrationTypeEnum.md new file mode 100644 index 00000000..d3455e5b --- /dev/null +++ b/docs/BusinessRegistrationTypeEnum.md @@ -0,0 +1,13 @@ + + +# BusinessRegistrationTypeEnum + +## Enum + + +* `EIN` (value: `"EIN"`) + +* `CBN` (value: `"CBN"`) + + + diff --git a/docs/ListMessageItem.md b/docs/ListMessageItem.md index 96b870fe..0d0b006b 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -24,6 +24,12 @@ |**recipientCount** | **Integer** | The number of recipients the message has. | [optional] | |**campaignClass** | **String** | The campaign class of the message if it has one. | [optional] | |**campaignId** | **String** | The campaign ID of the message if it has one. | [optional] | +|**bwLatency** | **Integer** | The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] | +|**carrierLatency** | **Integer** | The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +|**callingNumberCountryA3** | **String** | The A3 country code of the calling number. | [optional] | +|**calledNumberCountryA3** | **String** | The A3 country code of the called number. | [optional] | +|**product** | **String** | The messaging product associated with the message. | [optional] | +|**location** | **String** | The location ID associated with this message. | [optional] | diff --git a/docs/MessageTypeEnum.md b/docs/MessageTypeEnum.md index 50a0a4ca..a45b679f 100644 --- a/docs/MessageTypeEnum.md +++ b/docs/MessageTypeEnum.md @@ -9,5 +9,7 @@ * `MMS` (value: `"mms"`) +* `RCS` (value: `"rcs"`) + diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 1eb88215..84135448 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -89,7 +89,7 @@ public class Example { # **listMessages** -> MessagesList listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount) +> MessagesList listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount) List Messages @@ -128,12 +128,24 @@ public class Example { String fromDateTime = "2022-09-14T18:20:16.000Z"; // String | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. String toDateTime = "2022-09-14T18:20:16.000Z"; // String | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. String campaignId = "CJEUMDK"; // String | The campaign ID of the message. + Integer fromBwLatency = 5; // Integer | The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + Boolean bwQueued = true; // Boolean | A boolean value indicating whether the message is queued in the Bandwidth network. + ProductTypeEnum product = ProductTypeEnum.fromValue("LOCAL_A2P"); // ProductTypeEnum | Messaging product associated with the message. + String location = "123ABC"; // String | Location Id associated with the message. + Boolean carrierQueued = true; // Boolean | A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + Integer fromCarrierLatency = 50; // Integer | The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + String callingNumberCountryA3 = "USA"; // String | Calling number country in A3 format. + String calledNumberCountryA3 = "USA"; // String | Called number country in A3 format. + Integer fromSegmentCount = 1; // Integer | Segment count (start range). + Integer toSegmentCount = 3; // Integer | Segment count (end range). + Integer fromMessageSize = 100; // Integer | Message size (start range). + Integer toMessageSize = 120; // Integer | Message size (end range). String sort = "sourceTn:desc"; // String | The field and direction to sort by combined with a colon. Direction is either asc or desc. String pageToken = "gdEewhcJLQRB5"; // String | A base64 encoded value used for pagination of results. Integer limit = 50; // Integer | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. Boolean limitTotalCount = true; // Boolean | When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. try { - MessagesList result = apiInstance.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount); + MessagesList result = apiInstance.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MessagesApi#listMessages"); @@ -157,11 +169,23 @@ public class Example { | **messageStatus** | [**MessageStatusEnum**](.md)| The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. | [optional] [enum: RECEIVED, QUEUED, SENDING, SENT, FAILED, DELIVERED, ACCEPTED, UNDELIVERED] | | **messageDirection** | [**ListMessageDirectionEnum**](.md)| The direction of the message. One of INBOUND OUTBOUND. | [optional] [enum: INBOUND, OUTBOUND] | | **carrierName** | **String**| The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). | [optional] | -| **messageType** | [**MessageTypeEnum**](.md)| The type of message. Either sms or mms. | [optional] [enum: sms, mms] | +| **messageType** | [**MessageTypeEnum**](.md)| The type of message. Either sms or mms. | [optional] [enum: sms, mms, rcs] | | **errorCode** | **Integer**| The error code of the message. | [optional] | | **fromDateTime** | **String**| The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | | **toDateTime** | **String**| The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | | **campaignId** | **String**| The campaign ID of the message. | [optional] | +| **fromBwLatency** | **Integer**| The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **bwQueued** | **Boolean**| A boolean value indicating whether the message is queued in the Bandwidth network. | [optional] | +| **product** | [**ProductTypeEnum**](.md)| Messaging product associated with the message. | [optional] [enum: LOCAL_A2P, P2P, SHORT_CODE_REACH, TOLL_FREE, HOSTED_SHORT_CODE, ALPHA_NUMERIC, RBM_MEDIA, RBM_RICH, RBM_CONVERSATIONAL] | +| **location** | **String**| Location Id associated with the message. | [optional] | +| **carrierQueued** | **Boolean**| A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **fromCarrierLatency** | **Integer**| The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **callingNumberCountryA3** | **String**| Calling number country in A3 format. | [optional] | +| **calledNumberCountryA3** | **String**| Called number country in A3 format. | [optional] | +| **fromSegmentCount** | **Integer**| Segment count (start range). | [optional] | +| **toSegmentCount** | **Integer**| Segment count (end range). | [optional] | +| **fromMessageSize** | **Integer**| Message size (start range). | [optional] | +| **toMessageSize** | **Integer**| Message size (end range). | [optional] | | **sort** | **String**| The field and direction to sort by combined with a colon. Direction is either asc or desc. | [optional] | | **pageToken** | **String**| A base64 encoded value used for pagination of results. | [optional] | | **limit** | **Integer**| The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. | [optional] | diff --git a/docs/OptInWorkflow.md b/docs/OptInWorkflow.md index 367b938b..8a0606bb 100644 --- a/docs/OptInWorkflow.md +++ b/docs/OptInWorkflow.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**description** | **String** | | | |**imageUrls** | **List<String>** | | | +|**confirmationResponse** | **String** | | [optional] | diff --git a/docs/ProductTypeEnum.md b/docs/ProductTypeEnum.md new file mode 100644 index 00000000..a04afbcb --- /dev/null +++ b/docs/ProductTypeEnum.md @@ -0,0 +1,27 @@ + + +# ProductTypeEnum + +## Enum + + +* `LOCAL_A2_P` (value: `"LOCAL_A2P"`) + +* `P2_P` (value: `"P2P"`) + +* `SHORT_CODE_REACH` (value: `"SHORT_CODE_REACH"`) + +* `TOLL_FREE` (value: `"TOLL_FREE"`) + +* `HOSTED_SHORT_CODE` (value: `"HOSTED_SHORT_CODE"`) + +* `ALPHA_NUMERIC` (value: `"ALPHA_NUMERIC"`) + +* `RBM_MEDIA` (value: `"RBM_MEDIA"`) + +* `RBM_RICH` (value: `"RBM_RICH"`) + +* `RBM_CONVERSATIONAL` (value: `"RBM_CONVERSATIONAL"`) + + + diff --git a/docs/TfvSubmissionInfo.md b/docs/TfvSubmissionInfo.md index ad829544..9e0acc6d 100644 --- a/docs/TfvSubmissionInfo.md +++ b/docs/TfvSubmissionInfo.md @@ -19,6 +19,9 @@ |**privacyPolicyUrl** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] | |**termsAndConditionsUrl** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] | |**businessDba** | **String** | The company 'Doing Business As'. | [optional] | +|**businessRegistrationNumber** | **String** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] | +|**businessRegistrationType** | **BusinessRegistrationTypeEnum** | | [optional] | +|**businessEntityType** | **BusinessEntityTypeEnum** | | [optional] | diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index b63e9780..d1d9b545 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -20,6 +20,11 @@ |**privacyPolicyUrl** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] | |**termsAndConditionsUrl** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] | |**businessDba** | **String** | The company 'Doing Business As'. | [optional] | +|**businessRegistrationNumber** | **String** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] | +|**businessRegistrationType** | **BusinessRegistrationTypeEnum** | | [optional] | +|**businessEntityType** | **BusinessEntityTypeEnum** | | [optional] | +|**helpMessageResponse** | **String** | A message that gets sent to users requesting help. | [optional] | +|**ageGatedContent** | **Boolean** | Indicates whether the content is age-gated. | [optional] | diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index ecfa5b72..d27ff3cc 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -19,6 +19,11 @@ |**privacyPolicyUrl** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] | |**termsAndConditionsUrl** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] | |**businessDba** | **String** | The company 'Doing Business As'. | [optional] | +|**businessRegistrationNumber** | **String** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] | +|**businessRegistrationType** | **BusinessRegistrationTypeEnum** | | [optional] | +|**businessEntityType** | **BusinessEntityTypeEnum** | | [optional] | +|**helpMessageResponse** | **String** | A message that gets sent to users requesting help. | [optional] | +|**ageGatedContent** | **Boolean** | Indicates whether the content is age-gated. | [optional] | diff --git a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java index 3757c77d..c20261ed 100644 --- a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java @@ -35,6 +35,7 @@ import com.bandwidth.sdk.model.MessageTypeEnum; import com.bandwidth.sdk.model.MessagesList; import com.bandwidth.sdk.model.MessagingRequestError; +import com.bandwidth.sdk.model.ProductTypeEnum; import java.lang.reflect.Type; import java.util.ArrayList; @@ -266,6 +267,18 @@ public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageR * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param campaignId The campaign ID of the message. (optional) + * @param fromBwLatency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bwQueued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param product Messaging product associated with the message. (optional) + * @param location Location Id associated with the message. (optional) + * @param carrierQueued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param fromCarrierLatency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param callingNumberCountryA3 Calling number country in A3 format. (optional) + * @param calledNumberCountryA3 Called number country in A3 format. (optional) + * @param fromSegmentCount Segment count (start range). (optional) + * @param toSegmentCount Segment count (end range). (optional) + * @param fromMessageSize Message size (start range). (optional) + * @param toMessageSize Message size (end range). (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) @@ -287,7 +300,7 @@ public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageR 500 Internal Server Error - */ - public okhttp3.Call listMessagesCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -357,6 +370,54 @@ public okhttp3.Call listMessagesCall(String accountId, String messageId, String localVarQueryParams.addAll(localVarApiClient.parameterToPair("campaignId", campaignId)); } + if (fromBwLatency != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromBwLatency", fromBwLatency)); + } + + if (bwQueued != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("bwQueued", bwQueued)); + } + + if (product != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("product", product)); + } + + if (location != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("location", location)); + } + + if (carrierQueued != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("carrierQueued", carrierQueued)); + } + + if (fromCarrierLatency != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromCarrierLatency", fromCarrierLatency)); + } + + if (callingNumberCountryA3 != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("callingNumberCountryA3", callingNumberCountryA3)); + } + + if (calledNumberCountryA3 != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("calledNumberCountryA3", calledNumberCountryA3)); + } + + if (fromSegmentCount != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromSegmentCount", fromSegmentCount)); + } + + if (toSegmentCount != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("toSegmentCount", toSegmentCount)); + } + + if (fromMessageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromMessageSize", fromMessageSize)); + } + + if (toMessageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("toMessageSize", toMessageSize)); + } + if (sort != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); } @@ -393,13 +454,13 @@ public okhttp3.Call listMessagesCall(String accountId, String messageId, String } @SuppressWarnings("rawtypes") - private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listMessages(Async)"); } - return listMessagesCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount, _callback); + return listMessagesCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount, _callback); } @@ -418,6 +479,18 @@ private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String mes * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param campaignId The campaign ID of the message. (optional) + * @param fromBwLatency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bwQueued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param product Messaging product associated with the message. (optional) + * @param location Location Id associated with the message. (optional) + * @param carrierQueued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param fromCarrierLatency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param callingNumberCountryA3 Calling number country in A3 format. (optional) + * @param calledNumberCountryA3 Called number country in A3 format. (optional) + * @param fromSegmentCount Segment count (start range). (optional) + * @param toSegmentCount Segment count (end range). (optional) + * @param fromMessageSize Message size (start range). (optional) + * @param toMessageSize Message size (end range). (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) @@ -438,8 +511,8 @@ private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String mes 500 Internal Server Error - */ - public MessagesList listMessages(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { - ApiResponse localVarResp = listMessagesWithHttpInfo(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount); + public MessagesList listMessages(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { + ApiResponse localVarResp = listMessagesWithHttpInfo(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount); return localVarResp.getData(); } @@ -458,6 +531,18 @@ public MessagesList listMessages(String accountId, String messageId, String sour * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param campaignId The campaign ID of the message. (optional) + * @param fromBwLatency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bwQueued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param product Messaging product associated with the message. (optional) + * @param location Location Id associated with the message. (optional) + * @param carrierQueued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param fromCarrierLatency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param callingNumberCountryA3 Calling number country in A3 format. (optional) + * @param calledNumberCountryA3 Called number country in A3 format. (optional) + * @param fromSegmentCount Segment count (start range). (optional) + * @param toSegmentCount Segment count (end range). (optional) + * @param fromMessageSize Message size (start range). (optional) + * @param toMessageSize Message size (end range). (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) @@ -478,8 +563,8 @@ public MessagesList listMessages(String accountId, String messageId, String sour 500 Internal Server Error - */ - public ApiResponse listMessagesWithHttpInfo(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { - okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount, null); + public ApiResponse listMessagesWithHttpInfo(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { + okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -499,6 +584,18 @@ public ApiResponse listMessagesWithHttpInfo(String accountId, Stri * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param campaignId The campaign ID of the message. (optional) + * @param fromBwLatency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bwQueued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param product Messaging product associated with the message. (optional) + * @param location Location Id associated with the message. (optional) + * @param carrierQueued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param fromCarrierLatency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param callingNumberCountryA3 Calling number country in A3 format. (optional) + * @param calledNumberCountryA3 Called number country in A3 format. (optional) + * @param fromSegmentCount Segment count (start range). (optional) + * @param toSegmentCount Segment count (end range). (optional) + * @param fromMessageSize Message size (start range). (optional) + * @param toMessageSize Message size (end range). (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) @@ -520,9 +617,9 @@ public ApiResponse listMessagesWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call listMessagesAsync(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesAsync(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount, _callback); + okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java new file mode 100644 index 00000000..f1b6f178 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java @@ -0,0 +1,84 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.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.bandwidth.sdk.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * The type of registered business. If no option is applicable, please provide \"SOLE_PROPRIETOR\" as a value. Optional until early 2026; required if `businessRegistrationNumber` is provided. Available starting October 1st, 2025. + */ +@JsonAdapter(BusinessEntityTypeEnum.Adapter.class) +public enum BusinessEntityTypeEnum { + + SOLE_PROPRIETOR("SOLE_PROPRIETOR"), + + PRIVATE_PROFIT("PRIVATE_PROFIT"), + + PUBLIC_PROFIT("PUBLIC_PROFIT"), + + NON_PROFIT("NON_PROFIT"), + + GOVERNMENT("GOVERNMENT"); + + private String value; + + BusinessEntityTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BusinessEntityTypeEnum fromValue(String value) { + for (BusinessEntityTypeEnum b : BusinessEntityTypeEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BusinessEntityTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BusinessEntityTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BusinessEntityTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BusinessEntityTypeEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java new file mode 100644 index 00000000..fd5bb5d0 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java @@ -0,0 +1,78 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.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.bandwidth.sdk.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * The type of business registration number. Optional until early 2026; required if `businessRegistrationNumber` is provided. Available starting October 1st, 2025. + */ +@JsonAdapter(BusinessRegistrationTypeEnum.Adapter.class) +public enum BusinessRegistrationTypeEnum { + + EIN("EIN"), + + CBN("CBN"); + + private String value; + + BusinessRegistrationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BusinessRegistrationTypeEnum fromValue(String value) { + for (BusinessRegistrationTypeEnum b : BusinessRegistrationTypeEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BusinessRegistrationTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BusinessRegistrationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BusinessRegistrationTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BusinessRegistrationTypeEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java index 611e2633..d2356f36 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -140,6 +140,36 @@ public class ListMessageItem { @javax.annotation.Nullable private String campaignId; + public static final String SERIALIZED_NAME_BW_LATENCY = "bwLatency"; + @SerializedName(SERIALIZED_NAME_BW_LATENCY) + @javax.annotation.Nullable + private Integer bwLatency; + + public static final String SERIALIZED_NAME_CARRIER_LATENCY = "carrierLatency"; + @SerializedName(SERIALIZED_NAME_CARRIER_LATENCY) + @javax.annotation.Nullable + private Integer carrierLatency; + + public static final String SERIALIZED_NAME_CALLING_NUMBER_COUNTRY_A3 = "callingNumberCountryA3"; + @SerializedName(SERIALIZED_NAME_CALLING_NUMBER_COUNTRY_A3) + @javax.annotation.Nullable + private String callingNumberCountryA3; + + public static final String SERIALIZED_NAME_CALLED_NUMBER_COUNTRY_A3 = "calledNumberCountryA3"; + @SerializedName(SERIALIZED_NAME_CALLED_NUMBER_COUNTRY_A3) + @javax.annotation.Nullable + private String calledNumberCountryA3; + + public static final String SERIALIZED_NAME_PRODUCT = "product"; + @SerializedName(SERIALIZED_NAME_PRODUCT) + @javax.annotation.Nullable + private String product; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private String location; + public ListMessageItem() { } @@ -465,6 +495,120 @@ public void setCampaignId(@javax.annotation.Nullable String campaignId) { this.campaignId = campaignId; } + + public ListMessageItem bwLatency(@javax.annotation.Nullable Integer bwLatency) { + this.bwLatency = bwLatency; + return this; + } + + /** + * The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + * @return bwLatency + */ + @javax.annotation.Nullable + public Integer getBwLatency() { + return bwLatency; + } + + public void setBwLatency(@javax.annotation.Nullable Integer bwLatency) { + this.bwLatency = bwLatency; + } + + + public ListMessageItem carrierLatency(@javax.annotation.Nullable Integer carrierLatency) { + this.carrierLatency = carrierLatency; + return this; + } + + /** + * The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + * @return carrierLatency + */ + @javax.annotation.Nullable + public Integer getCarrierLatency() { + return carrierLatency; + } + + public void setCarrierLatency(@javax.annotation.Nullable Integer carrierLatency) { + this.carrierLatency = carrierLatency; + } + + + public ListMessageItem callingNumberCountryA3(@javax.annotation.Nullable String callingNumberCountryA3) { + this.callingNumberCountryA3 = callingNumberCountryA3; + return this; + } + + /** + * The A3 country code of the calling number. + * @return callingNumberCountryA3 + */ + @javax.annotation.Nullable + public String getCallingNumberCountryA3() { + return callingNumberCountryA3; + } + + public void setCallingNumberCountryA3(@javax.annotation.Nullable String callingNumberCountryA3) { + this.callingNumberCountryA3 = callingNumberCountryA3; + } + + + public ListMessageItem calledNumberCountryA3(@javax.annotation.Nullable String calledNumberCountryA3) { + this.calledNumberCountryA3 = calledNumberCountryA3; + return this; + } + + /** + * The A3 country code of the called number. + * @return calledNumberCountryA3 + */ + @javax.annotation.Nullable + public String getCalledNumberCountryA3() { + return calledNumberCountryA3; + } + + public void setCalledNumberCountryA3(@javax.annotation.Nullable String calledNumberCountryA3) { + this.calledNumberCountryA3 = calledNumberCountryA3; + } + + + public ListMessageItem product(@javax.annotation.Nullable String product) { + this.product = product; + return this; + } + + /** + * The messaging product associated with the message. + * @return product + */ + @javax.annotation.Nullable + public String getProduct() { + return product; + } + + public void setProduct(@javax.annotation.Nullable String product) { + this.product = product; + } + + + public ListMessageItem location(@javax.annotation.Nullable String location) { + this.location = location; + return this; + } + + /** + * The location ID associated with this message. + * @return location + */ + @javax.annotation.Nullable + public String getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable String location) { + this.location = location; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -536,7 +680,13 @@ public boolean equals(Object o) { Objects.equals(this.attachmentCount, listMessageItem.attachmentCount) && Objects.equals(this.recipientCount, listMessageItem.recipientCount) && Objects.equals(this.campaignClass, listMessageItem.campaignClass) && - Objects.equals(this.campaignId, listMessageItem.campaignId)&& + Objects.equals(this.campaignId, listMessageItem.campaignId) && + Objects.equals(this.bwLatency, listMessageItem.bwLatency) && + Objects.equals(this.carrierLatency, listMessageItem.carrierLatency) && + Objects.equals(this.callingNumberCountryA3, listMessageItem.callingNumberCountryA3) && + Objects.equals(this.calledNumberCountryA3, listMessageItem.calledNumberCountryA3) && + Objects.equals(this.product, listMessageItem.product) && + Objects.equals(this.location, listMessageItem.location)&& Objects.equals(this.additionalProperties, listMessageItem.additionalProperties); } @@ -546,7 +696,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(messageId, accountId, sourceTn, destinationTn, messageStatus, messageDirection, messageType, segmentCount, errorCode, receiveTime, carrierName, messageSize, messageLength, attachmentCount, recipientCount, campaignClass, campaignId, additionalProperties); + return Objects.hash(messageId, accountId, sourceTn, destinationTn, messageStatus, messageDirection, messageType, segmentCount, errorCode, receiveTime, carrierName, messageSize, messageLength, attachmentCount, recipientCount, campaignClass, campaignId, bwLatency, carrierLatency, callingNumberCountryA3, calledNumberCountryA3, product, location, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -577,6 +727,12 @@ public String toString() { sb.append(" recipientCount: ").append(toIndentedString(recipientCount)).append("\n"); sb.append(" campaignClass: ").append(toIndentedString(campaignClass)).append("\n"); sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" bwLatency: ").append(toIndentedString(bwLatency)).append("\n"); + sb.append(" carrierLatency: ").append(toIndentedString(carrierLatency)).append("\n"); + sb.append(" callingNumberCountryA3: ").append(toIndentedString(callingNumberCountryA3)).append("\n"); + sb.append(" calledNumberCountryA3: ").append(toIndentedString(calledNumberCountryA3)).append("\n"); + sb.append(" product: ").append(toIndentedString(product)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -617,6 +773,12 @@ private String toIndentedString(Object o) { openapiFields.add("recipientCount"); openapiFields.add("campaignClass"); openapiFields.add("campaignId"); + openapiFields.add("bwLatency"); + openapiFields.add("carrierLatency"); + openapiFields.add("callingNumberCountryA3"); + openapiFields.add("calledNumberCountryA3"); + openapiFields.add("product"); + openapiFields.add("location"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -668,6 +830,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("campaignId") != null && !jsonObj.get("campaignId").isJsonNull()) && !jsonObj.get("campaignId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); } + if ((jsonObj.get("callingNumberCountryA3") != null && !jsonObj.get("callingNumberCountryA3").isJsonNull()) && !jsonObj.get("callingNumberCountryA3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); + } + if ((jsonObj.get("calledNumberCountryA3") != null && !jsonObj.get("calledNumberCountryA3").isJsonNull()) && !jsonObj.get("calledNumberCountryA3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); + } + if ((jsonObj.get("product") != null && !jsonObj.get("product").isJsonNull()) && !jsonObj.get("product").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); + } + if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java index e12241ca..ba7ade9b 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java @@ -31,7 +31,9 @@ public enum MessageTypeEnum { SMS("sms"), - MMS("mms"); + MMS("mms"), + + RCS("rcs"); private String value; diff --git a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java index 42812f95..698c2093 100644 --- a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java +++ b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -62,6 +63,11 @@ public class OptInWorkflow { @javax.annotation.Nonnull private List imageUrls = new ArrayList<>(); + public static final String SERIALIZED_NAME_CONFIRMATION_RESPONSE = "confirmationResponse"; + @SerializedName(SERIALIZED_NAME_CONFIRMATION_RESPONSE) + @javax.annotation.Nullable + private String confirmationResponse; + public OptInWorkflow() { } @@ -110,6 +116,25 @@ public void setImageUrls(@javax.annotation.Nonnull List imageUrls) { this.imageUrls = imageUrls; } + + public OptInWorkflow confirmationResponse(@javax.annotation.Nullable String confirmationResponse) { + this.confirmationResponse = confirmationResponse; + return this; + } + + /** + * Get confirmationResponse + * @return confirmationResponse + */ + @javax.annotation.Nullable + public String getConfirmationResponse() { + return confirmationResponse; + } + + public void setConfirmationResponse(@javax.annotation.Nullable String confirmationResponse) { + this.confirmationResponse = confirmationResponse; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -166,13 +191,25 @@ public boolean equals(Object o) { } OptInWorkflow optInWorkflow = (OptInWorkflow) o; return Objects.equals(this.description, optInWorkflow.description) && - Objects.equals(this.imageUrls, optInWorkflow.imageUrls)&& + Objects.equals(this.imageUrls, optInWorkflow.imageUrls) && + Objects.equals(this.confirmationResponse, optInWorkflow.confirmationResponse)&& Objects.equals(this.additionalProperties, optInWorkflow.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { - return Objects.hash(description, imageUrls, additionalProperties); + return Objects.hash(description, imageUrls, confirmationResponse, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -181,6 +218,7 @@ public String toString() { sb.append("class OptInWorkflow {\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" imageUrls: ").append(toIndentedString(imageUrls)).append("\n"); + sb.append(" confirmationResponse: ").append(toIndentedString(confirmationResponse)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -206,6 +244,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("description"); openapiFields.add("imageUrls"); + openapiFields.add("confirmationResponse"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -242,6 +281,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } else if (!jsonObj.get("imageUrls").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `imageUrls` to be an array in the JSON string but got `%s`", jsonObj.get("imageUrls").toString())); } + if ((jsonObj.get("confirmationResponse") != null && !jsonObj.get("confirmationResponse").isJsonNull()) && !jsonObj.get("confirmationResponse").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java new file mode 100644 index 00000000..5c83c023 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java @@ -0,0 +1,92 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.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.bandwidth.sdk.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * The type of product associated with the message. + */ +@JsonAdapter(ProductTypeEnum.Adapter.class) +public enum ProductTypeEnum { + + LOCAL_A2_P("LOCAL_A2P"), + + P2_P("P2P"), + + SHORT_CODE_REACH("SHORT_CODE_REACH"), + + TOLL_FREE("TOLL_FREE"), + + HOSTED_SHORT_CODE("HOSTED_SHORT_CODE"), + + ALPHA_NUMERIC("ALPHA_NUMERIC"), + + RBM_MEDIA("RBM_MEDIA"), + + RBM_RICH("RBM_RICH"), + + RBM_CONVERSATIONAL("RBM_CONVERSATIONAL"); + + private String value; + + ProductTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProductTypeEnum fromValue(String value) { + for (ProductTypeEnum b : ProductTypeEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ProductTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProductTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ProductTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProductTypeEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java index fa273092..a5715be1 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java @@ -15,6 +15,8 @@ import java.util.Objects; import com.bandwidth.sdk.model.Address; +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; import com.bandwidth.sdk.model.Contact; import com.bandwidth.sdk.model.OptInWorkflow; import com.google.gson.TypeAdapter; @@ -114,6 +116,21 @@ public class TfvSubmissionInfo { @javax.annotation.Nullable private String businessDba; + public static final String SERIALIZED_NAME_BUSINESS_REGISTRATION_NUMBER = "businessRegistrationNumber"; + @SerializedName(SERIALIZED_NAME_BUSINESS_REGISTRATION_NUMBER) + @javax.annotation.Nullable + private String businessRegistrationNumber; + + public static final String SERIALIZED_NAME_BUSINESS_REGISTRATION_TYPE = "businessRegistrationType"; + @SerializedName(SERIALIZED_NAME_BUSINESS_REGISTRATION_TYPE) + @javax.annotation.Nullable + private BusinessRegistrationTypeEnum businessRegistrationType; + + public static final String SERIALIZED_NAME_BUSINESS_ENTITY_TYPE = "businessEntityType"; + @SerializedName(SERIALIZED_NAME_BUSINESS_ENTITY_TYPE) + @javax.annotation.Nullable + private BusinessEntityTypeEnum businessEntityType; + public TfvSubmissionInfo() { } @@ -346,6 +363,63 @@ public void setBusinessDba(@javax.annotation.Nullable String businessDba) { this.businessDba = businessDba; } + + public TfvSubmissionInfo businessRegistrationNumber(@javax.annotation.Nullable String businessRegistrationNumber) { + this.businessRegistrationNumber = businessRegistrationNumber; + return this; + } + + /** + * US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. + * @return businessRegistrationNumber + */ + @javax.annotation.Nullable + public String getBusinessRegistrationNumber() { + return businessRegistrationNumber; + } + + public void setBusinessRegistrationNumber(@javax.annotation.Nullable String businessRegistrationNumber) { + this.businessRegistrationNumber = businessRegistrationNumber; + } + + + public TfvSubmissionInfo businessRegistrationType(@javax.annotation.Nullable BusinessRegistrationTypeEnum businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + return this; + } + + /** + * Get businessRegistrationType + * @return businessRegistrationType + */ + @javax.annotation.Nullable + public BusinessRegistrationTypeEnum getBusinessRegistrationType() { + return businessRegistrationType; + } + + public void setBusinessRegistrationType(@javax.annotation.Nullable BusinessRegistrationTypeEnum businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + } + + + public TfvSubmissionInfo businessEntityType(@javax.annotation.Nullable BusinessEntityTypeEnum businessEntityType) { + this.businessEntityType = businessEntityType; + return this; + } + + /** + * Get businessEntityType + * @return businessEntityType + */ + @javax.annotation.Nullable + public BusinessEntityTypeEnum getBusinessEntityType() { + return businessEntityType; + } + + public void setBusinessEntityType(@javax.annotation.Nullable BusinessEntityTypeEnum businessEntityType) { + this.businessEntityType = businessEntityType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -412,7 +486,10 @@ public boolean equals(Object o) { Objects.equals(this.isvReseller, tfvSubmissionInfo.isvReseller) && Objects.equals(this.privacyPolicyUrl, tfvSubmissionInfo.privacyPolicyUrl) && Objects.equals(this.termsAndConditionsUrl, tfvSubmissionInfo.termsAndConditionsUrl) && - Objects.equals(this.businessDba, tfvSubmissionInfo.businessDba)&& + Objects.equals(this.businessDba, tfvSubmissionInfo.businessDba) && + Objects.equals(this.businessRegistrationNumber, tfvSubmissionInfo.businessRegistrationNumber) && + Objects.equals(this.businessRegistrationType, tfvSubmissionInfo.businessRegistrationType) && + Objects.equals(this.businessEntityType, tfvSubmissionInfo.businessEntityType)&& Objects.equals(this.additionalProperties, tfvSubmissionInfo.additionalProperties); } @@ -422,7 +499,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, additionalProperties); + return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, businessRegistrationNumber, businessRegistrationType, businessEntityType, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -448,6 +525,9 @@ public String toString() { sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); sb.append(" termsAndConditionsUrl: ").append(toIndentedString(termsAndConditionsUrl)).append("\n"); sb.append(" businessDba: ").append(toIndentedString(businessDba)).append("\n"); + sb.append(" businessRegistrationNumber: ").append(toIndentedString(businessRegistrationNumber)).append("\n"); + sb.append(" businessRegistrationType: ").append(toIndentedString(businessRegistrationType)).append("\n"); + sb.append(" businessEntityType: ").append(toIndentedString(businessEntityType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -483,6 +563,9 @@ private String toIndentedString(Object o) { openapiFields.add("privacyPolicyUrl"); openapiFields.add("termsAndConditionsUrl"); openapiFields.add("businessDba"); + openapiFields.add("businessRegistrationNumber"); + openapiFields.add("businessRegistrationType"); + openapiFields.add("businessEntityType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -537,6 +620,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } + if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + } + // validate the optional field `businessRegistrationType` + if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { + BusinessRegistrationTypeEnum.validateJsonElement(jsonObj.get("businessRegistrationType")); + } + // validate the optional field `businessEntityType` + if (jsonObj.get("businessEntityType") != null && !jsonObj.get("businessEntityType").isJsonNull()) { + BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java index 677a08a0..270670c9 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java @@ -15,6 +15,8 @@ import java.util.Objects; import com.bandwidth.sdk.model.Address; +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; import com.bandwidth.sdk.model.Contact; import com.bandwidth.sdk.model.OptInWorkflow; import com.google.gson.TypeAdapter; @@ -121,6 +123,31 @@ public class VerificationRequest { @javax.annotation.Nullable private String businessDba; + public static final String SERIALIZED_NAME_BUSINESS_REGISTRATION_NUMBER = "businessRegistrationNumber"; + @SerializedName(SERIALIZED_NAME_BUSINESS_REGISTRATION_NUMBER) + @javax.annotation.Nullable + private String businessRegistrationNumber; + + public static final String SERIALIZED_NAME_BUSINESS_REGISTRATION_TYPE = "businessRegistrationType"; + @SerializedName(SERIALIZED_NAME_BUSINESS_REGISTRATION_TYPE) + @javax.annotation.Nullable + private BusinessRegistrationTypeEnum businessRegistrationType; + + public static final String SERIALIZED_NAME_BUSINESS_ENTITY_TYPE = "businessEntityType"; + @SerializedName(SERIALIZED_NAME_BUSINESS_ENTITY_TYPE) + @javax.annotation.Nullable + private BusinessEntityTypeEnum businessEntityType; + + public static final String SERIALIZED_NAME_HELP_MESSAGE_RESPONSE = "helpMessageResponse"; + @SerializedName(SERIALIZED_NAME_HELP_MESSAGE_RESPONSE) + @javax.annotation.Nullable + private String helpMessageResponse; + + public static final String SERIALIZED_NAME_AGE_GATED_CONTENT = "ageGatedContent"; + @SerializedName(SERIALIZED_NAME_AGE_GATED_CONTENT) + @javax.annotation.Nullable + private Boolean ageGatedContent; + public VerificationRequest() { } @@ -380,6 +407,101 @@ public void setBusinessDba(@javax.annotation.Nullable String businessDba) { this.businessDba = businessDba; } + + public VerificationRequest businessRegistrationNumber(@javax.annotation.Nullable String businessRegistrationNumber) { + this.businessRegistrationNumber = businessRegistrationNumber; + return this; + } + + /** + * US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. + * @return businessRegistrationNumber + */ + @javax.annotation.Nullable + public String getBusinessRegistrationNumber() { + return businessRegistrationNumber; + } + + public void setBusinessRegistrationNumber(@javax.annotation.Nullable String businessRegistrationNumber) { + this.businessRegistrationNumber = businessRegistrationNumber; + } + + + public VerificationRequest businessRegistrationType(@javax.annotation.Nullable BusinessRegistrationTypeEnum businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + return this; + } + + /** + * Get businessRegistrationType + * @return businessRegistrationType + */ + @javax.annotation.Nullable + public BusinessRegistrationTypeEnum getBusinessRegistrationType() { + return businessRegistrationType; + } + + public void setBusinessRegistrationType(@javax.annotation.Nullable BusinessRegistrationTypeEnum businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + } + + + public VerificationRequest businessEntityType(@javax.annotation.Nullable BusinessEntityTypeEnum businessEntityType) { + this.businessEntityType = businessEntityType; + return this; + } + + /** + * Get businessEntityType + * @return businessEntityType + */ + @javax.annotation.Nullable + public BusinessEntityTypeEnum getBusinessEntityType() { + return businessEntityType; + } + + public void setBusinessEntityType(@javax.annotation.Nullable BusinessEntityTypeEnum businessEntityType) { + this.businessEntityType = businessEntityType; + } + + + public VerificationRequest helpMessageResponse(@javax.annotation.Nullable String helpMessageResponse) { + this.helpMessageResponse = helpMessageResponse; + return this; + } + + /** + * A message that gets sent to users requesting help. + * @return helpMessageResponse + */ + @javax.annotation.Nullable + public String getHelpMessageResponse() { + return helpMessageResponse; + } + + public void setHelpMessageResponse(@javax.annotation.Nullable String helpMessageResponse) { + this.helpMessageResponse = helpMessageResponse; + } + + + public VerificationRequest ageGatedContent(@javax.annotation.Nullable Boolean ageGatedContent) { + this.ageGatedContent = ageGatedContent; + return this; + } + + /** + * Indicates whether the content is age-gated. + * @return ageGatedContent + */ + @javax.annotation.Nullable + public Boolean getAgeGatedContent() { + return ageGatedContent; + } + + public void setAgeGatedContent(@javax.annotation.Nullable Boolean ageGatedContent) { + this.ageGatedContent = ageGatedContent; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -447,7 +569,12 @@ public boolean equals(Object o) { Objects.equals(this.isvReseller, verificationRequest.isvReseller) && Objects.equals(this.privacyPolicyUrl, verificationRequest.privacyPolicyUrl) && Objects.equals(this.termsAndConditionsUrl, verificationRequest.termsAndConditionsUrl) && - Objects.equals(this.businessDba, verificationRequest.businessDba)&& + Objects.equals(this.businessDba, verificationRequest.businessDba) && + Objects.equals(this.businessRegistrationNumber, verificationRequest.businessRegistrationNumber) && + Objects.equals(this.businessRegistrationType, verificationRequest.businessRegistrationType) && + Objects.equals(this.businessEntityType, verificationRequest.businessEntityType) && + Objects.equals(this.helpMessageResponse, verificationRequest.helpMessageResponse) && + Objects.equals(this.ageGatedContent, verificationRequest.ageGatedContent)&& Objects.equals(this.additionalProperties, verificationRequest.additionalProperties); } @@ -457,7 +584,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessAddress, businessContact, messageVolume, phoneNumbers, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, additionalProperties); + return Objects.hash(businessAddress, businessContact, messageVolume, phoneNumbers, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, businessRegistrationNumber, businessRegistrationType, businessEntityType, helpMessageResponse, ageGatedContent, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -484,6 +611,11 @@ public String toString() { sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); sb.append(" termsAndConditionsUrl: ").append(toIndentedString(termsAndConditionsUrl)).append("\n"); sb.append(" businessDba: ").append(toIndentedString(businessDba)).append("\n"); + sb.append(" businessRegistrationNumber: ").append(toIndentedString(businessRegistrationNumber)).append("\n"); + sb.append(" businessRegistrationType: ").append(toIndentedString(businessRegistrationType)).append("\n"); + sb.append(" businessEntityType: ").append(toIndentedString(businessEntityType)).append("\n"); + sb.append(" helpMessageResponse: ").append(toIndentedString(helpMessageResponse)).append("\n"); + sb.append(" ageGatedContent: ").append(toIndentedString(ageGatedContent)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -520,6 +652,11 @@ private String toIndentedString(Object o) { openapiFields.add("privacyPolicyUrl"); openapiFields.add("termsAndConditionsUrl"); openapiFields.add("businessDba"); + openapiFields.add("businessRegistrationNumber"); + openapiFields.add("businessRegistrationType"); + openapiFields.add("businessEntityType"); + openapiFields.add("helpMessageResponse"); + openapiFields.add("ageGatedContent"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -589,6 +726,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } + if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + } + // validate the optional field `businessRegistrationType` + if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { + BusinessRegistrationTypeEnum.validateJsonElement(jsonObj.get("businessRegistrationType")); + } + // validate the optional field `businessEntityType` + if (jsonObj.get("businessEntityType") != null && !jsonObj.get("businessEntityType").isJsonNull()) { + BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); + } + if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java index cbda323d..f68127b8 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java @@ -15,6 +15,8 @@ import java.util.Objects; import com.bandwidth.sdk.model.Address; +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; import com.bandwidth.sdk.model.Contact; import com.bandwidth.sdk.model.OptInWorkflow; import com.google.gson.TypeAdapter; @@ -114,6 +116,31 @@ public class VerificationUpdateRequest { @javax.annotation.Nullable private String businessDba; + public static final String SERIALIZED_NAME_BUSINESS_REGISTRATION_NUMBER = "businessRegistrationNumber"; + @SerializedName(SERIALIZED_NAME_BUSINESS_REGISTRATION_NUMBER) + @javax.annotation.Nullable + private String businessRegistrationNumber; + + public static final String SERIALIZED_NAME_BUSINESS_REGISTRATION_TYPE = "businessRegistrationType"; + @SerializedName(SERIALIZED_NAME_BUSINESS_REGISTRATION_TYPE) + @javax.annotation.Nullable + private BusinessRegistrationTypeEnum businessRegistrationType; + + public static final String SERIALIZED_NAME_BUSINESS_ENTITY_TYPE = "businessEntityType"; + @SerializedName(SERIALIZED_NAME_BUSINESS_ENTITY_TYPE) + @javax.annotation.Nullable + private BusinessEntityTypeEnum businessEntityType; + + public static final String SERIALIZED_NAME_HELP_MESSAGE_RESPONSE = "helpMessageResponse"; + @SerializedName(SERIALIZED_NAME_HELP_MESSAGE_RESPONSE) + @javax.annotation.Nullable + private String helpMessageResponse; + + public static final String SERIALIZED_NAME_AGE_GATED_CONTENT = "ageGatedContent"; + @SerializedName(SERIALIZED_NAME_AGE_GATED_CONTENT) + @javax.annotation.Nullable + private Boolean ageGatedContent; + public VerificationUpdateRequest() { } @@ -346,6 +373,101 @@ public void setBusinessDba(@javax.annotation.Nullable String businessDba) { this.businessDba = businessDba; } + + public VerificationUpdateRequest businessRegistrationNumber(@javax.annotation.Nullable String businessRegistrationNumber) { + this.businessRegistrationNumber = businessRegistrationNumber; + return this; + } + + /** + * US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. + * @return businessRegistrationNumber + */ + @javax.annotation.Nullable + public String getBusinessRegistrationNumber() { + return businessRegistrationNumber; + } + + public void setBusinessRegistrationNumber(@javax.annotation.Nullable String businessRegistrationNumber) { + this.businessRegistrationNumber = businessRegistrationNumber; + } + + + public VerificationUpdateRequest businessRegistrationType(@javax.annotation.Nullable BusinessRegistrationTypeEnum businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + return this; + } + + /** + * Get businessRegistrationType + * @return businessRegistrationType + */ + @javax.annotation.Nullable + public BusinessRegistrationTypeEnum getBusinessRegistrationType() { + return businessRegistrationType; + } + + public void setBusinessRegistrationType(@javax.annotation.Nullable BusinessRegistrationTypeEnum businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + } + + + public VerificationUpdateRequest businessEntityType(@javax.annotation.Nullable BusinessEntityTypeEnum businessEntityType) { + this.businessEntityType = businessEntityType; + return this; + } + + /** + * Get businessEntityType + * @return businessEntityType + */ + @javax.annotation.Nullable + public BusinessEntityTypeEnum getBusinessEntityType() { + return businessEntityType; + } + + public void setBusinessEntityType(@javax.annotation.Nullable BusinessEntityTypeEnum businessEntityType) { + this.businessEntityType = businessEntityType; + } + + + public VerificationUpdateRequest helpMessageResponse(@javax.annotation.Nullable String helpMessageResponse) { + this.helpMessageResponse = helpMessageResponse; + return this; + } + + /** + * A message that gets sent to users requesting help. + * @return helpMessageResponse + */ + @javax.annotation.Nullable + public String getHelpMessageResponse() { + return helpMessageResponse; + } + + public void setHelpMessageResponse(@javax.annotation.Nullable String helpMessageResponse) { + this.helpMessageResponse = helpMessageResponse; + } + + + public VerificationUpdateRequest ageGatedContent(@javax.annotation.Nullable Boolean ageGatedContent) { + this.ageGatedContent = ageGatedContent; + return this; + } + + /** + * Indicates whether the content is age-gated. + * @return ageGatedContent + */ + @javax.annotation.Nullable + public Boolean getAgeGatedContent() { + return ageGatedContent; + } + + public void setAgeGatedContent(@javax.annotation.Nullable Boolean ageGatedContent) { + this.ageGatedContent = ageGatedContent; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -412,7 +534,12 @@ public boolean equals(Object o) { Objects.equals(this.isvReseller, verificationUpdateRequest.isvReseller) && Objects.equals(this.privacyPolicyUrl, verificationUpdateRequest.privacyPolicyUrl) && Objects.equals(this.termsAndConditionsUrl, verificationUpdateRequest.termsAndConditionsUrl) && - Objects.equals(this.businessDba, verificationUpdateRequest.businessDba)&& + Objects.equals(this.businessDba, verificationUpdateRequest.businessDba) && + Objects.equals(this.businessRegistrationNumber, verificationUpdateRequest.businessRegistrationNumber) && + Objects.equals(this.businessRegistrationType, verificationUpdateRequest.businessRegistrationType) && + Objects.equals(this.businessEntityType, verificationUpdateRequest.businessEntityType) && + Objects.equals(this.helpMessageResponse, verificationUpdateRequest.helpMessageResponse) && + Objects.equals(this.ageGatedContent, verificationUpdateRequest.ageGatedContent)&& Objects.equals(this.additionalProperties, verificationUpdateRequest.additionalProperties); } @@ -422,7 +549,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, additionalProperties); + return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, businessRegistrationNumber, businessRegistrationType, businessEntityType, helpMessageResponse, ageGatedContent, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -448,6 +575,11 @@ public String toString() { sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); sb.append(" termsAndConditionsUrl: ").append(toIndentedString(termsAndConditionsUrl)).append("\n"); sb.append(" businessDba: ").append(toIndentedString(businessDba)).append("\n"); + sb.append(" businessRegistrationNumber: ").append(toIndentedString(businessRegistrationNumber)).append("\n"); + sb.append(" businessRegistrationType: ").append(toIndentedString(businessRegistrationType)).append("\n"); + sb.append(" businessEntityType: ").append(toIndentedString(businessEntityType)).append("\n"); + sb.append(" helpMessageResponse: ").append(toIndentedString(helpMessageResponse)).append("\n"); + sb.append(" ageGatedContent: ").append(toIndentedString(ageGatedContent)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -483,6 +615,11 @@ private String toIndentedString(Object o) { openapiFields.add("privacyPolicyUrl"); openapiFields.add("termsAndConditionsUrl"); openapiFields.add("businessDba"); + openapiFields.add("businessRegistrationNumber"); + openapiFields.add("businessRegistrationType"); + openapiFields.add("businessEntityType"); + openapiFields.add("helpMessageResponse"); + openapiFields.add("ageGatedContent"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -545,6 +682,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } + if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + } + // validate the optional field `businessRegistrationType` + if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { + BusinessRegistrationTypeEnum.validateJsonElement(jsonObj.get("businessRegistrationType")); + } + // validate the optional field `businessEntityType` + if (jsonObj.get("businessEntityType") != null && !jsonObj.get("businessEntityType").isJsonNull()) { + BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); + } + if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { From 9c0c71834f2d5c452d17f28886048d3c9c38aba6 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 2 Sep 2025 15:14:48 -0400 Subject: [PATCH 2/3] fix spec --- api/openapi.yaml | 32 ------------------- bandwidth.yml | 15 --------- .../com/bandwidth/sdk/api/MessagesApi.java | 1 - .../bandwidth/sdk/model/ListMessageItem.java | 12 ------- 4 files changed, 60 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 61dc735f..c68f2404 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -7949,7 +7949,6 @@ components: - sms - mms - rcs - - rcs example: sms type: string productTypeEnum: @@ -7966,20 +7965,6 @@ components: - RBM_CONVERSATIONAL example: P2P type: string - productTypeEnum: - description: The type of product associated with the message. - enum: - - LOCAL_A2P - - P2P - - SHORT_CODE_REACH - - TOLL_FREE - - HOSTED_SHORT_CODE - - ALPHA_NUMERIC - - RBM_MEDIA - - RBM_RICH - - RBM_CONVERSATIONAL - example: P2P - type: string fieldError: example: fieldName: from @@ -8004,9 +7989,6 @@ components: nextPageToken: GL83PD3C prevPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 messages: - - callingNumberCountryA3: USA - product: P2P - sourceTn: "+15554443333" - callingNumberCountryA3: USA product: P2P sourceTn: "+15554443333" @@ -8015,7 +7997,6 @@ components: messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 calledNumberCountryA3: USA - calledNumberCountryA3: USA destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED @@ -8028,14 +8009,9 @@ components: recipientCount: 1 campaignClass: T bwLatency: 20 - bwLatency: 20 attachmentCount: 1 location: 123ID - location: 123ID messageSize: 27 - - callingNumberCountryA3: USA - product: P2P - sourceTn: "+15554443333" - callingNumberCountryA3: USA product: P2P sourceTn: "+15554443333" @@ -8044,7 +8020,6 @@ components: messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 calledNumberCountryA3: USA - calledNumberCountryA3: USA destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED @@ -8057,10 +8032,8 @@ components: recipientCount: 1 campaignClass: T bwLatency: 20 - bwLatency: 20 attachmentCount: 1 location: 123ID - location: 123ID messageSize: 27 totalCount: 100 properties: @@ -8079,8 +8052,6 @@ components: type: object listMessageItem: example: - callingNumberCountryA3: USA - product: P2P callingNumberCountryA3: USA product: P2P sourceTn: "+15554443333" @@ -8089,7 +8060,6 @@ components: messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 calledNumberCountryA3: USA - calledNumberCountryA3: USA destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED @@ -8102,10 +8072,8 @@ components: recipientCount: 1 campaignClass: T bwLatency: 20 - bwLatency: 20 attachmentCount: 1 location: 123ID - location: 123ID messageSize: 27 properties: messageId: diff --git a/bandwidth.yml b/bandwidth.yml index 539d8589..004fb91b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -1729,7 +1729,6 @@ components: - sms - mms - rcs - - rcs example: sms productTypeEnum: type: string @@ -1745,20 +1744,6 @@ components: - RBM_RICH - RBM_CONVERSATIONAL example: P2P - productTypeEnum: - type: string - description: The type of product associated with the message. - enum: - - LOCAL_A2P - - P2P - - SHORT_CODE_REACH - - TOLL_FREE - - HOSTED_SHORT_CODE - - ALPHA_NUMERIC - - RBM_MEDIA - - RBM_RICH - - RBM_CONVERSATIONAL - example: P2P fieldError: type: object properties: diff --git a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java index 08c19305..c20261ed 100644 --- a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java @@ -36,7 +36,6 @@ import com.bandwidth.sdk.model.MessagesList; import com.bandwidth.sdk.model.MessagingRequestError; import com.bandwidth.sdk.model.ProductTypeEnum; -import com.bandwidth.sdk.model.ProductTypeEnum; import java.lang.reflect.Type; import java.util.ArrayList; diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java index dca0654b..d2356f36 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -842,18 +842,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } - if ((jsonObj.get("callingNumberCountryA3") != null && !jsonObj.get("callingNumberCountryA3").isJsonNull()) && !jsonObj.get("callingNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); - } - if ((jsonObj.get("calledNumberCountryA3") != null && !jsonObj.get("calledNumberCountryA3").isJsonNull()) && !jsonObj.get("calledNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); - } - if ((jsonObj.get("product") != null && !jsonObj.get("product").isJsonNull()) && !jsonObj.get("product").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); - } - if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { From a9b7398164723468a3d1642a2ce4353fa6625703 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 2 Sep 2025 15:32:00 -0400 Subject: [PATCH 3/3] tests --- .../bandwidth/sdk/smoke/MessagesApiTest.java | 21 ++++---- .../sdk/unit/api/MessagesApiTest.java | 3 +- .../unit/api/TollFreeVerificationApiTest.java | 12 ++++- .../models/BusinessEntityTypeEnumTest.java | 38 ++++++++++++++ .../BusinessRegistrationTypeEnumTest.java | 35 +++++++++++++ .../sdk/unit/models/OptInWorkflowTest.java | 11 ++++- .../unit/models/TfvSubmissionInfoTest.java | 30 +++++++++++- .../unit/models/VerificationRequestTest.java | 49 ++++++++++++++++++- .../models/VerificationUpdateRequestTest.java | 49 ++++++++++++++++++- 9 files changed, 232 insertions(+), 16 deletions(-) create mode 100644 src/test/java/com/bandwidth/sdk/unit/models/BusinessEntityTypeEnumTest.java create mode 100644 src/test/java/com/bandwidth/sdk/unit/models/BusinessRegistrationTypeEnumTest.java diff --git a/src/test/java/com/bandwidth/sdk/smoke/MessagesApiTest.java b/src/test/java/com/bandwidth/sdk/smoke/MessagesApiTest.java index de028772..6f00ed14 100644 --- a/src/test/java/com/bandwidth/sdk/smoke/MessagesApiTest.java +++ b/src/test/java/com/bandwidth/sdk/smoke/MessagesApiTest.java @@ -56,6 +56,8 @@ public class MessagesApiTest { Boolean bwQueued = null; ProductTypeEnum product = null; String location = null; + Boolean carrierQueued = null; + Integer fromCarrierLatency = null; String callingNumberCountryA3 = null; String calledNumberCountryA3 = null; Integer fromSegmentCount = null; @@ -84,9 +86,10 @@ public void listMessagesTest() throws ApiException { Basic.setUsername(BW_USERNAME); Basic.setPassword(BW_PASSWORD); MessagesList response = api.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, - messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, - bwQueued, product, location, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, - fromMessageSize, toMessageSize, sort, pageToken, limit, false); + messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, + fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, + calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, + sort, pageToken, limit, false); assertThat(response, instanceOf(MessagesList.class)); assertThat(response.getTotalCount(), greaterThan(0)); @@ -113,9 +116,9 @@ public void listMessageBadRequestTest() { ApiException exception = Assertions.assertThrows(ApiException.class, () -> api.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, - campaignId, fromBwLatency, bwQueued, product, location, callingNumberCountryA3, - calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, - toMessageSize, sort, pageToken, limit, false)); + campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, + fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, + toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, false)); assertThat(exception.getCode(), is(400)); } @@ -129,9 +132,9 @@ public void listMessageUnauthorizedTest() { ApiException exception = Assertions.assertThrows(ApiException.class, () -> api.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, - campaignId, fromBwLatency, bwQueued, product, location, callingNumberCountryA3, - calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, - toMessageSize, sort, pageToken, limit, false)); + campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, + fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, + toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, false)); assertThat(exception.getCode(), is(401)); } diff --git a/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java index b5884eba..36127bf8 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java @@ -83,7 +83,7 @@ public void testCreateMessage() throws ApiException { public void testListMessages() throws ApiException { ApiResponse response = api.listMessagesWithHttpInfo( BW_ACCOUNT_ID, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null, null, null, null, null, null); assertThat(response.getStatusCode(), is(200)); assertThat(response.getData(), instanceOf(MessagesList.class)); @@ -114,6 +114,7 @@ public void testListMessages() throws ApiException { assertThat(response.getData().getMessages().get(0).getCampaignClass(), instanceOf(String.class)); assertThat(response.getData().getMessages().get(0).getCampaignId(), instanceOf(String.class)); assertThat(response.getData().getMessages().get(0).getBwLatency(), instanceOf(Integer.class)); + assertThat(response.getData().getMessages().get(0).getCarrierLatency(), instanceOf(Integer.class)); assertThat(response.getData().getMessages().get(0).getCallingNumberCountryA3(), instanceOf(String.class)); assertThat(response.getData().getMessages().get(0).getCalledNumberCountryA3(), instanceOf(String.class)); assertThat(response.getData().getMessages().get(0).getProduct(), instanceOf(String.class)); diff --git a/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java index 7b406858..219f6d6a 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java @@ -23,6 +23,8 @@ import com.bandwidth.sdk.api.TollFreeVerificationApi; import com.bandwidth.sdk.auth.HttpBasicAuth; import com.bandwidth.sdk.model.Address; +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; import com.bandwidth.sdk.model.Contact; import com.bandwidth.sdk.model.LinksObject; import com.bandwidth.sdk.model.OptInWorkflow; @@ -186,12 +188,18 @@ public void requestTollFreeVerificationTest() throws ApiException { .productionMessageContent("productionMessageContent") .optInWorkflow(new OptInWorkflow() .description("description") - .imageUrls(List.of("https://example.com"))) + .imageUrls(List.of("https://example.com")) + .confirmationResponse("confirmationResponse")) .additionalInformation("additionalInformation") .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDba("businessDba"); + .businessDba("businessDba") + .businessRegistrationNumber("businessRegistrationNumber") + .businessRegistrationType(BusinessRegistrationTypeEnum.EIN) + .businessEntityType(BusinessEntityTypeEnum.PRIVATE_PROFIT) + .helpMessageResponse("helpMessageResponse") + .ageGatedContent(true); ApiResponse response = api.requestTollFreeVerificationWithHttpInfo(BW_ACCOUNT_ID, verificationRequest); diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BusinessEntityTypeEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BusinessEntityTypeEnumTest.java new file mode 100644 index 00000000..2c21b698 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/BusinessEntityTypeEnumTest.java @@ -0,0 +1,38 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.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.bandwidth.sdk.unit.models; + +import org.junit.jupiter.api.Test; + +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.MatcherAssert.assertThat; + +/** + * Model tests for BusinessEntityTypeEnum + */ +public class BusinessEntityTypeEnumTest { + /** + * Model tests for BusinessEntityTypeEnum + */ + @Test + public void testCallbackMethodEnum() { + assertThat(BusinessEntityTypeEnum.SOLE_PROPRIETOR.toString(), equalTo("SOLE_PROPRIETOR")); + assertThat(BusinessEntityTypeEnum.PRIVATE_PROFIT.toString(), equalTo("PRIVATE_PROFIT")); + assertThat(BusinessEntityTypeEnum.PUBLIC_PROFIT.toString(), equalTo("PUBLIC_PROFIT")); + assertThat(BusinessEntityTypeEnum.NON_PROFIT.toString(), equalTo("NON_PROFIT")); + assertThat(BusinessEntityTypeEnum.GOVERNMENT.toString(), equalTo("GOVERNMENT")); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BusinessRegistrationTypeEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BusinessRegistrationTypeEnumTest.java new file mode 100644 index 00000000..e0c5c7ff --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/BusinessRegistrationTypeEnumTest.java @@ -0,0 +1,35 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.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.bandwidth.sdk.unit.models; + +import org.junit.jupiter.api.Test; + +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.MatcherAssert.assertThat; + +/** + * Model tests for BusinessRegistrationTypeEnum + */ +public class BusinessRegistrationTypeEnumTest { + /** + * Model tests for BusinessRegistrationTypeEnum + */ + @Test + public void testCallbackMethodEnum() { + assertThat(BusinessRegistrationTypeEnum.EIN.toString(), equalTo("EIN")); + assertThat(BusinessRegistrationTypeEnum.CBN.toString(), equalTo("CBN")); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/OptInWorkflowTest.java b/src/test/java/com/bandwidth/sdk/unit/models/OptInWorkflowTest.java index 72138803..bf0336c9 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/OptInWorkflowTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/OptInWorkflowTest.java @@ -28,7 +28,8 @@ public class OptInWorkflowTest { private final OptInWorkflow model = new OptInWorkflow() .description("description") - .imageUrls(new ArrayList(Arrays.asList("imageUrl"))); + .imageUrls(new ArrayList(Arrays.asList("imageUrl"))) + .confirmationResponse("confirmationResponse"); /** * Model tests for OptInWorkflow @@ -54,4 +55,12 @@ public void imageUrlsTest() { assertThat(model.getImageUrls(), instanceOf(List.class)); } + /** + * Test the property 'confirmationResponse' + */ + @Test + public void confirmationResponseTest() { + assertThat(model.getConfirmationResponse(), instanceOf(String.class)); + } + } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java b/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java index 537b91e1..6dadb72c 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java @@ -15,6 +15,8 @@ import org.junit.jupiter.api.Test; import com.bandwidth.sdk.model.TfvSubmissionInfo; +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.Contact; import com.bandwidth.sdk.model.OptInWorkflow; @@ -38,7 +40,10 @@ public class TfvSubmissionInfoTest { .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDba("businessDba"); + .businessDba("businessDba") + .businessRegistrationNumber("businessRegistrationNumber") + .businessRegistrationType(BusinessRegistrationTypeEnum.EIN) + .businessEntityType(BusinessEntityTypeEnum.PRIVATE_PROFIT); /** * Model tests for TfvSubmissionInfo @@ -144,4 +149,27 @@ public void businessDbaTest() { assertThat(model.getBusinessDba(), instanceOf(String.class)); } + /** + * Test the property 'businessRegistrationNumber' + */ + @Test + public void businessRegistrationNumberTest() { + assertThat(model.getBusinessRegistrationNumber(), instanceOf(String.class)); + } + + /** + * Test the property 'businessRegistrationType' + */ @Test + public void businessRegistrationTypeTest() { + assertThat(model.getBusinessRegistrationType(), instanceOf(BusinessRegistrationTypeEnum.class)); + } + + /** + * Test the property 'businessEntityType' + */ + @Test + public void businessEntityTypeTest() { + assertThat(model.getBusinessEntityType(), instanceOf(BusinessEntityTypeEnum.class)); + } + } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java b/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java index 76dba539..8b086408 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java @@ -18,6 +18,8 @@ import java.util.ArrayList; import com.bandwidth.sdk.model.VerificationRequest; import com.bandwidth.sdk.model.Address; +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; import com.bandwidth.sdk.model.Contact; import com.bandwidth.sdk.model.OptInWorkflow; @@ -41,7 +43,12 @@ public class VerificationRequestTest { .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDba("businessDba"); + .businessDba("businessDba") + .businessRegistrationNumber("businessRegistrationNumber") + .businessRegistrationType(BusinessRegistrationTypeEnum.EIN) + .businessEntityType(BusinessEntityTypeEnum.PRIVATE_PROFIT) + .helpMessageResponse("helpMessageResponse") + .ageGatedContent(true); /** * Model tests for VerificationRequest @@ -155,4 +162,44 @@ public void businessDbaTest() { assertThat(model.getBusinessDba(), instanceOf(String.class)); } + /** + * Test the property 'businessRegistrationNumber' + */ + @Test + public void businessRegistrationNumberTest() { + assertThat(model.getBusinessRegistrationNumber(), instanceOf(String.class)); + } + + /** + * Test the property 'businessRegistrationType' + */ + @Test + public void businessRegistrationTypeTest() { + assertThat(model.getBusinessRegistrationType(), instanceOf(BusinessRegistrationTypeEnum.class)); + } + + /** + * Test the property 'businessEntityType' + */ + @Test + public void businessEntityTypeTest() { + assertThat(model.getBusinessEntityType(), instanceOf(BusinessEntityTypeEnum.class)); + } + + /** + * Test the property 'helpMessageResponse' + */ + @Test + public void helpMessageResponseTest() { + assertThat(model.getHelpMessageResponse(), instanceOf(String.class)); + } + + /** + * Test the property 'ageGatedContent' + */ + @Test + public void ageGatedContentTest() { + assertThat(model.getAgeGatedContent(), instanceOf(Boolean.class)); + } + } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java b/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java index ea2add3c..fbf0132f 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java @@ -16,6 +16,8 @@ import com.bandwidth.sdk.model.VerificationUpdateRequest; import com.bandwidth.sdk.model.Address; +import com.bandwidth.sdk.model.BusinessEntityTypeEnum; +import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; import com.bandwidth.sdk.model.Contact; import com.bandwidth.sdk.model.OptInWorkflow; @@ -38,7 +40,12 @@ public class VerificationUpdateRequestTest { .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDba("businessDba"); + .businessDba("businessDba") + .businessRegistrationNumber("businessRegistrationNumber") + .businessRegistrationType(BusinessRegistrationTypeEnum.EIN) + .businessEntityType(BusinessEntityTypeEnum.PRIVATE_PROFIT) + .helpMessageResponse("helpMessageResponse") + .ageGatedContent(true); /** * Model tests for VerificationUpdateRequest @@ -144,4 +151,44 @@ public void businessDbaTest() { assertThat(model.getBusinessDba(), instanceOf(String.class)); } + /** + * Test the property 'businessRegistrationNumber' + */ + @Test + public void businessRegistrationNumberTest() { + assertThat(model.getBusinessRegistrationNumber(), instanceOf(String.class)); + } + + /** + * Test the property 'businessRegistrationType' + */ + @Test + public void businessRegistrationTypeTest() { + assertThat(model.getBusinessRegistrationType(), instanceOf(BusinessRegistrationTypeEnum.class)); + } + + /** + * Test the property 'businessEntityType' + */ + @Test + public void businessEntityTypeTest() { + assertThat(model.getBusinessEntityType(), instanceOf(BusinessEntityTypeEnum.class)); + } + + /** + * Test the property 'helpMessageResponse' + */ + @Test + public void helpMessageResponseTest() { + assertThat(model.getHelpMessageResponse(), instanceOf(String.class)); + } + + /** + * Test the property 'ageGatedContent' + */ + @Test + public void ageGatedContentTest() { + assertThat(model.getAgeGatedContent(), instanceOf(Boolean.class)); + } + }