Class: Payrex::Entities::CheckoutSession

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ CheckoutSession

Returns a new instance of CheckoutSession.



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

def initialize(api_resource)
  data = api_resource.data

  @id = data["id"]
  @billing_details_collection = data["billing_details_collection"]
  @customer_reference_id = data["customer_reference_id"]
  @client_secret = data["client_secret"]
  @status = data["status"]
  @currency = data["currency"]
  @line_items = data["line_items"]
  @livemode = data["livemode"]
  @url = data["url"]
  @payment_intent = data["payment_intent"]
  @metadata = data["metadata"]
  @success_url = data["success_url"]
  @cancel_url = data["cancel_url"]
  @payment_methods = data["payment_methods"]
  @description = data["description"]
  @submit_type = data["submit_type"]
  @expires_at = data["expires_at"]
  @created_at = data["created_at"]
  @updated_at = data["updated_at"]
end

Instance Attribute Details

#billing_details_collectionObject (readonly)

Returns the value of attribute billing_details_collection.



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

def billing_details_collection
  @billing_details_collection
end

#cancel_urlObject (readonly)

Returns the value of attribute cancel_url.



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

def cancel_url
  @cancel_url
end

#client_secretObject (readonly)

Returns the value of attribute client_secret.



4
5
6
# File 'lib/entities/checkout_session.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/checkout_session.rb', line 4

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#customer_reference_idObject (readonly)

Returns the value of attribute customer_reference_id.



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

def customer_reference_id
  @customer_reference_id
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#expires_atObject (readonly)

Returns the value of attribute expires_at.



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

def expires_at
  @expires_at
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#line_itemsObject (readonly)

Returns the value of attribute line_items.



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

def line_items
  @line_items
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



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

def livemode
  @livemode
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  @metadata
end

#payment_intentObject (readonly)

Returns the value of attribute payment_intent.



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

def payment_intent
  @payment_intent
end

#payment_methodsObject (readonly)

Returns the value of attribute payment_methods.



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

def payment_methods
  @payment_methods
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#submit_typeObject (readonly)

Returns the value of attribute submit_type.



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

def submit_type
  @submit_type
end

#success_urlObject (readonly)

Returns the value of attribute success_url.



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

def success_url
  @success_url
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#urlObject (readonly)

Returns the value of attribute url.



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

def url
  @url
end