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

SaleToAcquirerData is missing field recurringProcessingModel #1053

Merged
merged 1 commit into from
Jul 10, 2023
Merged
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
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