Class: Hps::HpsGiftCardAlias
- Inherits:
-
HpsTransaction
- Object
- HpsTransaction
- Hps::HpsGiftCardAlias
- Defined in:
- lib/hps/entities/hps_gift_card.rb
Overview
= HpsGiftCardAlias =
====================
Instance Attribute Summary collapse
-
#gift_card ⇒ Object
Returns the value of attribute gift_card.
Attributes inherited from HpsTransaction
#reference_number, #response_code, #response_text, #transaction_header, #transaction_id
Class Method Summary collapse
Methods inherited from HpsTransaction
Constructor Details
This class inherits a constructor from Hps::HpsTransaction
Instance Attribute Details
#gift_card ⇒ Object
Returns the value of attribute gift_card.
119 120 121 |
# File 'lib/hps/entities/hps_gift_card.rb', line 119 def gift_card @gift_card end |
Class Method Details
.from_response(response, txn_type) ⇒ Object
121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/hps/entities/hps_gift_card.rb', line 121 def self.from_response(response, txn_type) alias_response = response['Transaction'][txn_type] alias_item = HpsGiftCardAlias.new alias_item.transaction_id = response['Header']['GatewayTxnId'] alias_item.gift_card = HpsGiftCard.new(alias_response['CardData']) alias_item.response_code = alias_response['RspCode'] alias_item.response_text = alias_response['RspText'] return alias_item end |