Class: Twilio::REST::Pricing::V1::PhoneNumberInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/pricing/v1/phone_number.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ PhoneNumberInstance

Initialize the PhoneNumberInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio



83
84
85
86
87
88
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 83

def initialize(version, payload)
  super(version)

  # Marshaled Properties
  @properties = {'name' => payload['name'], 'url' => payload['url'], 'links' => payload['links']}
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



116
117
118
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 116

def inspect
  "<Twilio.Pricing.V1.PhoneNumberInstance>"
end

Returns The links.

Returns:

  • (String)

    The links



104
105
106
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 104

def links
  @properties['links']
end

#nameString

Returns The name.

Returns:

  • (String)

    The name



92
93
94
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 92

def name
  @properties['name']
end

#to_sObject

Provide a user friendly representation



110
111
112
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 110

def to_s
  "<Twilio.Pricing.V1.PhoneNumberInstance>"
end

#urlString

Returns The url.

Returns:

  • (String)

    The url



98
99
100
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number.rb', line 98

def url
  @properties['url']
end