Sha256: ee7803b7f8283697fe214ccaf1476f40272219b6a340c0f95154113136e70726
Contents?: true
Size: 1.76 KB
Versions: 2
Compression:
Stored size: 1.76 KB
Contents
# frozen_string_literal: true module TwilioBase module Fake module Clients class Rest Message = Struct.new(:from, :to, :body) cattr_accessor :messages self.messages = [] def initialize(_account_sid = nil, _auth_token = nil); end def messages self end def create(from:, to:, body:) self.class.messages << Message.new(from, to, body) end def taskrouter TwilioBase::Fake::TaskRouter::Client.new(nil, nil) end def calls(sid = nil) TwilioBase::Fake::VoiceCall.new(sid) end def chat TwilioBase::Fake::Chat::Client.new(nil, nil) end def conferences(conference_sid = nil) TwilioBase::Fake::Conference.new(conference_sid) end def flex_flow TwilioBase::Fake::FlexFlow.new end def new_keys TwilioBase::Fake::ApiKey.new end def proxy TwilioBase::Fake::Proxy.new end def applications(sid = nil) TwilioBase::Fake::Application.new(sid) end def available_phone_numbers(country_code) TwilioBase::Fake::AvailablePhoneNumber.new(country_code) end def incoming_phone_numbers TwilioBase::Fake::IncomingPhoneNumber.new end def lookups TwilioBase::Fake::Lookup::Client.new(nil, nil) end def sync TwilioBase::Fake::Sync::Client.new end def services(sid = nil) TwilioBase::Fake::Notify::V1.new(sid) end def method_missing(_name) self || super end def respond_to_missing?(method_name) super end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twilio_base-1.9.0 | spec/support/twilio_base/fake/clients/rest.rb |
twilio_base-1.8.0 | spec/support/twilio_base/fake/clients/rest.rb |