Class: Twilio::REST::Pricing::V1::VoiceInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ VoiceInstance

Initialize the VoiceInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio



99
100
101
102
103
104
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 99

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



132
133
134
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 132

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

Returns The links.

Returns:

  • (String)

    The links



120
121
122
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 120

def links
  @properties['links']
end

#nameString

Returns The name.

Returns:

  • (String)

    The name



108
109
110
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 108

def name
  @properties['name']
end

#to_sObject

Provide a user friendly representation



126
127
128
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 126

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

#urlString

Returns The url.

Returns:

  • (String)

    The url



114
115
116
# File 'lib/twilio-ruby/rest/pricing/v1/voice.rb', line 114

def url
  @properties['url']
end