-
Notifications
You must be signed in to change notification settings - Fork 24
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
6 changed files
with
49 additions
and
283 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
group 'com.bunq.sdk' | ||
version '1.12.0' | ||
version '1.12.1' | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
|
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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/bunq/sdk/json/BunqMeTabResultInquiryDeserializer.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,33 @@ | ||
package com.bunq.sdk.json; | ||
|
||
import com.bunq.sdk.model.generated.endpoint.BunqMeTabResultInquiry; | ||
import com.bunq.sdk.model.generated.endpoint.Payment; | ||
import com.google.gson.*; | ||
|
||
import java.lang.reflect.Type; | ||
|
||
public class BunqMeTabResultInquiryDeserializer implements JsonDeserializer<BunqMeTabResultInquiry> { | ||
/** | ||
* Field constants. | ||
*/ | ||
private static final String FIELD_PAYMENT = "payment"; | ||
|
||
/** | ||
* Object type constants. | ||
*/ | ||
private static final String OBJECT_TYPE_PAYMENT = "Payment"; | ||
|
||
@Override | ||
public BunqMeTabResultInquiry deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { | ||
BunqMeTabResultInquiry tabResultInquiry = new Gson().fromJson(json, BunqMeTabResultInquiry.class); | ||
|
||
JsonObject jsonObject = (JsonObject) json; | ||
JsonObject paymentObject = jsonObject.getAsJsonObject(FIELD_PAYMENT); | ||
JsonObject wrappedPaymentObject = paymentObject.getAsJsonObject(OBJECT_TYPE_PAYMENT); | ||
|
||
Payment wrappedPayment = new Gson().fromJson(wrappedPaymentObject, Payment.class); | ||
tabResultInquiry.setPayment(wrappedPayment); | ||
|
||
return tabResultInquiry; | ||
} | ||
} |
280 changes: 0 additions & 280 deletions
280
src/test/java/com/bunq/sdk/model/generated/object/NotificationUrlTest.java
This file was deleted.
Oops, something went wrong.