Class: Aliquot::Validator::PaymentMethodDetailsValidator
- Inherits:
-
Object
- Object
- Aliquot::Validator::PaymentMethodDetailsValidator
- Includes:
- InstanceMethods
- Defined in:
- lib/aliquot/validator.rb
Overview
Class for validating the encryptedMessage component of a Google Pay token
Defined Under Namespace
Classes: Error
Instance Attribute Summary
Attributes included from InstanceMethods
Instance Method Summary collapse
-
#initialize(input, version, tokenized) ⇒ PaymentMethodDetailsValidator
constructor
A new instance of PaymentMethodDetailsValidator.
Methods included from InstanceMethods
#error_list, #errors, #valid?, #validate
Constructor Details
#initialize(input, version, tokenized) ⇒ PaymentMethodDetailsValidator
Returns a new instance of PaymentMethodDetailsValidator.
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/aliquot/validator.rb', line 327 def initialize(input, version, tokenized) @input = input @schema = if version == 'ECv1' if tokenized Aliquot::Validator::ECv1_TokenizedPaymentMethodDetailsContract.new else Aliquot::Validator::ECv1_PaymentMethodDetailsContract.new end else if tokenized Aliquot::Validator::ECv2_TokenizedPaymentMethodDetailsContract.new else Aliquot::Validator::ECv2_PaymentMethodDetailsContract.new end end end |