Skip to content

Latest commit

 

History

History
396 lines (282 loc) · 12.7 KB

LocationApi.md

File metadata and controls

396 lines (282 loc) · 12.7 KB

LocationApi

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

Method HTTP request Description
createChargeLocation POST /locations Create location
deleteChargeLocation DELETE /locations/{locationId} Delete location
listChargeLocations GET /locations List locations
retrieveChargeLocation GET /locations/{locationId} Retrieve location
updateChargeLocation POST /locations/{locationId} Update location

createChargeLocation

ChargeLocationDto createChargeLocation(chargeLocationReq)

Create location

ロケーション情報を作成します。

Example

// Import classes:
import io.elepay.client.charge.ApiClient;
import io.elepay.client.charge.ApiException;
import io.elepay.client.charge.Configuration;
import io.elepay.client.charge.auth.*;
import io.elepay.client.charge.models.*;
import io.elepay.client.charge.api.LocationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.elepay.io");
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        LocationApi apiInstance = new LocationApi(defaultClient);
        ChargeLocationReq chargeLocationReq = new ChargeLocationReq(); // ChargeLocationReq | 
        try {
            ChargeLocationDto result = apiInstance.createChargeLocation(chargeLocationReq);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationApi#createChargeLocation");
            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
chargeLocationReq ChargeLocationReq [optional]

Return type

ChargeLocationDto

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

HTTP response details

Status code Description Response headers
201 Created -

deleteChargeLocation

deleteChargeLocation(locationId)

Delete location

ロケーション情報を削除します

Example

// Import classes:
import io.elepay.client.charge.ApiClient;
import io.elepay.client.charge.ApiException;
import io.elepay.client.charge.Configuration;
import io.elepay.client.charge.auth.*;
import io.elepay.client.charge.models.*;
import io.elepay.client.charge.api.LocationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.elepay.io");
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        LocationApi apiInstance = new LocationApi(defaultClient);
        String locationId = "locationId_example"; // String | Location ID
        try {
            apiInstance.deleteChargeLocation(locationId);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationApi#deleteChargeLocation");
            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
locationId String Location ID

Return type

null (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Deleted -

listChargeLocations

ChargeLocationsResponse listChargeLocations(limit, offset)

List locations

ロケーション情報を一覧で取得します。

Example

// Import classes:
import io.elepay.client.charge.ApiClient;
import io.elepay.client.charge.ApiException;
import io.elepay.client.charge.Configuration;
import io.elepay.client.charge.auth.*;
import io.elepay.client.charge.models.*;
import io.elepay.client.charge.api.LocationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.elepay.io");
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        LocationApi apiInstance = new LocationApi(defaultClient);
        Integer limit = 20; // Integer | 最大件数
        Integer offset = 0; // Integer | 検索開始位置
        try {
            ChargeLocationsResponse result = apiInstance.listChargeLocations(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationApi#listChargeLocations");
            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
limit Integer 最大件数 [optional] [default to 20]
offset Integer 検索開始位置 [optional] [default to 0]

Return type

ChargeLocationsResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

HTTP response details

Status code Description Response headers
200 OK -

retrieveChargeLocation

ChargeLocationDto retrieveChargeLocation(locationId)

Retrieve location

ロケーション情報を取得します。

Example

// Import classes:
import io.elepay.client.charge.ApiClient;
import io.elepay.client.charge.ApiException;
import io.elepay.client.charge.Configuration;
import io.elepay.client.charge.auth.*;
import io.elepay.client.charge.models.*;
import io.elepay.client.charge.api.LocationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.elepay.io");
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        LocationApi apiInstance = new LocationApi(defaultClient);
        String locationId = "locationId_example"; // String | Location ID
        try {
            ChargeLocationDto result = apiInstance.retrieveChargeLocation(locationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationApi#retrieveChargeLocation");
            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
locationId String Location ID

Return type

ChargeLocationDto

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

HTTP response details

Status code Description Response headers
200 OK -

updateChargeLocation

ChargeLocationDto updateChargeLocation(locationId, chargeLocationUpdateReq)

Update location

ロケーション情報を更新します。

Example

// Import classes:
import io.elepay.client.charge.ApiClient;
import io.elepay.client.charge.ApiException;
import io.elepay.client.charge.Configuration;
import io.elepay.client.charge.auth.*;
import io.elepay.client.charge.models.*;
import io.elepay.client.charge.api.LocationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.elepay.io");
        
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        LocationApi apiInstance = new LocationApi(defaultClient);
        String locationId = "locationId_example"; // String | Location ID
        ChargeLocationUpdateReq chargeLocationUpdateReq = new ChargeLocationUpdateReq(); // ChargeLocationUpdateReq | 
        try {
            ChargeLocationDto result = apiInstance.updateChargeLocation(locationId, chargeLocationUpdateReq);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationApi#updateChargeLocation");
            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
locationId String Location ID
chargeLocationUpdateReq ChargeLocationUpdateReq

Return type

ChargeLocationDto

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

HTTP response details

Status code Description Response headers
200 OK -