get_notary_order.go 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. package trademark
  2. //Licensed under the Apache License, Version 2.0 (the "License");
  3. //you may not use this file except in compliance with the License.
  4. //You may obtain a copy of the License at
  5. //
  6. //http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. //Unless required by applicable law or agreed to in writing, software
  9. //distributed under the License is distributed on an "AS IS" BASIS,
  10. //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. //See the License for the specific language governing permissions and
  12. //limitations under the License.
  13. //
  14. // Code generated by Alibaba Cloud SDK Code Generator.
  15. // Changes may cause incorrect behavior and will be lost if the code is regenerated.
  16. import (
  17. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
  18. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
  19. )
  20. // GetNotaryOrder invokes the trademark.GetNotaryOrder API synchronously
  21. // api document: https://help.aliyun.com/api/trademark/getnotaryorder.html
  22. func (client *Client) GetNotaryOrder(request *GetNotaryOrderRequest) (response *GetNotaryOrderResponse, err error) {
  23. response = CreateGetNotaryOrderResponse()
  24. err = client.DoAction(request, response)
  25. return
  26. }
  27. // GetNotaryOrderWithChan invokes the trademark.GetNotaryOrder API asynchronously
  28. // api document: https://help.aliyun.com/api/trademark/getnotaryorder.html
  29. // asynchronous document: https://help.aliyun.com/document_detail/66220.html
  30. func (client *Client) GetNotaryOrderWithChan(request *GetNotaryOrderRequest) (<-chan *GetNotaryOrderResponse, <-chan error) {
  31. responseChan := make(chan *GetNotaryOrderResponse, 1)
  32. errChan := make(chan error, 1)
  33. err := client.AddAsyncTask(func() {
  34. defer close(responseChan)
  35. defer close(errChan)
  36. response, err := client.GetNotaryOrder(request)
  37. if err != nil {
  38. errChan <- err
  39. } else {
  40. responseChan <- response
  41. }
  42. })
  43. if err != nil {
  44. errChan <- err
  45. close(responseChan)
  46. close(errChan)
  47. }
  48. return responseChan, errChan
  49. }
  50. // GetNotaryOrderWithCallback invokes the trademark.GetNotaryOrder API asynchronously
  51. // api document: https://help.aliyun.com/api/trademark/getnotaryorder.html
  52. // asynchronous document: https://help.aliyun.com/document_detail/66220.html
  53. func (client *Client) GetNotaryOrderWithCallback(request *GetNotaryOrderRequest, callback func(response *GetNotaryOrderResponse, err error)) <-chan int {
  54. result := make(chan int, 1)
  55. err := client.AddAsyncTask(func() {
  56. var response *GetNotaryOrderResponse
  57. var err error
  58. defer close(result)
  59. response, err = client.GetNotaryOrder(request)
  60. callback(response, err)
  61. result <- 1
  62. })
  63. if err != nil {
  64. defer close(result)
  65. callback(nil, err)
  66. result <- 0
  67. }
  68. return result
  69. }
  70. // GetNotaryOrderRequest is the request struct for api GetNotaryOrder
  71. type GetNotaryOrderRequest struct {
  72. *requests.RpcRequest
  73. NotaryOrderId requests.Integer `position:"Query" name:"NotaryOrderId"`
  74. }
  75. // GetNotaryOrderResponse is the response struct for api GetNotaryOrder
  76. type GetNotaryOrderResponse struct {
  77. *responses.BaseResponse
  78. RequestId string `json:"RequestId" xml:"RequestId"`
  79. NotaryOrderId int64 `json:"NotaryOrderId" xml:"NotaryOrderId"`
  80. AliyunOrderId string `json:"AliyunOrderId" xml:"AliyunOrderId"`
  81. TmRegisterNo string `json:"TmRegisterNo" xml:"TmRegisterNo"`
  82. TmName string `json:"TmName" xml:"TmName"`
  83. TmImage string `json:"TmImage" xml:"TmImage"`
  84. TmClassification string `json:"TmClassification" xml:"TmClassification"`
  85. OrderPrice float64 `json:"OrderPrice" xml:"OrderPrice"`
  86. NotaryStatus int `json:"NotaryStatus" xml:"NotaryStatus"`
  87. Type string `json:"Type" xml:"Type"`
  88. Name string `json:"Name" xml:"Name"`
  89. Phone string `json:"Phone" xml:"Phone"`
  90. SellerCompanyName string `json:"SellerCompanyName" xml:"SellerCompanyName"`
  91. BusinessLicenseId string `json:"BusinessLicenseId" xml:"BusinessLicenseId"`
  92. LegalPersonName string `json:"LegalPersonName" xml:"LegalPersonName"`
  93. LegalPersonPhone string `json:"LegalPersonPhone" xml:"LegalPersonPhone"`
  94. LegalPersonIdCard string `json:"LegalPersonIdCard" xml:"LegalPersonIdCard"`
  95. CompanyContactName string `json:"CompanyContactName" xml:"CompanyContactName"`
  96. CompanyContactPhone string `json:"CompanyContactPhone" xml:"CompanyContactPhone"`
  97. TmRegisterCertificate string `json:"TmRegisterCertificate" xml:"TmRegisterCertificate"`
  98. BusinessLicense string `json:"BusinessLicense" xml:"BusinessLicense"`
  99. TmAcceptCertificate string `json:"TmAcceptCertificate" xml:"TmAcceptCertificate"`
  100. SellerFrontOfIdCard string `json:"SellerFrontOfIdCard" xml:"SellerFrontOfIdCard"`
  101. SellerBackOfIdCard string `json:"SellerBackOfIdCard" xml:"SellerBackOfIdCard"`
  102. TmRegisterChangeCertificate string `json:"TmRegisterChangeCertificate" xml:"TmRegisterChangeCertificate"`
  103. ReceiverName string `json:"ReceiverName" xml:"ReceiverName"`
  104. ReceiverAddress string `json:"ReceiverAddress" xml:"ReceiverAddress"`
  105. ReceiverPhone string `json:"ReceiverPhone" xml:"ReceiverPhone"`
  106. ReceiverPostalCode string `json:"ReceiverPostalCode" xml:"ReceiverPostalCode"`
  107. OrderDate int64 `json:"OrderDate" xml:"OrderDate"`
  108. NotaryAcceptDate int64 `json:"NotaryAcceptDate" xml:"NotaryAcceptDate"`
  109. NotarySucceedDate int64 `json:"NotarySucceedDate" xml:"NotarySucceedDate"`
  110. NotaryFailedDate int64 `json:"NotaryFailedDate" xml:"NotaryFailedDate"`
  111. NotaryFailedReason string `json:"NotaryFailedReason" xml:"NotaryFailedReason"`
  112. NotaryCertificate string `json:"NotaryCertificate" xml:"NotaryCertificate"`
  113. Success bool `json:"Success" xml:"Success"`
  114. ErrorMsg string `json:"ErrorMsg" xml:"ErrorMsg"`
  115. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  116. BizId string `json:"BizId" xml:"BizId"`
  117. NotaryType int `json:"NotaryType" xml:"NotaryType"`
  118. NotaryPlatformName string `json:"NotaryPlatformName" xml:"NotaryPlatformName"`
  119. ApplyPostStatus int `json:"ApplyPostStatus" xml:"ApplyPostStatus"`
  120. NotaryPostReceipt string `json:"NotaryPostReceipt" xml:"NotaryPostReceipt"`
  121. }
  122. // CreateGetNotaryOrderRequest creates a request to invoke GetNotaryOrder API
  123. func CreateGetNotaryOrderRequest() (request *GetNotaryOrderRequest) {
  124. request = &GetNotaryOrderRequest{
  125. RpcRequest: &requests.RpcRequest{},
  126. }
  127. request.InitWithApiInfo("Trademark", "2018-07-24", "GetNotaryOrder", "trademark", "openAPI")
  128. return
  129. }
  130. // CreateGetNotaryOrderResponse creates a response to parse from GetNotaryOrder response
  131. func CreateGetNotaryOrderResponse() (response *GetNotaryOrderResponse) {
  132. response = &GetNotaryOrderResponse{
  133. BaseResponse: &responses.BaseResponse{},
  134. }
  135. return
  136. }