Class: Instamojo::Refund

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#bodyObject

Returns the value of attribute body.



17
18
19
# File 'lib/client/refund.rb', line 17

def body
  @body
end

#created_atObject

Returns the value of attribute created_at.



17
18
19
# File 'lib/client/refund.rb', line 17

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/client/refund.rb', line 17

def id
  @id
end

#originalObject (readonly)

Returns the value of attribute original.



19
20
21
# File 'lib/client/refund.rb', line 19

def original
  @original
end

#payment_idObject

Returns the value of attribute payment_id.



17
18
19
# File 'lib/client/refund.rb', line 17

def payment_id
  @payment_id
end

#refund_amountObject

Returns the value of attribute refund_amount.



17
18
19
# File 'lib/client/refund.rb', line 17

def refund_amount
  @refund_amount
end

#statusObject

Returns the value of attribute status.



17
18
19
# File 'lib/client/refund.rb', line 17

def status
  @status
end

#total_amountObject

Returns the value of attribute total_amount.



17
18
19
# File 'lib/client/refund.rb', line 17

def total_amount
  @total_amount
end

#typeObject

Returns the value of attribute type.



17
18
19
# File 'lib/client/refund.rb', line 17

def type
  @type
end

Instance Method Details

#to_sObject



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