Class: CardConnect::Service::CaptureResponse
- Inherits:
-
Object
- Object
- CardConnect::Service::CaptureResponse
- Includes:
- Utils
- Defined in:
- lib/cardconnect/services/capture/capture_response.rb
Constant Summary collapse
- FIELDS =
[:merchid, :account, :amount, :retref, :setlstat, :respproc, :resptext, :commcard, :respstat, :respcode, :batchid, :token].freeze
- TXN_NOT_FOUND =
Settlement Statuses
'Txn not found'
- AUTHORIZED =
The Retref was not found
'Authorized'
- QUEUED =
Auth only, not captured
'Queued for Capture'
- ZERO_AMOUNT =
Queued for the Processor
'Zero Amount'
- ACCEPTED =
Capture (and Auth) were Voided
'Accepted'
- REJECTED =
Accepted by the Processor
'Rejected'
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response) ⇒ CaptureResponse
constructor
A new instance of CaptureResponse.
Methods included from Utils
#set_attributes, #symbolize_keys
Constructor Details
#initialize(response) ⇒ CaptureResponse
Returns a new instance of CaptureResponse.
20 21 22 |
# File 'lib/cardconnect/services/capture/capture_response.rb', line 20 def initialize(response) set_attributes(response, FIELDS) end |
Instance Method Details
#body ⇒ Object
24 25 26 |
# File 'lib/cardconnect/services/capture/capture_response.rb', line 24 def body FIELDS.collect{|attr| {attr => send(attr)} }.reduce({}, :merge) end |