class Paymill::Refund

Attributes

amount[R]
description[R]
livemode[R]
response_code[R]
status[R]
transaction[R]

Public Class Methods

create( transaction, attributes = {} ) click to toggle source
# File lib/paymill/models/refund.rb, line 6
def self.create( transaction, attributes = {} )
  raise ArgumentError unless create_with?( attributes.keys )
  response = Paymill.request( Http.post( name.demodulize.tableize, transaction.id, Restful.normalize( attributes ) ) )
  new( response['data'] )
end

Protected Class Methods

allowed_arguments() click to toggle source
# File lib/paymill/models/refund.rb, line 17
def self.allowed_arguments
  [:amount, :description]
end
mandatory_arguments() click to toggle source
# File lib/paymill/models/refund.rb, line 13
def self.mandatory_arguments
  [:amount]
end