class Twilio::REST::Preview::BulkExports::ExportContext::DayInstance

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 help@twilio.com.

Public Class Methods

new(version, payload, resource_type: nil, day: nil) click to toggle source

Initialize the DayInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] resource_type The type of communication – Messages, Calls,

Conferences, and Participants

@param [String] day The ISO 8601 format date of the resources in the file, for a

UTC day

@return [DayInstance] DayInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
204 def initialize(version, payload, resource_type: nil, day: nil)
205   super(version)
206 
207   # Marshaled Properties
208   @properties = {
209       'redirect_to' => payload['redirect_to'],
210       'day' => payload['day'],
211       'size' => payload['size'].to_i,
212       'create_date' => payload['create_date'],
213       'friendly_name' => payload['friendly_name'],
214       'resource_type' => payload['resource_type'],
215   }
216 
217   # Context
218   @instance_context = nil
219   @params = {'resource_type' => resource_type, 'day' => day || @properties['day'], }
220 end

Public Instance Methods

context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [DayContext] DayContext for this DayInstance

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
226 def context
227   unless @instance_context
228     @instance_context = DayContext.new(@version, @params['resource_type'], @params['day'], )
229   end
230   @instance_context
231 end
create_date() click to toggle source

@return [String] The date when resource is created

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
253 def create_date
254   @properties['create_date']
255 end
day() click to toggle source

@return [String] The date of the data in the file

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
241 def day
242   @properties['day']
243 end
fetch() click to toggle source

Fetch the DayInstance @return [DayInstance] Fetched DayInstance

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
272 def fetch
273   context.fetch
274 end
friendly_name() click to toggle source

@return [String] The friendly name specified when creating the job

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
259 def friendly_name
260   @properties['friendly_name']
261 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
285 def inspect
286   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
287   "<Twilio.Preview.BulkExports.DayInstance #{values}>"
288 end
redirect_to() click to toggle source

@return [String] The redirect_to

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
235 def redirect_to
236   @properties['redirect_to']
237 end
resource_type() click to toggle source

@return [String] The type of communication – Messages, Calls, Conferences, and Participants

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
265 def resource_type
266   @properties['resource_type']
267 end
size() click to toggle source

@return [String] Size of the file in bytes

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
247 def size
248   @properties['size']
249 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
278 def to_s
279   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
280   "<Twilio.Preview.BulkExports.DayInstance #{values}>"
281 end