Class: Instamojo::Refund
- Inherits:
-
Object
- Object
- Instamojo::Refund
- Includes:
- CommonObject
- Defined in:
- lib/client/refund.rb
Overview
"refund_amount" => "100",
"payment_id" => "MOJO5c04000J30502939",
"body" => "Customer isn't satisfied with the quality",
"status" => "Refunded",
"created_at" => "2015-12-07T11:01:37.640Z",
"id" => "C5c0751269",
"total_amount" => "100.00",
"type" => "QFL"
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
-
#payment_id ⇒ Object
Returns the value of attribute payment_id.
-
#refund_amount ⇒ Object
Returns the value of attribute refund_amount.
-
#status ⇒ Object
Returns the value of attribute status.
-
#total_amount ⇒ Object
Returns the value of attribute total_amount.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(refund, client) ⇒ Refund
constructor
A new instance of Refund.
- #to_s ⇒ Object
Methods included from CommonObject
#assign_values, #construct_hash, included, #reload, #reload!, #to_h, #to_json
Constructor Details
#initialize(refund, client) ⇒ Refund
Returns a new instance of Refund.
24 25 26 27 |
# File 'lib/client/refund.rb', line 24 def initialize(refund, client) assign_values(refund) @client = client end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def body @body end |
#created_at ⇒ Object
Returns the value of attribute created_at.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def id @id end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
19 20 21 |
# File 'lib/client/refund.rb', line 19 def original @original end |
#payment_id ⇒ Object
Returns the value of attribute payment_id.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def payment_id @payment_id end |
#refund_amount ⇒ Object
Returns the value of attribute refund_amount.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def refund_amount @refund_amount end |
#status ⇒ Object
Returns the value of attribute status.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def status @status end |
#total_amount ⇒ Object
Returns the value of attribute total_amount.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def total_amount @total_amount end |
#type ⇒ Object
Returns the value of attribute type.
17 18 19 |
# File 'lib/client/refund.rb', line 17 def type @type end |
Instance Method Details
#to_s ⇒ Object
29 30 31 32 |
# File 'lib/client/refund.rb', line 29 def to_s sprintf("Instamojo Refund(id: %s, status: %s, payment_id: %s, refund_amount: %s)", id, status, payment_id, refund_amount) end |