Class: PaymentCardValidationRule

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/linerb/gen-rb/takagi_chan_types.rb,
lib/linerb/gen-rb/takagi_chan_types.rb

Constant Summary collapse

REGEX =
2
GROUPING =
3
MAXLENGTH =
4
CARDBRANDNAME =
5
SECURITYCODEHELP =
6
CARDBRAND =
7
FIELDS =
{
  REGEX => {:type => ::Thrift::Types::STRING, :name => 'regex'},
  GROUPING => {:type => ::Thrift::Types::STRING, :name => 'grouping'},
  MAXLENGTH => {:type => ::Thrift::Types::I32, :name => 'maxLength'},
  CARDBRANDNAME => {:type => ::Thrift::Types::STRING, :name => 'cardBrandName'},
  SECURITYCODEHELP => {:type => ::Thrift::Types::STRING, :name => 'securityCodeHelp'},
  CARDBRAND => {:type => ::Thrift::Types::I32, :name => 'cardBrand', :enum_class => ::G_a_b_z0_a_d_k0}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



8633
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 8633

def struct_fields; FIELDS; end

#validateObject



8635
8636
8637
8638
8639
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 8635

def validate
  unless @cardBrand.nil? || ::G_a_b_z0_a_d_k0::VALID_VALUES.include?(@cardBrand)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field cardBrand!')
  end
end