class SixSaferpay::Invoice
Attributes
due_date[RW]
payee[RW]
reason_for_transfer[RW]
Public Class Methods
new(payee: nil, reason_for_transfer: nil, due_date: nil)
click to toggle source
# File lib/six_saferpay/models/invoice.rb, line 6 def initialize(payee: nil, reason_for_transfer: nil, due_date: nil) @payee = SixSaferpay::Payee.new(payee.to_h) if payee @reason_for_transfer = reason_for_transfer @due_date = due_date end
Public Instance Methods
to_hash()
click to toggle source
# File lib/six_saferpay/models/invoice.rb, line 12 def to_hash hash = Hash.new hash.merge!(payee: @payee.to_h) if @payee hash.merge!(reason_for_transfer: @reason_for_transfer) if @reason_for_transfer hash.merge!(due_date: @due_date) if @due_date hash end
Also aliased as: to_h