Class: Worldline::Connect::SDK::V1::Domain::PaymentProductFieldValidators

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#boleto_bancario_requirednessWorldline::Connect::SDK::V1::Domain::BoletoBancarioRequirednessValidator

Returns the current value of boleto_bancario_requiredness.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def boleto_bancario_requiredness
  @boleto_bancario_requiredness
end

#email_addressWorldline::Connect::SDK::V1::Domain::EmptyValidator

Returns the current value of email_address.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def email_address
  @email_address
end

#expiration_dateWorldline::Connect::SDK::V1::Domain::EmptyValidator

Returns the current value of expiration_date.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def expiration_date
  @expiration_date
end

#fixed_listWorldline::Connect::SDK::V1::Domain::FixedListValidator

Returns the current value of fixed_list.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def fixed_list
  @fixed_list
end

#ibanWorldline::Connect::SDK::V1::Domain::EmptyValidator

Returns the current value of iban.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def iban
  @iban
end

#lengthWorldline::Connect::SDK::V1::Domain::LengthValidator

Returns the current value of length.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def length
  @length
end

#luhnWorldline::Connect::SDK::V1::Domain::EmptyValidator

Returns the current value of luhn.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def luhn
  @luhn
end

#rangeWorldline::Connect::SDK::V1::Domain::RangeValidator

Returns the current value of range.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def range
  @range
end

#regular_expressionWorldline::Connect::SDK::V1::Domain::RegularExpressionValidator

Returns the current value of regular_expression.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def regular_expression
  @regular_expression
end

#resident_id_numberWorldline::Connect::SDK::V1::Domain::EmptyValidator

Returns the current value of resident_id_number.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def resident_id_number
  @resident_id_number
end

#terms_and_conditionsWorldline::Connect::SDK::V1::Domain::EmptyValidator

Returns the current value of terms_and_conditions.

Returns:



29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 29

def terms_and_conditions
  @terms_and_conditions
end

Instance Method Details

#from_hash(hash) ⇒ Object



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/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 70

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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::RegularExpressionValidator.new_from_hash(hash['regularExpression'])
  end
  if hash.has_key? 'residentIdNumber'
    raise TypeError, "value '%s' is not a Hash" % [hash['residentIdNumber']] unless hash['residentIdNumber'].is_a? Hash
    @resident_id_number = Worldline::Connect::SDK::V1::Domain::EmptyValidator.new_from_hash(hash['residentIdNumber'])
  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 = Worldline::Connect::SDK::V1::Domain::EmptyValidator.new_from_hash(hash['termsAndConditions'])
  end
end

#to_hHash

Returns:

  • (Hash)


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field_validators.rb', line 54

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['residentIdNumber'] = @resident_id_number.to_h unless @resident_id_number.nil?
  hash['termsAndConditions'] = @terms_and_conditions.to_h unless @terms_and_conditions.nil?
  hash
end