Skip to content

Latest commit

 

History

History
81 lines (57 loc) · 2.6 KB

BalancesApi.md

File metadata and controls

81 lines (57 loc) · 2.6 KB

BalancesApi

All URIs are relative to https://api.conekta.io

Method HTTP request Description
getBalance GET /balance Get a company's balance

getBalance

BalanceResponse getBalance(acceptLanguage)

Get a company's balance

Get a company's balance

Example

// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.BalancesApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.conekta.io");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        BalancesApi apiInstance = new BalancesApi(defaultClient);
        String acceptLanguage = "es"; // String | Use for knowing which language to use
        try {
            BalanceResponse result = apiInstance.getBalance(acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BalancesApi#getBalance");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
acceptLanguage String Use for knowing which language to use [optional] [default to es] [enum: es, en]

Return type

BalanceResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
401 authentication error -
500 internal server error -