dear-inventory-ruby 0.2.1 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84d29c0ced39cf41145beea2c57d0123fe657c214e088769aedaacbfc4c90c6d
4
- data.tar.gz: 3e7d341b031d925d060ce69fc838d6cf8a5294f64c81ed295d2cc30cce435aa7
3
+ metadata.gz: cc16b0247ee5118afeefc165b65960ac156aa18e08646de3c076b06f3225d091
4
+ data.tar.gz: fd18222be798f9d38536629e2ffa62dd70d98a8de5e34e6f3ceaf1aff9b91345
5
5
  SHA512:
6
- metadata.gz: c02d415d3ee35627ba3a67ef18b8d06cfcff79124fbec9b3a1a3f37f44974ede71ccc48ec607ffdffd7507172f4040d6df0607417cc5e3b9e9cfdc22d0260ea3
7
- data.tar.gz: f24496e8da915bf12e253c214966385a092bac88ca44c5a467e537cffac14eae86ecff392d47da3dceb4f6270cae212dee6b11dc0830c7697d93a41696b1d9cd
6
+ metadata.gz: 315173b6af1c0d160e46d9462e6d9ddf10a7a23a6fa5200ec4761d28b02602ac24fcffc1080a9a3b0c8ef1cd1b348f05ac1ad1197dcef97a5c67d60ebfd6a6ba
7
+ data.tar.gz: 0fada5827551de17542f6f3a36f492183447a3abc6fce2d501554aa8070ef96f8f9223156b98a5d8fbe50ae51252cb10576a89f92cb0185f00564d47e9e14e12
data/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.2.4] - 2022-04-12
6
+
7
+ - Add the new endpoint GET `/sale`
8
+
9
+ ## [0.2.3] - 2021-10-15
10
+
11
+ - Update `POST` response of the endpoint `/webhooks`
12
+ - Add some enums `AuthorizationType`, `WebhookType`
13
+
14
+ ## [0.2.2] - 2021-10-15
15
+
16
+ - Update `POST` of the endpoint `/webhooks`
17
+
5
18
  ## [0.2.1] - 2021-10-15
6
19
 
7
20
  - Update param `TaskID` for `DELETE` of the endpoint `/sale/invoice`
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.1
10
+ - Package version: 0.2.4
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.1.gem
27
+ gem install ./dear-inventory-ruby-0.2.4.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./dear-inventory-ruby-0.2.1.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./dear-inventory-ruby-0.2.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.2.1'
36
+ gem 'dear-inventory-ruby', '~> 0.2.4'
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* | [**create_webhooks**](docs/InventoryApi.md#create_webhooks) | **POST** /webhooks | Allows you to create a Webhook
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
@@ -111,6 +111,7 @@ Class | Method | HTTP request | Description
111
111
  *DearInventoryRuby::InventoryApi* | [**get_me**](docs/InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
112
112
  *DearInventoryRuby::InventoryApi* | [**get_payment_terms**](docs/InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
113
113
  *DearInventoryRuby::InventoryApi* | [**get_price_tiers**](docs/InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
114
+ *DearInventoryRuby::InventoryApi* | [**get_sale**](docs/InventoryApi.md#get_sale) | **GET** /sale | Allows you to retrieve the Sale
114
115
  *DearInventoryRuby::InventoryApi* | [**get_sale_invoices**](docs/InventoryApi.md#get_sale_invoices) | **GET** /sale/invoice | Allows you to retrieve the sale invoices
115
116
  *DearInventoryRuby::InventoryApi* | [**get_sale_order**](docs/InventoryApi.md#get_sale_order) | **GET** /sale/order | Allows you to retrieve the Sale Order
116
117
  *DearInventoryRuby::InventoryApi* | [**get_sale_payment**](docs/InventoryApi.md#get_sale_payment) | **GET** /sale/payment | Allows you to retrieve the Sale Payments
@@ -130,6 +131,7 @@ Class | Method | HTTP request | Description
130
131
  - [DearInventoryRuby::Account](docs/Account.md)
131
132
  - [DearInventoryRuby::Accounts](docs/Accounts.md)
132
133
  - [DearInventoryRuby::Address](docs/Address.md)
134
+ - [DearInventoryRuby::AuthorizationType](docs/AuthorizationType.md)
133
135
  - [DearInventoryRuby::Contact](docs/Contact.md)
134
136
  - [DearInventoryRuby::Customer](docs/Customer.md)
135
137
  - [DearInventoryRuby::Customers](docs/Customers.md)
@@ -140,6 +142,7 @@ Class | Method | HTTP request | Description
140
142
  - [DearInventoryRuby::PaymentTerms](docs/PaymentTerms.md)
141
143
  - [DearInventoryRuby::PriceTier](docs/PriceTier.md)
142
144
  - [DearInventoryRuby::PriceTiers](docs/PriceTiers.md)
145
+ - [DearInventoryRuby::Sale](docs/Sale.md)
143
146
  - [DearInventoryRuby::SaleAdditionalCharge](docs/SaleAdditionalCharge.md)
144
147
  - [DearInventoryRuby::SaleInvoice](docs/SaleInvoice.md)
145
148
  - [DearInventoryRuby::SaleInvoiceAdditionalCharge](docs/SaleInvoiceAdditionalCharge.md)
@@ -159,6 +162,7 @@ Class | Method | HTTP request | Description
159
162
  - [DearInventoryRuby::TaxComponent](docs/TaxComponent.md)
160
163
  - [DearInventoryRuby::Taxes](docs/Taxes.md)
161
164
  - [DearInventoryRuby::Webhook](docs/Webhook.md)
165
+ - [DearInventoryRuby::WebhookType](docs/WebhookType.md)
162
166
  - [DearInventoryRuby::Webhooks](docs/Webhooks.md)
163
167
 
164
168
 
@@ -0,0 +1,16 @@
1
+ # DearInventoryRuby::AuthorizationType
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'DearInventoryRuby'
12
+
13
+ instance = DearInventoryRuby::AuthorizationType.new()
14
+ ```
15
+
16
+
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
- [**create_webhooks**](InventoryApi.md#create_webhooks) | **POST** /webhooks | Allows you to create a Webhook
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
@@ -23,6 +23,7 @@ Method | HTTP request | Description
23
23
  [**get_me**](InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
24
24
  [**get_payment_terms**](InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
25
25
  [**get_price_tiers**](InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
26
+ [**get_sale**](InventoryApi.md#get_sale) | **GET** /sale | Allows you to retrieve the Sale
26
27
  [**get_sale_invoices**](InventoryApi.md#get_sale_invoices) | **GET** /sale/invoice | Allows you to retrieve the sale invoices
27
28
  [**get_sale_order**](InventoryApi.md#get_sale_order) | **GET** /sale/order | Allows you to retrieve the Sale Order
28
29
  [**get_sale_payment**](InventoryApi.md#get_sale_payment) | **GET** /sale/payment | Allows you to retrieve the Sale Payments
@@ -526,9 +527,9 @@ Name | Type | Description | Notes
526
527
  - **Accept**: application/json
527
528
 
528
529
 
529
- ## create_webhooks
530
+ ## create_webhook
530
531
 
531
- > Webhooks create_webhooks(webhook, opts)
532
+ > Webhook create_webhook(webhook, opts)
532
533
 
533
534
  Allows you to create a Webhook
534
535
 
@@ -558,10 +559,10 @@ opts = {
558
559
 
559
560
  begin
560
561
  #Allows you to create a Webhook
561
- result = api_instance.create_webhooks(webhook, opts)
562
+ result = api_instance.create_webhook(webhook, opts)
562
563
  p result
563
564
  rescue DearInventoryRuby::ApiError => e
564
- puts "Exception when calling InventoryApi->create_webhooks: #{e}"
565
+ puts "Exception when calling InventoryApi->create_webhook: #{e}"
565
566
  end
566
567
  ```
567
568
 
@@ -575,7 +576,7 @@ Name | Type | Description | Notes
575
576
 
576
577
  ### Return type
577
578
 
578
- [**Webhooks**](Webhooks.md)
579
+ [**Webhook**](Webhook.md)
579
580
 
580
581
  ### Authorization
581
582
 
@@ -1201,6 +1202,71 @@ This endpoint does not need any parameter.
1201
1202
  - **Accept**: application/json
1202
1203
 
1203
1204
 
1205
+ ## get_sale
1206
+
1207
+ > Sale get_sale(opts)
1208
+
1209
+ Allows you to retrieve the Sale
1210
+
1211
+ ### Example
1212
+
1213
+ ```ruby
1214
+ # load the gem
1215
+ require 'dear-inventory-ruby'
1216
+ # setup authorization
1217
+ DearInventoryRuby.configure do |config|
1218
+ # Configure API key authorization: accountID
1219
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
1220
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1221
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
1222
+
1223
+ # Configure API key authorization: appKey
1224
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
1225
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1226
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
1227
+ end
1228
+
1229
+ api_instance = DearInventoryRuby::InventoryApi.new
1230
+ opts = {
1231
+ id: 'id_example', # String | Default is nil
1232
+ combine_additional_charges: false, # Boolean | Show additional charges in 'Lines' array
1233
+ hide_inventory_movements: false, # Boolean | Hide inventory movements (Default = false)
1234
+ include_transactions: false # Boolean | Show related transactions (Default = false)
1235
+ }
1236
+
1237
+ begin
1238
+ #Allows you to retrieve the Sale
1239
+ result = api_instance.get_sale(opts)
1240
+ p result
1241
+ rescue DearInventoryRuby::ApiError => e
1242
+ puts "Exception when calling InventoryApi->get_sale: #{e}"
1243
+ end
1244
+ ```
1245
+
1246
+ ### Parameters
1247
+
1248
+
1249
+ Name | Type | Description | Notes
1250
+ ------------- | ------------- | ------------- | -------------
1251
+ **id** | **String**| Default is nil | [optional]
1252
+ **combine_additional_charges** | **Boolean**| Show additional charges in 'Lines' array | [optional] [default to false]
1253
+ **hide_inventory_movements** | **Boolean**| Hide inventory movements (Default = false) | [optional] [default to false]
1254
+ **include_transactions** | **Boolean**| Show related transactions (Default = false) | [optional] [default to false]
1255
+
1256
+ ### Return type
1257
+
1258
+ [**Sale**](Sale.md)
1259
+
1260
+ ### Authorization
1261
+
1262
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
1263
+
1264
+ ### HTTP request headers
1265
+
1266
+ - **Content-Type**: Not defined
1267
+ - **Accept**: application/json
1268
+
1269
+
1204
1270
  ## get_sale_invoices
1205
1271
 
1206
1272
  > SaleInvoices get_sale_invoices(opts)
@@ -1882,7 +1948,7 @@ Name | Type | Description | Notes
1882
1948
 
1883
1949
  ## update_webhook
1884
1950
 
1885
- > Webhooks update_webhook(webhook, opts)
1951
+ > Webhook update_webhook(webhook, opts)
1886
1952
 
1887
1953
  Allows you to update a webhook
1888
1954
 
@@ -1929,7 +1995,7 @@ Name | Type | Description | Notes
1929
1995
 
1930
1996
  ### Return type
1931
1997
 
1932
- [**Webhooks**](Webhooks.md)
1998
+ [**Webhook**](Webhook.md)
1933
1999
 
1934
2000
  ### Authorization
1935
2001
 
data/docs/Sale.md ADDED
@@ -0,0 +1,99 @@
1
+ # DearInventoryRuby::Sale
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | Unique DEAR Sale ID. Required for PUT | [optional]
8
+ **customer** | **String** | Customer name | [optional]
9
+ **customer_id** | **String** | Customer identifier | [optional]
10
+ **contact** | **String** | Customer Contact name | [optional]
11
+ **phone** | **String** | Customer Contact phone | [optional]
12
+ **email** | **String** | Customer Contact email | [optional]
13
+ **default_account** | **String** | Account code used by default for invoice lines when no revenue account is defined on Product. By default it is equal to Customer Sale account | [optional]
14
+ **skip_quote** | **Boolean** | True if there is no quote in the sale | [optional]
15
+ **billing_address** | [**Address**](Address.md) | | [optional]
16
+ **shipping_address** | [**ShippingAddress**](ShippingAddress.md) | | [optional]
17
+ **shipping_notes** | **String** | Shipping Notes | [optional]
18
+ **base_currency** | **String** | 3 character currency code of Base Currency defined in General Settings on the moment when Sale was created. | [optional]
19
+ **customer_currency** | **String** | 3 character currency code of customer Currency defined in Customer card at the moment when customer is selected for the Sale. | [optional]
20
+ **tax_rule** | **String** | Default Tax Rule name selected for Sale | [optional]
21
+ **tax_calculation** | **String** | Inclusive or Exclusive | [optional]
22
+ **terms** | **String** | Payment terms name | [optional]
23
+ **price_tier** | **String** | Price Tier name selected for Sale | [optional]
24
+ **ship_by** | **Date** | Date when shipment is due | [optional]
25
+ **location** | **String** | Default location to pick stock from | [optional]
26
+ **sale_order_date** | **Date** | Date when task was created | [optional]
27
+ **last_modified_on** | **Date** | UTC Time | [optional]
28
+ **note** | **String** | Custom Sale note | [optional]
29
+ **customer_reference** | **String** | Reference number used by customer to identify this sale. Could be a purchase order number generated by customer. | [optional]
30
+ **cogs_amount** | **Float** | COGS amount in base currency | [optional]
31
+ **status** | **String** | Sale Status, see possible values | [optional]
32
+ **combined_picking_status** | **String** | Pick status. Possible Values are VOIDED, NOT AVAILABLE, PICKED, PICKING , NOT PICKED , PARTIALLY PICKED | [optional]
33
+ **combined_packing_status** | **String** | Pack status. Possible Values are VOIDED, NOT AVAILABLE, PACKED, PACKING, NOT PACKED, PARTIALLY PACKED | [optional]
34
+ **combined_shipping_status** | **String** | Ship status. Possible Values are VOIDED, NOT AVAILABLE, SHIPPED, SHIPPING , NOT SHIPPED , PARTIALLY SHIPPED | [optional]
35
+ **ful_filment_status** | **String** | Fulfilment status. Possible Values are FULFILLED, PARTIALLY FULFILLED, NOT AVAILABLE, NOT FULFILLED, VOIDED | [optional]
36
+ **combined_invoice_status** | **String** | Invoice status. Possible Values are INVOICED, INVOICED / CREDITED, NOT AVAILABLE, NOT INVOICED, PARTIALLY INVOICED, PARTIALLY INVOICED / CREDITED | [optional]
37
+ **combined_payment_status** | **String** | Payment status. Possible Values are NOT REFUNDED, PREPAID, PARTIALLY PAID, UNPAID, PAID, VOIDED | [optional]
38
+ **combined_tracking_numbers** | **String** | Tracking Numbers | [optional]
39
+ **carrier** | **String** | Name of Carrier/shipping method | [optional]
40
+ **currency_rate** | **Float** | Conversion Rate expressed as number of Base currency units for one Customer currency unit | [optional]
41
+ **sales_representative** | **String** | Sales representative name | [optional]
42
+ **type** | **String** | Type of sale Simple Sale or Advanced Sale, Service Sale | [optional]
43
+ **source_channel** | **String** | Source of the sale. read-only field | [optional]
44
+ **external_id** | **String** | Custom field that is only available in API and allows to set arbitrary value for the sale for later search and any custom logic | [optional]
45
+ **service_only** | **String** | true when it is service-only sale | [optional]
46
+ **quote** | [**SaleQuote**](SaleQuote.md) | | [optional]
47
+ **order** | [**SaleOrder**](SaleOrder.md) | | [optional]
48
+ **invoices** | [**Array<SaleInvoice>**](SaleInvoice.md) | Sale Invoices | [optional]
49
+
50
+ ## Code Sample
51
+
52
+ ```ruby
53
+ require 'DearInventoryRuby'
54
+
55
+ instance = DearInventoryRuby::Sale.new(id: nil,
56
+ customer: nil,
57
+ customer_id: nil,
58
+ contact: nil,
59
+ phone: nil,
60
+ email: nil,
61
+ default_account: nil,
62
+ skip_quote: nil,
63
+ billing_address: nil,
64
+ shipping_address: nil,
65
+ shipping_notes: nil,
66
+ base_currency: nil,
67
+ customer_currency: nil,
68
+ tax_rule: nil,
69
+ tax_calculation: nil,
70
+ terms: nil,
71
+ price_tier: nil,
72
+ ship_by: nil,
73
+ location: nil,
74
+ sale_order_date: nil,
75
+ last_modified_on: nil,
76
+ note: nil,
77
+ customer_reference: nil,
78
+ cogs_amount: nil,
79
+ status: nil,
80
+ combined_picking_status: nil,
81
+ combined_packing_status: nil,
82
+ combined_shipping_status: nil,
83
+ ful_filment_status: nil,
84
+ combined_invoice_status: nil,
85
+ combined_payment_status: nil,
86
+ combined_tracking_numbers: nil,
87
+ carrier: nil,
88
+ currency_rate: nil,
89
+ sales_representative: nil,
90
+ type: nil,
91
+ source_channel: nil,
92
+ external_id: nil,
93
+ service_only: nil,
94
+ quote: nil,
95
+ order: nil,
96
+ invoices: nil)
97
+ ```
98
+
99
+
@@ -0,0 +1,16 @@
1
+ # DearInventoryRuby::WebhookType
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'DearInventoryRuby'
12
+
13
+ instance = DearInventoryRuby::WebhookType.new()
14
+ ```
15
+
16
+
@@ -543,9 +543,9 @@ module DearInventoryRuby
543
543
  # @param webhook [Webhook] a webhook object with properties to create
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
- # @return [Webhooks]
547
- def create_webhooks(webhook, opts = {})
548
- data, _status_code, _headers = create_webhooks_with_http_info(webhook, opts)
546
+ # @return [Webhook]
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
 
@@ -553,14 +553,14 @@ module DearInventoryRuby
553
553
  # @param webhook [Webhook] a webhook object with properties to create
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
- # @return [Array<(Webhooks, Integer, Hash)>] Webhooks data, response status code and response headers
557
- def create_webhooks_with_http_info(webhook, opts = {})
556
+ # @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
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.create_webhooks ...'
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.create_webhooks"
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'
@@ -583,7 +583,7 @@ module DearInventoryRuby
583
583
  post_body = opts[:body] || @api_client.object_to_http_body(webhook)
584
584
 
585
585
  # return_type
586
- return_type = opts[:return_type] || 'Webhooks'
586
+ return_type = opts[:return_type] || 'Webhook'
587
587
 
588
588
  # auth_names
589
589
  auth_names = opts[:auth_names] || ['accountID', 'appKey']
@@ -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#create_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
@@ -1222,6 +1222,72 @@ module DearInventoryRuby
1222
1222
  return data, status_code, headers
1223
1223
  end
1224
1224
 
1225
+ # Allows you to retrieve the Sale
1226
+ # @param [Hash] opts the optional parameters
1227
+ # @option opts [String] :id Default is nil
1228
+ # @option opts [Boolean] :combine_additional_charges Show additional charges in &#39;Lines&#39; array (default to false)
1229
+ # @option opts [Boolean] :hide_inventory_movements Hide inventory movements (Default &#x3D; false) (default to false)
1230
+ # @option opts [Boolean] :include_transactions Show related transactions (Default &#x3D; false) (default to false)
1231
+ # @return [Sale]
1232
+ def get_sale(opts = {})
1233
+ data, _status_code, _headers = get_sale_with_http_info(opts)
1234
+ data
1235
+ end
1236
+
1237
+ # Allows you to retrieve the Sale
1238
+ # @param [Hash] opts the optional parameters
1239
+ # @option opts [String] :id Default is nil
1240
+ # @option opts [Boolean] :combine_additional_charges Show additional charges in &#39;Lines&#39; array
1241
+ # @option opts [Boolean] :hide_inventory_movements Hide inventory movements (Default &#x3D; false)
1242
+ # @option opts [Boolean] :include_transactions Show related transactions (Default &#x3D; false)
1243
+ # @return [Array<(Sale, Integer, Hash)>] Sale data, response status code and response headers
1244
+ def get_sale_with_http_info(opts = {})
1245
+ if @api_client.config.debugging
1246
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale ...'
1247
+ end
1248
+ # resource path
1249
+ local_var_path = '/sale'
1250
+
1251
+ # query parameters
1252
+ query_params = opts[:query_params] || {}
1253
+ query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
1254
+ query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
1255
+ query_params[:'HideInventoryMovements'] = opts[:'hide_inventory_movements'] if !opts[:'hide_inventory_movements'].nil?
1256
+ query_params[:'IncludeTransactions'] = opts[:'include_transactions'] if !opts[:'include_transactions'].nil?
1257
+
1258
+ # header parameters
1259
+ header_params = opts[:header_params] || {}
1260
+ # HTTP header 'Accept' (if needed)
1261
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1262
+
1263
+ # form parameters
1264
+ form_params = opts[:form_params] || {}
1265
+
1266
+ # http body (model)
1267
+ post_body = opts[:body]
1268
+
1269
+ # return_type
1270
+ return_type = opts[:return_type] || 'Sale'
1271
+
1272
+ # auth_names
1273
+ auth_names = opts[:auth_names] || ['accountID', 'appKey']
1274
+
1275
+ new_options = opts.merge(
1276
+ :header_params => header_params,
1277
+ :query_params => query_params,
1278
+ :form_params => form_params,
1279
+ :body => post_body,
1280
+ :auth_names => auth_names,
1281
+ :return_type => return_type
1282
+ )
1283
+
1284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1285
+ if @api_client.config.debugging
1286
+ @api_client.config.logger.debug "API called: InventoryApi#get_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1287
+ end
1288
+ return data, status_code, headers
1289
+ end
1290
+
1225
1291
  # Allows you to retrieve the sale invoices
1226
1292
  # @param [Hash] opts the optional parameters
1227
1293
  # @option opts [String] :sale_id Unique DEAR Sale ID
@@ -1929,7 +1995,7 @@ module DearInventoryRuby
1929
1995
  # @param webhook [Webhook] a webhook object with properties to update
1930
1996
  # @param [Hash] opts the optional parameters
1931
1997
  # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
1932
- # @return [Webhooks]
1998
+ # @return [Webhook]
1933
1999
  def update_webhook(webhook, opts = {})
1934
2000
  data, _status_code, _headers = update_webhook_with_http_info(webhook, opts)
1935
2001
  data
@@ -1939,7 +2005,7 @@ module DearInventoryRuby
1939
2005
  # @param webhook [Webhook] a webhook object with properties to update
1940
2006
  # @param [Hash] opts the optional parameters
1941
2007
  # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
1942
- # @return [Array<(Webhooks, Integer, Hash)>] Webhooks data, response status code and response headers
2008
+ # @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
1943
2009
  def update_webhook_with_http_info(webhook, opts = {})
1944
2010
  if @api_client.config.debugging
1945
2011
  @api_client.config.logger.debug 'Calling API: InventoryApi.update_webhook ...'
@@ -1969,7 +2035,7 @@ module DearInventoryRuby
1969
2035
  post_body = opts[:body] || @api_client.object_to_http_body(webhook)
1970
2036
 
1971
2037
  # return_type
1972
- return_type = opts[:return_type] || 'Webhooks'
2038
+ return_type = opts[:return_type] || 'Webhook'
1973
2039
 
1974
2040
  # auth_names
1975
2041
  auth_names = opts[:auth_names] || ['accountID', 'appKey']
@@ -0,0 +1,37 @@
1
+ =begin
2
+ #DEAR Inventory API
3
+
4
+ #This specifing endpoints for DEAR Inventory API
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: nnhansg@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module DearInventoryRuby
16
+ class AuthorizationType
17
+ BASICAUTH = "basicauth".freeze
18
+ BEARERAUTH = "bearerauth".freeze
19
+ NOAUTH = "noauth".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = AuthorizationType.constants.select { |c| AuthorizationType::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #AuthorizationType" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end