Skip to content

Commit

Permalink
Crankshaft Build #BU000000V97XV4 @ 2015-05-13 15:30:13 +0000
Browse files Browse the repository at this point in the history
  • Loading branch information
Crankshaft Robot committed May 13, 2015
1 parent 2826055 commit 6e57f18
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/com/gocardless/resources/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private Subscription() {
private Map<String, String> metadata;
private Month month;
private String name;
private String paymentReference;
private String startAt;
private String status;
private List<UpcomingPayments> upcomingPayments;
Expand Down Expand Up @@ -186,6 +187,16 @@ public String getName() {
return name;
}

/**
* An optional payment reference. This will be set as the reference on each payment created and will
* appear on your customer's bank statement. See the documentation for the [create payment
* endpoint](https://developer.gocardless.com/pro/2015-04-29/#payments-create-a-payment) for more
* details.
*/
public String getPaymentReference() {
return paymentReference;
}

/**
* The date on which the first payment should be charged. Must be within one year of creation and on
* or after the [mandate](https://developer.gocardless.com/pro/2015-04-29/#api-endpoints-mandates)'s
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/gocardless/services/SubscriptionService.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public static final class SubscriptionCreateRequest extends PostRequest<Subscrip
private Map<String, String> metadata;
private Month month;
private String name;
private String paymentReference;
private String startAt;

/**
Expand Down Expand Up @@ -268,6 +269,17 @@ public SubscriptionCreateRequest withName(String name) {
return this;
}

/**
* An optional payment reference. This will be set as the reference on each payment created and will
* appear on your customer's bank statement. See the documentation for the [create payment
* endpoint](https://developer.gocardless.com/pro/2015-04-29/#payments-create-a-payment) for more
* details.
*/
public SubscriptionCreateRequest withPaymentReference(String paymentReference) {
this.paymentReference = paymentReference;
return this;
}

/**
* The date on which the first payment should be charged. Must be within one year of creation and on
* or after the [mandate](https://developer.gocardless.com/pro/2015-04-29/#api-endpoints-mandates)'s
Expand Down Expand Up @@ -481,6 +493,7 @@ public static final class SubscriptionUpdateRequest extends PutRequest<Subscript
private final String identity;
private Map<String, String> metadata;
private String name;
private String paymentReference;

/**
* Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and
Expand Down Expand Up @@ -511,6 +524,17 @@ public SubscriptionUpdateRequest withName(String name) {
return this;
}

/**
* An optional payment reference. This will be set as the reference on each payment created and will
* appear on your customer's bank statement. See the documentation for the [create payment
* endpoint](https://developer.gocardless.com/pro/2015-04-29/#payments-create-a-payment) for more
* details.
*/
public SubscriptionUpdateRequest withPaymentReference(String paymentReference) {
this.paymentReference = paymentReference;
return this;
}

private SubscriptionUpdateRequest(HttpClient httpClient, String identity) {
super(httpClient);
this.identity = identity;
Expand Down

0 comments on commit 6e57f18

Please sign in to comment.