Class: Twilio::REST::Preview::TrustedComms::BrandedChannelContext::ChannelInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.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, branded_channel_sid: nil) ⇒ ChannelInstance

Initialize the ChannelInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • branded_channel_sid (String) (defaults to: nil)

    The unique SID identifier of the Branded Channel.


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

def initialize(version, payload, branded_channel_sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {
      'account_sid' => payload['account_sid'],
      'business_sid' => payload['business_sid'],
      'brand_sid' => payload['brand_sid'],
      'branded_channel_sid' => payload['branded_channel_sid'],
      'phone_number_sid' => payload['phone_number_sid'],
      'phone_number' => payload['phone_number'],
      'url' => payload['url'],
  }
end

Instance Method Details

#account_sidString

Returns Account Sid.

Returns:

  • (String)

    Account Sid.


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

def 
  @properties['account_sid']
end

#brand_sidString

Returns Brand Sid.

Returns:

  • (String)

    Brand Sid.


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

def brand_sid
  @properties['brand_sid']
end

#branded_channel_sidString

Returns Branded Channel Sid.

Returns:

  • (String)

    Branded Channel Sid.


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

def branded_channel_sid
  @properties['branded_channel_sid']
end

#business_sidString

Returns Business Sid.

Returns:

  • (String)

    Business Sid.


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

def business_sid
  @properties['business_sid']
end

#inspectObject

Provide a detailed, user friendly representation


157
158
159
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb', line 157

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

#phone_numberString

Returns Twilio number to assign to the Branded Channel.

Returns:

  • (String)

    Twilio number to assign to the Branded Channel


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

def phone_number
  @properties['phone_number']
end

#phone_number_sidString

Returns Phone Number Sid to be branded.

Returns:

  • (String)

    Phone Number Sid to be branded.


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

def phone_number_sid
  @properties['phone_number_sid']
end

#to_sObject

Provide a user friendly representation


151
152
153
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb', line 151

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

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.


145
146
147
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb', line 145

def url
  @properties['url']
end