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 ⇒ Ingenico::Connect::SDK::Domain::Product::BoletoBancarioRequirednessValidator
The current value of boleto_bancario_requiredness.
-
#email_address ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
The current value of email_address.
-
#expiration_date ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
The current value of expiration_date.
-
#fixed_list ⇒ Ingenico::Connect::SDK::Domain::Product::FixedListValidator
The current value of fixed_list.
-
#iban ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
The current value of iban.
-
#length ⇒ Ingenico::Connect::SDK::Domain::Product::LengthValidator
The current value of length.
-
#luhn ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
The current value of luhn.
-
#range ⇒ Ingenico::Connect::SDK::Domain::Product::RangeValidator
The current value of range.
-
#regular_expression ⇒ Ingenico::Connect::SDK::Domain::Product::RegularExpressionValidator
The current value of regular_expression.
-
#terms_and_conditions ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
The current value of terms_and_conditions.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#boleto_bancario_requiredness ⇒ Ingenico::Connect::SDK::Domain::Product::BoletoBancarioRequirednessValidator
Returns the current value of boleto_bancario_requiredness.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def boleto_bancario_requiredness @boleto_bancario_requiredness end |
#email_address ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
Returns the current value of email_address.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def email_address @email_address end |
#expiration_date ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
Returns the current value of expiration_date.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def expiration_date @expiration_date end |
#fixed_list ⇒ Ingenico::Connect::SDK::Domain::Product::FixedListValidator
Returns the current value of fixed_list.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def fixed_list @fixed_list end |
#iban ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
Returns the current value of iban.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def iban @iban end |
#length ⇒ Ingenico::Connect::SDK::Domain::Product::LengthValidator
Returns the current value of length.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def length @length end |
#luhn ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
Returns the current value of luhn.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def luhn @luhn end |
#range ⇒ Ingenico::Connect::SDK::Domain::Product::RangeValidator
Returns the current value of range.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def range @range end |
#regular_expression ⇒ Ingenico::Connect::SDK::Domain::Product::RegularExpressionValidator
Returns the current value of regular_expression.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def regular_expression @regular_expression end |
#terms_and_conditions ⇒ Ingenico::Connect::SDK::Domain::Product::EmptyValidator
Returns the current value of terms_and_conditions.
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 27 def terms_and_conditions @terms_and_conditions end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 65 def from_hash(hash) super if hash.has_key? 'boletoBancarioRequiredness' raise TypeError, "value '%s' is not a Hash" % [hash['boletoBancarioRequiredness']] unless hash['boletoBancarioRequiredness'].is_a? Hash @boleto_bancario_requiredness = Ingenico::Connect::SDK::Domain::Product::BoletoBancarioRequirednessValidator.new_from_hash(hash['boletoBancarioRequiredness']) end if hash.has_key? 'emailAddress' raise TypeError, "value '%s' is not a Hash" % [hash['emailAddress']] unless hash['emailAddress'].is_a? Hash @email_address = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['emailAddress']) end if hash.has_key? 'expirationDate' raise TypeError, "value '%s' is not a Hash" % [hash['expirationDate']] unless hash['expirationDate'].is_a? Hash @expiration_date = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['expirationDate']) end if hash.has_key? 'fixedList' raise TypeError, "value '%s' is not a Hash" % [hash['fixedList']] unless hash['fixedList'].is_a? Hash @fixed_list = Ingenico::Connect::SDK::Domain::Product::FixedListValidator.new_from_hash(hash['fixedList']) end if hash.has_key? 'iban' raise TypeError, "value '%s' is not a Hash" % [hash['iban']] unless hash['iban'].is_a? Hash @iban = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['iban']) end if hash.has_key? 'length' raise TypeError, "value '%s' is not a Hash" % [hash['length']] unless hash['length'].is_a? Hash @length = Ingenico::Connect::SDK::Domain::Product::LengthValidator.new_from_hash(hash['length']) end if hash.has_key? 'luhn' raise TypeError, "value '%s' is not a Hash" % [hash['luhn']] unless hash['luhn'].is_a? Hash @luhn = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['luhn']) end if hash.has_key? 'range' raise TypeError, "value '%s' is not a Hash" % [hash['range']] unless hash['range'].is_a? Hash @range = Ingenico::Connect::SDK::Domain::Product::RangeValidator.new_from_hash(hash['range']) end if hash.has_key? 'regularExpression' raise TypeError, "value '%s' is not a Hash" % [hash['regularExpression']] unless hash['regularExpression'].is_a? Hash @regular_expression = Ingenico::Connect::SDK::Domain::Product::RegularExpressionValidator.new_from_hash(hash['regularExpression']) end if hash.has_key? 'termsAndConditions' raise TypeError, "value '%s' is not a Hash" % [hash['termsAndConditions']] unless hash['termsAndConditions'].is_a? Hash @terms_and_conditions = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['termsAndConditions']) end end |
#to_h ⇒ Hash
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_validators.rb', line 50 def to_h hash = super hash['boletoBancarioRequiredness'] = @boleto_bancario_requiredness.to_h unless @boleto_bancario_requiredness.nil? hash['emailAddress'] = @email_address.to_h unless @email_address.nil? hash['expirationDate'] = @expiration_date.to_h unless @expiration_date.nil? hash['fixedList'] = @fixed_list.to_h unless @fixed_list.nil? hash['iban'] = @iban.to_h unless @iban.nil? hash['length'] = @length.to_h unless @length.nil? hash['luhn'] = @luhn.to_h unless @luhn.nil? hash['range'] = @range.to_h unless @range.nil? hash['regularExpression'] = @regular_expression.to_h unless @regular_expression.nil? hash['termsAndConditions'] = @terms_and_conditions.to_h unless @terms_and_conditions.nil? hash end |