Class: AbacatePay::Resources::Billings::Product

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

Overview

Represents a product in a billing resource in the AbacatePay system.

This class contains information about a product, such as its identifier, name, description, quantity, and price.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Product

Creates a new Product instance

Parameters:

  • data (Hash)

    The product properties



32
33
34
# File 'lib/abacate_pay/resources/billings/product.rb', line 32

def initialize(data)
  fill(data)
end

Instance Attribute Details

#descriptionString?

Returns Description of the product.

Returns:

  • (String, nil)

    Description of the product



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

def description
  @description
end

#external_idString?

Returns External identifier for the product.

Returns:

  • (String, nil)

    External identifier for the product



12
13
14
# File 'lib/abacate_pay/resources/billings/product.rb', line 12

def external_id
  @external_id
end

#nameString?

Returns Name of the product.

Returns:

  • (String, nil)

    Name of the product



18
19
20
# File 'lib/abacate_pay/resources/billings/product.rb', line 18

def name
  @name
end

#priceInteger?

Returns Price of the product in smallest currency unit (e.g., cents).

Returns:

  • (Integer, nil)

    Price of the product in smallest currency unit (e.g., cents)



27
28
29
# File 'lib/abacate_pay/resources/billings/product.rb', line 27

def price
  @price
end

#product_idString?

Returns Internal identifier for the product in the system.

Returns:

  • (String, nil)

    Internal identifier for the product in the system



15
16
17
# File 'lib/abacate_pay/resources/billings/product.rb', line 15

def product_id
  @product_id
end

#quantityInteger?

Returns Quantity of the product.

Returns:

  • (Integer, nil)

    Quantity of the product



24
25
26
# File 'lib/abacate_pay/resources/billings/product.rb', line 24

def quantity
  @quantity
end