package cas //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. //You may obtain a copy of the License at // //http://www.apache.org/licenses/LICENSE-2.0 // //Unless required by applicable law or agreed to in writing, software //distributed under the License is distributed on an "AS IS" BASIS, //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //See the License for the specific language governing permissions and //limitations under the License. // // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // DescribeOrderList invokes the cas.DescribeOrderList API synchronously // api document: https://help.aliyun.com/api/cas/describeorderlist.html func (client *Client) DescribeOrderList(request *DescribeOrderListRequest) (response *DescribeOrderListResponse, err error) { response = CreateDescribeOrderListResponse() err = client.DoAction(request, response) return } // DescribeOrderListWithChan invokes the cas.DescribeOrderList API asynchronously // api document: https://help.aliyun.com/api/cas/describeorderlist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeOrderListWithChan(request *DescribeOrderListRequest) (<-chan *DescribeOrderListResponse, <-chan error) { responseChan := make(chan *DescribeOrderListResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) response, err := client.DescribeOrderList(request) if err != nil { errChan <- err } else { responseChan <- response } }) if err != nil { errChan <- err close(responseChan) close(errChan) } return responseChan, errChan } // DescribeOrderListWithCallback invokes the cas.DescribeOrderList API asynchronously // api document: https://help.aliyun.com/api/cas/describeorderlist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeOrderListWithCallback(request *DescribeOrderListRequest, callback func(response *DescribeOrderListResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *DescribeOrderListResponse var err error defer close(result) response, err = client.DescribeOrderList(request) callback(response, err) result <- 1 }) if err != nil { defer close(result) callback(nil, err) result <- 0 } return result } // DescribeOrderListRequest is the request struct for api DescribeOrderList type DescribeOrderListRequest struct { *requests.RpcRequest SourceIp string `position:"Query" name:"SourceIp"` ShowSize requests.Integer `position:"Query" name:"ShowSize"` BrandId requests.Integer `position:"Query" name:"BrandId"` CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` Keyword string `position:"Query" name:"Keyword"` Lang string `position:"Query" name:"Lang"` Status string `position:"Query" name:"Status"` } // DescribeOrderListResponse is the response struct for api DescribeOrderList type DescribeOrderListResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` TotalCount int `json:"TotalCount" xml:"TotalCount"` ShowSize int `json:"ShowSize" xml:"ShowSize"` CurrentPage int `json:"CurrentPage" xml:"CurrentPage"` OrderList []Order `json:"OrderList" xml:"OrderList"` } // CreateDescribeOrderListRequest creates a request to invoke DescribeOrderList API func CreateDescribeOrderListRequest() (request *DescribeOrderListRequest) { request = &DescribeOrderListRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("cas", "2018-08-13", "DescribeOrderList", "cas_esign_fdd", "openAPI") return } // CreateDescribeOrderListResponse creates a response to parse from DescribeOrderList response func CreateDescribeOrderListResponse() (response *DescribeOrderListResponse) { response = &DescribeOrderListResponse{ BaseResponse: &responses.BaseResponse{}, } return }