Class: Osm::OnlinePayment::Schedule::Payment
- Defined in:
- lib/osm/online_payment.rb,
lib/osm/online_payment.rb
Overview
Ensure the constant exists for the validators
Constant Summary
Constants inherited from Model
Instance Attribute Summary collapse
-
#amount ⇒ Sreing
The amount of the payment.
-
#archived ⇒ Boolean
Whether the payment has been archived.
-
#date ⇒ Date
The payment’s due date.
-
#id ⇒ FixNum
The payment’s ID.
-
#name ⇒ String
The name given to the payment.
-
#schedule ⇒ Osm::OnlnePayment::Schedule
The schedule the payment belongs to.
Instance Method Summary collapse
-
#initialize ⇒ Object
constructor
Initialize a new Payment.
- #inspect ⇒ Object
-
#past_due?(date = Date.today) ⇒ Boolean
Check if the payment is past due (or will be past due on the passed date).
Methods inherited from Model
#<, #<=, #<=>, #>, #>=, #between?, #changed_attributes, configure, #reset_changed_attributes, #to_i
Constructor Details
#initialize ⇒ Object
Initialize a new Payment
|
# File 'lib/osm/online_payment.rb', line 272
|
Instance Attribute Details
#amount ⇒ Sreing
Returns the amount of the payment.
253 |
# File 'lib/osm/online_payment.rb', line 253 attribute :id, type: Integer |
#archived ⇒ Boolean
Returns whether the payment has been archived.
253 |
# File 'lib/osm/online_payment.rb', line 253 attribute :id, type: Integer |
#date ⇒ Date
Returns the payment’s due date.
253 |
# File 'lib/osm/online_payment.rb', line 253 attribute :id, type: Integer |
#id ⇒ FixNum
Returns the payment’s ID.
253 |
# File 'lib/osm/online_payment.rb', line 253 attribute :id, type: Integer |
#name ⇒ String
Returns the name given to the payment.
253 |
# File 'lib/osm/online_payment.rb', line 253 attribute :id, type: Integer |
#schedule ⇒ Osm::OnlnePayment::Schedule
Returns the schedule the payment belongs to.
253 |
# File 'lib/osm/online_payment.rb', line 253 attribute :id, type: Integer |
Instance Method Details
#inspect ⇒ Object
284 285 286 |
# File 'lib/osm/online_payment.rb', line 284 def inspect Osm.inspect_instance(self, {:replace_with => {'schedule' => :to_s}}) end |
#past_due?(date = Date.today) ⇒ Boolean
Check if the payment is past due (or will be past due on the passed date)
280 281 282 |
# File 'lib/osm/online_payment.rb', line 280 def past_due?(date=Date.today) date > due_date end |