gbizinfo 0.2.0 → 0.2.2
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/CODE_OF_CONDUCT.md +12 -12
- data/Gemfile +2 -2
- data/Gemfile.lock +41 -41
- data/LICENSE.txt +1 -1
- data/README.md +8 -7
- data/docs/ApiErrorResponse.md +20 -0
- data/docs/HojinInfoResponse.md +1 -1
- data/docs/HojinInfoUpdateInfoResponse.md +1 -1
- data/gbizinfo.gemspec +6 -6
- data/git_push.sh +1 -1
- data/lib/gbizinfo/api/g_biz_inforestapi_api.rb +18 -18
- data/lib/gbizinfo/api/g_biz_inforestapi_period_specified_search_api.rb +9 -9
- data/lib/gbizinfo/api_client.rb +29 -24
- data/lib/gbizinfo/api_error.rb +1 -1
- data/lib/gbizinfo/api_model_base.rb +88 -0
- data/lib/gbizinfo/configuration.rb +14 -3
- data/lib/gbizinfo/models/{api_error.rb → api_error_response.rb} +12 -79
- data/lib/gbizinfo/models/certification_info.rb +11 -78
- data/lib/gbizinfo/models/commendation_info.rb +11 -78
- data/lib/gbizinfo/models/compatibility_of_childcare_and_work.rb +11 -78
- data/lib/gbizinfo/models/finance.rb +11 -78
- data/lib/gbizinfo/models/hojin_info.rb +11 -78
- data/lib/gbizinfo/models/hojin_info_response.rb +12 -79
- data/lib/gbizinfo/models/hojin_info_update_info_response.rb +12 -79
- data/lib/gbizinfo/models/major_shareholders.rb +11 -78
- data/lib/gbizinfo/models/management_index.rb +11 -78
- data/lib/gbizinfo/models/patent_info.rb +11 -78
- data/lib/gbizinfo/models/procurement_info.rb +11 -78
- data/lib/gbizinfo/models/subsidy_info.rb +11 -78
- data/lib/gbizinfo/models/women_activity_infos.rb +11 -78
- data/lib/gbizinfo/models/workplace_base_infos.rb +11 -78
- data/lib/gbizinfo/models/workplace_info_bean.rb +11 -78
- data/lib/gbizinfo/version.rb +2 -2
- data/lib/gbizinfo.rb +3 -2
- data/openapi/root.yaml +5 -5
- data/pkg/gbizinfo-0.2.2.gem +0 -0
- data/spec/models/api_error_response_spec.rb +42 -0
- data/spec/spec_helper.rb +1 -1
- metadata +14 -12
- data/pkg/gbizinfo-0.1.0.gem +0 -0
- data/pkg/gbizinfo-0.2.0.gem +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.22.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Gbizinfo
|
|
17
|
-
class MajorShareholders
|
|
17
|
+
class MajorShareholders < ApiModelBase
|
|
18
18
|
# 企業名もしくは出資者
|
|
19
19
|
attr_accessor :name_major_shareholders
|
|
20
20
|
|
|
@@ -29,9 +29,14 @@ module Gbizinfo
|
|
|
29
29
|
}
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
32
37
|
# Returns all the JSON keys this model knows about
|
|
33
38
|
def self.acceptable_attributes
|
|
34
|
-
|
|
39
|
+
acceptable_attribute_map.values
|
|
35
40
|
end
|
|
36
41
|
|
|
37
42
|
# Attribute type mapping.
|
|
@@ -56,9 +61,10 @@ module Gbizinfo
|
|
|
56
61
|
end
|
|
57
62
|
|
|
58
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
-
if (!
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::MajorShareholders`. Please check the name to make sure it's valid. List of attributes: " +
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::MajorShareholders`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
68
|
end
|
|
63
69
|
h[k.to_sym] = v
|
|
64
70
|
}
|
|
@@ -131,61 +137,6 @@ module Gbizinfo
|
|
|
131
137
|
new(transformed_hash)
|
|
132
138
|
end
|
|
133
139
|
|
|
134
|
-
# Deserializes the data based on type
|
|
135
|
-
# @param string type Data type
|
|
136
|
-
# @param string value Value to be deserialized
|
|
137
|
-
# @return [Object] Deserialized data
|
|
138
|
-
def self._deserialize(type, value)
|
|
139
|
-
case type.to_sym
|
|
140
|
-
when :Time
|
|
141
|
-
Time.parse(value)
|
|
142
|
-
when :Date
|
|
143
|
-
Date.parse(value)
|
|
144
|
-
when :String
|
|
145
|
-
value.to_s
|
|
146
|
-
when :Integer
|
|
147
|
-
value.to_i
|
|
148
|
-
when :Float
|
|
149
|
-
value.to_f
|
|
150
|
-
when :Boolean
|
|
151
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
152
|
-
true
|
|
153
|
-
else
|
|
154
|
-
false
|
|
155
|
-
end
|
|
156
|
-
when :Object
|
|
157
|
-
# generic object (usually a Hash), return directly
|
|
158
|
-
value
|
|
159
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
160
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
161
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
162
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
163
|
-
k_type = Regexp.last_match[:k_type]
|
|
164
|
-
v_type = Regexp.last_match[:v_type]
|
|
165
|
-
{}.tap do |hash|
|
|
166
|
-
value.each do |k, v|
|
|
167
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
else # model
|
|
171
|
-
# models (e.g. Pet) or oneOf
|
|
172
|
-
klass = Gbizinfo.const_get(type)
|
|
173
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
174
|
-
end
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
# Returns the string representation of the object
|
|
178
|
-
# @return [String] String presentation of the object
|
|
179
|
-
def to_s
|
|
180
|
-
to_hash.to_s
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
-
# @return [Hash] Returns the object in the form of hash
|
|
185
|
-
def to_body
|
|
186
|
-
to_hash
|
|
187
|
-
end
|
|
188
|
-
|
|
189
140
|
# Returns the object in the form of hash
|
|
190
141
|
# @return [Hash] Returns the object in the form of hash
|
|
191
142
|
def to_hash
|
|
@@ -202,24 +153,6 @@ module Gbizinfo
|
|
|
202
153
|
hash
|
|
203
154
|
end
|
|
204
155
|
|
|
205
|
-
# Outputs non-array value in the form of hash
|
|
206
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
207
|
-
# @param [Object] value Any valid value
|
|
208
|
-
# @return [Hash] Returns the value in the form of hash
|
|
209
|
-
def _to_hash(value)
|
|
210
|
-
if value.is_a?(Array)
|
|
211
|
-
value.compact.map { |v| _to_hash(v) }
|
|
212
|
-
elsif value.is_a?(Hash)
|
|
213
|
-
{}.tap do |hash|
|
|
214
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
215
|
-
end
|
|
216
|
-
elsif value.respond_to? :to_hash
|
|
217
|
-
value.to_hash
|
|
218
|
-
else
|
|
219
|
-
value
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
|
|
223
156
|
end
|
|
224
157
|
|
|
225
158
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.22.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Gbizinfo
|
|
17
|
-
class ManagementIndex
|
|
17
|
+
class ManagementIndex < ApiModelBase
|
|
18
18
|
# 資本金
|
|
19
19
|
attr_accessor :capital_stock_summary_of_business_results
|
|
20
20
|
|
|
@@ -121,9 +121,14 @@ module Gbizinfo
|
|
|
121
121
|
}
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
# Returns attribute mapping this model knows about
|
|
125
|
+
def self.acceptable_attribute_map
|
|
126
|
+
attribute_map
|
|
127
|
+
end
|
|
128
|
+
|
|
124
129
|
# Returns all the JSON keys this model knows about
|
|
125
130
|
def self.acceptable_attributes
|
|
126
|
-
|
|
131
|
+
acceptable_attribute_map.values
|
|
127
132
|
end
|
|
128
133
|
|
|
129
134
|
# Attribute type mapping.
|
|
@@ -171,9 +176,10 @@ module Gbizinfo
|
|
|
171
176
|
end
|
|
172
177
|
|
|
173
178
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
179
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
174
180
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
175
|
-
if (!
|
|
176
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::ManagementIndex`. Please check the name to make sure it's valid. List of attributes: " +
|
|
181
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
182
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::ManagementIndex`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
177
183
|
end
|
|
178
184
|
h[k.to_sym] = v
|
|
179
185
|
}
|
|
@@ -361,61 +367,6 @@ module Gbizinfo
|
|
|
361
367
|
new(transformed_hash)
|
|
362
368
|
end
|
|
363
369
|
|
|
364
|
-
# Deserializes the data based on type
|
|
365
|
-
# @param string type Data type
|
|
366
|
-
# @param string value Value to be deserialized
|
|
367
|
-
# @return [Object] Deserialized data
|
|
368
|
-
def self._deserialize(type, value)
|
|
369
|
-
case type.to_sym
|
|
370
|
-
when :Time
|
|
371
|
-
Time.parse(value)
|
|
372
|
-
when :Date
|
|
373
|
-
Date.parse(value)
|
|
374
|
-
when :String
|
|
375
|
-
value.to_s
|
|
376
|
-
when :Integer
|
|
377
|
-
value.to_i
|
|
378
|
-
when :Float
|
|
379
|
-
value.to_f
|
|
380
|
-
when :Boolean
|
|
381
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
382
|
-
true
|
|
383
|
-
else
|
|
384
|
-
false
|
|
385
|
-
end
|
|
386
|
-
when :Object
|
|
387
|
-
# generic object (usually a Hash), return directly
|
|
388
|
-
value
|
|
389
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
390
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
391
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
392
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
393
|
-
k_type = Regexp.last_match[:k_type]
|
|
394
|
-
v_type = Regexp.last_match[:v_type]
|
|
395
|
-
{}.tap do |hash|
|
|
396
|
-
value.each do |k, v|
|
|
397
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
398
|
-
end
|
|
399
|
-
end
|
|
400
|
-
else # model
|
|
401
|
-
# models (e.g. Pet) or oneOf
|
|
402
|
-
klass = Gbizinfo.const_get(type)
|
|
403
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
404
|
-
end
|
|
405
|
-
end
|
|
406
|
-
|
|
407
|
-
# Returns the string representation of the object
|
|
408
|
-
# @return [String] String presentation of the object
|
|
409
|
-
def to_s
|
|
410
|
-
to_hash.to_s
|
|
411
|
-
end
|
|
412
|
-
|
|
413
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
414
|
-
# @return [Hash] Returns the object in the form of hash
|
|
415
|
-
def to_body
|
|
416
|
-
to_hash
|
|
417
|
-
end
|
|
418
|
-
|
|
419
370
|
# Returns the object in the form of hash
|
|
420
371
|
# @return [Hash] Returns the object in the form of hash
|
|
421
372
|
def to_hash
|
|
@@ -432,24 +383,6 @@ module Gbizinfo
|
|
|
432
383
|
hash
|
|
433
384
|
end
|
|
434
385
|
|
|
435
|
-
# Outputs non-array value in the form of hash
|
|
436
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
437
|
-
# @param [Object] value Any valid value
|
|
438
|
-
# @return [Hash] Returns the value in the form of hash
|
|
439
|
-
def _to_hash(value)
|
|
440
|
-
if value.is_a?(Array)
|
|
441
|
-
value.compact.map { |v| _to_hash(v) }
|
|
442
|
-
elsif value.is_a?(Hash)
|
|
443
|
-
{}.tap do |hash|
|
|
444
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
445
|
-
end
|
|
446
|
-
elsif value.respond_to? :to_hash
|
|
447
|
-
value.to_hash
|
|
448
|
-
else
|
|
449
|
-
value
|
|
450
|
-
end
|
|
451
|
-
end
|
|
452
|
-
|
|
453
386
|
end
|
|
454
387
|
|
|
455
388
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.22.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Gbizinfo
|
|
17
|
-
class PatentInfo
|
|
17
|
+
class PatentInfo < ApiModelBase
|
|
18
18
|
# 出願年月日
|
|
19
19
|
attr_accessor :application_date
|
|
20
20
|
|
|
@@ -41,9 +41,14 @@ module Gbizinfo
|
|
|
41
41
|
}
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
44
49
|
# Returns all the JSON keys this model knows about
|
|
45
50
|
def self.acceptable_attributes
|
|
46
|
-
|
|
51
|
+
acceptable_attribute_map.values
|
|
47
52
|
end
|
|
48
53
|
|
|
49
54
|
# Attribute type mapping.
|
|
@@ -71,9 +76,10 @@ module Gbizinfo
|
|
|
71
76
|
end
|
|
72
77
|
|
|
73
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
-
if (!
|
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::PatentInfo`. Please check the name to make sure it's valid. List of attributes: " +
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::PatentInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
83
|
end
|
|
78
84
|
h[k.to_sym] = v
|
|
79
85
|
}
|
|
@@ -163,61 +169,6 @@ module Gbizinfo
|
|
|
163
169
|
new(transformed_hash)
|
|
164
170
|
end
|
|
165
171
|
|
|
166
|
-
# Deserializes the data based on type
|
|
167
|
-
# @param string type Data type
|
|
168
|
-
# @param string value Value to be deserialized
|
|
169
|
-
# @return [Object] Deserialized data
|
|
170
|
-
def self._deserialize(type, value)
|
|
171
|
-
case type.to_sym
|
|
172
|
-
when :Time
|
|
173
|
-
Time.parse(value)
|
|
174
|
-
when :Date
|
|
175
|
-
Date.parse(value)
|
|
176
|
-
when :String
|
|
177
|
-
value.to_s
|
|
178
|
-
when :Integer
|
|
179
|
-
value.to_i
|
|
180
|
-
when :Float
|
|
181
|
-
value.to_f
|
|
182
|
-
when :Boolean
|
|
183
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
184
|
-
true
|
|
185
|
-
else
|
|
186
|
-
false
|
|
187
|
-
end
|
|
188
|
-
when :Object
|
|
189
|
-
# generic object (usually a Hash), return directly
|
|
190
|
-
value
|
|
191
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
192
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
193
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
194
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
195
|
-
k_type = Regexp.last_match[:k_type]
|
|
196
|
-
v_type = Regexp.last_match[:v_type]
|
|
197
|
-
{}.tap do |hash|
|
|
198
|
-
value.each do |k, v|
|
|
199
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
else # model
|
|
203
|
-
# models (e.g. Pet) or oneOf
|
|
204
|
-
klass = Gbizinfo.const_get(type)
|
|
205
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
206
|
-
end
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
# Returns the string representation of the object
|
|
210
|
-
# @return [String] String presentation of the object
|
|
211
|
-
def to_s
|
|
212
|
-
to_hash.to_s
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
216
|
-
# @return [Hash] Returns the object in the form of hash
|
|
217
|
-
def to_body
|
|
218
|
-
to_hash
|
|
219
|
-
end
|
|
220
|
-
|
|
221
172
|
# Returns the object in the form of hash
|
|
222
173
|
# @return [Hash] Returns the object in the form of hash
|
|
223
174
|
def to_hash
|
|
@@ -234,24 +185,6 @@ module Gbizinfo
|
|
|
234
185
|
hash
|
|
235
186
|
end
|
|
236
187
|
|
|
237
|
-
# Outputs non-array value in the form of hash
|
|
238
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
-
# @param [Object] value Any valid value
|
|
240
|
-
# @return [Hash] Returns the value in the form of hash
|
|
241
|
-
def _to_hash(value)
|
|
242
|
-
if value.is_a?(Array)
|
|
243
|
-
value.compact.map { |v| _to_hash(v) }
|
|
244
|
-
elsif value.is_a?(Hash)
|
|
245
|
-
{}.tap do |hash|
|
|
246
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
247
|
-
end
|
|
248
|
-
elsif value.respond_to? :to_hash
|
|
249
|
-
value.to_hash
|
|
250
|
-
else
|
|
251
|
-
value
|
|
252
|
-
end
|
|
253
|
-
end
|
|
254
|
-
|
|
255
188
|
end
|
|
256
189
|
|
|
257
190
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.22.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Gbizinfo
|
|
17
|
-
class ProcurementInfo
|
|
17
|
+
class ProcurementInfo < ApiModelBase
|
|
18
18
|
# 金額
|
|
19
19
|
attr_accessor :amount
|
|
20
20
|
|
|
@@ -41,9 +41,14 @@ module Gbizinfo
|
|
|
41
41
|
}
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
44
49
|
# Returns all the JSON keys this model knows about
|
|
45
50
|
def self.acceptable_attributes
|
|
46
|
-
|
|
51
|
+
acceptable_attribute_map.values
|
|
47
52
|
end
|
|
48
53
|
|
|
49
54
|
# Attribute type mapping.
|
|
@@ -71,9 +76,10 @@ module Gbizinfo
|
|
|
71
76
|
end
|
|
72
77
|
|
|
73
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
-
if (!
|
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::ProcurementInfo`. Please check the name to make sure it's valid. List of attributes: " +
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::ProcurementInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
83
|
end
|
|
78
84
|
h[k.to_sym] = v
|
|
79
85
|
}
|
|
@@ -163,61 +169,6 @@ module Gbizinfo
|
|
|
163
169
|
new(transformed_hash)
|
|
164
170
|
end
|
|
165
171
|
|
|
166
|
-
# Deserializes the data based on type
|
|
167
|
-
# @param string type Data type
|
|
168
|
-
# @param string value Value to be deserialized
|
|
169
|
-
# @return [Object] Deserialized data
|
|
170
|
-
def self._deserialize(type, value)
|
|
171
|
-
case type.to_sym
|
|
172
|
-
when :Time
|
|
173
|
-
Time.parse(value)
|
|
174
|
-
when :Date
|
|
175
|
-
Date.parse(value)
|
|
176
|
-
when :String
|
|
177
|
-
value.to_s
|
|
178
|
-
when :Integer
|
|
179
|
-
value.to_i
|
|
180
|
-
when :Float
|
|
181
|
-
value.to_f
|
|
182
|
-
when :Boolean
|
|
183
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
184
|
-
true
|
|
185
|
-
else
|
|
186
|
-
false
|
|
187
|
-
end
|
|
188
|
-
when :Object
|
|
189
|
-
# generic object (usually a Hash), return directly
|
|
190
|
-
value
|
|
191
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
192
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
193
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
194
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
195
|
-
k_type = Regexp.last_match[:k_type]
|
|
196
|
-
v_type = Regexp.last_match[:v_type]
|
|
197
|
-
{}.tap do |hash|
|
|
198
|
-
value.each do |k, v|
|
|
199
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
else # model
|
|
203
|
-
# models (e.g. Pet) or oneOf
|
|
204
|
-
klass = Gbizinfo.const_get(type)
|
|
205
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
206
|
-
end
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
# Returns the string representation of the object
|
|
210
|
-
# @return [String] String presentation of the object
|
|
211
|
-
def to_s
|
|
212
|
-
to_hash.to_s
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
216
|
-
# @return [Hash] Returns the object in the form of hash
|
|
217
|
-
def to_body
|
|
218
|
-
to_hash
|
|
219
|
-
end
|
|
220
|
-
|
|
221
172
|
# Returns the object in the form of hash
|
|
222
173
|
# @return [Hash] Returns the object in the form of hash
|
|
223
174
|
def to_hash
|
|
@@ -234,24 +185,6 @@ module Gbizinfo
|
|
|
234
185
|
hash
|
|
235
186
|
end
|
|
236
187
|
|
|
237
|
-
# Outputs non-array value in the form of hash
|
|
238
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
-
# @param [Object] value Any valid value
|
|
240
|
-
# @return [Hash] Returns the value in the form of hash
|
|
241
|
-
def _to_hash(value)
|
|
242
|
-
if value.is_a?(Array)
|
|
243
|
-
value.compact.map { |v| _to_hash(v) }
|
|
244
|
-
elsif value.is_a?(Hash)
|
|
245
|
-
{}.tap do |hash|
|
|
246
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
247
|
-
end
|
|
248
|
-
elsif value.respond_to? :to_hash
|
|
249
|
-
value.to_hash
|
|
250
|
-
else
|
|
251
|
-
value
|
|
252
|
-
end
|
|
253
|
-
end
|
|
254
|
-
|
|
255
188
|
end
|
|
256
189
|
|
|
257
190
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.22.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Gbizinfo
|
|
17
|
-
class SubsidyInfo
|
|
17
|
+
class SubsidyInfo < ApiModelBase
|
|
18
18
|
# 金額
|
|
19
19
|
attr_accessor :amount
|
|
20
20
|
|
|
@@ -53,9 +53,14 @@ module Gbizinfo
|
|
|
53
53
|
}
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
56
61
|
# Returns all the JSON keys this model knows about
|
|
57
62
|
def self.acceptable_attributes
|
|
58
|
-
|
|
63
|
+
acceptable_attribute_map.values
|
|
59
64
|
end
|
|
60
65
|
|
|
61
66
|
# Attribute type mapping.
|
|
@@ -86,9 +91,10 @@ module Gbizinfo
|
|
|
86
91
|
end
|
|
87
92
|
|
|
88
93
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
95
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
-
if (!
|
|
91
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::SubsidyInfo`. Please check the name to make sure it's valid. List of attributes: " +
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::SubsidyInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
98
|
end
|
|
93
99
|
h[k.to_sym] = v
|
|
94
100
|
}
|
|
@@ -193,61 +199,6 @@ module Gbizinfo
|
|
|
193
199
|
new(transformed_hash)
|
|
194
200
|
end
|
|
195
201
|
|
|
196
|
-
# Deserializes the data based on type
|
|
197
|
-
# @param string type Data type
|
|
198
|
-
# @param string value Value to be deserialized
|
|
199
|
-
# @return [Object] Deserialized data
|
|
200
|
-
def self._deserialize(type, value)
|
|
201
|
-
case type.to_sym
|
|
202
|
-
when :Time
|
|
203
|
-
Time.parse(value)
|
|
204
|
-
when :Date
|
|
205
|
-
Date.parse(value)
|
|
206
|
-
when :String
|
|
207
|
-
value.to_s
|
|
208
|
-
when :Integer
|
|
209
|
-
value.to_i
|
|
210
|
-
when :Float
|
|
211
|
-
value.to_f
|
|
212
|
-
when :Boolean
|
|
213
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
214
|
-
true
|
|
215
|
-
else
|
|
216
|
-
false
|
|
217
|
-
end
|
|
218
|
-
when :Object
|
|
219
|
-
# generic object (usually a Hash), return directly
|
|
220
|
-
value
|
|
221
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
222
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
223
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
224
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
225
|
-
k_type = Regexp.last_match[:k_type]
|
|
226
|
-
v_type = Regexp.last_match[:v_type]
|
|
227
|
-
{}.tap do |hash|
|
|
228
|
-
value.each do |k, v|
|
|
229
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
230
|
-
end
|
|
231
|
-
end
|
|
232
|
-
else # model
|
|
233
|
-
# models (e.g. Pet) or oneOf
|
|
234
|
-
klass = Gbizinfo.const_get(type)
|
|
235
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
236
|
-
end
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
# Returns the string representation of the object
|
|
240
|
-
# @return [String] String presentation of the object
|
|
241
|
-
def to_s
|
|
242
|
-
to_hash.to_s
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
246
|
-
# @return [Hash] Returns the object in the form of hash
|
|
247
|
-
def to_body
|
|
248
|
-
to_hash
|
|
249
|
-
end
|
|
250
|
-
|
|
251
202
|
# Returns the object in the form of hash
|
|
252
203
|
# @return [Hash] Returns the object in the form of hash
|
|
253
204
|
def to_hash
|
|
@@ -264,24 +215,6 @@ module Gbizinfo
|
|
|
264
215
|
hash
|
|
265
216
|
end
|
|
266
217
|
|
|
267
|
-
# Outputs non-array value in the form of hash
|
|
268
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
269
|
-
# @param [Object] value Any valid value
|
|
270
|
-
# @return [Hash] Returns the value in the form of hash
|
|
271
|
-
def _to_hash(value)
|
|
272
|
-
if value.is_a?(Array)
|
|
273
|
-
value.compact.map { |v| _to_hash(v) }
|
|
274
|
-
elsif value.is_a?(Hash)
|
|
275
|
-
{}.tap do |hash|
|
|
276
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
277
|
-
end
|
|
278
|
-
elsif value.respond_to? :to_hash
|
|
279
|
-
value.to_hash
|
|
280
|
-
else
|
|
281
|
-
value
|
|
282
|
-
end
|
|
283
|
-
end
|
|
284
|
-
|
|
285
218
|
end
|
|
286
219
|
|
|
287
220
|
end
|