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


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

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


139
140
141
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 139

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

Returns The URLs of the related Countries and Numbers resources.

Returns:

  • (String)

    The URLs of the related Countries and Numbers resources


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

def links
  @properties['links']
end

#nameString

Returns The resource name.

Returns:

  • (String)

    The resource name


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

def name
  @properties['name']
end

#to_sObject

Provide a user friendly representation


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

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

#urlString

Returns The absolute URL of the resource.

Returns:

  • (String)

    The absolute URL of the resource


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

def url
  @properties['url']
end