Class: LockstepSdk::CashflowReportModel
- Inherits:
-
Object
- Object
- LockstepSdk::CashflowReportModel
- Defined in:
- lib/lockstep_sdk/models/cashflow_report_model.rb
Overview
Represents the cashflow report based on a timeframe
Instance Attribute Summary collapse
-
#base_currency_code ⇒ String
The base currency code of the group.
-
#invoices_billed ⇒ Double
Amount of invoices billed based in the timeframe in the group’s base currency.
-
#invoices_billed_count ⇒ Int32
Number of invoices billed in the timeframe.
-
#payments_collected ⇒ Double
Amount of payments collected based in the timeframe in the group’s base currency.
-
#payments_collected_count ⇒ Int32
Number of payments collected based in the timeframe.
-
#timeframe ⇒ Int32
Timeframe in days the cashflow report is generated on.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ CashflowReportModel
constructor
Initialize the CashflowReportModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ CashflowReportModel
Initialize the CashflowReportModel using the provided prototype
25 26 27 28 29 30 31 32 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 25 def initialize(params = {}) @timeframe = params.dig(:timeframe) @base_currency_code = params.dig(:base_currency_code) @payments_collected = params.dig(:payments_collected) @payments_collected_count = params.dig(:payments_collected_count) @invoices_billed = params.dig(:invoices_billed) @invoices_billed_count = params.dig(:invoices_billed_count) end |
Instance Attribute Details
#base_currency_code ⇒ String
Returns The base currency code of the group.
40 41 42 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 40 def base_currency_code @base_currency_code end |
#invoices_billed ⇒ Double
Returns Amount of invoices billed based in the timeframe in the group’s base currency.
52 53 54 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 52 def invoices_billed @invoices_billed end |
#invoices_billed_count ⇒ Int32
Returns Number of invoices billed in the timeframe.
56 57 58 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 56 def invoices_billed_count @invoices_billed_count end |
#payments_collected ⇒ Double
Returns Amount of payments collected based in the timeframe in the group’s base currency.
44 45 46 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 44 def payments_collected @payments_collected end |
#payments_collected_count ⇒ Int32
Returns Number of payments collected based in the timeframe.
48 49 50 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 48 def payments_collected_count @payments_collected_count end |
#timeframe ⇒ Int32
Returns Timeframe in days the cashflow report is generated on.
36 37 38 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 36 def timeframe @timeframe end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 60 def as_json(={}) { 'timeframe' => @timeframe, 'baseCurrencyCode' => @base_currency_code, 'paymentsCollected' => @payments_collected, 'paymentsCollectedCount' => @payments_collected_count, 'invoicesBilled' => @invoices_billed, 'invoicesBilledCount' => @invoices_billed_count, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
73 74 75 |
# File 'lib/lockstep_sdk/models/cashflow_report_model.rb', line 73 def to_json(*) "[#{as_json(*).to_json(*)}]" end |