kendama 0.2.3 → 1.0.1
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 +6 -0
- data/Gemfile +5 -4
- data/Gemfile.lock +33 -33
- data/README.md +5 -5
- data/Rakefile +1 -6
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/kendama.gemspec +46 -0
- data/lib/kendama/api/v1_api.rb +2 -2
- data/lib/kendama/api_client.rb +3 -3
- data/lib/kendama/api_error.rb +2 -2
- data/lib/kendama/configuration.rb +11 -9
- data/lib/kendama/models/announcement.rb +60 -19
- data/lib/kendama/models/response_body.rb +32 -25
- data/lib/kendama/version.rb +3 -3
- data/lib/kendama.rb +2 -2
- data/openapi/root.yaml +17 -0
- data/openapi/v1/announcement.yaml +179 -0
- data/openapi/v1/diff.yaml +87 -0
- data/openapi/v1/num.yaml +66 -0
- data/openapi/v1/valid.yaml +65 -0
- data/pkg/kendama-1.0.0.gem +0 -0
- data/pkg/kendama-1.0.1.gem +0 -0
- data/spec/api/v1_api_spec.rb +35 -3
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/announcement_spec.rb +24 -4
- data/spec/models/response_body_spec.rb +3 -3
- data/spec/spec_helper.rb +2 -2
- metadata +14 -10
- data/.openapi-generator/FILES +0 -18
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -30
- data/.rspec +0 -3
- data/.rubocop.yml +0 -155
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12fd5a316568ab2435d39bed3f27fc0e194d58bf8cb23dc7ac6230a9e5478917
|
4
|
+
data.tar.gz: 7fb467d137f0b7940f2c7ccf01421640231666db2d3b783bc517f37e143b7bc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa2d6eb5ea946b8e0734e87306bf0ce8ad750a418efc9e7ce12600db2a62cf9603df83c17783bda6d6f326c6c832eab8b99897144cc2553582e83fc978fa7882
|
7
|
+
data.tar.gz: a535969fbec65a6bfcc3cb0a33e9edd20b8a9aa4a9588b51281ed0a876adc01966c9e390d500662bd78b4a68c8a0cf0dc8ffd3bf7072836b7083a34fa08f05f7
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kendama (0.
|
4
|
+
kendama (1.0.1)
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -10,14 +10,15 @@ GEM
|
|
10
10
|
ast (2.4.2)
|
11
11
|
byebug (11.1.3)
|
12
12
|
coderay (1.1.3)
|
13
|
-
diff-lcs (1.5.
|
13
|
+
diff-lcs (1.5.1)
|
14
14
|
ethon (0.16.0)
|
15
15
|
ffi (>= 1.15.0)
|
16
|
-
ffi (1.
|
17
|
-
json (2.
|
16
|
+
ffi (1.16.3)
|
17
|
+
json (2.7.2)
|
18
|
+
language_server-protocol (3.17.0.3)
|
18
19
|
method_source (1.0.0)
|
19
|
-
parallel (1.
|
20
|
-
parser (3.
|
20
|
+
parallel (1.26.3)
|
21
|
+
parser (3.3.5.0)
|
21
22
|
ast (~> 2.4.1)
|
22
23
|
racc
|
23
24
|
pry (0.14.2)
|
@@ -26,40 +27,39 @@ GEM
|
|
26
27
|
pry-byebug (3.10.1)
|
27
28
|
byebug (~> 11.0)
|
28
29
|
pry (>= 0.13, < 0.15)
|
29
|
-
racc (1.
|
30
|
+
racc (1.8.1)
|
30
31
|
rainbow (3.1.1)
|
31
|
-
rake (13.
|
32
|
-
regexp_parser (2.
|
33
|
-
|
34
|
-
|
35
|
-
rspec-
|
36
|
-
rspec-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
rspec-expectations (3.12.3)
|
32
|
+
rake (13.2.1)
|
33
|
+
regexp_parser (2.9.2)
|
34
|
+
rspec (3.13.0)
|
35
|
+
rspec-core (~> 3.13.0)
|
36
|
+
rspec-expectations (~> 3.13.0)
|
37
|
+
rspec-mocks (~> 3.13.0)
|
38
|
+
rspec-core (3.13.0)
|
39
|
+
rspec-support (~> 3.13.0)
|
40
|
+
rspec-expectations (3.13.0)
|
41
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-mocks (3.
|
42
|
+
rspec-support (~> 3.13.0)
|
43
|
+
rspec-mocks (3.13.0)
|
44
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-support (3.
|
47
|
-
rubocop (1.
|
45
|
+
rspec-support (~> 3.13.0)
|
46
|
+
rspec-support (3.13.0)
|
47
|
+
rubocop (1.66.1)
|
48
48
|
json (~> 2.3)
|
49
|
+
language_server-protocol (>= 3.17.0)
|
49
50
|
parallel (~> 1.10)
|
50
|
-
parser (>= 3.
|
51
|
+
parser (>= 3.3.0.2)
|
51
52
|
rainbow (>= 2.2.2, < 4.0)
|
52
|
-
regexp_parser (>=
|
53
|
-
|
54
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
53
|
+
regexp_parser (>= 2.4, < 3.0)
|
54
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
55
55
|
ruby-progressbar (~> 1.7)
|
56
56
|
unicode-display_width (>= 2.4.0, < 3.0)
|
57
|
-
rubocop-ast (1.
|
58
|
-
parser (>= 3.
|
57
|
+
rubocop-ast (1.32.3)
|
58
|
+
parser (>= 3.3.1.0)
|
59
59
|
ruby-progressbar (1.13.0)
|
60
|
-
typhoeus (1.4.
|
60
|
+
typhoeus (1.4.1)
|
61
61
|
ethon (>= 0.9.0)
|
62
|
-
unicode-display_width (2.
|
62
|
+
unicode-display_width (2.5.0)
|
63
63
|
|
64
64
|
PLATFORMS
|
65
65
|
x86_64-darwin-22
|
@@ -68,9 +68,9 @@ PLATFORMS
|
|
68
68
|
DEPENDENCIES
|
69
69
|
kendama!
|
70
70
|
pry-byebug
|
71
|
-
rake (~> 13.
|
72
|
-
rspec (~> 3.0)
|
73
|
-
rubocop (~> 1.
|
71
|
+
rake (~> 13.2.1)
|
72
|
+
rspec (~> 3.6, >= 3.6.0)
|
73
|
+
rubocop (~> 1.66.1)
|
74
74
|
|
75
75
|
BUNDLED WITH
|
76
76
|
2.4.12
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ Kendama - the Ruby gem for the 国税庁API
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
|
-
- API version: 1.0.
|
10
|
-
- Package version: 0.
|
9
|
+
- API version: 1.0.1
|
10
|
+
- Package version: 1.0.1
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,16 +23,16 @@ gem build kendama.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./kendama-0.
|
26
|
+
gem install ./kendama-1.0.1.gem
|
27
27
|
```
|
28
28
|
|
29
|
-
(for development, run `gem install --dev ./kendama-0.
|
29
|
+
(for development, run `gem install --dev ./kendama-1.0.1.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'kendama', '~> 0.
|
35
|
+
gem 'kendama', '~> 1.0.1'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
data/Rakefile
CHANGED
data/bin/console
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "kendama"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
require "irb"
|
11
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/kendama.gemspec
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#国税庁API
|
5
|
+
|
6
|
+
#国税庁が提供するインボイス制度適格請求書発行事業者公表システムWeb-APIを使用するためのクライアントAPI(https://www.invoice-kohyo.nta.go.jp/web-api/index.html)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.1
|
9
|
+
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 7.0.0
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "kendama/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "kendama"
|
20
|
+
s.version = Kendama::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["uichi"]
|
23
|
+
s.email = ["37263474+uichi@users.noreply.github.com"]
|
24
|
+
s.homepage = "https://rubygems.org/gems/kendama"
|
25
|
+
s.summary = "適格請求書発行事業者公表システムWeb-APIのラッパー"
|
26
|
+
s.description = "国税庁が提供するインボイス制度適格請求書発行事業者公表システムWeb-APIを使用するためのRuby向けラッパーです。"
|
27
|
+
s.license = "MIT"
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
29
|
+
|
30
|
+
# s.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
31
|
+
|
32
|
+
s.metadata["homepage_uri"] = s.homepage
|
33
|
+
s.metadata["source_code_uri"] = "https://github.com/uichi/kendama"
|
34
|
+
s.metadata["changelog_uri"] = "https://github.com/uichi/kendama/blob/main/CHANGELOG.md"
|
35
|
+
|
36
|
+
s.required_ruby_version = ">= 2.7"
|
37
|
+
|
38
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
39
|
+
|
40
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
41
|
+
|
42
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
43
|
+
s.test_files = `find spec/*`.split("\n")
|
44
|
+
s.executables = []
|
45
|
+
s.require_paths = ["lib"]
|
46
|
+
end
|
data/lib/kendama/api/v1_api.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#国税庁が提供するインボイス制度適格請求書発行事業者公表システムWeb-APIを使用するためのクライアントAPI(https://www.invoice-kohyo.nta.go.jp/web-api/index.html)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/lib/kendama/api_client.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#国税庁が提供するインボイス制度適格請求書発行事業者公表システムWeb-APIを使用するためのクライアントAPI(https://www.invoice-kohyo.nta.go.jp/web-api/index.html)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -316,7 +316,7 @@ module Kendama
|
|
316
316
|
|
317
317
|
# Sets user agent in HTTP header
|
318
318
|
#
|
319
|
-
# @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.
|
319
|
+
# @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.1)
|
320
320
|
def user_agent=(user_agent)
|
321
321
|
@user_agent = user_agent
|
322
322
|
@default_headers['User-Agent'] = @user_agent
|
data/lib/kendama/api_error.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#国税庁が提供するインボイス制度適格請求書発行事業者公表システムWeb-APIを使用するためのクライアントAPI(https://www.invoice-kohyo.nta.go.jp/web-api/index.html)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#国税庁が提供するインボイス制度適格請求書発行事業者公表システムWeb-APIを使用するためのクライアントAPI(https://www.invoice-kohyo.nta.go.jp/web-api/index.html)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -152,7 +152,7 @@ module Kendama
|
|
152
152
|
@scheme = 'https'
|
153
153
|
@host = 'kensyo.invoice-kohyo.nta.go.jp'
|
154
154
|
@base_path = ''
|
155
|
-
@server_index =
|
155
|
+
@server_index = nil
|
156
156
|
@server_operation_index = {}
|
157
157
|
@server_variables = {}
|
158
158
|
@server_operation_variables = {}
|
@@ -200,10 +200,12 @@ module Kendama
|
|
200
200
|
|
201
201
|
# Returns base URL for specified operation based on server settings
|
202
202
|
def base_url(operation = nil)
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
203
|
+
if operation_server_settings.key?(operation) then
|
204
|
+
index = server_operation_index.fetch(operation, server_index)
|
205
|
+
server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
206
|
+
else
|
207
|
+
server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
|
208
|
+
end
|
207
209
|
end
|
208
210
|
|
209
211
|
# Gets API key (with prefix if set).
|
@@ -262,8 +264,8 @@ module Kendama
|
|
262
264
|
servers = server_settings if servers == nil
|
263
265
|
|
264
266
|
# check array index out of bound
|
265
|
-
if (index < 0 || index >= servers.size)
|
266
|
-
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
267
|
+
if (index.nil? || index < 0 || index >= servers.size)
|
268
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
|
267
269
|
end
|
268
270
|
|
269
271
|
server = servers[index]
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#国税庁が提供するインボイス制度適格請求書発行事業者公表システムWeb-APIを使用するためのクライアントAPI(https://www.invoice-kohyo.nta.go.jp/web-api/index.html)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -197,82 +197,122 @@ module Kendama
|
|
197
197
|
|
198
198
|
if attributes.key?(:'sequence_number')
|
199
199
|
self.sequence_number = attributes[:'sequence_number']
|
200
|
+
else
|
201
|
+
self.sequence_number = nil
|
200
202
|
end
|
201
203
|
|
202
204
|
if attributes.key?(:'registrated_number')
|
203
205
|
self.registrated_number = attributes[:'registrated_number']
|
206
|
+
else
|
207
|
+
self.registrated_number = nil
|
204
208
|
end
|
205
209
|
|
206
210
|
if attributes.key?(:'process')
|
207
211
|
self.process = attributes[:'process']
|
212
|
+
else
|
213
|
+
self.process = nil
|
208
214
|
end
|
209
215
|
|
210
216
|
if attributes.key?(:'correct')
|
211
217
|
self.correct = attributes[:'correct']
|
218
|
+
else
|
219
|
+
self.correct = nil
|
212
220
|
end
|
213
221
|
|
214
222
|
if attributes.key?(:'kind')
|
215
223
|
self.kind = attributes[:'kind']
|
224
|
+
else
|
225
|
+
self.kind = nil
|
216
226
|
end
|
217
227
|
|
218
228
|
if attributes.key?(:'country')
|
219
229
|
self.country = attributes[:'country']
|
230
|
+
else
|
231
|
+
self.country = nil
|
220
232
|
end
|
221
233
|
|
222
234
|
if attributes.key?(:'latest')
|
223
235
|
self.latest = attributes[:'latest']
|
236
|
+
else
|
237
|
+
self.latest = nil
|
224
238
|
end
|
225
239
|
|
226
240
|
if attributes.key?(:'registration_date')
|
227
241
|
self.registration_date = attributes[:'registration_date']
|
242
|
+
else
|
243
|
+
self.registration_date = nil
|
228
244
|
end
|
229
245
|
|
230
246
|
if attributes.key?(:'update_date')
|
231
247
|
self.update_date = attributes[:'update_date']
|
248
|
+
else
|
249
|
+
self.update_date = nil
|
232
250
|
end
|
233
251
|
|
234
252
|
if attributes.key?(:'disposal_date')
|
235
253
|
self.disposal_date = attributes[:'disposal_date']
|
254
|
+
else
|
255
|
+
self.disposal_date = nil
|
236
256
|
end
|
237
257
|
|
238
258
|
if attributes.key?(:'expire_date')
|
239
259
|
self.expire_date = attributes[:'expire_date']
|
260
|
+
else
|
261
|
+
self.expire_date = nil
|
240
262
|
end
|
241
263
|
|
242
264
|
if attributes.key?(:'address')
|
243
265
|
self.address = attributes[:'address']
|
266
|
+
else
|
267
|
+
self.address = nil
|
244
268
|
end
|
245
269
|
|
246
270
|
if attributes.key?(:'address_prefecture_code')
|
247
271
|
self.address_prefecture_code = attributes[:'address_prefecture_code']
|
272
|
+
else
|
273
|
+
self.address_prefecture_code = nil
|
248
274
|
end
|
249
275
|
|
250
276
|
if attributes.key?(:'address_city_code')
|
251
277
|
self.address_city_code = attributes[:'address_city_code']
|
278
|
+
else
|
279
|
+
self.address_city_code = nil
|
252
280
|
end
|
253
281
|
|
254
282
|
if attributes.key?(:'address_request')
|
255
283
|
self.address_request = attributes[:'address_request']
|
284
|
+
else
|
285
|
+
self.address_request = nil
|
256
286
|
end
|
257
287
|
|
258
288
|
if attributes.key?(:'address_request_prefecture_code')
|
259
289
|
self.address_request_prefecture_code = attributes[:'address_request_prefecture_code']
|
290
|
+
else
|
291
|
+
self.address_request_prefecture_code = nil
|
260
292
|
end
|
261
293
|
|
262
294
|
if attributes.key?(:'address_request_city_code')
|
263
295
|
self.address_request_city_code = attributes[:'address_request_city_code']
|
296
|
+
else
|
297
|
+
self.address_request_city_code = nil
|
264
298
|
end
|
265
299
|
|
266
300
|
if attributes.key?(:'kana')
|
267
301
|
self.kana = attributes[:'kana']
|
302
|
+
else
|
303
|
+
self.kana = nil
|
268
304
|
end
|
269
305
|
|
270
306
|
if attributes.key?(:'name')
|
271
307
|
self.name = attributes[:'name']
|
308
|
+
else
|
309
|
+
self.name = nil
|
272
310
|
end
|
273
311
|
|
274
312
|
if attributes.key?(:'address_inside')
|
275
313
|
self.address_inside = attributes[:'address_inside']
|
314
|
+
else
|
315
|
+
self.address_inside = nil
|
276
316
|
end
|
277
317
|
|
278
318
|
if attributes.key?(:'address_inside_prefecture_code')
|
@@ -281,20 +321,27 @@ module Kendama
|
|
281
321
|
|
282
322
|
if attributes.key?(:'address_inside_city_code')
|
283
323
|
self.address_inside_city_code = attributes[:'address_inside_city_code']
|
324
|
+
else
|
325
|
+
self.address_inside_city_code = nil
|
284
326
|
end
|
285
327
|
|
286
328
|
if attributes.key?(:'trade_name')
|
287
329
|
self.trade_name = attributes[:'trade_name']
|
330
|
+
else
|
331
|
+
self.trade_name = nil
|
288
332
|
end
|
289
333
|
|
290
334
|
if attributes.key?(:'popular_name_previous_name')
|
291
335
|
self.popular_name_previous_name = attributes[:'popular_name_previous_name']
|
336
|
+
else
|
337
|
+
self.popular_name_previous_name = nil
|
292
338
|
end
|
293
339
|
end
|
294
340
|
|
295
341
|
# Show invalid properties with the reasons. Usually used together with valid?
|
296
342
|
# @return Array for valid properties with the reasons
|
297
343
|
def list_invalid_properties
|
344
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
298
345
|
invalid_properties = Array.new
|
299
346
|
if @sequence_number.nil?
|
300
347
|
invalid_properties.push('invalid value for "sequence_number", sequence_number cannot be nil.')
|
@@ -430,6 +477,7 @@ module Kendama
|
|
430
477
|
# Check to see if the all the properties in the model are valid
|
431
478
|
# @return true if the model is valid
|
432
479
|
def valid?
|
480
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
433
481
|
return false if @sequence_number.nil?
|
434
482
|
return false if @sequence_number.to_s.length > 8
|
435
483
|
return false if @sequence_number.to_s.length < 1
|
@@ -688,37 +736,30 @@ module Kendama
|
|
688
736
|
# @param [Hash] attributes Model attributes in the form of hash
|
689
737
|
# @return [Object] Returns the model itself
|
690
738
|
def self.build_from_hash(attributes)
|
691
|
-
new.build_from_hash(attributes)
|
692
|
-
end
|
693
|
-
|
694
|
-
# Builds the object from hash
|
695
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
696
|
-
# @return [Object] Returns the model itself
|
697
|
-
def build_from_hash(attributes)
|
698
739
|
return nil unless attributes.is_a?(Hash)
|
699
740
|
attributes = attributes.transform_keys(&:to_sym)
|
700
|
-
|
701
|
-
|
702
|
-
|
741
|
+
transformed_hash = {}
|
742
|
+
openapi_types.each_pair do |key, type|
|
743
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
744
|
+
transformed_hash["#{key}"] = nil
|
703
745
|
elsif type =~ /\AArray<(.*)>/i
|
704
746
|
# check to ensure the input is an array given that the attribute
|
705
747
|
# is documented as an array but the input is not
|
706
|
-
if attributes[
|
707
|
-
|
748
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
749
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
708
750
|
end
|
709
|
-
elsif !attributes[
|
710
|
-
|
751
|
+
elsif !attributes[attribute_map[key]].nil?
|
752
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
711
753
|
end
|
712
754
|
end
|
713
|
-
|
714
|
-
self
|
755
|
+
new(transformed_hash)
|
715
756
|
end
|
716
757
|
|
717
758
|
# Deserializes the data based on type
|
718
759
|
# @param string type Data type
|
719
760
|
# @param string value Value to be deserialized
|
720
761
|
# @return [Object] Deserialized data
|
721
|
-
def _deserialize(type, value)
|
762
|
+
def self._deserialize(type, value)
|
722
763
|
case type.to_sym
|
723
764
|
when :Time
|
724
765
|
Time.parse(value)
|