Class: Paymill::Refund
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#transaction ⇒ Object
readonly
Returns the value of attribute transaction.
Attributes inherited from Base
#app_id, #created_at, #id, #updated_at
Class Method Summary collapse
Methods inherited from Base
Methods included from Paymill::Restful::All
Methods included from Paymill::Restful::Find
Methods included from Paymill::Restful::Create
Constructor Details
This class inherits a constructor from Paymill::Base
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/paymill/models/refund.rb', line 4 def amount @amount end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/paymill/models/refund.rb', line 4 def description @description end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/paymill/models/refund.rb', line 4 def livemode @livemode end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
4 5 6 |
# File 'lib/paymill/models/refund.rb', line 4 def response_code @response_code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/paymill/models/refund.rb', line 4 def status @status end |
#transaction ⇒ Object (readonly)
Returns the value of attribute transaction.
4 5 6 |
# File 'lib/paymill/models/refund.rb', line 4 def transaction @transaction end |
Class Method Details
.create(transaction, attributes = {}) ⇒ Object
6 7 8 9 10 |
# 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 |