Class: Twilio::REST::Preview::TrustedComms::BrandsInformationInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/trusted_comms/brands_information.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) ⇒ BrandsInformationInstance

Initialize the BrandsInformationInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio


117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 117

def initialize(version, payload)
  super(version)

  # Marshaled Properties
  @properties = {
      'update_time' => Twilio.deserialize_iso8601_datetime(payload['update_time']),
      'file_link' => payload['file_link'],
      'file_link_ttl_in_seconds' => payload['file_link_ttl_in_seconds'],
      'url' => payload['url'],
  }

  # Context
  @instance_context = nil
  @params = {}
end

Instance Method Details

#contextBrandsInformationContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:


137
138
139
140
141
142
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 137

def context
  unless @instance_context
    @instance_context = BrandsInformationContext.new(@version, )
  end
  @instance_context
end

#fetch(if_none_match: :unset) ⇒ BrandsInformationInstance

Fetch the BrandsInformationInstance

Parameters:

Returns:


174
175
176
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 174

def fetch(if_none_match: :unset)
  context.fetch(if_none_match: if_none_match, )
end

Returns The URL to the brands information.

Returns:

  • (String)

    The URL to the brands information


152
153
154
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 152

def file_link
  @properties['file_link']
end

Returns How long will be the `file_link` valid.

Returns:

  • (String)

    How long will be the `file_link` valid


158
159
160
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 158

def file_link_ttl_in_seconds
  @properties['file_link_ttl_in_seconds']
end

#inspectObject

Provide a detailed, user friendly representation


187
188
189
190
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 187

def inspect
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.Preview.TrustedComms.BrandsInformationInstance #{values}>"
end

#to_sObject

Provide a user friendly representation


180
181
182
183
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 180

def to_s
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.Preview.TrustedComms.BrandsInformationInstance #{values}>"
end

#update_timeTime

Returns Creation time of the information retrieved.

Returns:

  • (Time)

    Creation time of the information retrieved


146
147
148
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 146

def update_time
  @properties['update_time']
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource


164
165
166
# File 'lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb', line 164

def url
  @properties['url']
end