Class: LockstepSdk::PayablesSummaryReportModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/payables_summary_report_model.rb

Overview

Represents the payables summary report based on a timeframe

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PayablesSummaryReportModel

Initialize the PayablesSummaryReportModel using the provided prototype



25
26
27
28
29
30
31
32
33
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 25

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @timeframe = params.dig(:timeframe)
    @base_currency_code = params.dig(:base_currency_code)
    @total_payments_amount = params.dig(:total_payments_amount)
    @total_payments_count = params.dig(:total_payments_count)
    @total_amount_billed = params.dig(:total_amount_billed)
    @total_bills_count = params.dig(:total_bills_count)
end

Instance Attribute Details

#base_currency_codeString



45
46
47
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 45

def base_currency_code
  @base_currency_code
end

#group_keyUuid



37
38
39
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 37

def group_key
  @group_key
end

#timeframeInt32



41
42
43
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 41

def timeframe
  @timeframe
end

#total_amount_billedDouble



57
58
59
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 57

def total_amount_billed
  @total_amount_billed
end

#total_bills_countInt32



61
62
63
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 61

def total_bills_count
  @total_bills_count
end

#total_payments_amountDouble



49
50
51
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 49

def total_payments_amount
  @total_payments_amount
end

#total_payments_countInt32



53
54
55
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 53

def total_payments_count
  @total_payments_count
end

Instance Method Details

#as_json(options = {}) ⇒ object



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 65

def as_json(options={})
    {
        'groupKey' => @group_key,
        'timeframe' => @timeframe,
        'baseCurrencyCode' => @base_currency_code,
        'totalPaymentsAmount' => @total_payments_amount,
        'totalPaymentsCount' => @total_payments_count,
        'totalAmountBilled' => @total_amount_billed,
        'totalBillsCount' => @total_bills_count,
    }
end

#to_json(*options) ⇒ String



79
80
81
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 79

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end