Class: Postio::PhoneResource

Inherits:
Object
  • Object
show all
Defined in:
lib/postio/client.rb

Overview

Resource: /phone/*

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ PhoneResource

Returns a new instance of PhoneResource.



202
# File 'lib/postio/client.rb', line 202

def initialize(client) = (@client = client)

Instance Method Details

#validate(number) ⇒ Object



204
205
206
207
208
# File 'lib/postio/client.rb', line 204

def validate(number)
  Models::PhoneEnvelope.from_hash(
    @client.request("/phone/#{URI.encode_www_form_component(number)}")
  )
end