Skip to content

Latest commit

 

History

History
154 lines (107 loc) · 4.92 KB

File metadata and controls

154 lines (107 loc) · 4.92 KB

swagger-android-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-android-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-android-client:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/swagger-android-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.api.OrderManagementApi;

public class OrderManagementApiExample {

    public static void main(String[] args) {
        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