查询 Batch Transfer 对象列表

你可以使用调用该接口来查询对应的 batch transfer 对象列表信息。

请求参数描述
page optional int页码,取值范围:1~1000000000;默认值为"1"。
per_page optional int每页数量,取值范围:1~100;默认值为"10"。
created[gt] optional int创建时间大于该值。
created[gte] optional int创建时间大于或等于该值。
created[lt] optional int创建时间小于该值。
created[lte] optional int创建时间小于或等于该值。
app optional string批量企业付款对应的 app 对象 ID,查看如何获取App ID

返回

返回一个 batch transfer 对象列表或者一个错误,详见 错误

定义

GET https://api.pingxx.com/v1/batch_transfers?app={app_id}
$batch_tr_all = \Pingpp\BatchTransfer::all($search_params);
public void list();
此语言 SDK 暂不支持该接口。
pingpp.batchTransfers.list();
此语言 SDK 暂不支持该接口。
func ExampleBatchTransfer_list();
BatchTransfer.List(listParams);

请求示例

curl https://api.pingxx.com/v1/batch_transfers?app=app_ribgW1n2SOqcPxn1&per_page=3 \
-H "Pingplusplus-Signature: SIGNATURE" \
-H "Pingplusplus-Request-Timestamp: 1476067095" \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:
$search_params = [              //搜索条件,此数组可以为空
    'page'      => 1,           //页码,取值范围:1~1000000000;默认值为"1"
    'per_page'  => 2            //每页数量,取值范围:1~100;默认值为"20"
];
try {
    $batch_tr_all = \Pingpp\BatchTransfer::all($search_params);
    echo $batch_tr_all;                                                     // 输出 Ping++ 返回的 batch transfer 对象列表
} catch (\Pingpp\Error\Base $e) {
    if ($e->getHttpStatus() != null) {
        header('Status: ' . $e->getHttpStatus());
        echo $e->getHttpBody();
    } else {
        echo $e->getMessage();
    }
}
public void list() {
    Map<String, Object> parm = new HashMap<String, Object>();
    parm.put("per_page", 3);

    try {
        BatchTransferCollection objs = BatchTransfer.list(parm);
        System.out.println(objs);
    } catch (AuthenticationException e) {
        e.printStackTrace();
    } catch (InvalidRequestException e) {
        e.printStackTrace();
    } catch (APIConnectionException e) {
        e.printStackTrace();
    } catch (APIException e) {
        e.printStackTrace();
    } catch (ChannelException e) {
        e.printStackTrace();
    } catch (RateLimitException e) {
        e.printStackTrace();
    }
  }
}
此语言 SDK 暂不支持该接口。
pingpp.batchTransfers.list(
  { page: 1, per_page: 3 },
  function(err, transfers) {
    if (err != null) {
      console.log("pingpp.batchTransfers.list fail:", err);
    }
    // YOUR CODE
  }
);
此语言 SDK 暂不支持该接口。
func ExampleBatchTransfer_list() {
  params := &pingpp.PagingParams{}
  params.Filters.AddFilter("page", "", "1")
  params.Filters.AddFilter("per_page", "", "2")
  params.Filters.AddFilter("app", "", "app_1Gqj58ynP0mHeX1q")
  batchTransferList, err := batchTransfer.List(params)
  if err != nil {
    log.Fatal(err)
    return
  }
  content, _ := json.Marshal(batchTransferList)
  fmt.Println(string(content))
}
BatchTransfer.List(listParams);

返回示例

{
    "object": "list",
    "url": "/v1/batch_transfers",
    "has_more": true,
    "data": [
        {
            "id": "181610101014367590",
            "object": "batch_transfer",
            "app": "app_ribgW1n2SOqcPxn1",
            "amount": 8000,
            "batch_no": "2016101010380007",
            "channel": "alipay",
            "currency": "cny",
            "created": 1476067087,
            "description": "付款说明",
            "extra": {},
            "failure_msg": null,
            "fee": 0,
            "livemode": true,
            "metadata": {},
            "recipients": [
                {
                    "account": "account01@alipay.com",
                    "amount": 5000,
                    "name": "张三",
                    "transfer": "tr_jHWfvDnTKG0SiPmbfPbHW1eH",
                    "status": "pending"
                },
                {
                    "account": "account02@alipay.com",
                    "amount": 3000,
                    "name": "李四",
                    "transfer": "tr_8u1yPK1eHWv9D08OePzDe1CK",
                    "status": "pending"
                }
            ],
            "status": "pending",
            "time_succeeded": null,
            "type": "b2c"
        },
        {...},
        {...}
    ]
}