Sha256: da6e0f794f656fac8baba01c15afb0f43a102f66c781ce051ab99d813e7c3ea6
Contents?: true
Size: 1.66 KB
Versions: 6
Compression:
Stored size: 1.66 KB
Contents
module Leetchi # A contribution help you deposit money to a wallet. class Contribution < Leetchi::Ressource # Create a contribution # # * *Args* : # - +data+ -> A JSON with the following attributes (Square brackets for optionals): # * [Tag] # * UserID # * WalletID # * Amount # * [ClientFeeAmount] # * ReturnURL # * [TemplateURL] # * [RegisterMeanOfPayment] # * [PaymentCardID] # * *Returns* : # - A contribution object # def self.create(data) post_request('contributions', data) end # Get a contribution # # * *Args* : # - +contribution_id+ -> The id of the contribution you want to retrieve # * *Returns* : # - A contribution object # def self.details(contribution_id) get_request(File.join('contributions', contribution_id.to_s)) end # Refund a given contribution # # * *Args* : # - +data+ -> A JSON with the following attributes (Square brackets for optionals): # * [Tag] # * ContributionID # * UserID # * *Returns* : # - A refund object # def self.refund(data) post_request(File.join('refunds'), data) end # Get a refund object # # * *Args* : # - +contribution_refund_id+ -> The id of the refund you want to retrieve # * *Returns* : # - A refund object # def self.get_refund(contribution_refund_id) get_request(File.join('refunds', contribution_refund_id.to_s)) end end end
Version data entries
6 entries across 6 versions & 1 rubygems