Class: JeraPayment::Invoice
Instance Method Summary
collapse
#api_action, #has_create_callback?, #has_destroy_callback?, #has_update_callback?
Instance Method Details
#early_payment_discounts ⇒ Object
37
38
39
|
# File 'lib/jera_payment/models/invoice.rb', line 37
def early_payment_discounts
ActiveSupport::JSON.decode(self[:early_payment_discounts]).map{ |early_payment_discount| early_payment_discount.deep_symbolize_keys } if self[:early_payment_discounts]
end
|
#early_payment_discounts=(value) ⇒ Object
33
34
35
|
# File 'lib/jera_payment/models/invoice.rb', line 33
def early_payment_discounts=(value)
write_attribute(:items, value&.to_json)
end
|
#items ⇒ Object
29
30
31
|
# File 'lib/jera_payment/models/invoice.rb', line 29
def items
ActiveSupport::JSON.decode(self[:items]) if self[:items]
end
|
#items=(value) ⇒ Object
25
26
27
|
# File 'lib/jera_payment/models/invoice.rb', line 25
def items=(value)
write_attribute(:items, value&.to_json)
end
|
#payer ⇒ Object
45
46
47
|
# File 'lib/jera_payment/models/invoice.rb', line 45
def payer
ActiveSupport::JSON.decode(self[:payer]) if self[:payer]
end
|
#payer=(value) ⇒ Object
41
42
43
|
# File 'lib/jera_payment/models/invoice.rb', line 41
def payer=(value)
write_attribute(:payer, value&.to_json)
end
|