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