Low commit activity in last 3 years
DEAR Inventory Ruby SDK generated from DEAR-OpenAPI Spec 3.0 for https://inventory.dearsystems.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.6, >= 3.6.0

Runtime

~> 2.1, >= 2.1.0
~> 1.0, >= 1.0.1
 Project Readme

dear-inventory-ruby

DearInventoryRuby - the Ruby gem for the DEAR Inventory API

This specifing endpoints for DEAR Inventory API

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • Package version: 0.2.11
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://www.nhansg.com

Installation

Build a gem

To build the Ruby code into a gem:

gem build dear-inventory-ruby.gemspec

Then either install the gem locally:

gem install ./dear-inventory-ruby-0.2.11.gem

(for development, run gem install --dev ./dear-inventory-ruby-0.2.11.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'dear-inventory-ruby', '~> 0.2.11'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'dear-inventory-ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'dear-inventory-ruby'

# Setup authorization
DearInventoryRuby.configure do |config|
  # Configure API key authorization: accountID
  config.api_key['api-auth-accountid'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['api-auth-accountid'] = 'Bearer'

  # Configure API key authorization: appKey
  config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
end

api_instance = DearInventoryRuby::InventoryApi.new
account = { "Code": "001", "Status": "ACTIVE", "Name": "Accounts Payable test", "Type": "CURRLIAB", "Description": "Outstanding invoices the company has received from suppliers but has not yet paid at balance date", "Class": "LIABILITY", "SystemAccount": "CREDITORS", } # Account | an Account object with properties to create
opts = {
  summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
}

begin
  #Allows you to create an Account
  result = api_instance.create_account(account, opts)
  p result
rescue DearInventoryRuby::ApiError => e
  puts "Exception when calling InventoryApi->create_account: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://inventory.dearsystems.com/ExternalApi/v2

Class Method HTTP request Description
DearInventoryRuby::InventoryApi create_account POST /ref/account Allows you to create an Account
DearInventoryRuby::InventoryApi create_customer POST /customer Allows you to create a customer
DearInventoryRuby::InventoryApi create_payment_term POST /ref/paymentterm Allows you to create a payment term
DearInventoryRuby::InventoryApi create_sale_invoice POST /sale/invoice Allows you to create a sale invoice
DearInventoryRuby::InventoryApi create_sale_order POST /sale/order Allows you to create a Sale Order
DearInventoryRuby::InventoryApi create_sale_payment POST /sale/payment Allows you to create a Sale Payment
DearInventoryRuby::InventoryApi create_sale_quote POST /sale/quote Allows you to create a Sale Quote
DearInventoryRuby::InventoryApi create_tax POST /ref/tax Allows you to create a tax
DearInventoryRuby::InventoryApi create_webhook POST /webhooks Allows you to create a Webhook
DearInventoryRuby::InventoryApi delete_account DELETE /ref/account Allows you to delete an Account
DearInventoryRuby::InventoryApi delete_payment_term DELETE /ref/paymentterm Allows you to delete a payment term
DearInventoryRuby::InventoryApi delete_sale_invoice DELETE /sale/invoice Allows you to delete a sale invoice
DearInventoryRuby::InventoryApi delete_sale_payment DELETE /sale/payment Allows you to delete a sale payment
DearInventoryRuby::InventoryApi delete_webhook DELETE /webhooks Allows you to delete a webhook
DearInventoryRuby::InventoryApi get_accounts GET /ref/account Allows you to retrieve the Chart of Accounts
DearInventoryRuby::InventoryApi get_carriers GET /ref/carrier Allows you to retrieve the carriers
DearInventoryRuby::InventoryApi get_customers GET /customer Allows you to retrieve the customers
DearInventoryRuby::InventoryApi get_locations GET /ref/location Allows you to retrieve the locations
DearInventoryRuby::InventoryApi get_me GET /me Allows you to retrieve your information
DearInventoryRuby::InventoryApi get_me_contacts GET /me/contacts Allows you to retrieve the me contacts (Sales Representatives)
DearInventoryRuby::InventoryApi get_payment_terms GET /ref/paymentterm Allows you to retrieve the payment terms
DearInventoryRuby::InventoryApi get_price_tiers GET /ref/priceTier Allows you to retrieve the Price Tiers
DearInventoryRuby::InventoryApi get_sale GET /sale Allows you to retrieve the Sale
DearInventoryRuby::InventoryApi get_sale_invoices GET /sale/invoice Allows you to retrieve the sale invoices
DearInventoryRuby::InventoryApi get_sale_list GET /saleList Allows you to retrieve the Sales based on conditions
DearInventoryRuby::InventoryApi get_sale_order GET /sale/order Allows you to retrieve the Sale Order
DearInventoryRuby::InventoryApi get_sale_payment GET /sale/payment Allows you to retrieve the Sale Payments
DearInventoryRuby::InventoryApi get_sale_quote GET /sale/quote Allows you to retrieve the Sale Quote
DearInventoryRuby::InventoryApi get_taxes GET /ref/tax Allows you to retrieve the taxes
DearInventoryRuby::InventoryApi get_webhooks GET /webhooks Allows you to retrieve the Webhooks
DearInventoryRuby::InventoryApi update_account PUT /ref/account Allows you to update an Account
DearInventoryRuby::InventoryApi update_customer PUT /customer Allows you to update a customer
DearInventoryRuby::InventoryApi update_payment_term PUT /ref/paymentterm Allows you to update a payment term
DearInventoryRuby::InventoryApi update_sale_payment PUT /sale/payment Allows you to update a sale payment
DearInventoryRuby::InventoryApi update_tax PUT /ref/tax Allows you to update a tax
DearInventoryRuby::InventoryApi update_webhook PUT /webhooks Allows you to update a webhook

Documentation for Models

Documentation for Authorization

accountID

  • Type: API key
  • API key parameter name: api-auth-accountid
  • Location: HTTP header

appKey

  • Type: API key
  • API key parameter name: api-auth-applicationkey
  • Location: HTTP header