diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 232d698f..0c639e6c 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -162,6 +162,7 @@ docs/Model/RbmMessageContentRichCard.md
docs/Model/RbmMessageContentText.md
docs/Model/RbmMessageMedia.md
docs/Model/RbmOpenUrlEnum.md
+docs/Model/RbmSession.md
docs/Model/RbmStandaloneCard.md
docs/Model/RbmSuggestionResponse.md
docs/Model/RbmWebViewEnum.md
@@ -384,6 +385,7 @@ src/Model/RbmMessageContentRichCard.php
src/Model/RbmMessageContentText.php
src/Model/RbmMessageMedia.php
src/Model/RbmOpenUrlEnum.php
+src/Model/RbmSession.php
src/Model/RbmStandaloneCard.php
src/Model/RbmSuggestionResponse.php
src/Model/RbmWebViewEnum.php
diff --git a/README.md b/README.md
index 2ed1c816..55a7a886 100644
--- a/README.md
+++ b/README.md
@@ -274,6 +274,7 @@ Class | Method | HTTP request | Description
- [RbmMessageContentText](docs/Model/RbmMessageContentText.md)
- [RbmMessageMedia](docs/Model/RbmMessageMedia.md)
- [RbmOpenUrlEnum](docs/Model/RbmOpenUrlEnum.md)
+- [RbmSession](docs/Model/RbmSession.md)
- [RbmStandaloneCard](docs/Model/RbmStandaloneCard.md)
- [RbmSuggestionResponse](docs/Model/RbmSuggestionResponse.md)
- [RbmWebViewEnum](docs/Model/RbmWebViewEnum.md)
diff --git a/bandwidth.yml b/bandwidth.yml
index 350b6217..0df9d764 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -2031,6 +2031,7 @@ components:
messageLength:
type: integer
description: The length of the message content.
+ nullable: true
example: 18
attachmentCount:
type: integer
@@ -2620,14 +2621,13 @@ components:
type: string
description: Displayed text for user to click
maxLength: 25
- example: Hello world
+ example: Track my order
rbmActionPostbackData:
title: Post Back Data
type: string
- format: byte
- description: Base64 payload the customer receives when the reply is clicked.
+ description: Payload the customer receives when the reply is clicked.
maxLength: 2048
- example: SGVsbG8gd29ybGQ=
+ example: track-order-43654
rbmActionBase:
type: object
properties:
@@ -2916,8 +2916,8 @@ components:
properties:
text:
type: string
- description: The text associated with the suggestion response.
- example: Yes, I would like to proceed
+ description: The text of the suggestion the user tapped.
+ example: Track my order
postbackData:
$ref: '#/components/schemas/rbmActionPostbackData'
pairedMessageId:
@@ -2938,6 +2938,70 @@ components:
format: double
description: The longitude of the client's location.
example: '-122.4194'
+ rbmSession:
+ type: object
+ description: >-
+ RCS interactive session information for the message.
+
+ An interactive session is a 24-hour window covering all Rich and Rich
+ Media messages exchanged between an
+
+ RCS agent and a specific end user mobile number. It is triggered when at
+ least 4 messages are exchanged within
+
+ 24 hours, at least 2 of them mobile-originated and at least 1
+ mobile-terminated.
+
+ Only present on `message-delivered`, `message-received` and
+ `session-started` callbacks for RBM messages of
+
+ US agents with the Conversational billing category. Omitted for all
+ other messages.
+ properties:
+ canInitiate:
+ type: boolean
+ description: >-
+ Whether the message can start an interactive session.
+
+ `false` if the message is already part of an active session, or if
+ the agent is not eligible for
+
+ interactive session billing.
+ example: false
+ id:
+ type: string
+ nullable: true
+ description: >-
+ The unique identifier of the interactive session the message is part
+ of. This is not a message ID.
+
+ Omitted if the message is not part of a session.
+ example: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d
+ type:
+ type: string
+ nullable: true
+ description: |-
+ The type of the interactive session.
+ Only present on `session-started` callbacks.
+ example: INTERACTIVE_SESSION
+ startTime:
+ type: string
+ nullable: true
+ format: date-time
+ description: >-
+ The time the 24-hour session window opened. Only present on
+ `session-started` callbacks.
+ example: '2026-08-06T09:59:55Z'
+ endTime:
+ type: string
+ nullable: true
+ format: date-time
+ description: >-
+ The time the 24-hour session window closes. Only present on
+ `session-started` callbacks.
+ example: '2026-08-07T09:59:55Z'
+ required:
+ - canInitiate
callback:
description: >-
Callbacks are divided into two types based on direction of the related
@@ -2960,6 +3024,7 @@ components:
message-delivered: '#/components/schemas/statusCallback'
message-failed: '#/components/schemas/statusCallback'
message-read: '#/components/schemas/statusCallback'
+ session-started: '#/components/schemas/statusCallback'
message-received: '#/components/schemas/inboundCallback'
requested-location-response: '#/components/schemas/inboundCallback'
suggestion-response: '#/components/schemas/inboundCallback'
@@ -3060,12 +3125,17 @@ components:
- `message-read` indicates that the RBM message was read by the
recipient.
+
+ - `session-started` indicates that a previously exchanged RBM message is
+ now part of an RCS interactive session and is no longer billed
+ individually.
enum:
- message-sending
- message-sent
- message-delivered
- message-failed
- message-read
+ - session-started
example: message-delivered
inboundCallbackTypeEnum:
type: string
@@ -3143,6 +3213,8 @@ components:
$ref: '#/components/schemas/priorityEnum'
channel:
$ref: '#/components/schemas/multiChannelMessageChannelEnum'
+ session:
+ $ref: '#/components/schemas/rbmSession'
required:
- id
- owner
@@ -4876,6 +4948,10 @@ components:
$ref: '#/components/schemas/sipCallId'
sipResponseCode:
$ref: '#/components/schemas/sipResponseCode'
+ sipStatusLine:
+ $ref: '#/components/schemas/sipStatusLine'
+ sipHeaders:
+ $ref: '#/components/schemas/sipHeaders'
dtmfCallback:
type: object
description: >-
@@ -5395,6 +5471,12 @@ components:
$ref: '#/components/schemas/errorMessage'
errorId:
$ref: '#/components/schemas/errorId'
+ sipResponseCode:
+ $ref: '#/components/schemas/sipResponseCode'
+ sipStatusLine:
+ $ref: '#/components/schemas/sipStatusLine'
+ sipHeaders:
+ $ref: '#/components/schemas/sipHeaders'
eventType:
type: string
description: >-
@@ -5710,23 +5792,44 @@ components:
additionalProperties:
type: string
description: >-
- (optional) Map of customer-supplied X-* headers from the original
- INVITE. Keys are lowercase (SIP headers are case-insensitive). Present
- only for inbound SIP URI calls with custom headers. Note - keys preserve
- the original SIP header name in lowercase rather than Bandwidth's usual
- camelCase JSON convention, since these are passthrough values from the
- caller's SIP INVITE, not Bandwidth-defined fields. If the same header
- name is sent more than once in the INVITE, only the last value is kept.
+ (optional) Map of SIP headers, with lowercase keys (SIP headers are
+ case-insensitive). On the Initiate callback, contains the
+ customer-supplied X-* headers from the original INVITE; present only for
+ inbound SIP URI calls with custom headers. On the Disconnect and
+ Transfer Disconnect callbacks, contains a single `reason` key holding
+ the raw, unmodified `Reason` header value from the final SIP response
+ that rejected an outbound call (or transferred leg); present only when
+ that response included a `Reason` header (for example, `v=analytics1`
+ call-analytics block information from a terminating carrier). If the
+ response carries more than one `Reason` header, all values are returned
+ in the order received, separated by `, `. Note - on the Initiate
+ callback, keys preserve the original SIP header name in lowercase rather
+ than Bandwidth's usual camelCase JSON convention, since these are
+ passthrough values from the caller's SIP INVITE, not Bandwidth-defined
+ fields. If the same header name is sent more than once in the INVITE,
+ only the last value is kept. The example shown is for the Initiate
+ callback; on the Disconnect and Transfer Disconnect callbacks the only
+ key is `reason`.
example:
x-custom-header: customer-value
x-session-id: sess-12345
sipResponseCode:
type: integer
description: >-
- (optional) The SIP status code returned by Bandwidth's SBC when it
- rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline).
- Present only when an outbound call was rejected by the SBC.
+ (optional) The SIP status code of the final response that rejected an
+ outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603
+ for decline). Present only when the call was rejected with a SIP
+ response.
example: 486
+ sipStatusLine:
+ type: string
+ description: >-
+ (optional) The full SIP status line, exactly as received, of the final
+ response that rejected an outbound call's INVITE. The reason phrase can
+ help distinguish outcomes that share a status code, such as `603 Network
+ Blocked` and `603 Decline`. Present only when an outbound call was
+ rejected with a SIP response.
+ example: SIP/2.0 603 Network Blocked
codeRequest:
type: object
properties:
@@ -8878,6 +8981,31 @@ components:
media:
- >-
https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png
+ rbmMessageReceivedSessionCallbackExample:
+ summary: >-
+ An example of a rbm message-received callback body for a message that is
+ part of an RCS interactive session.
+ value:
+ time: '2026-08-06T10:00:05.502180Z'
+ type: message-received
+ to: BandwidthRBM
+ description: Incoming message received
+ message:
+ id: 1786010405502l2ntaoajuqjhqnxu
+ owner: BandwidthRBM
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ time: '2026-08-06T10:00:05.302180Z'
+ segmentCount: 1
+ direction: in
+ to:
+ - BandwidthRBM
+ from: '+12345678902'
+ channel: RBM
+ content:
+ text: Yes, please book it for tomorrow.
+ session:
+ canInitiate: false
+ id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d
messageSendingCallbackExample:
summary: An example of a message-sending callback body.
value:
@@ -8977,6 +9105,79 @@ components:
owner: '+12345678902'
direction: out
segmentCount: 1
+ rbmMessageDeliveredSessionCallbackExample:
+ summary: >-
+ An example of a rbm message-delivered callback body for a message that
+ is part of an RCS interactive session.
+ value:
+ type: message-delivered
+ time: '2026-08-06T10:01:11.160744Z'
+ description: Message delivered to handset.
+ to: '+12345678902'
+ message:
+ id: 1786010470868ty55yp2b2kw2fuq
+ time: '2026-08-06T10:01:10.868292Z'
+ to:
+ - '+12345678902'
+ from: BandwidthRBM
+ text: ''
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: BandwidthRBM
+ direction: out
+ segmentCount: 1
+ channel: RBM
+ session:
+ canInitiate: false
+ id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d
+ rbmMessageDeliveredCanInitiateSessionCallbackExample:
+ summary: >-
+ An example of a rbm message-delivered callback body for a message that
+ is not yet part of an RCS interactive session.
+ value:
+ type: message-delivered
+ time: '2026-08-06T09:59:56.160744Z'
+ description: Message delivered to handset.
+ to: '+12345678902'
+ message:
+ id: 1786010395000kw2fuqty55yp2b2
+ time: '2026-08-06T09:59:55.000000Z'
+ to:
+ - '+12345678902'
+ from: BandwidthRBM
+ text: ''
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: BandwidthRBM
+ direction: out
+ segmentCount: 1
+ channel: RBM
+ session:
+ canInitiate: true
+ sessionStartedCallbackExample:
+ summary: An example of a session-started callback body.
+ value:
+ type: session-started
+ time: '2026-08-06T10:00:00.123000Z'
+ description: Message is now part of an RCS interactive session.
+ to: '+12345678902'
+ message:
+ id: 1786010395000kw2fuqty55yp2b2
+ owner: BandwidthRBM
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ time: '2026-08-06T10:00:00.120000Z'
+ segmentCount: 1
+ direction: out
+ to:
+ - '+12345678902'
+ from: BandwidthRBM
+ text: ''
+ tag: ''
+ channel: RBM
+ session:
+ canInitiate: false
+ id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d
+ type: INTERACTIVE_SESSION
+ startTime: '2026-08-06T09:59:55Z'
+ endTime: '2026-08-07T09:59:55Z'
messageFailedCallbackExample:
summary: An example of a message-failed callback body.
value:
@@ -9980,6 +10181,9 @@ components:
$ref: '#/components/examples/smsMessageReceivedCallbackExample'
mmsMessageReceivedCallback:
$ref: '#/components/examples/mmsMessageReceivedCallbackExample'
+ rbmMessageReceivedSessionCallback:
+ $ref: >-
+ #/components/examples/rbmMessageReceivedSessionCallbackExample
responses:
'200':
description: OK
@@ -9995,8 +10199,9 @@ components:
information regarding a message sent (MT)
from your message-enabled Bandwidth telephone number.
-
The payload type will be one of message-sending, message-sent, message-delivered, message-failed or message-read.
-
Note that message-read callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint.
+
The payload type will be one of message-sending, message-sent, message-delivered, message-failed, message-read or session-started.
+
Note that message-read and session-started callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint.
+
Note that session-started callbacks are pertinent only for RBM messages of agents with the Conversational billing category.
Please visit Webhooks
content:
@@ -10015,8 +10220,16 @@ components:
groupMmsMessageDeliveredCallback:
$ref: >-
#/components/examples/groupMmsMessageDeliveredCallbackExample
+ rbmMessageDeliveredSessionCallback:
+ $ref: >-
+ #/components/examples/rbmMessageDeliveredSessionCallbackExample
+ rbmMessageDeliveredCanInitiateSessionCallback:
+ $ref: >-
+ #/components/examples/rbmMessageDeliveredCanInitiateSessionCallbackExample
messageFailedCallback:
$ref: '#/components/examples/messageFailedCallbackExample'
+ sessionStartedCallback:
+ $ref: '#/components/examples/sessionStartedCallbackExample'
responses:
'200':
description: OK
diff --git a/docs/Model/DisconnectCallback.md b/docs/Model/DisconnectCallback.md
index fcc05e53..555f2b24 100644
--- a/docs/Model/DisconnectCallback.md
+++ b/docs/Model/DisconnectCallback.md
@@ -22,6 +22,8 @@ Name | Type | Description | Notes
**error_id** | **string** | Bandwidth's internal id that references the error event. | [optional]
**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional]
**sip_call_id** | **string** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional]
-**sip_response_code** | **int** | (optional) The SIP status code returned by Bandwidth's SBC when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC. | [optional]
+**sip_response_code** | **int** | (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response. | [optional]
+**sip_status_line** | **string** | (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response. | [optional]
+**sip_headers** | **array** | (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/InboundCallbackMessage.md b/docs/Model/InboundCallbackMessage.md
index b96d8bf7..e6b0770e 100644
--- a/docs/Model/InboundCallbackMessage.md
+++ b/docs/Model/InboundCallbackMessage.md
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
**media** | **string[]** | Optional media, not applicable for sms | [optional]
**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional]
**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional]
+**session** | [**\Bandwidth\Model\RbmSession**](RbmSession.md) | | [optional]
**content** | [**\Bandwidth\Model\MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional]
**suggestion_response** | [**\Bandwidth\Model\RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional]
**location_response** | [**\Bandwidth\Model\RbmLocationResponse**](RbmLocationResponse.md) | | [optional]
diff --git a/docs/Model/InitiateCallback.md b/docs/Model/InitiateCallback.md
index 94e831ec..1f72fa23 100644
--- a/docs/Model/InitiateCallback.md
+++ b/docs/Model/InitiateCallback.md
@@ -18,6 +18,6 @@ Name | Type | Description | Notes
**stir_shaken** | [**\Bandwidth\Model\StirShaken**](StirShaken.md) | | [optional]
**uui** | **string** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional]
**sip_call_id** | **string** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional]
-**sip_headers** | **array** | (optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. | [optional]
+**sip_headers** | **array** | (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/MultiChannelActionCalendarEvent.md b/docs/Model/MultiChannelActionCalendarEvent.md
index 7a41991a..00c4cb23 100644
--- a/docs/Model/MultiChannelActionCalendarEvent.md
+++ b/docs/Model/MultiChannelActionCalendarEvent.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | |
**text** | **string** | Displayed text for user to click |
-**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. |
+**postback_data** | **string** | Payload the customer receives when the reply is clicked. |
**title** | **string** | The title of the event. |
**start_time** | **\DateTime** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. |
**end_time** | **\DateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. |
diff --git a/docs/Model/RbmActionBase.md b/docs/Model/RbmActionBase.md
index 9e641fe3..c8501ca6 100644
--- a/docs/Model/RbmActionBase.md
+++ b/docs/Model/RbmActionBase.md
@@ -6,6 +6,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | |
**text** | **string** | Displayed text for user to click |
-**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. |
+**postback_data** | **string** | Payload the customer receives when the reply is clicked. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/RbmActionDial.md b/docs/Model/RbmActionDial.md
index 0744ebd4..aecfcfcf 100644
--- a/docs/Model/RbmActionDial.md
+++ b/docs/Model/RbmActionDial.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | |
**text** | **string** | Displayed text for user to click |
-**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. |
+**postback_data** | **string** | Payload the customer receives when the reply is clicked. |
**phone_number** | **string** | The phone number to dial. Must be E164 format. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/RbmActionOpenUrl.md b/docs/Model/RbmActionOpenUrl.md
index e3c16313..642bb76a 100644
--- a/docs/Model/RbmActionOpenUrl.md
+++ b/docs/Model/RbmActionOpenUrl.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | |
**text** | **string** | Displayed text for user to click |
-**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. |
+**postback_data** | **string** | Payload the customer receives when the reply is clicked. |
**url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. |
**application** | [**\Bandwidth\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional]
**webview_view_mode** | [**\Bandwidth\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional]
diff --git a/docs/Model/RbmActionViewLocation.md b/docs/Model/RbmActionViewLocation.md
index 2fb12d5b..f659a972 100644
--- a/docs/Model/RbmActionViewLocation.md
+++ b/docs/Model/RbmActionViewLocation.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | |
**text** | **string** | Displayed text for user to click |
-**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. |
+**postback_data** | **string** | Payload the customer receives when the reply is clicked. |
**latitude** | **float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. |
**longitude** | **float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. |
**label** | **string** | The label of the location. | [optional]
diff --git a/docs/Model/RbmSession.md b/docs/Model/RbmSession.md
new file mode 100644
index 00000000..de5e278d
--- /dev/null
+++ b/docs/Model/RbmSession.md
@@ -0,0 +1,13 @@
+# RbmSession
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**can_initiate** | **bool** | Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing. |
+**id** | **string** | The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session. | [optional]
+**type** | **string** | The type of the interactive session. Only present on `session-started` callbacks. | [optional]
+**start_time** | **\DateTime** | The time the 24-hour session window opened. Only present on `session-started` callbacks. | [optional]
+**end_time** | **\DateTime** | The time the 24-hour session window closes. Only present on `session-started` callbacks. | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/RbmSuggestionResponse.md b/docs/Model/RbmSuggestionResponse.md
index f4463792..e5e81ff7 100644
--- a/docs/Model/RbmSuggestionResponse.md
+++ b/docs/Model/RbmSuggestionResponse.md
@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**text** | **string** | The text associated with the suggestion response. | [optional]
-**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | [optional]
+**text** | **string** | The text of the suggestion the user tapped. | [optional]
+**postback_data** | **string** | Payload the customer receives when the reply is clicked. | [optional]
**paired_message_id** | **string** | Corresponding parent message ID (MT). | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/StatusCallbackMessage.md b/docs/Model/StatusCallbackMessage.md
index 286542fa..92f5458e 100644
--- a/docs/Model/StatusCallbackMessage.md
+++ b/docs/Model/StatusCallbackMessage.md
@@ -17,5 +17,6 @@ Name | Type | Description | Notes
**media** | **string[]** | Optional media, not applicable for sms | [optional]
**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional]
**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional]
+**session** | [**\Bandwidth\Model\RbmSession**](RbmSession.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/TransferDisconnectCallback.md b/docs/Model/TransferDisconnectCallback.md
index 0f36d0ca..fbb3348a 100644
--- a/docs/Model/TransferDisconnectCallback.md
+++ b/docs/Model/TransferDisconnectCallback.md
@@ -24,5 +24,8 @@ Name | Type | Description | Notes
**cause** | **string** | Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. | [optional]
**error_message** | **string** | Text explaining the reason that caused the call to fail in case of errors. | [optional]
**error_id** | **string** | Bandwidth's internal id that references the error event. | [optional]
+**sip_response_code** | **int** | (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response. | [optional]
+**sip_status_line** | **string** | (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response. | [optional]
+**sip_headers** | **array** | (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/src/Model/Callback.php b/src/Model/Callback.php
index 510aab93..f4bf0aae 100644
--- a/src/Model/Callback.php
+++ b/src/Model/Callback.php
@@ -84,6 +84,7 @@ public static function getOneOfDiscriminatorMappings(): array
'message-sending' => '\Bandwidth\Model\StatusCallback',
'message-sent' => '\Bandwidth\Model\StatusCallback',
'requested-location-response' => '\Bandwidth\Model\InboundCallback',
+ 'session-started' => '\Bandwidth\Model\StatusCallback',
'suggestion-response' => '\Bandwidth\Model\InboundCallback'
];
}
diff --git a/src/Model/DisconnectCallback.php b/src/Model/DisconnectCallback.php
index b330715a..05887b79 100644
--- a/src/Model/DisconnectCallback.php
+++ b/src/Model/DisconnectCallback.php
@@ -78,7 +78,9 @@ class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializabl
'error_id' => 'string',
'tag' => 'string',
'sip_call_id' => 'string',
- 'sip_response_code' => 'int'
+ 'sip_response_code' => 'int',
+ 'sip_status_line' => 'string',
+ 'sip_headers' => 'array'
];
/**
@@ -105,7 +107,9 @@ class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializabl
'error_id' => null,
'tag' => null,
'sip_call_id' => null,
- 'sip_response_code' => null
+ 'sip_response_code' => null,
+ 'sip_status_line' => null,
+ 'sip_headers' => null
];
/**
@@ -132,7 +136,9 @@ class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializabl
'error_id' => true,
'tag' => true,
'sip_call_id' => false,
- 'sip_response_code' => false
+ 'sip_response_code' => false,
+ 'sip_status_line' => false,
+ 'sip_headers' => false
];
/**
@@ -229,7 +235,9 @@ public function isNullableSetToNull(string $property): bool
'error_id' => 'errorId',
'tag' => 'tag',
'sip_call_id' => 'sipCallId',
- 'sip_response_code' => 'sipResponseCode'
+ 'sip_response_code' => 'sipResponseCode',
+ 'sip_status_line' => 'sipStatusLine',
+ 'sip_headers' => 'sipHeaders'
];
/**
@@ -256,7 +264,9 @@ public function isNullableSetToNull(string $property): bool
'error_id' => 'setErrorId',
'tag' => 'setTag',
'sip_call_id' => 'setSipCallId',
- 'sip_response_code' => 'setSipResponseCode'
+ 'sip_response_code' => 'setSipResponseCode',
+ 'sip_status_line' => 'setSipStatusLine',
+ 'sip_headers' => 'setSipHeaders'
];
/**
@@ -283,7 +293,9 @@ public function isNullableSetToNull(string $property): bool
'error_id' => 'getErrorId',
'tag' => 'getTag',
'sip_call_id' => 'getSipCallId',
- 'sip_response_code' => 'getSipResponseCode'
+ 'sip_response_code' => 'getSipResponseCode',
+ 'sip_status_line' => 'getSipStatusLine',
+ 'sip_headers' => 'getSipHeaders'
];
/**
@@ -352,6 +364,8 @@ public function __construct(?array $data = null)
$this->setIfExists('tag', $data ?? [], null);
$this->setIfExists('sip_call_id', $data ?? [], null);
$this->setIfExists('sip_response_code', $data ?? [], null);
+ $this->setIfExists('sip_status_line', $data ?? [], null);
+ $this->setIfExists('sip_headers', $data ?? [], null);
}
/**
@@ -925,7 +939,7 @@ public function getSipResponseCode(): ?int
/**
* Sets sip_response_code
*
- * @param int|null $sip_response_code (optional) The SIP status code returned by Bandwidth's SBC when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC.
+ * @param int|null $sip_response_code (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response.
*
* @return $this
*/
@@ -938,6 +952,60 @@ public function setSipResponseCode(?int $sip_response_code): static
return $this;
}
+
+ /**
+ * Gets sip_status_line
+ *
+ * @return string|null
+ */
+ public function getSipStatusLine(): ?string
+ {
+ return $this->container['sip_status_line'];
+ }
+
+ /**
+ * Sets sip_status_line
+ *
+ * @param string|null $sip_status_line (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response.
+ *
+ * @return $this
+ */
+ public function setSipStatusLine(?string $sip_status_line): static
+ {
+ if (is_null($sip_status_line)) {
+ throw new InvalidArgumentException('non-nullable sip_status_line cannot be null');
+ }
+ $this->container['sip_status_line'] = $sip_status_line;
+
+ return $this;
+ }
+
+ /**
+ * Gets sip_headers
+ *
+ * @return array|null
+ */
+ public function getSipHeaders(): ?array
+ {
+ return $this->container['sip_headers'];
+ }
+
+ /**
+ * Sets sip_headers
+ *
+ * @param array|null $sip_headers (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`.
+ *
+ * @return $this
+ */
+ public function setSipHeaders(?array $sip_headers): static
+ {
+ if (is_null($sip_headers)) {
+ throw new InvalidArgumentException('non-nullable sip_headers cannot be null');
+ }
+ $this->container['sip_headers'] = $sip_headers;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/InboundCallbackMessage.php b/src/Model/InboundCallbackMessage.php
index c45b43e6..d0395321 100644
--- a/src/Model/InboundCallbackMessage.php
+++ b/src/Model/InboundCallbackMessage.php
@@ -72,6 +72,7 @@ class InboundCallbackMessage implements ModelInterface, ArrayAccess, JsonSeriali
'media' => 'string[]',
'priority' => '\Bandwidth\Model\PriorityEnum',
'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum',
+ 'session' => '\Bandwidth\Model\RbmSession',
'content' => '\Bandwidth\Model\MultiChannelMessageContent',
'suggestion_response' => '\Bandwidth\Model\RbmSuggestionResponse',
'location_response' => '\Bandwidth\Model\RbmLocationResponse'
@@ -96,6 +97,7 @@ class InboundCallbackMessage implements ModelInterface, ArrayAccess, JsonSeriali
'media' => 'uri',
'priority' => null,
'channel' => null,
+ 'session' => null,
'content' => null,
'suggestion_response' => null,
'location_response' => null
@@ -120,6 +122,7 @@ class InboundCallbackMessage implements ModelInterface, ArrayAccess, JsonSeriali
'media' => false,
'priority' => false,
'channel' => false,
+ 'session' => false,
'content' => false,
'suggestion_response' => false,
'location_response' => false
@@ -214,6 +217,7 @@ public function isNullableSetToNull(string $property): bool
'media' => 'media',
'priority' => 'priority',
'channel' => 'channel',
+ 'session' => 'session',
'content' => 'content',
'suggestion_response' => 'suggestionResponse',
'location_response' => 'locationResponse'
@@ -238,6 +242,7 @@ public function isNullableSetToNull(string $property): bool
'media' => 'setMedia',
'priority' => 'setPriority',
'channel' => 'setChannel',
+ 'session' => 'setSession',
'content' => 'setContent',
'suggestion_response' => 'setSuggestionResponse',
'location_response' => 'setLocationResponse'
@@ -262,6 +267,7 @@ public function isNullableSetToNull(string $property): bool
'media' => 'getMedia',
'priority' => 'getPriority',
'channel' => 'getChannel',
+ 'session' => 'getSession',
'content' => 'getContent',
'suggestion_response' => 'getSuggestionResponse',
'location_response' => 'getLocationResponse'
@@ -327,6 +333,7 @@ public function __construct(?array $data = null)
$this->setIfExists('media', $data ?? [], null);
$this->setIfExists('priority', $data ?? [], null);
$this->setIfExists('channel', $data ?? [], null);
+ $this->setIfExists('session', $data ?? [], null);
$this->setIfExists('content', $data ?? [], null);
$this->setIfExists('suggestion_response', $data ?? [], null);
$this->setIfExists('location_response', $data ?? [], null);
@@ -745,6 +752,33 @@ public function setChannel(?\Bandwidth\Model\MultiChannelMessageChannelEnum $cha
return $this;
}
+ /**
+ * Gets session
+ *
+ * @return \Bandwidth\Model\RbmSession|null
+ */
+ public function getSession(): ?\Bandwidth\Model\RbmSession
+ {
+ return $this->container['session'];
+ }
+
+ /**
+ * Sets session
+ *
+ * @param \Bandwidth\Model\RbmSession|null $session session
+ *
+ * @return $this
+ */
+ public function setSession(?\Bandwidth\Model\RbmSession $session): static
+ {
+ if (is_null($session)) {
+ throw new InvalidArgumentException('non-nullable session cannot be null');
+ }
+ $this->container['session'] = $session;
+
+ return $this;
+ }
+
/**
* Gets content
*
diff --git a/src/Model/InitiateCallback.php b/src/Model/InitiateCallback.php
index 2f6b5316..c052fd83 100644
--- a/src/Model/InitiateCallback.php
+++ b/src/Model/InitiateCallback.php
@@ -762,7 +762,7 @@ public function getSipHeaders(): ?array
/**
* Sets sip_headers
*
- * @param array|null $sip_headers (optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept.
+ * @param array|null $sip_headers (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`.
*
* @return $this
*/
diff --git a/src/Model/ListMessageItem.php b/src/Model/ListMessageItem.php
index d7051fe0..3fe40015 100644
--- a/src/Model/ListMessageItem.php
+++ b/src/Model/ListMessageItem.php
@@ -133,7 +133,7 @@ class ListMessageItem implements ModelInterface, ArrayAccess, JsonSerializable
'receive_time' => false,
'carrier_name' => true,
'message_size' => true,
- 'message_length' => false,
+ 'message_length' => true,
'attachment_count' => true,
'recipient_count' => true,
'campaign_class' => true,
@@ -776,7 +776,14 @@ public function getMessageLength(): ?int
public function setMessageLength(?int $message_length): static
{
if (is_null($message_length)) {
- throw new InvalidArgumentException('non-nullable message_length cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'message_length');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('message_length', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$this->container['message_length'] = $message_length;
diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php
index fba5f1b7..d6483ea1 100644
--- a/src/Model/MultiChannelActionCalendarEvent.php
+++ b/src/Model/MultiChannelActionCalendarEvent.php
@@ -76,7 +76,7 @@ class MultiChannelActionCalendarEvent implements ModelInterface, ArrayAccess, Js
protected static array $openAPIFormats = [
'type' => null,
'text' => null,
- 'postback_data' => 'byte',
+ 'postback_data' => null,
'title' => null,
'start_time' => 'date-time',
'end_time' => 'date-time',
@@ -307,6 +307,10 @@ public function listInvalidProperties(): array
if ($this->container['postback_data'] === null) {
$invalidProperties[] = "'postback_data' can't be null";
}
+ if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) {
+ $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048.";
+ }
+
if ($this->container['title'] === null) {
$invalidProperties[] = "'title' can't be null";
}
@@ -407,7 +411,7 @@ public function getPostbackData(): string
/**
* Sets postback_data
*
- * @param string $postback_data Base64 payload the customer receives when the reply is clicked.
+ * @param string $postback_data Payload the customer receives when the reply is clicked.
*
* @return $this
*/
@@ -416,6 +420,9 @@ public function setPostbackData(string $postback_data): static
if (is_null($postback_data)) {
throw new InvalidArgumentException('non-nullable postback_data cannot be null');
}
+ if ((mb_strlen($postback_data) > 2048)) {
+ throw new InvalidArgumentException('invalid length for $postback_data when calling MultiChannelActionCalendarEvent., must be smaller than or equal to 2048.');
+ }
$this->container['postback_data'] = $postback_data;
diff --git a/src/Model/RbmActionBase.php b/src/Model/RbmActionBase.php
index 4efb02c4..d0cae684 100644
--- a/src/Model/RbmActionBase.php
+++ b/src/Model/RbmActionBase.php
@@ -72,7 +72,7 @@ class RbmActionBase implements ModelInterface, ArrayAccess, JsonSerializable
protected static array $openAPIFormats = [
'type' => null,
'text' => null,
- 'postback_data' => 'byte'
+ 'postback_data' => null
];
/**
@@ -279,6 +279,10 @@ public function listInvalidProperties(): array
if ($this->container['postback_data'] === null) {
$invalidProperties[] = "'postback_data' can't be null";
}
+ if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) {
+ $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048.";
+ }
+
return $invalidProperties;
}
@@ -362,7 +366,7 @@ public function getPostbackData(): string
/**
* Sets postback_data
*
- * @param string $postback_data Base64 payload the customer receives when the reply is clicked.
+ * @param string $postback_data Payload the customer receives when the reply is clicked.
*
* @return $this
*/
@@ -371,6 +375,9 @@ public function setPostbackData(string $postback_data): static
if (is_null($postback_data)) {
throw new InvalidArgumentException('non-nullable postback_data cannot be null');
}
+ if ((mb_strlen($postback_data) > 2048)) {
+ throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionBase., must be smaller than or equal to 2048.');
+ }
$this->container['postback_data'] = $postback_data;
diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php
index 23fa9998..47967bb5 100644
--- a/src/Model/RbmActionDial.php
+++ b/src/Model/RbmActionDial.php
@@ -73,7 +73,7 @@ class RbmActionDial implements ModelInterface, ArrayAccess, JsonSerializable
protected static array $openAPIFormats = [
'type' => null,
'text' => null,
- 'postback_data' => 'byte',
+ 'postback_data' => null,
'phone_number' => null
];
@@ -286,6 +286,10 @@ public function listInvalidProperties(): array
if ($this->container['postback_data'] === null) {
$invalidProperties[] = "'postback_data' can't be null";
}
+ if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) {
+ $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048.";
+ }
+
if ($this->container['phone_number'] === null) {
$invalidProperties[] = "'phone_number' can't be null";
}
@@ -372,7 +376,7 @@ public function getPostbackData(): string
/**
* Sets postback_data
*
- * @param string $postback_data Base64 payload the customer receives when the reply is clicked.
+ * @param string $postback_data Payload the customer receives when the reply is clicked.
*
* @return $this
*/
@@ -381,6 +385,9 @@ public function setPostbackData(string $postback_data): static
if (is_null($postback_data)) {
throw new InvalidArgumentException('non-nullable postback_data cannot be null');
}
+ if ((mb_strlen($postback_data) > 2048)) {
+ throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionDial., must be smaller than or equal to 2048.');
+ }
$this->container['postback_data'] = $postback_data;
diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php
index 66aa7a6b..716fc40f 100644
--- a/src/Model/RbmActionOpenUrl.php
+++ b/src/Model/RbmActionOpenUrl.php
@@ -75,7 +75,7 @@ class RbmActionOpenUrl implements ModelInterface, ArrayAccess, JsonSerializable
protected static array $openAPIFormats = [
'type' => null,
'text' => null,
- 'postback_data' => 'byte',
+ 'postback_data' => null,
'url' => 'uri',
'application' => null,
'webview_view_mode' => null
@@ -300,6 +300,10 @@ public function listInvalidProperties(): array
if ($this->container['postback_data'] === null) {
$invalidProperties[] = "'postback_data' can't be null";
}
+ if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) {
+ $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048.";
+ }
+
if ($this->container['url'] === null) {
$invalidProperties[] = "'url' can't be null";
}
@@ -390,7 +394,7 @@ public function getPostbackData(): string
/**
* Sets postback_data
*
- * @param string $postback_data Base64 payload the customer receives when the reply is clicked.
+ * @param string $postback_data Payload the customer receives when the reply is clicked.
*
* @return $this
*/
@@ -399,6 +403,9 @@ public function setPostbackData(string $postback_data): static
if (is_null($postback_data)) {
throw new InvalidArgumentException('non-nullable postback_data cannot be null');
}
+ if ((mb_strlen($postback_data) > 2048)) {
+ throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionOpenUrl., must be smaller than or equal to 2048.');
+ }
$this->container['postback_data'] = $postback_data;
diff --git a/src/Model/RbmActionViewLocation.php b/src/Model/RbmActionViewLocation.php
index 50ced2af..39a95275 100644
--- a/src/Model/RbmActionViewLocation.php
+++ b/src/Model/RbmActionViewLocation.php
@@ -75,7 +75,7 @@ class RbmActionViewLocation implements ModelInterface, ArrayAccess, JsonSerializ
protected static array $openAPIFormats = [
'type' => null,
'text' => null,
- 'postback_data' => 'byte',
+ 'postback_data' => null,
'latitude' => 'double',
'longitude' => 'double',
'label' => null
@@ -300,6 +300,10 @@ public function listInvalidProperties(): array
if ($this->container['postback_data'] === null) {
$invalidProperties[] = "'postback_data' can't be null";
}
+ if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) {
+ $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048.";
+ }
+
if ($this->container['latitude'] === null) {
$invalidProperties[] = "'latitude' can't be null";
}
@@ -393,7 +397,7 @@ public function getPostbackData(): string
/**
* Sets postback_data
*
- * @param string $postback_data Base64 payload the customer receives when the reply is clicked.
+ * @param string $postback_data Payload the customer receives when the reply is clicked.
*
* @return $this
*/
@@ -402,6 +406,9 @@ public function setPostbackData(string $postback_data): static
if (is_null($postback_data)) {
throw new InvalidArgumentException('non-nullable postback_data cannot be null');
}
+ if ((mb_strlen($postback_data) > 2048)) {
+ throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionViewLocation., must be smaller than or equal to 2048.');
+ }
$this->container['postback_data'] = $postback_data;
diff --git a/src/Model/RbmSession.php b/src/Model/RbmSession.php
new file mode 100644
index 00000000..bf7e1cb6
--- /dev/null
+++ b/src/Model/RbmSession.php
@@ -0,0 +1,552 @@
+
+ */
+class RbmSession implements ModelInterface, ArrayAccess, JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static string $openAPIModelName = 'rbmSession';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var array
+ */
+ protected static array $openAPITypes = [
+ 'can_initiate' => 'bool',
+ 'id' => 'string',
+ 'type' => 'string',
+ 'start_time' => '\DateTime',
+ 'end_time' => '\DateTime'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var array
+ */
+ protected static array $openAPIFormats = [
+ 'can_initiate' => null,
+ 'id' => null,
+ 'type' => null,
+ 'start_time' => 'date-time',
+ 'end_time' => 'date-time'
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var array
+ */
+ protected static array $openAPINullables = [
+ 'can_initiate' => false,
+ 'id' => true,
+ 'type' => true,
+ 'start_time' => true,
+ 'end_time' => true
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var array
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function openAPITypes(): array
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function openAPIFormats(): array
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return array
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param array $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var array
+ */
+ protected static array $attributeMap = [
+ 'can_initiate' => 'canInitiate',
+ 'id' => 'id',
+ 'type' => 'type',
+ 'start_time' => 'startTime',
+ 'end_time' => 'endTime'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var array
+ */
+ protected static array $setters = [
+ 'can_initiate' => 'setCanInitiate',
+ 'id' => 'setId',
+ 'type' => 'setType',
+ 'start_time' => 'setStartTime',
+ 'end_time' => 'setEndTime'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var array
+ */
+ protected static array $getters = [
+ 'can_initiate' => 'getCanInitiate',
+ 'id' => 'getId',
+ 'type' => 'getType',
+ 'start_time' => 'getStartTime',
+ 'end_time' => 'getEndTime'
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function attributeMap(): array
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function setters(): array
+ {
+ return self::$setters;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getters(): array
+ {
+ return self::$getters;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getModelName(): string
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var array
+ */
+ protected array $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param array $data Associated array of property values initializing the model
+ */
+ public function __construct(?array $data = null)
+ {
+ $this->setIfExists('can_initiate', $data ?? [], null);
+ $this->setIfExists('id', $data ?? [], null);
+ $this->setIfExists('type', $data ?? [], null);
+ $this->setIfExists('start_time', $data ?? [], null);
+ $this->setIfExists('end_time', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function listInvalidProperties(): array
+ {
+ $invalidProperties = [];
+
+ if ($this->container['can_initiate'] === null) {
+ $invalidProperties[] = "'can_initiate' can't be null";
+ }
+ return $invalidProperties;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function valid(): bool
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets can_initiate
+ *
+ * @return bool
+ */
+ public function getCanInitiate(): bool
+ {
+ return $this->container['can_initiate'];
+ }
+
+ /**
+ * Sets can_initiate
+ *
+ * @param bool $can_initiate Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing.
+ *
+ * @return $this
+ */
+ public function setCanInitiate(bool $can_initiate): static
+ {
+ if (is_null($can_initiate)) {
+ throw new InvalidArgumentException('non-nullable can_initiate cannot be null');
+ }
+ $this->container['can_initiate'] = $can_initiate;
+
+ return $this;
+ }
+
+ /**
+ * Gets id
+ *
+ * @return string|null
+ */
+ public function getId(): ?string
+ {
+ return $this->container['id'];
+ }
+
+ /**
+ * Sets id
+ *
+ * @param string|null $id The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session.
+ *
+ * @return $this
+ */
+ public function setId(?string $id): static
+ {
+ if (is_null($id)) {
+ array_push($this->openAPINullablesSetToNull, 'id');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('id', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['id'] = $id;
+
+ return $this;
+ }
+
+ /**
+ * Gets type
+ *
+ * @return string|null
+ */
+ public function getType(): ?string
+ {
+ return $this->container['type'];
+ }
+
+ /**
+ * Sets type
+ *
+ * @param string|null $type The type of the interactive session. Only present on `session-started` callbacks.
+ *
+ * @return $this
+ */
+ public function setType(?string $type): static
+ {
+ if (is_null($type)) {
+ array_push($this->openAPINullablesSetToNull, 'type');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('type', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['type'] = $type;
+
+ return $this;
+ }
+
+ /**
+ * Gets start_time
+ *
+ * @return \DateTime|null
+ */
+ public function getStartTime(): ?\DateTime
+ {
+ return $this->container['start_time'];
+ }
+
+ /**
+ * Sets start_time
+ *
+ * @param \DateTime|null $start_time The time the 24-hour session window opened. Only present on `session-started` callbacks.
+ *
+ * @return $this
+ */
+ public function setStartTime(?\DateTime $start_time): static
+ {
+ if (is_null($start_time)) {
+ array_push($this->openAPINullablesSetToNull, 'start_time');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('start_time', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['start_time'] = $start_time;
+
+ return $this;
+ }
+
+ /**
+ * Gets end_time
+ *
+ * @return \DateTime|null
+ */
+ public function getEndTime(): ?\DateTime
+ {
+ return $this->container['end_time'];
+ }
+
+ /**
+ * Sets end_time
+ *
+ * @param \DateTime|null $end_time The time the 24-hour session window closes. Only present on `session-started` callbacks.
+ *
+ * @return $this
+ */
+ public function setEndTime(?\DateTime $end_time): static
+ {
+ if (is_null($end_time)) {
+ array_push($this->openAPINullablesSetToNull, 'end_time');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('end_time', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['end_time'] = $end_time;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param int|string $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists(mixed $offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param int|string $offset Offset
+ *
+ * @return mixed|null
+ */
+ #[ReturnTypeWillChange]
+ public function offsetGet(mixed $offset): mixed
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|string|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet(mixed $offset, mixed $value): void
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param int|string $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset(mixed $offset): void
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ #[ReturnTypeWillChange]
+ public function jsonSerialize(): mixed
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue(): string
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/src/Model/RbmSuggestionResponse.php b/src/Model/RbmSuggestionResponse.php
index 5ab5bd2b..a7d3861e 100644
--- a/src/Model/RbmSuggestionResponse.php
+++ b/src/Model/RbmSuggestionResponse.php
@@ -71,7 +71,7 @@ class RbmSuggestionResponse implements ModelInterface, ArrayAccess, JsonSerializ
*/
protected static array $openAPIFormats = [
'text' => null,
- 'postback_data' => 'byte',
+ 'postback_data' => null,
'paired_message_id' => null
];
@@ -266,6 +266,10 @@ public function listInvalidProperties(): array
{
$invalidProperties = [];
+ if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) {
+ $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048.";
+ }
+
return $invalidProperties;
}
@@ -291,7 +295,7 @@ public function getText(): ?string
/**
* Sets text
*
- * @param string|null $text The text associated with the suggestion response.
+ * @param string|null $text The text of the suggestion the user tapped.
*
* @return $this
*/
@@ -318,7 +322,7 @@ public function getPostbackData(): ?string
/**
* Sets postback_data
*
- * @param string|null $postback_data Base64 payload the customer receives when the reply is clicked.
+ * @param string|null $postback_data Payload the customer receives when the reply is clicked.
*
* @return $this
*/
@@ -327,6 +331,9 @@ public function setPostbackData(?string $postback_data): static
if (is_null($postback_data)) {
throw new InvalidArgumentException('non-nullable postback_data cannot be null');
}
+ if ((mb_strlen($postback_data) > 2048)) {
+ throw new InvalidArgumentException('invalid length for $postback_data when calling RbmSuggestionResponse., must be smaller than or equal to 2048.');
+ }
$this->container['postback_data'] = $postback_data;
diff --git a/src/Model/StatusCallbackMessage.php b/src/Model/StatusCallbackMessage.php
index 4f117172..75a5d1cc 100644
--- a/src/Model/StatusCallbackMessage.php
+++ b/src/Model/StatusCallbackMessage.php
@@ -72,7 +72,8 @@ class StatusCallbackMessage implements ModelInterface, ArrayAccess, JsonSerializ
'tag' => 'string',
'media' => 'string[]',
'priority' => '\Bandwidth\Model\PriorityEnum',
- 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum'
+ 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum',
+ 'session' => '\Bandwidth\Model\RbmSession'
];
/**
@@ -93,7 +94,8 @@ class StatusCallbackMessage implements ModelInterface, ArrayAccess, JsonSerializ
'tag' => null,
'media' => 'uri',
'priority' => null,
- 'channel' => null
+ 'channel' => null,
+ 'session' => null
];
/**
@@ -114,7 +116,8 @@ class StatusCallbackMessage implements ModelInterface, ArrayAccess, JsonSerializ
'tag' => false,
'media' => false,
'priority' => false,
- 'channel' => false
+ 'channel' => false,
+ 'session' => false
];
/**
@@ -205,7 +208,8 @@ public function isNullableSetToNull(string $property): bool
'tag' => 'tag',
'media' => 'media',
'priority' => 'priority',
- 'channel' => 'channel'
+ 'channel' => 'channel',
+ 'session' => 'session'
];
/**
@@ -226,7 +230,8 @@ public function isNullableSetToNull(string $property): bool
'tag' => 'setTag',
'media' => 'setMedia',
'priority' => 'setPriority',
- 'channel' => 'setChannel'
+ 'channel' => 'setChannel',
+ 'session' => 'setSession'
];
/**
@@ -247,7 +252,8 @@ public function isNullableSetToNull(string $property): bool
'tag' => 'getTag',
'media' => 'getMedia',
'priority' => 'getPriority',
- 'channel' => 'getChannel'
+ 'channel' => 'getChannel',
+ 'session' => 'getSession'
];
/**
@@ -310,6 +316,7 @@ public function __construct(?array $data = null)
$this->setIfExists('media', $data ?? [], null);
$this->setIfExists('priority', $data ?? [], null);
$this->setIfExists('channel', $data ?? [], null);
+ $this->setIfExists('session', $data ?? [], null);
}
/**
@@ -724,6 +731,33 @@ public function setChannel(?\Bandwidth\Model\MultiChannelMessageChannelEnum $cha
return $this;
}
+
+ /**
+ * Gets session
+ *
+ * @return \Bandwidth\Model\RbmSession|null
+ */
+ public function getSession(): ?\Bandwidth\Model\RbmSession
+ {
+ return $this->container['session'];
+ }
+
+ /**
+ * Sets session
+ *
+ * @param \Bandwidth\Model\RbmSession|null $session session
+ *
+ * @return $this
+ */
+ public function setSession(?\Bandwidth\Model\RbmSession $session): static
+ {
+ if (is_null($session)) {
+ throw new InvalidArgumentException('non-nullable session cannot be null');
+ }
+ $this->container['session'] = $session;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/StatusCallbackTypeEnum.php b/src/Model/StatusCallbackTypeEnum.php
index 8b7d715e..56e7ff6f 100644
--- a/src/Model/StatusCallbackTypeEnum.php
+++ b/src/Model/StatusCallbackTypeEnum.php
@@ -31,7 +31,7 @@
/**
* StatusCallbackTypeEnum Class Doc Comment
*
- * @description The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient.
+ * @description The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually.
* @package Bandwidth
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
@@ -47,6 +47,8 @@ enum StatusCallbackTypeEnum: string
case MESSAGE_FAILED = 'message-failed';
case MESSAGE_READ = 'message-read';
+
+ case SESSION_STARTED = 'session-started';
}
diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php
index da315c1d..0a87effb 100644
--- a/src/Model/TransferDisconnectCallback.php
+++ b/src/Model/TransferDisconnectCallback.php
@@ -79,7 +79,10 @@ class TransferDisconnectCallback implements ModelInterface, ArrayAccess, JsonSer
'transfer_to' => 'string',
'cause' => 'string',
'error_message' => 'string',
- 'error_id' => 'string'
+ 'error_id' => 'string',
+ 'sip_response_code' => 'int',
+ 'sip_status_line' => 'string',
+ 'sip_headers' => 'array'
];
/**
@@ -107,7 +110,10 @@ class TransferDisconnectCallback implements ModelInterface, ArrayAccess, JsonSer
'transfer_to' => null,
'cause' => null,
'error_message' => null,
- 'error_id' => null
+ 'error_id' => null,
+ 'sip_response_code' => null,
+ 'sip_status_line' => null,
+ 'sip_headers' => null
];
/**
@@ -135,7 +141,10 @@ class TransferDisconnectCallback implements ModelInterface, ArrayAccess, JsonSer
'transfer_to' => false,
'cause' => false,
'error_message' => true,
- 'error_id' => true
+ 'error_id' => true,
+ 'sip_response_code' => false,
+ 'sip_status_line' => false,
+ 'sip_headers' => false
];
/**
@@ -233,7 +242,10 @@ public function isNullableSetToNull(string $property): bool
'transfer_to' => 'transferTo',
'cause' => 'cause',
'error_message' => 'errorMessage',
- 'error_id' => 'errorId'
+ 'error_id' => 'errorId',
+ 'sip_response_code' => 'sipResponseCode',
+ 'sip_status_line' => 'sipStatusLine',
+ 'sip_headers' => 'sipHeaders'
];
/**
@@ -261,7 +273,10 @@ public function isNullableSetToNull(string $property): bool
'transfer_to' => 'setTransferTo',
'cause' => 'setCause',
'error_message' => 'setErrorMessage',
- 'error_id' => 'setErrorId'
+ 'error_id' => 'setErrorId',
+ 'sip_response_code' => 'setSipResponseCode',
+ 'sip_status_line' => 'setSipStatusLine',
+ 'sip_headers' => 'setSipHeaders'
];
/**
@@ -289,7 +304,10 @@ public function isNullableSetToNull(string $property): bool
'transfer_to' => 'getTransferTo',
'cause' => 'getCause',
'error_message' => 'getErrorMessage',
- 'error_id' => 'getErrorId'
+ 'error_id' => 'getErrorId',
+ 'sip_response_code' => 'getSipResponseCode',
+ 'sip_status_line' => 'getSipStatusLine',
+ 'sip_headers' => 'getSipHeaders'
];
/**
@@ -359,6 +377,9 @@ public function __construct(?array $data = null)
$this->setIfExists('cause', $data ?? [], null);
$this->setIfExists('error_message', $data ?? [], null);
$this->setIfExists('error_id', $data ?? [], null);
+ $this->setIfExists('sip_response_code', $data ?? [], null);
+ $this->setIfExists('sip_status_line', $data ?? [], null);
+ $this->setIfExists('sip_headers', $data ?? [], null);
}
/**
@@ -972,6 +993,87 @@ public function setErrorId(?string $error_id): static
return $this;
}
+
+ /**
+ * Gets sip_response_code
+ *
+ * @return int|null
+ */
+ public function getSipResponseCode(): ?int
+ {
+ return $this->container['sip_response_code'];
+ }
+
+ /**
+ * Sets sip_response_code
+ *
+ * @param int|null $sip_response_code (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response.
+ *
+ * @return $this
+ */
+ public function setSipResponseCode(?int $sip_response_code): static
+ {
+ if (is_null($sip_response_code)) {
+ throw new InvalidArgumentException('non-nullable sip_response_code cannot be null');
+ }
+ $this->container['sip_response_code'] = $sip_response_code;
+
+ return $this;
+ }
+
+ /**
+ * Gets sip_status_line
+ *
+ * @return string|null
+ */
+ public function getSipStatusLine(): ?string
+ {
+ return $this->container['sip_status_line'];
+ }
+
+ /**
+ * Sets sip_status_line
+ *
+ * @param string|null $sip_status_line (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response.
+ *
+ * @return $this
+ */
+ public function setSipStatusLine(?string $sip_status_line): static
+ {
+ if (is_null($sip_status_line)) {
+ throw new InvalidArgumentException('non-nullable sip_status_line cannot be null');
+ }
+ $this->container['sip_status_line'] = $sip_status_line;
+
+ return $this;
+ }
+
+ /**
+ * Gets sip_headers
+ *
+ * @return array|null
+ */
+ public function getSipHeaders(): ?array
+ {
+ return $this->container['sip_headers'];
+ }
+
+ /**
+ * Sets sip_headers
+ *
+ * @param array|null $sip_headers (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`.
+ *
+ * @return $this
+ */
+ public function setSipHeaders(?array $sip_headers): static
+ {
+ if (is_null($sip_headers)) {
+ throw new InvalidArgumentException('non-nullable sip_headers cannot be null');
+ }
+ $this->container['sip_headers'] = $sip_headers;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/tests/Unit/Model/CallbackTest.php b/tests/Unit/Model/CallbackTest.php
index 7a6d0bc5..f2394819 100644
--- a/tests/Unit/Model/CallbackTest.php
+++ b/tests/Unit/Model/CallbackTest.php
@@ -64,6 +64,7 @@ public function testCallback()
'message-sending' => StatusCallback::class,
'message-sent' => StatusCallback::class,
'requested-location-response' => InboundCallback::class,
+ 'session-started' => StatusCallback::class,
'suggestion-response' => InboundCallback::class
],
array_map(fn($type) => ltrim($type, '\\'), Callback::getOneOfDiscriminatorMappings())
@@ -106,6 +107,7 @@ public static function discriminatorProvider(): array
'message-sending' => ['message-sending', StatusCallback::class],
'message-sent' => ['message-sent', StatusCallback::class],
'requested-location-response' => ['requested-location-response', InboundCallback::class],
+ 'session-started' => ['session-started', StatusCallback::class],
'suggestion-response' => ['suggestion-response', InboundCallback::class]
];
}
diff --git a/tests/Unit/Model/DisconnectCallbackTest.php b/tests/Unit/Model/DisconnectCallbackTest.php
index fe709984..a9abfcfb 100644
--- a/tests/Unit/Model/DisconnectCallbackTest.php
+++ b/tests/Unit/Model/DisconnectCallbackTest.php
@@ -69,7 +69,9 @@ public static function setUpBeforeClass(): void
'error_id' => 'test_string',
'tag' => 'test_string',
'sip_call_id' => 'test_string',
- 'sip_response_code' => 1
+ 'sip_response_code' => 1,
+ 'sip_status_line' => 'test_string',
+ 'sip_headers' => ['x-test-header' => 'test_string']
]);
}
@@ -250,4 +252,22 @@ public function testPropertySipResponseCode()
{
$this->assertIsInt(self::$instance->getSipResponseCode());
$this->assertEquals(1, self::$instance->getSipResponseCode());
+ }
+
+ /**
+ * Test attribute "sip_status_line"
+ */
+ public function testPropertySipStatusLine()
+ {
+ $this->assertIsString(self::$instance->getSipStatusLine());
+ $this->assertEquals('test_string', self::$instance->getSipStatusLine());
+ }
+
+ /**
+ * Test attribute "sip_headers"
+ */
+ public function testPropertySipHeaders()
+ {
+ $this->assertIsArray(self::$instance->getSipHeaders());
+ $this->assertEquals(['x-test-header' => 'test_string'], self::$instance->getSipHeaders());
}}
diff --git a/tests/Unit/Model/InboundCallbackMessageTest.php b/tests/Unit/Model/InboundCallbackMessageTest.php
index d8714c54..c66b1cd5 100644
--- a/tests/Unit/Model/InboundCallbackMessageTest.php
+++ b/tests/Unit/Model/InboundCallbackMessageTest.php
@@ -34,6 +34,7 @@
use Bandwidth\Model\MultiChannelMessageContent;
use Bandwidth\Model\PriorityEnum;
use Bandwidth\Model\RbmLocationResponse;
+use Bandwidth\Model\RbmSession;
use Bandwidth\Model\RbmSuggestionResponse;
use PHPUnit\Framework\TestCase;
@@ -71,7 +72,8 @@ public static function setUpBeforeClass(): void
'channel' => MultiChannelMessageChannelEnum::RBM,
'content' => new MultiChannelMessageContent([]),
'suggestion_response' => new RbmSuggestionResponse([]),
- 'location_response' => new RbmLocationResponse([])
+ 'location_response' => new RbmLocationResponse([]),
+ 'session' => new RbmSession([])
]);
}
@@ -222,4 +224,12 @@ public function testPropertySuggestionResponse()
public function testPropertyLocationResponse()
{
$this->assertInstanceOf(RbmLocationResponse::class, self::$instance->getLocationResponse());
+ }
+
+ /**
+ * Test attribute "session"
+ */
+ public function testPropertySession()
+ {
+ $this->assertInstanceOf(RbmSession::class, self::$instance->getSession());
}}
diff --git a/tests/Unit/Model/RbmSessionTest.php b/tests/Unit/Model/RbmSessionTest.php
new file mode 100644
index 00000000..67b19794
--- /dev/null
+++ b/tests/Unit/Model/RbmSessionTest.php
@@ -0,0 +1,112 @@
+ true,
+ 'id' => 'test_string',
+ 'type' => 'test_string',
+ 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'),
+ 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00')
+ ]);
+ }
+
+ /**
+ * Test "RbmSession"
+ */
+ public function testRbmSession()
+ {
+ $this->assertInstanceOf(RbmSession::class, self::$instance);
+ }
+
+ /**
+ * Test attribute "can_initiate"
+ */
+ public function testPropertyCanInitiate()
+ {
+ $this->assertIsBool(self::$instance->getCanInitiate());
+ $this->assertTrue(self::$instance->getCanInitiate());
+ }
+
+ /**
+ * Test attribute "id"
+ */
+ public function testPropertyId()
+ {
+ $this->assertIsString(self::$instance->getId());
+ $this->assertEquals('test_string', self::$instance->getId());
+ }
+
+ /**
+ * Test attribute "type"
+ */
+ public function testPropertyType()
+ {
+ $this->assertIsString(self::$instance->getType());
+ $this->assertEquals('test_string', self::$instance->getType());
+ }
+
+ /**
+ * Test attribute "start_time"
+ */
+ public function testPropertyStartTime()
+ {
+ $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime());
+ $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime());
+ }
+
+ /**
+ * Test attribute "end_time"
+ */
+ public function testPropertyEndTime()
+ {
+ $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime());
+ $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime());
+ }}
diff --git a/tests/Unit/Model/StatusCallbackMessageTest.php b/tests/Unit/Model/StatusCallbackMessageTest.php
index 5d9405d6..2a587e72 100644
--- a/tests/Unit/Model/StatusCallbackMessageTest.php
+++ b/tests/Unit/Model/StatusCallbackMessageTest.php
@@ -31,6 +31,7 @@
use Bandwidth\Model\MessageDirectionEnum;
use Bandwidth\Model\MultiChannelMessageChannelEnum;
use Bandwidth\Model\PriorityEnum;
+use Bandwidth\Model\RbmSession;
use Bandwidth\Model\StatusCallbackMessage;
use PHPUnit\Framework\TestCase;
@@ -65,7 +66,8 @@ public static function setUpBeforeClass(): void
'tag' => 'test_string',
'media' => ['test_string'],
'priority' => PriorityEnum::_DEFAULT,
- 'channel' => MultiChannelMessageChannelEnum::RBM
+ 'channel' => MultiChannelMessageChannelEnum::RBM,
+ 'session' => new RbmSession([])
]);
}
@@ -192,4 +194,12 @@ public function testPropertyChannel()
{
$this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel());
$this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel());
+ }
+
+ /**
+ * Test attribute "session"
+ */
+ public function testPropertySession()
+ {
+ $this->assertInstanceOf(RbmSession::class, self::$instance->getSession());
}}
diff --git a/tests/Unit/Model/StatusCallbackTypeEnumTest.php b/tests/Unit/Model/StatusCallbackTypeEnumTest.php
index d83ac2d8..69931a70 100644
--- a/tests/Unit/Model/StatusCallbackTypeEnumTest.php
+++ b/tests/Unit/Model/StatusCallbackTypeEnumTest.php
@@ -35,7 +35,7 @@
/**
* StatusCallbackTypeEnumTest Class Doc Comment
*
- * @description The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient.
+ * @description The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually.
* @package Bandwidth
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
@@ -49,7 +49,7 @@ class StatusCallbackTypeEnumTest extends TestCase
public function testStatusCallbackTypeEnum()
{
$this->assertSame(
- ['message-sending', 'message-sent', 'message-delivered', 'message-failed', 'message-read'],
+ ['message-sending', 'message-sent', 'message-delivered', 'message-failed', 'message-read', 'session-started'],
array_column(StatusCallbackTypeEnum::cases(), 'value')
);
}
diff --git a/tests/Unit/Model/TransferDisconnectCallbackTest.php b/tests/Unit/Model/TransferDisconnectCallbackTest.php
index 71a6c8d8..9dfd2c59 100644
--- a/tests/Unit/Model/TransferDisconnectCallbackTest.php
+++ b/tests/Unit/Model/TransferDisconnectCallbackTest.php
@@ -70,7 +70,10 @@ public static function setUpBeforeClass(): void
'transfer_to' => 'test_string',
'cause' => 'test_string',
'error_message' => 'test_string',
- 'error_id' => 'test_string'
+ 'error_id' => 'test_string',
+ 'sip_response_code' => 1,
+ 'sip_status_line' => 'test_string',
+ 'sip_headers' => ['x-test-header' => 'test_string']
]);
}
@@ -260,4 +263,31 @@ public function testPropertyErrorId()
{
$this->assertIsString(self::$instance->getErrorId());
$this->assertEquals('test_string', self::$instance->getErrorId());
+ }
+
+ /**
+ * Test attribute "sip_response_code"
+ */
+ public function testPropertySipResponseCode()
+ {
+ $this->assertIsInt(self::$instance->getSipResponseCode());
+ $this->assertEquals(1, self::$instance->getSipResponseCode());
+ }
+
+ /**
+ * Test attribute "sip_status_line"
+ */
+ public function testPropertySipStatusLine()
+ {
+ $this->assertIsString(self::$instance->getSipStatusLine());
+ $this->assertEquals('test_string', self::$instance->getSipStatusLine());
+ }
+
+ /**
+ * Test attribute "sip_headers"
+ */
+ public function testPropertySipHeaders()
+ {
+ $this->assertIsArray(self::$instance->getSipHeaders());
+ $this->assertEquals(['x-test-header' => 'test_string'], self::$instance->getSipHeaders());
}}