Class: Kount::Update

Inherits:
Request show all
Defined in:
lib/kount/request/update.rb

Overview

This class extends the Request class and is used in the process of sending updates to an existing transaction generated by a previous Inquiry request.

Instance Attribute Summary

Attributes inherited from Request

#params

Instance Method Summary collapse

Methods inherited from Request

#add_params

Constructor Details

#initialize(initial_params = {}) ⇒ Update

Initialize an Update object

Example usage

{:MACK => "Y", :AUTH => "A"}

Parameters:

  • initial_params (Hash) (defaults to: {})

    Initial params for request



13
14
15
16
17
# File 'lib/kount/request/update.rb', line 13

def initialize(initial_params = {})
  super(initial_params)
  # Default to mode U unless mode X is explicitly set
  add_params(MODE: 'U') unless initial_params[:MODE] == 'X'
end

Instance Method Details

#prepare_params(version, merchant_id, response_format, ksalt) ⇒ Object

Parameters:

  • version (String)

    RIS version

  • merchant_id (String)

    Merchant ID

  • response_format (String)

    Response format (JSON)

  • ksalt (String)

    Kount supplied secret salt for KHASH



23
24
25
26
# File 'lib/kount/request/update.rb', line 23

def prepare_params(version, merchant_id, response_format, ksalt)
  super(version, merchant_id, response_format, ksalt)
  params
end