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" ) // DescribeOrderMaterial invokes the cas.DescribeOrderMaterial API synchronously // api document: https://help.aliyun.com/api/cas/describeordermaterial.html func (client *Client) DescribeOrderMaterial(request *DescribeOrderMaterialRequest) (response *DescribeOrderMaterialResponse, err error) { response = CreateDescribeOrderMaterialResponse() err = client.DoAction(request, response) return } // DescribeOrderMaterialWithChan invokes the cas.DescribeOrderMaterial API asynchronously // api document: https://help.aliyun.com/api/cas/describeordermaterial.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeOrderMaterialWithChan(request *DescribeOrderMaterialRequest) (<-chan *DescribeOrderMaterialResponse, <-chan error) { responseChan := make(chan *DescribeOrderMaterialResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) response, err := client.DescribeOrderMaterial(request) if err != nil { errChan <- err } else { responseChan <- response } }) if err != nil { errChan <- err close(responseChan) close(errChan) } return responseChan, errChan } // DescribeOrderMaterialWithCallback invokes the cas.DescribeOrderMaterial API asynchronously // api document: https://help.aliyun.com/api/cas/describeordermaterial.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeOrderMaterialWithCallback(request *DescribeOrderMaterialRequest, callback func(response *DescribeOrderMaterialResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *DescribeOrderMaterialResponse var err error defer close(result) response, err = client.DescribeOrderMaterial(request) callback(response, err) result <- 1 }) if err != nil { defer close(result) callback(nil, err) result <- 0 } return result } // DescribeOrderMaterialRequest is the request struct for api DescribeOrderMaterial type DescribeOrderMaterialRequest struct { *requests.RpcRequest SourceIp string `position:"Query" name:"SourceIp"` OrderId requests.Integer `position:"Query" name:"OrderId"` Lang string `position:"Query" name:"Lang"` } // DescribeOrderMaterialResponse is the response struct for api DescribeOrderMaterial type DescribeOrderMaterialResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` CompanyName string `json:"CompanyName" xml:"CompanyName"` CompanyPhone string `json:"CompanyPhone" xml:"CompanyPhone"` CompanyCode string `json:"CompanyCode" xml:"CompanyCode"` PersonName string `json:"PersonName" xml:"PersonName"` PersonPhone string `json:"PersonPhone" xml:"PersonPhone"` PersonEmail string `json:"PersonEmail" xml:"PersonEmail"` CompanyEmail string `json:"CompanyEmail" xml:"CompanyEmail"` CompanyAddress string `json:"CompanyAddress" xml:"CompanyAddress"` PersonIdCardNumber string `json:"PersonIdCardNumber" xml:"PersonIdCardNumber"` CompanyType int `json:"CompanyType" xml:"CompanyType"` City string `json:"City" xml:"City"` Province string `json:"Province" xml:"Province"` CreateCsr int `json:"CreateCsr" xml:"CreateCsr"` PostCode string `json:"PostCode" xml:"PostCode"` CsrContent string `json:"CsrContent" xml:"CsrContent"` PersonTitle string `json:"PersonTitle" xml:"PersonTitle"` LeaderName string `json:"LeaderName" xml:"LeaderName"` LeaderTitle string `json:"LeaderTitle" xml:"LeaderTitle"` LeaderEmail string `json:"LeaderEmail" xml:"LeaderEmail"` LeaderPhone string `json:"LeaderPhone" xml:"LeaderPhone"` CountryCode string `json:"CountryCode" xml:"CountryCode"` PersonDepartment string `json:"PersonDepartment" xml:"PersonDepartment"` DomainAuthType int `json:"DomainAuthType" xml:"DomainAuthType"` Domain string `json:"Domain" xml:"Domain"` } // CreateDescribeOrderMaterialRequest creates a request to invoke DescribeOrderMaterial API func CreateDescribeOrderMaterialRequest() (request *DescribeOrderMaterialRequest) { request = &DescribeOrderMaterialRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("cas", "2018-08-13", "DescribeOrderMaterial", "cas_esign_fdd", "openAPI") return } // CreateDescribeOrderMaterialResponse creates a response to parse from DescribeOrderMaterial response func CreateDescribeOrderMaterialResponse() (response *DescribeOrderMaterialResponse) { response = &DescribeOrderMaterialResponse{ BaseResponse: &responses.BaseResponse{}, } return }