gbizinfo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.openapi-generator/FILES +48 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +30 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/CHANGELOG.md +3 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +64 -0
- data/LICENSE.txt +21 -0
- data/README.md +121 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docs/ApiError.md +20 -0
- data/docs/CertificationInfo.md +30 -0
- data/docs/CommendationInfo.md +26 -0
- data/docs/CompatibilityOfChildcareAndWork.md +24 -0
- data/docs/Finance.md +24 -0
- data/docs/GBizINFORESTAPIApi.md +678 -0
- data/docs/GBizINFORESTAPIPeriodSpecifiedSearchApi.md +591 -0
- data/docs/HojinInfo.md +76 -0
- data/docs/HojinInfoResponse.md +24 -0
- data/docs/HojinInfoUpdateInfoResponse.md +30 -0
- data/docs/MajorShareholders.md +20 -0
- data/docs/ManagementIndex.md +66 -0
- data/docs/PatentInfo.md +26 -0
- data/docs/ProcurementInfo.md +26 -0
- data/docs/SubsidyInfo.md +32 -0
- data/docs/WomenActivityInfos.md +28 -0
- data/docs/WorkplaceBaseInfos.md +28 -0
- data/docs/WorkplaceInfoBean.md +22 -0
- data/gbizinfo.gemspec +37 -0
- data/git_push.sh +57 -0
- data/lib/gbizinfo/api/g_biz_inforestapi_api.rb +748 -0
- data/lib/gbizinfo/api/g_biz_inforestapi_period_specified_search_api.rb +670 -0
- data/lib/gbizinfo/api_client.rb +391 -0
- data/lib/gbizinfo/api_error.rb +58 -0
- data/lib/gbizinfo/configuration.rb +290 -0
- data/lib/gbizinfo/models/api_error.rb +225 -0
- data/lib/gbizinfo/models/certification_info.rb +275 -0
- data/lib/gbizinfo/models/commendation_info.rb +255 -0
- data/lib/gbizinfo/models/compatibility_of_childcare_and_work.rb +245 -0
- data/lib/gbizinfo/models/finance.rb +249 -0
- data/lib/gbizinfo/models/hojin_info.rb +515 -0
- data/lib/gbizinfo/models/hojin_info_response.rb +249 -0
- data/lib/gbizinfo/models/hojin_info_update_info_response.rb +279 -0
- data/lib/gbizinfo/models/major_shareholders.rb +225 -0
- data/lib/gbizinfo/models/management_index.rb +455 -0
- data/lib/gbizinfo/models/patent_info.rb +257 -0
- data/lib/gbizinfo/models/procurement_info.rb +257 -0
- data/lib/gbizinfo/models/subsidy_info.rb +287 -0
- data/lib/gbizinfo/models/women_activity_infos.rb +265 -0
- data/lib/gbizinfo/models/workplace_base_infos.rb +265 -0
- data/lib/gbizinfo/models/workplace_info_bean.rb +232 -0
- data/lib/gbizinfo/version.rb +15 -0
- data/lib/gbizinfo.rb +57 -0
- data/openapi/root.yaml +1377 -0
- data/sig/gbizinfo.rbs +4 -0
- metadata +105 -0
@@ -0,0 +1,265 @@
|
|
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 WorkplaceBaseInfos
|
18
|
+
# 従業員の平均年齢
|
19
|
+
attr_accessor :average_age
|
20
|
+
|
21
|
+
# 正社員の平均継続勤務年数
|
22
|
+
attr_accessor :average_continuous_service_years
|
23
|
+
|
24
|
+
# 平均継続勤務年数-女性
|
25
|
+
attr_accessor :average_continuous_service_years_female
|
26
|
+
|
27
|
+
# 平均継続勤務年数-男性
|
28
|
+
attr_accessor :average_continuous_service_years_male
|
29
|
+
|
30
|
+
# 平均継続勤務年数種別
|
31
|
+
attr_accessor :average_continuous_service_years_type
|
32
|
+
|
33
|
+
# 月平均所定外労働時間
|
34
|
+
attr_accessor :month_average_predetermined_overtime_hours
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'average_age' => :'average_age',
|
40
|
+
:'average_continuous_service_years' => :'average_continuous_service_years',
|
41
|
+
:'average_continuous_service_years_female' => :'average_continuous_service_years_Female',
|
42
|
+
:'average_continuous_service_years_male' => :'average_continuous_service_years_Male',
|
43
|
+
:'average_continuous_service_years_type' => :'average_continuous_service_years_type',
|
44
|
+
:'month_average_predetermined_overtime_hours' => :'month_average_predetermined_overtime_hours'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Returns all the JSON keys this model knows about
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.openapi_types
|
55
|
+
{
|
56
|
+
:'average_age' => :'Float',
|
57
|
+
:'average_continuous_service_years' => :'Float',
|
58
|
+
:'average_continuous_service_years_female' => :'Float',
|
59
|
+
:'average_continuous_service_years_male' => :'Float',
|
60
|
+
:'average_continuous_service_years_type' => :'String',
|
61
|
+
:'month_average_predetermined_overtime_hours' => :'Float'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# List of attributes with nullable: true
|
66
|
+
def self.openapi_nullable
|
67
|
+
Set.new([
|
68
|
+
])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Gbizinfo::WorkplaceBaseInfos` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::WorkplaceBaseInfos`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'average_age')
|
87
|
+
self.average_age = attributes[:'average_age']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'average_continuous_service_years')
|
91
|
+
self.average_continuous_service_years = attributes[:'average_continuous_service_years']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'average_continuous_service_years_female')
|
95
|
+
self.average_continuous_service_years_female = attributes[:'average_continuous_service_years_female']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'average_continuous_service_years_male')
|
99
|
+
self.average_continuous_service_years_male = attributes[:'average_continuous_service_years_male']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'average_continuous_service_years_type')
|
103
|
+
self.average_continuous_service_years_type = attributes[:'average_continuous_service_years_type']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'month_average_predetermined_overtime_hours')
|
107
|
+
self.month_average_predetermined_overtime_hours = attributes[:'month_average_predetermined_overtime_hours']
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
112
|
+
# @return Array for valid properties with the reasons
|
113
|
+
def list_invalid_properties
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
115
|
+
invalid_properties = Array.new
|
116
|
+
invalid_properties
|
117
|
+
end
|
118
|
+
|
119
|
+
# Check to see if the all the properties in the model are valid
|
120
|
+
# @return true if the model is valid
|
121
|
+
def valid?
|
122
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
123
|
+
true
|
124
|
+
end
|
125
|
+
|
126
|
+
# Checks equality by comparing each attribute.
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def ==(o)
|
129
|
+
return true if self.equal?(o)
|
130
|
+
self.class == o.class &&
|
131
|
+
average_age == o.average_age &&
|
132
|
+
average_continuous_service_years == o.average_continuous_service_years &&
|
133
|
+
average_continuous_service_years_female == o.average_continuous_service_years_female &&
|
134
|
+
average_continuous_service_years_male == o.average_continuous_service_years_male &&
|
135
|
+
average_continuous_service_years_type == o.average_continuous_service_years_type &&
|
136
|
+
month_average_predetermined_overtime_hours == o.month_average_predetermined_overtime_hours
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def eql?(o)
|
142
|
+
self == o
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Integer] Hash code
|
147
|
+
def hash
|
148
|
+
[average_age, average_continuous_service_years, average_continuous_service_years_female, average_continuous_service_years_male, average_continuous_service_years_type, month_average_predetermined_overtime_hours].hash
|
149
|
+
end
|
150
|
+
|
151
|
+
# Builds the object from hash
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
# @return [Object] Returns the model itself
|
154
|
+
def self.build_from_hash(attributes)
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
157
|
+
transformed_hash = {}
|
158
|
+
openapi_types.each_pair do |key, type|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = nil
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
162
|
+
# check to ensure the input is an array given that the attribute
|
163
|
+
# is documented as an array but the input is not
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
166
|
+
end
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
169
|
+
end
|
170
|
+
end
|
171
|
+
new(transformed_hash)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Deserializes the data based on type
|
175
|
+
# @param string type Data type
|
176
|
+
# @param string value Value to be deserialized
|
177
|
+
# @return [Object] Deserialized data
|
178
|
+
def self._deserialize(type, value)
|
179
|
+
case type.to_sym
|
180
|
+
when :Time
|
181
|
+
Time.parse(value)
|
182
|
+
when :Date
|
183
|
+
Date.parse(value)
|
184
|
+
when :String
|
185
|
+
value.to_s
|
186
|
+
when :Integer
|
187
|
+
value.to_i
|
188
|
+
when :Float
|
189
|
+
value.to_f
|
190
|
+
when :Boolean
|
191
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
192
|
+
true
|
193
|
+
else
|
194
|
+
false
|
195
|
+
end
|
196
|
+
when :Object
|
197
|
+
# generic object (usually a Hash), return directly
|
198
|
+
value
|
199
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
200
|
+
inner_type = Regexp.last_match[:inner_type]
|
201
|
+
value.map { |v| _deserialize(inner_type, v) }
|
202
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
203
|
+
k_type = Regexp.last_match[:k_type]
|
204
|
+
v_type = Regexp.last_match[:v_type]
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each do |k, v|
|
207
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
else # model
|
211
|
+
# models (e.g. Pet) or oneOf
|
212
|
+
klass = Gbizinfo.const_get(type)
|
213
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the string representation of the object
|
218
|
+
# @return [String] String presentation of the object
|
219
|
+
def to_s
|
220
|
+
to_hash.to_s
|
221
|
+
end
|
222
|
+
|
223
|
+
# to_body is an alias to to_hash (backward compatibility)
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_body
|
226
|
+
to_hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the object in the form of hash
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
231
|
+
def to_hash
|
232
|
+
hash = {}
|
233
|
+
self.class.attribute_map.each_pair do |attr, param|
|
234
|
+
value = self.send(attr)
|
235
|
+
if value.nil?
|
236
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
237
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
238
|
+
end
|
239
|
+
|
240
|
+
hash[param] = _to_hash(value)
|
241
|
+
end
|
242
|
+
hash
|
243
|
+
end
|
244
|
+
|
245
|
+
# Outputs non-array value in the form of hash
|
246
|
+
# For object, use to_hash. Otherwise, just return the value
|
247
|
+
# @param [Object] value Any valid value
|
248
|
+
# @return [Hash] Returns the value in the form of hash
|
249
|
+
def _to_hash(value)
|
250
|
+
if value.is_a?(Array)
|
251
|
+
value.compact.map { |v| _to_hash(v) }
|
252
|
+
elsif value.is_a?(Hash)
|
253
|
+
{}.tap do |hash|
|
254
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
255
|
+
end
|
256
|
+
elsif value.respond_to? :to_hash
|
257
|
+
value.to_hash
|
258
|
+
else
|
259
|
+
value
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
265
|
+
end
|
@@ -0,0 +1,232 @@
|
|
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 WorkplaceInfoBean
|
18
|
+
attr_accessor :base_infos
|
19
|
+
|
20
|
+
attr_accessor :compatibility_of_childcare_and_work
|
21
|
+
|
22
|
+
attr_accessor :women_activity_infos
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'base_infos' => :'base_infos',
|
28
|
+
:'compatibility_of_childcare_and_work' => :'compatibility_of_childcare_and_work',
|
29
|
+
:'women_activity_infos' => :'women_activity_infos'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'base_infos' => :'WorkplaceBaseInfos',
|
42
|
+
:'compatibility_of_childcare_and_work' => :'CompatibilityOfChildcareAndWork',
|
43
|
+
:'women_activity_infos' => :'WomenActivityInfos'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Gbizinfo::WorkplaceInfoBean` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::WorkplaceInfoBean`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'base_infos')
|
69
|
+
self.base_infos = attributes[:'base_infos']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'compatibility_of_childcare_and_work')
|
73
|
+
self.compatibility_of_childcare_and_work = attributes[:'compatibility_of_childcare_and_work']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'women_activity_infos')
|
77
|
+
self.women_activity_infos = attributes[:'women_activity_infos']
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
+
# @return Array for valid properties with the reasons
|
83
|
+
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
|
+
invalid_properties = Array.new
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
|
+
true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
base_infos == o.base_infos &&
|
102
|
+
compatibility_of_childcare_and_work == o.compatibility_of_childcare_and_work &&
|
103
|
+
women_activity_infos == o.women_activity_infos
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
def hash
|
115
|
+
[base_infos, compatibility_of_childcare_and_work, women_activity_infos].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def self.build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
129
|
+
# check to ensure the input is an array given that the attribute
|
130
|
+
# is documented as an array but the input is not
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
133
|
+
end
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
136
|
+
end
|
137
|
+
end
|
138
|
+
new(transformed_hash)
|
139
|
+
end
|
140
|
+
|
141
|
+
# Deserializes the data based on type
|
142
|
+
# @param string type Data type
|
143
|
+
# @param string value Value to be deserialized
|
144
|
+
# @return [Object] Deserialized data
|
145
|
+
def self._deserialize(type, value)
|
146
|
+
case type.to_sym
|
147
|
+
when :Time
|
148
|
+
Time.parse(value)
|
149
|
+
when :Date
|
150
|
+
Date.parse(value)
|
151
|
+
when :String
|
152
|
+
value.to_s
|
153
|
+
when :Integer
|
154
|
+
value.to_i
|
155
|
+
when :Float
|
156
|
+
value.to_f
|
157
|
+
when :Boolean
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
159
|
+
true
|
160
|
+
else
|
161
|
+
false
|
162
|
+
end
|
163
|
+
when :Object
|
164
|
+
# generic object (usually a Hash), return directly
|
165
|
+
value
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
172
|
+
{}.tap do |hash|
|
173
|
+
value.each do |k, v|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
else # model
|
178
|
+
# models (e.g. Pet) or oneOf
|
179
|
+
klass = Gbizinfo.const_get(type)
|
180
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the string representation of the object
|
185
|
+
# @return [String] String presentation of the object
|
186
|
+
def to_s
|
187
|
+
to_hash.to_s
|
188
|
+
end
|
189
|
+
|
190
|
+
# to_body is an alias to to_hash (backward compatibility)
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_body
|
193
|
+
to_hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the object in the form of hash
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_hash
|
199
|
+
hash = {}
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
201
|
+
value = self.send(attr)
|
202
|
+
if value.nil?
|
203
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
204
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
205
|
+
end
|
206
|
+
|
207
|
+
hash[param] = _to_hash(value)
|
208
|
+
end
|
209
|
+
hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Outputs non-array value in the form of hash
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
214
|
+
# @param [Object] value Any valid value
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
216
|
+
def _to_hash(value)
|
217
|
+
if value.is_a?(Array)
|
218
|
+
value.compact.map { |v| _to_hash(v) }
|
219
|
+
elsif value.is_a?(Hash)
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
222
|
+
end
|
223
|
+
elsif value.respond_to? :to_hash
|
224
|
+
value.to_hash
|
225
|
+
else
|
226
|
+
value
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
@@ -0,0 +1,15 @@
|
|
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
|
+
module Gbizinfo
|
14
|
+
VERSION = '0.1.0'
|
15
|
+
end
|
data/lib/gbizinfo.rb
ADDED
@@ -0,0 +1,57 @@
|
|
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
|
+
# Common files
|
14
|
+
require 'gbizinfo/api_client'
|
15
|
+
require 'gbizinfo/api_error'
|
16
|
+
require 'gbizinfo/version'
|
17
|
+
require 'gbizinfo/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'gbizinfo/models/api_error'
|
21
|
+
require 'gbizinfo/models/certification_info'
|
22
|
+
require 'gbizinfo/models/commendation_info'
|
23
|
+
require 'gbizinfo/models/compatibility_of_childcare_and_work'
|
24
|
+
require 'gbizinfo/models/finance'
|
25
|
+
require 'gbizinfo/models/hojin_info'
|
26
|
+
require 'gbizinfo/models/hojin_info_response'
|
27
|
+
require 'gbizinfo/models/hojin_info_update_info_response'
|
28
|
+
require 'gbizinfo/models/major_shareholders'
|
29
|
+
require 'gbizinfo/models/management_index'
|
30
|
+
require 'gbizinfo/models/patent_info'
|
31
|
+
require 'gbizinfo/models/procurement_info'
|
32
|
+
require 'gbizinfo/models/subsidy_info'
|
33
|
+
require 'gbizinfo/models/women_activity_infos'
|
34
|
+
require 'gbizinfo/models/workplace_base_infos'
|
35
|
+
require 'gbizinfo/models/workplace_info_bean'
|
36
|
+
|
37
|
+
# APIs
|
38
|
+
require 'gbizinfo/api/g_biz_inforestapi_api'
|
39
|
+
require 'gbizinfo/api/g_biz_inforestapi_period_specified_search_api'
|
40
|
+
|
41
|
+
module Gbizinfo
|
42
|
+
class << self
|
43
|
+
# Customize default settings for the SDK using block.
|
44
|
+
# Gbizinfo.configure do |config|
|
45
|
+
# config.username = "xxx"
|
46
|
+
# config.password = "xxx"
|
47
|
+
# end
|
48
|
+
# If no block given, return the default Configuration object.
|
49
|
+
def configure
|
50
|
+
if block_given?
|
51
|
+
yield(Configuration.default)
|
52
|
+
else
|
53
|
+
Configuration.default
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|