Class: NetoApiRuby::API
- Inherits:
-
Object
- Object
- NetoApiRuby::API
- Defined in:
- lib/neto_api_ruby.rb
Instance Method Summary collapse
-
#get_products(query = {}) ⇒ Object
public methods query - A Hash with query params, insert into request body returns the request Array.
-
#initialize(url, api_key) ⇒ API
constructor
A new instance of API.
Constructor Details
#initialize(url, api_key) ⇒ API
Returns a new instance of API.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/neto_api_ruby.rb', line 8 def initialize url, api_key #required args @neto_url = url #optional args @header_args ={ "Accept" => "application/json", "Content-Type"=> "application/json", "NETOAPI_KEY" => api_key } @body_defaults = { # "Filter"=> { "IsActive"=> ["True"], "OutputSelector"=> [ "ID", "SKU", "ParentSKU", "InventoryID", "Name", "Brand", "Description", "Active", "Visible", "Categories", "RRP", "PromotionPrice", "PriceGroups", "DateAdded", "DateAddedLocal", "DateAddedUTC", "DateUpdated", "DateUpdatedLocal", "DateUpdatedUTC", "Group", "WarehouseQuantity", "TaxInclusive" ] # } } end |
Instance Method Details
#get_products(query = {}) ⇒ Object
public methods query - A Hash with query params, insert into request body returns the request Array
51 52 53 |
# File 'lib/neto_api_ruby.rb', line 51 def get_products query={} do_request :post, 'GetItem', query end |