class Promisepay::Charge
Manage Charges
Public Instance Methods
buyer()
click to toggle source
Get the buyer associated with the charge.
@see reference.promisepay.com/#show-charge-buyer
@return [Promisepay::User]
# File lib/promisepay/models/charge.rb, line 10 def buyer response = JSON.parse(@client.get("charges/#{send(:id)}/buyers").body) Promisepay::User.new(@client, response['users']) end
status()
click to toggle source
Get current status.
@see reference.promisepay.com/#show-charge-status
@return [Hash]
# File lib/promisepay/models/charge.rb, line 20 def status response = JSON.parse(@client.get("charges/#{send(:id)}/status").body) response['charges'] end