Skip to content

Commit 0ddacd4

Browse files
authored
SWI-2821 Improve BXML Library (#106)
1 parent 446c463 commit 0ddacd4

35 files changed

+35
-97
lines changed

lib/bandwidth-sdk/models/bxml/bxml.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Bandwidth
22
module Bxml
3-
class Bxml
4-
include Bandwidth::Bxml::Root
5-
3+
class Bxml < Bandwidth::Bxml::Root
64
# Initializer
75
# @param nested_verbs [Array<Verb>] XML element children. Defaults to an empty array.
86
def initialize(nested_verbs = [])

lib/bandwidth-sdk/models/bxml/nestable_verb.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
module Bandwidth
44
module Bxml
5-
module NestableVerb
6-
include Bandwidth::Bxml::Verb
7-
5+
class NestableVerb < Bandwidth::Bxml::Verb
86
# Initializer
97
# @param tag [String] Name of the XML element.
108
# @param content [String] XML element content. Defaults to nil.

lib/bandwidth-sdk/models/bxml/response.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Bandwidth
22
module Bxml
3-
class Response
4-
include Bandwidth::Bxml::Root
5-
3+
class Response < Bandwidth::Bxml::Root
64
# Initializer
75
# @param nested_verbs [Array<Verb>] XML element children. Defaults to an empty array.
86
def initialize(nested_verbs = [])

lib/bandwidth-sdk/models/bxml/root.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Bxml
55
SPEAK_SENTENCE_REGEX = /<SpeakSentence.*?>(.*?)<\/SpeakSentence>/
66
SSML_REGEX = /&lt;([a-zA-Z\/\/].*?)&gt;/
77

8-
module Root
8+
class Root
99
# Initializer
1010
# @param tag [String] Name of the XML element.
1111
# @param nested_verbs [Array<Verb>] XML element children. Defaults to an empty array.

lib/bandwidth-sdk/models/bxml/verb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Bandwidth
44
module Bxml
5-
module Verb
5+
class Verb
66
# Initializer
77
# @param tag [String] Name of the XML element.
88
# @param content [String] XML element content. Defaults to nil.

lib/bandwidth-sdk/models/bxml/verbs/bridge.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Bandwidth
22
module Bxml
3-
class Bridge
4-
include Bandwidth::Bxml::Verb
5-
3+
class Bridge < Bandwidth::Bxml::Verb
64
# Initializer
75
# @param target_call [String] The callId of the call to be bridged.
86
# @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash.

lib/bandwidth-sdk/models/bxml/verbs/conference.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Bandwidth
22
module Bxml
3-
class Conference
4-
include Bandwidth::Bxml::Verb
5-
3+
class Conference < Bandwidth::Bxml::Verb
64
# Initializer
75
# @param name [String] The name of the conference. Can contain up to 100 characters of letters, numbers, and the symbols -, _, and .
86
# @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash.

lib/bandwidth-sdk/models/bxml/verbs/custom_param.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Bandwidth
22
module Bxml
3-
class CustomParam
4-
include Bandwidth::Bxml::Verb
5-
3+
class CustomParam < Bandwidth::Bxml::Verb
64
# Initializer
75
# @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash.
86
def initialize(attributes = {})

lib/bandwidth-sdk/models/bxml/verbs/forward.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Bandwidth
22
module Bxml
3-
class Forward
4-
include Bandwidth::Bxml::Verb
5-
3+
class Forward < Bandwidth::Bxml::Verb
64
# Initializer
75
# @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash.
86
def initialize(attributes = {})

lib/bandwidth-sdk/models/bxml/verbs/gather.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Bandwidth
22
module Bxml
3-
class Gather
4-
include Bandwidth::Bxml::NestableVerb
5-
3+
class Gather < Bandwidth::Bxml::NestableVerb
64
# Initializer
75
# @param audio_verbs [Array] XML element children. Defaults to an empty array. Valid nested audio verbs are: SpeakSentence, PlayAudio.
86
# @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash.

0 commit comments

Comments
 (0)