Class: CcbConnectClient::RefundResponse
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- CcbConnectClient::RefundResponse
- Defined in:
- lib/ccb_connect_client/models/refund_response.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#cust_id ⇒ Object
Returns the value of attribute cust_id.
-
#language ⇒ Object
Returns the value of attribute language.
-
#order_num ⇒ Object
Returns the value of attribute order_num.
-
#pay_amount ⇒ Object
Returns the value of attribute pay_amount.
-
#tx_code ⇒ Object
Returns the value of attribute tx_code.
Attributes inherited from BaseResponse
#request_sn, #return_code, #return_msg, #successful
Instance Method Summary collapse
- #from_xml(xml) ⇒ Object
-
#initialize ⇒ RefundResponse
constructor
A new instance of RefundResponse.
Methods inherited from BaseResponse
Constructor Details
#initialize ⇒ RefundResponse
Returns a new instance of RefundResponse.
9 10 11 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 9 def initialize super end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
7 8 9 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 7 def amount @amount end |
#cust_id ⇒ Object
Returns the value of attribute cust_id.
7 8 9 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 7 def cust_id @cust_id end |
#language ⇒ Object
Returns the value of attribute language.
7 8 9 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 7 def language @language end |
#order_num ⇒ Object
Returns the value of attribute order_num.
7 8 9 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 7 def order_num @order_num end |
#pay_amount ⇒ Object
Returns the value of attribute pay_amount.
7 8 9 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 7 def pay_amount @pay_amount end |
#tx_code ⇒ Object
Returns the value of attribute tx_code.
7 8 9 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 7 def tx_code @tx_code end |
Instance Method Details
#from_xml(xml) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ccb_connect_client/models/refund_response.rb', line 13 def from_xml xml response = RefundResponse.new doc = Document.new(xml) if CcbConnectClient.debug_mode puts "RefundResponse response xml: #{doc}" end 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 puts "RefundResponse response object: #{response.inspect}" end response end |