Class: CnsOpenapiRubyClient::Corporation
- Inherits:
-
Object
- Object
- CnsOpenapiRubyClient::Corporation
- Defined in:
- lib/cns_openapi_ruby_client/models/corporation.rb
Overview
法人種別を判別するためのデータ項目。
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#address_image_id ⇒ Object
国内所在地イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。.
-
#address_outside ⇒ Object
本店又は主たる事務所の所在地が国外にある法人番号保有者の 国外における本店又は主たる事務所の所在地を示すデータ項目。.
-
#address_outside_image_id ⇒ Object
国外所在地イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。.
-
#assignment_date ⇒ Object
法人番号指定年月日は、法人番号が指定された年月日を表す。.
-
#change_cause ⇒ Object
合併等による事業承継があった場合の事業承継内容を示すデータ項目。.
-
#change_date ⇒ Object
事由が発生した日付を表すデータ項目。.
-
#city_code ⇒ Object
市区町村コード.
-
#city_name ⇒ Object
法人番号保有者の本店又は主たる事務所の所在地の市区町村名。.
-
#close_cause ⇒ Object
閉鎖の事由は、登記記録の閉鎖等が生じた事由を表すデータ項目。.
-
#close_date ⇒ Object
登記記録の閉鎖等の事由が生じた年月日を表す。.
-
#corporate_number ⇒ Object
法人番号の指定を受けた者(以下「法人番号保有者」という。)の 法人番号を示すデータ項目。.
-
#correct ⇒ Object
Returns the value of attribute correct.
-
#en_address_outside ⇒ Object
本店又は主たる事務所の所在地が国外にある法人番号保有者が 登録した国外における本店又は主たる事務所の所在地(英語表記)。.
-
#en_city_name ⇒ Object
法人番号保有者が登録した本店又は主たる事務所の 所在地の丁目番地等(英語表記)。.
-
#en_name ⇒ Object
法人番号保有者が登録した商号又は名称(英語表記)。.
-
#en_prefecture_name ⇒ Object
法人番号保有者が登録した本店又は主たる事務所の 所在地の都道府県名(英語表記)。.
-
#furigana ⇒ Object
法人番号保有者の商号又は名称に対するフリガナ情報を示すデータ項目。.
-
#hihyoji ⇒ Object
設立登記法人のうち、登記上の所在地が、住居表示の実施や区画整理等で 既に廃止されており、現在では存在しない住所表記となっていることが 確認できた法人について、検索対象から除外していることを示すデータ項目。.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#latest ⇒ Object
応答結果のデータが、最新の情報か過去の情報かを表す。.
-
#name ⇒ Object
法人番号保有者の商号又は名称を示すデータ項目。.
-
#name_image_id ⇒ Object
商号又は名称イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。.
-
#post_code ⇒ Object
国内所在地の文字情報を基に設定した郵便番号。.
-
#prefecture_code ⇒ Object
都道府県コード。データを取り込み、名寄せ作業や不要なデータを識別する際、 当該コードを活用することにより、効率的な作業を行うことができる。.
-
#prefecture_name ⇒ Object
法人番号保有者の本店又は主たる事務所の所在地の都道府県名。.
-
#process ⇒ Object
Returns the value of attribute process.
-
#sequence_number ⇒ Object
一連番号.
-
#street_number ⇒ Object
法人番号保有者の本店又は主たる事務所の所在地の丁目番地等。.
-
#successor_corporate_number ⇒ Object
合併等による事業承継があったことにより 登記記録が閉鎖された場合の存続する法人の法人番号。.
-
#update_date ⇒ Object
法務省等からデータを受け取り、当庁でデータを更新した日付を表す。.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Corporation
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Corporation
Initializes the object
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 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 213 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `CnsOpenapiRubyClient::Corporation` 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 `CnsOpenapiRubyClient::Corporation`. 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?(:'sequence_number') self.sequence_number = attributes[:'sequence_number'] end if attributes.key?(:'corporate_number') self.corporate_number = attributes[:'corporate_number'] end if attributes.key?(:'process') self.process = attributes[:'process'] end if attributes.key?(:'correct') self.correct = attributes[:'correct'] end if attributes.key?(:'update_date') self.update_date = attributes[:'update_date'] end if attributes.key?(:'change_date') self.change_date = attributes[:'change_date'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'name_image_id') self.name_image_id = attributes[:'name_image_id'] end if attributes.key?(:'kind') self.kind = attributes[:'kind'] end if attributes.key?(:'prefecture_name') self.prefecture_name = attributes[:'prefecture_name'] end if attributes.key?(:'city_name') self.city_name = attributes[:'city_name'] end if attributes.key?(:'street_number') self.street_number = attributes[:'street_number'] end if attributes.key?(:'address_image_id') self.address_image_id = attributes[:'address_image_id'] end if attributes.key?(:'prefecture_code') self.prefecture_code = attributes[:'prefecture_code'] end if attributes.key?(:'city_code') self.city_code = attributes[:'city_code'] end if attributes.key?(:'post_code') self.post_code = attributes[:'post_code'] end if attributes.key?(:'address_outside') self.address_outside = attributes[:'address_outside'] end if attributes.key?(:'address_outside_image_id') self.address_outside_image_id = attributes[:'address_outside_image_id'] end if attributes.key?(:'close_date') self.close_date = attributes[:'close_date'] end if attributes.key?(:'close_cause') self.close_cause = attributes[:'close_cause'] end if attributes.key?(:'successor_corporate_number') self.successor_corporate_number = attributes[:'successor_corporate_number'] end if attributes.key?(:'change_cause') self.change_cause = attributes[:'change_cause'] end if attributes.key?(:'assignment_date') self.assignment_date = attributes[:'assignment_date'] end if attributes.key?(:'latest') self.latest = attributes[:'latest'] end if attributes.key?(:'en_name') self.en_name = attributes[:'en_name'] end if attributes.key?(:'en_prefecture_name') self.en_prefecture_name = attributes[:'en_prefecture_name'] end if attributes.key?(:'en_city_name') self.en_city_name = attributes[:'en_city_name'] end if attributes.key?(:'en_address_outside') self.en_address_outside = attributes[:'en_address_outside'] end if attributes.key?(:'furigana') self.furigana = attributes[:'furigana'] end if attributes.key?(:'hihyoji') self.hihyoji = attributes[:'hihyoji'] end end |
Instance Attribute Details
#address_image_id ⇒ Object
国内所在地イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。
53 54 55 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 53 def address_image_id @address_image_id end |
#address_outside ⇒ Object
本店又は主たる事務所の所在地が国外にある法人番号保有者の 国外における本店又は主たる事務所の所在地を示すデータ項目。
65 66 67 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 65 def address_outside @address_outside end |
#address_outside_image_id ⇒ Object
国外所在地イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。
68 69 70 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 68 def address_outside_image_id @address_outside_image_id end |
#assignment_date ⇒ Object
法人番号指定年月日は、法人番号が指定された年月日を表す。
83 84 85 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 83 def assignment_date @assignment_date end |
#change_cause ⇒ Object
合併等による事業承継があった場合の事業承継内容を示すデータ項目。
80 81 82 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 80 def change_cause @change_cause end |
#change_date ⇒ Object
事由が発生した日付を表すデータ項目。
33 34 35 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 33 def change_date @change_date end |
#city_code ⇒ Object
市区町村コード
59 60 61 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 59 def city_code @city_code end |
#city_name ⇒ Object
法人番号保有者の本店又は主たる事務所の所在地の市区町村名。
47 48 49 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 47 def city_name @city_name end |
#close_cause ⇒ Object
閉鎖の事由は、登記記録の閉鎖等が生じた事由を表すデータ項目。
74 75 76 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 74 def close_cause @close_cause end |
#close_date ⇒ Object
登記記録の閉鎖等の事由が生じた年月日を表す。
71 72 73 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 71 def close_date @close_date end |
#corporate_number ⇒ Object
法人番号の指定を受けた者(以下「法人番号保有者」という。)の 法人番号を示すデータ項目。
23 24 25 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 23 def corporate_number @corporate_number end |
#correct ⇒ Object
Returns the value of attribute correct.
27 28 29 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 27 def correct @correct end |
#en_address_outside ⇒ Object
本店又は主たる事務所の所在地が国外にある法人番号保有者が 登録した国外における本店又は主たる事務所の所在地(英語表記)。
98 99 100 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 98 def en_address_outside @en_address_outside end |
#en_city_name ⇒ Object
法人番号保有者が登録した本店又は主たる事務所の 所在地の丁目番地等(英語表記)。
95 96 97 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 95 def en_city_name @en_city_name end |
#en_name ⇒ Object
法人番号保有者が登録した商号又は名称(英語表記)。
89 90 91 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 89 def en_name @en_name end |
#en_prefecture_name ⇒ Object
法人番号保有者が登録した本店又は主たる事務所の 所在地の都道府県名(英語表記)。
92 93 94 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 92 def en_prefecture_name @en_prefecture_name end |
#furigana ⇒ Object
法人番号保有者の商号又は名称に対するフリガナ情報を示すデータ項目。
101 102 103 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 101 def furigana @furigana end |
#hihyoji ⇒ Object
設立登記法人のうち、登記上の所在地が、住居表示の実施や区画整理等で 既に廃止されており、現在では存在しない住所表記となっていることが 確認できた法人について、検索対象から除外していることを示すデータ項目。
104 105 106 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 104 def hihyoji @hihyoji end |
#kind ⇒ Object
Returns the value of attribute kind.
41 42 43 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 41 def kind @kind end |
#latest ⇒ Object
応答結果のデータが、最新の情報か過去の情報かを表す。
86 87 88 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 86 def latest @latest end |
#name ⇒ Object
法人番号保有者の商号又は名称を示すデータ項目。
36 37 38 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 36 def name @name end |
#name_image_id ⇒ Object
商号又は名称イメージIDは、 イメージファイルを閲覧するために指定する値(情報)。
39 40 41 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 39 def name_image_id @name_image_id end |
#post_code ⇒ Object
国内所在地の文字情報を基に設定した郵便番号。
62 63 64 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 62 def post_code @post_code end |
#prefecture_code ⇒ Object
都道府県コード。データを取り込み、名寄せ作業や不要なデータを識別する際、 当該コードを活用することにより、効率的な作業を行うことができる。
56 57 58 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 56 def prefecture_code @prefecture_code end |
#prefecture_name ⇒ Object
法人番号保有者の本店又は主たる事務所の所在地の都道府県名。
44 45 46 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 44 def prefecture_name @prefecture_name end |
#process ⇒ Object
Returns the value of attribute process.
25 26 27 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 25 def process @process end |
#sequence_number ⇒ Object
一連番号
20 21 22 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 20 def sequence_number @sequence_number end |
#street_number ⇒ Object
法人番号保有者の本店又は主たる事務所の所在地の丁目番地等。
50 51 52 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 50 def street_number @street_number end |
#successor_corporate_number ⇒ Object
合併等による事業承継があったことにより 登記記録が閉鎖された場合の存続する法人の法人番号。
77 78 79 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 77 def successor_corporate_number @successor_corporate_number end |
#update_date ⇒ Object
法務省等からデータを受け取り、当庁でデータを更新した日付を表す。
30 31 32 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 30 def update_date @update_date end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
165 166 167 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 165 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 129 def self.attribute_map { :'sequence_number' => :'sequenceNumber', :'corporate_number' => :'corporateNumber', :'process' => :'process', :'correct' => :'correct', :'update_date' => :'updateDate', :'change_date' => :'changeDate', :'name' => :'name', :'name_image_id' => :'nameImageId', :'kind' => :'kind', :'prefecture_name' => :'prefectureName', :'city_name' => :'cityName', :'street_number' => :'streetNumber', :'address_image_id' => :'addressImageId', :'prefecture_code' => :'prefectureCode', :'city_code' => :'cityCode', :'post_code' => :'postCode', :'address_outside' => :'addressOutside', :'address_outside_image_id' => :'addressOutsideImageId', :'close_date' => :'closeDate', :'close_cause' => :'closeCause', :'successor_corporate_number' => :'successorCorporateNumber', :'change_cause' => :'changeCause', :'assignment_date' => :'assignmentDate', :'latest' => :'latest', :'en_name' => :'enName', :'en_prefecture_name' => :'enPrefectureName', :'en_city_name' => :'enCityName', :'en_address_outside' => :'enAddressOutside', :'furigana' => :'furigana', :'hihyoji' => :'hihyoji' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
489 490 491 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 489 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
206 207 208 209 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 206 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 170 def self.openapi_types { :'sequence_number' => :'Integer', :'corporate_number' => :'Integer', :'process' => :'ProcessCodeType', :'correct' => :'CorrectCodeType', :'update_date' => :'Date', :'change_date' => :'Date', :'name' => :'String', :'name_image_id' => :'Integer', :'kind' => :'CorporateType', :'prefecture_name' => :'String', :'city_name' => :'String', :'street_number' => :'String', :'address_image_id' => :'Integer', :'prefecture_code' => :'Integer', :'city_code' => :'String', :'post_code' => :'String', :'address_outside' => :'String', :'address_outside_image_id' => :'Integer', :'close_date' => :'Date', :'close_cause' => :'String', :'successor_corporate_number' => :'Integer', :'change_cause' => :'String', :'assignment_date' => :'Date', :'latest' => :'Integer', :'en_name' => :'String', :'en_prefecture_name' => :'String', :'en_city_name' => :'String', :'en_address_outside' => :'String', :'furigana' => :'String', :'hihyoji' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 466 467 468 469 470 471 472 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 439 def ==(o) return true if self.equal?(o) self.class == o.class && sequence_number == o.sequence_number && corporate_number == o.corporate_number && process == o.process && correct == o.correct && update_date == o.update_date && change_date == o.change_date && name == o.name && name_image_id == o.name_image_id && kind == o.kind && prefecture_name == o.prefecture_name && city_name == o.city_name && street_number == o.street_number && address_image_id == o.address_image_id && prefecture_code == o.prefecture_code && city_code == o.city_code && post_code == o.post_code && address_outside == o.address_outside && address_outside_image_id == o.address_outside_image_id && close_date == o.close_date && close_cause == o.close_cause && successor_corporate_number == o.successor_corporate_number && change_cause == o.change_cause && assignment_date == o.assignment_date && latest == o.latest && en_name == o.en_name && en_prefecture_name == o.en_prefecture_name && en_city_name == o.en_city_name && en_address_outside == o.en_address_outside && furigana == o.furigana && hihyoji == o.hihyoji end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 519 def _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 = CnsOpenapiRubyClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
590 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 590 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 |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 496 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
476 477 478 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 476 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
482 483 484 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 482 def hash [sequence_number, corporate_number, process, correct, update_date, change_date, name, name_image_id, kind, prefecture_name, city_name, street_number, address_image_id, prefecture_code, city_code, post_code, address_outside, address_outside_image_id, close_date, close_cause, successor_corporate_number, change_cause, assignment_date, latest, en_name, en_prefecture_name, en_city_name, en_address_outside, furigana, hihyoji].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 349 def list_invalid_properties invalid_properties = Array.new pattern = Regexp.new(/(北海道|青森県|岩手県|宮城県|秋田県|山形県|福島県|茨城県|栃木県|群馬県|埼玉県|千葉県|東京都|神奈川県|新潟県|富山県|石川県|福井県|山梨県|長野県|岐阜県|静岡県|愛知県|三重県|滋賀県|京都府|大阪府|兵庫県|奈良県|和歌山県|鳥取県|島根県|岡山県|広島県|山口県|徳島県|香川県|愛媛県|高知県|福岡県|佐賀県|長崎県|熊本県|大分県|宮崎県|鹿児島県|沖縄県)/) if !@prefecture_name.nil? && @prefecture_name !~ pattern invalid_properties.push("invalid value for \"prefecture_name\", must conform to the pattern #{pattern}.") end if !@prefecture_code.nil? && @prefecture_code > 47 invalid_properties.push('invalid value for "prefecture_code", must be smaller than or equal to 47.') end if !@prefecture_code.nil? && @prefecture_code < 1 invalid_properties.push('invalid value for "prefecture_code", must be greater than or equal to 1.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
566 567 568 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 566 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 572 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_s ⇒ String
Returns the string representation of the object
560 561 562 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 560 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/cns_openapi_ruby_client/models/corporation.rb', line 369 def valid? return false if !@prefecture_name.nil? && @prefecture_name !~ Regexp.new(/(北海道|青森県|岩手県|宮城県|秋田県|山形県|福島県|茨城県|栃木県|群馬県|埼玉県|千葉県|東京都|神奈川県|新潟県|富山県|石川県|福井県|山梨県|長野県|岐阜県|静岡県|愛知県|三重県|滋賀県|京都府|大阪府|兵庫県|奈良県|和歌山県|鳥取県|島根県|岡山県|広島県|山口県|徳島県|香川県|愛媛県|高知県|福岡県|佐賀県|長崎県|熊本県|大分県|宮崎県|鹿児島県|沖縄県)/) return false if !@prefecture_code.nil? && @prefecture_code > 47 return false if !@prefecture_code.nil? && @prefecture_code < 1 close_cause_validator = EnumAttributeValidator.new('String', ["01", "11", "21", "31"]) return false unless close_cause_validator.valid?(@close_cause) latest_validator = EnumAttributeValidator.new('Integer', [0, 1]) return false unless latest_validator.valid?(@latest) hihyoji_validator = EnumAttributeValidator.new('Integer', [0, 1]) return false unless hihyoji_validator.valid?(@hihyoji) true end |