Module: PortfolioManager::Services::Reporting::CustomReportingTemplateManagement::Live
- Included in:
- All::Live
- Defined in:
- lib/portfolio_manager/services/reporting.rb
Overview
Live Environment
Instance Method Summary collapse
-
#add_report_template(report_template) ⇒ PortfolioManager::Xml::ResponseType
Add Report Template.
-
#delete_report_template(template_id) ⇒ PortfolioManager::Xml::ResponseType
Delete Report Template.
-
#edit_report_template(template_id, report_template) ⇒ PortfolioManager::Xml::ResponseType
Edit Report Template.
-
#get_available_metrics_list(group_ids = nil, available_to_custom_metrics = nil) ⇒ PortfolioManager::Xml::ReportMetrics, PortfolioManager::Xml::ResponseType
Get Available Metrics List.
-
#get_report_template(template_id) ⇒ PortfolioManager::Xml::ReportTemplateType, PortfolioManager::Xml::ResponseType
Get Report Template.
-
#get_report_template_list(type = nil) ⇒ PortfolioManager::Xml::ResponseType
Get Report Template List.
Instance Method Details
#add_report_template(report_template) ⇒ PortfolioManager::Xml::ResponseType
Add Report Template
This web service creates a report template in your account based on the template name and set of metrics provided in the XML request. This web service returns the unique identifier to the report template and a link to the corresponding web service to retrieve it. In addition, a unique identifier to the corresponding report and link to the web service to retrieve it are also returned.
The following are limitations you should be aware of:
-
The maximum number of metrics that you are allowed to specify is the same limit that you have in the user interface.
The list of metrics are specified by their unique identifiers and will be configured in the report template based on the order provided in the XML request with the exception of the 4 metrics listed below. The 4 metrics listed below are always included as the first 4 metrics in the report template even if they are not explicitly specified.
-
Property Id (id 448)
-
Property Name (id 443)
-
Parent Property Id (id 449)
-
Parent Property Name (id 1301)
63 64 65 |
# File 'lib/portfolio_manager/services/reporting.rb', line 63 def add_report_template(report_template) request(Net::HTTP::Post, path_for("reports", "templates"), {}, {}, report_template, "reportTemplate", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#delete_report_template(template_id) ⇒ PortfolioManager::Xml::ResponseType
Delete Report Template
This web service deletes a specified report template. The report template must be owned by you. The corresponding report is also deleted. The report template cannot be deleted if it’s submitted for processing or is being generated.
132 133 134 |
# File 'lib/portfolio_manager/services/reporting.rb', line 132 def delete_report_template(template_id) request(Net::HTTP::Delete, path_for("reports", "templates", template_id), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#edit_report_template(template_id, report_template) ⇒ PortfolioManager::Xml::ResponseType
Edit Report Template
This web service updates a specified report template based on the template name and set of metrics provided in the XML request. This web service returns the unique identifier to the report template and a link to the corresponding web service to retrieve it. In addition, a unique identifier to the corresponding report and link to the web service to retrieve it are also returned. The report template must be owned by you.
The following are limitations you should be aware of:
-
The maximum number of metrics that you are allowed to specify is the same limit that you have in the user interface.
The list of metrics are specified by their unique identifiers and will be configured in the report template based on the order provided in the XML request with the exception of the 4 metrics listed below. The 4 metrics listed below are always included as the first 4 metrics in the report template even if they are not explicitly specified.
-
Property Id (id 448)
-
Property Name (id 443)
-
Parent Property Id (id 449)
-
Parent Property Name (id 1301)
116 117 118 |
# File 'lib/portfolio_manager/services/reporting.rb', line 116 def edit_report_template(template_id, report_template) request(Net::HTTP::Put, path_for("reports", "templates", template_id), {}, {}, report_template, "reportTemplate", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#get_available_metrics_list(group_ids = nil, available_to_custom_metrics = nil) ⇒ PortfolioManager::Xml::ReportMetrics, PortfolioManager::Xml::ResponseType
Get Available Metrics List
This web service returns a list of all available metrics that can be used in a report template.
26 27 28 29 30 31 |
# File 'lib/portfolio_manager/services/reporting.rb', line 26 def get_available_metrics_list(group_ids = nil, available_to_custom_metrics = nil) request(Net::HTTP::Get, path_for("reports", "metrics"), { "groupIds" => (group_ids.nil? || group_ids.empty?) ? nil : group_ids.collect(&:to_s).join(","), "availableToCustomMetrics" => available_to_custom_metrics, }, {}, nil, nil, PortfolioManager::Xml::ReportMetrics, basic_auth: true) end |
#get_report_template(template_id) ⇒ PortfolioManager::Xml::ReportTemplateType, PortfolioManager::Xml::ResponseType
Get Report Template
This web service retrieves information for a specific report template which includes the template name, the set of metrics, and the unique identifier to the corresponding report. The metrics are listed in the order that they display in the report. The report template must be owned by you.
80 81 82 |
# File 'lib/portfolio_manager/services/reporting.rb', line 80 def get_report_template(template_id) request(Net::HTTP::Get, path_for("reports", "templates", template_id), {}, {}, nil, nil, PortfolioManager::Xml::ReportTemplateType, basic_auth: true) end |
#get_report_template_list(type = nil) ⇒ PortfolioManager::Xml::ResponseType
Get Report Template List
This web service returns a list of report templates in your account.
145 146 147 148 149 |
# File 'lib/portfolio_manager/services/reporting.rb', line 145 def get_report_template_list(type = nil) request(Net::HTTP::Get, path_for("reports", "templates"), { "type" => type, }, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |