1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module OrdersPlugin
class PaymentSerializer < ApplicationSerializer
attribute :value
attribute :date
attribute :method
def date
object.created_at.strftime("%d/%m/%Y")
end
def method
object.payment_method.slug
end
end
end
|