Class: Braintree::Transaction::Installment::Adjustment
- Inherits:
-
Object
- Object
- Braintree::Transaction::Installment::Adjustment
- Includes:
- BaseModule
- Defined in:
- lib/braintree/transaction/installment/adjustment.rb
Defined Under Namespace
Modules: Kind
Instance Attribute Summary collapse
-
#actual_disbursement_date ⇒ Object
readonly
Returns the value of attribute actual_disbursement_date.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#projected_disbursement_date ⇒ Object
readonly
Returns the value of attribute projected_disbursement_date.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Adjustment
constructor
A new instance of Adjustment.
- #inspect ⇒ Object
Methods included from BaseModule
Methods included from BaseModule::Methods
#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class
Constructor Details
#initialize(attributes) ⇒ Adjustment
Returns a new instance of Adjustment.
17 18 19 20 |
# File 'lib/braintree/transaction/installment/adjustment.rb', line 17 def initialize(attributes) set_instance_variables_from_hash attributes unless attributes.nil? @amount = Util.to_big_decimal(amount) end |
Instance Attribute Details
#actual_disbursement_date ⇒ Object (readonly)
Returns the value of attribute actual_disbursement_date.
15 16 17 |
# File 'lib/braintree/transaction/installment/adjustment.rb', line 15 def actual_disbursement_date @actual_disbursement_date end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
12 13 14 |
# File 'lib/braintree/transaction/installment/adjustment.rb', line 12 def amount @amount end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
13 14 15 |
# File 'lib/braintree/transaction/installment/adjustment.rb', line 13 def kind @kind end |
#projected_disbursement_date ⇒ Object (readonly)
Returns the value of attribute projected_disbursement_date.
14 15 16 |
# File 'lib/braintree/transaction/installment/adjustment.rb', line 14 def projected_disbursement_date @projected_disbursement_date end |
Instance Method Details
#inspect ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/braintree/transaction/installment/adjustment.rb', line 22 def inspect attrs = [:amount, :kind, :projected_disbursement_date, :actual_disbursement_date] formatted_attrs = attrs.map do |attr| "#{attr}: #{send(attr).inspect}" end "#<#{formatted_attrs.join(", ")}>" end |