Skip to content
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

updated PaymentMethodMetadata #333

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions src/main/java/com/mangopay/entities/BinData.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ public class BinData {
@SerializedName("Brand")
private String brand;

/**
* Whether the card is held in a personal or commercial capacity.
*/
@SerializedName("CommercialIndicator")
private String commercialIndicator;

/**
* The type of the card. Allowed / Returned / Default values: CREDIT, DEBIT, CHARGE CARD
*/
@SerializedName("CardType")
private String cardType;

public String getSubtype() {
return subtype;
}
Expand All @@ -31,4 +43,22 @@ public String getBrand() {
public void setBrand(String brand) {
this.brand = brand;
}

public String getCommercialIndicator() {
return commercialIndicator;
}

public BinData setCommercialIndicator(String commercialIndicator) {
this.commercialIndicator = commercialIndicator;
return this;
}

public String getCardType() {
return cardType;
}

public BinData setCardType(String cardType) {
this.cardType = cardType;
return this;
}
}
28 changes: 0 additions & 28 deletions src/main/java/com/mangopay/entities/PaymentMethodMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ public class PaymentMethodMetadata extends EntityBase {
@SerializedName("TokenFormat")
private String tokenFormat;

/**
* The type of the card. Allowed / Returned / Default values: CREDIT, DEBIT, CHARGE CARD
*/
@SerializedName("CardType")
private String cardType;

/**
* The country where the card was issued. Format: ISO-3166 alpha-2 two-letter country code
*/
Expand All @@ -51,12 +45,6 @@ public class PaymentMethodMetadata extends EntityBase {
@SerializedName("IssuingBank")
private String issuingBank;

/**
* Whether the card is held in a personal or commercial capacity.
*/
@SerializedName("CommercialIndicator")
private String commercialIndicator;

/**
* Additional data about the card based on the BIN. In the case of co-branded card products, two objects are returned.
*/
Expand Down Expand Up @@ -95,14 +83,6 @@ public void setTokenFormat(String tokenFormat) {
this.tokenFormat = tokenFormat;
}

public String getCardType() {
return cardType;
}

public void setCardType(String cardType) {
this.cardType = cardType;
}

public String getIssuerCountryCode() {
return issuerCountryCode;
}
Expand All @@ -119,14 +99,6 @@ public void setIssuingBank(String issuingBank) {
this.issuingBank = issuingBank;
}

public String getCommercialIndicator() {
return commercialIndicator;
}

public void setCommercialIndicator(String commercialIndicator) {
this.commercialIndicator = commercialIndicator;
}

public List<BinData> getBinData() {
return binData;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/mangopay/core/PayInApiImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public void cardDirectGetPaymentMethodsMetadata() {
assertNotNull(resultMetadata.getIssuerCountryCode());
assertNotNull(resultMetadata.getIssuingBank());
assertNotNull(resultMetadata.getBinData());
assertNotNull(resultMetadata.getCardType());
assertNotNull(resultMetadata.getBinData().get(0).getCardType());

} catch (Exception ex) {
fail(ex.getMessage());
Expand Down
Loading