Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,10 @@ EnduringConsentRequest request = new EnduringConsentRequest()
.redirectUri(redirectUri)))
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(total))
.total(totalPerPeriod))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(totalPerPayment))
.period(period)
.fromTimestamp(startDate)
.expiryTimestamp(endDate);
Expand All @@ -503,7 +506,10 @@ EnduringConsentRequest request = new EnduringConsentRequest()
.bank(bank))))
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(total))
.total(totalPerPeriod))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(totalPerPayment))
.period(period)
.fromTimestamp(startDate)
.expiryTimestamp(endDate);
Expand All @@ -522,7 +528,10 @@ EnduringConsentRequest request = new EnduringConsentRequest()
.bank(bank))))
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(total))
.total(totalPerPeriod))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(totalPerPayment))
.period(period)
.fromTimestamp(startDate)
.expiryTimestamp(endDate);
Expand All @@ -538,7 +547,10 @@ EnduringConsentRequest request = new EnduringConsentRequest()
.redirectUri(redirectUri)))
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(total))
.total(totalPerPeriod))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(totalPerPayment))
.period(period)
.fromTimestamp(startDate)
.expiryTimestamp(endDate);
Expand All @@ -556,7 +568,10 @@ EnduringConsentRequest request = new EnduringConsentRequest()
.callbackUrl(callbackUrl)))
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(total))
.total(totalPerPeriod))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total(totalPerPayment))
.period(period)
.fromTimestamp(startDate)
.expiryTimestamp(endDate);
Expand Down
6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>nz.co.blinkpay</groupId>
<artifactId>blink-debit-api-client-java-parent</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>blink-debit-api-client-java-core</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>

<name>blink-debit-api-client-java-core</name>
<description>Blink Debit API Client shared library</description>
Expand All @@ -22,7 +22,7 @@
<maven.compiler.target>${java.version}</maven.compiler.target>

<snakeyaml.version>2.4</snakeyaml.version>
<system.stubs.jupiter.version>2.1.7</system.stubs.jupiter.version>
<system.stubs.jupiter.version>2.1.8</system.stubs.jupiter.version>
</properties>

<dependencies>
Expand Down
14 changes: 7 additions & 7 deletions java-spring6/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>nz.co.blinkpay</groupId>
<artifactId>blink-debit-api-client-java-parent</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>blink-debit-api-client-java-spring6</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>

<name>blink-debit-api-client-java-spring6</name>
<description>Blink Debit API Client for Java 21 and Spring Framework 6 / Spring Boot 3</description>
Expand All @@ -21,18 +21,18 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<core.version>1.4.0</core.version>
<spring.boot.version>3.4.4</spring.boot.version>
<spring.security.version>6.4.4</spring.security.version>
<core.version>1.5.0</core.version>
<spring.boot.version>3.5.0</spring.boot.version>
<spring.security.version>6.5.0</spring.security.version>
<spring.cloud.starter.circuitbreaker.reactor.resilience4j.version>3.2.1</spring.cloud.starter.circuitbreaker.reactor.resilience4j.version>
<resilience4j.version>2.3.0</resilience4j.version>
<swagger.version>2.2.29</swagger.version>
<swagger.version>2.2.32</swagger.version>
<java.jwt.version>4.5.0</java.jwt.version>
<slf4j.version>2.0.17</slf4j.version>
<logback.version>1.5.18</logback.version>

<spring.cloud.contract.wiremock.version>4.2.1</spring.cloud.contract.wiremock.version>
<reactor.test.version>3.7.4</reactor.test.version>
<reactor.test.version>3.7.6</reactor.test.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ void createEnduringConsentWithRedirectFlow() throws BlinkServiceException {
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.FORTNIGHTLY)
.fromTimestamp(OffsetDateTime.now(ZONE_ID))
.expiryTimestamp(OffsetDateTime.now(ZONE_ID).plusMonths(11))
Expand Down Expand Up @@ -174,6 +177,10 @@ void getEnduringConsentWithRedirectFlow() throws BlinkServiceException {
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
assertThat(detail.getMaximumAmountPayment())
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
}

@Test
Expand All @@ -198,6 +205,9 @@ void createEnduringConsentWithDecoupledFlow() throws BlinkServiceException {
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.FORTNIGHTLY)
.fromTimestamp(OffsetDateTime.now(ZONE_ID))
.expiryTimestamp(OffsetDateTime.now(ZONE_ID).plusMonths(11))
Expand Down Expand Up @@ -250,6 +260,10 @@ void getEnduringConsentWithDecoupledFlow() throws BlinkServiceException {
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
assertThat(detail.getMaximumAmountPayment())
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
}

@Test
Expand All @@ -265,6 +279,9 @@ void createEnduringConsentWithGatewayFlowAndRedirectFlowHint() throws BlinkServi
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.FORTNIGHTLY)
.fromTimestamp(OffsetDateTime.now(ZONE_ID))
.expiryTimestamp(OffsetDateTime.now(ZONE_ID).plusMonths(11))
Expand Down Expand Up @@ -296,6 +313,9 @@ void createEnduringConsentWithGatewayFlowAndDecoupledFlowHint() throws BlinkServ
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.FORTNIGHTLY)
.fromTimestamp(OffsetDateTime.now(ZONE_ID))
.expiryTimestamp(OffsetDateTime.now(ZONE_ID).plusMonths(11))
Expand Down Expand Up @@ -347,5 +367,9 @@ void getEnduringConsentWithGatewayFlow() throws BlinkServiceException {
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
assertThat(detail.getMaximumAmountPayment())
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"total": "50.00",
"currency": "NZD"
},
"maximum_amount_payment": {
"total": "50.00",
"currency": "NZD"
},
"period": "fortnightly"
},
"payments": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"total": "50.00",
"currency": "NZD"
},
"maximum_amount_payment": {
"total": "50.00",
"currency": "NZD"
},
"period": "fortnightly"
},
"payments": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"total": "50.00",
"currency": "NZD"
},
"maximum_amount_payment": {
"total": "50.00",
"currency": "NZD"
},
"period": "fortnightly"
},
"payments": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ void awaitTimedOutEnduringConsentThenThrowRuntimeException() throws BlinkService
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.MONTHLY)
.fromTimestamp(OffsetDateTime.now(ZoneId.of("Pacific/Auckland")))
.hashedCustomerIdentifier("88df3798e32512ac340164f7ed133343d6dcb4888e4a91b03512dedd9800d12e");
Expand Down Expand Up @@ -374,6 +377,9 @@ void awaitAuthorisedEnduringConsent() throws BlinkServiceException {
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.MONTHLY)
.fromTimestamp(OffsetDateTime.now(ZoneId.of("Pacific/Auckland")))
.hashedCustomerIdentifier("88df3798e32512ac340164f7ed133343d6dcb4888e4a91b03512dedd9800d12e");
Expand Down Expand Up @@ -407,6 +413,10 @@ void awaitAuthorisedEnduringConsent() throws BlinkServiceException {
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
assertThat(detail.getMaximumAmountPayment())
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
assertThat(detail.getFlow()).isNotNull();
DecoupledFlow flowDetail = (DecoupledFlow) detail.getFlow().getDetail();
assertThat(flowDetail)
Expand All @@ -430,6 +440,9 @@ void awaitTimedOutEnduringConsentThenThrowConsentTimeoutException() throws Blink
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.MONTHLY)
.fromTimestamp(OffsetDateTime.now(ZoneId.of("Pacific/Auckland")))
.hashedCustomerIdentifier("88df3798e32512ac340164f7ed133343d6dcb4888e4a91b03512dedd9800d12e");
Expand Down Expand Up @@ -479,6 +492,9 @@ void awaitAuthorisedEnduringConsentOrThrowException() throws BlinkServiceExcepti
.maximumAmountPeriod(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.maximumAmountPayment(new Amount()
.currency(Amount.CurrencyEnum.NZD)
.total("50.00"))
.period(Period.MONTHLY)
.fromTimestamp(OffsetDateTime.now(ZoneId.of("Pacific/Auckland")))
.hashedCustomerIdentifier("88df3798e32512ac340164f7ed133343d6dcb4888e4a91b03512dedd9800d12e");
Expand Down Expand Up @@ -512,6 +528,10 @@ void awaitAuthorisedEnduringConsentOrThrowException() throws BlinkServiceExcepti
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
assertThat(detail.getMaximumAmountPayment())
.isNotNull()
.extracting(Amount::getCurrency, Amount::getTotal)
.containsExactly(Amount.CurrencyEnum.NZD, "50.00");
assertThat(detail.getFlow()).isNotNull();
DecoupledFlow flowDetail = (DecoupledFlow) detail.getFlow().getDetail();
assertThat(flowDetail)
Expand Down
Loading