File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ class API ::Entities ::V1 ::Payment < API ::Entities ::V1 ::Base
2
+ expose :id , documentation : { type : 'Integer' , desc : 'Order ID.' }
3
+ expose :created_at , documentation : { type : 'Datetime' , desc : 'Created Of User.' }
4
+ expose :user_id , documentation : { type : 'Integer' , desc : 'User ID' }
5
+ expose :payment_type , documentation : { type : 'Integer' , desc : 'Command role' }
6
+ expose :value , documentation : { type : 'Float' , desc : 'Value' }
7
+ expose :transaction_hash , documentation : { type : 'String' , desc : 'Value' }
8
+ expose :status , documentation : { type : 'Integer' , desc : 'status' }
9
+ expose :chain , documentation : { type : 'String' , desc : 'Chain' }
10
+
11
+ def created_at
12
+ object . created_at . strftime ( '%Y-%m-%d %H:%M:%S' )
13
+ end
14
+
15
+ def transaction_hash
16
+ object . transaction_hash
17
+ end
18
+
19
+ def chain
20
+ if object . payment_type == "deposit"
21
+ return "BEP20"
22
+ end
23
+ "NAN"
24
+ end
25
+ end
You can’t perform that action at this time.
0 commit comments