Class: LogaltyCertificateIssuanceApiCerty::OperationsApi
- Defined in:
- lib/logalty_certificate_issuance_api_certy/apis/operations_api.rb
Overview
OperationsApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#update_certificate_request(code, body) ⇒ ApiResponse
Performs an operation on an in-progress transaction.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from LogaltyCertificateIssuanceApiCerty::BaseApi
Instance Method Details
#update_certificate_request(code, body) ⇒ ApiResponse
Performs an operation on an in-progress transaction. The ‘operation` field in the request body determines the action:
-
**‘resend`** — Resend the access request to the end-user or generate a
new synchronous access URL.
-
**‘cancel`** — Cancel the transaction. Returns HTTP 204 No Content on
success. identifier in Logalty (UUIDv4 format). description here
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/logalty_certificate_issuance_api_certy/apis/operations_api.rb', line 21 def update_certificate_request(code, body) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/lgt/signcloud/rest/api/v1/certificate/request/{code}', Server::DEFAULT) .template_param(new_parameter(code, key: 'code') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true) .validator(proc do |value| UnionTypeLookUp.get(:UpdateRequest) .validate(value) end)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(APIHelper.method(:json_serialize)) .auth(Single.new('bearerAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ResendResponse.method(:from_hash)) .is_api_response(true) .local_error('400', 'Invalid request.', ErrorResponseException) .local_error('404', 'Transaction not found.', ErrorResponseException)) .execute end |