Module: PortfolioManager::Services::BasicAccount::Accounts::Live
- Included in:
- PortfolioManager::Services::BasicAccount::All::Live
- Defined in:
- lib/portfolio_manager/services/basic_account.rb
Overview
Live Environment
Instance Method Summary collapse
-
#create_customer(account) ⇒ PortfolioManager::Xml::ResponseType
Create Customer.
-
#edit_account(account) ⇒ PortfolioManager::Xml::ResponseType
Edit Account.
-
#edit_customer(customer_id, customer) ⇒ PortfolioManager::Xml::ResponseType
Edit Customer.
-
#get_account ⇒ PortfolioManager::Xml::AccountType, PortfolioManager::Xml::ResponseType
Get Account.
-
#get_billboard_metric_list ⇒ PortfolioManager::Xml::BillboardMetricsType, PortfolioManager::Xml::ResponseType
Get Billboard Metric List.
-
#get_customer(customer_id) ⇒ PortfolioManager::Xml::Customer, PortfolioManager::Xml::ResponseType
Get Customer.
-
#get_customer_custom_field_values(account_id) ⇒ PortfolioManager::Xml::CustomFieldList, PortfolioManager::Xml::ResponseType
Get Customer Custom Field Values.
-
#get_customer_list ⇒ PortfolioManager::Xml::ResponseType
Get Customer List.
Instance Method Details
#create_customer(account) ⇒ PortfolioManager::Xml::ResponseType
Create Customer
This web service creates an account for a customer based on the information provided in the XML request and establishes a connection to your account. It returns the unique identifier to the newly created account and a link to the corresponding web service to retrieve it.
After creating a new Portfolio Manager account for your customer, you may want to provide them their user account information (i.e., username, password, security questions, etc.). If you decide to provide them this information, you will have to securely communicate this information to your customer on your own. None of the Portfolio Manager web services will transmit this user information to your customer for you.
42 43 44 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 42 def create_customer(account) request(Net::HTTP::Post, path_for("customer"), {}, {}, account, "account", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#edit_account(account) ⇒ PortfolioManager::Xml::ResponseType
Edit Account
This web service updates your account based on the information provided in the XML request. It returns the unique identifier to the updated account and a link to the corresponding web service to retrieve it. If the optional “billboardMetric” element is included, this setting will clear any previously set property level billboard metric settings for all properties within the authenticated user’s account.
61 62 63 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 61 def edit_account(account) request(Net::HTTP::Put, path_for("account"), {}, {}, account, "account", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#edit_customer(customer_id, customer) ⇒ PortfolioManager::Xml::ResponseType
Edit Customer
Updates an account for your customer that you are already connected to. If the optional “billboardMetric” element is included, this setting will clear any previously set property level billboard metric settings for all properties within the specified customer’s account.
79 80 81 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 79 def edit_customer(customer_id, customer) request(Net::HTTP::Put, path_for("customer", customer_id), {}, {}, customer, "customer", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#get_account ⇒ PortfolioManager::Xml::AccountType, PortfolioManager::Xml::ResponseType
Get Account
This web service retrieves your account information that includes your username, password, and contact information.
92 93 94 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 92 def get_account request(Net::HTTP::Get, path_for("account"), {}, {}, nil, nil, PortfolioManager::Xml::AccountType, basic_auth: true) end |
#get_billboard_metric_list ⇒ PortfolioManager::Xml::BillboardMetricsType, PortfolioManager::Xml::ResponseType
Get Billboard Metric List
This web service returns a list of metrics that can be used for the “billboard” display. For more information on how to set the billboard display, see the “Account” and “Property” documentation sections.
107 108 109 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 107 def get_billboard_metric_list request(Net::HTTP::Get, path_for("billboardMetric", "list"), {}, {}, nil, nil, PortfolioManager::Xml::BillboardMetricsType, basic_auth: true) end |
#get_customer(customer_id) ⇒ PortfolioManager::Xml::Customer, PortfolioManager::Xml::ResponseType
Get Customer
This web service retrieves account information for a specific customer that you are connected to.
121 122 123 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 121 def get_customer(customer_id) request(Net::HTTP::Get, path_for("customer", customer_id), {}, {}, nil, nil, PortfolioManager::Xml::Customer, basic_auth: true) end |
#get_customer_custom_field_values(account_id) ⇒ PortfolioManager::Xml::CustomFieldList, PortfolioManager::Xml::ResponseType
Get Customer Custom Field Values
This web service returns a list of custom fields and their values for a specific customer.
135 136 137 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 135 def get_customer_custom_field_values(account_id) request(Net::HTTP::Get, path_for("account", account_id, "customFieldList"), {}, {}, nil, nil, PortfolioManager::Xml::CustomFieldList, basic_auth: true) end |
#get_customer_list ⇒ PortfolioManager::Xml::ResponseType
Get Customer List
This web service returns a list of customers that you are connected to.
148 149 150 |
# File 'lib/portfolio_manager/services/basic_account.rb', line 148 def get_customer_list request(Net::HTTP::Get, path_for("customer", "list"), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |