Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Thomson committed Jul 8, 2015
2 parents 98a5323 + f696d7c commit aa3125b
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 392 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ With Maven:
<dependency>
<groupId>com.gocardless</groupId>
<artifactId>gocardless-pro</artifactId>
<version>0.4.0</version>
<version>0.5.0</version>
</dependency>
```

With Gradle:

```
compile 'com.gocardless:gocardless-pro:0.4.0'
compile 'com.gocardless:gocardless-pro:0.5.0'
```

## Initializing the client
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'signing'

sourceCompatibility = 1.7
group = ' com.gocardless'
version = '0.4.0'
version = '0.5.0'

repositories {
mavenCentral()
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/com/gocardless/GoCardlessClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class GoCardlessClient {
private final CustomerService customers;
private final CustomerBankAccountService customerBankAccounts;
private final EventService events;
private final HelperService helpers;
private final MandateService mandates;
private final MandatePdfService mandatePdfs;
private final PaymentService payments;
Expand All @@ -33,7 +32,6 @@ private GoCardlessClient(HttpClient httpClient) {
this.customers = new CustomerService(httpClient);
this.customerBankAccounts = new CustomerBankAccountService(httpClient);
this.events = new EventService(httpClient);
this.helpers = new HelperService(httpClient);
this.mandates = new MandateService(httpClient);
this.mandatePdfs = new MandatePdfService(httpClient);
this.payments = new PaymentService(httpClient);
Expand Down Expand Up @@ -85,13 +83,6 @@ public EventService events() {
return events;
}

/**
* A service class for working with helper resources.
*/
public HelperService helpers() {
return helpers;
}

/**
* A service class for working with mandate resources.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/gocardless/http/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Users of this library should not need to access this class directly.
*/
public class HttpClient {
private static final String USER_AGENT = String.format("gocardless-pro/0.4.0 %s/%s %s/%s",
private static final String USER_AGENT = String.format("gocardless-pro/0.5.0 %s/%s %s/%s",
replaceSpaces(System.getProperty("os.name")),
replaceSpaces(System.getProperty("os.version")),
replaceSpaces(System.getProperty("java.vm.name")),
Expand All @@ -29,7 +29,7 @@ public class HttpClient {
private static final Map<String, String> HEADERS;
static {
ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
builder.put("GoCardless-Version", "2015-04-29");
builder.put("GoCardless-Version", "2015-07-06");
HEADERS = builder.build();
}
private final OkHttpClient rawClient;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/gocardless/resources/BankDetailsLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ private BankDetailsLookup() {
// blank to prevent instantiation
}

private List<AvailableScheme> availableSchemes;
private List<AvailableDebitScheme> availableDebitSchemes;
private String bankName;

/**
* Array of [schemes](#mandates_scheme) supported for this bank account. This will be an empty array
* if the bank account is not reachable by any schemes.
*/
public List<AvailableScheme> getAvailableSchemes() {
return availableSchemes;
public List<AvailableDebitScheme> getAvailableDebitSchemes() {
return availableDebitSchemes;
}

/**
Expand All @@ -32,7 +32,7 @@ public String getBankName() {
return bankName;
}

public enum AvailableScheme {
public enum AvailableDebitScheme {
@SerializedName("bacs")
BACS, @SerializedName("sepa_core")
SEPA_CORE,
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/com/gocardless/resources/Helper.java

This file was deleted.

20 changes: 10 additions & 10 deletions src/main/java/com/gocardless/resources/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* - The first payment
* must be charged within 1 year.
* - When neither `month` nor `day_of_month` are present, the
* subscription will recur from the `start_at` based on the `interval_unit`.
* subscription will recur from the `start_date` based on the `interval_unit`.
* - If `month` or
* `day_of_month` are present, the recurrence rules will be applied from the `start_at`, and the
* `day_of_month` are present, the recurrence rules will be applied from the `start_date`, and the
* following validations apply:
*
* | interval_unit | month
Expand Down Expand Up @@ -77,7 +77,7 @@ private Subscription() {
private String createdAt;
private String currency;
private Integer dayOfMonth;
private String endAt;
private String endDate;
private String id;
private Integer interval;
private IntervalUnit intervalUnit;
Expand All @@ -86,7 +86,7 @@ private Subscription() {
private Month month;
private String name;
private String paymentReference;
private String startAt;
private String startDate;
private String status;
private List<UpcomingPayment> upcomingPayments;

Expand All @@ -98,8 +98,8 @@ public Integer getAmount() {
}

/**
* An alternative way to set `end_at`. The total number of payments that should be taken by this
* subscription. This will set `end_at` automatically.
* An alternative way to set `end_date`. The total number of payments that should be taken by this
* subscription. This will set `end_date` automatically.
*/
public Integer getCount() {
return count;
Expand Down Expand Up @@ -133,8 +133,8 @@ public Integer getDayOfMonth() {
* not** be charged. If blank, the subscription will continue forever. Alternatively, `count` can be
* set to achieve a specific number of payments.
*/
public String getEndAt() {
return endAt;
public String getEndDate() {
return endDate;
}

/**
Expand Down Expand Up @@ -200,8 +200,8 @@ public String getPaymentReference() {
* or after the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When blank, this
* will be set as the mandate's `next_possible_charge_date`.
*/
public String getStartAt() {
return startAt;
public String getStartDate() {
return startDate;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public BankDetailsLookupService(HttpClient httpClient) {
* Performs a bank details lookup.
*
* Bank account details may be supplied using [local
* details](#ui-local-bank-details) or an IBAN.
* details](#appendix-local-bank-details) or an IBAN.
*/
public BankDetailsLookupCreateRequest create() {
return new BankDetailsLookupCreateRequest(httpClient);
Expand All @@ -36,7 +36,7 @@ public BankDetailsLookupCreateRequest create() {
* Performs a bank details lookup.
*
* Bank account details may be supplied using [local
* details](#ui-local-bank-details) or an IBAN.
* details](#appendix-local-bank-details) or an IBAN.
*/
public static final class BankDetailsLookupCreateRequest extends PostRequest<BankDetailsLookup> {
private String accountNumber;
Expand All @@ -46,29 +46,26 @@ public static final class BankDetailsLookupCreateRequest extends PostRequest<Ban
private String iban;

/**
* Bank account number - see [local
* details](https://developer.gocardless.com/pro/2015-04-29/#ui-local-bank-details) for more
* information. Alternatively you can provide an `iban`.
* Bank account number - see [local details](#appendix-local-bank-details) for more information.
* Alternatively you can provide an `iban`.
*/
public BankDetailsLookupCreateRequest withAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}

/**
* Bank code - see [local
* details](https://developer.gocardless.com/pro/2015-04-29/#ui-local-bank-details) for more
* information. Alternatively you can provide an `iban`.
* Bank code - see [local details](#appendix-local-bank-details) for more information. Alternatively
* you can provide an `iban`.
*/
public BankDetailsLookupCreateRequest withBankCode(String bankCode) {
this.bankCode = bankCode;
return this;
}

/**
* Branch code - see [local
* details](https://developer.gocardless.com/pro/2015-04-29/#ui-local-bank-details) for more
* information. Alternatively you can provide an `iban`.
* Branch code - see [local details](#appendix-local-bank-details) for more information.
* Alternatively you can provide an `iban`.
*/
public BankDetailsLookupCreateRequest withBranchCode(String branchCode) {
this.branchCode = branchCode;
Expand All @@ -86,7 +83,7 @@ public BankDetailsLookupCreateRequest withCountryCode(String countryCode) {

/**
* International Bank Account Number. Alternatively you can provide [local
* details](https://developer.gocardless.com/pro/2015-04-29/#ui-local-bank-details).
* details](#appendix-local-bank-details).
*/
public BankDetailsLookupCreateRequest withIban(String iban) {
this.iban = iban;
Expand Down
Loading

0 comments on commit aa3125b

Please sign in to comment.