Skip to content

Commit

Permalink
SaleToAcquirerData is missing field recurringProcessingModel (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptease authored and jillingk committed Jul 11, 2023
1 parent d46bce9 commit 24c0438
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions src/main/java/com/adyen/model/terminal/SaleToAcquirerData.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.adyen.model.applicationinfo.ApplicationInfo;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.SerializedName;

public class SaleToAcquirerData {

Expand All @@ -50,6 +51,7 @@ public class SaleToAcquirerData {
private Map<String, String> additionalData;
private String authorisationType;
private String ssc;
private RecurringProcessingModelEnum recurringProcessingModel;
private static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().create();

public SaleToAcquirerData() {
Expand Down Expand Up @@ -167,6 +169,37 @@ public String getAuthorisationType() {
public void setAuthorisationType(String authorisationType) {
this.authorisationType = authorisationType;
}


/**
* Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details.
*/
public enum RecurringProcessingModelEnum {
@SerializedName("Subscription") SUBSCRIPTION("Subscription"),

@SerializedName("CardOnFile") CARD_ON_FILE("CardOnFile"),

@SerializedName("UnscheduledCardOnFile") UNSCHEDULED_CARD_ON_FILE("UnscheduledCardOnFile");

private String value;

RecurringProcessingModelEnum(String value) {
this.value = value;
}

@Override
public String toString() {
return String.valueOf(value);
}
}

public RecurringProcessingModelEnum getRecurringProcessingModel() {
return this.recurringProcessingModel;
}

public void setRecurringProcessingModel(RecurringProcessingModelEnum recurringProcessingModel) {
this.recurringProcessingModel = recurringProcessingModel;
}

public String getSsc() {
return ssc;
Expand Down Expand Up @@ -201,12 +234,13 @@ public boolean equals(Object o) {
Objects.equals(tenderOption, that.tenderOption) &&
Objects.equals(additionalData, that.additionalData) &&
Objects.equals(authorisationType, that.authorisationType) &&
Objects.equals(ssc, that.ssc);
Objects.equals(ssc, that.ssc) &&
Objects.equals(recurringProcessingModel, that.recurringProcessingModel);
}

@Override
public int hashCode() {
return Objects.hash(metadata, shopperEmail, shopperReference, recurringContract, shopperStatement, recurringDetailName, recurringTokenService, store, merchantAccount, currency, applicationInfo, tenderOption, additionalData, authorisationType, ssc);
return Objects.hash(metadata, shopperEmail, shopperReference, recurringContract, shopperStatement, recurringDetailName, recurringTokenService, store, merchantAccount, currency, applicationInfo, tenderOption, additionalData, authorisationType, ssc, recurringProcessingModel);
}

@Override
Expand All @@ -227,6 +261,7 @@ public String toString() {
", additionalData=" + additionalData +
", authorisationType=" + authorisationType +
", ssc='" + ssc + '\'' +
", recurringProcessingModel=" + recurringProcessingModel +
'}';
}

Expand Down

0 comments on commit 24c0438

Please sign in to comment.