@@ -31,6 +31,7 @@ private BillingRequest() {
31
31
private PurposeCode purposeCode ;
32
32
private Resources resources ;
33
33
private Status status ;
34
+ private SubscriptionRequest subscriptionRequest ;
34
35
35
36
/**
36
37
* List of actions that can be performed before this billing request can be fulfilled.
@@ -119,6 +120,13 @@ public Status getStatus() {
119
120
return status ;
120
121
}
121
122
123
+ /**
124
+ * Request for a subscription
125
+ */
126
+ public SubscriptionRequest getSubscriptionRequest () {
127
+ return subscriptionRequest ;
128
+ }
129
+
122
130
public enum PurposeCode {
123
131
@ SerializedName ("mortgage" )
124
132
MORTGAGE , @ SerializedName ("utility" )
@@ -383,6 +391,7 @@ private Links() {
383
391
private String paymentProvider ;
384
392
private String paymentRequest ;
385
393
private String paymentRequestPayment ;
394
+ private String subscriptionRequest ;
386
395
387
396
/**
388
397
* (Optional) ID of the [bank authorisation](#billing-requests-bank-authorisations) that was
@@ -464,6 +473,13 @@ public String getPaymentRequest() {
464
473
public String getPaymentRequestPayment () {
465
474
return paymentRequestPayment ;
466
475
}
476
+
477
+ /**
478
+ * (Optional) ID of the associated subscription request
479
+ */
480
+ public String getSubscriptionRequest () {
481
+ return subscriptionRequest ;
482
+ }
467
483
}
468
484
469
485
/**
@@ -477,6 +493,7 @@ private MandateRequest() {
477
493
}
478
494
479
495
private AuthorisationSource authorisationSource ;
496
+ private String consentType ;
480
497
private Constraints constraints ;
481
498
private String currency ;
482
499
private String description ;
@@ -500,6 +517,15 @@ public AuthorisationSource getAuthorisationSource() {
500
517
return authorisationSource ;
501
518
}
502
519
520
+ /**
521
+ * This attribute represents the authorisation type between the payer and merchant. It can
522
+ * be set to one-off, recurring or standing for ACH scheme. And single, recurring and
523
+ * sporadic for PAD scheme.
524
+ */
525
+ public String getConsentType () {
526
+ return consentType ;
527
+ }
528
+
503
529
/**
504
530
* Constraints that will apply to the mandate_request. (Optional) Specifically for PayTo and
505
531
* VRP.
@@ -1002,6 +1028,7 @@ private CustomerBankAccount() {
1002
1028
private String accountHolderName ;
1003
1029
private String accountNumberEnding ;
1004
1030
private AccountType accountType ;
1031
+ private String bankAccountToken ;
1005
1032
private String bankName ;
1006
1033
private String countryCode ;
1007
1034
private String createdAt ;
@@ -1038,6 +1065,14 @@ public AccountType getAccountType() {
1038
1065
return accountType ;
1039
1066
}
1040
1067
1068
+ /**
1069
+ * A token to uniquely refer to a set of bank account details. This feature is still in
1070
+ * early access and is only available for certain organisations.
1071
+ */
1072
+ public String getBankAccountToken () {
1073
+ return bankAccountToken ;
1074
+ }
1075
+
1041
1076
/**
1042
1077
* Name of bank, taken from the bank details.
1043
1078
*/
@@ -1249,4 +1284,156 @@ public String getSwedishIdentityNumber() {
1249
1284
}
1250
1285
}
1251
1286
}
1287
+
1288
+ /**
1289
+ * Represents a subscription request resource returned from the API.
1290
+ *
1291
+ * Request for a subscription
1292
+ */
1293
+ public static class SubscriptionRequest {
1294
+ private SubscriptionRequest () {
1295
+ // blank to prevent instantiation
1296
+ }
1297
+
1298
+ private Integer amount ;
1299
+ private Integer appFee ;
1300
+ private Integer count ;
1301
+ private String currency ;
1302
+ private Integer dayOfMonth ;
1303
+ private Integer interval ;
1304
+ private IntervalUnit intervalUnit ;
1305
+ private Map <String , Object > metadata ;
1306
+ private Month month ;
1307
+ private String name ;
1308
+ private String paymentReference ;
1309
+ private String startDate ;
1310
+
1311
+ /**
1312
+ * Amount in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR).
1313
+ */
1314
+ public Integer getAmount () {
1315
+ return amount ;
1316
+ }
1317
+
1318
+ /**
1319
+ * The amount to be deducted from each payment as an app fee, to be paid to the partner
1320
+ * integration which created the subscription, in the lowest denomination for the currency
1321
+ * (e.g. pence in GBP, cents in EUR).
1322
+ */
1323
+ public Integer getAppFee () {
1324
+ return appFee ;
1325
+ }
1326
+
1327
+ /**
1328
+ * The total number of payments that should be taken by this subscription.
1329
+ */
1330
+ public Integer getCount () {
1331
+ return count ;
1332
+ }
1333
+
1334
+ /**
1335
+ * [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently
1336
+ * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported.
1337
+ */
1338
+ public String getCurrency () {
1339
+ return currency ;
1340
+ }
1341
+
1342
+ /**
1343
+ * As per RFC 2445. The day of the month to charge customers on. `1`-`28` or `-1` to
1344
+ * indicate the last day of the month.
1345
+ */
1346
+ public Integer getDayOfMonth () {
1347
+ return dayOfMonth ;
1348
+ }
1349
+
1350
+ /**
1351
+ * Number of `interval_units` between customer charge dates. Must be greater than or equal
1352
+ * to `1`. Must result in at least one charge date per year. Defaults to `1`.
1353
+ */
1354
+ public Integer getInterval () {
1355
+ return interval ;
1356
+ }
1357
+
1358
+ /**
1359
+ * The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`.
1360
+ */
1361
+ public IntervalUnit getIntervalUnit () {
1362
+ return intervalUnit ;
1363
+ }
1364
+
1365
+ /**
1366
+ * Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50
1367
+ * characters and values up to 500 characters.
1368
+ */
1369
+ public Map <String , Object > getMetadata () {
1370
+ return metadata ;
1371
+ }
1372
+
1373
+ /**
1374
+ * Name of the month on which to charge a customer. Must be lowercase. Only applies when the
1375
+ * interval_unit is `yearly`.
1376
+ *
1377
+ */
1378
+ public Month getMonth () {
1379
+ return month ;
1380
+ }
1381
+
1382
+ /**
1383
+ * Optional name for the subscription. This will be set as the description on each payment
1384
+ * created. Must not exceed 255 characters.
1385
+ */
1386
+ public String getName () {
1387
+ return name ;
1388
+ }
1389
+
1390
+ /**
1391
+ * An optional payment reference. This will be set as the reference on each payment created
1392
+ * and will appear on your customer's bank statement. See the documentation for the [create
1393
+ * payment endpoint](#payments-create-a-payment) for more details. <br />
1394
+ * <p class="restricted-notice">
1395
+ * <strong>Restricted</strong>: You need your own Service User Number to specify a payment
1396
+ * reference for Bacs payments.
1397
+ * </p>
1398
+ */
1399
+ public String getPaymentReference () {
1400
+ return paymentReference ;
1401
+ }
1402
+
1403
+ /**
1404
+ * The date on which the first payment should be charged. Must be on or after the
1405
+ * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When left blank and
1406
+ * `month` or `day_of_month` are provided, this will be set to the date of the first
1407
+ * payment. If created without `month` or `day_of_month` this will be set as the mandate's
1408
+ * `next_possible_charge_date`
1409
+ */
1410
+ public String getStartDate () {
1411
+ return startDate ;
1412
+ }
1413
+
1414
+ public enum IntervalUnit {
1415
+ @ SerializedName ("weekly" )
1416
+ WEEKLY , @ SerializedName ("monthly" )
1417
+ MONTHLY , @ SerializedName ("yearly" )
1418
+ YEARLY , @ SerializedName ("unknown" )
1419
+ UNKNOWN
1420
+ }
1421
+
1422
+ public enum Month {
1423
+ @ SerializedName ("january" )
1424
+ JANUARY , @ SerializedName ("february" )
1425
+ FEBRUARY , @ SerializedName ("march" )
1426
+ MARCH , @ SerializedName ("april" )
1427
+ APRIL , @ SerializedName ("may" )
1428
+ MAY , @ SerializedName ("june" )
1429
+ JUNE , @ SerializedName ("july" )
1430
+ JULY , @ SerializedName ("august" )
1431
+ AUGUST , @ SerializedName ("september" )
1432
+ SEPTEMBER , @ SerializedName ("october" )
1433
+ OCTOBER , @ SerializedName ("november" )
1434
+ NOVEMBER , @ SerializedName ("december" )
1435
+ DECEMBER , @ SerializedName ("unknown" )
1436
+ UNKNOWN
1437
+ }
1438
+ }
1252
1439
}
0 commit comments