cn.felord.payment.wechat.v3

## 类 WechatPayClient.Executor<M>

- java.lang.Object
- - cn.felord.payment.wechat.v3.WechatPayClient.Executor<M>

类型参数:
  `M` - the type parameter

封闭类:
  WechatPayClient

    public static class WechatPayClient.Executor<M>
    extends Object

The type Executor.

从以下版本开始:
  1.0.0.RELEASE
作者:
  felord.cn

### 字段概要

字段
`private M` `model` The Model.
`private BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>>` `requestEntityBiFunction` The Request entity bi function.
`private Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>>` `responseBodyConsumer` The Response body consumer.
`private org.springframework.web.client.RestOperations` `restOperations` The Rest operations.
`private SignatureProvider` `signatureProvider` The Signature provider.
`private WechatPayV3Type` `wechatPayV3Type` The V3 pay type.

### 构造器概要

构造器
构造器和说明
`Executor(WechatPayV3Type wechatPayV3Type, M model, SignatureProvider signatureProvider, org.springframework.web.client.RestOperations restOperations)` Instantiates a new Executor.

### 方法概要

所有方法 实例方法 具体方法
`WechatPayClient.Executor<M>` `consumer(Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer)` Consumer executor.
`private <T> String` `doDownload(WechatRequestEntity<T> requestEntity)` 下载文件返回的是字符串类型的.
`private <T> void` `doExecute(WechatRequestEntity<T> requestEntity)` Do execute.
`private <T> org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>` `doResource(WechatRequestEntity<T> requestEntity)` 下载文件返回的是流类型的.
`String` `download()` Download string.
`WechatPayClient.Executor<M>` `function(BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction)` Function executor.
`private <T> WechatRequestEntity<T>` `header(WechatRequestEntity<T> requestEntity)` 构造私钥签名.
`void` `request()` Request.
`protected org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>` `resource()` Download string.

### 从类继承的方法 java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 字段详细资料

#### wechatPayV3Type

    private final WechatPayV3Type wechatPayV3Type

The V3 pay type.

#### restOperations

    private final org.springframework.web.client.RestOperations restOperations

The Rest operations.

#### signatureProvider

    private final SignatureProvider signatureProvider

The Signature provider.

#### model

    private final M model

The Model.

#### requestEntityBiFunction

    private BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction

The Request entity bi function.

#### responseBodyConsumer

    private Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer

The Response body consumer.

### 构造器详细资料

#### Executor

    Executor(WechatPayV3Type wechatPayV3Type,
             M model,
             SignatureProvider signatureProvider,
             org.springframework.web.client.RestOperations restOperations)

Instantiates a new Executor.

参数:
  `wechatPayV3Type` - the v 3 pay type
  `model` - the model
  `signatureProvider` - the signature provider
  `restOperations` - the rest operations

### 方法详细资料

#### function

    public WechatPayClient.Executor<M> function(BiFunction<WechatPayV3Type,M,org.springframework.http.RequestEntity<?>> requestEntityBiFunction)

Function executor.

参数:
  `requestEntityBiFunction` - the request entity bifunction
返回:
  the executor

#### consumer

    public WechatPayClient.Executor<M> consumer(Consumer<org.springframework.http.ResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>> responseBodyConsumer)

Consumer executor.

参数:
  `responseBodyConsumer` - the response body consumer
返回:
  the executor

#### request

    public void request()

Request.

#### download

    public String download()

Download string.

返回:
  the string

#### resource

    protected org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> resource()

Download string.

返回:
  the string
从以下版本开始:
  1.0.6.RELEASE

#### header

    private <T> WechatRequestEntity<T> header(WechatRequestEntity<T> requestEntity)

构造私钥签名.

类型参数:
  `T` - the type parameter
参数:
  `requestEntity` - the request entity
返回:
  the wechat request entity

#### doExecute

    private <T> void doExecute(WechatRequestEntity<T> requestEntity)

Do execute.

类型参数:
  `T` - the type parameter
参数:
  `requestEntity` - the request entity

#### doDownload

    private <T> String doDownload(WechatRequestEntity<T> requestEntity)

下载文件返回的是字符串类型的.

类型参数:
  `T` - the type parameter
参数:
  `requestEntity` - the request entity
返回:
  the string

#### doResource

    private <T> org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> doResource(WechatRequestEntity<T> requestEntity)

下载文件返回的是流类型的.

类型参数:
  `T` - the type parameter
参数:
  `requestEntity` - the request entity
返回:
  the resource
从以下版本开始:
  1.0.6.RELEASE