Skip to content

DeveloperCielo/LIO-SDK-API-Integracao-Remota-v1-Java

Repository files navigation

swagger-java-client - DEPRECATED

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-java-client</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.swagger:swagger-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/swagger-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderManagementApi;

import java.io.File;
import java.util.*;

public class OrderManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: access-token
        ApiKeyAuth access-token = (ApiKeyAuth) defaultClient.getAuthentication("access-token");
        access-token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //access-token.setApiKeyPrefix("Token");

        // Configure API key authorization: client-id
        ApiKeyAuth client-id = (ApiKeyAuth) defaultClient.getAuthentication("client-id");
        client-id.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //client-id.setApiKeyPrefix("Token");

        // Configure API key authorization: merchant-id
        ApiKeyAuth merchant-id = (ApiKeyAuth) defaultClient.getAuthentication("merchant-id");
        merchant-id.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //merchant-id.setApiKeyPrefix("Token");

        OrderManagementApi apiInstance = new OrderManagementApi();
        String clientId = "clientId_example"; // String | Token da aplicação (APP Token) gerado durante o processo de cadastro.
        String accessToken = "accessToken_example"; // String | Token de acesso (Access Token) gerado durante o processo de cadastro.
        String merchantId = "merchantId_example"; // String | Identificador do estabelecimento comercial gerado durante o processo de cadastro.
        String id = "id_example"; // String | Identificador do pedido.
        Body1 body = new Body1(); // Body1 | 
        try {
            InlineResponse201 result = apiInstance.orderAddItem(clientId, accessToken, merchantId, id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderManagementApi#orderAddItem");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.cielo.com.br/sandbox-lio/order-management/v1

Class Method HTTP request Description
OrderManagementApi orderAddItem POST /orders/{id}/items
OrderManagementApi orderCreate POST /orders
OrderManagementApi orderDelete DELETE /orders/{id}
OrderManagementApi orderDeleteItem DELETE /orders/{id}/items/{itemId}
OrderManagementApi orderGet GET /orders/{id}
OrderManagementApi orderGetByParameters GET /orders
OrderManagementApi orderGetItem GET /orders/{id}/items
OrderManagementApi orderGetTransactions GET /orders/{id}/transactions
OrderManagementApi orderUpdate PUT /orders/{id}
OrderManagementApi orderUpdateItem PUT /orders/{id}/items/{itemId}

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

access-token

  • Type: API key
  • API key parameter name: access-token
  • Location: HTTP header

client-id

  • Type: API key
  • API key parameter name: client-id
  • Location: HTTP header

merchant-id

  • Type: API key
  • API key parameter name: merchant-id
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

SDK para realizar as chamadas na API de Integração Remota Cielo LIO

Resources

License

Stars

4 stars

Watchers

6 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages