Class: AbacatePay::Resources::Subscriptions

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

Overview

Represents a recurring subscription in the AbacatePay system.

Constant Summary collapse

RESOURCE_PROPERTIES =
{
  customer: "AbacatePay::Resources::Customers",
  products: "AbacatePay::Resources::Billings::Product"
}.freeze
ENUM_PROPERTIES =
{
  status: "AbacatePay::Enums::Checkouts::Statuses",
  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) ⇒ Subscriptions

Returns a new instance of Subscriptions.



22
23
24
# File 'lib/abacate_pay/resources/subscriptions.rb', line 22

def initialize(data)
  fill(data)
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def created_at
  @created_at
end

#customerObject

Returns the value of attribute customer.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def customer
  @customer
end

#dev_modeObject

Returns the value of attribute dev_mode.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def dev_mode
  @dev_mode
end

#external_idObject

Returns the value of attribute external_id.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def external_id
  @external_id
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def id
  @id
end

#metadataObject

Returns the value of attribute metadata.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def 
  @metadata
end

#methodsObject

Returns the value of attribute methods.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def methods
  @methods
end

#productsObject

Returns the value of attribute products.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def products
  @products
end

#statusObject

Returns the value of attribute status.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



19
20
21
# File 'lib/abacate_pay/resources/subscriptions.rb', line 19

def url
  @url
end

Instance Method Details

#dev_mode?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/abacate_pay/resources/subscriptions.rb', line 26

def dev_mode?
  @dev_mode
end