Sha256: 36fe7176c86077b87de066404a1e59f20a757789494299ded4c91a8d7e6c8b61

Contents?: true

Size: 587 Bytes

Versions: 4

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

module TwilioBase
  module Fake
    module Lookup
      class Client
        class RestError < StandardError
          def code
            20_404
          end
        end

        def initialize(_account_sid, _auth_token); end

        def v1
          self
        end

        def phone_numbers(phone_number = nil)
          if phone_number.to_s.length < 10
            raise RestError, '[HTTP 404] 20404 : Unable to fetch record'
          end

          TwilioBase::Fake::Lookup::PhoneNumber.new(phone_number)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twilio_base-1.11.1101 spec/support/twilio_base/fake/lookup/client.rb
twilio_base-1.11.11 spec/support/twilio_base/fake/lookup/client.rb
twilio_base-1.9.0 spec/support/twilio_base/fake/lookup/client.rb
twilio_base-1.8.0 spec/support/twilio_base/fake/lookup/client.rb