source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/voice/actions/transfer_test.rb | Ruby | apache-2.0 | 220 | main | 3,500 | # typed: false
class Vonage::Voice::Actions::TransferTest < Vonage::Test
def test_transfer_initialize
transfer = Vonage::Voice::Actions::Transfer.new(conversation_id: conversation_id)
assert_kind_of Vonage::Voice::Actions::Transfer, transfer
end
def test_create_transfer
expected = [{ action: 'tran... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/voice/actions/wait_test.rb | Ruby | apache-2.0 | 220 | main | 1,217 | # typed: false
class Vonage::Voice::Actions::WaitTest < Vonage::Test
def test_wait_initialize
wait = Vonage::Voice::Actions::Wait.new
assert_kind_of Vonage::Voice::Actions::Wait, wait
end
def test_create_wait
expected = [{ action: 'wait' }]
wait = Vonage::Voice::Actions::Wait.new
assert_e... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/voice/actions/conversation_test.rb | Ruby | apache-2.0 | 220 | main | 3,268 | # typed: false
class Vonage::Voice::Actions::ConversationTest < Vonage::Test
def test_conversation_initialize
conversation = Vonage::Voice::Actions::Conversation.new(name: 'test123')
assert_kind_of Vonage::Voice::Actions::Conversation, conversation
assert_equal conversation.name, 'test123'
end
def... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/voice/actions/input_test.rb | Ruby | apache-2.0 | 220 | main | 6,098 | # typed: false
class Vonage::Voice::Actions::InputTest < Vonage::Test
def test_input_initialize
input = Vonage::Voice::Actions::Input.new(type: [ 'dtmf' ])
assert_kind_of Vonage::Voice::Actions::Input, input
assert_equal input.type, [ 'dtmf' ]
end
def test_create_input
expected = [{ action: 'i... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/voice/actions/stream_test.rb | Ruby | apache-2.0 | 220 | main | 2,734 | # typed: false
class Vonage::Voice::Actions::StreamTest < Vonage::Test
def test_stream_initialize
stream = Vonage::Voice::Actions::Stream.new(streamUrl: [ 'https://example.com/example.mp3' ])
assert_kind_of Vonage::Voice::Actions::Stream, stream
assert_equal stream.streamUrl, [ 'https://example.com/exa... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/insights_builder/insights_builder_test.rb | Ruby | apache-2.0 | 220 | main | 2,583 | # typed: false
class Vonage::IdentityInsights::InsightsBuilderTest < Vonage::Test
def identity_insights
Vonage::IdentityInsights.new(config)
end
def test_add_format_method
expected = {format: {}}
builder = identity_insights.insights_builder
builder.add_format
assert_equal expected, builder.... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/conversation/user_test.rb | Ruby | apache-2.0 | 220 | main | 2,107 | # typed: false
require_relative '../test'
class Vonage::Conversation::UserTest < Vonage::Test
def user
Vonage::Conversation::User.new(config)
end
def user_uri
'https://api.nexmo.com/v1/users/' + user_id
end
def test_list_conversations_method
stub_request(:get, user_uri + '/conversations').to_re... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/conversation/member_test.rb | Ruby | apache-2.0 | 220 | main | 2,660 | # typed: false
require_relative '../test'
class Vonage::Conversation::MemberTest < Vonage::Test
def member
Vonage::Conversation::Member.new(config)
end
def members_uri
"https://api.nexmo.com/v1/conversations/#{conversation_id}/members"
end
def member_uri
"https://api.nexmo.com/v1/conversations/... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/conversation/event_test.rb | Ruby | apache-2.0 | 220 | main | 2,574 | # typed: false
require_relative '../test'
class Vonage::Conversation::EventTest < Vonage::Test
def event
Vonage::Conversation::Event.new(config)
end
def event_id
1
end
def events_uri
"https://api.nexmo.com/v1/conversations/#{conversation_id}/events"
end
def event_uri
"https://api.nexmo... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/secrets/list_response_test.rb | Ruby | apache-2.0 | 220 | main | 551 | # typed: false
require_relative '../test'
class Vonage::Secrets::ListResponseTest < Vonage::Test
def secret_id
'secret-1'
end
def test_each_method
entity = Vonage::Entity.new({
id: secret_id
})
list_entity = Vonage::Entity.new({
_embedded: Vonage::Entity.new({
secrets: [
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/meetings/recordings_test.rb | Ruby | apache-2.0 | 220 | main | 819 | # typed: false
class Vonage::Meetings::RecordingsTest < Vonage::Test
def recordings
Vonage::Meetings::Recordings.new(config)
end
def recording_uri
"https://" + meetings_host + "/v1/meetings/recordings/" + meetings_id
end
def test_info_method
stub_request(:get, recording_uri).to_return(response)... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/meetings/rooms_test.rb | Ruby | apache-2.0 | 220 | main | 2,732 | # typed: false
class Vonage::Meetings::RoomsTest < Vonage::Test
def rooms
Vonage::Meetings::Rooms.new(config)
end
def rooms_uri
"https://" + meetings_host + "/v1/meetings/rooms"
end
def room_uri
"https://" + meetings_host + "/v1/meetings/rooms/" + meetings_id
end
def test_list_method
s... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/meetings/sessions_test.rb | Ruby | apache-2.0 | 220 | main | 887 | # typed: false
class Vonage::Meetings::SessionsTest < Vonage::Test
def sessions
Vonage::Meetings::Sessions.new(config)
end
def sessions_uri
"https://" + meetings_host + "/v1/meetings/sessions/" + meetings_id +
"/recordings"
end
def list_response
{
headers: response_headers,
bo... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/meetings/applications_test.rb | Ruby | apache-2.0 | 220 | main | 734 | # typed: false
class Vonage::Meetings::ApplicationsTest < Vonage::Test
def applications
Vonage::Meetings::Applications.new(config)
end
def applications_uri
"https://" + meetings_host + "/v1/meetings/applications"
end
def test_update_method
stub_request(:patch, applications_uri).with(
requ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/meetings/themes_test.rb | Ruby | apache-2.0 | 220 | main | 8,199 | # typed: false
class Vonage::Meetings::ThemesTest < Vonage::Test
def themes
Vonage::Meetings::Themes.new(config)
end
def themes_uri
"https://" + meetings_host + "/v1/meetings/themes"
end
def theme_uri
"https://" + meetings_host + "/v1/meetings/themes/" + meetings_id
end
def list_response
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/meetings/dial_in_numbers_test.rb | Ruby | apache-2.0 | 220 | main | 723 | # typed: false
class Vonage::Meetings::DialInNumbersTest < Vonage::Test
def dial_in_numbers
Vonage::Meetings::DialInNumbers.new(config)
end
def dial_in_numbers_uri
"https://" + meetings_host + "/v1/meetings/dial-in-numbers"
end
def list_response
{
headers: response_headers,
body: '[... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/proactive_connect/events_test.rb | Ruby | apache-2.0 | 220 | main | 6,301 | # typed: false
class Vonage::ProactiveConnect::EventsTest < Vonage::Test
def events
Vonage::ProactiveConnect::Events.new(config)
end
def events_uri
"https://" + vonage_host + "/v0.1/bulk/events"
end
def test_list_method
stub_request(:get, events_uri).to_return(
response
)
events_l... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/proactive_connect/item_test.rb | Ruby | apache-2.0 | 220 | main | 3,369 | # typed: false
class Vonage::ProactiveConnect::ItemTest < Vonage::Test
def item
Vonage::ProactiveConnect::Item.new(config)
end
def list_id
"29192c4a-4058-49da-86c2-3e349d1065b7"
end
def item_id
"4cb98f71-a879-49f7-b5cf-2314353eb52c"
end
def item_uri
"https://" + vonage_host + "/v0.1/bu... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/proactive_connect/items_test.rb | Ruby | apache-2.0 | 220 | main | 7,572 | # typed: false
class Vonage::ProactiveConnect::ItemsTest < Vonage::Test
def items
Vonage::ProactiveConnect::Items.new(config)
end
def list_id
"29192c4a-4058-49da-86c2-3e349d1065b7"
end
def items_uri
"https://" + vonage_host + "/v0.1/bulk/lists/#{list_id}/items"
end
def test_list_method
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/proactive_connect/lists_test.rb | Ruby | apache-2.0 | 220 | main | 5,210 | # typed: false
class Vonage::ProactiveConnect::ListsTest < Vonage::Test
def lists
Vonage::ProactiveConnect::Lists.new(config)
end
def lists_uri
"https://" + vonage_host + "/v0.1/bulk/lists"
end
def test_list_method
stub_request(:get, lists_uri).to_return(
response
)
list = lists.l... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/proactive_connect/list_test.rb | Ruby | apache-2.0 | 220 | main | 2,859 | # typed: false
class Vonage::ProactiveConnect::ListTest < Vonage::Test
def list
Vonage::ProactiveConnect::List.new(config)
end
def list_uri
"https://" + vonage_host + "/v0.1/bulk/lists"
end
def list_id
"29192c4a-4058-49da-86c2-3e349d1065b7"
end
def test_create_method
stub_request(:post... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/conversations/users_test.rb | Ruby | apache-2.0 | 220 | main | 1,214 | # typed: false
require_relative '../test'
class Vonage::Conversations::UsersTest < Vonage::Test
def users
Vonage::Conversations::Users.new(config)
end
def users_uri
'https://api.nexmo.com/beta/users'
end
def user_uri
'https://api.nexmo.com/beta/users/' + user_id
end
def params
{display... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/conversations/members_test.rb | Ruby | apache-2.0 | 220 | main | 1,554 | # typed: false
require_relative '../test'
class Vonage::Conversations::MembersTest < Vonage::Test
def members
Vonage::Conversations::Members.new(config)
end
def members_uri
"https://api.nexmo.com/beta/conversations/#{conversation_id}/members"
end
def member_uri
"https://api.nexmo.com/beta/conve... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/conversations/events_test.rb | Ruby | apache-2.0 | 220 | main | 1,204 | # typed: false
require_relative '../test'
class Vonage::Conversations::EventsTest < Vonage::Test
def events
Vonage::Conversations::Events.new(config)
end
def event_id
1
end
def events_uri
"https://api.nexmo.com/beta/conversations/#{conversation_id}/events"
end
def event_uri
"https://ap... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/conversations/legs_test.rb | Ruby | apache-2.0 | 220 | main | 671 | # typed: false
require_relative '../test'
class Vonage::Conversations::LegsTest < Vonage::Test
def legs
Vonage::Conversations::Legs.new(config)
end
def leg_id
'xxxxxx'
end
def legs_uri
'https://api.nexmo.com/beta/legs'
end
def leg_uri
"https://api.nexmo.com/beta/legs/#{leg_id}"
end
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/connections_test.rb | Ruby | apache-2.0 | 220 | main | 620 | # typed: false
require_relative '../test'
class Vonage::Video::ConnectionsTest < Vonage::Test
def connections
Vonage::Video::Connections.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/session/' + video_session_id + '/connection'
end
def test_list_method
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/archives_test.rb | Ruby | apache-2.0 | 220 | main | 5,068 | # typed: false
require_relative '../test'
class Vonage::Video::ArchivesTest < Vonage::Test
def archives
Vonage::Video::Archives.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/archive'
end
def test_list_method
stub_request(:get, uri).to_return(video_list_... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/sip_test.rb | Ruby | apache-2.0 | 220 | main | 3,767 | # typed: false
require_relative '../test'
class Vonage::Video::SIPTest < Vonage::Test
def sip
Vonage::Video::SIP.new(config)
end
def sip_dial_uri
'https://video.api.vonage.com/v2/project/' + application_id + '/dial'
end
def dtmf_session_uri
'https://video.api.vonage.com/v2/project/' + applicati... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/signals_test.rb | Ruby | apache-2.0 | 220 | main | 982 | # typed: false
require_relative '../test'
class Vonage::Video::SignalsTest < Vonage::Test
def signals
Vonage::Video::Signals.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/session/' + video_session_id
end
def test_send_to_one_method
connection_id = '1234... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/renders_test.rb | Ruby | apache-2.0 | 220 | main | 3,219 | # typed: false
require_relative '../test'
class Vonage::Video::RendersTest < Vonage::Test
def renders
Vonage::Video::Renders.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/render'
end
def experience_composer_id
"1248e7070b81464c9789f46ad10e7764"
end
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/moderation_test.rb | Ruby | apache-2.0 | 220 | main | 1,104 | # typed: false
require_relative '../test'
class Vonage::Video::ModerationTest < Vonage::Test
def moderation
Vonage::Video::Moderation.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/session/' + video_session_id
end
def test_force_disconnect_method
connect... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/web_socket_test.rb | Ruby | apache-2.0 | 220 | main | 2,782 | # typed: false
require_relative '../test'
class Vonage::Video::WebSocketTest < Vonage::Test
def web_socket
Vonage::Video::WebSocket.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/connect'
end
def test_connect_method
request_params = {
sessionId: vi... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/captions_test.rb | Ruby | apache-2.0 | 220 | main | 1,800 | # typed: false
require_relative '../test'
class Vonage::Video::CaptionsTest < Vonage::Test
def captions
Vonage::Video::Captions.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/captions'
end
def test_start_method
request_params = {sessionId: video_session_... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/broadcasts_test.rb | Ruby | apache-2.0 | 220 | main | 4,621 | # typed: false
require_relative '../test'
class Vonage::Video::BroadcastsTest < Vonage::Test
def broadcasts
Vonage::Video::Broadcasts.new(config)
end
def broadcasts_uri
'https://video.api.vonage.com/v2/project/' + application_id + '/broadcast'
end
def broadcast_uri
'https://video.api.vonage.com... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/video/streams_test.rb | Ruby | apache-2.0 | 220 | main | 1,217 | # typed: false
require_relative '../test'
class Vonage::Video::StreamsTest < Vonage::Test
def streams
Vonage::Video::Streams.new(config)
end
def uri
'https://video.api.vonage.com/v2/project/' + application_id + '/session/' + video_session_id + '/stream'
end
def test_list_method
stub_request(:ge... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/network_authentication/server_authentication_test.rb | Ruby | apache-2.0 | 220 | main | 3,706 | # typed: false
require_relative '../test'
class Vonage::NetworkAuthentication::ServerAuthenticationTest < Vonage::Test
def server_authentication
Vonage::NetworkAuthentication::ServerAuthentication.new(config)
end
def token_uri
"https://api-eu.vonage.com/oauth2/token"
end
def bc_authorize_uri
"h... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | test/vonage/network_authentication/client_authentication_test.rb | Ruby | apache-2.0 | 220 | main | 3,435 | # typed: false
require_relative '../test'
class Vonage::NetworkAuthentication::ClientAuthenticationTest < Vonage::Test
def client_authentication
Vonage::NetworkAuthentication::ClientAuthentication.new(config)
end
def token_uri
"https://api-eu.vonage.com/oauth2/token"
end
def example_oidc_auth_code
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage.rb | Ruby | apache-2.0 | 220 | main | 683 | # typed: true
# frozen_string_literal: true
require 'zeitwerk'
require 'sorbet-runtime'
module Vonage
loader = Zeitwerk::Loader.new
loader.tag = File.basename(__FILE__, '.rb')
loader.inflector.inflect({
'api_error' => 'APIError',
'dtmf' => 'DTMF',
'gsm7' => 'GSM7',
'http' => 'HTTP',
'json' =>... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2.rb | Ruby | apache-2.0 | 220 | main | 4,838 | # typed: true
# frozen_string_literal: true
module Vonage
class Verify2 < Namespace
self.authentication = BasicAndBearerToken
self.request_body = JSON
# Request a verification be sent to a user.
#
# @example
# verification_request = client.verify2.start_verification(
# brand: 'Acm... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/keys.rb | Ruby | apache-2.0 | 220 | main | 1,854 | # typed: strict
# frozen_string_literal: true
module Vonage
module Keys
extend T::Sig
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T::Hash[String, T.untyped]) }
def hyphenate(hash)
hash.transform_keys { |k| k.to_s.tr('_', '-') }
end
sig { params(hash: T::Hash[T.untyped, T.unt... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/gsm7.rb | Ruby | apache-2.0 | 220 | main | 472 | # typed: strong
module Vonage
module GSM7
extend T::Sig
CHARACTERS = "\n\f\r !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~ ¡£¤¥§¿ÄÅÆÇÉÑÖØÜßàäåæèéìñòöøùüΓΔΘΛΞΠΣΦΨΩ€"
REGEXP = /\A[#{Regexp.escape(CHARACTERS)}]*\z/
sig { params(string: T.nilable(... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/config.rb | Ruby | apache-2.0 | 220 | main | 6,722 | # typed: true
# frozen_string_literal: true
require 'logger'
module Vonage
class Config
extend T::Sig
sig { void }
def initialize
self.api_host = 'api.nexmo.com'
self.api_key = T.let(ENV['VONAGE_API_KEY'], T.nilable(String))
self.api_secret = T.let(ENV['VONAGE_API_SECRET'], T.nilable(S... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/service_error.rb | Ruby | apache-2.0 | 220 | main | 335 | # typed: strong
module Vonage
class ServiceError < Error
extend T::Sig
sig { returns(Vonage::Response) }
attr_reader :response
sig { params(message: T.nilable(String), response: Vonage::Response).void }
def initialize(message = nil, response:)
super(message)
@response = response
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/api_error.rb | Ruby | apache-2.0 | 220 | main | 802 | # typed: strong
require "json"
module Vonage
class APIError < Error
extend T::Sig
sig { returns(Net::HTTPResponse) }
attr_reader :http_response
sig { params(message: T.nilable(String), http_response: T.nilable(Net::HTTPResponse)).void }
def initialize(message = nil, http_response: nil)
su... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/signature.rb | Ruby | apache-2.0 | 220 | main | 2,267 | # typed: true
# frozen_string_literal: true
require 'openssl'
require 'digest/md5'
require 'jwt'
module Vonage
class Signature
def initialize(config)
@config = config
end
# Generate a request signature.
#
# @example
# client = Vonage::Client.new
# client.config.signature_secret... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/users.rb | Ruby | apache-2.0 | 220 | main | 7,480 | # typed: strict
# frozen_string_literal: true
module Vonage
class Users < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
# Get a list of Users associated with the Vonage Application.
#
# @param [optional, Integer] :page_size
# Specifies the number o... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/sms.rb | Ruby | apache-2.0 | 220 | main | 5,390 | # typed: strict
# frozen_string_literal: true
module Vonage
class SMS < Namespace
extend T::Sig
include Keys
self.authentication = BasicAndSignature
self.host = :rest_host
# Send an outbound SMS from your Vonage account.
#
# @example
# response = client.sms.send(from: 'Ruby', to:... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/response.rb | Ruby | apache-2.0 | 220 | main | 487 | # typed: true
module Vonage
class Response
def initialize(entity=nil, http_response=nil)
@entity = entity
@http_response = http_response
end
attr_reader :http_response
attr_reader :entity
def respond_to_missing?(name, include_private = false)
return super if @entity.nil?
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/redact.rb | Ruby | apache-2.0 | 220 | main | 926 | # typed: strict
# frozen_string_literal: true
module Vonage
class Redact < Namespace
extend T::Sig
self.authentication = Basic
self.request_body = JSON
# Redact a specific message.
#
# @example
# response = client.redact.transaction(id: '00A0B0C0', product: 'sms')
#
# @option... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/bearer_token.rb | Ruby | apache-2.0 | 220 | main | 294 | # typed: true
# frozen_string_literal: true
module Vonage
class BearerToken < AbstractAuthentication
def update(object, data)
return unless object.is_a?(Net::HTTPRequest)
object['Authorization'] = 'Bearer ' + @config.token
end
end
private_constant :BearerToken
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/jwt.rb | Ruby | apache-2.0 | 220 | main | 2,139 | # typed: true
# frozen_string_literal: true
require 'securerandom'
require 'openssl'
require 'vonage-jwt'
module Vonage
class JWT
# Generate an encoded JSON Web Token.
#
# By default the Vonage Ruby SDK generates a short lived JWT per request.
#
# To generate a long lived JWT for multiple request... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/basic.rb | Ruby | apache-2.0 | 220 | main | 255 | # typed: true
module Vonage
class Basic < AbstractAuthentication
def update(object, data)
return unless object.is_a?(Net::HTTPRequest)
object.basic_auth(@config.api_key, @config.api_secret)
end
end
private_constant :Basic
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/tfa.rb | Ruby | apache-2.0 | 220 | main | 240 | # typed: true
# frozen_string_literal: true
module Vonage
class TFA < Namespace
include Keys
self.host = :rest_host
def send(params)
request('/sc/us/2fa/json', params: hyphenate(params), type: Post)
end
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/network_sim_swap.rb | Ruby | apache-2.0 | 220 | main | 2,863 | # typed: strict
# frozen_string_literal: true
require 'phonelib'
module Vonage
class NetworkSIMSwap < Namespace
extend T::Sig
include Keys
self.authentication = NetworkAuthentication
self.host = :vonage_host
self.request_body = JSON
# Check if SIM swap has been performed during a past per... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/number_insight_2.rb | Ruby | apache-2.0 | 220 | main | 626 | # typed: strict
# frozen_string_literal: true
module Vonage
class NumberInsight2 < Namespace
extend T::Sig
self.authentication = Basic
self.request_body = JSON
# @deprecated
sig { params(type: String, phone: String, insights: T::Array[String]).returns(Vonage::Response) }
def fraud_check(typ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/basic_and_signature.rb | Ruby | apache-2.0 | 220 | main | 604 | # typed: true
module Vonage
class BasicAndSignature < AbstractAuthentication
def update(object, data)
if @config.authentication_preference == :signature
return unless object.is_a?(Hash)
object['api_key'] = T.must(@config).api_key
object['timestamp'] =Time.now.to_i.to_s
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation.rb | Ruby | apache-2.0 | 220 | main | 5,335 | # typed: strict
# frozen_string_literal: true
module Vonage
class Conversation < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
# List conversations associated with a Vonage application.
#
# @example
# response = client.conversation.list
#
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/pricing.rb | Ruby | apache-2.0 | 220 | main | 591 | # typed: true
# frozen_string_literal: true
module Vonage
class Pricing < Namespace
self.host = :rest_host
def initialize(config, type: nil)
raise ArgumentError if type.nil?
@type = type
super config
end
attr_reader :type
def get(country)
request('/account/get-pricing... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/network_authentication.rb | Ruby | apache-2.0 | 220 | main | 539 | # typed: true
# frozen_string_literal: true
module Vonage
class NetworkAuthentication < AbstractAuthentication
def update(object, data)
return unless object.is_a?(Net::HTTPRequest)
token = self.public_send(data[:auth_flow]).token(**data)
object['Authorization'] = 'Bearer ' + token
end
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/subaccounts.rb | Ruby | apache-2.0 | 220 | main | 7,608 | # typed: strict
# frozen_string_literal: true
module Vonage
class Subaccounts < Namespace
self.authentication = Basic
self.request_body = JSON
# Retrieve list of subaccounts.
#
# @example
# response = client.subaccounts.list
#
# @see https://developer.vonage.com/en/api/subaccounts... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/entity.rb | Ruby | apache-2.0 | 220 | main | 864 | # typed: true
module Vonage
class Entity
include Keys
def initialize(attributes = nil)
@attributes = attributes || {}
end
def [](key)
@attributes[attribute_key(key)]
end
def []=(key, value)
@attributes[attribute_key(key)] = value
end
def respond_to_missing?(name,... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/secrets.rb | Ruby | apache-2.0 | 220 | main | 2,220 | # typed: true
# frozen_string_literal: true
module Vonage
class Secrets < Namespace
self.authentication = Basic
self.request_body = JSON
# Create API Secret.
#
# @example
# response = client.secrets.create(secret: 'T0ps3cr3t')
#
# @option params [required, String] :secret
# ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify.rb | Ruby | apache-2.0 | 220 | main | 10,586 | # typed: strict
# frozen_string_literal: true
module Vonage
class Verify < Namespace
extend T::Sig
alias_method :http_request, :request
private :http_request
self.authentication = Basic
# Generate and send a PIN to your user.
#
# @note You can make a maximum of one Verify request per s... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/errors.rb | Ruby | apache-2.0 | 220 | main | 1,732 | # typed: strict
# frozen_string_literal: true
require "json"
module Vonage
module Errors
extend T::Sig
sig do
params(
response:
T.any(
Net::HTTPUnauthorized,
Net::HTTPClientError,
Net::HTTPServerError,
T.untyped
)
).retu... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/key_secret_params.rb | Ruby | apache-2.0 | 220 | main | 542 | # typed: strict
module Vonage
class KeySecretParams < AbstractAuthentication
extend T::Sig
sig { params(
object: T.any(T::Hash[T.untyped, T.untyped], URI::HTTPS, Net::HTTP::Post, Net::HTTP::Get),
data: T.nilable(Hash)
).void }
def update(object, data)
return unless object.is_a?(Ha... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice.rb | Ruby | apache-2.0 | 220 | main | 9,102 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice < Namespace
self.authentication = BearerToken
self.request_body = JSON
# Create an outbound Call.
#
# @example
# response = client.voice.create({
# to: [{type: 'phone', number: '14843331234'}],
# from: {... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video.rb | Ruby | apache-2.0 | 220 | main | 3,256 | # typed: true
# frozen_string_literal: true
module Vonage
class Video < Namespace
include Keys
self.authentication = BearerToken
self.host = :video_host
# Generate a new session.
#
# @example
# session = client.video.create_session({
# archive_mode: 'always',
# locati... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversations.rb | Ruby | apache-2.0 | 220 | main | 8,476 | # typed: strict
# frozen_string_literal: true
module Vonage
class Conversations < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
# Create a conversation.
#
# @deprecated Please use {Vonage::Conversation#create} instead
#
# @example
# respon... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging.rb | Ruby | apache-2.0 | 220 | main | 2,493 | # typed: true
# frozen_string_literal: true
require 'forwardable'
module Vonage
class Messaging < Namespace
extend Forwardable
self.authentication = BasicAndBearerToken
self.request_body = JSON
def_delegators Message, *Message::CHANNELS.keys
# Send a Message.
#
# @example
# mess... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/http.rb | Ruby | apache-2.0 | 220 | main | 1,218 | # typed: strict
# frozen_string_literal: true
require 'net/http/persistent'
module Vonage
module HTTP
class Options
extend T::Sig
sig { params(hash: T::Hash[Symbol, T.untyped]).void }
def initialize(hash)
raise ArgumentError, 'hash parameter cannot be empty or nil' if hash == {} || has... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/json.rb | Ruby | apache-2.0 | 220 | main | 449 | # typed: strict
# frozen_string_literal: true
require 'json'
module Vonage
module JSON
extend T::Sig
sig { params(http_request: T.any(Net::HTTP::Patch, Net::HTTP::Put, Net::HTTP::Post, Net::HTTP::Get), params: T::Hash[Symbol, T.untyped]).void }
def self.update(http_request, params)
http_request['C... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/basic_and_bearer_token.rb | Ruby | apache-2.0 | 220 | main | 449 | # typed: true
# frozen_string_literal: true
module Vonage
class BasicAndBearerToken < AbstractAuthentication
def update(object, data)
return unless object.is_a?(Net::HTTPRequest)
if @config.authentication_preference == :basic
object.basic_auth(@config.api_key, @config.api_secret)
else
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/number_insight.rb | Ruby | apache-2.0 | 220 | main | 5,873 | # typed: true
# frozen_string_literal: true
module Vonage
class NumberInsight < Namespace
self.authentication = Basic
# Provides basic number insight information about a number.
#
# @example
# response = client.number_insight.basic(number: '447700900000')
#
# @option params [required, S... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversions.rb | Ruby | apache-2.0 | 220 | main | 565 | # typed: strict
# frozen_string_literal: true
module Vonage
class Conversions < Namespace
extend T::Sig
include Keys
self.authentication = BasicAndSignature
sig { params(params: T::Hash[Symbol, T.untyped]).returns(Vonage::Response) }
def track_sms(params)
request('/conversions/sms', param... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/params.rb | Ruby | apache-2.0 | 220 | main | 505 | # typed: true
# frozen_string_literal: true
require 'cgi'
module Vonage
module Params
def self.encode(params)
params.flat_map { |k, vs| Array(vs).map { |v| "#{escape(k)}=#{escape(v)}" } }.join('&')
end
def self.join(string, params)
encoded = encode(params)
return encoded if string.nil... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/account.rb | Ruby | apache-2.0 | 220 | main | 1,978 | # typed: strict
# frozen_string_literal: true
module Vonage
class Account < Namespace
extend T::Sig
include Keys
self.authentication = Basic
self.host = :rest_host
# Retrieve your account balance.
#
# @return [Response]
#
# @see https://developer.nexmo.com/api/developer/account... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/numbers.rb | Ruby | apache-2.0 | 220 | main | 8,463 | # typed: true
# frozen_string_literal: true
module Vonage
class Numbers < Namespace
include Keys
self.authentication = Basic
self.host = :rest_host
# Retrieve all the inbound numbers associated with your Vonage account.
#
# @example
# response = client.numbers.list
# response.e... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/network_number_verification.rb | Ruby | apache-2.0 | 220 | main | 3,868 | # typed: strict
# frozen_string_literal: true
require 'phonelib'
module Vonage
class NetworkNumberVerification < Namespace
extend T::Sig
include Keys
self.authentication = NetworkAuthentication
self.host = :vonage_host
self.request_body = JSON
# Verifies if the specified phone number (pla... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect.rb | Ruby | apache-2.0 | 220 | main | 1,265 | # typed: true
# frozen_string_literal: true
module Vonage
class ProactiveConnect < Namespace
extend T::Sig
# @deprecated
sig { returns(T.nilable(Vonage::ProactiveConnect::Lists)) }
def lists
logger.info('This method is deprecated and will be removed in a future release.')
@lists ||= List... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/files.rb | Ruby | apache-2.0 | 220 | main | 647 | # typed: strict
# frozen_string_literal: true
module Vonage
class Files < Namespace
extend T::Sig
self.authentication = BearerToken
sig { params(id: String).returns(T.nilable(Vonage::Response)) }
def get(id)
request('/v1/files/' + T.must(id.split('/').last))
end
sig { params(id: Stri... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/client.rb | Ruby | apache-2.0 | 220 | main | 5,986 | # typed: strict
module Vonage
class Client
extend T::Sig
sig { returns(Vonage::Config) }
attr_reader :config
sig { params(options: T.nilable(T::Hash[Symbol, T.untyped])).void }
def initialize(options = nil)
@config = T.let(Vonage.config.merge(options), Vonage::Config)
end
# @retu... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/applications.rb | Ruby | apache-2.0 | 220 | main | 4,857 | # typed: strict
# frozen_string_literal: true
module Vonage
class Applications < Namespace
extend T::Sig
self.authentication = Basic
self.request_body = JSON
self.request_headers['Content-Type'] = 'application/json'
# Create an application.
#
# @example
# params = {
# nam... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/user_agent.rb | Ruby | apache-2.0 | 220 | main | 505 | # typed: strong
# frozen_string_literal: true
module Vonage
module UserAgent
extend T::Sig
sig { params(app_name: T.nilable(String), app_version: T.nilable(String)).returns(String) }
def self.string(app_name, app_version)
identifiers = []
identifiers << 'vonage-ruby/' + VERSION
identif... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings.rb | Ruby | apache-2.0 | 220 | main | 1,547 | # typed: strict
# frozen_string_literal: true
module Vonage
class Meetings < Namespace
extend T::Sig
# @deprecated
sig { returns(T.nilable(Vonage::Meetings::Rooms)) }
def rooms
logger.info('This method is deprecated and will be removed in a future release.')
@rooms ||= Rooms.new(@con... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messages.rb | Ruby | apache-2.0 | 220 | main | 611 | # typed: strict
# frozen_string_literal: true
module Vonage
class Messages < Namespace
extend T::Sig
self.host = :rest_host
sig { params(id: String).returns(Vonage::Response) }
def get(id)
request('/search/message', params: {id: id})
end
sig { params(params: T::Hash[Symbol, T.untyped... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/namespace.rb | Ruby | apache-2.0 | 220 | main | 8,149 | # typed: true
# frozen_string_literal: true
require 'net/http'
require 'net/http/persistent'
require 'net/http/post/multipart'
require 'json'
module Vonage
class Namespace
def initialize(config)
@config = config
@host = set_host
@http = Net::HTTP::Persistent.new
@config.http.set(@http... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/identity_insights.rb | Ruby | apache-2.0 | 220 | main | 2,950 | # typed: strict
# frozen_string_literal: true
module Vonage
class IdentityInsights < Namespace
VALID_INSIGHT_TYPES = %i[format sim_swap original_carrier current_carrier].freeze
self.authentication = BearerToken
self.host = :vonage_host
self.request_body = JSON
# Submit an Identity Insight... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/pricing_types.rb | Ruby | apache-2.0 | 220 | main | 294 | # typed: true
# frozen_string_literal: true
module Vonage
class PricingTypes
def initialize(config)
@config = config
end
def sms
@sms ||= Pricing.new(@config, type: 'sms')
end
def voice
@voice ||= Pricing.new(@config, type: 'voice')
end
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/logger.rb | Ruby | apache-2.0 | 220 | main | 1,494 | # typed: strict
# frozen_string_literal: true
require 'logger'
require 'forwardable'
module Vonage
class Logger
extend T::Sig
def initialize(logger)
@logger = logger || ::Logger.new(nil)
end
extend Forwardable
::Logger::Severity.constants.map(&:downcase).each do |name|
def_delegato... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/alerts.rb | Ruby | apache-2.0 | 220 | main | 2,583 | # typed: strict
# frozen_string_literal: true
module Vonage
class Alerts < Namespace
extend T::Sig
self.host = :rest_host
# Request the list of phone numbers opted out from your campaign.
#
# @see https://developer.nexmo.com/api/sms/us-short-codes/alerts/subscription
#
# @return [Respons... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/item.rb | Ruby | apache-2.0 | 220 | main | 3,653 | # typed: true
# frozen_string_literal: true
module Vonage
class ProactiveConnect::Item < Namespace
extend T::Sig
self.authentication = BearerToken
self.host = :vonage_host
self.request_body = JSON
# Create a list item
#
# @deprecated
#
# @example
# response = proactive_c... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/items.rb | Ruby | apache-2.0 | 220 | main | 4,436 | # typed: true
# frozen_string_literal: true
module Vonage
class ProactiveConnect::Items < Namespace
extend T::Sig
self.authentication = BearerToken
self.host = :vonage_host
# Find all list items
#
# @deprecated
#
# @example
# response = proactive_connect.items.list(list_id: '... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/lists.rb | Ruby | apache-2.0 | 220 | main | 956 | # typed: true
# frozen_string_literal: true
module Vonage
class ProactiveConnect::Lists < Namespace
extend T::Sig
self.authentication = BearerToken
self.host = :vonage_host
# Find all lists
#
# @deprecated
#
# @example
# response = proactive_connect.lists.list
#
# @pa... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/events.rb | Ruby | apache-2.0 | 220 | main | 2,028 | # typed: true
# frozen_string_literal: true
module Vonage
class ProactiveConnect::Events < Namespace
extend T::Sig
self.authentication = BearerToken
self.host = :vonage_host
# Find all events
#
# @deprecated
#
# @example
# response = proactive_connect.events.list
#
# ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/list.rb | Ruby | apache-2.0 | 220 | main | 5,668 | # typed: true
# frozen_string_literal: true
module Vonage
class ProactiveConnect::List < Namespace
extend T::Sig
self.authentication = BearerToken
self.host = :vonage_host
self.request_body = JSON
# Create list
#
# @deprecated
#
# @example
# response = proactive_connect.... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/items/file_response.rb | Ruby | apache-2.0 | 220 | main | 881 | # typed: true
class Vonage::ProactiveConnect::Items::FileResponse < Vonage::Response
DEFAULT_FILENAME = 'vonage-proactive-connect-list-items.csv'
attr_accessor :filename
def initialize(entity=nil, http_response=nil)
super
self.filename = initial_filename
end
def save(filepath:)
pn = Pathname.n... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/items/list_response.rb | Ruby | apache-2.0 | 220 | main | 232 | # typed: true
class Vonage::ProactiveConnect::Items::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.items.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/lists/list_response.rb | Ruby | apache-2.0 | 220 | main | 232 | # typed: true
class Vonage::ProactiveConnect::Lists::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.lists.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/proactive_connect/events/list_response.rb | Ruby | apache-2.0 | 220 | main | 234 | # typed: true
class Vonage::ProactiveConnect::Events::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.events.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/network_authentication/client_authentication.rb | Ruby | apache-2.0 | 220 | main | 1,016 | # typed: true
# frozen_string_literal: true
module Vonage
class NetworkAuthentication::ClientAuthentication < Namespace
extend T::Sig
self.authentication = BearerToken
self.host = :vonage_host
self.request_headers['Content-Type'] = 'application/x-www-form-urlencoded'
def token(oidc_auth_code:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.