Class: Gbizinfo::HojinInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/gbizinfo/models/hojin_info.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ HojinInfo

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/gbizinfo/models/hojin_info.rb', line 191

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Gbizinfo::HojinInfo` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Gbizinfo::HojinInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'business_items')
    if (value = attributes[:'business_items']).is_a?(Array)
      self.business_items = value
    end
  end

  if attributes.key?(:'business_summary')
    self.business_summary = attributes[:'business_summary']
  end

  if attributes.key?(:'capital_stock')
    self.capital_stock = attributes[:'capital_stock']
  end

  if attributes.key?(:'certification')
    if (value = attributes[:'certification']).is_a?(Array)
      self.certification = value
    end
  end

  if attributes.key?(:'close_cause')
    self.close_cause = attributes[:'close_cause']
  end

  if attributes.key?(:'close_date')
    self.close_date = attributes[:'close_date']
  end

  if attributes.key?(:'commendation')
    if (value = attributes[:'commendation']).is_a?(Array)
      self.commendation = value
    end
  end

  if attributes.key?(:'company_size_female')
    self.company_size_female = attributes[:'company_size_female']
  end

  if attributes.key?(:'company_size_male')
    self.company_size_male = attributes[:'company_size_male']
  end

  if attributes.key?(:'company_url')
    self.company_url = attributes[:'company_url']
  end

  if attributes.key?(:'corporate_number')
    self.corporate_number = attributes[:'corporate_number']
  end

  if attributes.key?(:'date_of_establishment')
    self.date_of_establishment = attributes[:'date_of_establishment']
  end

  if attributes.key?(:'employee_number')
    self.employee_number = attributes[:'employee_number']
  end

  if attributes.key?(:'finance')
    self.finance = attributes[:'finance']
  end

  if attributes.key?(:'founding_year')
    self.founding_year = attributes[:'founding_year']
  end

  if attributes.key?(:'kana')
    self.kana = attributes[:'kana']
  end

  if attributes.key?(:'location')
    self.location = attributes[:'location']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'name_en')
    self.name_en = attributes[:'name_en']
  end

  if attributes.key?(:'number_of_activity')
    self.number_of_activity = attributes[:'number_of_activity']
  end

  if attributes.key?(:'patent')
    if (value = attributes[:'patent']).is_a?(Array)
      self.patent = value
    end
  end

  if attributes.key?(:'postal_code')
    self.postal_code = attributes[:'postal_code']
  end

  if attributes.key?(:'procurement')
    if (value = attributes[:'procurement']).is_a?(Array)
      self.procurement = value
    end
  end

  if attributes.key?(:'qualification_grade')
    self.qualification_grade = attributes[:'qualification_grade']
  end

  if attributes.key?(:'representative_name')
    self.representative_name = attributes[:'representative_name']
  end

  if attributes.key?(:'representative_position')
    self.representative_position = attributes[:'representative_position']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'subsidy')
    if (value = attributes[:'subsidy']).is_a?(Array)
      self.subsidy = value
    end
  end

  if attributes.key?(:'update_date')
    self.update_date = attributes[:'update_date']
  end

  if attributes.key?(:'workplace_info')
    self.workplace_info = attributes[:'workplace_info']
  end
end

Instance Attribute Details

#business_itemsObject

全省庁統一資格の営業品目



19
20
21
# File 'lib/gbizinfo/models/hojin_info.rb', line 19

def business_items
  @business_items
end

#business_summaryObject

事業概要



22
23
24
# File 'lib/gbizinfo/models/hojin_info.rb', line 22

def business_summary
  @business_summary
end

#capital_stockObject

資本金



25
26
27
# File 'lib/gbizinfo/models/hojin_info.rb', line 25

def capital_stock
  @capital_stock
end

#certificationObject

届出・認定情報



28
29
30
# File 'lib/gbizinfo/models/hojin_info.rb', line 28

def certification
  @certification
end

#close_causeObject

登記記録の閉鎖等の事由



31
32
33
# File 'lib/gbizinfo/models/hojin_info.rb', line 31

def close_cause
  @close_cause
end

#close_dateObject

登記記録の閉鎖等年月日



34
35
36
# File 'lib/gbizinfo/models/hojin_info.rb', line 34

def close_date
  @close_date
end

#commendationObject

表彰情報



37
38
39
# File 'lib/gbizinfo/models/hojin_info.rb', line 37

def commendation
  @commendation
end

#company_size_femaleObject

企業規模詳細(女)



40
41
42
# File 'lib/gbizinfo/models/hojin_info.rb', line 40

def company_size_female
  @company_size_female
end

#company_size_maleObject

企業規模詳細(男)



43
44
45
# File 'lib/gbizinfo/models/hojin_info.rb', line 43

def company_size_male
  @company_size_male
end

#company_urlObject

企業ホームページ



46
47
48
# File 'lib/gbizinfo/models/hojin_info.rb', line 46

def company_url
  @company_url
end

#corporate_numberObject

法人番号



49
50
51
# File 'lib/gbizinfo/models/hojin_info.rb', line 49

def corporate_number
  @corporate_number
end

#date_of_establishmentObject

設立年月日



52
53
54
# File 'lib/gbizinfo/models/hojin_info.rb', line 52

def date_of_establishment
  @date_of_establishment
end

#employee_numberObject

従業員数



55
56
57
# File 'lib/gbizinfo/models/hojin_info.rb', line 55

def employee_number
  @employee_number
end

#financeObject

Returns the value of attribute finance.



57
58
59
# File 'lib/gbizinfo/models/hojin_info.rb', line 57

def finance
  @finance
end

#founding_yearObject

創業年



60
61
62
# File 'lib/gbizinfo/models/hojin_info.rb', line 60

def founding_year
  @founding_year
end

#kanaObject

法人名フリガナ



63
64
65
# File 'lib/gbizinfo/models/hojin_info.rb', line 63

def kana
  @kana
end

#locationObject

本社所在地



66
67
68
# File 'lib/gbizinfo/models/hojin_info.rb', line 66

def location
  @location
end

#nameObject

法人名



69
70
71
# File 'lib/gbizinfo/models/hojin_info.rb', line 69

def name
  @name
end

#name_enObject

法人名英語



72
73
74
# File 'lib/gbizinfo/models/hojin_info.rb', line 72

def name_en
  @name_en
end

#number_of_activityObject

法人活動情報件数



75
76
77
# File 'lib/gbizinfo/models/hojin_info.rb', line 75

def number_of_activity
  @number_of_activity
end

#patentObject

特許情報



78
79
80
# File 'lib/gbizinfo/models/hojin_info.rb', line 78

def patent
  @patent
end

#postal_codeObject

郵便番号



81
82
83
# File 'lib/gbizinfo/models/hojin_info.rb', line 81

def postal_code
  @postal_code
end

#procurementObject

調達情報



84
85
86
# File 'lib/gbizinfo/models/hojin_info.rb', line 84

def procurement
  @procurement
end

#qualification_gradeObject

全省庁統一資格の資格等級(物品の製造、物品の販売、役務の提供等、物品の買受け)



87
88
89
# File 'lib/gbizinfo/models/hojin_info.rb', line 87

def qualification_grade
  @qualification_grade
end

#representative_nameObject

法人代表者名



90
91
92
# File 'lib/gbizinfo/models/hojin_info.rb', line 90

def representative_name
  @representative_name
end

#representative_positionObject

法人代表者役職



93
94
95
# File 'lib/gbizinfo/models/hojin_info.rb', line 93

def representative_position
  @representative_position
end

#statusObject

ステータス



96
97
98
# File 'lib/gbizinfo/models/hojin_info.rb', line 96

def status
  @status
end

#subsidyObject

補助金情報



99
100
101
# File 'lib/gbizinfo/models/hojin_info.rb', line 99

def subsidy
  @subsidy
end

#update_dateObject

最終更新日



102
103
104
# File 'lib/gbizinfo/models/hojin_info.rb', line 102

def update_date
  @update_date
end

#workplace_infoObject

Returns the value of attribute workplace_info.



104
105
106
# File 'lib/gbizinfo/models/hojin_info.rb', line 104

def workplace_info
  @workplace_info
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/gbizinfo/models/hojin_info.rb', line 428

def self._deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = Gbizinfo.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



143
144
145
# File 'lib/gbizinfo/models/hojin_info.rb', line 143

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/gbizinfo/models/hojin_info.rb', line 107

def self.attribute_map
  {
    :'business_items' => :'business_items',
    :'business_summary' => :'business_summary',
    :'capital_stock' => :'capital_stock',
    :'certification' => :'certification',
    :'close_cause' => :'close_cause',
    :'close_date' => :'close_date',
    :'commendation' => :'commendation',
    :'company_size_female' => :'company_size_female',
    :'company_size_male' => :'company_size_male',
    :'company_url' => :'company_url',
    :'corporate_number' => :'corporate_number',
    :'date_of_establishment' => :'date_of_establishment',
    :'employee_number' => :'employee_number',
    :'finance' => :'finance',
    :'founding_year' => :'founding_year',
    :'kana' => :'kana',
    :'location' => :'location',
    :'name' => :'name',
    :'name_en' => :'name_en',
    :'number_of_activity' => :'number_of_activity',
    :'patent' => :'patent',
    :'postal_code' => :'postal_code',
    :'procurement' => :'procurement',
    :'qualification_grade' => :'qualification_grade',
    :'representative_name' => :'representative_name',
    :'representative_position' => :'representative_position',
    :'status' => :'status',
    :'subsidy' => :'subsidy',
    :'update_date' => :'update_date',
    :'workplace_info' => :'workplace_info'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/gbizinfo/models/hojin_info.rb', line 404

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



184
185
186
187
# File 'lib/gbizinfo/models/hojin_info.rb', line 184

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/gbizinfo/models/hojin_info.rb', line 148

def self.openapi_types
  {
    :'business_items' => :'Array<String>',
    :'business_summary' => :'String',
    :'capital_stock' => :'Integer',
    :'certification' => :'Array<CertificationInfo>',
    :'close_cause' => :'String',
    :'close_date' => :'String',
    :'commendation' => :'Array<CommendationInfo>',
    :'company_size_female' => :'Integer',
    :'company_size_male' => :'Integer',
    :'company_url' => :'String',
    :'corporate_number' => :'String',
    :'date_of_establishment' => :'String',
    :'employee_number' => :'Integer',
    :'finance' => :'Finance',
    :'founding_year' => :'Integer',
    :'kana' => :'String',
    :'location' => :'String',
    :'name' => :'String',
    :'name_en' => :'String',
    :'number_of_activity' => :'String',
    :'patent' => :'Array<PatentInfo>',
    :'postal_code' => :'String',
    :'procurement' => :'Array<ProcurementInfo>',
    :'qualification_grade' => :'String',
    :'representative_name' => :'String',
    :'representative_position' => :'String',
    :'status' => :'String',
    :'subsidy' => :'Array<SubsidyInfo>',
    :'update_date' => :'String',
    :'workplace_info' => :'WorkplaceInfoBean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/gbizinfo/models/hojin_info.rb', line 354

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      business_items == o.business_items &&
      business_summary == o.business_summary &&
      capital_stock == o.capital_stock &&
      certification == o.certification &&
      close_cause == o.close_cause &&
      close_date == o.close_date &&
      commendation == o.commendation &&
      company_size_female == o.company_size_female &&
      company_size_male == o.company_size_male &&
      company_url == o.company_url &&
      corporate_number == o.corporate_number &&
      date_of_establishment == o.date_of_establishment &&
      employee_number == o.employee_number &&
      finance == o.finance &&
      founding_year == o.founding_year &&
      kana == o.kana &&
      location == o.location &&
      name == o.name &&
      name_en == o.name_en &&
      number_of_activity == o.number_of_activity &&
      patent == o.patent &&
      postal_code == o.postal_code &&
      procurement == o.procurement &&
      qualification_grade == o.qualification_grade &&
      representative_name == o.representative_name &&
      representative_position == o.representative_position &&
      status == o.status &&
      subsidy == o.subsidy &&
      update_date == o.update_date &&
      workplace_info == o.workplace_info
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/gbizinfo/models/hojin_info.rb', line 499

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


391
392
393
# File 'lib/gbizinfo/models/hojin_info.rb', line 391

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



397
398
399
# File 'lib/gbizinfo/models/hojin_info.rb', line 397

def hash
  [business_items, business_summary, capital_stock, certification, close_cause, close_date, commendation, company_size_female, company_size_male, company_url, corporate_number, date_of_establishment, employee_number, finance, founding_year, kana, location, name, name_en, number_of_activity, patent, postal_code, procurement, qualification_grade, representative_name, representative_position, status, subsidy, update_date, workplace_info].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



339
340
341
342
343
# File 'lib/gbizinfo/models/hojin_info.rb', line 339

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



475
476
477
# File 'lib/gbizinfo/models/hojin_info.rb', line 475

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/gbizinfo/models/hojin_info.rb', line 481

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



469
470
471
# File 'lib/gbizinfo/models/hojin_info.rb', line 469

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



347
348
349
350
# File 'lib/gbizinfo/models/hojin_info.rb', line 347

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end