-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
147 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/main/java/com/bunq/sdk/model/generated/endpoint/TokenQrRequestSofort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.bunq.sdk.model.generated.endpoint; | ||
|
||
import com.bunq.sdk.context.ApiContext; | ||
import com.bunq.sdk.http.ApiClient; | ||
import com.bunq.sdk.http.BunqResponse; | ||
import com.bunq.sdk.http.BunqResponseRaw; | ||
import com.bunq.sdk.model.core.BunqModel; | ||
import com.bunq.sdk.model.core.MonetaryAccountReference; | ||
import com.google.gson.annotations.Expose; | ||
import com.google.gson.annotations.SerializedName; | ||
import com.google.gson.stream.JsonReader; | ||
import java.math.BigDecimal; | ||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import javax.lang.model.type.NullType; | ||
|
||
/** | ||
* Using this call you can create a SOFORT Request assigned to your User by providing the Token | ||
* of the request. | ||
*/ | ||
public class TokenQrRequestSofort extends BunqModel { | ||
|
||
/** | ||
* Endpoint constants. | ||
*/ | ||
private static final String ENDPOINT_URL_CREATE = "user/%s/token-qr-request-sofort"; | ||
|
||
/** | ||
* Field constants. | ||
*/ | ||
public static final String FIELD_TOKEN = "token"; | ||
|
||
/** | ||
* Object type. | ||
*/ | ||
private static final String OBJECT_TYPE_POST = "RequestResponse"; | ||
|
||
public static BunqResponse<TokenQrRequestSofort> create(ApiContext apiContext, Map<String, Object> requestMap, Integer userId) { | ||
return create(apiContext, requestMap, userId, new HashMap<>()); | ||
} | ||
|
||
/** | ||
* Create a request from an SOFORT transaction. | ||
*/ | ||
public static BunqResponse<TokenQrRequestSofort> create(ApiContext apiContext, Map<String, Object> requestMap, Integer userId, Map<String, String> customHeaders) { | ||
ApiClient apiClient = new ApiClient(apiContext); | ||
byte[] requestBytes = gson.toJson(requestMap).getBytes(); | ||
BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); | ||
|
||
return fromJson(TokenQrRequestSofort.class, responseRaw, OBJECT_TYPE_POST); | ||
} | ||
|
||
/** | ||
*/ | ||
public boolean isAllFieldNull() { | ||
return true; | ||
} | ||
|
||
/** | ||
*/ | ||
public static TokenQrRequestSofort fromJsonReader(JsonReader reader) { | ||
return fromJsonReader(TokenQrRequestSofort.class, reader); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters