Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
#299: Update library up to v1.93.0 (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
proshin-roman committed Mar 22, 2020
1 parent 6631e37 commit 1efb1e2
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ public EditClientParameters withFinTSProductRegistrationNumber(final String finT
return this;
}

public EditClientParameters withSupportSubjectDefault(final String supportSubjectDefault) {
this.origin.put("supportSubjectDefault", supportSubjectDefault);
return this;
}

public EditClientParameters withSupportEmail(final String supportEmail) {
this.origin.put("supportEmail", supportEmail);
return this;
}

@Override
public JSONObject asJson() {
return this.origin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public interface Configuration {

boolean storeSecretsAvailableInWebForm();

Optional<String> supportSubjectDefault();

Optional<String> supportEmail();

boolean paymentsEnabled();

/**
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/proshin/finapi/client/out/FpConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ public boolean storeSecretsAvailableInWebForm() {
return this.origin.getBoolean("storeSecretsAvailableInWebForm");
}

@Override
public Optional<String> supportSubjectDefault() {
return new OptionalStringOf(this.origin, "supportSubjectDefault").get();
}

@Override
public Optional<String> supportEmail() {
return new OptionalStringOf(this.origin, "supportEmail").get();
}

@Override
public boolean paymentsEnabled() {
return this.origin.getBoolean("paymentsEnabled");
Expand Down
26 changes: 24 additions & 2 deletions src/main/resources/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"description": "finAPI RESTful Services",
"version": "v1.92.0",
"version": "v1.93.0",
"title": "finAPI RESTful Services"
},
"basePath": "/",
Expand Down Expand Up @@ -9104,6 +9104,16 @@
"description": "Whether <a href='https://finapi.zendesk.com/hc/en-us/articles/360002596391' target='_blank'>finAPI's web form</a> will provide a checkbox for the user allowing him to choose whether to store login secrets (like a PIN) in finAPI. If this field is set to false, then the user won't have an option to store this data.",
"type": "boolean"
},
"supportSubjectDefault": {
"type": "string",
"example": "Some subject",
"description": "Default value for the subject element of support emails."
},
"supportEmail": {
"type": "string",
"example": "[email protected]",
"description": "Email address to sent support requests to from the web form."
},
"paymentsEnabled": {
"example": true,
"description": "Whether this client is allowed to do payments",
Expand Down Expand Up @@ -9168,6 +9178,17 @@
"example": "ABCDEF1234567890ABCDEF123",
"description": "The FinTS product registration number. Please follow <a href='https://www.hbci-zka.de/register/prod_register.htm' target='_blank'>this link</a> to apply for a registration number. Only customers who have an AISP or PISP license must define their FinTS product registration number. Customers who are relying on the finAPI web form will be assigned to finAPI's FinTS product registration number automatically and do not have to register themselves. During a batch update, finAPI is using the FinTS product registration number of the client, that was used to create the user. If you have previously set a FinTS product registration number and now want to clear it, you can pass an empty string (\"\"). Only hexa decimal characters in capital case with a maximum length of 25 characters are allowed. E.g. 'ABCDEF1234567890ABCDEF123'",
"pattern": "[0-9A-F]*"
},
"supportSubjectDefault": {
"type": "string",
"example": "Some subject",
"description": "Default value for the subject element of support emails. Maximum length is 100. Pass an empty string ('') if you want to clear the current subject default value."
},
"supportEmail": {
"type": "string",
"example": "[email protected]",
"description": "Email address to sent support requests to from the web form. Maximum length is 320. Pass an empty string ('') if you want to clear the current email address.",
"pattern": "[A-Za-z0-9¡-ʯ &\\(\\)\\{\\}\\[\\]\\.:,;\\?!\\+\\-_\\$@#~`\\^€]*"
}
},
"description": "Client configuration parameters"
Expand Down Expand Up @@ -9381,7 +9402,8 @@
"type": "string",
"example": "Bank Connection",
"position": 1,
"description": "New name for the bank connection. Maximum length is 64. If you do not want to change the current name let this field remain unset. If you want to clear the current name, set the field's value to an empty string (\"\")."
"description": "New name for the bank connection. Maximum length is 64. If you do not want to change the current name let this field remain unset. If you want to clear the current name, set the field's value to an empty string (\"\").",
"pattern": "[A-Za-z0-9¡-ʯ &\\(\\)\\{\\}\\[\\]\\.:,;\\?!\\+\\-_\\$@#~`\\^€]*"
},
"bankingUserId": {
"type": "string",
Expand Down
8 changes: 8 additions & 0 deletions src/test/java/org/proshin/finapi/client/FpClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public void testConfiguration() {
" \"IT\"" +
" ]," +
" \"applicationName\": \"My App\"," +
" \"supportSubjectDefault\": \"Some subject\"," +
" \"supportEmail\": \"[email protected]\"," +
" \"paymentsEnabled\": true," +
" \"pinStorageAvailableInWebForm\": true" +
'}')
Expand All @@ -79,6 +81,8 @@ public void testConfiguration() {
assertThat(configuration.isWebScrapingEnabled()).isTrue();
assertThat(configuration.availableBankGroups()).containsExactlyInAnyOrder("DE", "AT", "IT");
assertThat(configuration.applicationName()).isEqualTo(Optional.of("My App"));
assertThat(configuration.supportSubjectDefault()).isEqualTo(Optional.of("Some subject"));
assertThat(configuration.supportEmail()).isEqualTo(Optional.of("[email protected]"));
assertThat(configuration.paymentsEnabled()).isTrue();
assertThat(configuration.pinStorageAvailableInWebForm()).isTrue();
}
Expand Down Expand Up @@ -137,7 +141,11 @@ public void testEdit() {
.withUserAccessTokensValidityPeriod(234)
.withClientAccessTokensValidityPeriod(345)
.withPinStorageAvailableInWebForm(true)
.withStoreSecretsAvailableInWebForm(true)
.withApplicationName("New name")
.withSupportSubjectDefault("Some subject")
.withSupportEmail("[email protected]")
.withFinTSProductRegistrationNumber("finTSProductRegistrationNumber")
);
}

Expand Down

0 comments on commit 1efb1e2

Please sign in to comment.