Skip to content

Commit fa33887

Browse files
[ACL-250]: Adds payouts in Poland (#339)
Co-authored-by: tl-luca-baggi <[email protected]>
1 parent 27c37d4 commit fa33887

File tree

19 files changed

+210
-55
lines changed

19 files changed

+210
-55
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8+
## [17.1.0] - 2025-03-14
9+
### Added
10+
* Add support for PLN payouts
11+
812
## [17.0.0] - 2025-01-15
913
### Changed
1014
* ⚠️ Breaking: removed deprecated HPP link builder

build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
plugins {
22
id 'java-library'
33
// to unleash the lombok magic
4-
id "io.freefair.lombok" version "8.11"
4+
id "io.freefair.lombok" version "8.12.2.1"
55
// to make our tests output more fancy
66
id 'com.adarshr.test-logger' version '4.0.0'
77
// to publish packages
88
id 'maven-publish'
99
// code linting
10-
id "com.diffplug.spotless" version "7.0.1"
10+
id "com.diffplug.spotless" version "7.0.2"
1111
// test coverage
1212
id 'jacoco'
1313
id 'com.github.kt3k.coveralls' version '2.12.2'
@@ -108,14 +108,15 @@ dependencies {
108108
implementation group: 'org.tinylog', name: 'tinylog-impl', version: tinyLogVersion
109109

110110
// JUnit test framework.
111-
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.11.4'
111+
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.12.0'
112+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
112113

113114
// Mocking libraries
114115
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.15.2'
115-
testImplementation group: 'org.wiremock', name: 'wiremock', version: '3.10.0'
116+
testImplementation group: 'org.wiremock', name: 'wiremock', version: '3.12.1'
116117

117118
// Wait test utility
118-
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.2.2'
119+
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.3.0'
119120

120121
// Transitive dependencies constraints
121122
constraints {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Main properties
22
group=com.truelayer
33
archivesBaseName=truelayer-java
4-
version=17.0.0
4+
version=17.1.0
55

66
# Artifacts properties
77
sonatype_repository_url=https://s01.oss.sonatype.org/service/local/

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/com/truelayer/java/entities/beneficiary/BusinessAccount.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
@Value
1111
@EqualsAndHashCode(callSuper = false)
1212
public class BusinessAccount extends Beneficiary {
13-
private final Type type = BUSINESS_ACCOUNT;
13+
Type type = BUSINESS_ACCOUNT;
1414

15-
private String reference;
15+
String reference;
1616

17-
private String accountHolderName;
17+
String accountHolderName;
1818

19-
private List<AccountIdentifier> accountIdentifiers;
19+
List<AccountIdentifier> accountIdentifiers;
2020
}

src/main/java/com/truelayer/java/entities/beneficiary/ExternalAccount.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
@Value
1111
@EqualsAndHashCode(callSuper = false)
1212
public class ExternalAccount extends Beneficiary {
13-
private final Type type = EXTERNAL_ACCOUNT;
13+
Type type = EXTERNAL_ACCOUNT;
1414

15-
private String reference;
15+
String reference;
1616

17-
private String accountHolderName;
17+
String accountHolderName;
1818

19-
private List<AccountIdentifier> accountIdentifiers;
19+
List<AccountIdentifier> accountIdentifiers;
2020
}

src/main/java/com/truelayer/java/entities/beneficiary/PaymentSource.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
@Value
1111
@EqualsAndHashCode(callSuper = false)
1212
public class PaymentSource extends Beneficiary {
13-
private final Type type = PAYMENT_SOURCE;
13+
Type type = PAYMENT_SOURCE;
1414

15-
private String paymentSourceId;
15+
String paymentSourceId;
1616

17-
private String userId;
17+
String userId;
1818

19-
private String reference;
19+
String reference;
2020

21-
private String accountHolderName;
21+
String accountHolderName;
2222

2323
private List<AccountIdentifier> accountIdentifiers;
2424
}

src/main/java/com/truelayer/java/merchantaccounts/entities/transactions/Remitter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
*/
1313
@Value
1414
public class Remitter {
15-
private List<AccountIdentifier> accountIdentifiers;
15+
List<AccountIdentifier> accountIdentifiers;
1616

17-
private String accountHolderName;
17+
String accountHolderName;
1818

19-
private String reference;
19+
String reference;
2020
}

src/main/java/com/truelayer/java/merchantaccounts/entities/transactions/accountidentifier/AccountIdentifier.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
@JsonSubTypes({
2424
@JsonSubTypes.Type(value = SortCodeAccountNumberAccountIdentifier.class, name = "sort_code_account_number"),
2525
@JsonSubTypes.Type(value = IbanAccountIdentifier.class, name = "iban"),
26+
@JsonSubTypes.Type(value = NrbAccountIdentifier.class, name = "nrb"),
2627
})
2728
@ToString
2829
@EqualsAndHashCode
@@ -40,6 +41,11 @@ public boolean isIbanIdentifier() {
4041
return this instanceof IbanAccountIdentifier;
4142
}
4243

44+
@JsonIgnore
45+
public boolean isNrbIdentifier() {
46+
return this instanceof NrbAccountIdentifier;
47+
}
48+
4349
@JsonIgnore
4450
public SortCodeAccountNumberAccountIdentifier asSortCodeAccountNumber() {
4551
if (!isSortCodeAccountNumberIdentifier()) {
@@ -56,6 +62,14 @@ public IbanAccountIdentifier asIban() {
5662
return (IbanAccountIdentifier) this;
5763
}
5864

65+
@JsonIgnore
66+
public NrbAccountIdentifier asNrb() {
67+
if (!isNrbIdentifier()) {
68+
throw new TrueLayerException(buildErrorMessage());
69+
}
70+
return (NrbAccountIdentifier) this;
71+
}
72+
5973
private String buildErrorMessage() {
6074
return String.format("Identifier is of type %s.", this.getClass().getSimpleName());
6175
}
@@ -64,7 +78,8 @@ private String buildErrorMessage() {
6478
@RequiredArgsConstructor
6579
public enum Type {
6680
SORT_CODE_ACCOUNT_NUMBER("sort_code_account_number"),
67-
IBAN("iban");
81+
IBAN("iban"),
82+
NRB("nrb");
6883

6984
@JsonValue
7085
private final String type;

0 commit comments

Comments
 (0)