dear-inventory-ruby 0.1.9 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +7 -4
  4. data/dear-inventory-ruby.gemspec +1 -1
  5. data/docs/Contact.md +4 -0
  6. data/docs/Customer.md +3 -1
  7. data/docs/InventoryApi.md +54 -0
  8. data/docs/Me.md +1 -1
  9. data/docs/PriceTier.md +19 -0
  10. data/docs/PriceTiers.md +17 -0
  11. data/lib/dear-inventory-ruby.rb +3 -1
  12. data/lib/dear-inventory-ruby/api/inventory_api.rb +55 -1
  13. data/lib/dear-inventory-ruby/api_client.rb +8 -6
  14. data/lib/dear-inventory-ruby/api_error.rb +1 -1
  15. data/lib/dear-inventory-ruby/configuration.rb +1 -1
  16. data/lib/dear-inventory-ruby/models/account.rb +1 -1
  17. data/lib/dear-inventory-ruby/models/accounts.rb +1 -1
  18. data/lib/dear-inventory-ruby/models/address.rb +1 -35
  19. data/lib/dear-inventory-ruby/models/contact.rb +22 -2
  20. data/lib/dear-inventory-ruby/models/currency_code.rb +1 -1
  21. data/lib/dear-inventory-ruby/models/customer.rb +21 -8
  22. data/lib/dear-inventory-ruby/models/customers.rb +1 -1
  23. data/lib/dear-inventory-ruby/models/dimensions_unit.rb +1 -1
  24. data/lib/dear-inventory-ruby/models/error.rb +1 -1
  25. data/lib/dear-inventory-ruby/models/me.rb +3 -2
  26. data/lib/dear-inventory-ruby/models/payment_term.rb +1 -1
  27. data/lib/dear-inventory-ruby/models/payment_terms.rb +1 -1
  28. data/lib/dear-inventory-ruby/models/price_tier.rb +217 -0
  29. data/lib/dear-inventory-ruby/models/price_tiers.rb +209 -0
  30. data/lib/dear-inventory-ruby/models/success.rb +1 -1
  31. data/lib/dear-inventory-ruby/models/tax.rb +1 -1
  32. data/lib/dear-inventory-ruby/models/tax_component.rb +1 -1
  33. data/lib/dear-inventory-ruby/models/taxes.rb +1 -1
  34. data/lib/dear-inventory-ruby/models/weight_unit.rb +1 -1
  35. data/lib/dear-inventory-ruby/version.rb +2 -2
  36. data/spec/.DS_Store +0 -0
  37. data/spec/api/inventory_api_spec.rb +11 -1
  38. data/spec/api_client_spec.rb +1 -1
  39. data/spec/configuration_spec.rb +1 -1
  40. data/spec/models/account_spec.rb +1 -1
  41. data/spec/models/accounts_spec.rb +1 -1
  42. data/spec/models/address_spec.rb +1 -5
  43. data/spec/models/contact_spec.rb +13 -1
  44. data/spec/models/currency_code_spec.rb +1 -1
  45. data/spec/models/customer_spec.rb +7 -1
  46. data/spec/models/customers_spec.rb +1 -1
  47. data/spec/models/dimensions_unit_spec.rb +1 -1
  48. data/spec/models/error_spec.rb +1 -1
  49. data/spec/models/me_spec.rb +1 -1
  50. data/spec/models/payment_term_spec.rb +1 -1
  51. data/spec/models/payment_terms_spec.rb +1 -1
  52. data/spec/models/price_tier_spec.rb +47 -0
  53. data/spec/models/price_tiers_spec.rb +41 -0
  54. data/spec/models/success_spec.rb +1 -1
  55. data/spec/models/tax_component_spec.rb +1 -1
  56. data/spec/models/tax_spec.rb +1 -1
  57. data/spec/models/taxes_spec.rb +1 -1
  58. data/spec/models/weight_unit_spec.rb +1 -1
  59. data/spec/spec_helper.rb +1 -1
  60. metadata +24 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe0a172dc3b6ea6dc88ee24a04dcf0d06aef4f1575f0eb1077534860d28b32a9
4
- data.tar.gz: 4a9652d006b996e30b8889f0ef8855c26ff3fe0f8323dd383b060f26d6918e18
3
+ metadata.gz: 9ffbd271d3c715cef93bb33ce9a2f24c53c2decb1ecd1dcdfb15efc1929caf79
4
+ data.tar.gz: ba565c2f1ff6c1784d015e782bfbeb673e5540dce0120035854a4e16e939cff0
5
5
  SHA512:
6
- metadata.gz: 12e37bb9d13b239f3992f2fd0bce2a7d0d0ea1a59b03e4bf3b0fef8e80e521c4478769836af705cb54c302355f05f4cf406ea955ffac2cc0499f8b0deedd3d60
7
- data.tar.gz: 6fbe291c379f67c2d35abaa02dfa7459c3665415d42406162629d2f5538895bc8e409b5211020d5cd2c1b0a92d43de410a980031065687b3fbbb7f206326c92c
6
+ metadata.gz: b284bec84a7a1cd777cda1c0d085446f4fefb4e8244b9f8e08796291d7a4ceacb52e4fd2e00f0d636f7226f22a0952502180bfd0223b7e8230ca41ff574e4b88
7
+ data.tar.gz: 9953f21dc71d78792c23c307965ff6d878e4684a075c5b9d25afbac53bdd6cc5dde695676e32a551cf7803e1c020a5d0298e90f0202d2303618c7483599c0503
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.14] - 2021-05-01
6
+
7
+ - Remove validation `Currency` for `Customer` and `Me` models.
8
+
9
+ ## [0.1.13] - 2020-10-28
10
+
11
+ - Update `PriceTiersList` to `PriceTiers`.
12
+
13
+ ## [0.1.12] - 2020-10-28
14
+
15
+ - Add new endpoint and model: `PriceTier`
16
+ - Endpoint GET `PriceTiers`
17
+
18
+ ## [0.1.11] - 2020-09-21
19
+
20
+ - Update limit of Comments in Customer model.
21
+ - Remove required conditions of Address Type in Customer Address model.
22
+
23
+ ## [0.1.10] - 2020-09-04
24
+
25
+ - Add some fields to Contact and Customer models.
26
+ - Update OpenAPI Generator version 4.3.1
27
+
5
28
  ## [0.1.9] - 2020-04-12
6
29
 
7
30
  - Add new endpoint and model: Me
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.9
10
+ - Package version: 0.1.14
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.9.gem
27
+ gem install ./dear-inventory-ruby-0.1.14.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./dear-inventory-ruby-0.1.9.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./dear-inventory-ruby-0.1.14.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.9'
36
+ gem 'dear-inventory-ruby', '~> 0.1.14'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -102,6 +102,7 @@ Class | Method | HTTP request | Description
102
102
  *DearInventoryRuby::InventoryApi* | [**get_customers**](docs/InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
103
103
  *DearInventoryRuby::InventoryApi* | [**get_me**](docs/InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
104
104
  *DearInventoryRuby::InventoryApi* | [**get_payment_terms**](docs/InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
105
+ *DearInventoryRuby::InventoryApi* | [**get_price_tiers**](docs/InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
105
106
  *DearInventoryRuby::InventoryApi* | [**get_taxes**](docs/InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
106
107
  *DearInventoryRuby::InventoryApi* | [**update_account**](docs/InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
107
108
  *DearInventoryRuby::InventoryApi* | [**update_customer**](docs/InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
@@ -123,6 +124,8 @@ Class | Method | HTTP request | Description
123
124
  - [DearInventoryRuby::Me](docs/Me.md)
124
125
  - [DearInventoryRuby::PaymentTerm](docs/PaymentTerm.md)
125
126
  - [DearInventoryRuby::PaymentTerms](docs/PaymentTerms.md)
127
+ - [DearInventoryRuby::PriceTier](docs/PriceTier.md)
128
+ - [DearInventoryRuby::PriceTiers](docs/PriceTiers.md)
126
129
  - [DearInventoryRuby::Success](docs/Success.md)
127
130
  - [DearInventoryRuby::Tax](docs/Tax.md)
128
131
  - [DearInventoryRuby::TaxComponent](docs/TaxComponent.md)
@@ -8,7 +8,7 @@
8
8
  The version of the OpenAPI document: 2.0.0
9
9
  Contact: nnhansg@gmail.com
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 4.3.0
11
+ OpenAPI Generator version: 4.3.1
12
12
 
13
13
  =end
14
14
 
@@ -6,7 +6,9 @@ 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
8
  **name** | **String** | Name of Contact |
9
+ **job_title** | **String** | Job Title | [optional]
9
10
  **phone** | **String** | Phone | [optional]
11
+ **mobile_phone** | **String** | Mobile Phone | [optional]
10
12
  **fax** | **String** | Fax | [optional]
11
13
  **email** | **String** | Email | [optional]
12
14
  **website** | **String** | Website | [optional]
@@ -21,7 +23,9 @@ require 'DearInventoryRuby'
21
23
 
22
24
  instance = DearInventoryRuby::Contact.new(id: nil,
23
25
  name: nil,
26
+ job_title: nil,
24
27
  phone: nil,
28
+ mobile_phone: nil,
25
29
  fax: nil,
26
30
  email: nil,
27
31
  website: nil,
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **id** | **String** | Unique Customer ID | [optional]
8
8
  **name** | **String** | Name of Customer |
9
9
  **status** | **String** | Points that Customer is Active. Available values are Active and Deprecated. Required for POST |
10
- **currency** | [**CurrencyCode**](CurrencyCode.md) | |
10
+ **currency** | **String** | Currency code of Customer |
11
11
  **payment_term** | **String** | Payment term |
12
12
  **account_receivable** | **String** | Account receivable code of Customer |
13
13
  **revenue_account** | **String** | Sale account code of Customer |
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
20
20
  **comments** | **String** | Comments | [optional]
21
21
  **tax_number** | **String** | Tax number | [optional]
22
22
  **credit_limit** | **Float** | Credit limit | [optional]
23
+ **is_on_credit_hold** | **Boolean** | boolean to indicate if a customer is on credit hold | [optional] [default to false]
23
24
  **tags** | **String** | Tags string | [optional]
24
25
  **attribute_set** | **String** | AttributeSet name | [optional]
25
26
  **additional_attribute1** | **String** | Additional attribute 1 value | [optional]
@@ -57,6 +58,7 @@ instance = DearInventoryRuby::Customer.new(id: nil,
57
58
  comments: nil,
58
59
  tax_number: nil,
59
60
  credit_limit: nil,
61
+ is_on_credit_hold: nil,
60
62
  tags: nil,
61
63
  attribute_set: nil,
62
64
  additional_attribute1: nil,
@@ -14,6 +14,7 @@ Method | HTTP request | Description
14
14
  [**get_customers**](InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
15
15
  [**get_me**](InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
16
16
  [**get_payment_terms**](InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
17
+ [**get_price_tiers**](InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
17
18
  [**get_taxes**](InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
18
19
  [**update_account**](InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
19
20
  [**update_customer**](InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
@@ -646,6 +647,59 @@ Name | Type | Description | Notes
646
647
  - **Accept**: application/json
647
648
 
648
649
 
650
+ ## get_price_tiers
651
+
652
+ > PriceTiers get_price_tiers
653
+
654
+ Allows you to retrieve the Price Tiers
655
+
656
+ ### Example
657
+
658
+ ```ruby
659
+ # load the gem
660
+ require 'dear-inventory-ruby'
661
+ # setup authorization
662
+ DearInventoryRuby.configure do |config|
663
+ # Configure API key authorization: accountID
664
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
665
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
666
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
667
+
668
+ # Configure API key authorization: appKey
669
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
670
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
671
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
672
+ end
673
+
674
+ api_instance = DearInventoryRuby::InventoryApi.new
675
+
676
+ begin
677
+ #Allows you to retrieve the Price Tiers
678
+ result = api_instance.get_price_tiers
679
+ p result
680
+ rescue DearInventoryRuby::ApiError => e
681
+ puts "Exception when calling InventoryApi->get_price_tiers: #{e}"
682
+ end
683
+ ```
684
+
685
+ ### Parameters
686
+
687
+ This endpoint does not need any parameter.
688
+
689
+ ### Return type
690
+
691
+ [**PriceTiers**](PriceTiers.md)
692
+
693
+ ### Authorization
694
+
695
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
696
+
697
+ ### HTTP request headers
698
+
699
+ - **Content-Type**: Not defined
700
+ - **Accept**: application/json
701
+
702
+
649
703
  ## get_taxes
650
704
 
651
705
  > Taxes get_taxes(opts)
data/docs/Me.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **company** | **String** | Your company name | [optional]
8
- **currency** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
8
+ **currency** | **String** | Your company base currency | [optional]
9
9
  **time_zone** | **String** | Time Zone where your company located | [optional]
10
10
  **default_weight_units** | [**WeightUnit**](WeightUnit.md) | | [optional]
11
11
  **default_dimensions_units** | [**DimensionsUnit**](DimensionsUnit.md) | | [optional]
@@ -0,0 +1,19 @@
1
+ # DearInventoryRuby::PriceTier
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **code** | **Integer** | Code number of Price Tier | [optional]
8
+ **name** | **String** | Price Tier name | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'DearInventoryRuby'
14
+
15
+ instance = DearInventoryRuby::PriceTier.new(code: nil,
16
+ name: nil)
17
+ ```
18
+
19
+
@@ -0,0 +1,17 @@
1
+ # DearInventoryRuby::PriceTiers
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **price_tiers** | [**Array<PriceTier>**](PriceTier.md) | Array of PriceTiers | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'DearInventoryRuby'
13
+
14
+ instance = DearInventoryRuby::PriceTiers.new(price_tiers: nil)
15
+ ```
16
+
17
+
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -29,6 +29,8 @@ require 'dear-inventory-ruby/models/error'
29
29
  require 'dear-inventory-ruby/models/me'
30
30
  require 'dear-inventory-ruby/models/payment_term'
31
31
  require 'dear-inventory-ruby/models/payment_terms'
32
+ require 'dear-inventory-ruby/models/price_tier'
33
+ require 'dear-inventory-ruby/models/price_tiers'
32
34
  require 'dear-inventory-ruby/models/success'
33
35
  require 'dear-inventory-ruby/models/tax'
34
36
  require 'dear-inventory-ruby/models/tax_component'
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -666,6 +666,60 @@ module DearInventoryRuby
666
666
  return data, status_code, headers
667
667
  end
668
668
 
669
+ # Allows you to retrieve the Price Tiers
670
+ # @param [Hash] opts the optional parameters
671
+ # @return [PriceTiers]
672
+ def get_price_tiers(opts = {})
673
+ data, _status_code, _headers = get_price_tiers_with_http_info(opts)
674
+ data
675
+ end
676
+
677
+ # Allows you to retrieve the Price Tiers
678
+ # @param [Hash] opts the optional parameters
679
+ # @return [Array<(PriceTiers, Integer, Hash)>] PriceTiers data, response status code and response headers
680
+ def get_price_tiers_with_http_info(opts = {})
681
+ if @api_client.config.debugging
682
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_price_tiers ...'
683
+ end
684
+ # resource path
685
+ local_var_path = '/ref/priceTier'
686
+
687
+ # query parameters
688
+ query_params = opts[:query_params] || {}
689
+
690
+ # header parameters
691
+ header_params = opts[:header_params] || {}
692
+ # HTTP header 'Accept' (if needed)
693
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
694
+
695
+ # form parameters
696
+ form_params = opts[:form_params] || {}
697
+
698
+ # http body (model)
699
+ post_body = opts[:body]
700
+
701
+ # return_type
702
+ return_type = opts[:return_type] || 'PriceTiers'
703
+
704
+ # auth_names
705
+ auth_names = opts[:auth_names] || ['accountID', 'appKey']
706
+
707
+ new_options = opts.merge(
708
+ :header_params => header_params,
709
+ :query_params => query_params,
710
+ :form_params => form_params,
711
+ :body => post_body,
712
+ :auth_names => auth_names,
713
+ :return_type => return_type
714
+ )
715
+
716
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
717
+ if @api_client.config.debugging
718
+ @api_client.config.logger.debug "API called: InventoryApi#get_price_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
719
+ end
720
+ return data, status_code, headers
721
+ end
722
+
669
723
  # Allows you to retrieve the taxes
670
724
  # @param [Hash] opts the optional parameters
671
725
  # @option opts [String] :page Default is 1 (default to '1')
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -287,11 +287,13 @@ module DearInventoryRuby
287
287
  tempfile.write(chunk)
288
288
  end
289
289
  request.on_complete do |response|
290
- tempfile.close if tempfile
291
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
292
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
293
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
294
- "explicitly with `tempfile.delete`"
290
+ if tempfile
291
+ tempfile.close
292
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
293
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
294
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
295
+ "explicitly with `tempfile.delete`"
296
+ end
295
297
  end
296
298
  end
297
299
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: nnhansg@gmail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -41,28 +41,6 @@ module DearInventoryRuby
41
41
  # Points that Address is used as default for chosen Type. `false` as default.
42
42
  attr_accessor :default_for_type
43
43
 
44
- class EnumAttributeValidator
45
- attr_reader :datatype
46
- attr_reader :allowable_values
47
-
48
- def initialize(datatype, allowable_values)
49
- @allowable_values = allowable_values.map do |value|
50
- case datatype.to_s
51
- when /Integer/i
52
- value.to_i
53
- when /Float/i
54
- value.to_f
55
- else
56
- value
57
- end
58
- end
59
- end
60
-
61
- def valid?(value)
62
- !value || allowable_values.include?(value)
63
- end
64
- end
65
-
66
44
  # Attribute mapping from ruby-style variable name to JSON key.
67
45
  def self.attribute_map
68
46
  {
@@ -198,8 +176,6 @@ module DearInventoryRuby
198
176
  return false if !@post_code.nil? && @post_code.to_s.length > 20
199
177
  return false if @country.nil?
200
178
  return false if @type.nil?
201
- type_validator = EnumAttributeValidator.new('String', ["Billing", "Business", "Shipping"])
202
- return false unless type_validator.valid?(@type)
203
179
  true
204
180
  end
205
181
 
@@ -253,16 +229,6 @@ module DearInventoryRuby
253
229
  @post_code = post_code
254
230
  end
255
231
 
256
- # Custom attribute writer method checking allowed values (enum).
257
- # @param [Object] type Object to be assigned
258
- def type=(type)
259
- validator = EnumAttributeValidator.new('String', ["Billing", "Business", "Shipping"])
260
- unless validator.valid?(type)
261
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
262
- end
263
- @type = type
264
- end
265
-
266
232
  # Checks equality by comparing each attribute.
267
233
  # @param [Object] Object to be compared
268
234
  def ==(o)