mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-20 00:37:26 +00:00
15 lines
289 B
Ruby
15 lines
289 B
Ruby
class Api::PaymentSerializer < ActiveModel::Serializer
|
|
attributes :amount, :updated_at, :payment_method
|
|
def payment_method
|
|
object.payment_method.name
|
|
end
|
|
|
|
def amount
|
|
object.amount.to_money.to_s
|
|
end
|
|
|
|
def updated_at
|
|
I18n.l(object.updated_at, format: :long)
|
|
end
|
|
end
|