From 0ddacd4cd99f8c9e187909e5fb5c8b66b9b30908 Mon Sep 17 00:00:00 2001 From: Cameron Koegel <53310569+ckoegel@users.noreply.github.com> Date: Wed, 19 Jul 2023 10:55:10 -0400 Subject: [PATCH] SWI-2821 Improve BXML Library (#106) --- lib/bandwidth-sdk/models/bxml/bxml.rb | 4 +--- lib/bandwidth-sdk/models/bxml/nestable_verb.rb | 4 +--- lib/bandwidth-sdk/models/bxml/response.rb | 4 +--- lib/bandwidth-sdk/models/bxml/root.rb | 2 +- lib/bandwidth-sdk/models/bxml/verb.rb | 2 +- lib/bandwidth-sdk/models/bxml/verbs/bridge.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/conference.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/custom_param.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/forward.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/gather.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/hangup.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/pause.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/pause_recording.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/phone_number.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/play_audio.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/record.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/redirect.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/resume_recording.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/ring.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/send_dtmf.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/sip_uri.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/speak_sentence.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/start_gather.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/stop_gather.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/stop_recording.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/stop_transcription.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/stream_param.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/tag.rb | 4 +--- lib/bandwidth-sdk/models/bxml/verbs/transfer.rb | 4 +--- spec/models/bxml/nestable_verb_spec.rb | 2 +- spec/models/bxml/verb_spec.rb | 2 +- 35 files changed, 35 insertions(+), 97 deletions(-) diff --git a/lib/bandwidth-sdk/models/bxml/bxml.rb b/lib/bandwidth-sdk/models/bxml/bxml.rb index 0383ed7d..cd8c6b10 100644 --- a/lib/bandwidth-sdk/models/bxml/bxml.rb +++ b/lib/bandwidth-sdk/models/bxml/bxml.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Bxml - include Bandwidth::Bxml::Root - + class Bxml < Bandwidth::Bxml::Root # Initializer # @param nested_verbs [Array] XML element children. Defaults to an empty array. def initialize(nested_verbs = []) diff --git a/lib/bandwidth-sdk/models/bxml/nestable_verb.rb b/lib/bandwidth-sdk/models/bxml/nestable_verb.rb index 9b217455..bc0793d3 100644 --- a/lib/bandwidth-sdk/models/bxml/nestable_verb.rb +++ b/lib/bandwidth-sdk/models/bxml/nestable_verb.rb @@ -2,9 +2,7 @@ module Bandwidth module Bxml - module NestableVerb - include Bandwidth::Bxml::Verb - + class NestableVerb < Bandwidth::Bxml::Verb # Initializer # @param tag [String] Name of the XML element. # @param content [String] XML element content. Defaults to nil. diff --git a/lib/bandwidth-sdk/models/bxml/response.rb b/lib/bandwidth-sdk/models/bxml/response.rb index 195c2887..e0bbb7e4 100644 --- a/lib/bandwidth-sdk/models/bxml/response.rb +++ b/lib/bandwidth-sdk/models/bxml/response.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Response - include Bandwidth::Bxml::Root - + class Response < Bandwidth::Bxml::Root # Initializer # @param nested_verbs [Array] XML element children. Defaults to an empty array. def initialize(nested_verbs = []) diff --git a/lib/bandwidth-sdk/models/bxml/root.rb b/lib/bandwidth-sdk/models/bxml/root.rb index 9d32884d..1b1ee9a5 100644 --- a/lib/bandwidth-sdk/models/bxml/root.rb +++ b/lib/bandwidth-sdk/models/bxml/root.rb @@ -5,7 +5,7 @@ module Bxml SPEAK_SENTENCE_REGEX = /(.*?)<\/SpeakSentence>/ SSML_REGEX = /<([a-zA-Z\/\/].*?)>/ - module Root + class Root # Initializer # @param tag [String] Name of the XML element. # @param nested_verbs [Array] XML element children. Defaults to an empty array. diff --git a/lib/bandwidth-sdk/models/bxml/verb.rb b/lib/bandwidth-sdk/models/bxml/verb.rb index 16a3c8eb..f16b9a44 100644 --- a/lib/bandwidth-sdk/models/bxml/verb.rb +++ b/lib/bandwidth-sdk/models/bxml/verb.rb @@ -2,7 +2,7 @@ module Bandwidth module Bxml - module Verb + class Verb # Initializer # @param tag [String] Name of the XML element. # @param content [String] XML element content. Defaults to nil. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/bridge.rb b/lib/bandwidth-sdk/models/bxml/verbs/bridge.rb index 8068ee07..e456404e 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/bridge.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/bridge.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Bridge - include Bandwidth::Bxml::Verb - + class Bridge < Bandwidth::Bxml::Verb # Initializer # @param target_call [String] The callId of the call to be bridged. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/conference.rb b/lib/bandwidth-sdk/models/bxml/verbs/conference.rb index 08333eda..3f38c91a 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/conference.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/conference.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Conference - include Bandwidth::Bxml::Verb - + class Conference < Bandwidth::Bxml::Verb # Initializer # @param name [String] The name of the conference. Can contain up to 100 characters of letters, numbers, and the symbols -, _, and . # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/custom_param.rb b/lib/bandwidth-sdk/models/bxml/verbs/custom_param.rb index 46d8f171..caee962f 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/custom_param.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/custom_param.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class CustomParam - include Bandwidth::Bxml::Verb - + class CustomParam < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/forward.rb b/lib/bandwidth-sdk/models/bxml/verbs/forward.rb index 18567ab3..5f63110f 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/forward.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/forward.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Forward - include Bandwidth::Bxml::Verb - + class Forward < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/gather.rb b/lib/bandwidth-sdk/models/bxml/verbs/gather.rb index d780b310..4fc76458 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/gather.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/gather.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Gather - include Bandwidth::Bxml::NestableVerb - + class Gather < Bandwidth::Bxml::NestableVerb # Initializer # @param audio_verbs [Array] XML element children. Defaults to an empty array. Valid nested audio verbs are: SpeakSentence, PlayAudio. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/hangup.rb b/lib/bandwidth-sdk/models/bxml/verbs/hangup.rb index 51325abe..51d50565 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/hangup.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/hangup.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Hangup - include Bandwidth::Bxml::Verb - + class Hangup < Bandwidth::Bxml::Verb # Initializer def initialize super('Hangup', nil, {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/pause.rb b/lib/bandwidth-sdk/models/bxml/verbs/pause.rb index 981aeba4..d41a513d 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/pause.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/pause.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Pause - include Bandwidth::Bxml::Verb - + class Pause < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/pause_recording.rb b/lib/bandwidth-sdk/models/bxml/verbs/pause_recording.rb index 8ce4990f..a0e52c2a 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/pause_recording.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/pause_recording.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class PauseRecording - include Bandwidth::Bxml::Verb - + class PauseRecording < Bandwidth::Bxml::Verb # Initializer def initialize super('PauseRecording', nil, {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/phone_number.rb b/lib/bandwidth-sdk/models/bxml/verbs/phone_number.rb index b9f6b49d..db47f2c9 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/phone_number.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/phone_number.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class PhoneNumber - include Bandwidth::Bxml::Verb - + class PhoneNumber < Bandwidth::Bxml::Verb # Initializer # @param number [String] A phone number to transfer the call to. Value must be in E.164 format (e.g. +15555555555). # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/play_audio.rb b/lib/bandwidth-sdk/models/bxml/verbs/play_audio.rb index 640fe37b..d178400b 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/play_audio.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/play_audio.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class PlayAudio - include Bandwidth::Bxml::Verb - + class PlayAudio < Bandwidth::Bxml::Verb # Initializer # @param audio_uri [String] The URL of the audio file to play. May be a relative URL. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/record.rb b/lib/bandwidth-sdk/models/bxml/verbs/record.rb index 86f7b317..c3bbb728 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/record.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/record.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Record - include Bandwidth::Bxml::Verb - + class Record < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/redirect.rb b/lib/bandwidth-sdk/models/bxml/verbs/redirect.rb index 63c8c958..5b65fdbc 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/redirect.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/redirect.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Redirect - include Bandwidth::Bxml::Verb - + class Redirect < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/resume_recording.rb b/lib/bandwidth-sdk/models/bxml/verbs/resume_recording.rb index 9e516865..05eed0fc 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/resume_recording.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/resume_recording.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class ResumeRecording - include Bandwidth::Bxml::Verb - + class ResumeRecording < Bandwidth::Bxml::Verb # Initializer def initialize super('ResumeRecording', nil, {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/ring.rb b/lib/bandwidth-sdk/models/bxml/verbs/ring.rb index 0006cf55..67f91ea3 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/ring.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/ring.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Ring - include Bandwidth::Bxml::Verb - + class Ring < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/send_dtmf.rb b/lib/bandwidth-sdk/models/bxml/verbs/send_dtmf.rb index fdc04c6e..f0e84390 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/send_dtmf.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/send_dtmf.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class SendDtmf - include Bandwidth::Bxml::Verb - + class SendDtmf < Bandwidth::Bxml::Verb # Initializer # @param digits [String] String containing the DTMF characters to be sent in a call. Allows a maximum of 50 characters. The digits will be sent one-by-one with a marginal delay. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/sip_uri.rb b/lib/bandwidth-sdk/models/bxml/verbs/sip_uri.rb index 09863a22..6f123a91 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/sip_uri.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/sip_uri.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class SipUri - include Bandwidth::Bxml::Verb - + class SipUri < Bandwidth::Bxml::Verb # Initializer # @param uri [String] A SIP URI to transfer the call to (e.g. sip:user@server.com) # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/speak_sentence.rb b/lib/bandwidth-sdk/models/bxml/verbs/speak_sentence.rb index 030239df..ff3982ef 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/speak_sentence.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/speak_sentence.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class SpeakSentence - include Bandwidth::Bxml::Verb - + class SpeakSentence < Bandwidth::Bxml::Verb # Initializer # @param text [String] The text to speak. Cannot be blank. Can be a mixture of plain text and SSML tags. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/start_gather.rb b/lib/bandwidth-sdk/models/bxml/verbs/start_gather.rb index b0f17a71..26644574 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/start_gather.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/start_gather.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StartGather - include Bandwidth::Bxml::Verb - + class StartGather < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb b/lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb index 5e2d14c7..0db4f0c0 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StartRecording - include Bandwidth::Bxml::Verb - + class StartRecording < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb b/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb index 3b27f3e3..95b444a8 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StartStream - include Bandwidth::Bxml::NestableVerb - + class StartStream < Bandwidth::Bxml::NestableVerb # Initializer # @param stream_params [Array] XML element children. Defaults to an empty array. Valid nested stream params are: StreamParam. You may specify up to 12 elements nested within a tag. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb b/lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb index 6b7dfceb..e7661532 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StartTranscription - include Bandwidth::Bxml::NestableVerb - + class StartTranscription < Bandwidth::Bxml::NestableVerb # Initializer # @param custom_params [Array] XML element children. Defaults to an empty array. Valid nested custom params are: CustomParam. You may specify up to 12 elements nested within a tag. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/lib/bandwidth-sdk/models/bxml/verbs/stop_gather.rb b/lib/bandwidth-sdk/models/bxml/verbs/stop_gather.rb index 4442c998..1377846a 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/stop_gather.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/stop_gather.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StopGather - include Bandwidth::Bxml::Verb - + class StopGather < Bandwidth::Bxml::Verb # Initializer def initialize super('StopGather', nil, {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/stop_recording.rb b/lib/bandwidth-sdk/models/bxml/verbs/stop_recording.rb index a3c78ac4..dfb690ac 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/stop_recording.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/stop_recording.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StopRecording - include Bandwidth::Bxml::Verb - + class StopRecording < Bandwidth::Bxml::Verb # Initializer def initialize super('StopRecording', nil, {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb b/lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb index 9ba7a0f0..770420ad 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StopStream - include Bandwidth::Bxml::Verb - + class StopStream < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/stop_transcription.rb b/lib/bandwidth-sdk/models/bxml/verbs/stop_transcription.rb index a2803cfb..59bdc4f0 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/stop_transcription.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/stop_transcription.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StopTranscription - include Bandwidth::Bxml::Verb - + class StopTranscription < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/stream_param.rb b/lib/bandwidth-sdk/models/bxml/verbs/stream_param.rb index a1fd7ea9..5aa0bb0d 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/stream_param.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/stream_param.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class StreamParam - include Bandwidth::Bxml::Verb - + class StreamParam < Bandwidth::Bxml::Verb # Initializer # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. def initialize(attributes = {}) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/tag.rb b/lib/bandwidth-sdk/models/bxml/verbs/tag.rb index a58c45a0..ec6ca9d0 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/tag.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/tag.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Tag - include Bandwidth::Bxml::Verb - + class Tag < Bandwidth::Bxml::Verb # Initializer # @param content [String] Custom tag value. Defaults to nil. def initialize(content = nil) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb b/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb index 7b94c4e3..ed913dd8 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb @@ -1,8 +1,6 @@ module Bandwidth module Bxml - class Transfer - include Bandwidth::Bxml::NestableVerb - + class Transfer < Bandwidth::Bxml::NestableVerb # Initializer # @param transfer_to [Array] XML element children. Defaults to an empty array. Valid nested transfer verbs are: PhoneNumber, SipUri. # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash. diff --git a/spec/models/bxml/nestable_verb_spec.rb b/spec/models/bxml/nestable_verb_spec.rb index db017139..62e368dc 100644 --- a/spec/models/bxml/nestable_verb_spec.rb +++ b/spec/models/bxml/nestable_verb_spec.rb @@ -1,6 +1,6 @@ # Unit tests for Bandwidth::Bxml::NestableVerb describe 'Bandwidth::Bxml::NestableVerb' do - let(:instance) { Class.new.include(Bandwidth::Bxml::NestableVerb).new('Test') } + let(:instance) { Bandwidth::Bxml::NestableVerb.new('Test') } describe 'test an instance of NestableVerb' do it 'validates instance of NestableVerb' do diff --git a/spec/models/bxml/verb_spec.rb b/spec/models/bxml/verb_spec.rb index caee63cd..bd55289d 100644 --- a/spec/models/bxml/verb_spec.rb +++ b/spec/models/bxml/verb_spec.rb @@ -1,6 +1,6 @@ # Unit tests for Bandwidth::Bxml::Verb describe 'Bandwidth::Bxml::Verb' do - let(:instance) { Class.new.include(Bandwidth::Bxml::Verb).new('Test') } + let(:instance) { Bandwidth::Bxml::Verb.new('Test') } describe 'test an instance of Verb' do it 'validates instance of Verb' do