public abstract class ApiBase
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected MangoPayApi |
root
Root/parent instance that holds the OAuthToken and Configuration instance.
|
| Constructor and Description |
|---|
ApiBase(MangoPayApi root)
Creates new API instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T extends Dto,U extends Dto> |
createObject(java.lang.Class<T> classOfT,
java.lang.String idempotencyKey,
java.lang.String methodKey,
U entity)
Creates the Dto instance.
|
protected <T extends Dto,U extends Dto> |
createObject(java.lang.Class<T> classOfT,
java.lang.String idempotencyKey,
java.lang.String methodKey,
U entity,
java.lang.String entityId)
Creates the Dto instance.
|
protected <T extends Dto,U extends Dto> |
createObject(java.lang.Class<T> classOfT,
java.lang.String idempotencyKey,
java.lang.String methodKey,
U entity,
java.lang.String entityId,
java.lang.String secondEntityId)
Creates the Dto instance.
|
protected <T extends Dto> |
getList(java.lang.Class<T[]> classOfT,
java.lang.Class<T> classOfTItem,
java.lang.String methodKey,
Pagination pagination)
Gets the array of Dto instances from API.
|
protected <T extends Dto> |
getList(java.lang.Class<T[]> classOfT,
java.lang.Class<T> classOfTItem,
java.lang.String methodKey,
Pagination pagination,
Sorting sorting)
Gets the array of Dto instances from API.
|
protected <T extends Dto> |
getList(java.lang.Class<T[]> classOfT,
java.lang.Class<T> classOfTItem,
java.lang.String methodKey,
Pagination pagination,
java.lang.String entityId)
Gets the array of Dto instances from API.
|
protected <T extends Dto> |
getList(java.lang.Class<T[]> classOfT,
java.lang.Class<T> classOfTItem,
java.lang.String methodKey,
Pagination pagination,
java.lang.String entityId,
java.util.Map<java.lang.String,java.lang.String> filter,
Sorting sorting) |
protected <T extends Dto> |
getList(java.lang.Class<T[]> classOfT,
java.lang.Class<T> classOfTItem,
java.lang.String methodKey,
Pagination pagination,
java.lang.String entityId,
Sorting sorting)
Gets the array of Dto instances from API.
|
protected <T extends Dto> |
getList(java.lang.Class<T[]> classOfT,
java.lang.Class<T> classOfTItem,
java.lang.String methodKey,
Pagination pagination,
java.lang.String entityId,
java.lang.String secondEntityId,
java.util.Map<java.lang.String,java.lang.String> filter,
Sorting sorting)
Gets the array of Dto instances from API.
|
protected <T extends Dto> |
getListNoClientId(java.lang.Class<T[]> classOfT,
java.lang.Class<T> classOfTItem,
java.lang.String methodKey,
Pagination pagination,
Sorting sorting) |
protected <T extends Dto> |
getObject(java.lang.Class<T> classOfT,
java.lang.String methodKey,
java.lang.Object... args) |
protected <T extends Dto> |
getObjectNoClientId(java.lang.Class<T> classOfT,
java.lang.String methodKey,
java.lang.Object... args) |
protected java.lang.String |
getRequestType(java.lang.String key)
Gets the HTTP request verb.
|
protected java.lang.String |
getRequestUrl(java.lang.String key)
Gets the URL of REST Mango Pay API.
|
protected MangoPayApi |
getRoot() |
protected <T extends Dto,U extends Dto> |
updateObject(java.lang.Class<T> classOfT,
java.lang.String methodKey,
U entity)
Saves the Dto instance.
|
protected <T extends Dto,U extends Dto> |
updateObject(java.lang.Class<T> classOfT,
java.lang.String methodKey,
U entity,
java.lang.String entityId)
Saves the Dto instance.
|
protected <T extends Dto,U extends Dto> |
updateObject(java.lang.Class<T> classOfT,
java.lang.String methodKey,
U entity,
java.lang.String entityId,
java.lang.String secondEntityId)
Saves the Dto instance.
|
protected <T extends Dto,U extends Dto> |
updateObject(java.lang.Class<T> classOfT,
java.lang.String methodKey,
U entity,
java.lang.String entityId,
java.lang.String secondEntityId,
java.lang.String thirdEntityId)
Saves the Dto instance.
|
protected MangoPayApi root
public ApiBase(MangoPayApi root)
root - Root/parent instance that holds the OAuthToken and Configuration instance.protected MangoPayApi getRoot()
protected java.lang.String getRequestUrl(java.lang.String key)
throws java.lang.Exception
key - The method key to get URL of.java.lang.Exceptionprotected java.lang.String getRequestType(java.lang.String key)
key - The method key.protected <T extends Dto,U extends Dto> T createObject(java.lang.Class<T> classOfT, java.lang.String idempotencyKey, java.lang.String methodKey, U entity, java.lang.String entityId, java.lang.String secondEntityId) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.idempotencyKey - idempotency key for this request.methodKey - Relevant method key.entity - Dto instance that is going to be sent.entityId - Entity identifier.secondEntityId - Second entity identifier.java.lang.Exceptionprotected <T extends Dto,U extends Dto> T createObject(java.lang.Class<T> classOfT, java.lang.String idempotencyKey, java.lang.String methodKey, U entity, java.lang.String entityId) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.idempotencyKey - idempotency key for this request.methodKey - Relevant method key.entity - Dto instance that is going to be sent.entityId - Entity identifier.java.lang.Exceptionprotected <T extends Dto,U extends Dto> T createObject(java.lang.Class<T> classOfT, java.lang.String idempotencyKey, java.lang.String methodKey, U entity) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.idempotencyKey - idempotency key for this request.methodKey - Relevant method key.entity - Dto instance that is going to be sent.java.lang.Exceptionprotected <T extends Dto> T getObject(java.lang.Class<T> classOfT, java.lang.String methodKey, java.lang.Object... args) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.args - Arguments that will be set on the methodjava.lang.Exceptionprotected <T extends Dto> T getObjectNoClientId(java.lang.Class<T> classOfT, java.lang.String methodKey, java.lang.Object... args) throws java.lang.Exception
java.lang.Exceptionprotected <T extends Dto> java.util.List<T> getList(java.lang.Class<T[]> classOfT, java.lang.Class<T> classOfTItem, java.lang.String methodKey, Pagination pagination, java.lang.String entityId, java.lang.String secondEntityId, java.util.Map<java.lang.String,java.lang.String> filter, Sorting sorting) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.pagination - Pagination object.entityId - Entity identifier.filter - Collection of key-value pairs of filter parameters.sorting - Sorting instance.java.lang.Exceptionprotected <T extends Dto> java.util.List<T> getListNoClientId(java.lang.Class<T[]> classOfT, java.lang.Class<T> classOfTItem, java.lang.String methodKey, Pagination pagination, Sorting sorting) throws java.lang.Exception
java.lang.Exceptionprotected <T extends Dto> java.util.List<T> getList(java.lang.Class<T[]> classOfT, java.lang.Class<T> classOfTItem, java.lang.String methodKey, Pagination pagination, java.lang.String entityId, java.util.Map<java.lang.String,java.lang.String> filter, Sorting sorting) throws java.lang.Exception
java.lang.Exceptionprotected <T extends Dto> java.util.List<T> getList(java.lang.Class<T[]> classOfT, java.lang.Class<T> classOfTItem, java.lang.String methodKey, Pagination pagination, java.lang.String entityId, Sorting sorting) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.pagination - Pagination object.entityId - Entity identifier.sorting - Sorting object.java.lang.Exceptionprotected <T extends Dto> java.util.List<T> getList(java.lang.Class<T[]> classOfT, java.lang.Class<T> classOfTItem, java.lang.String methodKey, Pagination pagination, java.lang.String entityId) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.pagination - Pagination object.entityId - Entity identifier.java.lang.Exceptionprotected <T extends Dto> java.util.List<T> getList(java.lang.Class<T[]> classOfT, java.lang.Class<T> classOfTItem, java.lang.String methodKey, Pagination pagination) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.pagination - Pagination object.java.lang.Exceptionprotected <T extends Dto> java.util.List<T> getList(java.lang.Class<T[]> classOfT, java.lang.Class<T> classOfTItem, java.lang.String methodKey, Pagination pagination, Sorting sorting) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.pagination - Pagination object.sorting - Sorting object.java.lang.Exceptionprotected <T extends Dto,U extends Dto> T updateObject(java.lang.Class<T> classOfT, java.lang.String methodKey, U entity) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.entity - Dto instance that is going to be sent.java.lang.Exceptionprotected <T extends Dto,U extends Dto> T updateObject(java.lang.Class<T> classOfT, java.lang.String methodKey, U entity, java.lang.String entityId) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.entity - Dto instance that is going to be sent.entityId - Entity identifier.java.lang.Exceptionprotected <T extends Dto,U extends Dto> T updateObject(java.lang.Class<T> classOfT, java.lang.String methodKey, U entity, java.lang.String entityId, java.lang.String secondEntityId) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.entity - Dto instance that is going to be sent.entityId - Entity identifier.secondEntityId - Second entity identifier.java.lang.Exceptionprotected <T extends Dto,U extends Dto> T updateObject(java.lang.Class<T> classOfT, java.lang.String methodKey, U entity, java.lang.String entityId, java.lang.String secondEntityId, java.lang.String thirdEntityId) throws java.lang.Exception
T - Type on behalf of which the request is being called.classOfT - Type on behalf of which the request is being called.methodKey - Relevant method key.entity - Dto instance that is going to be sent.entityId - Entity identifier.secondEntityId - Second entity identifier.thirdEntityId - Third entity identifier.java.lang.Exception