Class: Twilio::REST::Insights::V2::ReportInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V2::ReportInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v2/report.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#context ⇒ ReportContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ ReportInstance
Fetch the ReportInstance.
-
#initialize(version, payload, report_id: nil) ⇒ ReportInstance
constructor
Initialize the ReportInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #report ⇒ AccountReport
-
#report_id ⇒ String
The report identifier as Voice Insights Report TTID.
- #request_meta ⇒ ReportMetadata
- #status ⇒ ReportStatus
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, report_id: nil) ⇒ ReportInstance
Initialize the ReportInstance
692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 692 def initialize(version, payload , report_id: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'report_id' => payload['report_id'], 'status' => payload['status'], 'request_meta' => payload['request_meta'], 'url' => payload['url'], 'report' => payload['report'], } # Context @instance_context = nil @params = { 'report_id' => report_id || @properties['report_id'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
724 725 726 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 724 def account_sid @properties['account_sid'] end |
#context ⇒ ReportContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
715 716 717 718 719 720 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 715 def context unless @instance_context @instance_context = ReportContext.new(@version , @params['report_id']) end @instance_context end |
#fetch ⇒ ReportInstance
Fetch the ReportInstance
761 762 763 764 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 761 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
775 776 777 778 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 775 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V2.ReportInstance #{values}>" end |
#report ⇒ AccountReport
754 755 756 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 754 def report @properties['report'] end |
#report_id ⇒ String
Returns The report identifier as Voice Insights Report TTID.
730 731 732 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 730 def report_id @properties['report_id'] end |
#request_meta ⇒ ReportMetadata
742 743 744 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 742 def @properties['request_meta'] end |
#status ⇒ ReportStatus
736 737 738 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 736 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
768 769 770 771 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 768 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V2.ReportInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
748 749 750 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 748 def url @properties['url'] end |