Class: Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldValidators
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldValidators
- Defined in:
- lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb
Instance Attribute Summary collapse
- #boleto_bancario_requiredness ⇒ Object
- #email_address ⇒ Object
- #expiration_date ⇒ Object
- #fixed_list ⇒ Object
- #length ⇒ Object
- #luhn ⇒ Object
- #range ⇒ Object
- #regular_expression ⇒ Object
- #terms_and_conditions ⇒ Object
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#boleto_bancario_requiredness ⇒ Object
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 20 def boleto_bancario_requiredness @boleto_bancario_requiredness end |
#email_address ⇒ Object
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 23 def email_address @email_address end |
#expiration_date ⇒ Object
26 27 28 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 26 def expiration_date @expiration_date end |
#fixed_list ⇒ Object
29 30 31 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 29 def fixed_list @fixed_list end |
#length ⇒ Object
32 33 34 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 32 def length @length end |
#luhn ⇒ Object
35 36 37 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 35 def luhn @luhn end |
#range ⇒ Object
38 39 40 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 38 def range @range end |
#regular_expression ⇒ Object
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 41 def regular_expression @regular_expression end |
#terms_and_conditions ⇒ Object
44 45 46 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 44 def terms_and_conditions @terms_and_conditions end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 60 def from_hash(hash) super if hash.has_key?('boletoBancarioRequiredness') if !(hash['boletoBancarioRequiredness'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['boletoBancarioRequiredness']] end @boleto_bancario_requiredness = Ingenico::Connect::SDK::Domain::Product::BoletoBancarioRequirednessValidator.new_from_hash(hash['boletoBancarioRequiredness']) end if hash.has_key?('emailAddress') if !(hash['emailAddress'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['emailAddress']] end @email_address = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['emailAddress']) end if hash.has_key?('expirationDate') if !(hash['expirationDate'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['expirationDate']] end @expiration_date = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['expirationDate']) end if hash.has_key?('fixedList') if !(hash['fixedList'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['fixedList']] end @fixed_list = Ingenico::Connect::SDK::Domain::Product::FixedListValidator.new_from_hash(hash['fixedList']) end if hash.has_key?('length') if !(hash['length'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['length']] end @length = Ingenico::Connect::SDK::Domain::Product::LengthValidator.new_from_hash(hash['length']) end if hash.has_key?('luhn') if !(hash['luhn'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['luhn']] end @luhn = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['luhn']) end if hash.has_key?('range') if !(hash['range'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['range']] end @range = Ingenico::Connect::SDK::Domain::Product::RangeValidator.new_from_hash(hash['range']) end if hash.has_key?('regularExpression') if !(hash['regularExpression'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['regularExpression']] end @regular_expression = Ingenico::Connect::SDK::Domain::Product::RegularExpressionValidator.new_from_hash(hash['regularExpression']) end if hash.has_key?('termsAndConditions') if !(hash['termsAndConditions'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['termsAndConditions']] end @terms_and_conditions = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['termsAndConditions']) end end |
#to_h ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 46 def to_h hash = super add_to_hash(hash, 'boletoBancarioRequiredness', @boleto_bancario_requiredness) add_to_hash(hash, 'emailAddress', @email_address) add_to_hash(hash, 'expirationDate', @expiration_date) add_to_hash(hash, 'fixedList', @fixed_list) add_to_hash(hash, 'length', @length) add_to_hash(hash, 'luhn', @luhn) add_to_hash(hash, 'range', @range) add_to_hash(hash, 'regularExpression', @regular_expression) add_to_hash(hash, 'termsAndConditions', @terms_and_conditions) hash end |