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



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

def initialize(data)
  fill(data)
end

Instance Attribute Details

#descriptionString?



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

def description
  @description
end

#external_idString?



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

def external_id
  @external_id
end

#nameString?



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

def name
  @name
end

#priceInteger?



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

def price
  @price
end

#product_idString?



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

def product_id
  @product_id
end

#quantityInteger?



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

def quantity
  @quantity
end