class JanioAPI::Item
Constants
- VALID_ITEM_CATEGORIES
Public Class Methods
create()
click to toggle source
# File lib/janio_api/resources/item.rb, line 16 def create raise "JanioAPI::Item cannot be created directly, "\ "please include it in an JanioAPI::Order to create it under a new JanioAPI::Order." end
find(*args)
click to toggle source
# File lib/janio_api/resources/item.rb, line 12 def find(*args) raise "JanioAPI::Item cannot be fetched directly, plesase use JanioAPI::Order to fetch the items under the order." end
new(attributes = {}, persisted = false)
click to toggle source
Calls superclass method
JanioAPI::Base::new
# File lib/janio_api/resources/item.rb, line 22 def initialize(attributes = {}, persisted = false) default_attrs = { item_desc: nil, item_quantity: nil, item_price_value: nil, item_price_currency: nil, item_category: nil } attributes = default_attrs.merge(attributes) super end
Public Instance Methods
create()
click to toggle source
# File lib/janio_api/resources/item.rb, line 30 def create self.class.create end
update()
click to toggle source
# File lib/janio_api/resources/item.rb, line 34 def update raise "JanioAPI::Item cannot be updated, only creation is supported and "\ "please include it in an JanioAPI::Order to create it under a new JanioAPI::Order." end