Class: DuffelAPI::Resources::PaymentIntent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseResource

#api_response

Constructor Details

#initialize(object, response = nil) ⇒ PaymentIntent

Returns a new instance of PaymentIntent.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/duffel_api/resources/payment_intent.rb', line 25

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

  @amount = object["amount"]
  @card_country_code = object["card_country_code"]
  @card_last_four_digits = object["card_last_four_digits"]
  @card_network = object["card_network"]
  @client_token = object["client_token"]
  @confirmed_at = object["confirmed_at"]
  @created_at = object["created_at"]
  @currency = object["currency"]
  @fees_amount = object["fees_amount"]
  @fees_currency = object["fees_currency"]
  @id = object["id"]
  @live_mode = object["live_mode"]
  @net_amount = object["net_amount"]
  @net_currency = object["net_currency"]
  @refunds = object["refunds"]
  @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/payment_intent.rb', line 7

def amount
  @amount
end

#card_country_codeObject (readonly)

Returns the value of attribute card_country_code.



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

def card_country_code
  @card_country_code
end

#card_last_four_digitsObject (readonly)

Returns the value of attribute card_last_four_digits.



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

def card_last_four_digits
  @card_last_four_digits
end

#card_networkObject (readonly)

Returns the value of attribute card_network.



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

def card_network
  @card_network
end

#client_tokenObject (readonly)

Returns the value of attribute client_token.



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

def client_token
  @client_token
end

#confirmed_atObject (readonly)

Returns the value of attribute confirmed_at.



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

def confirmed_at
  @confirmed_at
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#fees_amountObject (readonly)

Returns the value of attribute fees_amount.



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

def fees_amount
  @fees_amount
end

#fees_currencyObject (readonly)

Returns the value of attribute fees_currency.



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

def fees_currency
  @fees_currency
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#live_modeObject (readonly)

Returns the value of attribute live_mode.



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

def live_mode
  @live_mode
end

#net_amountObject (readonly)

Returns the value of attribute net_amount.



19
20
21
# File 'lib/duffel_api/resources/payment_intent.rb', line 19

def net_amount
  @net_amount
end

#net_currencyObject (readonly)

Returns the value of attribute net_currency.



20
21
22
# File 'lib/duffel_api/resources/payment_intent.rb', line 20

def net_currency
  @net_currency
end

#refundsObject (readonly)

Returns the value of attribute refunds.



21
22
23
# File 'lib/duffel_api/resources/payment_intent.rb', line 21

def refunds
  @refunds
end

#statusObject (readonly)

Returns the value of attribute status.



22
23
24
# File 'lib/duffel_api/resources/payment_intent.rb', line 22

def status
  @status
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



23
24
25
# File 'lib/duffel_api/resources/payment_intent.rb', line 23

def updated_at
  @updated_at
end