Class: MoxiworksPlatform::PresentationLog
- Defined in:
- lib/moxiworks_platform/presentation_log.rb
Overview
Moxi Works Platform PresentationLog
Instance Attribute Summary collapse
-
#agent_fname ⇒ string
First name of agent.
-
#agent_lname ⇒ string
Last name of agent.
-
#agent_office_id ⇒ string
This is the ID of the office for the Agent associated with the presentation.
-
#agent_uuid ⇒ string
This is the Moxi Works Platform ID of the presentation_log which an ActionLog entry is associated with.
-
#created ⇒ string
This is the Unix timestamp for the creation time of the presentation.
-
#edited ⇒ string
This is the Unix timestamp for the last time the presentation was edited.
-
#external_identifier ⇒ string
This is the ID of the Agent utilized by their company.
-
#external_office_id ⇒ string
This is the ID of the office for this Agent utilized by their company.
-
#moxi_works_presentation_id ⇒ string
The unique UUID of the presentation.
-
#pdf_requested ⇒ string
The number of PDF documents requested.
-
#pres_requested ⇒ string
The number of Online presentations requested.
-
#sent_by_agent ⇒ string
The UUID of the agent that sent the presentation to the client.
-
#title ⇒ string
The title of the presentation.
-
#type ⇒ string
Whether the presentation is for a buyer or seller.
Attributes inherited from Resource
Class Method Summary collapse
-
.search(opts = {}) ⇒ Hash
Search For Agents in Moxi Works Platform.
Methods inherited from Resource
accept_header, attr_accessor, attributes, #attributes, auth_header, check_for_error_in_response, content_type_header, #float_attrs, headers, #init_attrs_from_hash, #initialize, #int_attrs, #method_missing, #numeric_attrs, #numeric_value_for, send_request, #to_hash, underscore, underscore_array, underscore_attribute_names, underscore_hash, user_agent_header
Constructor Details
This class inherits a constructor from MoxiworksPlatform::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MoxiworksPlatform::Resource
Instance Attribute Details
#agent_fname ⇒ string
Returns First name of agent. This can be null if there is no data for this attribute.
15 16 17 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 15 def agent_fname @agent_fname end |
#agent_lname ⇒ string
Returns Last name of agent. This can be null if there is no data for this attribute.
22 23 24 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 22 def agent_lname @agent_lname end |
#agent_office_id ⇒ string
Returns This is the ID of the office for the Agent associated with the presentation. This will be an integer.
50 51 52 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 50 def agent_office_id @agent_office_id end |
#agent_uuid ⇒ string
Returns This is the Moxi Works Platform ID of the presentation_log which an ActionLog entry is associated with. This will be an RFC 4122 compliant UUID.
9 10 11 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 9 def agent_uuid @agent_uuid end |
#created ⇒ string
Returns This is the Unix timestamp for the creation time of the presentation.
36 37 38 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 36 def created @created end |
#edited ⇒ string
Returns This is the Unix timestamp for the last time the presentation was edited.
43 44 45 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 43 def edited @edited end |
#external_identifier ⇒ string
Returns This is the ID of the Agent utilized by their company.
85 86 87 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 85 def external_identifier @external_identifier end |
#external_office_id ⇒ string
Returns This is the ID of the office for this Agent utilized by their company.
92 93 94 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 92 def external_office_id @external_office_id end |
#moxi_works_presentation_id ⇒ string
Returns The unique UUID of the presentation. This will be an RFC 4122 compliant UUID.
99 100 101 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 99 def moxi_works_presentation_id @moxi_works_presentation_id end |
#pdf_requested ⇒ string
Returns The number of PDF documents requested.
71 72 73 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 71 def pdf_requested @pdf_requested end |
#pres_requested ⇒ string
Returns The number of Online presentations requested.
78 79 80 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 78 def pres_requested @pres_requested end |
#sent_by_agent ⇒ string
Returns The UUID of the agent that sent the presentation to the client. This will be an RFC 4122 compliant UUID.
64 65 66 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 64 def sent_by_agent @sent_by_agent end |
#title ⇒ string
Returns The title of the presentation. This can be null if there is no data for this attribute.
29 30 31 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 29 def title @title end |
#type ⇒ string
Returns Whether the presentation is for a buyer or seller.
57 58 59 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 57 def type @type end |
Class Method Details
.search(opts = {}) ⇒ Hash
Search For Agents in Moxi Works Platform
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/moxiworks_platform/presentation_log.rb', line 130 def self.search(opts={}) url ||= "#{MoxiworksPlatform::Config.url}/api/presentation_logs" required_opts = [:moxi_works_company_id] required_opts.each do |opt| raise ::MoxiworksPlatform::Exception::ArgumentError, "#{opt} required" if opts[opt].nil? or opts[opt].to_s.empty? end results = MoxiResponseArray.new() json = { 'presentations':[]} RestClient::Request.execute(method: :get, url: url, payload: opts, headers: self.headers) do |response| puts response if MoxiworksPlatform::Config.debug results.headers = response.headers self.check_for_error_in_response(response) json = JSON.parse(response) results.page_number = json['page_number'] if(json.is_a?(Hash) && json['page_number']) results.total_pages = json['total_pages'] if(json.is_a?(Hash) && json['total_pages']) json['presentations'].each do |r| results << MoxiworksPlatform::PresentationLog.new(r) unless r.nil? or r.empty? end json['presentations'] = results end json end |