Class: OnlinePayments::SDK::Domain::PaymentProductFieldValidators
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::PaymentProductFieldValidators
- Defined in:
- lib/onlinepayments/sdk/domain/payment_product_field_validators.rb
Instance Attribute Summary collapse
-
#email_address ⇒ OnlinePayments::SDK::Domain::EmptyValidator
The current value of email_address.
-
#expiration_date ⇒ OnlinePayments::SDK::Domain::EmptyValidator
The current value of expiration_date.
-
#fixed_list ⇒ OnlinePayments::SDK::Domain::FixedListValidator
The current value of fixed_list.
-
#iban ⇒ OnlinePayments::SDK::Domain::EmptyValidator
The current value of iban.
-
#length ⇒ OnlinePayments::SDK::Domain::LengthValidator
The current value of length.
-
#luhn ⇒ OnlinePayments::SDK::Domain::EmptyValidator
The current value of luhn.
-
#range ⇒ OnlinePayments::SDK::Domain::RangeValidator
The current value of range.
-
#regular_expression ⇒ OnlinePayments::SDK::Domain::RegularExpressionValidator
The current value of regular_expression.
-
#terms_and_conditions ⇒ OnlinePayments::SDK::Domain::EmptyValidator
The current value of terms_and_conditions.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#email_address ⇒ OnlinePayments::SDK::Domain::EmptyValidator
Returns the current value of email_address.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def email_address @email_address end |
#expiration_date ⇒ OnlinePayments::SDK::Domain::EmptyValidator
Returns the current value of expiration_date.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def expiration_date @expiration_date end |
#fixed_list ⇒ OnlinePayments::SDK::Domain::FixedListValidator
Returns the current value of fixed_list.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def fixed_list @fixed_list end |
#iban ⇒ OnlinePayments::SDK::Domain::EmptyValidator
Returns the current value of iban.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def iban @iban end |
#length ⇒ OnlinePayments::SDK::Domain::LengthValidator
Returns the current value of length.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def length @length end |
#luhn ⇒ OnlinePayments::SDK::Domain::EmptyValidator
Returns the current value of luhn.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def luhn @luhn end |
#range ⇒ OnlinePayments::SDK::Domain::RangeValidator
Returns the current value of range.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def range @range end |
#regular_expression ⇒ OnlinePayments::SDK::Domain::RegularExpressionValidator
Returns the current value of regular_expression.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def regular_expression @regular_expression end |
#terms_and_conditions ⇒ OnlinePayments::SDK::Domain::EmptyValidator
Returns the current value of terms_and_conditions.
23 24 25 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 23 def terms_and_conditions @terms_and_conditions end |
Instance Method Details
#from_hash(hash) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 49 def from_hash(hash) super if hash.key? 'emailAddress' raise TypeError, "value '%s' is not a Hash" % [hash['emailAddress']] unless hash['emailAddress'].is_a? Hash @email_address = OnlinePayments::SDK::Domain::EmptyValidator.new_from_hash(hash['emailAddress']) end if hash.key? 'expirationDate' raise TypeError, "value '%s' is not a Hash" % [hash['expirationDate']] unless hash['expirationDate'].is_a? Hash @expiration_date = OnlinePayments::SDK::Domain::EmptyValidator.new_from_hash(hash['expirationDate']) end if hash.key? 'fixedList' raise TypeError, "value '%s' is not a Hash" % [hash['fixedList']] unless hash['fixedList'].is_a? Hash @fixed_list = OnlinePayments::SDK::Domain::FixedListValidator.new_from_hash(hash['fixedList']) end if hash.key? 'iban' raise TypeError, "value '%s' is not a Hash" % [hash['iban']] unless hash['iban'].is_a? Hash @iban = OnlinePayments::SDK::Domain::EmptyValidator.new_from_hash(hash['iban']) end if hash.key? 'length' raise TypeError, "value '%s' is not a Hash" % [hash['length']] unless hash['length'].is_a? Hash @length = OnlinePayments::SDK::Domain::LengthValidator.new_from_hash(hash['length']) end if hash.key? 'luhn' raise TypeError, "value '%s' is not a Hash" % [hash['luhn']] unless hash['luhn'].is_a? Hash @luhn = OnlinePayments::SDK::Domain::EmptyValidator.new_from_hash(hash['luhn']) end if hash.key? 'range' raise TypeError, "value '%s' is not a Hash" % [hash['range']] unless hash['range'].is_a? Hash @range = OnlinePayments::SDK::Domain::RangeValidator.new_from_hash(hash['range']) end if hash.key? 'regularExpression' raise TypeError, "value '%s' is not a Hash" % [hash['regularExpression']] unless hash['regularExpression'].is_a? Hash @regular_expression = OnlinePayments::SDK::Domain::RegularExpressionValidator.new_from_hash(hash['regularExpression']) end if hash.key? 'termsAndConditions' raise TypeError, "value '%s' is not a Hash" % [hash['termsAndConditions']] unless hash['termsAndConditions'].is_a? Hash @terms_and_conditions = OnlinePayments::SDK::Domain::EmptyValidator.new_from_hash(hash['termsAndConditions']) end end |
#to_h ⇒ Hash
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/onlinepayments/sdk/domain/payment_product_field_validators.rb', line 35 def to_h hash = super hash['emailAddress'] = @email_address.to_h if @email_address hash['expirationDate'] = @expiration_date.to_h if @expiration_date hash['fixedList'] = @fixed_list.to_h if @fixed_list hash['iban'] = @iban.to_h if @iban hash['length'] = @length.to_h if @length hash['luhn'] = @luhn.to_h if @luhn hash['range'] = @range.to_h if @range hash['regularExpression'] = @regular_expression.to_h if @regular_expression hash['termsAndConditions'] = @terms_and_conditions.to_h if @terms_and_conditions hash end |