Class: MfkOpenapiRubyClient::CustomerExamination
- Inherits:
-
Object
- Object
- MfkOpenapiRubyClient::CustomerExamination
- Defined in:
- lib/mfk_openapi_ruby_client/models/customer_examination.rb
Overview
与信枠審査です。顧客に対する与信枠取得のために利用します。申請後2営業日以内に審査いたします。 自動与信枠審査を利用している場合は顧客登録と同時に与信枠審査も申請されます。
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#address1 ⇒ Object
都道府県・市区町村・番地です。必ず都道府県名から始めてください。.
-
#address2 ⇒ Object
建物名・部屋番号などです。.
-
#amount ⇒ Object
希望与信額です。審査通過の場合に付与される与信枠の希望金額になります。審査の結果減額されて与信枠付与されることもあります。.
-
#business_description ⇒ Object
事業内容です。顧客の主なサービス、商材などです。.
-
#business_type ⇒ Object
事業所区分です。法人(‘corporate`)または、個人(`individual`)で指定されます。不明な場合は空になります。.
-
#corporate_number ⇒ Object
法人番号です。事業所区分(‘business_type`)が法人(`corporate`)の場合にのみ利用されます。.
-
#created_at ⇒ Object
与信枠審査の申請日時です。.
-
#customer_id ⇒ Object
顧客IDです。一意の識別子として自動で付与されます。.
-
#email ⇒ Object
メールアドレスです。email形式で指定してください。.
-
#end_date ⇒ Object
希望取引登録期間終了日です。この日付まで対象の与信枠を利用して取引登録ができます。.
-
#id ⇒ Object
与信枠審査IDです。一意の識別子として自動で付与されます。.
-
#object ⇒ Object
このObjectの種別を示します。ここでは必ず‘customer_examination`が入ります。.
-
#remark ⇒ Object
その他情報です。審査に利用できる情報を記載できます。.
-
#representative_name ⇒ Object
代表者名です。.
-
#start_date ⇒ Object
希望取引登録期間開始日。この日付から対象の与信枠を利用して取引登録ができます。 手動での申請の場合、審査通過日となるため空で返却されます。自動与信枠審査による申請の場合は、月次での与信枠付与になり対象月の月初日となります。.
-
#status ⇒ Object
与信枠審査ステータスです。審査中(‘unexamined`)、審査通過(`passed`)、審査否決(`rejected`)があります。審査通過の場合には与信枠が付与されています。.
-
#tel ⇒ Object
電話番号です。ハイフン有無は任意になります。.
-
#uri ⇒ Object
与信枠審査URIです。すべてのリソースで一意の識別子として自動で付与されます。.
-
#website ⇒ Object
顧客企業のwebサイトです。.
-
#zip_code ⇒ 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 = {}) ⇒ CustomerExamination
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 = {}) ⇒ CustomerExamination
Initializes the object
167 168 169 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 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 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 167 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `MfkOpenapiRubyClient::CustomerExamination` 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 `MfkOpenapiRubyClient::CustomerExamination`. 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?(:'address1') self.address1 = attributes[:'address1'] end if attributes.key?(:'address2') self.address2 = attributes[:'address2'] end if attributes.key?(:'amount') self.amount = attributes[:'amount'] end if attributes.key?(:'business_description') self.business_description = attributes[:'business_description'] end if attributes.key?(:'business_type') self.business_type = attributes[:'business_type'] end if attributes.key?(:'corporate_number') self.corporate_number = attributes[:'corporate_number'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'customer_id') self.customer_id = attributes[:'customer_id'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'end_date') self.end_date = attributes[:'end_date'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'remark') self.remark = attributes[:'remark'] end if attributes.key?(:'representative_name') self.representative_name = attributes[:'representative_name'] end if attributes.key?(:'start_date') self.start_date = attributes[:'start_date'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'tel') self.tel = attributes[:'tel'] end if attributes.key?(:'object') self.object = attributes[:'object'] end if attributes.key?(:'uri') self.uri = attributes[:'uri'] end if attributes.key?(:'website') self.website = attributes[:'website'] end if attributes.key?(:'zip_code') self.zip_code = attributes[:'zip_code'] end end |
Instance Attribute Details
#address1 ⇒ Object
都道府県・市区町村・番地です。必ず都道府県名から始めてください。
20 21 22 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 20 def address1 @address1 end |
#address2 ⇒ Object
建物名・部屋番号などです。
23 24 25 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 23 def address2 @address2 end |
#amount ⇒ Object
希望与信額です。審査通過の場合に付与される与信枠の希望金額になります。審査の結果減額されて与信枠付与されることもあります。
26 27 28 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 26 def amount @amount end |
#business_description ⇒ Object
事業内容です。顧客の主なサービス、商材などです。
29 30 31 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 29 def business_description @business_description end |
#business_type ⇒ Object
事業所区分です。法人(‘corporate`)または、個人(`individual`)で指定されます。不明な場合は空になります。
32 33 34 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 32 def business_type @business_type end |
#corporate_number ⇒ Object
法人番号です。事業所区分(‘business_type`)が法人(`corporate`)の場合にのみ利用されます。
35 36 37 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 35 def corporate_number @corporate_number end |
#created_at ⇒ Object
与信枠審査の申請日時です。
38 39 40 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 38 def created_at @created_at end |
#customer_id ⇒ Object
顧客IDです。一意の識別子として自動で付与されます。
41 42 43 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 41 def customer_id @customer_id end |
#email ⇒ Object
メールアドレスです。email形式で指定してください。
44 45 46 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 44 def email @email end |
#end_date ⇒ Object
希望取引登録期間終了日です。この日付まで対象の与信枠を利用して取引登録ができます。
47 48 49 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 47 def end_date @end_date end |
#id ⇒ Object
与信枠審査IDです。一意の識別子として自動で付与されます。
50 51 52 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 50 def id @id end |
#object ⇒ Object
このObjectの種別を示します。ここでは必ず‘customer_examination`が入ります。
68 69 70 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 68 def object @object end |
#remark ⇒ Object
その他情報です。審査に利用できる情報を記載できます。
53 54 55 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 53 def remark @remark end |
#representative_name ⇒ Object
代表者名です。
56 57 58 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 56 def representative_name @representative_name end |
#start_date ⇒ Object
希望取引登録期間開始日。この日付から対象の与信枠を利用して取引登録ができます。 手動での申請の場合、審査通過日となるため空で返却されます。自動与信枠審査による申請の場合は、月次での与信枠付与になり対象月の月初日となります。
59 60 61 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 59 def start_date @start_date end |
#status ⇒ Object
与信枠審査ステータスです。審査中(‘unexamined`)、審査通過(`passed`)、審査否決(`rejected`)があります。審査通過の場合には与信枠が付与されています。
62 63 64 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 62 def status @status end |
#tel ⇒ Object
電話番号です。ハイフン有無は任意になります。
65 66 67 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 65 def tel @tel end |
#uri ⇒ Object
与信枠審査URIです。すべてのリソースで一意の識別子として自動で付与されます。
71 72 73 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 71 def uri @uri end |
#website ⇒ Object
顧客企業のwebサイトです。
74 75 76 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 74 def website @website end |
#zip_code ⇒ Object
郵便番号です。ハイフン有無は任意になります。但しハイフン無しで登録されますと、請求書にもハイフン無しで記載されます。
77 78 79 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 77 def zip_code @zip_code end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
128 129 130 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 128 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 102 def self.attribute_map { :'address1' => :'address1', :'address2' => :'address2', :'amount' => :'amount', :'business_description' => :'business_description', :'business_type' => :'business_type', :'corporate_number' => :'corporate_number', :'created_at' => :'created_at', :'customer_id' => :'customer_id', :'email' => :'email', :'end_date' => :'end_date', :'id' => :'id', :'remark' => :'remark', :'representative_name' => :'representative_name', :'start_date' => :'start_date', :'status' => :'status', :'tel' => :'tel', :'object' => :'object', :'uri' => :'uri', :'website' => :'website', :'zip_code' => :'zip_code' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
467 468 469 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 467 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
159 160 161 162 163 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 159 def self.openapi_nullable Set.new([ :'start_date', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 133 def self.openapi_types { :'address1' => :'String', :'address2' => :'String', :'amount' => :'Integer', :'business_description' => :'String', :'business_type' => :'String', :'corporate_number' => :'String', :'created_at' => :'Time', :'customer_id' => :'String', :'email' => :'String', :'end_date' => :'Date', :'id' => :'String', :'remark' => :'String', :'representative_name' => :'String', :'start_date' => :'Date', :'status' => :'String', :'tel' => :'String', :'object' => :'String', :'uri' => :'String', :'website' => :'String', :'zip_code' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 427 def ==(o) return true if self.equal?(o) self.class == o.class && address1 == o.address1 && address2 == o.address2 && amount == o.amount && business_description == o.business_description && business_type == o.business_type && corporate_number == o.corporate_number && created_at == o.created_at && customer_id == o.customer_id && email == o.email && end_date == o.end_date && id == o.id && remark == o.remark && representative_name == o.representative_name && start_date == o.start_date && status == o.status && tel == o.tel && object == o.object && uri == o.uri && website == o.website && zip_code == o.zip_code end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 497 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 = MfkOpenapiRubyClient.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
568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 568 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
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 474 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
454 455 456 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 454 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
460 461 462 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 460 def hash [address1, address2, amount, business_description, business_type, corporate_number, created_at, customer_id, email, end_date, id, remark, representative_name, start_date, status, tel, object, uri, website, zip_code].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 263 def list_invalid_properties invalid_properties = Array.new if !@address1.nil? && @address1.to_s.length > 100 invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 100.') end if !@address1.nil? && @address1.to_s.length < 1 invalid_properties.push('invalid value for "address1", the character length must be great than or equal to 1.') end pattern = Regexp.new(/^(北海道|青森県|岩手県|宮城県|秋田県|山形県|福島県|茨城県|栃木県|群馬県|埼玉県|千葉県|東京都|神奈川県|新潟県|富山県|石川県|福井県|山梨県|長野県|岐阜県|静岡県|愛知県|三重県|滋賀県|京都府|大阪府|兵庫県|奈良県|和歌山県|鳥取県|島根県|岡山県|広島県|山口県|徳島県|香川県|愛媛県|高知県|福岡県|佐賀県|長崎県|熊本県|大分県|宮崎県|鹿児島県|沖縄県).+$/) if !@address1.nil? && @address1 !~ pattern invalid_properties.push("invalid value for \"address1\", must conform to the pattern #{pattern}.") end if !@address2.nil? && @address2.to_s.length > 100 invalid_properties.push('invalid value for "address2", the character length must be smaller than or equal to 100.') end if !@email.nil? && @email.to_s.length > 255 invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 255.') end pattern = Regexp.new(/^[\w.+-]{1,64}@[a-z\d](?:[a-z\d-]{0,253}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,253}[a-z\d])?)+$/) if !@email.nil? && @email !~ pattern invalid_properties.push("invalid value for \"email\", must conform to the pattern #{pattern}.") end if !@status.nil? && @status.to_s.length > 60 invalid_properties.push('invalid value for "status", the character length must be smaller than or equal to 60.') end pattern = Regexp.new(/^((0(\d{1}-?\d{4}|\d{2}-?\d{3}|\d{3}-?\d{2}|\d{4}-?\d{1}|[5789]0-?\d{4})-?\d{4})|(0120-?\d{3}-?\d{3}))$/) if !@tel.nil? && @tel !~ pattern invalid_properties.push("invalid value for \"tel\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^\d{3}-?\d{4}$/) if !@zip_code.nil? && @zip_code !~ pattern invalid_properties.push("invalid value for \"zip_code\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
544 545 546 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 544 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 550 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
538 539 540 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 538 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/mfk_openapi_ruby_client/models/customer_examination.rb', line 310 def valid? return false if !@address1.nil? && @address1.to_s.length > 100 return false if !@address1.nil? && @address1.to_s.length < 1 return false if !@address1.nil? && @address1 !~ Regexp.new(/^(北海道|青森県|岩手県|宮城県|秋田県|山形県|福島県|茨城県|栃木県|群馬県|埼玉県|千葉県|東京都|神奈川県|新潟県|富山県|石川県|福井県|山梨県|長野県|岐阜県|静岡県|愛知県|三重県|滋賀県|京都府|大阪府|兵庫県|奈良県|和歌山県|鳥取県|島根県|岡山県|広島県|山口県|徳島県|香川県|愛媛県|高知県|福岡県|佐賀県|長崎県|熊本県|大分県|宮崎県|鹿児島県|沖縄県).+$/) return false if !@address2.nil? && @address2.to_s.length > 100 business_type_validator = EnumAttributeValidator.new('String', ["corporate", "individual"]) return false unless business_type_validator.valid?(@business_type) return false if !@email.nil? && @email.to_s.length > 255 return false if !@email.nil? && @email !~ Regexp.new(/^[\w.+-]{1,64}@[a-z\d](?:[a-z\d-]{0,253}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,253}[a-z\d])?)+$/) status_validator = EnumAttributeValidator.new('String', ["unexamined", "passed", "rejected"]) return false unless status_validator.valid?(@status) return false if !@status.nil? && @status.to_s.length > 60 return false if !@tel.nil? && @tel !~ Regexp.new(/^((0(\d{1}-?\d{4}|\d{2}-?\d{3}|\d{3}-?\d{2}|\d{4}-?\d{1}|[5789]0-?\d{4})-?\d{4})|(0120-?\d{3}-?\d{3}))$/) object_validator = EnumAttributeValidator.new('String', ["customer_examination"]) return false unless object_validator.valid?(@object) return false if !@zip_code.nil? && @zip_code !~ Regexp.new(/^\d{3}-?\d{4}$/) true end |