gbizinfo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.openapi-generator/FILES +48 -0
  3. data/.openapi-generator/VERSION +1 -0
  4. data/.openapi-generator-ignore +30 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +13 -0
  7. data/CHANGELOG.md +3 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/Gemfile +12 -0
  10. data/Gemfile.lock +64 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +121 -0
  13. data/Rakefile +12 -0
  14. data/bin/console +15 -0
  15. data/bin/setup +8 -0
  16. data/docs/ApiError.md +20 -0
  17. data/docs/CertificationInfo.md +30 -0
  18. data/docs/CommendationInfo.md +26 -0
  19. data/docs/CompatibilityOfChildcareAndWork.md +24 -0
  20. data/docs/Finance.md +24 -0
  21. data/docs/GBizINFORESTAPIApi.md +678 -0
  22. data/docs/GBizINFORESTAPIPeriodSpecifiedSearchApi.md +591 -0
  23. data/docs/HojinInfo.md +76 -0
  24. data/docs/HojinInfoResponse.md +24 -0
  25. data/docs/HojinInfoUpdateInfoResponse.md +30 -0
  26. data/docs/MajorShareholders.md +20 -0
  27. data/docs/ManagementIndex.md +66 -0
  28. data/docs/PatentInfo.md +26 -0
  29. data/docs/ProcurementInfo.md +26 -0
  30. data/docs/SubsidyInfo.md +32 -0
  31. data/docs/WomenActivityInfos.md +28 -0
  32. data/docs/WorkplaceBaseInfos.md +28 -0
  33. data/docs/WorkplaceInfoBean.md +22 -0
  34. data/gbizinfo.gemspec +37 -0
  35. data/git_push.sh +57 -0
  36. data/lib/gbizinfo/api/g_biz_inforestapi_api.rb +748 -0
  37. data/lib/gbizinfo/api/g_biz_inforestapi_period_specified_search_api.rb +670 -0
  38. data/lib/gbizinfo/api_client.rb +391 -0
  39. data/lib/gbizinfo/api_error.rb +58 -0
  40. data/lib/gbizinfo/configuration.rb +290 -0
  41. data/lib/gbizinfo/models/api_error.rb +225 -0
  42. data/lib/gbizinfo/models/certification_info.rb +275 -0
  43. data/lib/gbizinfo/models/commendation_info.rb +255 -0
  44. data/lib/gbizinfo/models/compatibility_of_childcare_and_work.rb +245 -0
  45. data/lib/gbizinfo/models/finance.rb +249 -0
  46. data/lib/gbizinfo/models/hojin_info.rb +515 -0
  47. data/lib/gbizinfo/models/hojin_info_response.rb +249 -0
  48. data/lib/gbizinfo/models/hojin_info_update_info_response.rb +279 -0
  49. data/lib/gbizinfo/models/major_shareholders.rb +225 -0
  50. data/lib/gbizinfo/models/management_index.rb +455 -0
  51. data/lib/gbizinfo/models/patent_info.rb +257 -0
  52. data/lib/gbizinfo/models/procurement_info.rb +257 -0
  53. data/lib/gbizinfo/models/subsidy_info.rb +287 -0
  54. data/lib/gbizinfo/models/women_activity_infos.rb +265 -0
  55. data/lib/gbizinfo/models/workplace_base_infos.rb +265 -0
  56. data/lib/gbizinfo/models/workplace_info_bean.rb +232 -0
  57. data/lib/gbizinfo/version.rb +15 -0
  58. data/lib/gbizinfo.rb +57 -0
  59. data/openapi/root.yaml +1377 -0
  60. data/sig/gbizinfo.rbs +4 -0
  61. metadata +105 -0
@@ -0,0 +1,245 @@
1
+ =begin
2
+ #gBizINFO REST API
3
+
4
+ #<div>各REST APIはHTTPリクエストヘッダX-hojinInfo-api-tokenに動作確認用のAPIトークンDTcLxzo1lZaUYaQPVdSRxdS4MzlXNCs4を指定して動作を確認することができます。</div><div>※動作確認用のAPIトークンはこのページでの動作確認でのみ使用してください。</div><div>※REST APIを利用する際は必ず、<a href='https://info.gbiz.go.jp/hojin/api_registration/form'>Web API利用申請</a>を行い、APIトークンを取得してください。</div>
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Gbizinfo
17
+ class CompatibilityOfChildcareAndWork
18
+ # 育児休業取得者数(女性)
19
+ attr_accessor :maternity_leave_acquisition_num
20
+
21
+ # 育児休業対象者数(女性)
22
+ attr_accessor :number_of_maternity_leave
23
+
24
+ # 育児休業対象者数(男性)
25
+ attr_accessor :number_of_paternity_leave
26
+
27
+ # 育児休業取得者数(男性)
28
+ attr_accessor :paternity_leave_acquisition_num
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'maternity_leave_acquisition_num' => :'maternity_leave_acquisition_num',
34
+ :'number_of_maternity_leave' => :'number_of_maternity_leave',
35
+ :'number_of_paternity_leave' => :'number_of_paternity_leave',
36
+ :'paternity_leave_acquisition_num' => :'paternity_leave_acquisition_num'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'maternity_leave_acquisition_num' => :'Integer',
49
+ :'number_of_maternity_leave' => :'Integer',
50
+ :'number_of_paternity_leave' => :'Integer',
51
+ :'paternity_leave_acquisition_num' => :'Integer'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Gbizinfo::CompatibilityOfChildcareAndWork` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::CompatibilityOfChildcareAndWork`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'maternity_leave_acquisition_num')
77
+ self.maternity_leave_acquisition_num = attributes[:'maternity_leave_acquisition_num']
78
+ end
79
+
80
+ if attributes.key?(:'number_of_maternity_leave')
81
+ self.number_of_maternity_leave = attributes[:'number_of_maternity_leave']
82
+ end
83
+
84
+ if attributes.key?(:'number_of_paternity_leave')
85
+ self.number_of_paternity_leave = attributes[:'number_of_paternity_leave']
86
+ end
87
+
88
+ if attributes.key?(:'paternity_leave_acquisition_num')
89
+ self.paternity_leave_acquisition_num = attributes[:'paternity_leave_acquisition_num']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ maternity_leave_acquisition_num == o.maternity_leave_acquisition_num &&
114
+ number_of_maternity_leave == o.number_of_maternity_leave &&
115
+ number_of_paternity_leave == o.number_of_paternity_leave &&
116
+ paternity_leave_acquisition_num == o.paternity_leave_acquisition_num
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [maternity_leave_acquisition_num, number_of_maternity_leave, number_of_paternity_leave, paternity_leave_acquisition_num].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ attributes = attributes.transform_keys(&:to_sym)
137
+ transformed_hash = {}
138
+ openapi_types.each_pair do |key, type|
139
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = nil
141
+ elsif type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[attribute_map[key]].is_a?(Array)
145
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
146
+ end
147
+ elsif !attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
149
+ end
150
+ end
151
+ new(transformed_hash)
152
+ end
153
+
154
+ # Deserializes the data based on type
155
+ # @param string type Data type
156
+ # @param string value Value to be deserialized
157
+ # @return [Object] Deserialized data
158
+ def self._deserialize(type, value)
159
+ case type.to_sym
160
+ when :Time
161
+ Time.parse(value)
162
+ when :Date
163
+ Date.parse(value)
164
+ when :String
165
+ value.to_s
166
+ when :Integer
167
+ value.to_i
168
+ when :Float
169
+ value.to_f
170
+ when :Boolean
171
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
+ true
173
+ else
174
+ false
175
+ end
176
+ when :Object
177
+ # generic object (usually a Hash), return directly
178
+ value
179
+ when /\AArray<(?<inner_type>.+)>\z/
180
+ inner_type = Regexp.last_match[:inner_type]
181
+ value.map { |v| _deserialize(inner_type, v) }
182
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
+ k_type = Regexp.last_match[:k_type]
184
+ v_type = Regexp.last_match[:v_type]
185
+ {}.tap do |hash|
186
+ value.each do |k, v|
187
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
+ end
189
+ end
190
+ else # model
191
+ # models (e.g. Pet) or oneOf
192
+ klass = Gbizinfo.const_get(type)
193
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
+ end
195
+ end
196
+
197
+ # Returns the string representation of the object
198
+ # @return [String] String presentation of the object
199
+ def to_s
200
+ to_hash.to_s
201
+ end
202
+
203
+ # to_body is an alias to to_hash (backward compatibility)
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_body
206
+ to_hash
207
+ end
208
+
209
+ # Returns the object in the form of hash
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ if value.nil?
216
+ is_nullable = self.class.openapi_nullable.include?(attr)
217
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
+ end
219
+
220
+ hash[param] = _to_hash(value)
221
+ end
222
+ hash
223
+ end
224
+
225
+ # Outputs non-array value in the form of hash
226
+ # For object, use to_hash. Otherwise, just return the value
227
+ # @param [Object] value Any valid value
228
+ # @return [Hash] Returns the value in the form of hash
229
+ def _to_hash(value)
230
+ if value.is_a?(Array)
231
+ value.compact.map { |v| _to_hash(v) }
232
+ elsif value.is_a?(Hash)
233
+ {}.tap do |hash|
234
+ value.each { |k, v| hash[k] = _to_hash(v) }
235
+ end
236
+ elsif value.respond_to? :to_hash
237
+ value.to_hash
238
+ else
239
+ value
240
+ end
241
+ end
242
+
243
+ end
244
+
245
+ end
@@ -0,0 +1,249 @@
1
+ =begin
2
+ #gBizINFO REST API
3
+
4
+ #<div>各REST APIはHTTPリクエストヘッダX-hojinInfo-api-tokenに動作確認用のAPIトークンDTcLxzo1lZaUYaQPVdSRxdS4MzlXNCs4を指定して動作を確認することができます。</div><div>※動作確認用のAPIトークンはこのページでの動作確認でのみ使用してください。</div><div>※REST APIを利用する際は必ず、<a href='https://info.gbiz.go.jp/hojin/api_registration/form'>Web API利用申請</a>を行い、APIトークンを取得してください。</div>
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Gbizinfo
17
+ class Finance
18
+ # 会計基準
19
+ attr_accessor :accounting_standards
20
+
21
+ # 期
22
+ attr_accessor :fiscal_year_cover_page
23
+
24
+ # 大株主
25
+ attr_accessor :major_shareholders
26
+
27
+ # 財務
28
+ attr_accessor :management_index
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'accounting_standards' => :'accounting_standards',
34
+ :'fiscal_year_cover_page' => :'fiscal_year_cover_page',
35
+ :'major_shareholders' => :'major_shareholders',
36
+ :'management_index' => :'management_index'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'accounting_standards' => :'String',
49
+ :'fiscal_year_cover_page' => :'String',
50
+ :'major_shareholders' => :'Array<MajorShareholders>',
51
+ :'management_index' => :'Array<ManagementIndex>'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Gbizinfo::Finance` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::Finance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'accounting_standards')
77
+ self.accounting_standards = attributes[:'accounting_standards']
78
+ end
79
+
80
+ if attributes.key?(:'fiscal_year_cover_page')
81
+ self.fiscal_year_cover_page = attributes[:'fiscal_year_cover_page']
82
+ end
83
+
84
+ if attributes.key?(:'major_shareholders')
85
+ if (value = attributes[:'major_shareholders']).is_a?(Array)
86
+ self.major_shareholders = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'management_index')
91
+ if (value = attributes[:'management_index']).is_a?(Array)
92
+ self.management_index = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ accounting_standards == o.accounting_standards &&
118
+ fiscal_year_cover_page == o.fiscal_year_cover_page &&
119
+ major_shareholders == o.major_shareholders &&
120
+ management_index == o.management_index
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [accounting_standards, fiscal_year_cover_page, major_shareholders, management_index].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def self._deserialize(type, value)
163
+ case type.to_sym
164
+ when :Time
165
+ Time.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :Boolean
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ # models (e.g. Pet) or oneOf
196
+ klass = Gbizinfo.const_get(type)
197
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end