Class: ReportsClient

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/clients/reports.rb

Instance Method Summary collapse

Constructor Details

#initialize(lockstepsdk) ⇒ ReportsClient

Initialize the ReportsClient class with a lockstepsdk instance.

Parameters:

  • lockstepsdk (LockstepApi)

    The Lockstep API client object for this connection



22
23
24
# File 'lib/lockstep_sdk/clients/reports.rb', line 22

def initialize(lockstepsdk)
    @lockstepsdk = lockstepsdk
end

Instance Method Details

#accounts_receivable_aging_headerObject

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`.



89
90
91
92
# File 'lib/lockstep_sdk/clients/reports.rb', line 89

def accounts_receivable_aging_header()
    path = "/api/v1/Reports/ar-aging-header"
    @lockstepsdk.request(:get, path, nil, nil)
end

#accounts_receivable_header(reportDate:, companyId:) ⇒ Object

Retrieves AR header information up to the date specified.

Parameters:

  • reportDate (date)

    The date of the report.

  • companyId (uuid)

    Include a company to get AR data for a specific company, leave as null to include all Companies.



60
61
62
63
64
# File 'lib/lockstep_sdk/clients/reports.rb', line 60

def accounts_receivable_header(reportDate:, companyId:)
    path = "/api/v1/Reports/ar-header"
    params = {:reportDate => reportDate, :companyId => companyId}
    @lockstepsdk.request(:get, path, nil, params)
end

#attachments_header_information(companyId:) ⇒ Object

Retrieves Attachment Header information for the requested companyId.

The Attachment Header report contains aggregated information about the `TotalAttachments`, `TotalArchived`, and `TotalActive` attachment classifications.

Parameters:

  • companyId (uuid)

    Include a specific company to get Attachment data for, leave as null to include all Companies.



99
100
101
102
103
# File 'lib/lockstep_sdk/clients/reports.rb', line 99

def attachments_header_information(companyId:)
    path = "/api/v1/Reports/attachments-header"
    params = {:companyId => companyId}
    @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.

Parameters:

  • timeframe (int32)

    Number of days of data to include for the Cash Flow Report (default is 30 days from today)



32
33
34
35
36
# File 'lib/lockstep_sdk/clients/reports.rb', line 32

def cash_flow(timeframe:)
    path = "/api/v1/Reports/cashflow"
    params = {:timeframe => timeframe}
    @lockstepsdk.request(:get, path, nil, params)
end

#daily_sales_outstandingObject

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.



42
43
44
45
# File 'lib/lockstep_sdk/clients/reports.rb', line 42

def daily_sales_outstanding()
    path = "/api/v1/Reports/dailysalesoutstanding"
    @lockstepsdk.request(:get, path, nil, nil)
end

#risk_ratesObject

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.



51
52
53
54
# File 'lib/lockstep_sdk/clients/reports.rb', line 51

def risk_rates()
    path = "/api/v1/Reports/riskrates"
    @lockstepsdk.request(:get, path, nil, nil)
end