Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6034,12 +6034,30 @@ components:
description: Reason code for denial.
type: integer
example: 511
denialStatusCodeNullable:
description: Reason code for denial.
nullable: true
type: integer
example: 511
resubmitAllowed:
description: >-
Whether a Toll-Free Verification request qualifies for resubmission via
PUT.
example: true
type: boolean
additionalDenialReason:
type: object
properties:
statusCode:
$ref: '#/components/schemas/denialStatusCode'
reason:
$ref: '#/components/schemas/declineReasonDescription'
resubmitAllowed:
$ref: '#/components/schemas/resubmitAllowed'
required:
- statusCode
- reason
- resubmitAllowed
blocked:
description: >-
Whether a Toll-Free Verification is blocked. This attribute will only be
Expand Down Expand Up @@ -6194,19 +6212,6 @@ components:
type: boolean
description: Indicates whether the content is age-gated.
example: false
additionalDenialReason:
properties:
statusCode:
$ref: '#/components/schemas/denialStatusCode'
reason:
$ref: '#/components/schemas/declineReasonDescription'
resubmitAllowed:
$ref: '#/components/schemas/resubmitAllowed'
required:
- statusCode
- reason
- resubmitAllowed
type: object
internalTicketNumber:
type: string
description: >-
Expand Down Expand Up @@ -6402,6 +6407,7 @@ components:
description: >-
An optional list of denial reasons in addition to
declineReasonDescription when multiple reasons apply.
type: array
items:
$ref: '#/components/schemas/additionalDenialReason'
example:
Expand All @@ -6411,7 +6417,6 @@ components:
- statusCode: 513
reason: Reason B
resubmitAllowed: true
type: array
declineReasonDescription:
$ref: '#/components/schemas/declineReasonDescription'
denialStatusCode:
Expand Down Expand Up @@ -6779,6 +6784,23 @@ components:
$ref: '#/components/schemas/internalTicketNumber'
declineReasonDescription:
$ref: '#/components/schemas/declineReasonDescription'
denialStatusCode:
$ref: '#/components/schemas/denialStatusCodeNullable'
additionalDenialReasons:
description: >-
An optional list of denial reasons in addition to
declineReasonDescription when multiple reasons apply.
nullable: true
type: array
items:
$ref: '#/components/schemas/additionalDenialReason'
example:
- statusCode: 512
reason: Reason A
resubmitAllowed: true
- statusCode: 513
reason: Reason B
resubmitAllowed: true
resubmitAllowed:
$ref: '#/components/schemas/resubmitAllowed'
createdDateTime:
Expand Down
2 changes: 1 addition & 1 deletion docs/RbmActionBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::RbmActionBase.new(
type: null,
text: Hello world,
postback_data: [B@3ecbfba1
postback_data: [B@24fb752f
)
```

2 changes: 1 addition & 1 deletion docs/RbmSuggestionResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require 'bandwidth-sdk'

instance = Bandwidth::RbmSuggestionResponse.new(
text: Yes, I would like to proceed,
postback_data: [B@3ecbfba1
postback_data: [B@24fb752f
)
```

4 changes: 4 additions & 0 deletions docs/TfvStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
| **status** | [**TfvStatusEnum**](TfvStatusEnum.md) | | [optional] |
| **internal_ticket_number** | **String** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads. | [optional] |
| **decline_reason_description** | **String** | Explanation for why a verification request was declined. | [optional] |
| **denial_status_code** | **Integer** | Reason code for denial. | [optional] |
| **additional_denial_reasons** | [**Array<AdditionalDenialReason>**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] |
| **resubmit_allowed** | **Boolean** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional] |
| **created_date_time** | **Time** | Date and time the verification request was created. | [optional] |
| **modified_date_time** | **Time** | Date and time the verification request was last modified. | [optional] |
Expand All @@ -26,6 +28,8 @@ instance = Bandwidth::TfvStatus.new(
status: null,
internal_ticket_number: acde070d-8c4c-4f0d-9d8a-162843c10333,
decline_reason_description: Invalid Information - Can't Validate URL - Website is not accessible / not available,
denial_status_code: 511,
additional_denial_reasons: [{"statusCode":512,"reason":"Reason A","resubmitAllowed":true},{"statusCode":513,"reason":"Reason B","resubmitAllowed":true}],
resubmit_allowed: true,
created_date_time: 2021-06-08T06:45:13Z,
modified_date_time: 2021-06-08T06:45:13Z,
Expand Down
26 changes: 25 additions & 1 deletion lib/bandwidth-sdk/models/tfv_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class TfvStatus < ApiModelBase
# Explanation for why a verification request was declined.
attr_accessor :decline_reason_description

# Reason code for denial.
attr_accessor :denial_status_code

# An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply.
attr_accessor :additional_denial_reasons

# Whether a Toll-Free Verification request qualifies for resubmission via PUT.
attr_accessor :resubmit_allowed

Expand Down Expand Up @@ -75,6 +81,8 @@ def self.attribute_map
:'status' => :'status',
:'internal_ticket_number' => :'internalTicketNumber',
:'decline_reason_description' => :'declineReasonDescription',
:'denial_status_code' => :'denialStatusCode',
:'additional_denial_reasons' => :'additionalDenialReasons',
:'resubmit_allowed' => :'resubmitAllowed',
:'created_date_time' => :'createdDateTime',
:'modified_date_time' => :'modifiedDateTime',
Expand Down Expand Up @@ -102,6 +110,8 @@ def self.openapi_types
:'status' => :'TfvStatusEnum',
:'internal_ticket_number' => :'String',
:'decline_reason_description' => :'String',
:'denial_status_code' => :'Integer',
:'additional_denial_reasons' => :'Array<AdditionalDenialReason>',
:'resubmit_allowed' => :'Boolean',
:'created_date_time' => :'Time',
:'modified_date_time' => :'Time',
Expand All @@ -115,6 +125,8 @@ def self.openapi_types
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:'denial_status_code',
:'additional_denial_reasons',
:'cv_token'
])
end
Expand Down Expand Up @@ -151,6 +163,16 @@ def initialize(attributes = {})
self.decline_reason_description = attributes[:'decline_reason_description']
end

if attributes.key?(:'denial_status_code')
self.denial_status_code = attributes[:'denial_status_code']
end

if attributes.key?(:'additional_denial_reasons')
if (value = attributes[:'additional_denial_reasons']).is_a?(Array)
self.additional_denial_reasons = value
end
end

if attributes.key?(:'resubmit_allowed')
self.resubmit_allowed = attributes[:'resubmit_allowed']
end
Expand Down Expand Up @@ -267,6 +289,8 @@ def ==(o)
status == o.status &&
internal_ticket_number == o.internal_ticket_number &&
decline_reason_description == o.decline_reason_description &&
denial_status_code == o.denial_status_code &&
additional_denial_reasons == o.additional_denial_reasons &&
resubmit_allowed == o.resubmit_allowed &&
created_date_time == o.created_date_time &&
modified_date_time == o.modified_date_time &&
Expand All @@ -285,7 +309,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[phone_number, status, internal_ticket_number, decline_reason_description, resubmit_allowed, created_date_time, modified_date_time, submission, blocked, blocked_reason, cv_token].hash
[phone_number, status, internal_ticket_number, decline_reason_description, denial_status_code, additional_denial_reasons, resubmit_allowed, created_date_time, modified_date_time, submission, blocked, blocked_reason, cv_token].hash
end

# Builds the object from hash
Expand Down
16 changes: 14 additions & 2 deletions spec/unit/models/tfv_status_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
status: Bandwidth::TfvStatusEnum::VERIFIED,
internal_ticket_number: '8c8f33f8-0d72-43c8-8b6c-1da8f0a9e6b3',
decline_reason_description: 'The reason for declining',
denial_status_code: 100,
additional_denial_reasons: [Bandwidth::AdditionalDenialReason.new({ status_code: 100, reason: 'reason text', resubmit_allowed: true })],
resubmit_allowed: false,
created_date_time: '2024-01-01T00:00:00Z',
modified_date_time: '2024-01-02T00:00:00Z',
Expand Down Expand Up @@ -37,7 +39,11 @@

describe '#openapi_nullable' do
it 'expects nullable attributes to be the set of nullable fields' do
expect(Bandwidth::TfvStatus.openapi_nullable).to eq(Set.new([:'cv_token']))
expect(Bandwidth::TfvStatus.openapi_nullable).to eq(Set.new([
:'denial_status_code',
:'additional_denial_reasons',
:'cv_token'
]))
end
end

Expand All @@ -48,6 +54,8 @@
status: Bandwidth::TfvStatusEnum::VERIFIED,
internalTicketNumber: '8c8f33f8-0d72-43c8-8b6c-1da8f0a9e6b3',
declineReasonDescription: 'The reason for declining',
denialStatusCode: 100,
additionalDenialReasons: [{ statusCode: 100, reason: 'reason text', resubmitAllowed: true }],
resubmitAllowed: false,
createdDateTime: '2024-01-01T00:00:00Z',
modifiedDateTime: '2024-01-02T00:00:00Z',
Expand All @@ -61,6 +69,8 @@
expect(tfv_status_from_hash.status).to eq(Bandwidth::TfvStatusEnum::VERIFIED)
expect(tfv_status_from_hash.internal_ticket_number).to eq('8c8f33f8-0d72-43c8-8b6c-1da8f0a9e6b3')
expect(tfv_status_from_hash.decline_reason_description).to eq('The reason for declining')
expect(tfv_status_from_hash.denial_status_code).to eq(100)
expect(tfv_status_from_hash.additional_denial_reasons.first).to be_instance_of(Bandwidth::AdditionalDenialReason)
expect(tfv_status_from_hash.resubmit_allowed).to eq(false)
expect(tfv_status_from_hash.created_date_time).to eq(Time.parse('2024-01-01T00:00:00Z'))
expect(tfv_status_from_hash.modified_date_time).to eq(Time.parse('2024-01-02T00:00:00Z'))
Expand All @@ -73,7 +83,7 @@

describe '#to_s' do
it 'returns a string representation of the object' do
expect(tfv_status_values.to_s).to eq('{:phoneNumber=>"+18005554321", :status=>"VERIFIED", :internalTicketNumber=>"8c8f33f8-0d72-43c8-8b6c-1da8f0a9e6b3", :declineReasonDescription=>"The reason for declining", :resubmitAllowed=>false, :createdDateTime=>"2024-01-01T00:00:00Z", :modifiedDateTime=>"2024-01-02T00:00:00Z", :submission=>{:businessAddress=>{:name=>"Bandwidth"}}, :blocked=>false, :blockedReason=>"The reason for blocking", :cvToken=>"cv_token_value"}')
expect(tfv_status_values.to_s).to eq('{:phoneNumber=>"+18005554321", :status=>"VERIFIED", :internalTicketNumber=>"8c8f33f8-0d72-43c8-8b6c-1da8f0a9e6b3", :declineReasonDescription=>"The reason for declining", :denialStatusCode=>100, :additionalDenialReasons=>[{:statusCode=>100, :reason=>"reason text", :resubmitAllowed=>true}], :resubmitAllowed=>false, :createdDateTime=>"2024-01-01T00:00:00Z", :modifiedDateTime=>"2024-01-02T00:00:00Z", :submission=>{:businessAddress=>{:name=>"Bandwidth"}}, :blocked=>false, :blockedReason=>"The reason for blocking", :cvToken=>"cv_token_value"}')
end
end

Expand All @@ -91,6 +101,8 @@
status: Bandwidth::TfvStatusEnum::VERIFIED,
internalTicketNumber: '8c8f33f8-0d72-43c8-8b6c-1da8f0a9e6b3',
declineReasonDescription: 'The reason for declining',
denialStatusCode: 100,
additionalDenialReasons: [{ statusCode: 100, reason: 'reason text', resubmitAllowed: true }],
resubmitAllowed: false,
createdDateTime: '2024-01-01T00:00:00Z',
modifiedDateTime: '2024-01-02T00:00:00Z',
Expand Down