class Hps::HpsGiftCardActivate
¶ ↑
HpsGiftCardActivate
=¶ ↑
¶ ↑
Attributes
balance_amount[RW]
Values used in the card activate response
notes[RW]
Notes contain reward messages to be displayed on a receipt, mobile app, or web page to inform an account holder about special rewards or promotions available on their account
points_balance_amount[RW]
Values used in the card activate response
rewards[RW]
The rewards (dollars or points) added to the account as a result of the transaction
Public Class Methods
from_response(response, txn_type, return_type = nil)
click to toggle source
# File lib/hps/entities/hps_gift_card.rb, line 30 def self.from_response(response, txn_type, return_type = nil) activation_response = response['Transaction'][txn_type] activation = return_type ? return_type.constantize.new : self.new activation.transaction_id = response['Header']['GatewayTxnId'] activation.authorization_code = activation_response['AuthCode'] activation.balance_amount = activation_response['BalanceAmt'] activation.points_balance_amount = activation_response['PointsBalanceAmt'] activation.rewards = activation_response['Rewards'] activation.notes = activation_response['Notes'] activation.response_code = activation_response['RspCode'] activation.response_text = activation_response['RspText'] return activation end