Class: Paymongo::Entities::Refund

Inherits:
BaseEntity show all
Defined in:
lib/paymongo/entities/refund.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ Refund

Returns a new instance of Refund.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/paymongo/entities/refund.rb', line 20

def initialize(api_resource)
  @id = api_resource.id
  @amount = api_resource.attributes['amount']
  @balance_transaction_id = api_resource.attributes['balance_transaction_id']
  @currency = api_resource.attributes['currency']
  @livemode = api_resource.attributes['livemode']
  @metadata = api_resource.attributes['metadata']
  @notes = api_resource.attributes['notes']
  @payment_id = api_resource.attributes['payment_id']
  @payout_id = api_resource.attributes['payout_id']
  @reason = api_resource.attributes['reason']
  @status = api_resource.attributes['status']
  @available_at = api_resource.attributes['available_at']
  @created_at = api_resource.attributes['created_at']
  @refunded_at = api_resource.attributes['refunded_at']
  @updated_at = api_resource.attributes['updated_at']
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def amount
  @amount
end

#available_atObject (readonly)

Returns the value of attribute available_at.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def available_at
  @available_at
end

#balance_transaction_idObject (readonly)

Returns the value of attribute balance_transaction_id.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def balance_transaction_id
  @balance_transaction_id
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def currency
  @currency
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def livemode
  @livemode
end

#metadataObject (readonly)

Returns the value of attribute metadata.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def 
  @metadata
end

#notesObject (readonly)

Returns the value of attribute notes.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def notes
  @notes
end

#payment_idObject (readonly)

Returns the value of attribute payment_id.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def payment_id
  @payment_id
end

#payout_idObject (readonly)

Returns the value of attribute payout_id.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def payout_id
  @payout_id
end

#reasonObject (readonly)

Returns the value of attribute reason.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def reason
  @reason
end

#refunded_atObject (readonly)

Returns the value of attribute refunded_at.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def refunded_at
  @refunded_at
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def status
  @status
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/paymongo/entities/refund.rb', line 4

def updated_at
  @updated_at
end