Skip to content

Commit

Permalink
Merge pull request #117 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Template changes
  • Loading branch information
prolific117 authored Dec 13, 2023
2 parents 0e79691 + e113a26 commit 1084283
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 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>5.21.0</version>
<version>5.22.0</version>
</dependency>
```

With Gradle:

```
implementation 'com.gocardless:gocardless-pro:5.21.0'
implementation 'com.gocardless:gocardless-pro:5.22.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 @@ -20,7 +20,7 @@ plugins {
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'com.gocardless'
version = '5.21.0'
version = '5.22.0'

apply plugin: 'ch.raffael.pegdown-doclet'

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/gocardless/http/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class HttpClient {
private static final String DISALLOWED_USER_AGENT_CHARACTERS =
"[^\\w!#$%&'\\*\\+\\-\\.\\^`\\|~]";
private static final String USER_AGENT =
String.format("gocardless-pro-java/5.21.0 java/%s %s/%s %s/%s",
String.format("gocardless-pro-java/5.22.0 java/%s %s/%s %s/%s",
cleanUserAgentToken(System.getProperty("java.vm.specification.version")),
cleanUserAgentToken(System.getProperty("java.vm.name")),
cleanUserAgentToken(System.getProperty("java.version")),
Expand All @@ -47,8 +47,9 @@ public class HttpClient {
static {
ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
builder.put("GoCardless-Version", "2015-07-06");
builder.put("Accept", "application/json");
builder.put("GoCardless-Client-Library", "gocardless-pro-java");
builder.put("GoCardless-Client-Version", "5.21.0");
builder.put("GoCardless-Client-Version", "5.22.0");
HEADERS = builder.build();
}
private final OkHttpClient rawClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ protected Map<String, String> getPathParams() {
return params.build();
}

@Override
protected Map<String, Object> getQueryParams() {
ImmutableMap.Builder<String, Object> params = ImmutableMap.builder();
params.putAll(super.getQueryParams());
return params.build();
}

@Override
protected String getPathTemplate() {
return "transferred_mandates/:identity";
Expand Down

0 comments on commit 1084283

Please sign in to comment.