Class: Payrex::Entities::PaymentIntent

Inherits:
Object
  • Object
show all
Defined in:
lib/entities/payment_intent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ PaymentIntent

Returns a new instance of PaymentIntent.



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

def initialize(api_resource)
  @id = api_resource.data["id"]
  @amount = api_resource.data["amount"]
  @amount_received = api_resource.data["amount_received"]
  @amount_capturable = api_resource.data["amount_capturable"]
  @client_secret = api_resource.data["client_secret"]
  @currency = api_resource.data["currency"]
  @description = api_resource.data["description"]
  @livemode = api_resource.data["livemode"]
  @metadata = api_resource.data["metadata"]
  @latest_payment = api_resource.data["latest_payment"]
  @payment_method_id = api_resource.data["payment_method_id"]
  @payment_methods = api_resource.data["payment_methods"]
  @payment_method_options = api_resource.data["payment_method_options"]
  @status = api_resource.data["status"]
  @next_action = api_resource.data["next_action"]
  @return_url = api_resource.data["return_url"]
  @capture_before_at = api_resource.data["capture_before_at"]
  @created_at = api_resource.data["created_at"]
  @updated_at = api_resource.data["updated_at"]
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



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

def amount
  @amount
end

#amount_capturableObject (readonly)

Returns the value of attribute amount_capturable.



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

def amount_capturable
  @amount_capturable
end

#amount_receivedObject (readonly)

Returns the value of attribute amount_received.



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

def amount_received
  @amount_received
end

#capture_before_atObject (readonly)

Returns the value of attribute capture_before_at.



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

def capture_before_at
  @capture_before_at
end

#client_secretObject (readonly)

Returns the value of attribute client_secret.



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

def client_secret
  @client_secret
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#latest_paymentObject (readonly)

Returns the value of attribute latest_payment.



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

def latest_payment
  @latest_payment
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



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

def livemode
  @livemode
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  @metadata
end

#next_actionObject (readonly)

Returns the value of attribute next_action.



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

def next_action
  @next_action
end

#payment_method_idObject (readonly)

Returns the value of attribute payment_method_id.



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

def payment_method_id
  @payment_method_id
end

#payment_method_optionsObject (readonly)

Returns the value of attribute payment_method_options.



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

def payment_method_options
  @payment_method_options
end

#payment_methodsObject (readonly)

Returns the value of attribute payment_methods.



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

def payment_methods
  @payment_methods
end

#return_urlObject (readonly)

Returns the value of attribute return_url.



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

def return_url
  @return_url
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end