dear-inventory-ruby 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -4
- data/lib/dear-inventory-ruby/models/address.rb +0 -34
- data/lib/dear-inventory-ruby/models/customer.rb +5 -5
- data/lib/dear-inventory-ruby/version.rb +1 -1
- data/spec/models/address_spec.rb +0 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 243e64402774069043900856b225948134147830e263704463585b194b3ed89b
|
4
|
+
data.tar.gz: 24f844feb4bc3e8faa91efeba7d739a547fad67cd3806808554b3559ec0f8a8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eae064c9779db74edf93facc05b24c9b95a4886aae40172e4b33466431163f199cc2f377ffdbe29087137c335fc2124e7cbc1fd4a870f1c4b6c844aefeb9158c
|
7
|
+
data.tar.gz: 6242834e8f61630d0afdcb0ffea31cfed05bccdce6875e103a140510e5d1826ed2c4c5e4e3d2d0d0a8e2cfd3503b522095bb35f3aa63a3a3140712376936c1ee
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [0.1.11] - 2020-09-21
|
6
|
+
|
7
|
+
- Update limit of Comments in Customer model.
|
8
|
+
- Remove required conditions of Address Type in Customer Address model.
|
9
|
+
|
5
10
|
## [0.1.10] - 2020-09-04
|
6
11
|
|
7
12
|
- Add some fields to Contact and Customer models.
|
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.
|
10
|
+
- Package version: 0.1.11
|
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.
|
27
|
+
gem install ./dear-inventory-ruby-0.1.11.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./dear-inventory-ruby-0.1.
|
30
|
+
(for development, run `gem install --dev ./dear-inventory-ruby-0.1.11.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.
|
36
|
+
gem 'dear-inventory-ruby', '~> 0.1.11'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -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)
|
@@ -399,8 +399,8 @@ module DearInventoryRuby
|
|
399
399
|
invalid_properties.push('invalid value for "tax_rule", tax_rule cannot be nil.')
|
400
400
|
end
|
401
401
|
|
402
|
-
if !@comments.nil? && @comments.to_s.length >
|
403
|
-
invalid_properties.push('invalid value for "comments", the character length must be smaller than or equal to
|
402
|
+
if !@comments.nil? && @comments.to_s.length > 2000
|
403
|
+
invalid_properties.push('invalid value for "comments", the character length must be smaller than or equal to 2000.')
|
404
404
|
end
|
405
405
|
|
406
406
|
invalid_properties
|
@@ -419,7 +419,7 @@ module DearInventoryRuby
|
|
419
419
|
return false if @account_receivable.nil?
|
420
420
|
return false if @revenue_account.nil?
|
421
421
|
return false if @tax_rule.nil?
|
422
|
-
return false if !@comments.nil? && @comments.to_s.length >
|
422
|
+
return false if !@comments.nil? && @comments.to_s.length > 2000
|
423
423
|
true
|
424
424
|
end
|
425
425
|
|
@@ -450,8 +450,8 @@ module DearInventoryRuby
|
|
450
450
|
# Custom attribute writer method with validation
|
451
451
|
# @param [Object] comments Value to be assigned
|
452
452
|
def comments=(comments)
|
453
|
-
if !comments.nil? && comments.to_s.length >
|
454
|
-
fail ArgumentError, 'invalid value for "comments", the character length must be smaller than or equal to
|
453
|
+
if !comments.nil? && comments.to_s.length > 2000
|
454
|
+
fail ArgumentError, 'invalid value for "comments", the character length must be smaller than or equal to 2000.'
|
455
455
|
end
|
456
456
|
|
457
457
|
@comments = comments
|
data/spec/models/address_spec.rb
CHANGED
@@ -77,10 +77,6 @@ describe 'Address' do
|
|
77
77
|
describe 'test attribute "type"' do
|
78
78
|
it 'should work' do
|
79
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Billing", "Business", "Shipping"])
|
81
|
-
# validator.allowable_values.each do |value|
|
82
|
-
# expect { @instance.type = value }.not_to raise_error
|
83
|
-
# end
|
84
80
|
end
|
85
81
|
end
|
86
82
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dear-inventory-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nhan Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|