Class: Osm::OnlinePayment::Schedule::Payment

Inherits:
Model
  • Object
show all
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

Model::SORT_BY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#<, #<=, #<=>, #>, #>=, #between?, #changed_attributes, configure, #reset_changed_attributes, #to_i

Constructor Details

#initializeObject

Initialize a new Payment



# File 'lib/osm/online_payment.rb', line 272


Instance Attribute Details

#amountSreing



253
# File 'lib/osm/online_payment.rb', line 253

attribute :id, type: Integer

#archivedBoolean



253
# File 'lib/osm/online_payment.rb', line 253

attribute :id, type: Integer

#dateDate



253
# File 'lib/osm/online_payment.rb', line 253

attribute :id, type: Integer

#idFixNum



253
# File 'lib/osm/online_payment.rb', line 253

attribute :id, type: Integer

#nameString



253
# File 'lib/osm/online_payment.rb', line 253

attribute :id, type: Integer

#scheduleOsm::OnlnePayment::Schedule



253
# File 'lib/osm/online_payment.rb', line 253

attribute :id, type: Integer

Instance Method Details

#inspectObject



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