Skip to content

Commit a5dbbed

Browse files
authored
SWI-7766 Add uui to PhoneNumber Verb (#170)
1 parent a259b48 commit a5dbbed

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def initialize(number, attributes = {})
1919
fallback_username: 'fallbackUsername', # Optional [String]: The username to send in the HTTP request to transferAnswerFallbackUrl. Defaults to None.
2020
fallback_password: 'fallbackPassword', # Optional [String]: The password to send in the HTTP request to transferAnswerFallbackUrl. Defaults to None.
2121
tag: 'tag', # Optional [String]: A custom string that will be sent with these and all future callbacks unless overwritten by a future tag attribute or cleared. May be cleared by setting tag="" Max length 256 characters. Defaults to None.
22+
uui: 'uui', # Optional [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.
2223
}
2324
end
2425
end

spec/unit/models/bxml/verbs/phone_number_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
password: 'initial_password',
1313
fallback_username: 'initial_fallback_username',
1414
fallback_password: 'initial_fallback_password',
15-
tag: 'initial_tag'
15+
tag: 'initial_tag',
16+
uui: 'initial_uui'
1617
}
1718
}
1819

@@ -28,7 +29,8 @@
2829
password: 'new_password',
2930
fallback_username: 'new_fallback_username',
3031
fallback_password: 'new_fallback_password',
31-
tag: 'new_tag'
32+
tag: 'new_tag',
33+
uui: 'new_uui'
3234
}
3335
}
3436

@@ -41,13 +43,13 @@
4143
end
4244

4345
it 'tests the to_bxml method of the PhoneNumber instance' do
44-
expected = "\n<PhoneNumber transferAnswerUrl=\"https://initial.com\" transferAnswerMethod=\"POST\" transferAnswerFallbackUrl=\"https://initial.com\" transferAnswerFallbackMethod=\"POST\" transferDisconnectUrl=\"https://initial.com\" transferDisconnectMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\">+19195551234</PhoneNumber>\n"
46+
expected = "\n<PhoneNumber transferAnswerUrl=\"https://initial.com\" transferAnswerMethod=\"POST\" transferAnswerFallbackUrl=\"https://initial.com\" transferAnswerFallbackMethod=\"POST\" transferDisconnectUrl=\"https://initial.com\" transferDisconnectMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" uui=\"initial_uui\">+19195551234</PhoneNumber>\n"
4547
expect(instance.to_bxml).to eq(expected)
4648
end
4749

4850
it 'tests the set_attributes method of the PhoneNumber instance' do
4951
instance.set_attributes(new_attributes)
50-
expected = "\n<PhoneNumber transferAnswerUrl=\"https://new.com\" transferAnswerMethod=\"GET\" transferAnswerFallbackUrl=\"https://new.com\" transferAnswerFallbackMethod=\"GET\" transferDisconnectUrl=\"https://new.com\" transferDisconnectMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\">+19195551234</PhoneNumber>\n"
52+
expected = "\n<PhoneNumber transferAnswerUrl=\"https://new.com\" transferAnswerMethod=\"GET\" transferAnswerFallbackUrl=\"https://new.com\" transferAnswerFallbackMethod=\"GET\" transferDisconnectUrl=\"https://new.com\" transferDisconnectMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" uui=\"new_uui\">+19195551234</PhoneNumber>\n"
5153
expect(instance.to_bxml).to eq(expected)
5254
end
5355
end

0 commit comments

Comments
 (0)