Class: Twilio::REST::Preview::TrustedComms::DeviceInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/preview/trusted_comms/device.rb

Overview

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ DeviceInstance

Initialize the DeviceInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio



95
96
97
98
99
100
101
102
103
104
105
# File 'lib/twilio-ruby/rest/preview/trusted_comms/device.rb', line 95

def initialize(version, payload)
  super(version)

  # Marshaled Properties
  @properties = {
      'sid' => payload['sid'],
      'phone_number' => payload['phone_number'],
      'binding_sid' => payload['binding_sid'],
      'url' => payload['url'],
  }
end

Instance Method Details

#binding_sidString

Returns Binding Sid.

Returns:

  • (String)

    Binding Sid.



121
122
123
# File 'lib/twilio-ruby/rest/preview/trusted_comms/device.rb', line 121

def binding_sid
  @properties['binding_sid']
end

#inspectObject

Provide a detailed, user friendly representation



139
140
141
# File 'lib/twilio-ruby/rest/preview/trusted_comms/device.rb', line 139

def inspect
  "<Twilio.Preview.TrustedComms.DeviceInstance>"
end

#phone_numberString

Returns The end user Phone Number.

Returns:

  • (String)

    The end user Phone Number



115
116
117
# File 'lib/twilio-ruby/rest/preview/trusted_comms/device.rb', line 115

def phone_number
  @properties['phone_number']
end

#sidString

Returns A string that uniquely identifies this Device.

Returns:

  • (String)

    A string that uniquely identifies this Device.



109
110
111
# File 'lib/twilio-ruby/rest/preview/trusted_comms/device.rb', line 109

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation



133
134
135
# File 'lib/twilio-ruby/rest/preview/trusted_comms/device.rb', line 133

def to_s
  "<Twilio.Preview.TrustedComms.DeviceInstance>"
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



127
128
129
# File 'lib/twilio-ruby/rest/preview/trusted_comms/device.rb', line 127

def url
  @properties['url']
end