cns_openapi_ruby_client 1.0.0 → 1.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afdbb397204185ca3fae12dc02cf31dc2c2df7281cef412deebe46b5e395c9e5
4
- data.tar.gz: 7f82082555cae5f9c018fc4f09f1d27abb7ad8cbb02201683315bc622b737939
3
+ metadata.gz: 0bc81dc4ea9e26472d61773366c7be61fabb5ec8760a3b8f7c8d02ee7b86be2c
4
+ data.tar.gz: ef715df1e516f15219a46b839141c43e0cb80150e866e3484ef10080160c632e
5
5
  SHA512:
6
- metadata.gz: 4fe828991fb579c9a18e66e2a1d4ef6c1e98c05fb1f81542bb0af0b1899d07838f3aea090a28619cfe03f362e0d01c22d3e8e5cfc621c6e9049e40eba7201ba5
7
- data.tar.gz: cacf300540fa87e2e86d34340186aae571fa559e917d8bf408aa5ca399e1a8e4fa2c4fefba9c716077e72c05d9d34587bf6721bf19abab66ad8deabd9cd19bbf
6
+ metadata.gz: 478a4dccedf2256f1837df5d02f85e2d22369a29eaff78d406fa38f6faaf3edb28b90f4743c6b79aa20393a5f288969712aed8e0065336d946cc6cec59c3cbaf
7
+ data.tar.gz: a649b4c7d82b59d43500146e6baf915617530ff2ec8655a08bbc6df9bd0dfadc9703bfd4ac223d8c7f800035f7ed5c6c2c7ae5c375833fd36e7c9321ec6b32c3
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cns_openapi_ruby_client (1.0.0)
5
- activesupport (~> 4.2, >= 4.2.11)
4
+ cns_openapi_ruby_client (1.0.4)
5
+ activesupport (>= 4.2)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
8
8
  GEM
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # cns_openapi_ruby_client
2
2
 
3
- OpenApiGenerator generates base code. Some code customized to parse xml.
3
+ Customized OpenApiGenerator generates code.
4
+ Some code customized to parse xml.
4
5
 
5
6
  CnsOpenapiRubyClient - the Ruby gem for the Corporate number system API v4
6
7
 
@@ -13,6 +14,20 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
13
14
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
14
15
  For more information, please visit [https://www.houjin-bangou.nta.go.jp/webapi/toiawase/](https://www.houjin-bangou.nta.go.jp/webapi/toiawase/)
15
16
 
17
+ ## Customized
18
+
19
+ Below codes are not overwritten, even if you fix swagger definition and regenerate.
20
+ Because it's customized and described in .openapi-generator-ignore 
21
+
22
+ - lib/cns_openapi_ruby_client/api_client.rb
23
+ - To accept xml
24
+
25
+ - lib/cns_openapi_ruby_client/models/response.rb
26
+ - build_from_hash:184-188
27
+ - To put a hash in an array
28
+ - When API has only 1 candidate, return value is hash not array
29
+
30
+
16
31
  ## Installation
17
32
 
18
33
  ### Build a gem
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.required_ruby_version = ">= 2.4"
29
29
 
30
30
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
- s.add_runtime_dependency 'activesupport', '~> 4.2', '>= 4.2.11'
31
+ s.add_runtime_dependency 'activesupport', '>= 4.2'
32
32
 
33
33
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
34
 
data/docs/Corporation.md CHANGED
@@ -18,8 +18,8 @@
18
18
  | **street_number** | **String** | 法人番号保有者の本店又は主たる事務所の所在地の丁目番地等。 | [optional] |
19
19
  | **address_image_id** | **Integer** | 国内所在地イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。 | [optional] |
20
20
  | **prefecture_code** | **Integer** | 都道府県コード。データを取り込み、名寄せ作業や不要なデータを識別する際、 当該コードを活用することにより、効率的な作業を行うことができる。 | [optional] |
21
- | **city_code** | **Integer** | 市区町村コード | [optional] |
22
- | **post_code** | **Integer** | 国内所在地の文字情報を基に設定した郵便番号。 | [optional] |
21
+ | **city_code** | **String** | 市区町村コード | [optional] |
22
+ | **post_code** | **String** | 国内所在地の文字情報を基に設定した郵便番号。 | [optional] |
23
23
  | **address_outside** | **String** | 本店又は主たる事務所の所在地が国外にある法人番号保有者の 国外における本店又は主たる事務所の所在地を示すデータ項目。 | [optional] |
24
24
  | **address_outside_image_id** | **Integer** | 国外所在地イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。 | [optional] |
25
25
  | **close_date** | **Date** | 登記記録の閉鎖等の事由が生じた年月日を表す。 | [optional] |
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -62,6 +62,10 @@ module CnsOpenapiRubyClient
62
62
  if @api_client.config.client_side_validation && name.nil?
63
63
  fail ArgumentError, "Missing the required parameter 'name' when calling CorporationsApi.get_corporations"
64
64
  end
65
+ if @api_client.config.client_side_validation && name.to_s.length < 1
66
+ fail ArgumentError, 'invalid value for "name" when calling CorporationsApi.get_corporations, the character length must be great than or equal to 1.'
67
+ end
68
+
65
69
  # verify the required parameter 'type' is set
66
70
  if @api_client.config.client_side_validation && type.nil?
67
71
  fail ArgumentError, "Missing the required parameter 'type' when calling CorporationsApi.get_corporations"
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -15,16 +15,16 @@ require 'time'
15
15
 
16
16
  module CnsOpenapiRubyClient
17
17
  class CorporateType
18
- N101 = "101".freeze
19
- N201 = "201".freeze
20
- N301 = "301".freeze
21
- N302 = "302".freeze
22
- N303 = "303".freeze
23
- N304 = "304".freeze
24
- N305 = "305".freeze
25
- N399 = "399".freeze
26
- N401 = "401".freeze
27
- N499 = "499".freeze
18
+ NationalOrg = "101".freeze
19
+ LocalOrg = "201".freeze
20
+ Corporation = "301".freeze
21
+ YugenKaisha = "302".freeze
22
+ GeneralPartnership = "303".freeze
23
+ LimitedPartnership = "304".freeze
24
+ LimitedLiability = "305".freeze
25
+ EtcCorporation = "399".freeze
26
+ ForeignCorporation = "401".freeze
27
+ Other = "499".freeze
28
28
 
29
29
  # Builds the enum from string
30
30
  # @param [String] The enum value in the form of the string
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -183,8 +183,8 @@ module CnsOpenapiRubyClient
183
183
  :'street_number' => :'String',
184
184
  :'address_image_id' => :'Integer',
185
185
  :'prefecture_code' => :'Integer',
186
- :'city_code' => :'Integer',
187
- :'post_code' => :'Integer',
186
+ :'city_code' => :'String',
187
+ :'post_code' => :'String',
188
188
  :'address_outside' => :'String',
189
189
  :'address_outside_image_id' => :'Integer',
190
190
  :'close_date' => :'Date',
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -15,8 +15,8 @@ require 'time'
15
15
 
16
16
  module CnsOpenapiRubyClient
17
17
  class CorrectCodeType
18
- N0 = "0".freeze
19
- N1 = "1".freeze
18
+ OtherThanCorrection = "0".freeze
19
+ Correction = "1".freeze
20
20
 
21
21
  # Builds the enum from string
22
22
  # @param [String] The enum value in the form of the string
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -15,16 +15,16 @@ require 'time'
15
15
 
16
16
  module CnsOpenapiRubyClient
17
17
  class ProcessCodeType
18
- N01 = "01".freeze
19
- N11 = "11".freeze
20
- N12 = "12".freeze
21
- N13 = "13".freeze
22
- N21 = "21".freeze
23
- N22 = "22".freeze
24
- N71 = "71".freeze
25
- N72 = "72".freeze
26
- N81 = "81".freeze
27
- N99 = "99".freeze
18
+ New = "01".freeze
19
+ ChangedName = "11".freeze
20
+ ChangedDomesticAddress = "12".freeze
21
+ ChangedForeignAddress = "13".freeze
22
+ Closed = "21".freeze
23
+ ReActived = "22".freeze
24
+ AbsorbedAndMerged = "71".freeze
25
+ InvalidAbsorbedAndMerged = "72".freeze
26
+ DeletedTradeName = "81".freeze
27
+ Deleted = "99".freeze
28
28
 
29
29
  # Builds the enum from string
30
30
  # @param [String] The enum value in the form of the string
@@ -183,6 +183,8 @@ module CnsOpenapiRubyClient
183
183
  # is documented as an array but the input is not
184
184
  if attributes[self.class.attribute_map[key]].is_a?(Array)
185
185
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
186
+ elsif attributes[self.class.attribute_map[key]].is_a?(Hash)
187
+ self.send("#{key}=", [_deserialize($1, attributes[self.class.attribute_map[key]])])
186
188
  end
187
189
  elsif !attributes[self.class.attribute_map[key]].nil?
188
190
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.0.1
11
11
  =end
12
12
 
13
13
  module CnsOpenapiRubyClient
14
- VERSION = '1.0.0'
14
+ VERSION = '1.0.5'
15
15
  end
@@ -168,14 +168,14 @@ describe CnsOpenapiRubyClient::ApiClient do
168
168
  let(:api_client) { CnsOpenapiRubyClient::ApiClient.new }
169
169
 
170
170
  it 'works' do
171
- expect(api_client.select_header_content_type(nil)).to eq('application/json')
172
- expect(api_client.select_header_content_type([])).to eq('application/json')
171
+ expect(api_client.select_header_content_type(nil)).to eq('application/xml')
172
+ expect(api_client.select_header_content_type([])).to eq('application/xml')
173
173
 
174
174
  expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
175
- expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
175
+ expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/xml')
176
176
  expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
177
177
  expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
178
- expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
178
+ expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('application/xml')
179
179
  end
180
180
  end
181
181
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Corporate number system API v4
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cns_openapi_ruby_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-24 00:00:00.000000000 Z
11
+ date: 2021-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -34,22 +34,16 @@ dependencies:
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '4.2'
40
37
  - - ">="
41
38
  - !ruby/object:Gem::Version
42
- version: 4.2.11
39
+ version: '4.2'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '4.2'
50
44
  - - ">="
51
45
  - !ruby/object:Gem::Version
52
- version: 4.2.11
46
+ version: '4.2'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: rspec
55
49
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +75,11 @@ files:
81
75
  - Gemfile.lock
82
76
  - README.md
83
77
  - Rakefile
78
+ - cns_openapi_ruby_client-1.0.0.gem
79
+ - cns_openapi_ruby_client-1.0.1.gem
80
+ - cns_openapi_ruby_client-1.0.2.gem
81
+ - cns_openapi_ruby_client-1.0.3.gem
82
+ - cns_openapi_ruby_client-1.0.4.gem
84
83
  - cns_openapi_ruby_client.gemspec
85
84
  - docs/CorporateType.md
86
85
  - docs/Corporation.md