Class: Bsale::Root
Constant Summary collapse
- PATHS =
[ 'book_types', 'coins', 'clients', 'discounts', 'documents', 'dte_codes', 'document_types', 'offices', 'payments', 'payment_types', 'price_lists', 'product_types', 'products', 'sale_conditions', 'shipping_types', 'shippings', 'stocks', 'returns', 'taxes', 'third_party_documents', 'users', 'variants' ].freeze
Constants inherited from APIBase
APIBase::ENDPOINT, APIBase::MAX_RETRIES, APIBase::VERSION
Instance Method Summary collapse
Methods inherited from APIBase
#connect, #delete, #disconnect, #get, #initialize, #post, #put, #request
Constructor Details
This class inherits a constructor from Bsale::APIBase
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, params = nil) ⇒ Object
32 33 34 35 36 |
# File 'lib/sale/root.rb', line 32 def method_missing(name, params = nil) if PATHS.include?(name.to_s) get("#{name}.json", params) end end |