Class: ReportsClient
- Inherits:
-
Object
- Object
- ReportsClient
- Defined in:
- lib/lockstep_sdk/clients/reports_client.rb
Instance Method Summary collapse
-
#accounts_payable_aging_header ⇒ Object
Retrieves AP Aging Header information report broken down by aging bucket.
-
#accounts_payable_header(report_date:, company_id:) ⇒ Object
Retrieves AP header information up to the date specified.
-
#accounts_receivable_aging_header ⇒ Object
Retrieves AR Aging Header information report broken down by aging bucket.
-
#accounts_receivable_header(report_date:, company_id:) ⇒ Object
Retrieves AR header information up to the date specified.
-
#attachments_header_information(company_id:) ⇒ Object
Retrieves Attachment Header information for the requested companyId.
-
#balance_sheet_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:) ⇒ Object
Generates a balance sheet for the given time range.
-
#cash_flow(timeframe:) ⇒ Object
Retrieves a current Cash Flow report for this account.
-
#cash_flow_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:) ⇒ Object
Generates a cash flow statement for the given time range.
-
#daily_sales_outstanding ⇒ Object
Retrieves a current Daily Sales Outstanding (DSO) report for this account.
-
#days_payable_outstanding ⇒ Object
Retrieves a current Days Payable Outstanding (DPO) report for this account.
-
#days_payable_outstanding_summary(report_date:, filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Retrieves a summary for each vendor that includes a count of their outstanding bills, the total amount outstanding, and their daily payable outstanding value.
-
#days_payable_outstanding_summary_total(report_date:) ⇒ Object
Retrieves total number of vendors, bills, the total amount outstanding, and the daily payable outstanding value for a group.
-
#income_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:) ⇒ Object
Generates an Income Statement for the given time range.
-
#initialize(connection) ⇒ ReportsClient
constructor
Initialize the ReportsClient class with an API client instance.
-
#invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:, ap_report:) ⇒ Object
The Aging Report contains information about the total dollar value of invoices broken down by their age.
-
#payables_coming_due ⇒ Object
Retrieves payable amount due for 4 time buckets (Today, 7 Days from Today, 14 Days from Today, and 30 Days from Today).
-
#payables_coming_due_header(report_date:) ⇒ Object
Retrieves total number of vendors, bills, the total amount outstanding, for a group.
-
#payables_coming_due_summary(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Payables coming due represents the amount of cash required to pay vendor bills based on the due dates of the bills.
-
#payables_summary_report(timeframe:) ⇒ Object
Retrieves a current Payables Summary report for this account.
-
#risk_rates ⇒ Object
Retrieves a current Risk Rate report for this account.
-
#trial_balance_report(start_date:, end_date:, app_enrollment_id:) ⇒ Object
Generates a Trial Balance Report for the given time range.
Constructor Details
#initialize(connection) ⇒ ReportsClient
Initialize the ReportsClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#accounts_payable_aging_header ⇒ Object
Retrieves AP Aging Header information report broken down by aging bucket.
The AP Aging Header report contains aggregated information about the TotalBillsPastDue, TotalVendors, and their respective PercentageOfTotalAp grouped by their aging ReportBucket.
171 172 173 174 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 171 def accounts_payable_aging_header() path = "/api/v1/Reports/ap-aging-header" @connection.request(:get, path, nil, nil) end |
#accounts_payable_header(report_date:, company_id:) ⇒ Object
Retrieves AP header information up to the date specified.
129 130 131 132 133 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 129 def accounts_payable_header(report_date:, company_id:) path = "/api/v1/Reports/ap-header" params = {:reportDate => report_date, :companyId => company_id} @connection.request(:get, path, nil, params) end |
#accounts_receivable_aging_header ⇒ Object
Retrieves AR Aging Header information report broken down by aging bucket.
The AR Aging Header report contains aggregated information about the TotalInvoicesPastDue, TotalCustomers, and their respective PercentageOfTotalAr grouped by their aging ReportBucket.
161 162 163 164 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 161 def accounts_receivable_aging_header() path = "/api/v1/Reports/ar-aging-header" @connection.request(:get, path, nil, nil) end |
#accounts_receivable_header(report_date:, company_id:) ⇒ Object
Retrieves AR header information up to the date specified.
118 119 120 121 122 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 118 def accounts_receivable_header(report_date:, company_id:) path = "/api/v1/Reports/ar-header" params = {:reportDate => report_date, :companyId => company_id} @connection.request(:get, path, nil, params) end |
#attachments_header_information(company_id:) ⇒ Object
Retrieves Attachment Header information for the requested companyId.
The Attachment Header report contains aggregated information about the TotalAttachments, TotalArchived, and TotalActive attachment classifications.
182 183 184 185 186 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 182 def (company_id:) path = "/api/v1/Reports/attachments-header" params = {:companyId => company_id} @connection.request(:get, path, nil, params) end |
#balance_sheet_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:) ⇒ Object
Generates a balance sheet for the given time range.
228 229 230 231 232 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 228 def balance_sheet_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:) path = "/api/v1/Reports/balance-sheet" params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id, :columnOption => column_option, :displayDepth => display_depth, :comparisonPeriod => comparison_period, :showCurrencyDifference => show_currency_difference, :showPercentageDifference => show_percentage_difference} @connection.request(:get, path, nil, params) end |
#cash_flow(timeframe:) ⇒ Object
Retrieves a current Cash Flow report for this account.
The Cash Flow report indicates the amount of payments retrieved and invoices billed within a given timeframe. You can use this report to determine the overall balance of money coming into and out of your accounts receivable and accounts payable businesses.
33 34 35 36 37 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 33 def cash_flow(timeframe:) path = "/api/v1/Reports/cashflow" params = {:timeframe => timeframe} @connection.request(:get, path, nil, params) end |
#cash_flow_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:) ⇒ Object
Generates a cash flow statement for the given time range.
242 243 244 245 246 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 242 def cash_flow_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:) path = "/api/v1/Reports/cash-flow-statement" params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id, :columnOption => column_option, :displayDepth => display_depth} @connection.request(:get, path, nil, params) end |
#daily_sales_outstanding ⇒ Object
Retrieves a current Daily Sales Outstanding (DSO) report for this account.
Daily Sales Outstanding, or DSO, is a metric that indicates the average number of days that it takes for an invoice to be fully paid. You can use this report to identify whether a company is improving on its ability to collect on invoices.
56 57 58 59 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 56 def daily_sales_outstanding() path = "/api/v1/Reports/dailysalesoutstanding" @connection.request(:get, path, nil, nil) end |
#days_payable_outstanding ⇒ Object
Retrieves a current Days Payable Outstanding (DPO) report for this account.
Days payable outstanding (DPO) is a financial ratio that indicates the average time (in days) that a company takes to pay its bills to its trade creditors, which may include suppliers, vendors, or financiers.
66 67 68 69 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 66 def days_payable_outstanding() path = "/api/v1/Reports/daily-payable-outstanding" @connection.request(:get, path, nil, nil) end |
#days_payable_outstanding_summary(report_date:, filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Retrieves a summary for each vendor that includes a count of their outstanding bills, the total amount outstanding, and their daily payable outstanding value.
Days payable outstanding (DPO) is a financial ratio that indicates the average time (in days) that a company takes to pay its bills to its trade creditors, which may include suppliers, vendors, or financiers.
More information on querying can be found on the [Searchlight Query Language](developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
261 262 263 264 265 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 261 def days_payable_outstanding_summary(report_date:, filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Reports/daily-payable-outstanding-summary" params = {:reportDate => report_date, :filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#days_payable_outstanding_summary_total(report_date:) ⇒ Object
Retrieves total number of vendors, bills, the total amount outstanding, and the daily payable outstanding value for a group.
Days payable outstanding (DPO) is a financial ratio that indicates the average time (in days) that a company takes to pay its bills to its trade creditors, which may include suppliers, vendors, or financiers.
273 274 275 276 277 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 273 def days_payable_outstanding_summary_total(report_date:) path = "/api/v1/Reports/daily-payable-outstanding-summary-total" params = {:reportDate => report_date} @connection.request(:get, path, nil, params) end |
#income_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:) ⇒ Object
Generates an Income Statement for the given time range.
211 212 213 214 215 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 211 def income_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:) path = "/api/v1/Reports/income-statement" params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id, :columnOption => column_option, :displayDepth => display_depth, :comparisonPeriod => comparison_period, :showCurrencyDifference => show_currency_difference, :showPercentageDifference => show_percentage_difference} @connection.request(:get, path, nil, params) end |
#invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:, ap_report:) ⇒ Object
The Aging Report contains information about the total dollar value of invoices broken down by their age. Last default or specified bucket treated as a catch all bucket for values that fit in that bucket or beyond.
You can specify viewing parameters for the aging report such as currency code and date bucket configuration. You can also view aging data for an entire account or a specific company.
This information is recalculated when invoice data changes. After each invoice data change occurs, Lockstep queues up a calculation based on the current invoice data at that time. This information is calculated and persisted for each customer so that the report will be available quickly.
To force a recalculation of aging data, specify the recalculate option. Note that forcing a recalculation will slow your API response time.
150 151 152 153 154 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 150 def invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:, ap_report:) path = "/api/v1/Reports/aging" params = {:CompanyId => company_id, :Recalculate => recalculate, :CurrencyCode => currency_code, :CurrencyProvider => currency_provider, :Buckets => buckets, :ApReport => ap_report} @connection.request(:get, path, nil, params) end |
#payables_coming_due ⇒ Object
Retrieves payable amount due for 4 time buckets (Today, 7 Days from Today, 14 Days from Today, and 30 Days from Today).
74 75 76 77 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 74 def payables_coming_due() path = "/api/v1/Reports/payables-coming-due" @connection.request(:get, path, nil, nil) end |
#payables_coming_due_header(report_date:) ⇒ Object
Retrieves total number of vendors, bills, the total amount outstanding, for a group.
97 98 99 100 101 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 97 def payables_coming_due_header(report_date:) path = "/api/v1/Reports/payables-coming-due-header" params = {:reportDate => report_date} @connection.request(:get, path, nil, params) end |
#payables_coming_due_summary(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Payables coming due represents the amount of cash required to pay vendor bills based on the due dates of the bills. Each bucket represents total amount due within the time period based on open Payables as of today.
87 88 89 90 91 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 87 def payables_coming_due_summary(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Reports/payables-coming-due-summary" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#payables_summary_report(timeframe:) ⇒ Object
Retrieves a current Payables Summary report for this account.
The Payables Summary report indicates the amount of payments sent and bills received within a given timeframe. You can use this report to determine the overall balance of money coming into and out of your accounts receivable and accounts payable businesses.
45 46 47 48 49 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 45 def payables_summary_report(timeframe:) path = "/api/v1/Reports/payables-summary" params = {:timeframe => timeframe} @connection.request(:get, path, nil, params) end |
#risk_rates ⇒ Object
Retrieves a current Risk Rate report for this account.
Risk Rate is a metric that indicates the percentage of total AR balance left unpaid after 90 days. You can use this report to identify the percentage of invoice value that is not being collected in a timely manner.
108 109 110 111 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 108 def risk_rates() path = "/api/v1/Reports/riskrates" @connection.request(:get, path, nil, nil) end |
#trial_balance_report(start_date:, end_date:, app_enrollment_id:) ⇒ Object
Generates a Trial Balance Report for the given time range.
194 195 196 197 198 |
# File 'lib/lockstep_sdk/clients/reports_client.rb', line 194 def trial_balance_report(start_date:, end_date:, app_enrollment_id:) path = "/api/v1/Reports/trial-balance" params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id} @connection.request(:get, path, nil, params) end |