dear-inventory-ruby 0.1.5 → 0.1.6

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -9
  3. data/docs/Account.md +43 -0
  4. data/docs/Accounts.md +21 -0
  5. data/docs/Address.md +2 -2
  6. data/docs/Contact.md +1 -1
  7. data/docs/Customer.md +7 -7
  8. data/docs/InventoryApi.md +731 -25
  9. data/docs/PaymentTerm.md +27 -0
  10. data/docs/PaymentTerms.md +21 -0
  11. data/docs/Success.md +17 -0
  12. data/docs/Tax.md +33 -0
  13. data/docs/TaxComponent.md +23 -0
  14. data/docs/Taxes.md +21 -0
  15. data/lib/dear-inventory-ruby.rb +8 -0
  16. data/lib/dear-inventory-ruby/api/inventory_api.rb +740 -14
  17. data/lib/dear-inventory-ruby/models/account.rb +477 -0
  18. data/lib/dear-inventory-ruby/models/accounts.rb +229 -0
  19. data/lib/dear-inventory-ruby/models/address.rb +10 -0
  20. data/lib/dear-inventory-ruby/models/contact.rb +12 -3
  21. data/lib/dear-inventory-ruby/models/customer.rb +42 -3
  22. data/lib/dear-inventory-ruby/models/payment_term.rb +319 -0
  23. data/lib/dear-inventory-ruby/models/payment_terms.rb +229 -0
  24. data/lib/dear-inventory-ruby/models/success.rb +207 -0
  25. data/lib/dear-inventory-ruby/models/tax.rb +360 -0
  26. data/lib/dear-inventory-ruby/models/tax_component.rb +306 -0
  27. data/lib/dear-inventory-ruby/models/taxes.rb +229 -0
  28. data/lib/dear-inventory-ruby/version.rb +1 -1
  29. data/spec/api/inventory_api_spec.rb +148 -4
  30. data/spec/models/account_spec.rb +131 -0
  31. data/spec/models/accounts_spec.rb +53 -0
  32. data/spec/models/payment_term_spec.rb +75 -0
  33. data/spec/models/payment_terms_spec.rb +53 -0
  34. data/spec/models/success_spec.rb +41 -0
  35. data/spec/models/tax_component_spec.rb +59 -0
  36. data/spec/models/tax_spec.rb +89 -0
  37. data/spec/models/taxes_spec.rb +53 -0
  38. metadata +34 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 727a014b9815bd76c254c9f6315951458046e0808bb811db5a0bc6690bb7ddf0
4
- data.tar.gz: 51138ec20b08a7b2875f65b6016532a441cac28dc797a4dae022c02a2ceb7cc4
3
+ metadata.gz: 981ad5ba57687926b043b58eb0506c75813d4d54088c83242178633bbc8fcb19
4
+ data.tar.gz: edb44fd63ecf8caca7bb1dc4d562e89b270c8f4a62f00baf3f398acfbe47536f
5
5
  SHA512:
6
- metadata.gz: ead27d454433630290c7dc828838d7754dcd1b23b7c229be23c45ff7fb30ff4f47f7877399cdcfbeff45c013345784d1e6669e5f2fd87e889cbba3bde5ac58aa
7
- data.tar.gz: bd46592e998eedc10c53b9c149cbc32385c6f651bc7a4fa32dff46aa4c2ec06586daaf328787d2a1a4e7867c1d2d21399edd570de4e7d185ac7daf29fc74ede4
6
+ metadata.gz: f673a98cc125d081c4ceeaca624949a39421f438cf0fb1152f45b55e65bbd2fe7fea1eff8b61bbd285a46601ed84462432a9ed514d3b3f7789d139fa1f9303f8
7
+ data.tar.gz: c2f7be8f52b45c23030f951061751b102ec2e1a4e5fcb4bdbcaf8ed140003cb945aa70216c751af5e4734e9cbc99144bbba353b00d05c9c6029b81f097614bbc
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.5
10
+ - Package version: 0.1.6
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.5.gem
27
+ gem install ./dear-inventory-ruby-0.1.6.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./dear-inventory-ruby-0.1.5.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./dear-inventory-ruby-0.1.6.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.5'
36
+ gem 'dear-inventory-ruby', '~> 0.1.6'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -71,17 +71,17 @@ DearInventoryRuby.configure do |config|
71
71
  end
72
72
 
73
73
  api_instance = DearInventoryRuby::InventoryApi.new
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
74
+ 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
75
75
  opts = {
76
- summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors
76
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
77
77
  }
78
78
 
79
79
  begin
80
- #Allows you to create a customer
81
- result = api_instance.create_customer(customer, opts)
80
+ #Allows you to create an Account
81
+ result = api_instance.create_account(account, opts)
82
82
  p result
83
83
  rescue DearInventoryRuby::ApiError => e
84
- puts "Exception when calling InventoryApi->create_customer: #{e}"
84
+ puts "Exception when calling InventoryApi->create_account: #{e}"
85
85
  end
86
86
 
87
87
  ```
@@ -92,19 +92,38 @@ All URIs are relative to *https://inventory.dearsystems.com/ExternalApi/v2*
92
92
 
93
93
  Class | Method | HTTP request | Description
94
94
  ------------ | ------------- | ------------- | -------------
95
+ *DearInventoryRuby::InventoryApi* | [**create_account**](docs/InventoryApi.md#create_account) | **POST** /ref/account | Allows you to create an Account
95
96
  *DearInventoryRuby::InventoryApi* | [**create_customer**](docs/InventoryApi.md#create_customer) | **POST** /customer | Allows you to create a customer
97
+ *DearInventoryRuby::InventoryApi* | [**create_payment_term**](docs/InventoryApi.md#create_payment_term) | **POST** /ref/paymentterm | Allows you to create a payment term
98
+ *DearInventoryRuby::InventoryApi* | [**create_tax**](docs/InventoryApi.md#create_tax) | **POST** /ref/tax | Allows you to create a tax
99
+ *DearInventoryRuby::InventoryApi* | [**delete_account**](docs/InventoryApi.md#delete_account) | **DELETE** /ref/account | Allows you to delete an Account
100
+ *DearInventoryRuby::InventoryApi* | [**delete_payment_term**](docs/InventoryApi.md#delete_payment_term) | **DELETE** /ref/paymentterm | Allows you to delete a payment term
101
+ *DearInventoryRuby::InventoryApi* | [**get_accounts**](docs/InventoryApi.md#get_accounts) | **GET** /ref/account | Allows you to retrieve the Chart of Accounts
96
102
  *DearInventoryRuby::InventoryApi* | [**get_customers**](docs/InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
103
+ *DearInventoryRuby::InventoryApi* | [**get_payment_terms**](docs/InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
104
+ *DearInventoryRuby::InventoryApi* | [**get_taxes**](docs/InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
105
+ *DearInventoryRuby::InventoryApi* | [**update_account**](docs/InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
97
106
  *DearInventoryRuby::InventoryApi* | [**update_customer**](docs/InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
107
+ *DearInventoryRuby::InventoryApi* | [**update_payment_term**](docs/InventoryApi.md#update_payment_term) | **PUT** /ref/paymentterm | Allows you to update a payment term
108
+ *DearInventoryRuby::InventoryApi* | [**update_tax**](docs/InventoryApi.md#update_tax) | **PUT** /ref/tax | Allows you to update a tax
98
109
 
99
110
 
100
111
  ## Documentation for Models
101
112
 
113
+ - [DearInventoryRuby::Account](docs/Account.md)
114
+ - [DearInventoryRuby::Accounts](docs/Accounts.md)
102
115
  - [DearInventoryRuby::Address](docs/Address.md)
103
116
  - [DearInventoryRuby::Contact](docs/Contact.md)
104
117
  - [DearInventoryRuby::CurrencyCode](docs/CurrencyCode.md)
105
118
  - [DearInventoryRuby::Customer](docs/Customer.md)
106
119
  - [DearInventoryRuby::Customers](docs/Customers.md)
107
120
  - [DearInventoryRuby::Error](docs/Error.md)
121
+ - [DearInventoryRuby::PaymentTerm](docs/PaymentTerm.md)
122
+ - [DearInventoryRuby::PaymentTerms](docs/PaymentTerms.md)
123
+ - [DearInventoryRuby::Success](docs/Success.md)
124
+ - [DearInventoryRuby::Tax](docs/Tax.md)
125
+ - [DearInventoryRuby::TaxComponent](docs/TaxComponent.md)
126
+ - [DearInventoryRuby::Taxes](docs/Taxes.md)
108
127
 
109
128
 
110
129
  ## Documentation for Authorization
data/docs/Account.md ADDED
@@ -0,0 +1,43 @@
1
+ # DearInventoryRuby::Account
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **code** | **String** | Unique code of Account |
8
+ **name** | **String** | Account Name |
9
+ **type** | **String** | Should be one of the following values: `BANK`, `CURRLIAB`, `LIABILITY`, `TERMLIA`, `PAYGLIABILITY`, `SUPERANNUATIONLIABILITY`, `WAGESPAYABLELIABILITY` |
10
+ **status** | **String** | Account status |
11
+ **description** | **String** | Account description | [optional]
12
+ **_class** | **String** | Should be one of the following values: `ASSET`, `LIABILITY`, `EXPENSE`, `EQUITY`, `REVENUE` | [optional]
13
+ **system_account** | **String** | Read-only for PUT. Should be one of the following values: BANKCURRENCYGAIN, CREDITORS, DEBTORS, GST, GSTONIMPORTS, HISTORICAL, REALISEDCURRENCYGAIN, RETAINEDEARNINGS, ROUNDING, TRACKINGTRANSFERS, UNPAIDEXPCLM, UNREALISEDCURRENCYGAIN, WAGEPAYABLES | [optional]
14
+ **for_payments** | **String** | Account status | [optional]
15
+ **display_name** | **String** | Account display name. Read-only. | [optional]
16
+ **old_code** | **String** | Read-only. | [optional]
17
+ **bank** | **String** | Name of the Bank. Only for PUT and POST. Required if Account Type is BANK. | [optional]
18
+ **bank_account_number** | **String** | Bank Account Number. Only for PUT and POST. Required if Account Type is BANK. | [optional]
19
+ **bank_account_id** | **String** | Bank Account ID to which the Account is linked. Read-only. | [optional]
20
+ **currency** | **String** | Currency. Read-only. | [optional]
21
+
22
+ ## Code Sample
23
+
24
+ ```ruby
25
+ require 'DearInventoryRuby'
26
+
27
+ instance = DearInventoryRuby::Account.new(code: null,
28
+ name: null,
29
+ type: null,
30
+ status: null,
31
+ description: null,
32
+ _class: null,
33
+ system_account: null,
34
+ for_payments: null,
35
+ display_name: null,
36
+ old_code: null,
37
+ bank: null,
38
+ bank_account_number: null,
39
+ bank_account_id: null,
40
+ currency: null)
41
+ ```
42
+
43
+
data/docs/Accounts.md ADDED
@@ -0,0 +1,21 @@
1
+ # DearInventoryRuby::Accounts
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **total** | **String** | Total | [optional]
8
+ **page** | **String** | Page | [optional]
9
+ **accounts_list** | [**Array<Account>**](Account.md) | Array of Accounts | [optional]
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'DearInventoryRuby'
15
+
16
+ instance = DearInventoryRuby::Accounts.new(total: null,
17
+ page: null,
18
+ accounts_list: null)
19
+ ```
20
+
21
+
data/docs/Address.md CHANGED
@@ -10,8 +10,8 @@ Name | Type | Description | Notes
10
10
  **city** | **String** | City / Suburb | [optional]
11
11
  **state** | **String** | State / Province | [optional]
12
12
  **post_code** | **String** | Zip / PostCode | [optional]
13
- **country** | **String** | Country name | [optional]
14
- **type** | **String** | Address Type. Should be one of the following values: `Billing`, `Business` or `Shipping`. | [optional]
13
+ **country** | **String** | Country name |
14
+ **type** | **String** | Address Type. Should be one of the following values: `Billing`, `Business` or `Shipping`. |
15
15
  **default_for_type** | **Boolean** | Points that Address is used as default for chosen Type. `false` as default. | [optional] [default to false]
16
16
 
17
17
  ## Code Sample
data/docs/Contact.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **id** | **String** | If passed in PUT method, entry will be searched by id, found entry will be updated, otherwise created | [optional]
8
- **name** | **String** | Name of Contact | [optional]
8
+ **name** | **String** | Name of Contact |
9
9
  **phone** | **String** | Phone | [optional]
10
10
  **fax** | **String** | Fax | [optional]
11
11
  **email** | **String** | Email | [optional]
data/docs/Customer.md CHANGED
@@ -5,13 +5,13 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **id** | **String** | Unique Customer ID | [optional]
8
- **name** | **String** | Name of Customer | [optional]
9
- **status** | **String** | Points that Customer is Active. Available values are Active and Deprecated. Required for POST | [optional]
10
- **currency** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
11
- **payment_term** | **String** | Payment term | [optional]
12
- **account_receivable** | **String** | Account receivable code of Customer | [optional]
13
- **revenue_account** | **String** | Sale account code of Customer | [optional]
14
- **tax_rule** | **String** | Tax rule name | [optional]
8
+ **name** | **String** | Name of Customer |
9
+ **status** | **String** | Points that Customer is Active. Available values are Active and Deprecated. Required for POST |
10
+ **currency** | [**CurrencyCode**](CurrencyCode.md) | |
11
+ **payment_term** | **String** | Payment term |
12
+ **account_receivable** | **String** | Account receivable code of Customer |
13
+ **revenue_account** | **String** | Sale account code of Customer |
14
+ **tax_rule** | **String** | Tax rule name |
15
15
  **price_tier** | **String** | Price tier | [optional]
16
16
  **carrier** | **String** | Carrier name | [optional]
17
17
  **sales_representative** | **String** | Sales representative | [optional]
data/docs/InventoryApi.md CHANGED
@@ -4,17 +4,457 @@ All URIs are relative to *https://inventory.dearsystems.com/ExternalApi/v2*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**create_account**](InventoryApi.md#create_account) | **POST** /ref/account | Allows you to create an Account
7
8
  [**create_customer**](InventoryApi.md#create_customer) | **POST** /customer | Allows you to create a customer
9
+ [**create_payment_term**](InventoryApi.md#create_payment_term) | **POST** /ref/paymentterm | Allows you to create a payment term
10
+ [**create_tax**](InventoryApi.md#create_tax) | **POST** /ref/tax | Allows you to create a tax
11
+ [**delete_account**](InventoryApi.md#delete_account) | **DELETE** /ref/account | Allows you to delete an Account
12
+ [**delete_payment_term**](InventoryApi.md#delete_payment_term) | **DELETE** /ref/paymentterm | Allows you to delete a payment term
13
+ [**get_accounts**](InventoryApi.md#get_accounts) | **GET** /ref/account | Allows you to retrieve the Chart of Accounts
8
14
  [**get_customers**](InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
15
+ [**get_payment_terms**](InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
16
+ [**get_taxes**](InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
17
+ [**update_account**](InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
9
18
  [**update_customer**](InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
19
+ [**update_payment_term**](InventoryApi.md#update_payment_term) | **PUT** /ref/paymentterm | Allows you to update a payment term
20
+ [**update_tax**](InventoryApi.md#update_tax) | **PUT** /ref/tax | Allows you to update a tax
10
21
 
11
22
 
12
23
 
24
+ ## create_account
25
+
26
+ > Accounts create_account(account, opts)
27
+
28
+ Allows you to create an Account
29
+
30
+ ### Example
31
+
32
+ ```ruby
33
+ # load the gem
34
+ require 'dear-inventory-ruby'
35
+ # setup authorization
36
+ DearInventoryRuby.configure do |config|
37
+ # Configure API key authorization: accountID
38
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
39
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
40
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
41
+
42
+ # Configure API key authorization: appKey
43
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
44
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
45
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
46
+ end
47
+
48
+ api_instance = DearInventoryRuby::InventoryApi.new
49
+ 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
50
+ opts = {
51
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
52
+ }
53
+
54
+ begin
55
+ #Allows you to create an Account
56
+ result = api_instance.create_account(account, opts)
57
+ p result
58
+ rescue DearInventoryRuby::ApiError => e
59
+ puts "Exception when calling InventoryApi->create_account: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+
66
+ Name | Type | Description | Notes
67
+ ------------- | ------------- | ------------- | -------------
68
+ **account** | [**Account**](Account.md)| an Account object with properties to create |
69
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
70
+
71
+ ### Return type
72
+
73
+ [**Accounts**](Accounts.md)
74
+
75
+ ### Authorization
76
+
77
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: application/json
82
+ - **Accept**: application/json
83
+
84
+
13
85
  ## create_customer
14
86
 
15
- > Customers create_customer(customer, opts)
87
+ > Customers create_customer(customer, opts)
88
+
89
+ Allows you to create a customer
90
+
91
+ ### Example
92
+
93
+ ```ruby
94
+ # load the gem
95
+ require 'dear-inventory-ruby'
96
+ # setup authorization
97
+ DearInventoryRuby.configure do |config|
98
+ # Configure API key authorization: accountID
99
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
100
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
101
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
102
+
103
+ # Configure API key authorization: appKey
104
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
105
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
106
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
107
+ end
108
+
109
+ api_instance = DearInventoryRuby::InventoryApi.new
110
+ 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 customer object with properties to create
111
+ opts = {
112
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
113
+ }
114
+
115
+ begin
116
+ #Allows you to create a customer
117
+ result = api_instance.create_customer(customer, opts)
118
+ p result
119
+ rescue DearInventoryRuby::ApiError => e
120
+ puts "Exception when calling InventoryApi->create_customer: #{e}"
121
+ end
122
+ ```
123
+
124
+ ### Parameters
125
+
126
+
127
+ Name | Type | Description | Notes
128
+ ------------- | ------------- | ------------- | -------------
129
+ **customer** | [**Customer**](Customer.md)| a customer object with properties to create |
130
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
131
+
132
+ ### Return type
133
+
134
+ [**Customers**](Customers.md)
135
+
136
+ ### Authorization
137
+
138
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
139
+
140
+ ### HTTP request headers
141
+
142
+ - **Content-Type**: application/json
143
+ - **Accept**: application/json
144
+
145
+
146
+ ## create_payment_term
147
+
148
+ > PaymentTerms create_payment_term(payment_term, opts)
149
+
150
+ Allows you to create a payment term
151
+
152
+ ### Example
153
+
154
+ ```ruby
155
+ # load the gem
156
+ require 'dear-inventory-ruby'
157
+ # setup authorization
158
+ DearInventoryRuby.configure do |config|
159
+ # Configure API key authorization: accountID
160
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
161
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
162
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
163
+
164
+ # Configure API key authorization: appKey
165
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
166
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
167
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
168
+ end
169
+
170
+ api_instance = DearInventoryRuby::InventoryApi.new
171
+ payment_term = { "Name": "5 days since end of month", "Duration": 5, "Method": "days since the end of the month", "IsActive": true, "IsDefault": false } # PaymentTerm | a payment term object with properties to create
172
+ opts = {
173
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
174
+ }
175
+
176
+ begin
177
+ #Allows you to create a payment term
178
+ result = api_instance.create_payment_term(payment_term, opts)
179
+ p result
180
+ rescue DearInventoryRuby::ApiError => e
181
+ puts "Exception when calling InventoryApi->create_payment_term: #{e}"
182
+ end
183
+ ```
184
+
185
+ ### Parameters
186
+
187
+
188
+ Name | Type | Description | Notes
189
+ ------------- | ------------- | ------------- | -------------
190
+ **payment_term** | [**PaymentTerm**](PaymentTerm.md)| a payment term object with properties to create |
191
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
192
+
193
+ ### Return type
194
+
195
+ [**PaymentTerms**](PaymentTerms.md)
196
+
197
+ ### Authorization
198
+
199
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
200
+
201
+ ### HTTP request headers
202
+
203
+ - **Content-Type**: application/json
204
+ - **Accept**: application/json
205
+
206
+
207
+ ## create_tax
208
+
209
+ > Taxes create_tax(tax, opts)
210
+
211
+ Allows you to create a tax
212
+
213
+ ### Example
214
+
215
+ ```ruby
216
+ # load the gem
217
+ require 'dear-inventory-ruby'
218
+ # setup authorization
219
+ DearInventoryRuby.configure do |config|
220
+ # Configure API key authorization: accountID
221
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
222
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
223
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
224
+
225
+ # Configure API key authorization: appKey
226
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
227
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
228
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
229
+ end
230
+
231
+ api_instance = DearInventoryRuby::InventoryApi.new
232
+ tax = { "Name": "Post test", "Account": "800", "IsActive": true, "TaxInclusive": false, "TaxPercent": 35, "IsTaxForSale": true, "IsTaxForPurchase": true, "Components": [ { "Name": "Tax 1st", "Percent": "10.0000000000", "AccountCode": "800", "Compound": "1", "ComponentOrder": "1" }, { "Name": "Tax 2nd", "Percent": "15.0000000000", "AccountCode": "800", "Compound": "0", "ComponentOrder": "2" } ] } # Tax | a tax object with properties to create
233
+ opts = {
234
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
235
+ }
236
+
237
+ begin
238
+ #Allows you to create a tax
239
+ result = api_instance.create_tax(tax, opts)
240
+ p result
241
+ rescue DearInventoryRuby::ApiError => e
242
+ puts "Exception when calling InventoryApi->create_tax: #{e}"
243
+ end
244
+ ```
245
+
246
+ ### Parameters
247
+
248
+
249
+ Name | Type | Description | Notes
250
+ ------------- | ------------- | ------------- | -------------
251
+ **tax** | [**Tax**](Tax.md)| a tax object with properties to create |
252
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
253
+
254
+ ### Return type
255
+
256
+ [**Taxes**](Taxes.md)
257
+
258
+ ### Authorization
259
+
260
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
261
+
262
+ ### HTTP request headers
263
+
264
+ - **Content-Type**: application/json
265
+ - **Accept**: application/json
266
+
267
+
268
+ ## delete_account
269
+
270
+ > Success delete_account(opts)
271
+
272
+ Allows you to delete an Account
273
+
274
+ ### Example
275
+
276
+ ```ruby
277
+ # load the gem
278
+ require 'dear-inventory-ruby'
279
+ # setup authorization
280
+ DearInventoryRuby.configure do |config|
281
+ # Configure API key authorization: accountID
282
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
283
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
284
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
285
+
286
+ # Configure API key authorization: appKey
287
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
288
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
289
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
290
+ end
291
+
292
+ api_instance = DearInventoryRuby::InventoryApi.new
293
+ opts = {
294
+ code: 'code_example' # String | Code
295
+ }
296
+
297
+ begin
298
+ #Allows you to delete an Account
299
+ result = api_instance.delete_account(opts)
300
+ p result
301
+ rescue DearInventoryRuby::ApiError => e
302
+ puts "Exception when calling InventoryApi->delete_account: #{e}"
303
+ end
304
+ ```
305
+
306
+ ### Parameters
307
+
308
+
309
+ Name | Type | Description | Notes
310
+ ------------- | ------------- | ------------- | -------------
311
+ **code** | **String**| Code | [optional]
312
+
313
+ ### Return type
314
+
315
+ [**Success**](Success.md)
316
+
317
+ ### Authorization
318
+
319
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
320
+
321
+ ### HTTP request headers
322
+
323
+ - **Content-Type**: Not defined
324
+ - **Accept**: application/json
325
+
326
+
327
+ ## delete_payment_term
328
+
329
+ > Success delete_payment_term(opts)
330
+
331
+ Allows you to delete a payment term
332
+
333
+ ### Example
334
+
335
+ ```ruby
336
+ # load the gem
337
+ require 'dear-inventory-ruby'
338
+ # setup authorization
339
+ DearInventoryRuby.configure do |config|
340
+ # Configure API key authorization: accountID
341
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
342
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
343
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
344
+
345
+ # Configure API key authorization: appKey
346
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
347
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
348
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
349
+ end
350
+
351
+ api_instance = DearInventoryRuby::InventoryApi.new
352
+ opts = {
353
+ id: 'id_example' # String | Default is nil
354
+ }
355
+
356
+ begin
357
+ #Allows you to delete a payment term
358
+ result = api_instance.delete_payment_term(opts)
359
+ p result
360
+ rescue DearInventoryRuby::ApiError => e
361
+ puts "Exception when calling InventoryApi->delete_payment_term: #{e}"
362
+ end
363
+ ```
364
+
365
+ ### Parameters
366
+
367
+
368
+ Name | Type | Description | Notes
369
+ ------------- | ------------- | ------------- | -------------
370
+ **id** | **String**| Default is nil | [optional]
371
+
372
+ ### Return type
373
+
374
+ [**Success**](Success.md)
375
+
376
+ ### Authorization
377
+
378
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
379
+
380
+ ### HTTP request headers
381
+
382
+ - **Content-Type**: Not defined
383
+ - **Accept**: application/json
384
+
385
+
386
+ ## get_accounts
387
+
388
+ > Accounts get_accounts(opts)
389
+
390
+ Allows you to retrieve the Chart of Accounts
391
+
392
+ ### Example
393
+
394
+ ```ruby
395
+ # load the gem
396
+ require 'dear-inventory-ruby'
397
+ # setup authorization
398
+ DearInventoryRuby.configure do |config|
399
+ # Configure API key authorization: accountID
400
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
401
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
402
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
403
+
404
+ # Configure API key authorization: appKey
405
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
406
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
407
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
408
+ end
409
+
410
+ api_instance = DearInventoryRuby::InventoryApi.new
411
+ opts = {
412
+ page: '1', # String | Default is 1
413
+ limit: '100', # String | Default is 100
414
+ id: 'id_example', # String | Default is nil
415
+ name: 'name_example', # String | Default is nil
416
+ bank: 'bank_example' # String | Default is nil
417
+ }
418
+
419
+ begin
420
+ #Allows you to retrieve the Chart of Accounts
421
+ result = api_instance.get_accounts(opts)
422
+ p result
423
+ rescue DearInventoryRuby::ApiError => e
424
+ puts "Exception when calling InventoryApi->get_accounts: #{e}"
425
+ end
426
+ ```
427
+
428
+ ### Parameters
429
+
430
+
431
+ Name | Type | Description | Notes
432
+ ------------- | ------------- | ------------- | -------------
433
+ **page** | **String**| Default is 1 | [optional] [default to '1']
434
+ **limit** | **String**| Default is 100 | [optional] [default to '100']
435
+ **id** | **String**| Default is nil | [optional]
436
+ **name** | **String**| Default is nil | [optional]
437
+ **bank** | **String**| Default is nil | [optional]
438
+
439
+ ### Return type
440
+
441
+ [**Accounts**](Accounts.md)
16
442
 
17
- Allows you to create a customer
443
+ ### Authorization
444
+
445
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
446
+
447
+ ### HTTP request headers
448
+
449
+ - **Content-Type**: Not defined
450
+ - **Accept**: application/json
451
+
452
+
453
+ ## get_customers
454
+
455
+ > Customers get_customers(opts)
456
+
457
+ Allows you to retrieve the customers
18
458
 
19
459
  ### Example
20
460
 
@@ -35,17 +475,21 @@ DearInventoryRuby.configure do |config|
35
475
  end
36
476
 
37
477
  api_instance = DearInventoryRuby::InventoryApi.new
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
478
  opts = {
40
- summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors
479
+ page: '1', # String | Default is 1
480
+ limit: '100', # String | Default is 100
481
+ id: 'id_example', # String | Default is nil
482
+ name: 'name_example', # String | Default is nil
483
+ modified_since: 'modified_since_example', # String | Default is nil
484
+ include_deprecated: 'false' # String | Default is false
41
485
  }
42
486
 
43
487
  begin
44
- #Allows you to create a customer
45
- result = api_instance.create_customer(customer, opts)
488
+ #Allows you to retrieve the customers
489
+ result = api_instance.get_customers(opts)
46
490
  p result
47
491
  rescue DearInventoryRuby::ApiError => e
48
- puts "Exception when calling InventoryApi->create_customer: #{e}"
492
+ puts "Exception when calling InventoryApi->get_customers: #{e}"
49
493
  end
50
494
  ```
51
495
 
@@ -54,8 +498,12 @@ end
54
498
 
55
499
  Name | Type | Description | Notes
56
500
  ------------- | ------------- | ------------- | -------------
57
- **customer** | [**Customer**](Customer.md)| a Contact object with properties to create |
58
- **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created obejcts and any with validation errors | [optional] [default to false]
501
+ **page** | **String**| Default is 1 | [optional] [default to '1']
502
+ **limit** | **String**| Default is 100 | [optional] [default to '100']
503
+ **id** | **String**| Default is nil | [optional]
504
+ **name** | **String**| Default is nil | [optional]
505
+ **modified_since** | **String**| Default is nil | [optional]
506
+ **include_deprecated** | **String**| Default is false | [optional] [default to 'false']
59
507
 
60
508
  ### Return type
61
509
 
@@ -67,15 +515,15 @@ Name | Type | Description | Notes
67
515
 
68
516
  ### HTTP request headers
69
517
 
70
- - **Content-Type**: application/json
518
+ - **Content-Type**: Not defined
71
519
  - **Accept**: application/json
72
520
 
73
521
 
74
- ## get_customers
522
+ ## get_payment_terms
75
523
 
76
- > Customers get_customers(opts)
524
+ > PaymentTerms get_payment_terms(opts)
77
525
 
78
- Allows you to retrieve the customers
526
+ Allows you to retrieve the payment terms
79
527
 
80
528
  ### Example
81
529
 
@@ -101,16 +549,17 @@ opts = {
101
549
  limit: '100', # String | Default is 100
102
550
  id: 'id_example', # String | Default is nil
103
551
  name: 'name_example', # String | Default is nil
104
- modified_since: 'modified_since_example', # String | Default is nil
105
- include_deprecated: 'false' # String | Default is false
552
+ method: 'method_example', # String | Default is nil
553
+ is_active: true, # Boolean | Default is nil
554
+ is_default: true # Boolean | Default is nil
106
555
  }
107
556
 
108
557
  begin
109
- #Allows you to retrieve the customers
110
- result = api_instance.get_customers(opts)
558
+ #Allows you to retrieve the payment terms
559
+ result = api_instance.get_payment_terms(opts)
111
560
  p result
112
561
  rescue DearInventoryRuby::ApiError => e
113
- puts "Exception when calling InventoryApi->get_customers: #{e}"
562
+ puts "Exception when calling InventoryApi->get_payment_terms: #{e}"
114
563
  end
115
564
  ```
116
565
 
@@ -123,12 +572,86 @@ Name | Type | Description | Notes
123
572
  **limit** | **String**| Default is 100 | [optional] [default to '100']
124
573
  **id** | **String**| Default is nil | [optional]
125
574
  **name** | **String**| Default is nil | [optional]
126
- **modified_since** | **String**| Default is nil | [optional]
127
- **include_deprecated** | **String**| Default is false | [optional] [default to 'false']
575
+ **method** | **String**| Default is nil | [optional]
576
+ **is_active** | **Boolean**| Default is nil | [optional]
577
+ **is_default** | **Boolean**| Default is nil | [optional]
128
578
 
129
579
  ### Return type
130
580
 
131
- [**Customers**](Customers.md)
581
+ [**PaymentTerms**](PaymentTerms.md)
582
+
583
+ ### Authorization
584
+
585
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
586
+
587
+ ### HTTP request headers
588
+
589
+ - **Content-Type**: Not defined
590
+ - **Accept**: application/json
591
+
592
+
593
+ ## get_taxes
594
+
595
+ > Taxes get_taxes(opts)
596
+
597
+ Allows you to retrieve the taxes
598
+
599
+ ### Example
600
+
601
+ ```ruby
602
+ # load the gem
603
+ require 'dear-inventory-ruby'
604
+ # setup authorization
605
+ DearInventoryRuby.configure do |config|
606
+ # Configure API key authorization: accountID
607
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
608
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
609
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
610
+
611
+ # Configure API key authorization: appKey
612
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
613
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
614
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
615
+ end
616
+
617
+ api_instance = DearInventoryRuby::InventoryApi.new
618
+ opts = {
619
+ page: '1', # String | Default is 1
620
+ limit: '100', # String | Default is 100
621
+ id: 'id_example', # String | Default is nil
622
+ name: 'name_example', # String | Default is nil
623
+ is_active: true, # Boolean | Default is nil
624
+ is_tax_for_sale: true, # Boolean | Default is nil
625
+ is_tax_for_purchase: true, # Boolean | Default is nil
626
+ account: 'account_example' # String | Default is nil
627
+ }
628
+
629
+ begin
630
+ #Allows you to retrieve the taxes
631
+ result = api_instance.get_taxes(opts)
632
+ p result
633
+ rescue DearInventoryRuby::ApiError => e
634
+ puts "Exception when calling InventoryApi->get_taxes: #{e}"
635
+ end
636
+ ```
637
+
638
+ ### Parameters
639
+
640
+
641
+ Name | Type | Description | Notes
642
+ ------------- | ------------- | ------------- | -------------
643
+ **page** | **String**| Default is 1 | [optional] [default to '1']
644
+ **limit** | **String**| Default is 100 | [optional] [default to '100']
645
+ **id** | **String**| Default is nil | [optional]
646
+ **name** | **String**| Default is nil | [optional]
647
+ **is_active** | **Boolean**| Default is nil | [optional]
648
+ **is_tax_for_sale** | **Boolean**| Default is nil | [optional]
649
+ **is_tax_for_purchase** | **Boolean**| Default is nil | [optional]
650
+ **account** | **String**| Default is nil | [optional]
651
+
652
+ ### Return type
653
+
654
+ [**Taxes**](Taxes.md)
132
655
 
133
656
  ### Authorization
134
657
 
@@ -140,6 +663,67 @@ Name | Type | Description | Notes
140
663
  - **Accept**: application/json
141
664
 
142
665
 
666
+ ## update_account
667
+
668
+ > Accounts update_account(account, opts)
669
+
670
+ Allows you to update an Account
671
+
672
+ ### Example
673
+
674
+ ```ruby
675
+ # load the gem
676
+ require 'dear-inventory-ruby'
677
+ # setup authorization
678
+ DearInventoryRuby.configure do |config|
679
+ # Configure API key authorization: accountID
680
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
681
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
682
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
683
+
684
+ # Configure API key authorization: appKey
685
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
686
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
687
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
688
+ end
689
+
690
+ api_instance = DearInventoryRuby::InventoryApi.new
691
+ account = { "Code": "001", "Status": "ACTIVE", "Name": "Accounts Payable put test", "Type": "CURRLIAB", "Description": "Put test description", "Class": "LIABILITY", "SystemAccount": "CREDITORS" } # Account | an Account object with properties to update
692
+ opts = {
693
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
694
+ }
695
+
696
+ begin
697
+ #Allows you to update an Account
698
+ result = api_instance.update_account(account, opts)
699
+ p result
700
+ rescue DearInventoryRuby::ApiError => e
701
+ puts "Exception when calling InventoryApi->update_account: #{e}"
702
+ end
703
+ ```
704
+
705
+ ### Parameters
706
+
707
+
708
+ Name | Type | Description | Notes
709
+ ------------- | ------------- | ------------- | -------------
710
+ **account** | [**Account**](Account.md)| an Account object with properties to update |
711
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
712
+
713
+ ### Return type
714
+
715
+ [**Accounts**](Accounts.md)
716
+
717
+ ### Authorization
718
+
719
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
720
+
721
+ ### HTTP request headers
722
+
723
+ - **Content-Type**: application/json
724
+ - **Accept**: application/json
725
+
726
+
143
727
  ## update_customer
144
728
 
145
729
  > Customers update_customer(customer, opts)
@@ -165,9 +749,9 @@ DearInventoryRuby.configure do |config|
165
749
  end
166
750
 
167
751
  api_instance = DearInventoryRuby::InventoryApi.new
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
752
+ 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 customer object with properties to update
169
753
  opts = {
170
- summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors
754
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
171
755
  }
172
756
 
173
757
  begin
@@ -184,8 +768,8 @@ end
184
768
 
185
769
  Name | Type | Description | Notes
186
770
  ------------- | ------------- | ------------- | -------------
187
- **customer** | [**Customer**](Customer.md)| a Contact object with properties to create |
188
- **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created obejcts and any with validation errors | [optional] [default to false]
771
+ **customer** | [**Customer**](Customer.md)| a customer object with properties to update |
772
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
189
773
 
190
774
  ### Return type
191
775
 
@@ -200,3 +784,125 @@ Name | Type | Description | Notes
200
784
  - **Content-Type**: application/json
201
785
  - **Accept**: application/json
202
786
 
787
+
788
+ ## update_payment_term
789
+
790
+ > PaymentTerms update_payment_term(payment_term, opts)
791
+
792
+ Allows you to update a payment term
793
+
794
+ ### Example
795
+
796
+ ```ruby
797
+ # load the gem
798
+ require 'dear-inventory-ruby'
799
+ # setup authorization
800
+ DearInventoryRuby.configure do |config|
801
+ # Configure API key authorization: accountID
802
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
803
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
804
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
805
+
806
+ # Configure API key authorization: appKey
807
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
808
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
809
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
810
+ end
811
+
812
+ api_instance = DearInventoryRuby::InventoryApi.new
813
+ payment_term = { "ID": "e6c25fa9-bb14-45b2-afe7-428e454663ef", "Name": "10 days since end of month", "Duration": 10, "Method": "days since the end of the month", "IsActive": true, "IsDefault": true } # PaymentTerm | a payment term object with properties to update
814
+ opts = {
815
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
816
+ }
817
+
818
+ begin
819
+ #Allows you to update a payment term
820
+ result = api_instance.update_payment_term(payment_term, opts)
821
+ p result
822
+ rescue DearInventoryRuby::ApiError => e
823
+ puts "Exception when calling InventoryApi->update_payment_term: #{e}"
824
+ end
825
+ ```
826
+
827
+ ### Parameters
828
+
829
+
830
+ Name | Type | Description | Notes
831
+ ------------- | ------------- | ------------- | -------------
832
+ **payment_term** | [**PaymentTerm**](PaymentTerm.md)| a payment term object with properties to update |
833
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
834
+
835
+ ### Return type
836
+
837
+ [**PaymentTerms**](PaymentTerms.md)
838
+
839
+ ### Authorization
840
+
841
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
842
+
843
+ ### HTTP request headers
844
+
845
+ - **Content-Type**: application/json
846
+ - **Accept**: application/json
847
+
848
+
849
+ ## update_tax
850
+
851
+ > Taxes update_tax(tax, opts)
852
+
853
+ Allows you to update a tax
854
+
855
+ ### Example
856
+
857
+ ```ruby
858
+ # load the gem
859
+ require 'dear-inventory-ruby'
860
+ # setup authorization
861
+ DearInventoryRuby.configure do |config|
862
+ # Configure API key authorization: accountID
863
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
864
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
865
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
866
+
867
+ # Configure API key authorization: appKey
868
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
869
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
870
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
871
+ end
872
+
873
+ api_instance = DearInventoryRuby::InventoryApi.new
874
+ tax = { "ID": "24551562-ebd1-4294-a04a-3ab258f5e541", "Name": "PUT test", "Account": "800", "IsActive": true, "TaxInclusive": false, "TaxPercent": 55, "IsTaxForSale": true, "IsTaxForPurchase": true, "Components": [ { "ID": "0119E1C0-504A-429B-B4E2-4EEC02A9E88A", "Name": "Tax 1st", "Percent": "20.0000000000", "AccountCode": "800", "Compound": "1", "ComponentOrder": "1" }, { "ID": "0B6D5C0F-D8EF-41FF-86D2-A05E5616FC61", "Name": "Tax 2nd", "Percent": "35.0000000000", "AccountCode": "800", "Compound": "0", "ComponentOrder": "2" } ] } # Tax | a tax object with properties to update
875
+ opts = {
876
+ summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
877
+ }
878
+
879
+ begin
880
+ #Allows you to update a tax
881
+ result = api_instance.update_tax(tax, opts)
882
+ p result
883
+ rescue DearInventoryRuby::ApiError => e
884
+ puts "Exception when calling InventoryApi->update_tax: #{e}"
885
+ end
886
+ ```
887
+
888
+ ### Parameters
889
+
890
+
891
+ Name | Type | Description | Notes
892
+ ------------- | ------------- | ------------- | -------------
893
+ **tax** | [**Tax**](Tax.md)| a tax object with properties to update |
894
+ **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
895
+
896
+ ### Return type
897
+
898
+ [**Taxes**](Taxes.md)
899
+
900
+ ### Authorization
901
+
902
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
903
+
904
+ ### HTTP request headers
905
+
906
+ - **Content-Type**: application/json
907
+ - **Accept**: application/json
908
+