Class: Twilio::REST::Fax::V1::FaxInstance
- Inherits:
 - 
      InstanceResource
      
        
- Object
 - InstanceResource
 - Twilio::REST::Fax::V1::FaxInstance
 
 
- Defined in:
 - lib/twilio-ruby/rest/fax/v1/fax.rb
 
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
- 
  
    
      #account_sid  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Account SID.
 - 
  
    
      #api_version  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
The API version used.
 - 
  
    
      #context  ⇒ FaxContext 
    
    
  
  
  
  
  
  
  
  
  
    
Generate an instance context for the instance, the context is capable of performing various actions.
 - 
  
    
      #date_created  ⇒ Time 
    
    
  
  
  
  
  
  
  
  
  
    
The date this fax was created.
 - 
  
    
      #date_updated  ⇒ Time 
    
    
  
  
  
  
  
  
  
  
  
    
The date this fax was updated.
 - 
  
    
      #delete  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    
Deletes the FaxInstance.
 - 
  
    
      #direction  ⇒ fax.Direction 
    
    
  
  
  
  
  
  
  
  
  
    
The direction of this fax.
 - 
  
    
      #duration  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
The time taken to transmit the fax.
 - 
  
    
      #fetch  ⇒ FaxInstance 
    
    
  
  
  
  
  
  
  
  
  
    
Fetch a FaxInstance.
 - 
  
    
      #from  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
The party that sent the fax.
 - 
  
    
      #initialize(version, payload, sid: nil)  ⇒ FaxInstance 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Initialize the FaxInstance.
 - 
  
    
      #links  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Nested resource URLs.
 - 
  
    
      #media  ⇒ media 
    
    
  
  
  
  
  
  
  
  
  
    
Access the media.
 - 
  
    
      #media_sid  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Media SID.
 - 
  
    
      #media_url  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
URL pointing to fax media.
 - 
  
    
      #num_pages  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Number of pages.
 - 
  
    
      #price  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Fax transmission price.
 - 
  
    
      #price_unit  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Currency used for billing.
 - 
  
    
      #quality  ⇒ fax.Quality 
    
    
  
  
  
  
  
  
  
  
  
    
The quality of this fax.
 - 
  
    
      #sid  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
A string that uniquely identifies this fax.
 - 
  
    
      #status  ⇒ fax.Status 
    
    
  
  
  
  
  
  
  
  
  
    
The status of this fax.
 - 
  
    
      #to  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
The party that received the fax.
 - 
  
    
      #to_s  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Provide a user friendly representation.
 - 
  
    
      #update(status: :unset)  ⇒ FaxInstance 
    
    
  
  
  
  
  
  
  
  
  
    
Update the FaxInstance.
 - 
  
    
      #url  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
The URL of this resource.
 
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FaxInstance
Initialize the FaxInstance
      352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 352 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'from' => payload['from'], 'to' => payload['to'], 'quality' => payload['quality'], 'media_sid' => payload['media_sid'], 'media_url' => payload['media_url'], 'num_pages' => payload['num_pages'] == nil ? payload['num_pages'] : payload['num_pages'].to_i, 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i, 'status' => payload['status'], 'direction' => payload['direction'], 'api_version' => payload['api_version'], 'price' => payload['price'].to_f, 'price_unit' => payload['price_unit'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'links' => payload['links'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'], } end  | 
  
Instance Method Details
#account_sid ⇒ String
Returns Account SID.
      406 407 408  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 406 def account_sid @properties['account_sid'] end  | 
  
#api_version ⇒ String
Returns The API version used.
      466 467 468  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 466 def api_version @properties['api_version'] end  | 
  
#context ⇒ FaxContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
      388 389 390 391 392 393 394 395 396  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 388 def context unless @instance_context @instance_context = FaxContext.new( @version, @params['sid'], ) end @instance_context end  | 
  
#date_created ⇒ Time
Returns The date this fax was created.
      484 485 486  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 484 def date_created @properties['date_created'] end  | 
  
#date_updated ⇒ Time
Returns The date this fax was updated.
      490 491 492  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 490 def date_updated @properties['date_updated'] end  | 
  
#delete ⇒ Boolean
Deletes the FaxInstance
      528 529 530  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 528 def delete context.delete end  | 
  
#direction ⇒ fax.Direction
Returns The direction of this fax.
      460 461 462  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 460 def direction @properties['direction'] end  | 
  
#duration ⇒ String
Returns The time taken to transmit the fax.
      448 449 450  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 448 def duration @properties['duration'] end  | 
  
#fetch ⇒ FaxInstance
Fetch a FaxInstance
      509 510 511  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 509 def fetch context.fetch end  | 
  
#from ⇒ String
Returns The party that sent the fax.
      412 413 414  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 412 def from @properties['from'] end  | 
  
#links ⇒ String
Returns Nested resource URLs.
      496 497 498  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 496 def links @properties['links'] end  | 
  
#media ⇒ media
Access the media
      535 536 537  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 535 def media context.media end  | 
  
#media_sid ⇒ String
Returns Media SID.
      430 431 432  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 430 def media_sid @properties['media_sid'] end  | 
  
#media_url ⇒ String
Returns URL pointing to fax media.
      436 437 438  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 436 def media_url @properties['media_url'] end  | 
  
#num_pages ⇒ String
Returns Number of pages.
      442 443 444  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 442 def num_pages @properties['num_pages'] end  | 
  
#price ⇒ String
Returns Fax transmission price.
      472 473 474  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 472 def price @properties['price'] end  | 
  
#price_unit ⇒ String
Returns Currency used for billing.
      478 479 480  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 478 def price_unit @properties['price_unit'] end  | 
  
#quality ⇒ fax.Quality
Returns The quality of this fax.
      424 425 426  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 424 def quality @properties['quality'] end  | 
  
#sid ⇒ String
Returns A string that uniquely identifies this fax.
      400 401 402  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 400 def sid @properties['sid'] end  | 
  
#status ⇒ fax.Status
Returns The status of this fax.
      454 455 456  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 454 def status @properties['status'] end  | 
  
#to ⇒ String
Returns The party that received the fax.
      418 419 420  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 418 def to @properties['to'] end  | 
  
#to_s ⇒ Object
Provide a user friendly representation
      541 542 543 544  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 541 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Fax.V1.FaxInstance #{values}>" end  | 
  
#update(status: :unset) ⇒ FaxInstance
Update the FaxInstance
      519 520 521 522 523  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 519 def update(status: :unset) context.update( status: status, ) end  | 
  
#url ⇒ String
Returns The URL of this resource.
      502 503 504  | 
    
      # File 'lib/twilio-ruby/rest/fax/v1/fax.rb', line 502 def url @properties['url'] end  |