Class: AbacatePay::Resources::Checkouts

Inherits:
Resource
  • Object
show all
Defined in:
lib/abacate_pay/resources/checkouts.rb

Overview

Represents a checkout session in the AbacatePay system.

Constant Summary collapse

RESOURCE_PROPERTIES =
{
  metadata: "AbacatePay::Resources::Billings::Metadata",
  customer: "AbacatePay::Resources::Customers",
  products: "AbacatePay::Resources::Billings::Product"
}.freeze
ENUM_PROPERTIES =
{
  status: "AbacatePay::Enums::Checkouts::Statuses",
  frequency: "AbacatePay::Enums::Billings::Frequencies",
  methods: "AbacatePay::Enums::Billings::Methods"
}.freeze
DATETIME_PROPERTIES =
%w[created_at updated_at].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Checkouts

Returns a new instance of Checkouts.



25
26
27
# File 'lib/abacate_pay/resources/checkouts.rb', line 25

def initialize(data)
  fill(data)
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def amount
  @amount
end

#couponsObject

Returns the value of attribute coupons.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def coupons
  @coupons
end

#created_atObject

Returns the value of attribute created_at.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def created_at
  @created_at
end

#customerObject

Returns the value of attribute customer.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def customer
  @customer
end

#dev_modeObject

Returns the value of attribute dev_mode.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def dev_mode
  @dev_mode
end

#external_idObject

Returns the value of attribute external_id.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def external_id
  @external_id
end

#frequencyObject

Returns the value of attribute frequency.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def frequency
  @frequency
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def id
  @id
end

#metadataObject

Returns the value of attribute metadata.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def 
  @metadata
end

#methodsObject

Returns the value of attribute methods.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def methods
  @methods
end

#productsObject

Returns the value of attribute products.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def products
  @products
end

#statusObject

Returns the value of attribute status.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



21
22
23
# File 'lib/abacate_pay/resources/checkouts.rb', line 21

def url
  @url
end

Instance Method Details

#dev_mode?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/abacate_pay/resources/checkouts.rb', line 29

def dev_mode?
  @dev_mode
end