class CcbConnectClient::RefundResponse

Attributes

amount[RW]
cust_id[RW]
language[RW]
order_num[RW]
pay_amount[RW]
tx_code[RW]

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/ccb_connect_client/models/refund_response.rb, line 9
def initialize
  super
end

Public Instance Methods

from_xml(xml) click to toggle source
# File lib/ccb_connect_client/models/refund_response.rb, line 13
def from_xml xml
  response = RefundResponse.new
  doc = Document.new(xml)

  response.request_sn = doc.elements["TX/REQUEST_SN"].text
  response.cust_id = doc.elements["TX/CUST_ID"].text
  response.tx_code = doc.elements["TX/TX_CODE"].text
  response.return_code = doc.elements["TX/RETURN_CODE"].text
  response.return_msg = doc.elements["TX/RETURN_MSG"].text
  response.language = doc.elements["TX/LANGUAGE"].text
  # INFO
  response.order_num = doc.elements["TX/TX_INFO/ORDER_NUM"].text
  response.pay_amount = doc.elements["TX/TX_INFO/PAY_AMOUNT"].text
  response.amount = doc.elements["TX/TX_INFO/AMOUNT"].text

  if CcbConnectClient.debug_mode && CcbConnectClient.logger
    CcbConnectClient.logger.debug("RefundResponse response object : #{response.inspect}")
  end
  response
end