Class: ReportsClient
- Inherits:
-
Object
- Object
- ReportsClient
- Defined in:
- lib/lockstep_sdk/clients/reports.rb
Instance Method Summary collapse
-
#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.
-
#cash_flow(timeframe:) ⇒ Object
Retrieves a current Cash Flow report for this account.
-
#daily_sales_outstanding ⇒ Object
Retrieves a current Daily Sales Outstanding (DSO) report for this account.
-
#initialize(lockstepsdk) ⇒ ReportsClient
constructor
Initialize the ReportsClient class with a lockstepsdk instance.
-
#invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:) ⇒ Object
The Aging Report contains information about the total dollar value of invoices broken down by their age.
-
#risk_rates ⇒ Object
Retrieves a current Risk Rate report for this account.
Constructor Details
#initialize(lockstepsdk) ⇒ ReportsClient
Initialize the ReportsClient class with a lockstepsdk instance.
24 25 26 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 24 def initialize(lockstepsdk) @lockstepsdk = lockstepsdk end |
Instance Method Details
#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`.
91 92 93 94 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 91 def accounts_receivable_aging_header() path = "/api/v1/Reports/ar-aging-header" @lockstepsdk.request(:get, path, nil, nil) end |
#accounts_receivable_header(report_date:, company_id:) ⇒ Object
Retrieves AR header information up to the date specified.
62 63 64 65 66 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 62 def accounts_receivable_header(report_date:, company_id:) path = "/api/v1/Reports/ar-header" params = {:reportDate => report_date, :companyId => company_id} @lockstepsdk.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.
101 102 103 104 105 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 101 def (company_id:) path = "/api/v1/Reports/attachments-header" params = {:companyId => company_id} @lockstepsdk.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.
34 35 36 37 38 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 34 def cash_flow(timeframe:) path = "/api/v1/Reports/cashflow" params = {:timeframe => timeframe} @lockstepsdk.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.
44 45 46 47 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 44 def daily_sales_outstanding() path = "/api/v1/Reports/dailysalesoutstanding" @lockstepsdk.request(:get, path, nil, nil) end |
#invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:) ⇒ 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.
81 82 83 84 85 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 81 def invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:) path = "/api/v1/Reports/aging" params = {:CompanyId => company_id, :Recalculate => recalculate, :CurrencyCode => currency_code, :CurrencyProvider => currency_provider, :Buckets => buckets} @lockstepsdk.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.
53 54 55 56 |
# File 'lib/lockstep_sdk/clients/reports.rb', line 53 def risk_rates() path = "/api/v1/Reports/riskrates" @lockstepsdk.request(:get, path, nil, nil) end |