Skip to content

Commit

Permalink
Regenerated code. (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Mar 1, 2018
1 parent a64caab commit b8d43d4
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class CardDebit extends BunqModel {
*/
public static final String FIELD_SECOND_LINE = "second_line";
public static final String FIELD_NAME_ON_CARD = "name_on_card";
public static final String FIELD_PIN_CODE = "pin_code";
public static final String FIELD_ALIAS = "alias";
public static final String FIELD_TYPE = "type";
public static final String FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ public class MasterCardAction extends BunqModel {
@SerializedName("eligible_whitelist_id")
private Integer eligibleWhitelistId;

/**
* The secure code id for this mastercard action or null.
*/
@Expose
@SerializedName("secure_code_id")
private Integer secureCodeId;

public static BunqResponse<MasterCardAction> get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer masterCardActionId) {
return get(apiContext, userId, monetaryAccountId, masterCardActionId, new HashMap<>());
}
Expand Down Expand Up @@ -499,6 +506,17 @@ public void setEligibleWhitelistId(Integer eligibleWhitelistId) {
this.eligibleWhitelistId = eligibleWhitelistId;
}

/**
* The secure code id for this mastercard action or null.
*/
public Integer getSecureCodeId() {
return this.secureCodeId;
}

public void setSecureCodeId(Integer secureCodeId) {
this.secureCodeId = secureCodeId;
}

/**
*/
public boolean isAllFieldNull() {
Expand Down Expand Up @@ -598,6 +616,10 @@ public boolean isAllFieldNull() {
return false;
}

if (this.secureCodeId != null) {
return false;
}

return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public class RequestResponse extends BunqModel {
private Geolocation geolocation;

/**
* The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL or INTERNAL.
* The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL, SOFORT or
* INTERNAL.
*/
@Expose
@SerializedName("type")
Expand Down Expand Up @@ -458,7 +459,8 @@ public void setGeolocation(Geolocation geolocation) {
}

/**
* The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL or INTERNAL.
* The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL, SOFORT or
* INTERNAL.
*/
public String getType() {
return this.type;
Expand Down
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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import com.bunq.sdk.model.generated.object.Address;
import com.bunq.sdk.model.generated.object.Amount;
import com.bunq.sdk.model.generated.object.Avatar;
import com.bunq.sdk.model.generated.object.BunqId;
import com.bunq.sdk.model.generated.object.CardLimit;
import com.bunq.sdk.model.generated.object.LabelUser;
import com.bunq.sdk.model.generated.object.NotificationFilter;
import com.bunq.sdk.model.generated.object.Pointer;
Expand Down Expand Up @@ -233,6 +235,20 @@ public class UserCompany extends BunqModel {
@SerializedName("session_timeout")
private Integer sessionTimeout;

/**
* Card ids used for centralized card limits.
*/
@Expose
@SerializedName("card_ids")
private List<BunqId> cardIds;

/**
* The centralized limits for user's cards.
*/
@Expose
@SerializedName("card_limits")
private List<CardLimit> cardLimits;

/**
* The amount the company can pay in the session without asking for credentials.
*/
Expand Down Expand Up @@ -565,6 +581,28 @@ public void setSessionTimeout(Integer sessionTimeout) {
this.sessionTimeout = sessionTimeout;
}

/**
* Card ids used for centralized card limits.
*/
public List<BunqId> getCardIds() {
return this.cardIds;
}

public void setCardIds(List<BunqId> cardIds) {
this.cardIds = cardIds;
}

/**
* The centralized limits for user's cards.
*/
public List<CardLimit> getCardLimits() {
return this.cardLimits;
}

public void setCardLimits(List<CardLimit> cardLimits) {
this.cardLimits = cardLimits;
}

/**
* The amount the company can pay in the session without asking for credentials.
*/
Expand Down Expand Up @@ -720,6 +758,14 @@ public boolean isAllFieldNull() {
return false;
}

if (this.cardIds != null) {
return false;
}

if (this.cardLimits != null) {
return false;
}

if (this.dailyLimitWithoutConfirmationLogin != null) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public class UserPerson extends BunqModel {
public static final String FIELD_SUB_STATUS = "sub_status";
public static final String FIELD_LEGAL_GUARDIAN_ALIAS = "legal_guardian_alias";
public static final String FIELD_SESSION_TIMEOUT = "session_timeout";
public static final String FIELD_CARD_IDS = "card_ids";
public static final String FIELD_CARD_LIMITS = "card_limits";
public static final String FIELD_DAILY_LIMIT_WITHOUT_CONFIRMATION_LOGIN = "daily_limit_without_confirmation_login";
public static final String FIELD_COUNTER_BANK_IBAN = "counter_bank_iban";
public static final String FIELD_NOTIFICATION_FILTERS = "notification_filters";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public class CardPinAssignment extends BunqModel {
*/
@Expose
@SerializedName("monetary_account_id")
private String monetaryAccountId;
private Integer monetaryAccountId;

public CardPinAssignment(String type) {
public CardPinAssignment(String type, String pinCode, Integer monetaryAccountId) {
this.type = type;
this.pinCode = pinCode;
this.monetaryAccountId = monetaryAccountId;
}

/**
Expand All @@ -54,11 +56,11 @@ public void setType(String type) {
/**
* The ID of the monetary account to assign to this pin for the card.
*/
public String getMonetaryAccountId() {
public Integer getMonetaryAccountId() {
return this.monetaryAccountId;
}

public void setMonetaryAccountId(String monetaryAccountId) {
public void setMonetaryAccountId(Integer monetaryAccountId) {
this.monetaryAccountId = monetaryAccountId;
}

Expand Down

0 comments on commit b8d43d4

Please sign in to comment.