dear-inventory-ruby 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dff2dd2854dc010573a01fef8850fbed92d849fbf8f24036207cf027f06b5dc
4
- data.tar.gz: 74e59f417ce3c62467ba1a4e90399276549367bcad67793caafd3f3a2c717903
3
+ metadata.gz: 108e0573b35d2b3216b5ece574d3c8802a2a57200dcdf82444d845e0aebaf517
4
+ data.tar.gz: df3215cabdbe54b4393154a653346c2cd0f45621f4d3530286993cb103e1ed43
5
5
  SHA512:
6
- metadata.gz: 969bbc6cf2a790f27797254df011fe1525be5d79a35603c4ae493983dbdf1b0c69ffc15e3ad6b02e24c7c8a0758292c197f0e86969e7a4ea2bfb4aba47038894
7
- data.tar.gz: a22d8e7a5e6103674d1b94412cf287304e40a69b802f4f8b195d082e756a71787ff8dbf161b427d9000defb2967a79200be837276cb230e69f5d06d8b0199ef9
6
+ metadata.gz: d588fcc2835052c1f45e696dcca523114935f92f2a3cbaf9c4edc1f6a6af8f30d04d95a11df8d87ee50051d5640344b592783fa1a2b0bfa91231ffe428da7644
7
+ data.tar.gz: 6966483b90b9e630006e7eb626fbecc4ef821c0600ae16e1763e4f39d0e9e0c7dd7408c35507dff3cb481d7245ae639dc98e025830ebf269bd4b196c978ebdeb
data/README.md CHANGED
@@ -7,7 +7,7 @@ This specifing endpoints for DEAR Inventory API
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 0.1.3
10
+ - Package version: 0.1.4
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [https://www.nnhan.me](https://www.nnhan.me)
13
13
 
@@ -24,16 +24,16 @@ gem build dear-inventory-ruby.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./dear-inventory-ruby-0.1.3.gem
27
+ gem install ./dear-inventory-ruby-0.1.4.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./dear-inventory-ruby-0.1.3.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./dear-inventory-ruby-0.1.4.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'dear-inventory-ruby', '~> 0.1.3'
36
+ gem 'dear-inventory-ruby', '~> 0.1.4'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -70,7 +70,7 @@ DearInventoryRuby.configure do |config|
70
70
  #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
71
71
  end
72
72
 
73
- api_instance = DearInventoryRuby::CustomerApi.new
73
+ api_instance = DearInventoryRuby::InventoryApi.new
74
74
  customer = { "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a Contact object with properties to create
75
75
  opts = {
76
76
  summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors
@@ -81,7 +81,7 @@ begin
81
81
  result = api_instance.create_customer(customer, opts)
82
82
  p result
83
83
  rescue DearInventoryRuby::ApiError => e
84
- puts "Exception when calling CustomerApi->create_customer: #{e}"
84
+ puts "Exception when calling InventoryApi->create_customer: #{e}"
85
85
  end
86
86
 
87
87
  ```
@@ -92,9 +92,9 @@ All URIs are relative to *https://inventory.dearsystems.com/ExternalApi/v2*
92
92
 
93
93
  Class | Method | HTTP request | Description
94
94
  ------------ | ------------- | ------------- | -------------
95
- *DearInventoryRuby::CustomerApi* | [**create_customer**](docs/CustomerApi.md#create_customer) | **POST** /customer | Allows you to create a customer
96
- *DearInventoryRuby::CustomerApi* | [**get_customers**](docs/CustomerApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
97
- *DearInventoryRuby::CustomerApi* | [**update_customer**](docs/CustomerApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
95
+ *DearInventoryRuby::InventoryApi* | [**create_customer**](docs/InventoryApi.md#create_customer) | **POST** /customer | Allows you to create a customer
96
+ *DearInventoryRuby::InventoryApi* | [**get_customers**](docs/InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
97
+ *DearInventoryRuby::InventoryApi* | [**update_customer**](docs/InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
98
98
 
99
99
 
100
100
  ## Documentation for Models
@@ -1,12 +1,12 @@
1
- # DearInventoryRuby::CustomerApi
1
+ # DearInventoryRuby::InventoryApi
2
2
 
3
3
  All URIs are relative to *https://inventory.dearsystems.com/ExternalApi/v2*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**create_customer**](CustomerApi.md#create_customer) | **POST** /customer | Allows you to create a customer
8
- [**get_customers**](CustomerApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
9
- [**update_customer**](CustomerApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
7
+ [**create_customer**](InventoryApi.md#create_customer) | **POST** /customer | Allows you to create a customer
8
+ [**get_customers**](InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
9
+ [**update_customer**](InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
10
10
 
11
11
 
12
12
 
@@ -34,7 +34,7 @@ DearInventoryRuby.configure do |config|
34
34
  #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
35
35
  end
36
36
 
37
- api_instance = DearInventoryRuby::CustomerApi.new
37
+ api_instance = DearInventoryRuby::InventoryApi.new
38
38
  customer = { "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a Contact object with properties to create
39
39
  opts = {
40
40
  summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors
@@ -45,7 +45,7 @@ begin
45
45
  result = api_instance.create_customer(customer, opts)
46
46
  p result
47
47
  rescue DearInventoryRuby::ApiError => e
48
- puts "Exception when calling CustomerApi->create_customer: #{e}"
48
+ puts "Exception when calling InventoryApi->create_customer: #{e}"
49
49
  end
50
50
  ```
51
51
 
@@ -95,7 +95,7 @@ DearInventoryRuby.configure do |config|
95
95
  #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
96
96
  end
97
97
 
98
- api_instance = DearInventoryRuby::CustomerApi.new
98
+ api_instance = DearInventoryRuby::InventoryApi.new
99
99
  opts = {
100
100
  page: '1', # String | Default is 1
101
101
  limit: '100', # String | Default is 100
@@ -110,7 +110,7 @@ begin
110
110
  result = api_instance.get_customers(opts)
111
111
  p result
112
112
  rescue DearInventoryRuby::ApiError => e
113
- puts "Exception when calling CustomerApi->get_customers: #{e}"
113
+ puts "Exception when calling InventoryApi->get_customers: #{e}"
114
114
  end
115
115
  ```
116
116
 
@@ -164,7 +164,7 @@ DearInventoryRuby.configure do |config|
164
164
  #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
165
165
  end
166
166
 
167
- api_instance = DearInventoryRuby::CustomerApi.new
167
+ api_instance = DearInventoryRuby::InventoryApi.new
168
168
  customer = { "ID": "7d6b441a-3067-42b1-9b81-2def95df827b", "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a Contact object with properties to create
169
169
  opts = {
170
170
  summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors
@@ -175,7 +175,7 @@ begin
175
175
  result = api_instance.update_customer(customer, opts)
176
176
  p result
177
177
  rescue DearInventoryRuby::ApiError => e
178
- puts "Exception when calling CustomerApi->update_customer: #{e}"
178
+ puts "Exception when calling InventoryApi->update_customer: #{e}"
179
179
  end
180
180
  ```
181
181
 
@@ -25,7 +25,7 @@ require 'dear-inventory-ruby/models/customers'
25
25
  require 'dear-inventory-ruby/models/error'
26
26
 
27
27
  # APIs
28
- require 'dear-inventory-ruby/api/customer_api'
28
+ require 'dear-inventory-ruby/api/inventory_api'
29
29
 
30
30
  module DearInventoryRuby
31
31
  class << self
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'cgi'
14
14
 
15
15
  module DearInventoryRuby
16
- class CustomerApi
16
+ class InventoryApi
17
17
  attr_accessor :api_client
18
18
 
19
19
  def initialize(api_client = ApiClient.default)
@@ -36,11 +36,11 @@ module DearInventoryRuby
36
36
  # @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
37
37
  def create_customer_with_http_info(customer, opts = {})
38
38
  if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: CustomerApi.create_customer ...'
39
+ @api_client.config.logger.debug 'Calling API: InventoryApi.create_customer ...'
40
40
  end
41
41
  # verify the required parameter 'customer' is set
42
42
  if @api_client.config.client_side_validation && customer.nil?
43
- fail ArgumentError, "Missing the required parameter 'customer' when calling CustomerApi.create_customer"
43
+ fail ArgumentError, "Missing the required parameter 'customer' when calling InventoryApi.create_customer"
44
44
  end
45
45
  # resource path
46
46
  local_var_path = '/customer'
@@ -79,7 +79,7 @@ module DearInventoryRuby
79
79
 
80
80
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
81
81
  if @api_client.config.debugging
82
- @api_client.config.logger.debug "API called: CustomerApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ @api_client.config.logger.debug "API called: InventoryApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
83
  end
84
84
  return data, status_code, headers
85
85
  end
@@ -109,7 +109,7 @@ module DearInventoryRuby
109
109
  # @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
110
110
  def get_customers_with_http_info(opts = {})
111
111
  if @api_client.config.debugging
112
- @api_client.config.logger.debug 'Calling API: CustomerApi.get_customers ...'
112
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_customers ...'
113
113
  end
114
114
  # resource path
115
115
  local_var_path = '/customer'
@@ -151,7 +151,7 @@ module DearInventoryRuby
151
151
 
152
152
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
153
153
  if @api_client.config.debugging
154
- @api_client.config.logger.debug "API called: CustomerApi#get_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ @api_client.config.logger.debug "API called: InventoryApi#get_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
155
  end
156
156
  return data, status_code, headers
157
157
  end
@@ -173,11 +173,11 @@ module DearInventoryRuby
173
173
  # @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
174
174
  def update_customer_with_http_info(customer, opts = {})
175
175
  if @api_client.config.debugging
176
- @api_client.config.logger.debug 'Calling API: CustomerApi.update_customer ...'
176
+ @api_client.config.logger.debug 'Calling API: InventoryApi.update_customer ...'
177
177
  end
178
178
  # verify the required parameter 'customer' is set
179
179
  if @api_client.config.client_side_validation && customer.nil?
180
- fail ArgumentError, "Missing the required parameter 'customer' when calling CustomerApi.update_customer"
180
+ fail ArgumentError, "Missing the required parameter 'customer' when calling InventoryApi.update_customer"
181
181
  end
182
182
  # resource path
183
183
  local_var_path = '/customer'
@@ -216,7 +216,7 @@ module DearInventoryRuby
216
216
 
217
217
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
218
218
  if @api_client.config.debugging
219
- @api_client.config.logger.debug "API called: CustomerApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
+ @api_client.config.logger.debug "API called: InventoryApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
220
  end
221
221
  return data, status_code, headers
222
222
  end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.2.3
11
11
  =end
12
12
 
13
13
  module DearInventoryRuby
14
- VERSION = '0.1.3'
14
+ VERSION = '0.1.4'
15
15
  end
@@ -13,22 +13,22 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'spec_helper'
14
14
  require 'json'
15
15
 
16
- # Unit tests for DearInventoryRuby::CustomerApi
16
+ # Unit tests for DearInventoryRuby::InventoryApi
17
17
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
18
  # Please update as you see appropriate
19
- describe 'CustomerApi' do
19
+ describe 'InventoryApi' do
20
20
  before do
21
21
  # run before each test
22
- @api_instance = DearInventoryRuby::CustomerApi.new
22
+ @api_instance = DearInventoryRuby::InventoryApi.new
23
23
  end
24
24
 
25
25
  after do
26
26
  # run after each test
27
27
  end
28
28
 
29
- describe 'test an instance of CustomerApi' do
30
- it 'should create an instance of CustomerApi' do
31
- expect(@api_instance).to be_instance_of(DearInventoryRuby::CustomerApi)
29
+ describe 'test an instance of InventoryApi' do
30
+ it 'should create an instance of InventoryApi' do
31
+ expect(@api_instance).to be_instance_of(DearInventoryRuby::InventoryApi)
32
32
  end
33
33
  end
34
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dear-inventory-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nhan Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-12 00:00:00.000000000 Z
11
+ date: 2020-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -82,12 +82,12 @@ files:
82
82
  - docs/Contact.md
83
83
  - docs/CurrencyCode.md
84
84
  - docs/Customer.md
85
- - docs/CustomerApi.md
86
85
  - docs/Customers.md
87
86
  - docs/Error.md
87
+ - docs/InventoryApi.md
88
88
  - git_push.sh
89
89
  - lib/dear-inventory-ruby.rb
90
- - lib/dear-inventory-ruby/api/customer_api.rb
90
+ - lib/dear-inventory-ruby/api/inventory_api.rb
91
91
  - lib/dear-inventory-ruby/api_client.rb
92
92
  - lib/dear-inventory-ruby/api_error.rb
93
93
  - lib/dear-inventory-ruby/configuration.rb
@@ -98,7 +98,7 @@ files:
98
98
  - lib/dear-inventory-ruby/models/customers.rb
99
99
  - lib/dear-inventory-ruby/models/error.rb
100
100
  - lib/dear-inventory-ruby/version.rb
101
- - spec/api/customer_api_spec.rb
101
+ - spec/api/inventory_api_spec.rb
102
102
  - spec/api_client_spec.rb
103
103
  - spec/configuration_spec.rb
104
104
  - spec/models/address_spec.rb
@@ -136,7 +136,7 @@ signing_key:
136
136
  specification_version: 4
137
137
  summary: DEAR Inventory Ruby SDK generated from DEAR-OpenAPI Spec 3.0 for https://inventory.dearsystems.com
138
138
  test_files:
139
- - spec/api/customer_api_spec.rb
139
+ - spec/api/inventory_api_spec.rb
140
140
  - spec/api_client_spec.rb
141
141
  - spec/configuration_spec.rb
142
142
  - spec/models/error_spec.rb