Sha256: e2efe7b6da3d7a37f84b08513aaad63db6c7c066e32574904d6992a717d07229

Contents?: true

Size: 1.6 KB

Versions: 5

Compression:

Stored size: 1.6 KB

Contents

# coding: utf-8

module Reapal
  module Api
    module Money
      module SubAccountQuery

        # 2.12 企业分账查询(API)
        #
        # @param sub_account_flow_id [ String ] 分账订单号
        # @param serial_no [ String ] 分账流水号(传空串表示该订单批量查询)
        #
        # @return [ Hash ] 结果集
        #   * :result [String] 业务结果:'S/F/P'
        #   * :request_params [Hash] 请求参数
        #   * :response [Object] 请求返回对象
        #   * :error_code [String] 错误代号
        #   * :error_msg [String] 错误信息
        #   * :data: 具体业务返回信息
        #       * :orderNO [String] 分账订单号
        #       * :subDetails [String]  分账明细
        #           * serialNo [String] 分账流水号
        #           * payeeContracts [String] 收款方协议号
        #           * amount [BigDecimal] 金额
        #           * remark [String] 备注
        #           * resultCode [String] 结果代码
        #       * :resultCode [String] 结果代码 0000:分账成功;0001 : 分账失败;0002:处理中
        #
        def sub_account_query(sub_account_flow_id, serial_no='')
          service = 'reapal.trust.subAccountQuery'
          post_path = '/reagw/service/depwit.htm'

          params = {
            orderNo: sub_account_flow_id,
            serialNo: serial_no,
            applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
          }

          operate_post(:query, service, params, post_path, Http::ErrorCode.sub_account_query, ['0000'])
        end

      end # module
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
reapal-0.9.5 lib/reapal/api/money/sub_account_query.rb
reapal-0.9.3 lib/reapal/api/money/sub_account_query.rb
reapal-0.9.2 lib/reapal/api/money/sub_account_query.rb
reapal-0.9.1 lib/reapal/api/money/sub_account_query.rb
reapal-0.9.0 lib/reapal/api/money/sub_account_query.rb