Class: Twilio::REST::Pricing::V2::VoiceInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/pricing/v2/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



86
87
88
89
90
91
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 86

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



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

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

Returns The links.

Returns:

  • (String)

    The links



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

def links
  @properties['links']
end

#nameString

Returns The name.

Returns:

  • (String)

    The name



95
96
97
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 95

def name
  @properties['name']
end

#to_sObject

Provide a user friendly representation



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

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

#urlString

Returns The url.

Returns:

  • (String)

    The url



101
102
103
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 101

def url
  @properties['url']
end