dear-inventory-ruby 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/InventoryApi.md +6 -6
- data/lib/dear-inventory-ruby/api/inventory_api.rb +6 -6
- data/lib/dear-inventory-ruby/version.rb +1 -1
- data/spec/api/inventory_api_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9154483cff09f52ccea1190aad3f720ecb126ebb9432e5ac24245da56070d4b4
|
4
|
+
data.tar.gz: 00b191ff3026645a0891f3c6e00bcd2bdfe8224a806962186b6f04fe0da91422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b7cbcadbbc3fc0c3965621b0ec03db7b2a737986cbb5b64149ff97b5b45fc06c5303d43b3f769609ace79e913b600d3a6d5ef346598703dfcbfe36202b55eff
|
7
|
+
data.tar.gz: 115a13db7743709a4756a97444a832e62ee37863b4f87c9507fe806548b9789dde4d3ffa829b3324fb669dbf8b54afa3e7046bd1968aad6c27c02c7f4810eddc
|
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.2.
|
10
|
+
- Package version: 0.2.2
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://www.nhansg.com](https://www.nhansg.com)
|
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.2.
|
27
|
+
gem install ./dear-inventory-ruby-0.2.2.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./dear-inventory-ruby-0.2.
|
30
|
+
(for development, run `gem install --dev ./dear-inventory-ruby-0.2.2.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.2.
|
36
|
+
gem 'dear-inventory-ruby', '~> 0.2.2'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -100,7 +100,7 @@ Class | Method | HTTP request | Description
|
|
100
100
|
*DearInventoryRuby::InventoryApi* | [**create_sale_payment**](docs/InventoryApi.md#create_sale_payment) | **POST** /sale/payment | Allows you to create a Sale Payment
|
101
101
|
*DearInventoryRuby::InventoryApi* | [**create_sale_quote**](docs/InventoryApi.md#create_sale_quote) | **POST** /sale/quote | Allows you to create a Sale Quote
|
102
102
|
*DearInventoryRuby::InventoryApi* | [**create_tax**](docs/InventoryApi.md#create_tax) | **POST** /ref/tax | Allows you to create a tax
|
103
|
-
*DearInventoryRuby::InventoryApi* | [**
|
103
|
+
*DearInventoryRuby::InventoryApi* | [**create_webhook**](docs/InventoryApi.md#create_webhook) | **POST** /webhooks | Allows you to create a Webhook
|
104
104
|
*DearInventoryRuby::InventoryApi* | [**delete_account**](docs/InventoryApi.md#delete_account) | **DELETE** /ref/account | Allows you to delete an Account
|
105
105
|
*DearInventoryRuby::InventoryApi* | [**delete_payment_term**](docs/InventoryApi.md#delete_payment_term) | **DELETE** /ref/paymentterm | Allows you to delete a payment term
|
106
106
|
*DearInventoryRuby::InventoryApi* | [**delete_sale_invoice**](docs/InventoryApi.md#delete_sale_invoice) | **DELETE** /sale/invoice | Allows you to delete a sale invoice
|
data/docs/InventoryApi.md
CHANGED
@@ -12,7 +12,7 @@ Method | HTTP request | Description
|
|
12
12
|
[**create_sale_payment**](InventoryApi.md#create_sale_payment) | **POST** /sale/payment | Allows you to create a Sale Payment
|
13
13
|
[**create_sale_quote**](InventoryApi.md#create_sale_quote) | **POST** /sale/quote | Allows you to create a Sale Quote
|
14
14
|
[**create_tax**](InventoryApi.md#create_tax) | **POST** /ref/tax | Allows you to create a tax
|
15
|
-
[**
|
15
|
+
[**create_webhook**](InventoryApi.md#create_webhook) | **POST** /webhooks | Allows you to create a Webhook
|
16
16
|
[**delete_account**](InventoryApi.md#delete_account) | **DELETE** /ref/account | Allows you to delete an Account
|
17
17
|
[**delete_payment_term**](InventoryApi.md#delete_payment_term) | **DELETE** /ref/paymentterm | Allows you to delete a payment term
|
18
18
|
[**delete_sale_invoice**](InventoryApi.md#delete_sale_invoice) | **DELETE** /sale/invoice | Allows you to delete a sale invoice
|
@@ -526,9 +526,9 @@ Name | Type | Description | Notes
|
|
526
526
|
- **Accept**: application/json
|
527
527
|
|
528
528
|
|
529
|
-
##
|
529
|
+
## create_webhook
|
530
530
|
|
531
|
-
> Webhooks
|
531
|
+
> Webhooks create_webhook(webhook, opts)
|
532
532
|
|
533
533
|
Allows you to create a Webhook
|
534
534
|
|
@@ -558,10 +558,10 @@ opts = {
|
|
558
558
|
|
559
559
|
begin
|
560
560
|
#Allows you to create a Webhook
|
561
|
-
result = api_instance.
|
561
|
+
result = api_instance.create_webhook(webhook, opts)
|
562
562
|
p result
|
563
563
|
rescue DearInventoryRuby::ApiError => e
|
564
|
-
puts "Exception when calling InventoryApi->
|
564
|
+
puts "Exception when calling InventoryApi->create_webhook: #{e}"
|
565
565
|
end
|
566
566
|
```
|
567
567
|
|
@@ -1905,7 +1905,7 @@ DearInventoryRuby.configure do |config|
|
|
1905
1905
|
end
|
1906
1906
|
|
1907
1907
|
api_instance = DearInventoryRuby::InventoryApi.new
|
1908
|
-
webhook = { "ID": "1cf8cb83-bf39-494b-87f9-1252b684d6d5", "Type": "Sale/OrderAuthorised", "Name": "Sale order has been authorised", "IsActive": true, "ExternalURL": "https://hookb.in/Zn8950P7", "ExternalAuthorizationType": "basicauth", "ExternalUserName": "Hello", "ExternalPassword": "123", "ExternalBearerToken":
|
1908
|
+
webhook = { "ID": "1cf8cb83-bf39-494b-87f9-1252b684d6d5", "Type": "Sale/OrderAuthorised", "Name": "Sale order has been authorised", "IsActive": true, "ExternalURL": "https://hookb.in/Zn8950P7", "ExternalAuthorizationType": "basicauth", "ExternalUserName": "Hello", "ExternalPassword": "123", "ExternalBearerToken": null, "ExternalHeaders": [ { "Key": "Key", "Value": "123" }, { "Key": "6", "Value": "0" }, { "Key": "New Key", "Value": "New Value" } ] } # Webhook | a webhook object with properties to update
|
1909
1909
|
opts = {
|
1910
1910
|
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
1911
1911
|
}
|
@@ -544,8 +544,8 @@ module DearInventoryRuby
|
|
544
544
|
# @param [Hash] opts the optional parameters
|
545
545
|
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
546
546
|
# @return [Webhooks]
|
547
|
-
def
|
548
|
-
data, _status_code, _headers =
|
547
|
+
def create_webhook(webhook, opts = {})
|
548
|
+
data, _status_code, _headers = create_webhook_with_http_info(webhook, opts)
|
549
549
|
data
|
550
550
|
end
|
551
551
|
|
@@ -554,13 +554,13 @@ module DearInventoryRuby
|
|
554
554
|
# @param [Hash] opts the optional parameters
|
555
555
|
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
556
556
|
# @return [Array<(Webhooks, Integer, Hash)>] Webhooks data, response status code and response headers
|
557
|
-
def
|
557
|
+
def create_webhook_with_http_info(webhook, opts = {})
|
558
558
|
if @api_client.config.debugging
|
559
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
559
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_webhook ...'
|
560
560
|
end
|
561
561
|
# verify the required parameter 'webhook' is set
|
562
562
|
if @api_client.config.client_side_validation && webhook.nil?
|
563
|
-
fail ArgumentError, "Missing the required parameter 'webhook' when calling InventoryApi.
|
563
|
+
fail ArgumentError, "Missing the required parameter 'webhook' when calling InventoryApi.create_webhook"
|
564
564
|
end
|
565
565
|
# resource path
|
566
566
|
local_var_path = '/webhooks'
|
@@ -599,7 +599,7 @@ module DearInventoryRuby
|
|
599
599
|
|
600
600
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
601
601
|
if @api_client.config.debugging
|
602
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
602
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
603
603
|
end
|
604
604
|
return data, status_code, headers
|
605
605
|
end
|
@@ -128,13 +128,13 @@ describe 'InventoryApi' do
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
-
# unit tests for
|
131
|
+
# unit tests for create_webhook
|
132
132
|
# Allows you to create a Webhook
|
133
133
|
# @param webhook a webhook object with properties to create
|
134
134
|
# @param [Hash] opts the optional parameters
|
135
135
|
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
136
136
|
# @return [Webhooks]
|
137
|
-
describe '
|
137
|
+
describe 'create_webhook test' do
|
138
138
|
it 'should work' do
|
139
139
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
140
140
|
end
|