Class: DuffelAPI::Resources::Refund

Inherits:
BaseResource show all
Defined in:
lib/duffel_api/resources/refund.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseResource

#api_response

Constructor Details

#initialize(object, response = nil) ⇒ Refund

Returns a new instance of Refund.



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

def initialize(object, response = nil)
  @object = object

  @amount = object["amount"]
  @arrival = object["arrival"]
  @created_at = object["created_at"]
  @currency = object["currency"]
  @destination = object["destination"]
  @id = object["id"]
  @live_mode = object["live_mode"]
  @net_amount = object["net_amount"]
  @net_currency = object["net_currency"]
  @payment_intent_id = object["payment_intent_id"]
  @status = object["status"]
  @updated_at = object["updated_at"]

  super(object, response)
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



7
8
9
# File 'lib/duffel_api/resources/refund.rb', line 7

def amount
  @amount
end

#arrivalObject (readonly)

Returns the value of attribute arrival.



8
9
10
# File 'lib/duffel_api/resources/refund.rb', line 8

def arrival
  @arrival
end

#created_atObject (readonly)

Returns the value of attribute created_at.



9
10
11
# File 'lib/duffel_api/resources/refund.rb', line 9

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



10
11
12
# File 'lib/duffel_api/resources/refund.rb', line 10

def currency
  @currency
end

#destinationObject (readonly)

Returns the value of attribute destination.



11
12
13
# File 'lib/duffel_api/resources/refund.rb', line 11

def destination
  @destination
end

#idObject (readonly)

Returns the value of attribute id.



12
13
14
# File 'lib/duffel_api/resources/refund.rb', line 12

def id
  @id
end

#live_modeObject (readonly)

Returns the value of attribute live_mode.



13
14
15
# File 'lib/duffel_api/resources/refund.rb', line 13

def live_mode
  @live_mode
end

#net_amountObject (readonly)

Returns the value of attribute net_amount.



14
15
16
# File 'lib/duffel_api/resources/refund.rb', line 14

def net_amount
  @net_amount
end

#net_currencyObject (readonly)

Returns the value of attribute net_currency.



15
16
17
# File 'lib/duffel_api/resources/refund.rb', line 15

def net_currency
  @net_currency
end

#payment_intent_idObject (readonly)

Returns the value of attribute payment_intent_id.



16
17
18
# File 'lib/duffel_api/resources/refund.rb', line 16

def payment_intent_id
  @payment_intent_id
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



18
19
20
# File 'lib/duffel_api/resources/refund.rb', line 18

def updated_at
  @updated_at
end