Class: MPIClient::Verification::Request

Inherits:
BaseRequest show all
Defined in:
lib/mpi_client/verification/request.rb

Constant Summary collapse

PARAMS_MAP =
{
  'AccountId'       => :account_id,
  'Amount'          => :amount,     #in cents
  'CardNumber'      => :card_number,
  'Description'     => :description,
  'DisplayAmount'   => :display_amount,
  'CurrencyCode'    => :currency,
  'ExpY'            => :exp_year,
  'ExpM'            => :exp_month,
  'URL'             => :termination_url,
}
REQUEST_TYPE =
'vereq'
FILTERED_FIELDS =
%w(Password)

Instance Attribute Summary collapse

Attributes inherited from BaseRequest

#connection

Instance Method Summary collapse

Constructor Details

#initialize(options, transaction_id) ⇒ Request

Returns a new instance of Request.



21
22
23
24
# File 'lib/mpi_client/verification/request.rb', line 21

def initialize(options, transaction_id)
  @options, @transaction_id = options, transaction_id
  super()
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



19
20
21
# File 'lib/mpi_client/verification/request.rb', line 19

def options
  @options
end

#transaction_idObject (readonly)

Returns the value of attribute transaction_id.



19
20
21
# File 'lib/mpi_client/verification/request.rb', line 19

def transaction_id
  @transaction_id
end

Instance Method Details

#processObject



26
27
28
# File 'lib/mpi_client/verification/request.rb', line 26

def process
  Response.parse(post(build_xml))
end