Class: OpenapiClient::TeleCheckAchPaymentMethod
- Inherits:
-
Object
- Object
- OpenapiClient::TeleCheckAchPaymentMethod
- Defined in:
- lib/openapi_client/models/tele_check_ach_payment_method.rb
Overview
ACH means automated clearing house. Contains properties common across TeleCheck message types. Abstract class, do not use this class directly, use one of its children.
Direct Known Subclasses
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Bank account number.
-
#account_type ⇒ Object
Identifies if the account type is checking or savings.
-
#ach_bill_to ⇒ Object
Returns the value of attribute ach_bill_to.
-
#ach_type ⇒ Object
ACH application type values will be one of either TeleCheckICAPaymentMethod or TeleCheckCBPPaymentMethod.
-
#agent_id ⇒ Object
Used to track the agent transaction activity.
-
#check_number ⇒ Object
Check number.
-
#check_type ⇒ Object
Identifies if the check type is personal or company.
-
#manual_id_info ⇒ Object
Returns the value of attribute manual_id_info.
-
#product_code ⇒ Object
Identifies the product code in the transaction.
-
#registration_date ⇒ Object
Date the consumer originally registered in format MMDDYYYY.
-
#registration_id ⇒ Object
Unique ID assigned by the merchant for the consumer (never recycled).
-
#release_type ⇒ Object
Release type is used as a risk variable to gauge risk level when the merchant is releasing the purchased merchandise.
-
#routing_number ⇒ Object
Bank routing number.
-
#session_id ⇒ Object
Session identifier.
-
#supplement_id_info ⇒ Object
Returns the value of attribute supplement_id_info.
-
#terminal_city ⇒ Object
Identifies the city where the original sale transaction occurred.
-
#terminal_id ⇒ Object
Identifies the register or lane number where the original sale transaction occurred.
-
#terminal_state ⇒ Object
Identifies the US state or territory where the original sale transaction occurred.
-
#vip_customer ⇒ Object
Flags a transaction as a VIP order (based on merchant criteria).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3.
-
.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, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TeleCheckAchPaymentMethod
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(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) ⇒ 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 = {}) ⇒ TeleCheckAchPaymentMethod
Initializes the object
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 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 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 151 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TeleCheckAchPaymentMethod` 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 `OpenapiClient::TeleCheckAchPaymentMethod`. 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?(:'ach_type') self.ach_type = attributes[:'ach_type'] end if attributes.key?(:'routing_number') self.routing_number = attributes[:'routing_number'] end if attributes.key?(:'account_number') self.account_number = attributes[:'account_number'] end if attributes.key?(:'account_type') self.account_type = attributes[:'account_type'] end if attributes.key?(:'check_number') self.check_number = attributes[:'check_number'] end if attributes.key?(:'check_type') self.check_type = attributes[:'check_type'] end if attributes.key?(:'product_code') self.product_code = attributes[:'product_code'] end if attributes.key?(:'manual_id_info') self.manual_id_info = attributes[:'manual_id_info'] end if attributes.key?(:'supplement_id_info') self.supplement_id_info = attributes[:'supplement_id_info'] end if attributes.key?(:'agent_id') self.agent_id = attributes[:'agent_id'] end if attributes.key?(:'terminal_id') self.terminal_id = attributes[:'terminal_id'] end if attributes.key?(:'registration_id') self.registration_id = attributes[:'registration_id'] end if attributes.key?(:'registration_date') self.registration_date = attributes[:'registration_date'] end if attributes.key?(:'release_type') self.release_type = attributes[:'release_type'] end if attributes.key?(:'vip_customer') self.vip_customer = attributes[:'vip_customer'] end if attributes.key?(:'session_id') self.session_id = attributes[:'session_id'] end if attributes.key?(:'terminal_state') self.terminal_state = attributes[:'terminal_state'] end if attributes.key?(:'terminal_city') self.terminal_city = attributes[:'terminal_city'] end if attributes.key?(:'ach_bill_to') self.ach_bill_to = attributes[:'ach_bill_to'] end end |
Instance Attribute Details
#account_number ⇒ Object
Bank account number.
25 26 27 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 25 def account_number @account_number end |
#account_type ⇒ Object
Identifies if the account type is checking or savings.
28 29 30 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 28 def account_type @account_type end |
#ach_bill_to ⇒ Object
Returns the value of attribute ach_bill_to.
70 71 72 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 70 def ach_bill_to @ach_bill_to end |
#ach_type ⇒ Object
ACH application type values will be one of either TeleCheckICAPaymentMethod or TeleCheckCBPPaymentMethod.
19 20 21 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 19 def ach_type @ach_type end |
#agent_id ⇒ Object
Used to track the agent transaction activity.
44 45 46 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 44 def agent_id @agent_id end |
#check_number ⇒ Object
Check number.
31 32 33 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 31 def check_number @check_number end |
#check_type ⇒ Object
Identifies if the check type is personal or company.
34 35 36 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 34 def check_type @check_type end |
#manual_id_info ⇒ Object
Returns the value of attribute manual_id_info.
39 40 41 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 39 def manual_id_info @manual_id_info end |
#product_code ⇒ Object
Identifies the product code in the transaction.
37 38 39 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 37 def product_code @product_code end |
#registration_date ⇒ Object
Date the consumer originally registered in format MMDDYYYY.
53 54 55 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 53 def registration_date @registration_date end |
#registration_id ⇒ Object
Unique ID assigned by the merchant for the consumer (never recycled). It is an additional level of authentication. To use this feature, the merchant must work with TeleCheck Risk to discuss. Registration IDs must not be generated for an existing or returning consumer returns. The single registration ID must be unique per consumer.
50 51 52 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 50 def registration_id @registration_id end |
#release_type ⇒ Object
Release type is used as a risk variable to gauge risk level when the merchant is releasing the purchased merchandise.
56 57 58 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 56 def release_type @release_type end |
#routing_number ⇒ Object
Bank routing number.
22 23 24 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 22 def routing_number @routing_number end |
#session_id ⇒ Object
Session identifier.
62 63 64 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 62 def session_id @session_id end |
#supplement_id_info ⇒ Object
Returns the value of attribute supplement_id_info.
41 42 43 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 41 def supplement_id_info @supplement_id_info end |
#terminal_city ⇒ Object
Identifies the city where the original sale transaction occurred.
68 69 70 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 68 def terminal_city @terminal_city end |
#terminal_id ⇒ Object
Identifies the register or lane number where the original sale transaction occurred.
47 48 49 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 47 def terminal_id @terminal_id end |
#terminal_state ⇒ Object
Identifies the US state or territory where the original sale transaction occurred.
65 66 67 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 65 def terminal_state @terminal_state end |
#vip_customer ⇒ Object
Flags a transaction as a VIP order (based on merchant criteria). This field should not be sent for non-VIP orders.
59 60 61 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 59 def vip_customer @vip_customer end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 95 def self.attribute_map { :'ach_type' => :'achType', :'routing_number' => :'routingNumber', :'account_number' => :'accountNumber', :'account_type' => :'accountType', :'check_number' => :'checkNumber', :'check_type' => :'checkType', :'product_code' => :'productCode', :'manual_id_info' => :'manualIdInfo', :'supplement_id_info' => :'supplementIdInfo', :'agent_id' => :'agentId', :'terminal_id' => :'terminalId', :'registration_id' => :'registrationId', :'registration_date' => :'registrationDate', :'release_type' => :'releaseType', :'vip_customer' => :'vipCustomer', :'session_id' => :'sessionId', :'terminal_state' => :'terminalState', :'terminal_city' => :'terminalCity', :'ach_bill_to' => :'achBillTo' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
668 669 670 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 668 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3
145 146 147 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 145 def self.openapi_discriminator_name :'ach_type' end |
.openapi_types ⇒ Object
Attribute type mapping.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 120 def self.openapi_types { :'ach_type' => :'String', :'routing_number' => :'String', :'account_number' => :'String', :'account_type' => :'String', :'check_number' => :'String', :'check_type' => :'String', :'product_code' => :'String', :'manual_id_info' => :'IdInfo', :'supplement_id_info' => :'IdInfo', :'agent_id' => :'String', :'terminal_id' => :'String', :'registration_id' => :'String', :'registration_date' => :'Date', :'release_type' => :'String', :'vip_customer' => :'String', :'session_id' => :'String', :'terminal_state' => :'String', :'terminal_city' => :'String', :'ach_bill_to' => :'TeleCheckAchPaymentMethodAchBillTo' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 629 def ==(o) return true if self.equal?(o) self.class == o.class && ach_type == o.ach_type && routing_number == o.routing_number && account_number == o.account_number && account_type == o.account_type && check_number == o.check_number && check_type == o.check_type && product_code == o.product_code && manual_id_info == o.manual_id_info && supplement_id_info == o.supplement_id_info && agent_id == o.agent_id && terminal_id == o.terminal_id && registration_id == o.registration_id && registration_date == o.registration_date && release_type == o.release_type && vip_customer == o.vip_customer && session_id == o.session_id && terminal_state == o.terminal_state && terminal_city == o.terminal_city && ach_bill_to == o.ach_bill_to end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 696 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.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 klass = OpenapiClient.const_get(type) if klass.respond_to?(:openapi_discriminator_name) klass = OpenapiClient.const_get(value[klass.attribute_map[klass.openapi_discriminator_name]]) end 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
770 771 772 773 774 775 776 777 778 779 780 781 782 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 770 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, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) ⇒ Object
Builds the object from hash
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 675 def build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) return nil unless attributes.is_a?(Hash) openapi_types.each_pair do |key, type| if 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) self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
655 656 657 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 655 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
661 662 663 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 661 def hash [ach_type, routing_number, account_number, account_type, check_number, check_type, product_code, manual_id_info, supplement_id_info, agent_id, terminal_id, registration_id, registration_date, release_type, vip_customer, session_id, terminal_state, terminal_city, ach_bill_to].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 243 def list_invalid_properties invalid_properties = Array.new if @ach_type.nil? invalid_properties.push('invalid value for "ach_type", ach_type cannot be nil.') end if @routing_number.nil? invalid_properties.push('invalid value for "routing_number", routing_number cannot be nil.') end if @routing_number.to_s.length > 9 invalid_properties.push('invalid value for "routing_number", the character length must be smaller than or equal to 9.') end if @routing_number.to_s.length < 9 invalid_properties.push('invalid value for "routing_number", the character length must be great than or equal to 9.') end pattern = Regexp.new(/^[0-9]+$/) if @routing_number !~ pattern invalid_properties.push("invalid value for \"routing_number\", must conform to the pattern #{pattern}.") end if @account_number.nil? invalid_properties.push('invalid value for "account_number", account_number cannot be nil.') end if @account_number.to_s.length > 56 invalid_properties.push('invalid value for "account_number", the character length must be smaller than or equal to 56.') end if @account_number.to_s.length < 1 invalid_properties.push('invalid value for "account_number", the character length must be great than or equal to 1.') end pattern = Regexp.new(/^[0-9]+$/) if @account_number !~ pattern invalid_properties.push("invalid value for \"account_number\", must conform to the pattern #{pattern}.") end if @account_type.nil? invalid_properties.push('invalid value for "account_type", account_type cannot be nil.') end if !@check_number.nil? && @check_number.to_s.length > 10 invalid_properties.push('invalid value for "check_number", the character length must be smaller than or equal to 10.') end pattern = Regexp.new(/^[0-9]+$/) if !@check_number.nil? && @check_number !~ pattern invalid_properties.push("invalid value for \"check_number\", must conform to the pattern #{pattern}.") end if @check_type.nil? invalid_properties.push('invalid value for "check_type", check_type cannot be nil.') end if !@product_code.nil? && @product_code.to_s.length > 6 invalid_properties.push('invalid value for "product_code", the character length must be smaller than or equal to 6.') end pattern = Regexp.new(/^[0-9]+$/) if !@product_code.nil? && @product_code !~ pattern invalid_properties.push("invalid value for \"product_code\", must conform to the pattern #{pattern}.") end if !@agent_id.nil? && @agent_id.to_s.length > 6 invalid_properties.push('invalid value for "agent_id", the character length must be smaller than or equal to 6.') end pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/) if !@agent_id.nil? && @agent_id !~ pattern invalid_properties.push("invalid value for \"agent_id\", must conform to the pattern #{pattern}.") end if !@terminal_id.nil? && @terminal_id.to_s.length > 10 invalid_properties.push('invalid value for "terminal_id", the character length must be smaller than or equal to 10.') end pattern = Regexp.new(/^[0-9]+$/) if !@terminal_id.nil? && @terminal_id !~ pattern invalid_properties.push("invalid value for \"terminal_id\", must conform to the pattern #{pattern}.") end if !@registration_id.nil? && @registration_id.to_s.length > 50 invalid_properties.push('invalid value for "registration_id", the character length must be smaller than or equal to 50.') end pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/) if !@registration_id.nil? && @registration_id !~ pattern invalid_properties.push("invalid value for \"registration_id\", must conform to the pattern #{pattern}.") end if @session_id.nil? invalid_properties.push('invalid value for "session_id", session_id cannot be nil.') end if @session_id.to_s.length > 128 invalid_properties.push('invalid value for "session_id", the character length must be smaller than or equal to 128.') end pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/) if @session_id !~ pattern invalid_properties.push("invalid value for \"session_id\", must conform to the pattern #{pattern}.") end if !@terminal_state.nil? && @terminal_state.to_s.length > 2 invalid_properties.push('invalid value for "terminal_state", the character length must be smaller than or equal to 2.') end pattern = Regexp.new(/^[A-Z]{2}$/) if !@terminal_state.nil? && @terminal_state !~ pattern invalid_properties.push("invalid value for \"terminal_state\", must conform to the pattern #{pattern}.") end if !@terminal_city.nil? && @terminal_city.to_s.length > 16 invalid_properties.push('invalid value for "terminal_city", the character length must be smaller than or equal to 16.') end pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/) if !@terminal_city.nil? && @terminal_city !~ pattern invalid_properties.push("invalid value for \"terminal_city\", must conform to the pattern #{pattern}.") end if @ach_bill_to.nil? invalid_properties.push('invalid value for "ach_bill_to", ach_bill_to cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
746 747 748 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 746 def to_body to_hash end |
#to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) ⇒ Hash
Returns the object in the form of hash
752 753 754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 752 def to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) hash = {} attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = 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
740 741 742 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 740 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/openapi_client/models/tele_check_ach_payment_method.rb', line 376 def valid? return false if @ach_type.nil? return false if @routing_number.nil? return false if @routing_number.to_s.length > 9 return false if @routing_number.to_s.length < 9 return false if @routing_number !~ Regexp.new(/^[0-9]+$/) return false if @account_number.nil? return false if @account_number.to_s.length > 56 return false if @account_number.to_s.length < 1 return false if @account_number !~ Regexp.new(/^[0-9]+$/) return false if @account_type.nil? account_type_validator = EnumAttributeValidator.new('String', ["C", "S"]) return false unless account_type_validator.valid?(@account_type) return false if !@check_number.nil? && @check_number.to_s.length > 10 return false if !@check_number.nil? && @check_number !~ Regexp.new(/^[0-9]+$/) return false if @check_type.nil? check_type_validator = EnumAttributeValidator.new('String', ["P", "C"]) return false unless check_type_validator.valid?(@check_type) return false if !@product_code.nil? && @product_code.to_s.length > 6 return false if !@product_code.nil? && @product_code !~ Regexp.new(/^[0-9]+$/) return false if !@agent_id.nil? && @agent_id.to_s.length > 6 return false if !@agent_id.nil? && @agent_id !~ Regexp.new(/(?=.*[^\s])^[^|]+$/) return false if !@terminal_id.nil? && @terminal_id.to_s.length > 10 return false if !@terminal_id.nil? && @terminal_id !~ Regexp.new(/^[0-9]+$/) return false if !@registration_id.nil? && @registration_id.to_s.length > 50 return false if !@registration_id.nil? && @registration_id !~ Regexp.new(/(?=.*[^\s])^[^|]+$/) release_type_validator = EnumAttributeValidator.new('String', ["C", "D", "P", "T"]) return false unless release_type_validator.valid?(@release_type) vip_customer_validator = EnumAttributeValidator.new('String', ["Y", "N"]) return false unless vip_customer_validator.valid?(@vip_customer) return false if @session_id.nil? return false if @session_id.to_s.length > 128 return false if @session_id !~ Regexp.new(/(?=.*[^\s])^[^|]+$/) return false if !@terminal_state.nil? && @terminal_state.to_s.length > 2 return false if !@terminal_state.nil? && @terminal_state !~ Regexp.new(/^[A-Z]{2}$/) return false if !@terminal_city.nil? && @terminal_city.to_s.length > 16 return false if !@terminal_city.nil? && @terminal_city !~ Regexp.new(/(?=.*[^\s])^[^|]+$/) return false if @ach_bill_to.nil? true end |