Class: Billogram::Item

Inherits:
Resource show all
Includes:
Endpoint
Defined in:
lib/billogram/resources/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Endpoint

included

Methods inherited from Resource

build_objects, #initialize, relation, relations, #to_hash, #to_json

Constructor Details

This class inherits a constructor from Billogram::Resource

Instance Attribute Details

#countObject

Returns the value of attribute count.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def count
  @count
end

#created_atObject

Returns the value of attribute created_at.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def description
  @description
end

#discountObject

Returns the value of attribute discount.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def discount
  @discount
end

#item_noObject Also known as: id

Returns the value of attribute item_no.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def item_no
  @item_no
end

#priceObject

Returns the value of attribute price.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def price
  @price
end

#titleObject

Returns the value of attribute title.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def title
  @title
end

#unitObject

Returns the value of attribute unit.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def unit
  @unit
end

#updated_atObject

Returns the value of attribute updated_at.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def updated_at
  @updated_at
end

#vatObject

Returns the value of attribute vat.



7
8
9
# File 'lib/billogram/resources/item.rb', line 7

def vat
  @vat
end

Instance Method Details

#deleteObject



15
16
17
# File 'lib/billogram/resources/item.rb', line 15

def delete
  self.class.perform_request(:delete, "#{endpoint}/#{id}")
end