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.



31
32
33
# File 'lib/abacate_pay/resources/checkouts.rb', line 31

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

#custom_metadataObject

Returns the value of attribute custom_metadata.



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

def 
  @custom_metadata
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

#due_dateObject

Returns the value of attribute due_date.



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

def due_date
  @due_date
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

#fineObject

Returns the value of attribute fine.



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

def fine
  @fine
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

#interestObject

Returns the value of attribute interest.



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

def interest
  @interest
end

#max_installmentsObject

Returns the value of attribute max_installments.



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

def max_installments
  @max_installments
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

#up_sell_product_idObject

Returns the value of attribute up_sell_product_id.



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

def up_sell_product_id
  @up_sell_product_id
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)


35
36
37
# File 'lib/abacate_pay/resources/checkouts.rb', line 35

def dev_mode?
  @dev_mode
end