Skip to content

Commit

Permalink
SWI-5445 Update SDK Based on Recent Spec Changes (#138)
Browse files Browse the repository at this point in the history
* Generate SDK with OpenAPI Generator Version 7.0.0

* Clean SDK using Rubocop

* update to generator v7.6.0

---------

Co-authored-by: DX-Bandwidth <[email protected]>
Co-authored-by: ckoegel <[email protected]>
  • Loading branch information
3 people authored Jun 14, 2024
1 parent b09c665 commit 5c25a49
Show file tree
Hide file tree
Showing 132 changed files with 545 additions and 264 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.6.0
4 changes: 3 additions & 1 deletion bandwidth-sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.0.0
Generator version: 7.6.0
=end

Expand All @@ -26,10 +26,12 @@ Gem::Specification.new do |s|
s.description = 'The official client SDK for Bandwidth&#39;s Voice, Messaging, MFA, and WebRTC APIs'
s.license = 'MIT'
s.required_ruby_version = '>=2.7'
s.metadata = {}

s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
s.add_runtime_dependency 'faraday-multipart'
s.add_runtime_dependency 'ox', '~> 2.4'
s.add_runtime_dependency 'marcel'

s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'

Expand Down
13 changes: 7 additions & 6 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ paths:
[startTranscription](/docs/voice/bxml/startTranscription).
Note: After the deletion is requested and a `204` is returned, the
Note: After the deletion is requested and a `200` is returned, the
transcription will not be accessible anymore. However, it is not deleted
immediately. This deletion process, while transparent and irreversible,
can take an additional 24 to 48 hours.
Expand All @@ -1183,7 +1183,7 @@ paths:
- $ref: '#/components/parameters/callId'
- $ref: '#/components/parameters/transcriptionId'
responses:
'204':
'200':
$ref: '#/components/responses/deleteCallTranscriptionResponse'
'400':
$ref: '#/components/responses/voiceBadRequestError'
Expand Down Expand Up @@ -2496,7 +2496,7 @@ components:
description: >-
The phone number that made the call, in E.164 format (e.g.
+15555555555).
example: '19195554321'
example: '+19195554321'
direction:
$ref: '#/components/schemas/callDirectionEnum'
state:
Expand Down Expand Up @@ -4139,7 +4139,7 @@ components:
accountId:
type: string
description: The user account associated with the call.
example: '920012'
example: '9900000'
applicationId:
type: string
description: The id of the application associated with the call.
Expand Down Expand Up @@ -4240,7 +4240,7 @@ components:
description: >-
The phone number used as the to field of the B-leg call, in E.164 format
(e.g. +15555555555).
example: +15555555555)
example: '+15555555555'
mediaUrl:
nullable: true
type: string
Expand Down Expand Up @@ -4451,7 +4451,7 @@ components:
messageId:
type: string
description: Messaging API Message ID.
example: 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6
example: 1589228074636lm4k2je7j7jklbn2
verifyCodeRequest:
type: object
properties:
Expand Down Expand Up @@ -5787,6 +5787,7 @@ components:
answerMethod: POST
answerUrl: https://myServer.example/bandwidth/webhooks/answer
answerFallbackMethod: POST
answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback
disconnectMethod: POST
disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect
username: mySecretUsername
Expand Down
2 changes: 2 additions & 0 deletions custom_templates/gemspec.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Gem::Specification.new do |s|
s.description = "{{gemDescription}}{{^gemDescription}}{{{appDescription}}}{{^appDescription}}{{{appName}}} Ruby Gem{{/appDescription}}{{/gemDescription}}"
s.license = "{{{gemLicense}}}{{^gemLicense}}Unlicense{{/gemLicense}}"
s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.7{{/gemRequiredRubyVersion}}"
s.metadata = {}

{{#isFaraday}}
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
Expand All @@ -27,6 +28,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
{{/isFaraday}}
s.add_runtime_dependency 'ox', '~> 2.4'
s.add_runtime_dependency 'marcel'

s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'

Expand Down
2 changes: 1 addition & 1 deletion docs/AnswerCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::AnswerCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand Down
2 changes: 1 addition & 1 deletion docs/BridgeCompleteCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::BridgeCompleteCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand Down
2 changes: 1 addition & 1 deletion docs/BridgeTargetCompleteCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::BridgeTargetCompleteCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand Down
4 changes: 2 additions & 2 deletions docs/CallRecordingMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ require 'bandwidth-sdk'

instance = Bandwidth::CallRecordingMetadata.new(
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
account_id: 920012,
account_id: 9900000,
call_id: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
parent_call_id: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d,
recording_id: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833,
to: +15555555555,
from: +15555555555,
transfer_caller_id: +15555555555,
transfer_to: +15555555555),
transfer_to: +15555555555,
duration: PT13.67S,
direction: null,
channels: 1,
Expand Down
2 changes: 1 addition & 1 deletion docs/CallState.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ instance = Bandwidth::CallState.new(
call_id: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
parent_call_id: c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
to: +19195551234,
from: 19195554321,
from: +19195554321,
direction: null,
state: disconnected,
stir_shaken: {&quot;verstat&quot;:&quot;TN-Verification-Passed&quot;,&quot;attestationIndicator&quot;:&quot;A&quot;,&quot;originatingId&quot;:&quot;abc123&quot;},
Expand Down
2 changes: 1 addition & 1 deletion docs/ConferenceRecordingAvailableCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ instance = Bandwidth::ConferenceRecordingAvailableCallback.new(
event_time: 2022-06-17T22:19:40.375Z,
conference_id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9,
name: my-conference-name,
account_id: 920012,
account_id: 9900000,
recording_id: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833,
channels: 1,
start_time: 2022-06-17T22:19:40.375Z,
Expand Down
2 changes: 1 addition & 1 deletion docs/ConferenceRecordingMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
require 'bandwidth-sdk'

instance = Bandwidth::ConferenceRecordingMetadata.new(
account_id: 920012,
account_id: 9900000,
conference_id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9,
name: my-conference-name,
recording_id: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833,
Expand Down
2 changes: 1 addition & 1 deletion docs/DisconnectCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::DisconnectCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand Down
4 changes: 2 additions & 2 deletions docs/DtmfCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::DtmfCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -43,7 +43,7 @@ instance = Bandwidth::DtmfCallback.new(
answer_time: 2022-06-17T22:20Z,
parent_call_id: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d,
transfer_caller_id: +15555555555,
transfer_to: +15555555555),
transfer_to: +15555555555,
tag: exampleTag
)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/GatherCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::GatherCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -45,7 +45,7 @@ instance = Bandwidth::GatherCallback.new(
parent_call_id: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d,
terminating_digit: #,
transfer_caller_id: +15555555555,
transfer_to: +15555555555),
transfer_to: +15555555555,
tag: exampleTag
)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/InitiateCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::InitiateCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand Down
2 changes: 1 addition & 1 deletion docs/MachineDetectionCompleteCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::MachineDetectionCompleteCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand Down
2 changes: 1 addition & 1 deletion docs/MessagingCodeResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
require 'bandwidth-sdk'

instance = Bandwidth::MessagingCodeResponse.new(
message_id: 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6
message_id: 1589228074636lm4k2je7j7jklbn2
)
```

4 changes: 2 additions & 2 deletions docs/RecordingAvailableCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::RecordingAvailableCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -54,7 +54,7 @@ instance = Bandwidth::RecordingAvailableCallback.new(
tag: exampleTag,
status: completed,
transfer_caller_id: +15555555555,
transfer_to: +15555555555)
transfer_to: +15555555555
)
```

4 changes: 2 additions & 2 deletions docs/RecordingCompleteCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::RecordingCompleteCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -54,7 +54,7 @@ instance = Bandwidth::RecordingCompleteCallback.new(
channels: 1,
tag: exampleTag,
transfer_caller_id: +15555555555,
transfer_to: +15555555555)
transfer_to: +15555555555
)
```

4 changes: 2 additions & 2 deletions docs/RedirectCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::RedirectCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -42,7 +42,7 @@ instance = Bandwidth::RedirectCallback.new(
answer_time: 2022-06-17T22:20Z,
tag: exampleTag,
transfer_caller_id: +15555555555,
transfer_to: +15555555555)
transfer_to: +15555555555
)
```

4 changes: 2 additions & 2 deletions docs/TranscriptionAvailableCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::TranscriptionAvailableCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -52,7 +52,7 @@ instance = Bandwidth::TranscriptionAvailableCallback.new(
tag: exampleTag,
transcription: null,
transfer_caller_id: +15555555555,
transfer_to: +15555555555)
transfer_to: +15555555555
)
```

2 changes: 1 addition & 1 deletion docs/TranscriptionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All URIs are relative to *http://localhost*
Delete a specific transcription

Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `200` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.

### Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/TransferAnswerCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::TransferAnswerCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -40,7 +40,7 @@ instance = Bandwidth::TransferAnswerCallback.new(
answer_time: 2022-06-17T22:20Z,
tag: exampleTag,
transfer_caller_id: +15555555555,
transfer_to: +15555555555)
transfer_to: +15555555555
)
```

4 changes: 2 additions & 2 deletions docs/TransferCompleteCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::TransferCompleteCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -43,7 +43,7 @@ instance = Bandwidth::TransferCompleteCallback.new(
answer_time: 2022-06-17T22:20Z,
tag: exampleTag,
transfer_caller_id: +15555555555,
transfer_to: +15555555555),
transfer_to: +15555555555,
cause: busy,
error_message: Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already bridged with another call,
error_id: 4642074b-7b58-478b-96e4-3a60955c6765
Expand Down
4 changes: 2 additions & 2 deletions docs/TransferDisconnectCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::TransferDisconnectCallback.new(
event_type: bridgeComplete,
event_time: 2022-06-17T22:19:40.375Z,
account_id: 920012,
account_id: 9900000,
application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
from: +15555555555,
to: +15555555555,
Expand All @@ -47,7 +47,7 @@ instance = Bandwidth::TransferDisconnectCallback.new(
end_time: 2022-06-17T22:20Z,
tag: exampleTag,
transfer_caller_id: +15555555555,
transfer_to: +15555555555),
transfer_to: +15555555555,
cause: busy,
error_message: Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already bridged with another call,
error_id: 4642074b-7b58-478b-96e4-3a60955c6765
Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.0.0
Generator version: 7.6.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/calls_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.0.0
Generator version: 7.6.0
=end

Expand Down
Loading

0 comments on commit 5c25a49

Please sign in to comment.