Class: Dolla::ReferenceNumber
- Inherits:
-
Object
- Object
- Dolla::ReferenceNumber
- Defined in:
- lib/dolla/reference_number.rb
Constant Summary collapse
- REFERENCE_NUMBER_FORMAT =
{ initial: '%07d%s%d%d', final: '%s-%02d' }.freeze
- BANK_FILLER =
%w/11 13 17 19 23/.freeze
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#due_date ⇒ Object
readonly
Returns the value of attribute due_date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(payment_id:, due_date:, amount:) ⇒ ReferenceNumber
constructor
A new instance of ReferenceNumber.
- #number ⇒ Object
Constructor Details
#initialize(payment_id:, due_date:, amount:) ⇒ ReferenceNumber
Returns a new instance of ReferenceNumber.
11 12 13 14 15 |
# File 'lib/dolla/reference_number.rb', line 11 def initialize(payment_id:, due_date:, amount:) @id = payment_id @due_date = due_date @amount = amount end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/dolla/reference_number.rb', line 4 def amount @amount end |
#due_date ⇒ Object (readonly)
Returns the value of attribute due_date.
4 5 6 |
# File 'lib/dolla/reference_number.rb', line 4 def due_date @due_date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/dolla/reference_number.rb', line 4 def id @id end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
4 5 6 |
# File 'lib/dolla/reference_number.rb', line 4 def request @request end |
Instance Method Details
#number ⇒ Object
17 18 19 |
# File 'lib/dolla/reference_number.rb', line 17 def number final_reference_number_format % [ref, ref_hash] end |