Class: CityPayApiClient::ChargeRequest
- Inherits:
-
Object
- Object
- CityPayApiClient::ChargeRequest
- Defined in:
- lib/citypay_api_client/models/charge_request.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
The amount to authorise in the lowest unit of currency with a variable length to a maximum of 12 digits.
-
#avs_postcode_policy ⇒ Object
A policy value which determines whether an AVS postcode policy is enforced or bypassed.
-
#cardholder_agreement ⇒ Object
Merchant-initiated transactions (MITs) are payments you trigger, where the cardholder has previously consented to you carrying out such payments.
-
#csc ⇒ Object
The Card Security Code (CSC) (also known as CV2/CVV2) is normally found on the back of the card (American Express has it on the front).
-
#csc_policy ⇒ Object
A policy value which determines whether a CSC policy is enforced or bypassed.
-
#currency ⇒ Object
The processing currency for the transaction.
-
#duplicate_policy ⇒ Object
A policy value which determines whether a duplication policy is enforced or bypassed.
-
#identifier ⇒ Object
The identifier of the transaction to process.
-
#initiation ⇒ Object
Transactions charged using the API are defined as: **Cardholder Initiated**: A _cardholder initiated transaction_ (CIT) is where the cardholder selects the card for use for a purchase using previously stored details.
-
#match_avsa ⇒ Object
A policy value which determines whether an AVS address policy is enforced, bypassed or ignored.
-
#merchantid ⇒ Object
Identifies the merchant account to perform processing for.
-
#threedsecure ⇒ Object
Returns the value of attribute threedsecure.
-
#token ⇒ Object
A tokenised form of a card that belongs to a card holder’s account and that has been previously registered.
-
#trans_info ⇒ Object
Further information that can be added to the transaction will display in reporting.
-
#trans_type ⇒ Object
The type of transaction being submitted.
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 = {}) ⇒ ChargeRequest
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 = {}) ⇒ ChargeRequest
Initializes the object
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 141 142 143 144 145 146 147 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 182 183 184 185 186 187 188 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 116 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::ChargeRequest` 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 `CityPayApiClient::ChargeRequest`. 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?(:'amount') self.amount = attributes[:'amount'] end if attributes.key?(:'avs_postcode_policy') self.avs_postcode_policy = attributes[:'avs_postcode_policy'] end if attributes.key?(:'cardholder_agreement') self.cardholder_agreement = attributes[:'cardholder_agreement'] end if attributes.key?(:'csc') self.csc = attributes[:'csc'] end if attributes.key?(:'csc_policy') self.csc_policy = attributes[:'csc_policy'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'duplicate_policy') self.duplicate_policy = attributes[:'duplicate_policy'] end if attributes.key?(:'identifier') self.identifier = attributes[:'identifier'] end if attributes.key?(:'initiation') self.initiation = attributes[:'initiation'] end if attributes.key?(:'match_avsa') self.match_avsa = attributes[:'match_avsa'] end if attributes.key?(:'merchantid') self.merchantid = attributes[:'merchantid'] end if attributes.key?(:'threedsecure') self.threedsecure = attributes[:'threedsecure'] end if attributes.key?(:'token') self.token = attributes[:'token'] end if attributes.key?(:'trans_info') self.trans_info = attributes[:'trans_info'] end if attributes.key?(:'trans_type') self.trans_type = attributes[:'trans_type'] end end |
Instance Attribute Details
#amount ⇒ Object
The amount to authorise in the lowest unit of currency with a variable length to a maximum of 12 digits. No decimal points are to be included and no divisional characters such as 1,024. The amount should be the total amount required for the transaction. For example with GBP £1,021.95 the amount value is 102195.
18 19 20 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 18 def amount @amount end |
#avs_postcode_policy ⇒ Object
A policy value which determines whether an AVS postcode policy is enforced or bypassed. Values are ‘0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS postcode numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the postcode did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send postcode details for authorisation.
21 22 23 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 21 def avs_postcode_policy @avs_postcode_policy end |
#cardholder_agreement ⇒ Object
Merchant-initiated transactions (MITs) are payments you trigger, where the cardholder has previously consented to you carrying out such payments. These may be scheduled (such as recurring payments and installments) or unscheduled (like account top-ups triggered by balance thresholds and no-show charges). Scheduled — These are regular payments using stored card details, like installments or a monthly subscription fee. - ‘I` Instalment - A single purchase of goods or services billed to a cardholder in multiple transactions, over a period of time agreed by the cardholder and you. - `R` Recurring - Transactions processed at fixed, regular intervals not to exceed one year between transactions, representing an agreement between a cardholder and you to purchase goods or services provided over a period of time. Unscheduled — These are payments using stored card details that do not occur on a regular schedule, like top-ups for a digital wallet triggered by the balance falling below a certain threshold. - `A` Reauthorisation - a purchase made after the original purchase. A common scenario is delayed/split shipments. - `C` Unscheduled Payment - A transaction using a stored credential for a fixed or variable amount that does not occur on a scheduled or regularly occurring transaction date. This includes account top-ups triggered by balance thresholds. - `D` Delayed Charge - A delayed charge is typically used in hotel, cruise lines and vehicle rental environments to perform a supplemental account charge after original services are rendered. - `L` Incremental - An incremental authorisation is typically found in hotel and car rental environments, where the cardholder has agreed to pay for any service incurred during the duration of the contract. An incremental authorisation is where you need to seek authorisation of further funds in addition to what you have originally requested. A common scenario is additional services charged to the contract, such as extending a stay in a hotel. - `S` Resubmission - When the original purchase occurred, but you were not able to get authorisation at the time the goods or services were provided. It should be only used where the goods or services have already been provided, but the authorisation request is declined for insufficient funds. - `X` No-show - A no-show is a transaction where you are enabled to charge for services which the cardholder entered into an agreement to purchase, but the cardholder did not meet the terms of the agreement.
24 25 26 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 24 def cardholder_agreement @cardholder_agreement end |
#csc ⇒ Object
The Card Security Code (CSC) (also known as CV2/CVV2) is normally found on the back of the card (American Express has it on the front). The value helps to identify posession of the card as it is not available within the chip or magnetic swipe. When forwarding the CSC, please ensure the value is a string as some values start with 0 and this will be stripped out by any integer parsing. The CSC number aids fraud prevention in Mail Order and Internet payments. Business rules are available on your account to identify whether to accept or decline transactions based on mismatched results of the CSC. The Payment Card Industry (PCI) requires that at no stage of a transaction should the CSC be stored. This applies to all entities handling card data. It should also not be used in any hashing process. CityPay do not store the value and have no method of retrieving the value once the transaction has been processed. For this reason, duplicate checking is unable to determine the CSC in its duplication check algorithm.
27 28 29 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 27 def csc @csc end |
#csc_policy ⇒ Object
A policy value which determines whether a CSC policy is enforced or bypassed. Values are ‘0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the CSC value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the CSC did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send the CSC details for authorisation.
30 31 32 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 30 def csc_policy @csc_policy end |
#currency ⇒ Object
The processing currency for the transaction. Will default to the merchant account currency.
33 34 35 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 33 def currency @currency end |
#duplicate_policy ⇒ Object
A policy value which determines whether a duplication policy is enforced or bypassed. A duplication check has a window of time set against your account within which it can action. If a previous transaction with matching values occurred within the window, any subsequent transaction will result in a T001 result. Values are ‘0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be checked for duplication within the duplication window. `2` to bypass. Transactions that are bypassed will not be checked for duplication within the duplication window. `3` to ignore. Transactions that are ignored will have the same affect as bypass.
36 37 38 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 36 def duplicate_policy @duplicate_policy end |
#identifier ⇒ Object
The identifier of the transaction to process. The value should be a valid reference and may be used to perform post processing actions and to aid in reconciliation of transactions. The value should be a valid printable string with ASCII character ranges from 0x32 to 0x127. The identifier is recommended to be distinct for each transaction such as a [random unique identifier](en.wikipedia.org/wiki/Universally_unique_identifier) this will aid in ensuring each transaction is identifiable. When transactions are processed they are also checked for duplicate requests. Changing the identifier on a subsequent request will ensure that a transaction is considered as different.
39 40 41 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 39 def identifier @identifier end |
#initiation ⇒ Object
Transactions charged using the API are defined as: **Cardholder Initiated**: A _cardholder initiated transaction_ (CIT) is where the cardholder selects the card for use for a purchase using previously stored details. An example would be a customer buying an item from your website after being present with their saved card details at checkout. **Merchant Intiated**: A _merchant initiated transaction_ (MIT) is an authorisation initiated where you as the merchant submit a cardholders previously stored details without the cardholder’s participation. An example would be a subscription to a membership scheme to debit their card monthly. MITs have different reasons such as reauthorisation, delayed, unscheduled, incremental, recurring, instalment, no-show or resubmission. The following values apply - ‘M` - specifies that the transaction is initiated by the merchant - `C` - specifies that the transaction is initiated by the cardholder Where transactions are merchant initiated, a valid cardholder agreement must be defined.
42 43 44 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 42 def initiation @initiation end |
#match_avsa ⇒ Object
A policy value which determines whether an AVS address policy is enforced, bypassed or ignored. Values are ‘0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS address numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the address did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send address numeric details for authorisation.
45 46 47 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 45 def match_avsa @match_avsa end |
#merchantid ⇒ Object
Identifies the merchant account to perform processing for.
48 49 50 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 48 def merchantid @merchantid end |
#threedsecure ⇒ Object
Returns the value of attribute threedsecure.
50 51 52 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 50 def threedsecure @threedsecure end |
#token ⇒ Object
A tokenised form of a card that belongs to a card holder’s account and that has been previously registered. The token is time based and will only be active for a short duration. The value is therefore designed not to be stored remotely for future use. Tokens will start with ct and are resiliently tamper proof using HMacSHA-256. No sensitive card data is stored internally within the token. Each card will contain a different token and the value may be different on any retrieval call. The value can be presented for payment as a selection value to an end user in a web application.
53 54 55 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 53 def token @token end |
#trans_info ⇒ Object
Further information that can be added to the transaction will display in reporting. Can be used for flexible values such as operator id.
56 57 58 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 56 def trans_info @trans_info end |
#trans_type ⇒ Object
The type of transaction being submitted. Normally this value is not required and your account manager may request that you set this field.
59 60 61 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 59 def trans_type @trans_type end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
83 84 85 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 83 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 62 def self.attribute_map { :'amount' => :'amount', :'avs_postcode_policy' => :'avs_postcode_policy', :'cardholder_agreement' => :'cardholder_agreement', :'csc' => :'csc', :'csc_policy' => :'csc_policy', :'currency' => :'currency', :'duplicate_policy' => :'duplicate_policy', :'identifier' => :'identifier', :'initiation' => :'initiation', :'match_avsa' => :'match_avsa', :'merchantid' => :'merchantid', :'threedsecure' => :'threedsecure', :'token' => :'token', :'trans_info' => :'trans_info', :'trans_type' => :'trans_type' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
406 407 408 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 406 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
109 110 111 112 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 109 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 88 def self.openapi_types { :'amount' => :'Integer', :'avs_postcode_policy' => :'String', :'cardholder_agreement' => :'String', :'csc' => :'String', :'csc_policy' => :'String', :'currency' => :'String', :'duplicate_policy' => :'String', :'identifier' => :'String', :'initiation' => :'String', :'match_avsa' => :'String', :'merchantid' => :'Integer', :'threedsecure' => :'ThreeDSecure', :'token' => :'String', :'trans_info' => :'String', :'trans_type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 371 def ==(o) return true if self.equal?(o) self.class == o.class && amount == o.amount && avs_postcode_policy == o.avs_postcode_policy && cardholder_agreement == o.cardholder_agreement && csc == o.csc && csc_policy == o.csc_policy && currency == o.currency && duplicate_policy == o.duplicate_policy && identifier == o.identifier && initiation == o.initiation && match_avsa == o.match_avsa && merchantid == o.merchantid && threedsecure == o.threedsecure && token == o.token && trans_info == o.trans_info && trans_type == o.trans_type end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 466 467 468 469 470 471 472 473 474 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 437 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 = CityPayApiClient.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
508 509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 508 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
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 413 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) 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
393 394 395 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 393 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
399 400 401 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 399 def hash [amount, avs_postcode_policy, cardholder_agreement, csc, csc_policy, currency, duplicate_policy, identifier, initiation, match_avsa, merchantid, threedsecure, token, trans_info, trans_type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 192 def list_invalid_properties invalid_properties = Array.new if @amount.nil? invalid_properties.push('invalid value for "amount", amount cannot be nil.') end if !@cardholder_agreement.nil? && @cardholder_agreement.to_s.length > 1 invalid_properties.push('invalid value for "cardholder_agreement", the character length must be smaller than or equal to 1.') end if !@csc.nil? && @csc.to_s.length > 4 invalid_properties.push('invalid value for "csc", the character length must be smaller than or equal to 4.') end if !@csc.nil? && @csc.to_s.length < 3 invalid_properties.push('invalid value for "csc", the character length must be great than or equal to 3.') end if !@currency.nil? && @currency.to_s.length > 3 invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.') end if !@currency.nil? && @currency.to_s.length < 3 invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 3.') end if @identifier.nil? invalid_properties.push('invalid value for "identifier", identifier cannot be nil.') end if @identifier.to_s.length > 50 invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.') end if @identifier.to_s.length < 4 invalid_properties.push('invalid value for "identifier", the character length must be great than or equal to 4.') end if !@initiation.nil? && @initiation.to_s.length > 1 invalid_properties.push('invalid value for "initiation", the character length must be smaller than or equal to 1.') end if @merchantid.nil? invalid_properties.push('invalid value for "merchantid", merchantid cannot be nil.') end if @token.nil? invalid_properties.push('invalid value for "token", token cannot be nil.') end if !@trans_info.nil? && @trans_info.to_s.length > 50 invalid_properties.push('invalid value for "trans_info", the character length must be smaller than or equal to 50.') end if !@trans_type.nil? && @trans_type.to_s.length > 1 invalid_properties.push('invalid value for "trans_type", the character length must be smaller than or equal to 1.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
484 485 486 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 484 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 490 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
478 479 480 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 478 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/citypay_api_client/models/charge_request.rb', line 255 def valid? return false if @amount.nil? return false if !@cardholder_agreement.nil? && @cardholder_agreement.to_s.length > 1 return false if !@csc.nil? && @csc.to_s.length > 4 return false if !@csc.nil? && @csc.to_s.length < 3 return false if !@currency.nil? && @currency.to_s.length > 3 return false if !@currency.nil? && @currency.to_s.length < 3 return false if @identifier.nil? return false if @identifier.to_s.length > 50 return false if @identifier.to_s.length < 4 return false if !@initiation.nil? && @initiation.to_s.length > 1 return false if @merchantid.nil? return false if @token.nil? return false if !@trans_info.nil? && @trans_info.to_s.length > 50 return false if !@trans_type.nil? && @trans_type.to_s.length > 1 true end |