Class: LockstepSdk::PaymentSummaryTotalsModel

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

Overview

The totals for a Payment Summary

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PaymentSummaryTotalsModel

Initialize the PaymentSummaryTotalsModel using the provided prototype



25
26
27
28
# File 'lib/lockstep_sdk/models/payment_summary_totals_model.rb', line 25

def initialize(params = {})
    @total_paid_amount = params.dig(:total_paid_amount)
    @total_unapplied_balance = params.dig(:total_unapplied_balance)
end

Instance Attribute Details

#total_paid_amountDouble

Returns The total amount paid.

Returns:

  • (Double)

    The total amount paid.



32
33
34
# File 'lib/lockstep_sdk/models/payment_summary_totals_model.rb', line 32

def total_paid_amount
  @total_paid_amount
end

#total_unapplied_balanceDouble

Returns The total amount unapplied.

Returns:

  • (Double)

    The total amount unapplied.



36
37
38
# File 'lib/lockstep_sdk/models/payment_summary_totals_model.rb', line 36

def total_unapplied_balance
  @total_unapplied_balance
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



40
41
42
43
44
45
# File 'lib/lockstep_sdk/models/payment_summary_totals_model.rb', line 40

def as_json(options={})
    {
        'totalPaidAmount' => @total_paid_amount,
        'totalUnappliedBalance' => @total_unapplied_balance,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



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

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