@@ -42,7 +42,30 @@ public class PaymentRequest extends AbstractPaymentRequest<PaymentRequest> {
4242 @ SerializedName ("bankAccount" )
4343 private BankAccount bankAccount = null ;
4444
45- private List <InvoiceLine > invoiceLines = null ;
45+ /**
46+ * how the shopper interacts with the system
47+ */
48+ public enum RecurringProcessingModelEnum {
49+ @ SerializedName ("Subscription" )
50+ SUBSCRIPTION ("Subscription" ),
51+
52+ @ SerializedName ("CardOnFile" )
53+ CARD_ON_FILE ("CardOnFile" );
54+
55+ private String value ;
56+
57+ RecurringProcessingModelEnum (String value ) {
58+ this .value = value ;
59+ }
60+
61+ @ Override
62+ public String toString () {
63+ return String .valueOf (value );
64+ }
65+ }
66+
67+ @ SerializedName ("recurringProcessingModel" )
68+ private RecurringProcessingModelEnum recurringProcessingModel = null ;
4669
4770 public PaymentRequest setAmountData (String amount , String currency ) {
4871 Amount amountData = Util .createAmount (amount , currency );
@@ -72,14 +95,21 @@ public PaymentRequest setPaymentToken(String paymentToken) {
7295 return this ;
7396 }
7497
98+ public RecurringProcessingModelEnum getRecurringProcessingModel () {
99+ return recurringProcessingModel ;
100+ }
101+
102+ public PaymentRequest setRecurringProcessingModel (RecurringProcessingModelEnum recurringProcessingModel ) {
103+ this .recurringProcessingModel = recurringProcessingModel ;
104+ return this ;
105+ }
106+
75107 /**
76108 * Set invoiceLines in addtionalData
77109 */
78110 public PaymentRequest setInvoiceLines (List <InvoiceLine > invoiceLines ) {
79-
80111 Integer count = 1 ;
81112 for (InvoiceLine invoiceLine : invoiceLines ) {
82-
83113 StringBuilder sb = new StringBuilder ();
84114 sb .append ("openinvoicedata.line" );
85115 sb .append (Integer .toString (count ));
@@ -194,6 +224,7 @@ public String toString() {
194224 sb .append (" card: " ).append (toIndentedString (card )).append ("\n " );
195225 sb .append (" mpiData: " ).append (toIndentedString (mpiData )).append ("\n " );
196226 sb .append (" bankAccount: " ).append (toIndentedString (bankAccount )).append ("\n " );
227+ sb .append (" recurringProcessingModel: " ).append (toIndentedString (recurringProcessingModel )).append ("\n " );
197228 sb .append ("}" );
198229 return sb .toString ();
199230 }
0 commit comments