Skip to content

Feature/callback models bunq/sdk java#33 #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8dbc3ae
Added callback test JSON's. bunq/sdk_java#33
Nov 13, 2017
b76dd7e
Regenerated code. bunq/sdk_java#33
Nov 13, 2017
3ecdee8
Moved test JSONS to the right folder. bunq/sdk_java#33
Nov 13, 2017
291ed36
Removed top object for the sake of java. bunq/sdk_java#33
Nov 13, 2017
d141ea5
Added base NotifdicationUrlTest. bunq/sdk_java#33
Nov 13, 2017
ca0b3c4
Added mutation test. bunq/sdk_java#33
Nov 13, 2017
18cd578
Added bunq me tab model test. bunq/sdk_java#33
Nov 13, 2017
2105567
Added chat message announcement test. bunq/sdk_java#33
Nov 13, 2017
12fce3c
Added draft payment test. bunq/sdk_java#33
Nov 13, 2017
7e56025
Added mastercard action test. bunq/sdk_java#33
Nov 13, 2017
3a7f4b1
Added monetary account bank test. bunq/sdk_java#33
Nov 13, 2017
8387193
Added payment batch test. bunq/sdk_java#33
Nov 13, 2017
5a0c3ff
Added request inquiry test. bunq/sdk_java#33
Nov 13, 2017
7fcff70
Added request response test. bunq/sdk_java#33
Nov 13, 2017
6b9fbce
Added schedule instance test. bunq/sdk_java#33
Nov 13, 2017
3f4c08a
Added schedule payment test. bunq/sdk_java#33
Nov 13, 2017
f1048f1
Added share invite bank inquiry test. bunq/sdk_java#33
Nov 13, 2017
07f8158
Added share invite bank response test. bunq/sdk_java#33
Nov 13, 2017
cd70ea3
Rearranged code. (bunq/sdk_java#33)
Nov 15, 2017
acb2649
Renamed GET_ constants to GETTER_. (bunq/sdk_java#33)
Nov 15, 2017
d851125
Removed unused constants. (bunq/sdk_java#33)
Nov 15, 2017
5e39022
Regenerated code. (bunq/sdk_java#33)
Nov 15, 2017
2d44e67
Refactored NotificationUrlTest. (bunq/sdk_java#33)
Nov 15, 2017
54aef24
Removed extra new line at end of JSON files. (bunq/sdk_java#33)
Nov 15, 2017
16e3ddf
Reformatted file with indention of 2. (bunq/sdk_java#33)
Nov 15, 2017
258426f
Fixed hanging indention. (bunq/sdk_java#33)
Nov 15, 2017
0808ec3
Fixed JSON's indention. (bunq/sdk_java#33)
Nov 15, 2017
0ea5205
Force pushing via new commit :unglasses:. (bunq/sdk_java#33)
Nov 15, 2017
6b4a805
little OCD fix
dnl-blkv Nov 15, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main/java/com/bunq/sdk/model/generated/endpoint/Avatar.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
*/
public class Avatar extends BunqModel {

/**
* Field constants.
*/
public static final String FIELD_ATTACHMENT_PUBLIC_UUID = "attachment_public_uuid";

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "avatar";
private static final String ENDPOINT_URL_READ = "avatar/%s";

/**
* Field constants.
*/
public static final String FIELD_ATTACHMENT_PUBLIC_UUID = "attachment_public_uuid";

/**
* Object type.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
*/
public class BillingContractSubscription extends BunqModel {

/**
* Field constants.
*/
public static final String FIELD_SUBSCRIPTION_TYPE = "subscription_type";

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "user/%s/billing-contract-subscription";
private static final String ENDPOINT_URL_LISTING = "user/%s/billing-contract-subscription";

/**
* Field constants.
*/
public static final String FIELD_SUBSCRIPTION_TYPE = "subscription_type";

/**
* Object type.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@
*/
public class BunqMeTab extends BunqModel {

/**
* Field constants.
*/
public static final String FIELD_BUNQME_TAB_ENTRY = "bunqme_tab_entry";
public static final String FIELD_STATUS = "status";

/**
* Endpoint constants.
*/
Expand All @@ -36,6 +30,12 @@ public class BunqMeTab extends BunqModel {
private static final String ENDPOINT_URL_LISTING = "user/%s/monetary-account/%s/bunqme-tab";
private static final String ENDPOINT_URL_READ = "user/%s/monetary-account/%s/bunqme-tab/%s";

/**
* Field constants.
*/
public static final String FIELD_BUNQME_TAB_ENTRY = "bunqme_tab_entry";
public static final String FIELD_STATUS = "status";

/**
* Object type.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.bunq.sdk.model.generated.endpoint;

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 java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* Used to view bunq.me TabResultResponse objects belonging to a tab. A TabResultResponse is an
* object that holds details on a tab which has been paid from the provided monetary account.
*/
public class BunqMeTabResultResponse extends BunqModel {

/**
* Object type.
*/
private static final String OBJECT_TYPE = "BunqMeTabResultResponse";

/**
* The payment made for the bunq.me tab.
*/
@Expose
@SerializedName("payment")
private Payment payment;

/**
* The payment made for the bunq.me tab.
*/
public Payment getPayment() {
return this.payment;
}

public void setPayment(Payment payment) {
this.payment = payment;
}

}
50 changes: 43 additions & 7 deletions src/main/java/com/bunq/sdk/model/generated/endpoint/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
*/
public class Card extends BunqModel {

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_UPDATE = "user/%s/card/%s";
private static final String ENDPOINT_URL_READ = "user/%s/card/%s";
private static final String ENDPOINT_URL_LISTING = "user/%s/card";

/**
* Field constants.
*/
Expand All @@ -39,13 +46,6 @@ public class Card extends BunqModel {
public static final String FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment";
public static final String FIELD_MONETARY_ACCOUNT_ID_FALLBACK = "monetary_account_id_fallback";

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_UPDATE = "user/%s/card/%s";
private static final String ENDPOINT_URL_READ = "user/%s/card/%s";
private static final String ENDPOINT_URL_LISTING = "user/%s/card";

/**
* Object type.
*/
Expand Down Expand Up @@ -86,6 +86,13 @@ public class Card extends BunqModel {
@SerializedName("type")
private String type;

/**
* The sub-type of the card.
*/
@Expose
@SerializedName("sub_type")
private String subType;

/**
* The second line of text on the card
*/
Expand Down Expand Up @@ -188,6 +195,13 @@ public class Card extends BunqModel {
@SerializedName("monetary_account_id_fallback")
private Integer monetaryAccountIdFallback;

/**
* The country that is domestic to the card. Defaults to country of residence of user.
*/
@Expose
@SerializedName("country")
private String country;

public static BunqResponse<Card> update(ApiContext apiContext, Map<String, Object> requestMap, Integer userId, Integer cardId) {
return update(apiContext, requestMap, userId, cardId, new HashMap<>());
}
Expand Down Expand Up @@ -293,6 +307,17 @@ public void setType(String type) {
this.type = type;
}

/**
* The sub-type of the card.
*/
public String getSubType() {
return this.subType;
}

public void setSubType(String subType) {
this.subType = subType;
}

/**
* The second line of text on the card
*/
Expand Down Expand Up @@ -451,4 +476,15 @@ public void setMonetaryAccountIdFallback(Integer monetaryAccountIdFallback) {
this.monetaryAccountIdFallback = monetaryAccountIdFallback;
}

/**
* The country that is domestic to the card. Defaults to country of residence of user.
*/
public String getCountry() {
return this.country;
}

public void setCountry(String country) {
this.country = country;
}

}
47 changes: 42 additions & 5 deletions src/main/java/com/bunq/sdk/model/generated/endpoint/CardDebit.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
*/
public class CardDebit extends BunqModel {

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "user/%s/card-debit";

/**
* Field constants.
*/
Expand All @@ -37,11 +42,7 @@ public class CardDebit extends BunqModel {
public static final String FIELD_TYPE = "type";
public static final String FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment";
public static final String FIELD_MONETARY_ACCOUNT_ID_FALLBACK = "monetary_account_id_fallback";

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "user/%s/card-debit";
public static final String FIELD_COUNTRY = "country";

/**
* Object type.
Expand Down Expand Up @@ -83,6 +84,13 @@ public class CardDebit extends BunqModel {
@SerializedName("type")
private String type;

/**
* The sub_type of card.
*/
@Expose
@SerializedName("sub_type")
private String subType;

/**
* The second line of text on the card
*/
Expand Down Expand Up @@ -175,6 +183,13 @@ public class CardDebit extends BunqModel {
@SerializedName("monetary_account_id_fallback")
private Integer monetaryAccountIdFallback;

/**
* The country that is domestic to the card. Defaults to country of residence of user.
*/
@Expose
@SerializedName("country")
private String country;

public static BunqResponse<CardDebit> create(ApiContext apiContext, Map<String, Object> requestMap, Integer userId) {
return create(apiContext, requestMap, userId, new HashMap<>());
}
Expand Down Expand Up @@ -246,6 +261,17 @@ public void setType(String type) {
this.type = type;
}

/**
* The sub_type of card.
*/
public String getSubType() {
return this.subType;
}

public void setSubType(String subType) {
this.subType = subType;
}

/**
* The second line of text on the card
*/
Expand Down Expand Up @@ -390,4 +416,15 @@ public void setMonetaryAccountIdFallback(Integer monetaryAccountIdFallback) {
this.monetaryAccountIdFallback = monetaryAccountIdFallback;
}

/**
* The country that is domestic to the card. Defaults to country of residence of user.
*/
public String getCountry() {
return this.country;
}

public void setCountry(String country) {
this.country = country;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
public class CardReplace extends BunqModel {

/**
* Field constants.
* Endpoint constants.
*/
public static final String FIELD_PIN_CODE = "pin_code";
public static final String FIELD_SECOND_LINE = "second_line";
private static final String ENDPOINT_URL_CREATE = "user/%s/card/%s/replace";

/**
* Endpoint constants.
* Field constants.
*/
private static final String ENDPOINT_URL_CREATE = "user/%s/card/%s/replace";
public static final String FIELD_PIN_CODE = "pin_code";
public static final String FIELD_SECOND_LINE = "second_line";

/**
* Object type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
*/
public class CashRegister extends BunqModel {

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "user/%s/monetary-account/%s/cash-register";
private static final String ENDPOINT_URL_READ = "user/%s/monetary-account/%s/cash-register/%s";
private static final String ENDPOINT_URL_UPDATE = "user/%s/monetary-account/%s/cash-register/%s";
private static final String ENDPOINT_URL_LISTING = "user/%s/monetary-account/%s/cash-register";

/**
* Field constants.
*/
Expand All @@ -39,14 +47,6 @@ public class CashRegister extends BunqModel {
public static final String FIELD_NOTIFICATION_FILTERS = "notification_filters";
public static final String FIELD_TAB_TEXT_WAITING_SCREEN = "tab_text_waiting_screen";

/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "user/%s/monetary-account/%s/cash-register";
private static final String ENDPOINT_URL_READ = "user/%s/monetary-account/%s/cash-register/%s";
private static final String ENDPOINT_URL_UPDATE = "user/%s/monetary-account/%s/cash-register/%s";
private static final String ENDPOINT_URL_LISTING = "user/%s/monetary-account/%s/cash-register";

/**
* Object type.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
*/
public class CashRegisterQrCode extends BunqModel {

/**
* Field constants.
*/
public static final String FIELD_STATUS = "status";

/**
* Endpoint constants.
*/
Expand All @@ -35,6 +30,11 @@ public class CashRegisterQrCode extends BunqModel {
private static final String ENDPOINT_URL_READ = "user/%s/monetary-account/%s/cash-register/%s/qr-code/%s";
private static final String ENDPOINT_URL_LISTING = "user/%s/monetary-account/%s/cash-register/%s/qr-code";

/**
* Field constants.
*/
public static final String FIELD_STATUS = "status";

/**
* Object type.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
*/
public class CertificatePinned extends BunqModel {

/**
* Field constants.
*/
public static final String FIELD_CERTIFICATE_CHAIN = "certificate_chain";

/**
* Endpoint constants.
*/
Expand All @@ -35,6 +30,11 @@ public class CertificatePinned extends BunqModel {
private static final String ENDPOINT_URL_LISTING = "user/%s/certificate-pinned";
private static final String ENDPOINT_URL_READ = "user/%s/certificate-pinned/%s";

/**
* Field constants.
*/
public static final String FIELD_CERTIFICATE_CHAIN = "certificate_chain";

/**
* Object type.
*/
Expand Down
Loading