Class: Payrex::Entities::BillingStatementLineItem

Inherits:
Object
  • Object
show all
Defined in:
lib/entities/billing_statement_line_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ BillingStatementLineItem

Returns a new instance of BillingStatementLineItem.



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/entities/billing_statement_line_item.rb', line 13

def initialize(api_resource)
  data = api_resource.data

  @id = data["id"]
  @unit_price = data["unit_price"]
  @quantity = data["quantity"]
  @billing_statement_id = data["billing_statement_id"]
  @description = data["description"]
  @livemode = data["livemode"]
  @created_at = data["created_at"]
  @updated_at = data["updated_at"]
end

Instance Attribute Details

#billing_statement_idObject (readonly)

Returns the value of attribute billing_statement_id.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def billing_statement_id
  @billing_statement_id
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def livemode
  @livemode
end

#quantityObject (readonly)

Returns the value of attribute quantity.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def quantity
  @quantity
end

#unit_priceObject (readonly)

Returns the value of attribute unit_price.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def unit_price
  @unit_price
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/entities/billing_statement_line_item.rb', line 4

def updated_at
  @updated_at
end