import ApiConstants from '../../../common/api_constants' ; import RequestBase from '../../../common/request_base' ; class RefundRequest extends RequestBase { amount : number ; constructor ( token , amount ) { super ( `${ ApiConstants . WEBPAY_ENDPOINT }/transactions/${ token }/refunds` , 'POST' ) ; this . amount = amount ; } toJson ( ) { return JSON . stringify ( { amount : this . amount } ) ; } } export { RefundRequest } ;