Class: CcbConnectClient::PaymentDetailsQueryResponse
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- CcbConnectClient::PaymentDetailsQueryResponse
- Defined in:
- lib/ccb_connect_client/models/payment_details_query_response.rb
Instance Attribute Summary collapse
-
#acc_date ⇒ Object
Returns the value of attribute acc_date.
-
#acc_name ⇒ Object
Returns the value of attribute acc_name.
-
#account ⇒ Object
Returns the value of attribute account.
-
#cur_page ⇒ Object
Returns the value of attribute cur_page.
-
#cust_id ⇒ Object
Returns the value of attribute cust_id.
-
#language ⇒ Object
Returns the value of attribute language.
-
#notice ⇒ Object
Returns the value of attribute notice.
-
#order ⇒ Object
Returns the value of attribute order.
-
#order_status ⇒ Object
Returns the value of attribute order_status.
-
#order_status_name ⇒ Object
Returns the value of attribute order_status_name.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#payment_money ⇒ Object
Returns the value of attribute payment_money.
-
#pos_id ⇒ Object
Returns the value of attribute pos_id.
-
#refund_money ⇒ Object
Returns the value of attribute refund_money.
-
#rem1 ⇒ Object
Returns the value of attribute rem1.
-
#tran_date ⇒ Object
Returns the value of attribute tran_date.
-
#tx_code ⇒ Object
Returns the value of attribute tx_code.
Attributes inherited from BaseResponse
#request_sn, #return_code, #return_msg, #successful
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ PaymentDetailsQueryResponse
constructor
A new instance of PaymentDetailsQueryResponse.
Constructor Details
#initialize ⇒ PaymentDetailsQueryResponse
Returns a new instance of PaymentDetailsQueryResponse.
11 12 13 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 11 def initialize super end |
Instance Attribute Details
#acc_date ⇒ Object
Returns the value of attribute acc_date.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def acc_date @acc_date end |
#acc_name ⇒ Object
Returns the value of attribute acc_name.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def acc_name @acc_name end |
#account ⇒ Object
Returns the value of attribute account.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def account @account end |
#cur_page ⇒ Object
Returns the value of attribute cur_page.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def cur_page @cur_page end |
#cust_id ⇒ Object
Returns the value of attribute cust_id.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def cust_id @cust_id end |
#language ⇒ Object
Returns the value of attribute language.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def language @language end |
#notice ⇒ Object
Returns the value of attribute notice.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def notice @notice end |
#order ⇒ Object
Returns the value of attribute order.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def order @order end |
#order_status ⇒ Object
Returns the value of attribute order_status.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def order_status @order_status end |
#order_status_name ⇒ Object
Returns the value of attribute order_status_name.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def order_status_name @order_status_name end |
#page_count ⇒ Object
Returns the value of attribute page_count.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def page_count @page_count end |
#payment_money ⇒ Object
Returns the value of attribute payment_money.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def payment_money @payment_money end |
#pos_id ⇒ Object
Returns the value of attribute pos_id.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def pos_id @pos_id end |
#refund_money ⇒ Object
Returns the value of attribute refund_money.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def refund_money @refund_money end |
#rem1 ⇒ Object
Returns the value of attribute rem1.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def rem1 @rem1 end |
#tran_date ⇒ Object
Returns the value of attribute tran_date.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def tran_date @tran_date end |
#tx_code ⇒ Object
Returns the value of attribute tx_code.
8 9 10 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 8 def tx_code @tx_code end |
Class Method Details
.from_xml(xml) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/ccb_connect_client/models/payment_details_query_response.rb', line 15 def self.from_xml xml response = PaymentDetailsQueryResponse.new doc = Document.new(xml) if CcbConnectClient.debug_mode puts "RefundResponse response : #{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.cur_page = doc.elements["TX/TX_INFO/CUR_PAGE"].text response.page_count = doc.elements["TX/TX_INFO/PAGE_COUNT"].text # LIST response.tran_date = doc.elements["TX/TX_INFO/LIST/TRAN_DATE"].text response.acc_date = doc.elements["TX/TX_INFO/LIST/ACC_DATE"].text response.order = doc.elements["TX/TX_INFO/LIST/ORDER"].text response.account = doc.elements["TX/TX_INFO/LIST/ACCOUNT"].text response.acc_name = doc.elements["TX/TX_INFO/LIST/ACC_NAME"].text response.payment_money = doc.elements["TX/TX_INFO/LIST/PAYMENT_MONEY"].text response.refund_money = doc.elements["TX/TX_INFO/LIST/REFUND_MONEY"].text response.pos_id = doc.elements["TX/TX_INFO/LIST/POS_ID"].text response.rem1 = doc.elements["TX/TX_INFO/LIST/REM1"].text response.order_status = doc.elements["TX/TX_INFO/LIST/ORDER_STATUS"].text case response.order_status when '0' response.order_status_name = "失败" when '1' response.order_status_name = "成功" when '2' response.order_status_name = "待银行确认" when '3' response.order_status_name = "已部分退款" when '4' response.order_status_name = "已全额退款" else response.order_status_name = "待银行确认" end if CcbConnectClient.debug_mode puts "RefundResponse response : #{response.inspect}" end response end |