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

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

Initialize the ChannelInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • business_sid (String) (defaults to: nil)

    The unique SID identifier of the Business.

  • brand_sid (String) (defaults to: nil)

    The unique SID identifier of the Brand.

  • branded_channel_sid (String) (defaults to: nil)

    The unique SID identifier of the Branded Channel.



114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 114

def initialize(version, payload, business_sid: nil, brand_sid: nil, 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.



131
132
133
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 131

def 
  @properties['account_sid']
end

#brand_sidString

Returns Brand Sid.

Returns:

  • (String)

    Brand Sid.



143
144
145
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 143

def brand_sid
  @properties['brand_sid']
end

#branded_channel_sidString

Returns Branded Channel Sid.

Returns:

  • (String)

    Branded Channel Sid.



149
150
151
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 149

def branded_channel_sid
  @properties['branded_channel_sid']
end

#business_sidString

Returns Business Sid.

Returns:

  • (String)

    Business Sid.



137
138
139
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 137

def business_sid
  @properties['business_sid']
end

#inspectObject

Provide a detailed, user friendly representation



179
180
181
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 179

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



161
162
163
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 161

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.



155
156
157
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 155

def phone_number_sid
  @properties['phone_number_sid']
end

#to_sObject

Provide a user friendly representation



173
174
175
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 173

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

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



167
168
169
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb', line 167

def url
  @properties['url']
end