lib/mangopay/pay_in.rb in mangopay-3.0.30.1 vs lib/mangopay/pay_in.rb in mangopay-3.0.31

- old
+ new

@@ -3,9 +3,20 @@ # See http://docs.mangopay.com/api-references/payins/ class PayIn < Resource include HTTPCalls::Fetch include HTTPCalls::Refund + # Fetches list of refunds belonging to the given +pay_in_id+. + # + # Optional +filters+ is a hash accepting following keys: + # - +page+, +per_page+, +sort+: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch) + # - +Status+: TransactionStatus {CREATED, SUCCEEDED, FAILED} + # - +ResultCode+: string representing the transaction result + def self.refunds(pay_in_id, filters = {}) + url = url(pay_in_id) + '/refunds' + MangoPay.request(:get, url, {}, filters) + end + module Card # See http://docs.mangopay.com/api-references/payins/payins-card-web/ class Web < Resource include HTTPCalls::Create