diff --git a/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/components/dropins/jjwt-0.9.1.jar b/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/components/dropins/jjwt-0.9.1.jar new file mode 100644 index 00000000..905c80e9 Binary files /dev/null and b/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/components/dropins/jjwt-0.9.1.jar differ diff --git a/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/conf/financial-services.xml b/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/conf/financial-services.xml index 0b8c65dd..426ffe0f 100644 --- a/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/conf/financial-services.xml +++ b/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/conf/financial-services.xml @@ -36,4 +36,7 @@ 2000 1500 + + consent_id + diff --git a/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 b/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 index 9f1b4358..0f57a600 100644 --- a/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 +++ b/financial-services-accelerator/accelerators/fs-apim/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2 @@ -25,12 +25,12 @@ org.wso2.financial.services.accelerator.gateway.executor.core.DefaultRequestRouter {% endif %} - {% for type in financial_services.gateway.openbanking_gateway_executors.type %} - <{{type.name}}> - {% for executor in type.executors %} + {% for executors in financial_services.gateway.executors %} + <{{executors.type}}> + {% for executor in executors.executor %} {% endfor %} - + {% endfor %} {% if financial_services.gateway.consent.validation.endpoint is defined %} @@ -62,4 +62,11 @@ {{financial_services.http_connection_pool.max_connections_per_route}} {% endif %} + + {% if financial_services.identity.consent_id_claim_name is defined %} + {{financial_services.identity.consent_id_claim_name}} + {% else %} + consent_id + {% endif %} + diff --git a/financial-services-accelerator/accelerators/fs-apim/pom.xml b/financial-services-accelerator/accelerators/fs-apim/pom.xml index 3249ddba..796e3613 100644 --- a/financial-services-accelerator/accelerators/fs-apim/pom.xml +++ b/financial-services-accelerator/accelerators/fs-apim/pom.xml @@ -47,14 +47,11 @@ - ${project.basedir}/carbon-home/repository/components/lib + ${project.basedir}/carbon-home/repository/components/dropins **/jjwt-0.9.1.jar - - ${project.basedir}/carbon-home/repository/components/dropins - ${project.basedir}/carbon-home/repository/deployment/server/webapps diff --git a/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/account-info-swagger.yaml b/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/account-info-swagger.yaml index 0d8b166b..28ab170f 100644 --- a/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/account-info-swagger.yaml +++ b/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/account-info-swagger.yaml @@ -17,14 +17,12 @@ schemes: - https consumes: - application/json; charset=utf-8 - - application/jose+jwe produces: - application/json; charset=utf-8 - - application/jose+jwe security: - default: [] paths: - /account-access-consents: + '/account-access-consents': post: tags: - Account Access @@ -140,6 +138,42 @@ paths: x-auth-type: Application x-throttling-tier: Unlimited x-scope: accounts + '/accounts': + get: + tags: + - Accounts + summary: Get Accounts + operationId: GetAccounts + parameters: + - $ref: '#/parameters/x-fapi-auth-date' + - $ref: '#/parameters/x-fapi-customer-ip-address' + - $ref: '#/parameters/x-fapi-interaction-id' + - $ref: '#/parameters/Authorization' + responses: + '200': + $ref: '#/responses/200AccountsRead' + '400': + $ref: '#/responses/400Error' + '401': + $ref: '#/responses/401Error' + '403': + $ref: '#/responses/403Error' + '405': + $ref: '#/responses/405Error' + '406': + $ref: '#/responses/406Error' + '429': + $ref: '#/responses/429Error' + '500': + $ref: '#/responses/500Error' + security: + - PSUOAuth2Security: + - accounts + - default: + - accounts + x-auth-type: Application User + x-throttling-tier: Unlimited + x-scope: accounts '/accounts/{AccountId}': get: tags: @@ -228,8 +262,6 @@ paths: - $ref: '#/parameters/x-fapi-customer-ip-address' - $ref: '#/parameters/x-fapi-interaction-id' - $ref: '#/parameters/Authorization' - - $ref: '#/parameters/FromBookingDateTimeParam' - - $ref: '#/parameters/ToBookingDateTimeParam' responses: '200': $ref: '#/responses/200AccountsAccountIdTransactionsRead' @@ -258,54 +290,6 @@ paths: x-throttling-tier: Unlimited x-scope: accounts parameters: - FromBookingDateTimeParam: - in: query - name: fromBookingDateTime - type: string - format: date-time - description: >- - The UTC ISO 8601 Date Time to filter transactions FROM - - NB Time component is optional - set to 00:00:00 for just Date. - - If the Date Time contains a timezone, the ASPSP must ignore the timezone - component. - ToBookingDateTimeParam: - in: query - name: toBookingDateTime - type: string - format: date-time - description: >- - The UTC ISO 8601 Date Time to filter transactions TO - - NB Time component is optional - set to 00:00:00 for just Date. - - If the Date Time contains a timezone, the ASPSP must ignore the timezone - component. - FromStatementDateTimeParam: - in: query - name: fromStatementDateTime - type: string - format: date-time - description: >- - The UTC ISO 8601 Date Time to filter statements FROM - - NB Time component is optional - set to 00:00:00 for just Date. - - If the Date Time contains a timezone, the ASPSP must ignore the timezone - component. - ToStatementDateTimeParam: - in: query - name: toStatementDateTime - type: string - format: date-time - description: >- - The UTC ISO 8601 Date Time to filter statements TO - - NB Time component is optional - set to 00:00:00 for just Date. - - If the Date Time contains a timezone, the ASPSP must ignore the timezone - component. OBReadConsent1Param: name: OBReadConsent1Param in: body @@ -313,36 +297,12 @@ parameters: required: true schema: $ref: '#/definitions/OBReadConsent1' - ConsentId: - name: ConsentId - in: path - description: ConsentId - required: true - type: string - AccountId: - name: AccountId - in: path - description: AccountId - required: true - type: string - StatementId: - name: StatementId - in: path - description: StatementId - required: true - type: string Authorization: in: header name: Authorization type: string required: true description: 'An Authorisation Token as per https://tools.ietf.org/html/rfc6750' - x-customer-user-agent: - in: header - name: x-customer-user-agent - type: string - description: Indicates the user-agent that the PSU is using. - required: false x-fapi-customer-ip-address: in: header name: x-fapi-customer-ip-address @@ -365,28 +325,24 @@ parameters: ^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$ + ConsentId: + name: ConsentId + in: path + description: ConsentId + required: true + type: string + AccountId: + name: AccountId + in: path + description: AccountId + required: true + type: string x-fapi-interaction-id: in: header name: x-fapi-interaction-id type: string required: false description: An RFC4122 UID used as a correlation id. - x-idempotency-key: - name: x-idempotency-key - in: header - description: | - Every request will be processed only once per x-idempotency-key. The - Idempotency Key will be valid for 24 hours. - required: true - type: string - pattern: ^(?!\s)(.*)(\S)$ - maxLength: 40 - x-jws-signature: - in: header - name: x-jws-signature - type: string - required: true - description: A detached JWS signature of the body of the payload. responses: 201AccountAccessConsentsCreated: description: Account Access Consents Created @@ -417,7 +373,7 @@ responses: type: string description: An RFC4122 UID used as a correlation id. schema: - $ref: '#/definitions/OBReadAccount4' + $ref: '#/definitions/OBReadAccount5' 200AccountsAccountIdRead: description: Accounts Read headers: @@ -434,14 +390,6 @@ responses: description: An RFC4122 UID used as a correlation id. schema: $ref: '#/definitions/OBReadBalance1' - 200BalancesRead: - description: Balances Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadBalance1' 200AccountsAccountIdTransactionsRead: description: Transactions Read headers: @@ -450,174 +398,6 @@ responses: description: An RFC4122 UID used as a correlation id. schema: $ref: '#/definitions/OBReadTransaction5' - 200TransactionsRead: - description: Transactions Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadTransaction5' - 200AccountsAccountIdBeneficiariesRead: - description: Beneficiaries Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadBeneficiary3' - 200BeneficiariesRead: - description: Beneficiaries Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadBeneficiary3' - 200AccountsAccountIdDirectDebitsRead: - description: Direct Debits Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadDirectDebit1' - 200DirectDebitsRead: - description: Direct Debits Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadDirectDebit1' - 200AccountsAccountIdStandingOrdersRead: - description: Standing Orders Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadStandingOrder5' - 200StandingOrdersRead: - description: Standing Orders Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadStandingOrder5' - 200AccountsAccountIdProductRead: - description: Products Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadProduct2' - 200ProductsRead: - description: Products Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadProduct2' - 200AccountsAccountIdOffersRead: - description: Offers Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadOffer1' - 200OffersRead: - description: Offers Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadOffer1' - 200AccountsAccountIdPartiesRead: - description: Parties Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadParty3' - 200AccountsAccountIdPartyRead: - description: Parties Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadParty2' - 200PartyRead: - description: Parties Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadParty2' - 200AccountsAccountIdScheduledPaymentsRead: - description: Scheduled Payments Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadScheduledPayment2' - 200ScheduledPaymentsRead: - description: Scheduled Payments Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadScheduledPayment2' - 200AccountsAccountIdStatementsRead: - description: Statements Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadStatement2' - 200AccountsAccountIdStatementsStatementIdRead: - description: Statements Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadStatement2' - 200AccountsAccountIdStatementsStatementIdFileRead: - description: Statements Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/File' - 200AccountsAccountIdStatementsStatementIdTransactionsRead: - description: Transactions Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadTransaction5' - 200StatementsRead: - description: Statements Read - headers: - x-fapi-interaction-id: - type: string - description: An RFC4122 UID used as a correlation id. - schema: - $ref: '#/definitions/OBReadStatement2' 400Error: description: Bad request headers: @@ -712,301 +492,178 @@ securityDefinitions: x-scopes-bindings: accounts: Internal/subscriber definitions: - AccountId: - description: >- - A unique and immutable identifier used to identify the account resource. - This identifier has no meaning to the account owner. - type: string - minLength: 1 - maxLength: 40 - ActiveOrHistoricCurrencyCode_0: - description: >- - Identification of the currency in which the account is held. - - Usage: Currency should only be used in case one and the same account - number covers several currencies - - and the initiating party needs to identify which currency needs to be used - for settlement on the account. - type: string - pattern: '^[A-Z]{3,3}$' - ActiveOrHistoricCurrencyCode_1: - description: >- - A code allocated to a currency by a Maintenance Agency under an - international identification scheme, as described in the latest edition of - the international standard ISO 4217 "Codes for the representation of - currencies and funds". - type: string - pattern: '^[A-Z]{3,3}$' - AddressLine: - description: >- - Information that locates and identifies a specific address for a - transaction entry, that is presented in free format text. - type: string - minLength: 1 - maxLength: 70 - BeneficiaryId: - description: >- - A unique and immutable identifier used to identify the beneficiary - resource. This identifier has no meaning to the account owner. - type: string - minLength: 1 - maxLength: 40 - BookingDateTime: - description: >- - Date and time when a transaction entry is posted to an account on the - account servicer's books. - - Usage: Booking date is the expected booking date, unless the status is - booked, in which case it is the actual booking date.All dates in the JSON - payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - BuildingNumber: - description: Number that identifies the position of a building on a street. - type: string - minLength: 1 - maxLength: 16 - CountryCode: - description: 'Nation with its own government, occupying a particular territory.' - type: string - pattern: '^[A-Z]{2,2}$' - CountrySubDivision: - description: 'Identifies a subdivision of a country eg, state, region, county.' - type: string - minLength: 1 - maxLength: 35 - CreationDateTime: - description: >- - Date and time at which the resource was created.All dates in the JSON - payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - DateTime: - description: >- - Date and time associated with the date time type.All dates in the JSON - payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - Description_0: - description: Specifies the description of the account type. - type: string - minLength: 1 - maxLength: 35 - Description_1: - description: Description that may be available for the statement fee. - type: string - minLength: 1 - maxLength: 128 - Description_2: - description: Description that may be available for the statement interest. - type: string - minLength: 1 - maxLength: 128 - Description_3: - description: Description to describe the purpose of the code - type: string - minLength: 1 - maxLength: 350 - EmailAddress: - description: Address for electronic mail (e-mail). - type: string - minLength: 1 - maxLength: 256 - EndDateTime: - description: >- - Date and time at which the statement period ends.All dates in the JSON - payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - File: + OBReadConsent1: type: object - properties: {} - FinalPaymentDateTime: - description: >- - The date on which the final payment for a Standing Order schedule will be - made.All dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - FirstPaymentDateTime: - description: >- - The date on which the first payment for a Standing Order schedule will be - made.All dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - Frequency_0: - description: >- - Individual Definitions: - - EvryDay - Every day - - EvryWorkgDay - Every working day - - IntrvlWkDay - An interval specified in weeks (01 to 09), and the day - within the week (01 to 07) - - WkInMnthDay - A monthly interval, specifying the week of the month (01 to - 05) and day within the week (01 to 07) - - IntrvlMnthDay - An interval specified in months (between 01 to 06, 12, - 24), specifying the day within the month (-5 to -1, 1 to 31) - - QtrDay - Quarterly (either ENGLISH, SCOTTISH, or RECEIVED) - - ENGLISH = Paid on the 25th March, 24th June, 29th September and 25th - December. + required: + - Data + - Risk + properties: + Data: + $ref: '#/definitions/OBReadData1' + Risk: + $ref: '#/definitions/OBRisk2' + OBReadConsentResponse1: + type: object + required: + - Data + - Risk + properties: + Data: + type: object + required: + - ConsentId + - CreationDateTime + - StatusUpdateDateTime + - Permissions + properties: + ConsentId: + description: >- + Unique identification as assigned to identify the account access + consent resource. + type: string + minLength: 1 + maxLength: 128 + CreationDateTime: + $ref: '#/definitions/CreationDateTime' + Status: + $ref: '#/definitions/OBExternalRequestStatus1Code' + StatusUpdateDateTime: + $ref: '#/definitions/StatusUpdateDateTime' + Permissions: + type: array + items: + $ref: '#/definitions/OBExternalPermissions1Code' + minItems: 1 + ExpirationDateTime: + description: >- + Specified date and time the permissions will expire. - SCOTTISH = Paid on the 2nd February, 15th May, 1st August and 11th - November. + If this is not populated, the permissions will be open ended.All + dates in the JSON payloads are represented in ISO 8601 date-time + format. - RECEIVED = Paid on the 20th March, 19th June, 24th September and 20th - December. + All date-time fields in responses must include the timezone. An + example is below: - Individual Patterns: + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + TransactionFromDateTime: + description: >- + Specified start date and time for the transaction query period. - EvryDay (ScheduleCode) + If this is not populated, the start date will be open ended, and + data will be returned from the earliest available transaction.All + dates in the JSON payloads are represented in ISO 8601 date-time + format. - EvryWorkgDay (ScheduleCode) + All date-time fields in responses must include the timezone. An + example is below: - IntrvlWkDay:IntervalInWeeks:DayInWeek (ScheduleCode + IntervalInWeeks + - DayInWeek) + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + TransactionToDateTime: + description: >- + Specified end date and time for the transaction query period. - WkInMnthDay:WeekInMonth:DayInWeek (ScheduleCode + WeekInMonth + DayInWeek) + If this is not populated, the end date will be open ended, and + data will be returned to the latest available transaction.All + dates in the JSON payloads are represented in ISO 8601 date-time + format. - IntrvlMnthDay:IntervalInMonths:DayInMonth (ScheduleCode + IntervalInMonths - + DayInMonth) + All date-time fields in responses must include the timezone. An + example is below: - QtrDay: + either (ENGLISH, SCOTTISH or RECEIVED) ScheduleCode + QuarterDay + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + Risk: + $ref: '#/definitions/OBRisk2' + Links: + $ref: '#/definitions/Links' + Meta: + $ref: '#/definitions/Meta' + OBReadData1: + type: object + required: + - Permissions + properties: + Permissions: + type: array + items: + $ref: '#/definitions/OBExternalPermissions1Code' + minItems: 1 + description: >- + Specifies the Open Banking account access data types. This is a list + of the data clusters being consented by the PSU, and requested for + authorisation with the ASPSP. + ExpirationDateTime: + description: >- + Specified date and time the permissions will expire. - The regular expression for this element combines five smaller versions for - each permitted pattern. To aid legibility - the components are presented - individually here: + If this is not populated, the permissions will be open ended.All + dates in the JSON payloads are represented in ISO 8601 date-time + format. - EvryDay + All date-time fields in responses must include the timezone. An + example is below: - EvryWorkgDay + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + TransactionFromDateTime: + description: >- + Specified start date and time for the transaction query period. - IntrvlWkDay:0[1-9]:0[1-7] + If this is not populated, the start date will be open ended, and + data will be returned from the earliest available transaction.All + dates in the JSON payloads are represented in ISO 8601 date-time + format. - WkInMnthDay:0[1-5]:0[1-7] + All date-time fields in responses must include the timezone. An + example is below: - IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01]) + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + TransactionToDateTime: + description: >- + Specified end date and time for the transaction query period. - QtrDay:(ENGLISH|SCOTTISH|RECEIVED) + If this is not populated, the end date will be open ended, and + data will be returned to the latest available transaction.All + dates in the JSON payloads are represented in ISO 8601 date-time + format. - Full Regular Expression: + All date-time fields in responses must include the timezone. An + example is below: - ^(EvryDay)$|^(EvryWorkgDay)$|^(IntrvlWkDay:0[1-9]:0[1-7])$|^(WkInMnthDay:0[1-5]:0[1-7])$|^(IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01]))$|^(QtrDay:(ENGLISH|SCOTTISH|RECEIVED))$ - type: string - pattern: >- - ^(EvryDay)$|^(EvryWorkgDay)$|^(IntrvlWkDay:0[1-9]:0[1-7])$|^(WkInMnthDay:0[1-5]:0[1-7])$|^(IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01]))$|^(QtrDay:(ENGLISH|SCOTTISH|RECEIVED))$ - Frequency_1: + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + OBRisk2: description: >- - Individual Definitions: - - EvryDay - Every day - - EvryWorkgDay - Every working day - - IntrvlWkDay - An interval specified in weeks (01 to 09), and the day - within the week (01 to 07) - - WkInMnthDay - A monthly interval, specifying the week of the month (01 to - 05) and day within the week (01 to 07) - - IntrvlMnthDay - An interval specified in months (between 01 to 06, 12, - 24), specifying the day within the month (-5 to -1, 1 to 31) - - QtrDay - Quarterly (either ENGLISH, SCOTTISH, or RECEIVED) - - ENGLISH = Paid on the 25th March, 24th June, 29th September and 25th - December. - - SCOTTISH = Paid on the 2nd February, 15th May, 1st August and 11th - November. - - RECEIVED = Paid on the 20th March, 19th June, 24th September and 20th - December. - - Individual Patterns: - - EvryDay (ScheduleCode) - - EvryWorkgDay (ScheduleCode) - - IntrvlWkDay:IntervalInWeeks:DayInWeek (ScheduleCode + IntervalInWeeks + - DayInWeek) - - WkInMnthDay:WeekInMonth:DayInWeek (ScheduleCode + WeekInMonth + DayInWeek) - - IntrvlMnthDay:IntervalInMonths:DayInMonth (ScheduleCode + IntervalInMonths - + DayInMonth) - - QtrDay: + either (ENGLISH, SCOTTISH or RECEIVED) ScheduleCode + QuarterDay - - The regular expression for this element combines five smaller versions for - each permitted pattern. To aid legibility - the components are presented - individually here: - - EvryDay - - EvryWorkgDay - - IntrvlWkDay:0[1-9]:0[1-7] - - WkInMnthDay:0[1-5]:0[1-7] - - IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01]) - - QtrDay:(ENGLISH|SCOTTISH|RECEIVED) - - Full Regular Expression: - - ^(EvryDay)$|^(EvryWorkgDay)$|^(IntrvlWkDay:0[1-9]:0[1-7])$|^(WkInMnthDay:0[1-5]:0[1-7])$|^(IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01]))$|^(QtrDay:(ENGLISH|SCOTTISH|RECEIVED))$ - type: string - pattern: >- - ^(EvryDay)$|^(EvryWorkgDay)$|^(IntrvlDay:((0[2-9])|([1-2][0-9])|3[0-1]))$|^(IntrvlWkDay:0[1-9]:0[1-7])$|^(WkInMnthDay:0[1-5]:0[1-7])$|^(IntrvlMnthDay:(0[1-6]|12|24):(-0[1-5]|0[1-9]|[12][0-9]|3[01]))$|^(QtrDay:(ENGLISH|SCOTTISH|RECEIVED))$ - FullLegalName: - description: Specifies a character string with a maximum length of 350 characters. + The Risk section is sent by the initiating party to the ASPSP. It is used + to specify additional details for risk scoring for Account Info. + type: object + properties: {} + additionalProperties: false + OBExternalPermissions1Code: + description: >- + Specifies the Open Banking account access data types. This is a + list of the data clusters being consented by the PSU, and + requested for authorisation with the ASPSP. type: string - minLength: 1 - maxLength: 350 - ISODateTime: + enum: + - ReadAccountsBasic + - ReadAccountsDetail + - ReadBalances + - ReadTransactionsDetail + CreationDateTime: description: >- - All dates in the JSON payloads are represented in ISO 8601 date-time - format. + Date and time at which the resource was created.All dates in the JSON + payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: @@ -1014,94 +671,10 @@ definitions: 2017-04-05T10:43:07+00:00 type: string format: date-time - Identification_0: + StatusUpdateDateTime: description: >- - Identification assigned by an institution to identify an account. This - identification is known by the account owner. - type: string - minLength: 1 - maxLength: 256 - Identification_1: - description: Unique and unambiguous identification of the servicing institution. - type: string - minLength: 1 - maxLength: 35 - Identification_2: - description: >- - Unique and unambiguous identification of a financial institution or a - branch of a financial institution. - type: string - minLength: 1 - maxLength: 35 - Links: - type: object - description: Links relevant to the payload - properties: - Self: - type: string - format: uri - First: - type: string - format: uri - Prev: - type: string - format: uri - Next: - type: string - format: uri - Last: - type: string - format: uri - additionalProperties: false - required: - - Self - Meta: - title: MetaData - type: object - description: Meta Data relevant to the payload - properties: - TotalPages: - type: integer - format: int32 - FirstAvailableDateTime: - $ref: '#/definitions/ISODateTime' - LastAvailableDateTime: - $ref: '#/definitions/ISODateTime' - additionalProperties: false - Name_0: - description: >- - The account name is the name or names of the account owner(s) represented - at an account level, as displayed by the ASPSP's online channels. - - Note, the account name is not the product name or the nickname of the - account. - type: string - minLength: 1 - maxLength: 70 - Name_1: - description: >- - Name by which a party is known and which is usually used to identify that - party. - type: string - minLength: 1 - maxLength: 70 - Name_2: - description: >- - Name by which an agent is known and which is usually used to identify that - agent. - type: string - minLength: 1 - maxLength: 140 - Name_3: - description: Long name associated with the code - type: string - minLength: 1 - maxLength: 70 - NextPaymentDateTime: - description: >- - The date on which the next payment for a Standing Order schedule will be - made.All dates in the JSON payloads are represented in ISO 8601 date-time - format. + Date and time at which the resource status was updated.All dates in the + JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: @@ -1109,133 +682,47 @@ definitions: 2017-04-05T10:43:07+00:00 type: string format: date-time - Nickname: - description: >- - The nickname of the account, assigned by the account owner in order to - provide an additional means of identification of the account. + OBExternalRequestStatus1Code: + description: Specifies the status of consent resource in code form. type: string - minLength: 1 - maxLength: 70 - Number_0: - description: >- - Indicates whether the advertised overdraft rate is guaranteed to be - offered to a borrower by the bank e.g. if it�s part of a government - scheme, or whether the rate may vary dependent on the applicant�s - circumstances. - type: integer - Number_1: - description: >- - fee/charges are captured dependent on the number of occurrences rather - than capped at a particular amount - type: integer - OBAccount3: - type: object - description: >- - Unambiguous identification of the account to which credit and debit - entries are made. - required: - - AccountId - - Currency - - AccountType - - AccountSubType - properties: - AccountId: - $ref: '#/definitions/AccountId' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_0' - AccountType: - $ref: '#/definitions/OBExternalAccountType1Code' - AccountSubType: - $ref: '#/definitions/OBExternalAccountSubType1Code' - Description: - $ref: '#/definitions/Description_0' - Nickname: - $ref: '#/definitions/Nickname' - Account: - type: array - items: - type: object - description: Provides the details to identify an account. - required: - - SchemeName - - Identification - properties: - SchemeName: - $ref: '#/definitions/OBExternalAccountIdentification4Code' - Identification: - $ref: '#/definitions/Identification_0' - Name: - $ref: '#/definitions/Name_0' - SecondaryIdentification: - $ref: '#/definitions/SecondaryIdentification' - Servicer: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_0' - OBAccount3Basic: + enum: + - Authorised + - AwaitingAuthorisation + - Rejected + - Revoked + OBReadAccount4: type: object - description: >- - Unambiguous identification of the account to which credit and debit - entries are made. required: - - AccountId - - Currency - - AccountType - - AccountSubType + - Data properties: - AccountId: - $ref: '#/definitions/AccountId' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_0' - AccountType: - $ref: '#/definitions/OBExternalAccountType1Code' - AccountSubType: - $ref: '#/definitions/OBExternalAccountSubType1Code' - Description: - $ref: '#/definitions/Description_0' - Nickname: - $ref: '#/definitions/Nickname' - OBAccount3Detail: + Data: + type: object + properties: + Account: + type: array + items: + $ref: '#/definitions/OBAccount4' + Links: + $ref: '#/definitions/Links' + Meta: + $ref: '#/definitions/Meta' + OBReadAccount5: type: object - description: >- - Unambiguous identification of the account to which credit and debit - entries are made. required: - - AccountId - - Currency - - AccountType - - AccountSubType - - Account + - Data properties: - AccountId: - $ref: '#/definitions/AccountId' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_0' - AccountType: - $ref: '#/definitions/OBExternalAccountType1Code' - AccountSubType: - $ref: '#/definitions/OBExternalAccountSubType1Code' - Description: - $ref: '#/definitions/Description_0' - Nickname: - $ref: '#/definitions/Nickname' - Account: - type: array - items: - type: object - description: Provides the details to identify an account. - required: - - SchemeName - - Identification - properties: - SchemeName: - $ref: '#/definitions/OBExternalAccountIdentification4Code' - Identification: - $ref: '#/definitions/Identification_0' - Name: - $ref: '#/definitions/Name_0' - SecondaryIdentification: - $ref: '#/definitions/SecondaryIdentification' - Servicer: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_0' + Data: + type: object + properties: + Account: + type: array + items: + $ref: '#/definitions/OBAccount4' + Links: + $ref: '#/definitions/Links' + Meta: + $ref: '#/definitions/Meta' + additionalProperties: false OBAccount4: type: object description: >- @@ -1254,13 +741,13 @@ definitions: StatusUpdateDateTime: $ref: '#/definitions/StatusUpdateDateTime' Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_0' + $ref: '#/definitions/ActiveOrHistoricCurrencyCode' AccountType: $ref: '#/definitions/OBExternalAccountType1Code' AccountSubType: $ref: '#/definitions/OBExternalAccountSubType1Code' Description: - $ref: '#/definitions/Description_0' + $ref: '#/definitions/Description' Nickname: $ref: '#/definitions/Nickname' Account: @@ -1275,468 +762,435 @@ definitions: SchemeName: $ref: '#/definitions/OBExternalAccountIdentification4Code' Identification: - $ref: '#/definitions/Identification_0' + $ref: '#/definitions/Identification' Name: - $ref: '#/definitions/Name_0' + $ref: '#/definitions/Name' SecondaryIdentification: $ref: '#/definitions/SecondaryIdentification' Servicer: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_0' - OBAccount4Basic: - type: object - description: >- - Unambiguous identification of the account to which credit and debit - entries are made. - required: - - AccountId - - Currency - - AccountType - - AccountSubType - properties: - AccountId: - $ref: '#/definitions/AccountId' - Status: - $ref: '#/definitions/OBAccountStatus1Code' - StatusUpdateDateTime: - $ref: '#/definitions/StatusUpdateDateTime' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_0' - AccountType: - $ref: '#/definitions/OBExternalAccountType1Code' - AccountSubType: - $ref: '#/definitions/OBExternalAccountSubType1Code' - Description: - $ref: '#/definitions/Description_0' - Nickname: - $ref: '#/definitions/Nickname' - OBAccount4Detail: + $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5' + OBReadBalance1: type: object - description: >- - Unambiguous identification of the account to which credit and debit - entries are made. required: - - AccountId - - Currency - - AccountType - - AccountSubType - - Account + - Data properties: - AccountId: - $ref: '#/definitions/AccountId' - Status: - $ref: '#/definitions/OBAccountStatus1Code' - StatusUpdateDateTime: - $ref: '#/definitions/StatusUpdateDateTime' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_0' - AccountType: - $ref: '#/definitions/OBExternalAccountType1Code' - AccountSubType: - $ref: '#/definitions/OBExternalAccountSubType1Code' - Description: - $ref: '#/definitions/Description_0' - Nickname: - $ref: '#/definitions/Nickname' - Account: - type: array - items: - type: object - description: Provides the details to identify an account. - required: - - SchemeName - - Identification - properties: - SchemeName: - $ref: '#/definitions/OBExternalAccountIdentification4Code' - Identification: - $ref: '#/definitions/Identification_0' - Name: - $ref: '#/definitions/Name_0' - SecondaryIdentification: - $ref: '#/definitions/SecondaryIdentification' - Servicer: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_0' - OBAccountStatus1Code: - description: Specifies the status of account resource in code form. - type: string - enum: - - Deleted - - Disabled - - Enabled - - Pending - - ProForma - OBActiveCurrencyAndAmount_SimpleType: - description: >- - A number of monetary units specified in an active currency where the unit - of currency is explicit and compliant with ISO 4217. - type: string - pattern: '^\d{1,13}\.\d{1,5}$' - OBActiveOrHistoricCurrencyAndAmount_0: - type: object - required: - - Amount - - Currency - description: The amount of the first Standing Order - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_1: - type: object - required: - - Amount - - Currency - description: The amount of the next Standing Order. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_2: - type: object - required: - - Amount - - Currency - description: The amount of the final Standing Order - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_3: - type: object - required: - - Amount - - Currency - description: Amount of money associated with the statement benefit type. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_4: - type: object - required: - - Amount - - Currency - description: Amount of money associated with the statement fee type. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_5: - type: object - required: - - Amount - - Currency - description: Amount of money associated with the statement interest amount type. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_6: + Data: + type: object + required: + - Balance + properties: + Balance: + type: array + items: + type: object + description: Set of elements used to define the balance details. + required: + - AccountId + - CreditDebitIndicator + - Type + - DateTime + - Amount + properties: + AccountId: + $ref: '#/definitions/AccountId' + CreditDebitIndicator: + $ref: '#/definitions/OBCreditDebitCode' + Type: + $ref: '#/definitions/OBBalanceType1Code' + DateTime: + description: >- + Indicates the date (and time) of the balance.All dates in + the JSON payloads are represented in ISO 8601 date-time + format. + + All date-time fields in responses must include the timezone. + An example is below: + + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + Amount: + type: object + required: + - Amount + - Currency + description: Amount of money of the cash balance. + properties: + Amount: + $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' + Currency: + $ref: '#/definitions/ActiveOrHistoricCurrencyCode' + CreditLine: + type: array + items: + type: object + description: >- + Set of elements used to provide details on the credit + line. + required: + - Included + properties: + Included: + description: >- + Indicates whether or not the credit line is included + in the balance of the account. + + Usage: If not present, credit line is not included in + the balance amount of the account. + type: boolean + Type: + description: 'Limit type, in a coded form.' + type: string + enum: + - Available + - Credit + - Emergency + - Pre-Agreed + - Temporary + Amount: + type: object + required: + - Amount + - Currency + description: Amount of money of the credit line. + properties: + Amount: + $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' + Currency: + $ref: '#/definitions/ActiveOrHistoricCurrencyCode' + minItems: 1 + Links: + $ref: '#/definitions/Links' + Meta: + $ref: '#/definitions/Meta' + OBReadTransaction5: type: object required: - - Amount - - Currency - description: Amount of money associated with the amount type. + - Data properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_7: + Data: + $ref: '#/definitions/OBReadDataTransaction5' + Links: + $ref: '#/definitions/Links' + Meta: + $ref: '#/definitions/Meta' + OBReadDataTransaction5: type: object - required: - - Amount - - Currency - description: Amount of money in the cash transaction entry. properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_8: + Transaction: + type: array + items: + $ref: '#/definitions/OBTransaction5' + OBTransaction5: type: object + description: Provides further details on an entry in the report. required: + - AccountId + - CreditDebitIndicator + - Status + - BookingDateTime - Amount - - Currency - description: Transaction charges to be paid by the charge bearer. properties: + AccountId: + $ref: '#/definitions/AccountId' + TransactionId: + $ref: '#/definitions/TransactionId' + TransactionReference: + $ref: '#/definitions/TransactionReference' + StatementReference: + type: array + items: + $ref: '#/definitions/StatementReference' + CreditDebitIndicator: + $ref: '#/definitions/OBCreditDebitCode' + Status: + $ref: '#/definitions/OBEntryStatus1Code' + BookingDateTime: + $ref: '#/definitions/BookingDateTime' + ValueDateTime: + $ref: '#/definitions/ValueDateTime' + TransactionInformation: + $ref: '#/definitions/TransactionInformation' + AddressLine: + $ref: '#/definitions/AddressLine' Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBActiveOrHistoricCurrencyAndAmount_9: - type: object - required: - - Amount - - Currency + $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount' + ChargeAmount: + $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount' + CurrencyExchange: + $ref: '#/definitions/OBCurrencyExchange5' + BankTransactionCode: + $ref: '#/definitions/OBBankTransactionCodeStructure1' + ProprietaryBankTransactionCode: + $ref: '#/definitions/ProprietaryBankTransactionCodeStructure1' + Balance: + $ref: '#/definitions/OBTransactionCashBalance' + MerchantDetails: + $ref: '#/definitions/OBMerchantDetails1' + CreditorAgent: + $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6' + CreditorAccount: + $ref: '#/definitions/OBCashAccount6' + DebtorAgent: + $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6' + DebtorAccount: + $ref: '#/definitions/OBCashAccount6' + CardInstrument: + $ref: '#/definitions/OBTransactionCardInstrument1' + SupplementaryData: + $ref: '#/definitions/OBSupplementaryData1' + AccountId: description: >- - Amount of money to be moved between the debtor and creditor, before - deduction of charges, expressed in the currency as ordered by the - initiating party. - - Usage: This amount has to be transported unchanged through the transaction - chain. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBAddressTypeCode: - description: Identifies the nature of the postal address. + A unique and immutable identifier used to identify the account resource. + This identifier has no meaning to the account owner. type: string - enum: - - Business - - Correspondence - - DeliveryTo - - MailTo - - POBox - - Postal - - Residential - - Statement - OBBalanceType1Code: - description: 'Balance type, in a coded form.' + minLength: 1 + maxLength: 40 + OBAccountStatus1Code: + description: Specifies the status of account resource in code form. type: string enum: - - ClosingAvailable - - ClosingBooked - - ClosingCleared - - Expected - - ForwardAvailable - - Information - - InterimAvailable - - InterimBooked - - InterimCleared - - OpeningAvailable - - OpeningBooked - - OpeningCleared - - PreviouslyClosedBooked - OBBankTransactionCodeStructure1: - type: object - required: - - Code - - SubCode + - Deleted + - Disabled + - Enabled + - Pending + - ProForma + ActiveOrHistoricCurrencyCode: description: >- - Set of elements used to fully identify the type of underlying transaction - resulting in an entry. - properties: - Code: - description: Specifies the family within a domain. - type: string - SubCode: - description: Specifies the sub-product family within a specific family. - type: string - OBBeneficiary3: - type: object - properties: - AccountId: - $ref: '#/definitions/AccountId' - BeneficiaryId: - $ref: '#/definitions/BeneficiaryId' - Reference: - $ref: '#/definitions/Reference' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6_2' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_1' - OBBeneficiary3Basic: - type: object - properties: - AccountId: - $ref: '#/definitions/AccountId' - BeneficiaryId: - $ref: '#/definitions/BeneficiaryId' - Reference: - $ref: '#/definitions/Reference' - OBBeneficiary3Detail: - type: object - properties: - AccountId: - $ref: '#/definitions/AccountId' - BeneficiaryId: - $ref: '#/definitions/BeneficiaryId' - Reference: - $ref: '#/definitions/Reference' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6_2' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_1' - required: - - CreditorAccount - OBBranchAndFinancialInstitutionIdentification5_0: - type: object - required: - - SchemeName - - Identification + Identification of the currency in which the account is held. + + Usage: Currency should only be used in case one and the same account + number covers several currencies + + and the initiating party needs to identify which currency needs to be used + for settlement on the account. + type: string + pattern: '^[A-Z]{3,3}$' + OBExternalAccountType1Code: + description: Specifies the type of account (personal or business). + type: string + enum: + - Business + - Personal + OBExternalAccountSubType1Code: + description: Specifies the sub type of account (product family group). + type: string + enum: + - ChargeCard + - CreditCard + - CurrentAccount + - EMoney + - Loan + - Mortgage + - PrePaidCard + - Savings + Description: + description: Specifies the description of the account type. + type: string + minLength: 1 + maxLength: 35 + Nickname: description: >- - Party that manages the account on behalf of the account owner, that is - manages the registration and booking of entries on the account, calculates - balances on the account and provides information about the account. - properties: - SchemeName: - $ref: '#/definitions/OBExternalFinancialInstitutionIdentification4Code' - Identification: - $ref: '#/definitions/Identification_1' - OBBranchAndFinancialInstitutionIdentification5_1: - type: object - required: - - SchemeName - - Identification + The nickname of the account, assigned by the account owner in order to + provide an additional means of identification of the account. + type: string + minLength: 1 + maxLength: 70 + OBExternalAccountIdentification4Code: description: >- - Party that manages the account on behalf of the account owner, that is - manages the registration and booking of entries on the account, calculates - balances on the account and provides information about the account. + Name of the identification scheme, in a coded form as published in an + external list. + type: string + x-namespaced-enum: + - UK.OBIE.BBAN + - UK.OBIE.IBAN + - UK.OBIE.PAN + - UK.OBIE.Paym + - UK.OBIE.SortCodeAccountNumber + Identification: + description: >- + Identification assigned by an institution to identify an account. This + identification is known by the account owner. + type: string + minLength: 1 + maxLength: 256 + Name: + description: >- + The account name is the name or names of the account owner(s) represented + at an account level, as displayed by the ASPSP's online channels. - This is the servicer of the beneficiary account. - properties: - SchemeName: - $ref: '#/definitions/OBExternalFinancialInstitutionIdentification4Code' - Identification: - $ref: '#/definitions/Identification_1' - OBBranchAndFinancialInstitutionIdentification6_0: - type: object - description: Financial institution servicing an account for the creditor. - properties: - SchemeName: - $ref: '#/definitions/OBExternalFinancialInstitutionIdentification4Code' - Identification: - $ref: '#/definitions/Identification_2' - Name: - $ref: '#/definitions/Name_2' - PostalAddress: - $ref: '#/definitions/OBPostalAddress6' - OBBranchAndFinancialInstitutionIdentification6_1: - type: object - description: Financial institution servicing an account for the debtor. - properties: - SchemeName: - $ref: '#/definitions/OBExternalFinancialInstitutionIdentification4Code' - Identification: - $ref: '#/definitions/Identification_2' - Name: - $ref: '#/definitions/Name_2' - PostalAddress: - $ref: '#/definitions/OBPostalAddress6' - OBBranchAndFinancialInstitutionIdentification6_2: - type: object + Note, the account name is not the product name or the nickname of the + account. + type: string + minLength: 1 + maxLength: 70 + SecondaryIdentification: description: >- - Party that manages the account on behalf of the account owner, that is - manages the registration and booking of entries on the account, calculates - balances on the account and provides information about the account. + This is secondary identification of the account, as assigned by the + account servicing institution. - This is the servicer of the beneficiary account. - properties: - SchemeName: - $ref: '#/definitions/OBExternalFinancialInstitutionIdentification4Code' - Identification: - $ref: '#/definitions/Identification_1' - Name: - $ref: '#/definitions/Name_2' - PostalAddress: - $ref: '#/definitions/OBPostalAddress6' - OBCashAccount5_0: - type: object - required: - - SchemeName - - Identification - description: Provides the details to identify the beneficiary account. - properties: - SchemeName: - $ref: '#/definitions/OBExternalAccountIdentification4Code' - Identification: - description: Beneficiary account identification. - type: string - minLength: 1 - maxLength: 256 - Name: - $ref: '#/definitions/Name_0' - SecondaryIdentification: - $ref: '#/definitions/SecondaryIdentification' - OBCashAccount5_1: + This can be used by building societies to additionally identify accounts + with a roll number (in addition to a sort code and account number + combination). + type: string + minLength: 1 + maxLength: 34 + OBBranchAndFinancialInstitutionIdentification5: type: object required: - SchemeName - Identification - description: Provides the details to identify the beneficiary account. - properties: - SchemeName: - $ref: '#/definitions/OBExternalAccountIdentification4Code' - Identification: - $ref: '#/definitions/Identification_0' - Name: - $ref: '#/definitions/Name_0' - SecondaryIdentification: - $ref: '#/definitions/SecondaryIdentification' - OBCashAccount6_0: - type: object description: >- - Unambiguous identification of the account of the creditor, in the case of - a debit transaction. + Party that manages the account on behalf of the account owner, that is + manages the registration and booking of entries on the account, calculates + balances on the account and provides information about the account. properties: SchemeName: - $ref: '#/definitions/OBExternalAccountIdentification4Code' + $ref: '#/definitions/OBExternalFinancialInstitutionIdentification4Code' Identification: - $ref: '#/definitions/Identification_0' - Name: - $ref: '#/definitions/Name_0' - SecondaryIdentification: - $ref: '#/definitions/SecondaryIdentification' - OBCashAccount6_1: - type: object + $ref: '#/definitions/Identification' + OBExternalFinancialInstitutionIdentification4Code: description: >- - Unambiguous identification of the account of the debtor, in the case of a - crebit transaction. - properties: - SchemeName: - $ref: '#/definitions/OBExternalAccountIdentification4Code' - Identification: - $ref: '#/definitions/Identification_0' - Name: - $ref: '#/definitions/Name_0' - SecondaryIdentification: - $ref: '#/definitions/SecondaryIdentification' - OBCreditDebitCode_0: + Name of the identification scheme, in a coded form as published in an + external list. + type: string + x-namespaced-enum: + - UK.OBIE.BICFI + OBCreditDebitCode: description: |- - Indicates whether the amount is a credit or a debit. - Usage: A zero amount is considered to be a credit amount. + Indicates whether the balance is a credit or a debit balance. + Usage: A zero balance is considered to be a credit balance. type: string enum: - Credit - Debit - OBCreditDebitCode_1: - description: Indicates whether the transaction is a credit or a debit entry. + OBBalanceType1Code: + description: 'Balance type, in a coded form.' type: string enum: - - Credit - - Debit - OBCreditDebitCode_2: + - ClosingAvailable + - ClosingBooked + - ClosingCleared + - Expected + - ForwardAvailable + - Information + - InterimAvailable + - InterimBooked + - InterimCleared + - OpeningAvailable + - OpeningBooked + - OpeningCleared + - PreviouslyClosedBooked + OBActiveCurrencyAndAmount_SimpleType: + description: >- + A number of monetary units specified in an active currency where the unit + of currency is explicit and compliant with ISO 4217. + type: string + pattern: '^\d{1,13}\.\d{1,5}$' + TransactionId: + description: >- + Unique identifier for the transaction within an servicing institution. + This identifier is both unique and immutable. + type: string + minLength: 1 + maxLength: 210 + TransactionInformation: description: |- - Indicates whether the balance is a credit or a debit balance. - Usage: A zero balance is considered to be a credit balance. + Further details of the transaction. + This is the transaction narrative, which is unstructured text. type: string - enum: - - Credit - - Debit - OBCurrencyExchange5: - type: object - required: - - SourceCurrency - - ExchangeRate - description: Set of elements used to provide details on the currency exchange. - properties: - SourceCurrency: - description: >- - Currency from which an amount is to be converted in a currency - conversion. - type: string - pattern: '^[A-Z]{3,3}$' - TargetCurrency: - description: >- + minLength: 1 + maxLength: 500 + TransactionReference: + description: >- + Unique reference for the transaction. This reference is optionally + populated, and may as an example be the FPID in the Faster Payments + context. + type: string + minLength: 1 + maxLength: 35 + StatementReference: + description: >- + Unique reference for the statement. This reference may be optionally + populated if available. + type: string + minLength: 1 + maxLength: 35 + OBEntryStatus1Code: + description: Status of a transaction entry on the books of the account servicer. + type: string + enum: + - Booked + - Pending + BookingDateTime: + description: >- + Date and time when a transaction entry is posted to an account on the + account servicer's books. + + Usage: Booking date is the expected booking date, unless the status is + booked, in which case it is the actual booking date.All dates in the JSON + payloads are represented in ISO 8601 date-time format. + + All date-time fields in responses must include the timezone. An example is + below: + + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + ValueDateTime: + description: >- + Date and time at which assets become available to the account owner in + case of a credit entry, or cease to be available to the account owner in + case of a debit transaction entry. + + Usage: If transaction entry status is pending and value date is present, + then the value date refers to an expected/requested value date. + + For transaction entries subject to availability/float and for which + availability information is provided, the value date must not be used. In + this case the availability component identifies the number of availability + days.All dates in the JSON payloads are represented in ISO 8601 date-time + format. + + All date-time fields in responses must include the timezone. An example is + below: + + 2017-04-05T10:43:07+00:00 + type: string + format: date-time + AddressLine: + description: >- + Information that locates and identifies a specific address for a + transaction entry, that is presented in free format text. + type: string + minLength: 1 + maxLength: 70 + OBActiveOrHistoricCurrencyAndAmount: + type: object + required: + - Amount + - Currency + description: Amount of money in the cash transaction entry. + properties: + Amount: + $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' + Currency: + $ref: '#/definitions/ActiveOrHistoricCurrencyCode' + OBCurrencyExchange5: + type: object + required: + - SourceCurrency + - ExchangeRate + description: Set of elements used to provide details on the currency exchange. + properties: + SourceCurrency: + description: >- + Currency from which an amount is to be converted in a currency + conversion. + type: string + pattern: '^[A-Z]{3,3}$' + TargetCurrency: + description: >- Currency into which an amount is to be converted in a currency conversion. type: string @@ -1787,8549 +1241,56 @@ definitions: Amount: $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OBEntryStatus1Code: - description: Status of a transaction entry on the books of the account servicer. - type: string - enum: - - Booked - - Pending - OBError1: - type: object - properties: - ErrorCode: - description: 'Low level textual error code, e.g., UK.OBIE.Field.Missing' - type: string - x-namespaced-enum: - - UK.OBIE.Field.Expected - - UK.OBIE.Field.Invalid - - UK.OBIE.Field.InvalidDate - - UK.OBIE.Field.Missing - - UK.OBIE.Field.Unexpected - - UK.OBIE.Header.Invalid - - UK.OBIE.Header.Missing - - UK.OBIE.Reauthenticate - - UK.OBIE.Resource.ConsentMismatch - - UK.OBIE.Resource.InvalidConsentStatus - - UK.OBIE.Resource.InvalidFormat - - UK.OBIE.Resource.NotFound - - UK.OBIE.Rules.AfterCutOffDateTime - - UK.OBIE.Rules.DuplicateReference - - UK.OBIE.Signature.Invalid - - UK.OBIE.Signature.InvalidClaim - - UK.OBIE.Signature.Malformed - - UK.OBIE.Signature.Missing - - UK.OBIE.Signature.MissingClaim - - UK.OBIE.Signature.Unexpected - - UK.OBIE.UnexpectedError - - UK.OBIE.Unsupported.AccountIdentifier - - UK.OBIE.Unsupported.AccountSecondaryIdentifier - - UK.OBIE.Unsupported.Currency - - UK.OBIE.Unsupported.Frequency - - UK.OBIE.Unsupported.LocalInstrument - - UK.OBIE.Unsupported.Scheme - Message: - description: >- - A description of the error that occurred. e.g., 'A mandatory field - isn't supplied' or 'RequestedExecutionDateTime must be in future' - - OBIE doesn't standardise this field - type: string - minLength: 1 - maxLength: 500 - Path: - description: >- - Recommended but optional reference to the JSON Path of the field with - error, e.g., Data.Initiation.InstructedAmount.Currency - type: string - minLength: 1 - maxLength: 500 - Url: - description: >- - URL to help remediate the problem, or provide more information, or to - API Reference, or help etc - type: string - required: - - ErrorCode - - Message - additionalProperties: false - minProperties: 1 - OBErrorResponse1: - description: >- - An array of detail error codes, and messages, and URLs to documentation to - help remediation. - type: object - properties: - Code: - description: 'High level textual error code, to help categorize the errors.' - type: string - minLength: 1 - maxLength: 40 - Id: - description: >- - A unique reference for the error instance, for audit purposes, in case - of unknown/unclassified errors. - type: string - minLength: 1 - maxLength: 40 - Message: - description: >- - Brief Error message, e.g., 'There is something wrong with the request - parameters provided' - type: string - minLength: 1 - maxLength: 500 - Errors: - items: - $ref: '#/definitions/OBError1' - type: array - minItems: 1 - required: - - Code - - Message - - Errors - additionalProperties: false - OBExternalAccountIdentification4Code: - description: >- - Name of the identification scheme, in a coded form as published in an - external list. - type: string - x-namespaced-enum: - - UK.OBIE.BBAN - - UK.OBIE.IBAN - - UK.OBIE.PAN - - UK.OBIE.Paym - - UK.OBIE.SortCodeAccountNumber - OBExternalAccountRole1Code: - description: A party�s role with respect to the related account. - type: string - x-namespaced-enum: - - UK.OBIE.Administrator - - UK.OBIE.Beneficiary - - UK.OBIE.CustodianForMinor - - UK.OBIE.Granter - - UK.OBIE.LegalGuardian - - UK.OBIE.OtherParty - - UK.OBIE.PowerOfAttorney - - UK.OBIE.Principal - - UK.OBIE.Protector - - UK.OBIE.RegisteredShareholderName - - UK.OBIE.SecondaryOwner - - UK.OBIE.SeniorManagingOfficial - - UK.OBIE.Settlor - - UK.OBIE.SuccessorOnDeath - OBExternalAccountSubType1Code: - description: Specifies the sub type of account (product family group). - type: string - enum: - - ChargeCard - - CreditCard - - CurrentAccount - - EMoney - - Loan - - Mortgage - - PrePaidCard - - Savings - OBExternalAccountType1Code: - description: Specifies the type of account (personal or business). - type: string - enum: - - Business - - Personal - OBExternalFinancialInstitutionIdentification4Code: - description: >- - Name of the identification scheme, in a coded form as published in an - external list. - type: string - x-namespaced-enum: - - UK.OBIE.BICFI - OBExternalLegalStructureType1Code: - description: Legal standing of the party. - type: string - x-namespaced-enum: - - UK.OBIE.CIC - - UK.OBIE.CIO - - UK.OBIE.Charity - - UK.OBIE.CoOp - - UK.OBIE.GeneralPartnership - - UK.OBIE.Individual - - UK.OBIE.LimitedLiabilityPartnership - - UK.OBIE.LimitedPartnership - - UK.OBIE.PrivateLimitedCompany - - UK.OBIE.PublicLimitedCompany - - UK.OBIE.ScottishLimitedPartnership - - UK.OBIE.Sole - OBExternalPartyType1Code: - description: 'Party type, in a coded form.' - type: string - enum: - - Delegate - - Joint - - Sole - OBExternalScheduleType1Code: - description: Specifies the scheduled payment date type requested - type: string - enum: - - Arrival - - Execution - OBExternalStandingOrderStatus1Code: - description: Specifies the status of the standing order in code form. - type: string - enum: - - Active - - Inactive - OBExternalStatementAmountType1Code: - description: 'Amount type, in a coded form.' - type: string - x-namespaced-enum: - - UK.OBIE.ArrearsClosingBalance - - UK.OBIE.AvailableBalance - - UK.OBIE.AverageBalanceWhenInCredit - - UK.OBIE.AverageBalanceWhenInDebit - - UK.OBIE.AverageDailyBalance - - UK.OBIE.BalanceTransferClosingBalance - - UK.OBIE.CashClosingBalance - - UK.OBIE.ClosingBalance - - UK.OBIE.CreditLimit - - UK.OBIE.CurrentPayment - - UK.OBIE.DirectDebitPaymentDue - - UK.OBIE.FSCSInsurance - - UK.OBIE.MinimumPaymentDue - - UK.OBIE.PendingTransactionsBalance - - UK.OBIE.PreviousClosingBalance - - UK.OBIE.PreviousPayment - - UK.OBIE.PurchaseClosingBalance - - UK.OBIE.StartingBalance - - UK.OBIE.TotalAdjustments - - UK.OBIE.TotalCashAdvances - - UK.OBIE.TotalCharges - - UK.OBIE.TotalCredits - - UK.OBIE.TotalDebits - - UK.OBIE.TotalPurchases - OBExternalStatementBenefitType1Code: - description: 'Benefit type, in a coded form.' - type: string - x-namespaced-enum: - - UK.OBIE.Cashback - - UK.OBIE.Insurance - - UK.OBIE.TravelDiscount - - UK.OBIE.TravelInsurance - OBExternalStatementDateTimeType1Code: - description: 'Date time type, in a coded form.' - type: string - x-namespaced-enum: - - UK.OBIE.BalanceTransferPromoEnd - - UK.OBIE.DirectDebitDue - - UK.OBIE.LastPayment - - UK.OBIE.LastStatement - - UK.OBIE.NextStatement - - UK.OBIE.PaymentDue - - UK.OBIE.PurchasePromoEnd - - UK.OBIE.StatementAvailable - OBExternalStatementFeeFrequency1Code: - description: How frequently the fee is applied to the Account. - type: string - x-namespaced-enum: - - UK.OBIE.ChargingPeriod - - UK.OBIE.PerTransactionAmount - - UK.OBIE.PerTransactionPercentage - - UK.OBIE.Quarterly - - UK.OBIE.StatementMonthly - - UK.OBIE.Weekly - OBExternalStatementFeeRateType1Code: - description: Description that may be available for the statement fee rate type. - type: string - x-namespaced-enum: - - UK.OBIE.AER - - UK.OBIE.EAR - OBExternalStatementFeeType1Code: - description: 'Fee type, in a coded form.' - type: string - x-namespaced-enum: - - UK.OBIE.Annual - - UK.OBIE.BalanceTransfer - - UK.OBIE.CashAdvance - - UK.OBIE.CashTransaction - - UK.OBIE.ForeignCashTransaction - - UK.OBIE.ForeignTransaction - - UK.OBIE.Gambling - - UK.OBIE.LatePayment - - UK.OBIE.MoneyTransfer - - UK.OBIE.Monthly - - UK.OBIE.Overlimit - - UK.OBIE.PostalOrder - - UK.OBIE.PrizeEntry - - UK.OBIE.StatementCopy - - UK.OBIE.Total - OBExternalStatementInterestFrequency1Code: - description: Specifies the statement fee type requested - type: string - x-namespaced-enum: - - UK.OBIE.Daily - - UK.OBIE.HalfYearly - - UK.OBIE.Monthly - - UK.OBIE.PerStatementDate - - UK.OBIE.Quarterly - - UK.OBIE.Weekly - - UK.OBIE.Yearly - OBExternalStatementInterestRateType1Code: - description: Description that may be available for the statement Interest rate type. - type: string - x-namespaced-enum: - - UK.OBIE.BOEBaseRate - - UK.OBIE.FixedRate - - UK.OBIE.Gross - - UK.OBIE.LoanProviderBaseRate - - UK.OBIE.Net - OBExternalStatementInterestType1Code: - description: 'Interest amount type, in a coded form.' - type: string - x-namespaced-enum: - - UK.OBIE.BalanceTransfer - - UK.OBIE.Cash - - UK.OBIE.EstimatedNext - - UK.OBIE.Purchase - - UK.OBIE.Total - OBExternalStatementRateType1Code: - description: Rate associated with the statement rate type. - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - OBExternalStatementType1Code: - description: 'Statement type, in a coded form.' - type: string - enum: - - AccountClosure - - AccountOpening - - Annual - - Interim - - RegularPeriodic - OBExternalStatementValueType1Code: - description: Value associated with the statement value type. - type: string - x-namespaced-enum: - - UK.OBIE.AirMilesPoints - - UK.OBIE.AirMilesPointsBalance - - UK.OBIE.Credits - - UK.OBIE.Debits - - UK.OBIE.HotelPoints - - UK.OBIE.HotelPointsBalance - - UK.OBIE.RetailShoppingPoints - - UK.OBIE.RetailShoppingPointsBalance - OBMerchantDetails1: - type: object - description: Details of the merchant involved in the transaction. - properties: - MerchantName: - description: Name by which the merchant is known. - type: string - minLength: 1 - maxLength: 350 - MerchantCategoryCode: - description: >- - Category code conform to ISO 18245, related to the type of services or - goods the merchant provides for the transaction. - type: string - minLength: 3 - maxLength: 4 - OBParty2: + $ref: '#/definitions/ActiveOrHistoricCurrencyCode' + OBBankTransactionCodeStructure1: type: object required: - - PartyId - properties: - PartyId: - $ref: '#/definitions/PartyId' - PartyNumber: - $ref: '#/definitions/PartyNumber' - PartyType: - $ref: '#/definitions/OBExternalPartyType1Code' - Name: - $ref: '#/definitions/Name_1' - FullLegalName: - $ref: '#/definitions/FullLegalName' - LegalStructure: - $ref: '#/definitions/OBExternalLegalStructureType1Code' - BeneficialOwnership: - type: boolean - AccountRole: - $ref: '#/definitions/OBExternalAccountRole1Code' - EmailAddress: - $ref: '#/definitions/EmailAddress' - Phone: - $ref: '#/definitions/PhoneNumber_0' - Mobile: - $ref: '#/definitions/PhoneNumber_1' - Relationships: - $ref: '#/definitions/OBPartyRelationships1' - Address: - type: array - items: - type: object - description: Postal address of a party. - required: - - Country - properties: - AddressType: - $ref: '#/definitions/OBAddressTypeCode' - AddressLine: - type: array - items: - description: >- - Information that locates and identifies a specific address, as - defined by postal services, that is presented in free format - text. - type: string - minLength: 1 - maxLength: 70 - minItems: 0 - maxItems: 5 - StreetName: - $ref: '#/definitions/StreetName' - BuildingNumber: - $ref: '#/definitions/BuildingNumber' - PostCode: - $ref: '#/definitions/PostCode' - TownName: - $ref: '#/definitions/TownName' - CountrySubDivision: - $ref: '#/definitions/CountrySubDivision' - Country: - $ref: '#/definitions/CountryCode' - OBPartyRelationships1: - type: object - description: The Party's relationships with other resources. - properties: - Account: - type: object - required: - - Related - - Id - description: Relationship to the Account resource. - properties: - Related: - description: Absolute URI to the related resource. - type: string - format: uri - Id: - description: >- - Unique identification as assigned by the ASPSP to uniquely - identify the related resource. - type: string - minLength: 1 - maxLength: 40 - OBPostalAddress6: - type: object - description: >- - Information that locates and identifies a specific address, as defined by - postal services. - properties: - AddressType: - $ref: '#/definitions/OBAddressTypeCode' - Department: - description: Identification of a division of a large organisation or building. - type: string - minLength: 1 - maxLength: 70 - SubDepartment: - description: Identification of a sub-division of a large organisation or building. - type: string - minLength: 1 - maxLength: 70 - StreetName: - $ref: '#/definitions/StreetName' - BuildingNumber: - $ref: '#/definitions/BuildingNumber' - PostCode: - $ref: '#/definitions/PostCode' - TownName: - $ref: '#/definitions/TownName' - CountrySubDivision: - description: 'Identifies a subdivision of a country such as state, region, county.' - type: string - minLength: 1 - maxLength: 35 - Country: - description: Nation with its own government. - type: string - pattern: '^[A-Z]{2,2}$' - AddressLine: - type: array - items: - description: >- - Information that locates and identifies a specific address, as - defined by postal services, presented in free format text. - type: string - minLength: 1 - maxLength: 70 - minItems: 0 - maxItems: 7 - OBRate1_0: - description: >- - Rate charged for Statement Fee (where it is charged in terms of a rate - rather than an amount) - type: number - OBRate1_1: - description: >- - field representing a percentage (e.g. 0.05 represents 5% and 0.9525 - represents 95.25%). Note the number of decimal places may vary. - type: number - OBReadAccount3: - type: object - required: - - Data - properties: - Data: - type: object - properties: - Account: - type: array - items: - $ref: '#/definitions/OBAccount3' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadAccount4: - type: object - required: - - Data - properties: - Data: - type: object - properties: - Account: - type: array - items: - $ref: '#/definitions/OBAccount4' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadBalance1: - type: object - required: - - Data - properties: - Data: - type: object - required: - - Balance - properties: - Balance: - type: array - items: - type: object - description: Set of elements used to define the balance details. - required: - - AccountId - - CreditDebitIndicator - - Type - - DateTime - - Amount - properties: - AccountId: - $ref: '#/definitions/AccountId' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_2' - Type: - $ref: '#/definitions/OBBalanceType1Code' - DateTime: - description: >- - Indicates the date (and time) of the balance.All dates in - the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. - An example is below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - Amount: - type: object - required: - - Amount - - Currency - description: Amount of money of the cash balance. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - CreditLine: - type: array - items: - type: object - description: >- - Set of elements used to provide details on the credit - line. - required: - - Included - properties: - Included: - description: >- - Indicates whether or not the credit line is included - in the balance of the account. - - Usage: If not present, credit line is not included in - the balance amount of the account. - type: boolean - Type: - description: 'Limit type, in a coded form.' - type: string - enum: - - Available - - Credit - - Emergency - - Pre-Agreed - - Temporary - Amount: - type: object - required: - - Amount - - Currency - description: Amount of money of the credit line. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - minItems: 1 - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadBeneficiary3: - type: object - required: - - Data - properties: - Data: - type: object - properties: - Beneficiary: - type: array - items: - $ref: '#/definitions/OBBeneficiary3' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadConsent1: - type: object - required: - - Data - - Risk - properties: - Data: - $ref: '#/definitions/OBReadData1' - Risk: - $ref: '#/definitions/OBRisk2' - OBReadConsentResponse1: - type: object - required: - - Data - - Risk - properties: - Data: - type: object - required: - - ConsentId - - CreationDateTime - - StatusUpdateDateTime - - Permissions - properties: - ConsentId: - description: >- - Unique identification as assigned to identify the account access - consent resource. - type: string - minLength: 1 - maxLength: 128 - CreationDateTime: - $ref: '#/definitions/CreationDateTime' - Status: - $ref: '#/definitions/OBExternalRequestStatus1Code' - StatusUpdateDateTime: - $ref: '#/definitions/StatusUpdateDateTime' - Permissions: - type: array - items: - $ref: '#/definitions/OBExternalPermissions1Code' - minItems: 1 - ExpirationDateTime: - description: >- - Specified date and time the permissions will expire. - - If this is not populated, the permissions will be open ended.All - dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An - example is below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - TransactionFromDateTime: - description: >- - Specified start date and time for the transaction query period. - - If this is not populated, the start date will be open ended, and - data will be returned from the earliest available transaction.All - dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An - example is below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - TransactionToDateTime: - description: >- - Specified end date and time for the transaction query period. - - If this is not populated, the end date will be open ended, and - data will be returned to the latest available transaction.All - dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An - example is below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - Risk: - $ref: '#/definitions/OBRisk2' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadDataStatement2: - type: object - properties: - Statement: - type: array - items: - $ref: '#/definitions/OBStatement2' - OBReadDataTransaction5: - type: object - properties: - Transaction: - type: array - items: - $ref: '#/definitions/OBTransaction5' - OBReadDirectDebit1: - type: object - required: - - Data - properties: - Data: - type: object - properties: - DirectDebit: - type: array - items: - type: object - description: Account to or from which a cash entry is made. - required: - - AccountId - - MandateIdentification - - Name - properties: - AccountId: - $ref: '#/definitions/AccountId' - DirectDebitId: - description: >- - A unique and immutable identifier used to identify the - direct debit resource. This identifier has no meaning to the - account owner. - type: string - minLength: 1 - maxLength: 40 - MandateIdentification: - description: >- - Direct Debit reference. For AUDDIS service users provide - Core Reference. For non AUDDIS service users provide Core - reference if possible or last used reference. - type: string - minLength: 1 - maxLength: 35 - DirectDebitStatusCode: - description: Specifies the status of the direct debit in code form. - type: string - enum: - - Active - - Inactive - Name: - description: Name of Service User. - type: string - minLength: 1 - maxLength: 70 - PreviousPaymentDateTime: - description: >- - Date of most recent direct debit collection.All dates in the - JSON payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. - An example is below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - PreviousPaymentAmount: - type: object - required: - - Amount - - Currency - description: The amount of the most recent direct debit collection. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadOffer1: - type: object - required: - - Data - properties: - Data: - type: object - properties: - Offer: - type: array - items: - type: object - required: - - AccountId - properties: - AccountId: - $ref: '#/definitions/AccountId' - OfferId: - description: >- - A unique and immutable identifier used to identify the offer - resource. This identifier has no meaning to the account - owner. - type: string - minLength: 1 - maxLength: 40 - OfferType: - description: 'Offer type, in a coded form.' - type: string - enum: - - BalanceTransfer - - LimitIncrease - - MoneyTransfer - - Other - - PromotionalRate - Description: - description: Further details of the offer. - type: string - minLength: 1 - maxLength: 500 - StartDateTime: - description: >- - Date and time at which the offer starts.All dates in the - JSON payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. - An example is below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - EndDateTime: - description: >- - Date and time at which the offer ends.All dates in the JSON - payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. - An example is below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - Rate: - description: Rate associated with the offer type. - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - Value: - description: Value associated with the offer type. - type: integer - Term: - description: Further details of the term of the offer. - type: string - minLength: 1 - maxLength: 500 - URL: - description: >- - URL (Uniform Resource Locator) where documentation on the - offer can be found - type: string - minLength: 1 - maxLength: 256 - Amount: - type: object - required: - - Amount - - Currency - description: Amount of money associated with the offer type. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - Fee: - type: object - required: - - Amount - - Currency - description: Fee associated with the offer type. - properties: - Amount: - $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' - Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadParty1: - type: object - required: - - Data - properties: - Data: - type: object - properties: - Party: - type: object - required: - - PartyId - properties: - PartyId: - $ref: '#/definitions/PartyId' - PartyNumber: - $ref: '#/definitions/PartyNumber' - PartyType: - $ref: '#/definitions/OBExternalPartyType1Code' - Name: - $ref: '#/definitions/Name_1' - EmailAddress: - $ref: '#/definitions/EmailAddress' - Phone: - $ref: '#/definitions/PhoneNumber_0' - Mobile: - $ref: '#/definitions/PhoneNumber_1' - Address: - type: array - items: - type: object - description: Postal address of a party. - required: - - Country - properties: - AddressType: - $ref: '#/definitions/OBAddressTypeCode' - AddressLine: - type: array - items: - description: >- - Information that locates and identifies a specific - address, as defined by postal services, that is - presented in free format text. - type: string - minLength: 1 - maxLength: 70 - minItems: 0 - maxItems: 5 - StreetName: - $ref: '#/definitions/StreetName' - BuildingNumber: - $ref: '#/definitions/BuildingNumber' - PostCode: - $ref: '#/definitions/PostCode' - TownName: - $ref: '#/definitions/TownName' - CountrySubDivision: - $ref: '#/definitions/CountrySubDivision' - Country: - $ref: '#/definitions/CountryCode' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadParty2: - type: object - required: - - Data - properties: - Data: - type: object - properties: - Party: - $ref: '#/definitions/OBParty2' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadParty3: - type: object - required: - - Data - properties: - Data: - type: object - properties: - Party: - type: array - items: - $ref: '#/definitions/OBParty2' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadProduct2: - type: object - required: - - Data - description: >- - Product details of Other Product which is not avaiable in the standard - list - properties: - Data: - type: object - description: Aligning with the read write specs structure. - properties: - Product: - type: array - items: - type: object - description: Product details associated with the Account - required: - - AccountId - - ProductType - properties: - ProductName: - description: >- - The name of the Product used for marketing purposes from a - customer perspective. I.e. what the customer would - recognise. - type: string - minLength: 1 - maxLength: 350 - ProductId: - description: >- - The unique ID that has been internally assigned by the - financial institution to each of the current account banking - products they market to their retail and/or small to medium - enterprise (SME) customers. - type: string - minLength: 1 - maxLength: 40 - AccountId: - description: Account Identification of the customer for Product Details - type: string - minLength: 1 - maxLength: 40 - SecondaryProductId: - description: >- - Any secondary Identification which supports Product - Identifier to uniquely identify the current account banking - products. - type: string - minLength: 1 - maxLength: 70 - ProductType: - description: >- - Product type : Personal Current Account, Business Current - Account - type: string - enum: - - BusinessCurrentAccount - - CommercialCreditCard - - Other - - PersonalCurrentAccount - - SMELoan - MarketingStateId: - description: >- - Unique and unambiguous identification of a Product - Marketing State. - type: string - minLength: 1 - maxLength: 35 - OtherProductType: - type: object - required: - - Name - - Description - description: Other product type details associated with the account. - properties: - Name: - description: Long name associated with the product - type: string - minLength: 1 - maxLength: 350 - Description: - description: Description of the Product associated with the account - type: string - minLength: 1 - maxLength: 350 - ProductDetails: - type: object - properties: - Segment: - type: array - items: - description: >- - Market segmentation is a marketing term referring - to the aggregating of prospective buyers into - groups, or segments, that have common needs and - respond similarly to a marketing action. Market - segmentation enables companies to target different - categories of consumers who perceive the full - value of certain products and services differently - from one another. - - Read more: Market Segmentation - http://www.investopedia.com/terms/m/marketsegmentation.asp#ixzz4gfEEalTd - type: string - enum: - - GEAS - - GEBA - - GEBR - - GEBU - - GECI - - GECS - - GEFB - - GEFG - - GEG - - GEGR - - GEGS - - GEOT - - GEOV - - GEPA - - GEPR - - GERE - - GEST - - GEYA - - GEYO - - PSCA - - PSES - - PSNC - - PSNP - - PSRG - - PSSS - - PSST - - PSSW - FeeFreeLength: - description: The length/duration of the fee free period - type: integer - FeeFreeLengthPeriod: - description: >- - The unit of period (days, weeks, months etc.) of the - promotional length - type: string - enum: - - PACT - - PDAY - - PHYR - - PMTH - - PQTR - - PWEK - - PYER - MonthlyMaximumCharge: - description: >- - The maximum relevant charges that could accrue as - defined fully in Part 7 of the CMA order - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement the Core - product details - type: string - minLength: 1 - maxLength: 2000 - OtherSegment: - $ref: '#/definitions/OB_OtherCodeType1_0' - CreditInterest: - type: object - required: - - TierBandSet - description: >- - Details about the interest that may be payable to the - Account holders - properties: - TierBandSet: - type: array - items: - type: object - description: >- - The group of tiers or bands for which credit - interest can be applied. - required: - - TierBandMethod - - Destination - - TierBand - properties: - TierBandMethod: - description: >- - The methodology of how credit interest is - paid/applied. It can be:- - - 1. Banded - - Interest rates are banded. i.e. Increasing - rate on whole balance as balance increases. - - 2. Tiered - - Interest rates are tiered. i.e. increasing - rate for each tier as balance increases, but - interest paid on tier fixed for that tier and - not on whole balance. - - 3. Whole - - The same interest rate is applied irrespective - of the product holder's account balance - type: string - enum: - - INBA - - INTI - - INWH - CalculationMethod: - $ref: >- - #/definitions/OB_InterestCalculationMethod1Code - Destination: - description: >- - Describes whether accrued interest is payable - only to the BCA or to another bank account - type: string - enum: - - INOT - - INPA - - INSC - Notes: - type: array - items: - description: >- - Optional additional notes to supplement the - Tier Band Set details - type: string - minLength: 1 - maxLength: 2000 - OtherCalculationMethod: - $ref: '#/definitions/OB_OtherCodeType1_0' - OtherDestination: - $ref: '#/definitions/OB_OtherCodeType1_0' - TierBand: - type: array - items: - type: object - description: Tier Band Details - required: - - TierValueMinimum - - ApplicationFrequency - - FixedVariableInterestRateType - - AER - properties: - Identification: - description: >- - Unique and unambiguous identification of - a Tier Band for the Product. - type: string - minLength: 1 - maxLength: 35 - TierValueMinimum: - description: >- - Minimum deposit value for which the - credit interest tier applies. - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - TierValueMaximum: - description: >- - Maximum deposit value for which the - credit interest tier applies. - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - CalculationFrequency: - description: >- - How often is credit interest calculated - for the account. - type: string - enum: - - FQAT - - FQDY - - FQHY - - FQMY - - FQOT - - FQQY - - FQSD - - FQWY - - FQYY - ApplicationFrequency: - description: >- - How often is interest applied to the - Product for this tier/band i.e. how - often the financial institution pays - accumulated interest to the customer's - account. - type: string - enum: - - FQAT - - FQDY - - FQHY - - FQMY - - FQOT - - FQQY - - FQSD - - FQWY - - FQYY - DepositInterestAppliedCoverage: - description: Amount on which Interest applied. - type: string - enum: - - INBA - - INTI - - INWH - FixedVariableInterestRateType: - $ref: >- - #/definitions/OB_InterestFixedVariableType1Code - AER: - description: >- - The annual equivalent rate (AER) is - interest that is calculated under the - assumption that any interest paid is - combined with the original balance and - the next interest payment will be based - on the slightly higher account balance. - Overall, this means that interest can be - compounded several times in a year - depending on the number of times that - interest payments are made. - - Read more: Annual Equivalent Rate (AER) - http://www.investopedia.com/terms/a/aer.asp#ixzz4gfR7IO1A - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - BankInterestRateType: - description: >- - Interest rate types, other than AER, - which financial institutions may use to - describe the annual interest rate - payable to the account holder's account. - type: string - enum: - - INBB - - INFR - - INGR - - INLR - - INNE - - INOT - BankInterestRate: - description: Bank Interest for the product - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement - the Tier Band details - type: string - minLength: 1 - maxLength: 2000 - OtherBankInterestType: - type: object - required: - - Name - - Description - description: >- - Other interest rate types which are not - available in the standard code list - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OtherApplicationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_1' - OtherCalculationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_2' - minItems: 1 - minItems: 1 - Overdraft: - type: object - required: - - OverdraftTierBandSet - description: Borrowing details - properties: - Notes: - type: array - items: - description: Associated Notes about the overdraft rates - type: string - minLength: 1 - maxLength: 2000 - OverdraftTierBandSet: - type: array - items: - type: object - description: Tier band set details - required: - - TierBandMethod - - OverdraftTierBand - properties: - TierBandMethod: - description: >- - The methodology of how overdraft is charged. - It can be: - - 'Whole' Where the same charge/rate is applied - to the entirety of the overdraft balance - (where charges are applicable). - - 'Tiered' Where different charges/rates are - applied dependent on overdraft maximum and - minimum balance amount tiers defined by the - lending financial organisation - - 'Banded' Where different charges/rates are - applied dependent on overdraft maximum and - minimum balance amount bands defined by a - government organisation. - type: string - enum: - - INBA - - INTI - - INWH - OverdraftType: - description: >- - An overdraft can either be 'committed' which - means that the facility cannot be withdrawn - without reasonable notification before it's - agreed end date, or 'on demand' which means - that the financial institution can demand - repayment at any point in time. - type: string - enum: - - OVCO - - OVOD - - OVOT - Identification: - description: >- - Unique and unambiguous identification of a - Tier Band for a overdraft product. - type: string - minLength: 1 - maxLength: 35 - AuthorisedIndicator: - description: >- - Indicates if the Overdraft is authorised (Y) - or unauthorised (N) - type: boolean - BufferAmount: - description: >- - When a customer exceeds their credit limit, a - financial institution will not charge the - customer unauthorised overdraft charges if - they do not exceed by more than the buffer - amount. Note: Authorised overdraft charges may - still apply. - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement the - overdraft Tier Band Set details - type: string - minLength: 1 - maxLength: 2000 - OverdraftTierBand: - type: array - items: - type: object - description: >- - Provides overdraft details for a specific - tier or band - required: - - TierValueMin - properties: - Identification: - description: >- - Unique and unambiguous identification of - a Tier Band for a overdraft. - type: string - minLength: 1 - maxLength: 35 - TierValueMin: - description: Minimum value of Overdraft Tier/Band - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - TierValueMax: - description: Maximum value of Overdraft Tier/Band - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - EAR: - description: >- - EAR means Effective Annual Rate and/or - Equivalent Annual Rate (frequently - - used interchangeably), being the actual - annual interest rate of an Overdraft. - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - AgreementLengthMin: - description: >- - Specifies the minimum length of a band - for a fixed overdraft agreement - type: integer - AgreementLengthMax: - description: >- - Specifies the maximum length of a band - for a fixed overdraft agreement - type: integer - AgreementPeriod: - description: >- - Specifies the period of a fixed length - overdraft agreement - type: string - enum: - - PACT - - PDAY - - PHYR - - PMTH - - PQTR - - PWEK - - PYER - OverdraftInterestChargingCoverage: - description: >- - Refers to which interest rate is applied - when interests are tiered. For example, - if an overdraft balance is �2k and the - interest tiers are:- 0-�500 0.1%, - 500-1000 0.2%, 1000-10000 0.5%, then the - applicable interest rate could either be - 0.5% of the entire balance (since the - account balance sits in the top interest - tier) or - (0.1%*500)+(0.2%*500)+(0.5%*1000). In - the 1st situation, we say the interest - is applied to the �Whole� of the account - balance, and in the 2nd that it is - �Tiered�. - type: string - enum: - - INBA - - INTI - - INWH - BankGuaranteedIndicator: - description: >- - Indicates whether the advertised - overdraft rate is guaranteed to be - offered to a borrower by the bank e.g. - if it�s part of a government scheme, or - whether the rate may vary dependent on - the applicant�s circumstances. - type: boolean - Notes: - type: array - items: - description: >- - Optional additional notes to supplement - the Tier/band details - type: string - minLength: 1 - maxLength: 2000 - OverdraftFeesCharges: - type: array - items: - type: object - description: Overdraft fees and charges - required: - - OverdraftFeeChargeDetail - properties: - OverdraftFeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FBAO - - FBAR - - FBEB - - FBIT - - FBOR - - FBOS - - FBSC - - FBTO - - FBUB - - FBUT - - FTOT - - FTUT - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_0' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_0' - CappingPeriod: - $ref: '#/definitions/OB_Period1Code' - Notes: - type: array - items: - description: >- - Notes related to Overdraft fee charge - cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OverdraftFeeChargeDetail: - type: array - items: - type: object - description: Details about the fees/charges - required: - - FeeType - - ApplicationFrequency - properties: - FeeType: - $ref: '#/definitions/OB_OverdraftFeeType1Code' - NegotiableIndicator: - description: >- - Indicates whether fee and charges are - negotiable - type: boolean - OverdraftControlIndicator: - description: >- - Indicates if the fee/charge is already - covered by an 'Overdraft Control' fee or - not. - type: boolean - IncrementalBorrowingAmount: - $ref: '#/definitions/OB_Amount1_1' - FeeAmount: - $ref: '#/definitions/OB_Amount1_2' - FeeRate: - $ref: '#/definitions/OB_Rate1_0' - FeeRateType: - $ref: '#/definitions/OB_InterestRateType1Code_0' - ApplicationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_0' - CalculationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_1' - Notes: - type: array - items: - description: >- - Free text for capturing any other info - related to Overdraft Fees Charge Details - type: string - minLength: 1 - maxLength: 2000 - OverdraftFeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FBAO - - FBAR - - FBEB - - FBIT - - FBOR - - FBOS - - FBSC - - FBTO - - FBUB - - FBUT - - FTOT - - FTUT - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_0' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_0' - CappingPeriod: - $ref: '#/definitions/OB_Period1Code' - Notes: - type: array - items: - description: >- - Notes related to Overdraft fee charge - cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OtherFeeType: - $ref: '#/definitions/OB_OtherCodeType1_3' - OtherFeeRateType: - $ref: '#/definitions/OB_OtherCodeType1_4' - OtherApplicationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_1' - OtherCalculationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_2' - minItems: 1 - minItems: 1 - OverdraftFeesCharges: - type: array - items: - type: object - description: Overdraft fees and charges details - required: - - OverdraftFeeChargeDetail - properties: - OverdraftFeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FBAO - - FBAR - - FBEB - - FBIT - - FBOR - - FBOS - - FBSC - - FBTO - - FBUB - - FBUT - - FTOT - - FTUT - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_0' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_0' - CappingPeriod: - $ref: '#/definitions/OB_Period1Code' - Notes: - type: array - items: - description: >- - Notes related to Overdraft fee charge - cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OverdraftFeeChargeDetail: - type: array - items: - type: object - description: Details about the fees/charges - required: - - FeeType - - ApplicationFrequency - properties: - FeeType: - $ref: '#/definitions/OB_OverdraftFeeType1Code' - NegotiableIndicator: - description: >- - Indicates whether fee and charges are - negotiable - type: boolean - OverdraftControlIndicator: - description: >- - Indicates if the fee/charge is already - covered by an 'Overdraft Control' fee or - not. - type: boolean - IncrementalBorrowingAmount: - $ref: '#/definitions/OB_Amount1_1' - FeeAmount: - $ref: '#/definitions/OB_Amount1_2' - FeeRate: - $ref: '#/definitions/OB_Rate1_0' - FeeRateType: - $ref: '#/definitions/OB_InterestRateType1Code_0' - ApplicationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_0' - CalculationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_1' - Notes: - type: array - items: - description: >- - Free text for capturing any other info - related to Overdraft Fees Charge Details - type: string - minLength: 1 - maxLength: 2000 - OverdraftFeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FBAO - - FBAR - - FBEB - - FBIT - - FBOR - - FBOS - - FBSC - - FBTO - - FBUB - - FBUT - - FTOT - - FTUT - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_0' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_0' - CappingPeriod: - $ref: '#/definitions/OB_Period1Code' - Notes: - type: array - items: - description: >- - Notes related to Overdraft fee charge - cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OtherFeeType: - $ref: '#/definitions/OB_OtherCodeType1_3' - OtherFeeRateType: - $ref: '#/definitions/OB_OtherCodeType1_4' - OtherApplicationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_1' - OtherCalculationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_2' - minItems: 1 - minItems: 1 - LoanInterest: - type: object - required: - - LoanInterestTierBandSet - description: >- - Details about the interest that may be payable to the - SME Loan holders - properties: - Notes: - type: array - items: - description: >- - Optional additional notes to supplement the - LoanInterest - type: string - minLength: 1 - maxLength: 2000 - LoanInterestTierBandSet: - type: array - items: - type: object - description: >- - The group of tiers or bands for which debit - interest can be applied. - required: - - TierBandMethod - - CalculationMethod - - LoanInterestTierBand - properties: - TierBandMethod: - description: >- - The methodology of how credit interest is - charged. It can be:- - - 1. Banded - - Interest rates are banded. i.e. Increasing - rate on whole balance as balance increases. - - 2. Tiered - - Interest rates are tiered. i.e. increasing - rate for each tier as balance increases, but - interest paid on tier fixed for that tier and - not on whole balance. - - 3. Whole - - The same interest rate is applied irrespective - of the SME Loan balance - type: string - enum: - - INBA - - INTI - - INWH - Identification: - description: >- - Loan interest tierbandset identification. Used - by loan providers for internal use purpose. - type: string - minLength: 1 - maxLength: 35 - CalculationMethod: - $ref: >- - #/definitions/OB_InterestCalculationMethod1Code - Notes: - type: array - items: - description: >- - Optional additional notes to supplement the - Tier Band Set details - type: string - minLength: 1 - maxLength: 2000 - OtherCalculationMethod: - $ref: '#/definitions/OB_OtherCodeType1_0' - LoanInterestTierBand: - type: array - items: - type: object - description: Tier Band Details - required: - - TierValueMinimum - - TierValueMinTerm - - MinTermPeriod - - FixedVariableInterestRateType - - RepAPR - properties: - Identification: - description: >- - Unique and unambiguous identification of - a Tier Band for a SME Loan. - type: string - minLength: 1 - maxLength: 35 - TierValueMinimum: - description: >- - Minimum loan value for which the loan - interest tier applies. - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - TierValueMaximum: - description: >- - Maximum loan value for which the loan - interest tier applies. - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - TierValueMinTerm: - description: >- - Minimum loan term for which the loan - interest tier applies. - type: integer - MinTermPeriod: - description: >- - The unit of period (days, weeks, months - etc.) of the Minimum Term - type: string - enum: - - PACT - - PDAY - - PHYR - - PMTH - - PQTR - - PWEK - - PYER - TierValueMaxTerm: - description: >- - Maximum loan term for which the loan - interest tier applies. - type: integer - MaxTermPeriod: - description: >- - The unit of period (days, weeks, months - etc.) of the Maximum Term - type: string - enum: - - PACT - - PDAY - - PHYR - - PMTH - - PQTR - - PWEK - - PYER - FixedVariableInterestRateType: - $ref: >- - #/definitions/OB_InterestFixedVariableType1Code - RepAPR: - description: >- - The annual equivalent rate (AER) is - interest that is calculated under the - assumption that any interest paid is - combined with the original balance and - the next interest payment will be based - on the slightly higher account balance. - Overall, this means that interest can be - compounded several times in a year - depending on the number of times that - interest payments are made. - - For SME Loan, this APR is the - representative APR which includes any - account fees. - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - LoanProviderInterestRateType: - description: >- - Interest rate types, other than APR, - which financial institutions may use to - describe the annual interest rate - payable for the SME Loan. - type: string - enum: - - INBB - - INFR - - INGR - - INLR - - INNE - - INOT - LoanProviderInterestRate: - description: >- - Loan provider Interest for the SME Loan - product - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement - the Tier Band details - type: string - minLength: 1 - maxLength: 2000 - OtherLoanProviderInterestRateType: - type: object - required: - - Name - - Description - description: >- - Other loan interest rate types which are - not available in the standard code list - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - LoanInterestFeesCharges: - type: array - items: - type: object - description: >- - Contains details of fees and charges - which are not associated with either - LoanRepayment or features/benefits - required: - - LoanInterestFeeChargeDetail - properties: - LoanInterestFeeChargeDetail: - type: array - items: - type: object - description: Other fees/charges details - required: - - FeeType - - ApplicationFrequency - - CalculationFrequency - properties: - FeeType: - $ref: '#/definitions/OB_FeeType1Code' - NegotiableIndicator: - description: >- - Fee/charge which is usually negotiable - rather than a fixed amount - type: boolean - FeeAmount: - $ref: '#/definitions/OB_Amount1_3' - FeeRate: - $ref: '#/definitions/OB_Rate1_1' - FeeRateType: - $ref: '#/definitions/OB_InterestRateType1Code_1' - ApplicationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_2' - CalculationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_3' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement - the fee/charge details. - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - $ref: >- - #/definitions/OB_OtherFeeChargeDetailType - OtherFeeRateType: - $ref: '#/definitions/OB_OtherCodeType1_5' - OtherApplicationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_6' - OtherCalculationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_7' - minItems: 1 - LoanInterestFeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (minimum/maximum - charges) that apply to a particular - fee/charge - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FEPF - - FTOT - - FYAF - - FYAM - - FYAQ - - FYCP - - FYDB - - FYMI - - FYXX - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_1' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_4' - CappingPeriod: - $ref: '#/definitions/OB_FeeFrequency1Code_4' - Notes: - type: array - items: - description: >- - Free text for adding extra details for - fee charge cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - minItems: 1 - LoanInterestFeesCharges: - type: array - items: - type: object - description: >- - Contains details of fees and charges which - are not associated with either LoanRepayment - or features/benefits - required: - - LoanInterestFeeChargeDetail - properties: - LoanInterestFeeChargeDetail: - type: array - items: - type: object - description: Other fees/charges details - required: - - FeeType - - ApplicationFrequency - - CalculationFrequency - properties: - FeeType: - $ref: '#/definitions/OB_FeeType1Code' - NegotiableIndicator: - description: >- - Fee/charge which is usually negotiable - rather than a fixed amount - type: boolean - FeeAmount: - $ref: '#/definitions/OB_Amount1_3' - FeeRate: - $ref: '#/definitions/OB_Rate1_1' - FeeRateType: - $ref: '#/definitions/OB_InterestRateType1Code_1' - ApplicationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_2' - CalculationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_3' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement - the fee/charge details. - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - $ref: >- - #/definitions/OB_OtherFeeChargeDetailType - OtherFeeRateType: - $ref: '#/definitions/OB_OtherCodeType1_5' - OtherApplicationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_6' - OtherCalculationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_7' - minItems: 1 - LoanInterestFeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (minimum/maximum - charges) that apply to a particular - fee/charge - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FEPF - - FTOT - - FYAF - - FYAM - - FYAQ - - FYCP - - FYDB - - FYMI - - FYXX - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_1' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_4' - CappingPeriod: - $ref: '#/definitions/OB_FeeFrequency1Code_4' - Notes: - type: array - items: - description: >- - Free text for adding extra details for - fee charge cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - minItems: 1 - Repayment: - type: object - description: Repayment details of the Loan product - properties: - RepaymentType: - description: Repayment type - type: string - enum: - - USBA - - USBU - - USCI - - USCS - - USER - - USFA - - USFB - - USFI - - USIO - - USOT - - USPF - - USRW - - USSL - RepaymentFrequency: - description: Repayment frequency - type: string - enum: - - SMDA - - SMFL - - SMFO - - SMHY - - SMMO - - SMOT - - SMQU - - SMWE - - SMYE - AmountType: - description: >- - The repayment is for paying just the interest only - or both interest and capital or bullet amount or - balance to date etc - type: string - enum: - - RABD - - RABL - - RACI - - RAFC - - RAIO - - RALT - - USOT - Notes: - type: array - items: - description: >- - Optional additional notes to supplement the - Repayment - type: string - minLength: 1 - maxLength: 2000 - OtherRepaymentType: - type: object - required: - - Name - - Description - description: >- - Other repayment type which is not in the standard - code list - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OtherRepaymentFrequency: - type: object - required: - - Name - - Description - description: >- - Other repayment frequency which is not in the - standard code list - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OtherAmountType: - type: object - required: - - Name - - Description - description: >- - Other amount type which is not in the standard code - list - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - RepaymentFeeCharges: - type: object - required: - - RepaymentFeeChargeDetail - description: >- - Applicable fee/charges for repayment such as - prepayment, full early repayment or non repayment. - properties: - RepaymentFeeChargeDetail: - type: array - items: - type: object - description: >- - Details about specific fees/charges that are - applied for repayment - required: - - FeeType - - ApplicationFrequency - - CalculationFrequency - properties: - FeeType: - $ref: '#/definitions/OB_FeeType1Code' - NegotiableIndicator: - description: >- - Fee/charge which is usually negotiable - rather than a fixed amount - type: boolean - FeeAmount: - $ref: '#/definitions/OB_Amount1_3' - FeeRate: - $ref: '#/definitions/OB_Rate1_1' - FeeRateType: - $ref: '#/definitions/OB_InterestRateType1Code_1' - ApplicationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_2' - CalculationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_3' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement - the fee/charge details. - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - $ref: '#/definitions/OB_OtherFeeChargeDetailType' - OtherFeeRateType: - $ref: '#/definitions/OB_OtherCodeType1_8' - OtherApplicationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_6' - OtherCalculationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_7' - minItems: 1 - RepaymentFeeChargeCap: - type: array - items: - type: object - description: >- - RepaymentFeeChargeCap sets daily, weekly, - monthly, yearly limits on the fees that are - charged - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FEPF - - FTOT - - FYAF - - FYAM - - FYAQ - - FYCP - - FYDB - - FYMI - - FYXX - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_1' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_4' - CappingPeriod: - $ref: '#/definitions/OB_Period1Code' - Notes: - type: array - items: - description: >- - Free text for adding extra details for - fee charge cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - RepaymentHoliday: - type: array - items: - type: object - description: Details of capital repayment holiday if any - properties: - MaxHolidayLength: - description: >- - The maximum length/duration of a Repayment - Holiday - type: integer - MaxHolidayPeriod: - description: >- - The unit of period (days, weeks, months etc.) - of the repayment holiday - type: string - enum: - - PACT - - PDAY - - PHYR - - PMTH - - PQTR - - PWEK - - PYER - Notes: - type: array - items: - description: >- - Free text for adding details for repayment - holiday - type: string - minLength: 1 - maxLength: 2000 - OtherFeesCharges: - type: array - items: - type: object - description: >- - Contains details of fees and charges which are not - associated with either Overdraft or features/benefits - required: - - FeeChargeDetail - properties: - TariffType: - description: TariffType which defines the fee and charges. - type: string - enum: - - TTEL - - TTMX - - TTOT - TariffName: - description: Name of the tariff - type: string - minLength: 1 - maxLength: 350 - OtherTariffType: - type: object - required: - - Name - - Description - description: >- - Other tariff type which is not in the standard - list. - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - FeeChargeDetail: - type: array - items: - type: object - description: Other fees/charges details - required: - - FeeCategory - - FeeType - - ApplicationFrequency - properties: - FeeCategory: - $ref: '#/definitions/OB_FeeCategory1Code' - FeeType: - $ref: '#/definitions/OB_FeeType1Code' - NegotiableIndicator: - description: >- - Fee/charge which is usually negotiable - rather than a fixed amount - type: boolean - FeeAmount: - $ref: '#/definitions/OB_Amount1_3' - FeeRate: - $ref: '#/definitions/OB_Rate1_1' - FeeRateType: - $ref: '#/definitions/OB_InterestRateType1Code_1' - ApplicationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_2' - CalculationFrequency: - $ref: '#/definitions/OB_FeeFrequency1Code_3' - Notes: - type: array - items: - description: >- - Optional additional notes to supplement - the fee/charge details. - type: string - minLength: 1 - maxLength: 2000 - FeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (maximum charges) - that apply to a particular or group of - fee/charge - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FEPF - - FTOT - - FYAF - - FYAM - - FYAQ - - FYCP - - FYDB - - FYMI - - FYXX - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_1' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_4' - CappingPeriod: - $ref: '#/definitions/OB_Period1Code' - Notes: - type: array - items: - description: >- - Free text for adding extra details for - fee charge cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not - available in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OtherFeeCategoryType: - $ref: '#/definitions/OB_OtherCodeType1_0' - OtherFeeType: - $ref: '#/definitions/OB_OtherFeeChargeDetailType' - OtherFeeRateType: - $ref: '#/definitions/OB_OtherCodeType1_8' - OtherApplicationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_6' - OtherCalculationFrequency: - $ref: '#/definitions/OB_OtherCodeType1_7' - FeeApplicableRange: - type: object - description: >- - Range or amounts or rates for which the - fee/charge applies - properties: - MinimumAmount: - description: >- - Minimum Amount on which fee/charge is - applicable (where it is expressed as an - amount) - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - MaximumAmount: - description: >- - Maximum Amount on which fee is - applicable (where it is expressed as an - amount) - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - MinimumRate: - description: >- - Minimum rate on which fee/charge is - applicable(where it is expressed as an - rate) - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - MaximumRate: - description: >- - Maximum rate on which fee/charge is - applicable(where it is expressed as an - rate) - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - minItems: 1 - FeeChargeCap: - type: array - items: - type: object - description: >- - Details about any caps (maximum charges) that - apply to a particular or group of fee/charge - required: - - FeeType - - MinMaxType - properties: - FeeType: - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - FEPF - - FTOT - - FYAF - - FYAM - - FYAQ - - FYCP - - FYDB - - FYMI - - FYXX - minItems: 1 - MinMaxType: - $ref: '#/definitions/OB_MinMaxType1Code' - FeeCapOccurrence: - $ref: '#/definitions/Number_1' - FeeCapAmount: - $ref: '#/definitions/OB_Amount1_4' - CappingPeriod: - $ref: '#/definitions/OB_Period1Code' - Notes: - type: array - items: - description: >- - Free text for adding extra details for - fee charge cap - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - type: array - items: - type: object - description: >- - Other fee type code which is not available - in the standard code set - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - BCA: - type: object - title: BCA - properties: - ProductDetails: - type: object - title: ProductDetails - properties: - Segment: - description: >- - Market segmentation is a marketing term referring to - the aggregating of prospective buyers into groups, - or segments, that have common needs and respond - similarly to a marketing action. Market segmentation - enables companies to target different categories of - consumers who perceive the full value of certain - products and services differently from one another. - - - Read more: Market Segmentation - http://www.investopedia.com/terms/m/marketsegmentation.asp#ixzz4gfEEalTd - - With respect to BCA products, they are segmented in - relation to different markets that they wish to - focus on. - title: Segment - type: array - items: - description: >- - Market segmentation is a marketing term referring - to the aggregating of prospective buyers into - groups, or segments, that have common needs and - respond similarly to a marketing action. Market - segmentation enables companies to target different - categories of consumers who perceive the full - value of certain products and services differently - from one another. - - - Read more: Market Segmentation - http://www.investopedia.com/terms/m/marketsegmentation.asp#ixzz4gfEEalTd - - With respect to BCA products, they are segmented - in relation to different markets that they wish to - focus on. - type: string - enum: - - ClientAccount - - Standard - - NonCommercialChaitiesClbSoc - - NonCommercialPublicAuthGovt - - Religious - - SectorSpecific - - Startup - - Switcher - FeeFreeLength: - description: The length/duration of the fee free period - title: FeeFreeLength - type: number - format: float - FeeFreeLengthPeriod: - description: >- - The unit of period (days, weeks, months etc.) of the - promotional length - title: FeeFreeLengthPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Optional additional notes to supplement the Core - product details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - additionalProperties: false - CreditInterest: - description: >- - Details about the interest that may be payable to the - BCA account holders - type: object - title: CreditInterest - properties: - TierBandSet: - description: >- - The group of tiers or bands for which credit - interest can be applied. - type: array - title: TierBandSet - items: - description: >- - The group of tiers or bands for which credit - interest can be applied. - type: object - properties: - TierBandMethod: - description: >- - The methodology of how credit interest is - paid/applied. It can be:- - - - 1. Banded - - Interest rates are banded. i.e. Increasing - rate on whole balance as balance increases. - - - 2. Tiered - - Interest rates are tiered. i.e. increasing - rate for each tier as balance increases, but - interest paid on tier fixed for that tier and - not on whole balance. - - - 3. Whole - - The same interest rate is applied irrespective - of the BCA balance - title: TierBandMethod - type: string - enum: - - Banded - - Tiered - - Whole - CalculationMethod: - description: Methods of calculating interest - title: CalculationMethod - type: string - enum: - - Compound - - SimpleInterest - Destination: - description: >- - Describes whether accrued interest is payable - only to the BCA or to another bank account - title: Destination - type: string - enum: - - PayAway - - SelfCredit - Notes: - description: >- - Optional additional notes to supplement the - Tier Band Set details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - TierBand: - description: Tier Band Details - type: array - title: TierBand - items: - description: Tier Band Details - type: object - properties: - Identification: - description: >- - Unique and unambiguous identification of - a Tier Band for a BCA. - title: Identification - type: string - minLength: 1 - maxLength: 35 - TierValueMinimum: - description: >- - Minimum deposit value for which the - credit interest tier applies. - title: TierValueMinimum - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - TierValueMaximum: - description: >- - Maximum deposit value for which the - credit interest tier applies. - title: TierValueMaximum - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CalculationFrequency: - description: >- - How often is credit interest calculated - for the account. - title: CalculationFrequency - type: string - enum: - - Daily - - HalfYearly - - Monthly - - Other - - Quarterly - - PerStatementDate - - Weekly - - Yearly - ApplicationFrequency: - description: >- - How often is interest applied to the BCA - for this tier/band i.e. how often the - financial institution pays accumulated - interest to the customer's BCA. - title: ApplicationFrequency - type: string - enum: - - Daily - - HalfYearly - - Monthly - - Other - - Quarterly - - PerStatementDate - - Weekly - - Yearly - DepositInterestAppliedCoverage: - description: Amount on which Interest applied. - title: DepositInterestAppliedCoverage - type: string - enum: - - Banded - - Tiered - - Whole - FixedVariableInterestRateType: - description: 'Type of interest rate, Fixed or Variable' - title: FixedVariableInterestRateType - type: string - enum: - - Fixed - - Variable - AER: - description: >- - The annual equivalent rate (AER) is - interest that is calculated under the - assumption that any interest paid is - combined with the original balance and - the next interest payment will be based - on the slightly higher account balance. - Overall, this means that interest can be - compounded several times in a year - depending on the number of times that - interest payments are made. - - - Read more: Annual Equivalent Rate (AER) - http://www.investopedia.com/terms/a/aer.asp#ixzz4gfR7IO1A - title: AER - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - BankInterestRateType: - description: >- - Interest rate types, other than AER, - which financial institutions may use to - describe the annual interest rate - payable to the BCA. - title: BankInterestRateType - type: string - enum: - - Gross - - Other - BankInterestRate: - description: Bank Interest for the BCA product - title: BankInterestRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - Notes: - description: >- - Optional additional notes to supplement - the Tier Band details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherBankInterestType: - description: >- - Other interest rate types which are not - available in the standard code list - type: object - title: OtherBankInterestType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies that are - not available in the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in the standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - required: - - TierValueMinimum - - ApplicationFrequency - - FixedVariableInterestRateType - - AER - additionalProperties: false - minItems: 1 - required: - - TierBandMethod - - Destination - - TierBand - additionalProperties: false - minItems: 1 - additionalProperties: false - required: - - TierBandSet - Overdraft: - description: Borrowing details - type: object - title: Overdraft - properties: - Notes: - description: Associated Notes about the overdraft rates - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftTierBandSet: - description: Tier band set details - type: array - title: OverdraftTierBandSet - items: - description: Tier band set details - type: object - properties: - TierBandMethod: - description: >- - The methodology of how overdraft is charged. - It can be: - - 'Whole' Where the same charge/rate is applied - to the entirety of the overdraft balance - (where charges are applicable). - - 'Tiered' Where different charges/rates are - applied dependent on overdraft maximum and - minimum balance amount tiers defined by the - lending financial organisation - - 'Banded' Where different charges/rates are - applied dependent on overdraft maximum and - minimum balance amount bands defined by a - government organisation. - title: TierBandMethod - type: string - enum: - - Banded - - Tiered - - Whole - OverdraftType: - description: >- - An overdraft can either be 'committed' which - means that the facility cannot be withdrawn - without reasonable notification before it's - agreed end date, or 'on demand' which means - that the financial institution can demand - repayment at any point in time. - title: OverdraftType - type: string - enum: - - Committed - - OnDemand - Identification: - description: >- - Unique and unambiguous identification of a - Tier Band for a overdraft product. - title: Identification - type: string - minLength: 1 - maxLength: 35 - AuthorisedIndicator: - description: >- - Indicates if the Overdraft is authorised (Y) - or unauthorised (N) - title: AuthorisedIndicator - type: boolean - BufferAmount: - description: >- - When a customer exceeds their credit limit, a - financial institution will not charge the - customer unauthorised overdraft charges if - they do not exceed by more than the buffer - amount. Note: Authorised overdraft charges may - still apply. - title: BufferAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - Notes: - description: >- - Optional additional notes to supplement the - overdraft Tier Band Set details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftTierBand: - description: >- - Provides overdraft details for a specific tier - or band - type: array - title: OverdraftTierBand - items: - description: >- - Provides overdraft details for a specific - tier or band - type: object - properties: - Identification: - description: >- - Unique and unambiguous identification of - a Tier Band for a overdraft. - title: Identification - type: string - minLength: 1 - maxLength: 35 - TierValueMin: - description: Minimum value of Overdraft Tier/Band - title: TierValueMin - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - TierValueMax: - description: Maximum value of Overdraft Tier/Band - title: TierValueMax - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - EAR: - description: >- - EAR means Effective Annual Rate and/or - Equivalent Annual Rate (frequently - - used interchangeably), being the actual - annual interest rate of an Overdraft. - title: EAR - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - AgreementLengthMin: - description: >- - Specifies the minimum length of a band - for a fixed overdraft agreement - title: AgreementLengthMin - type: number - format: float - AgreementLengthMax: - description: >- - Specifies the maximum length of a band - for a fixed overdraft agreement - title: AgreementLengthMax - type: number - format: float - AgreementPeriod: - description: >- - Specifies the period of a fixed length - overdraft agreement - title: AgreementPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - OverdraftInterestChargingCoverage: - description: >- - Refers to which interest rate is applied - when interests are tiered. For example, - if an overdraft balance is £2k and the - interest tiers are:- 0-£500 0.1%, - 500-1000 0.2%, 1000-10000 0.5%, then the - applicable interest rate could either be - 0.5% of the entire balance (since the - account balance sits in the top interest - tier) or - (0.1%*500)+(0.2%*500)+(0.5%*1000). In - the 1st situation, we say the interest - is applied to the ‘Whole’ of the account - balance, and in the 2nd that it is - ‘Tiered’. - title: OverdraftInterestChargingCoverage - type: string - enum: - - Banded - - Tiered - - Whole - BankGuaranteedIndicator: - description: >- - Indicates whether the advertised - overdraft rate is guaranteed to be - offered to a borrower by the bank e.g. - if it’s part of a government scheme, or - whether the rate may vary dependent on - the applicant’s circumstances. - title: BankGuaranteedIndicator - type: boolean - Notes: - description: >- - Optional additional notes to supplement - the Tier/band details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftFeesCharges: - description: Overdraft fees and charges - type: array - title: OverdraftFeesCharges - items: - description: Overdraft fees and charges - type: object - properties: - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: array - title: OverdraftFeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - AnnualReview - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - MinMaxType: - description: Min Max type - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - Indicates whether the advertised - overdraft rate is guaranteed to be - offered to a borrower by the bank e.g. - if it’s part of a government scheme, or - whether the rate may vary dependent on - the applicant’s circumstances. - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - OverdraftFeeChargeDetail: - description: Details about the fees/charges - type: array - title: OverdraftFeeChargeDetail - items: - description: Details about the fees/charges - type: object - properties: - FeeType: - description: Overdraft fee type - title: FeeType - type: string - enum: - - ArrangedOverdraft - - AnnualReview - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - NegotiableIndicator: - description: >- - Indicates whether fee and charges are - negotiable - title: NegotiableIndicator - type: boolean - OverdraftControlIndicator: - description: >- - Indicates if the fee/charge is already - covered by an 'Overdraft Control' fee or - not. - title: OverdraftControlIndicator - type: boolean - IncrementalBorrowingAmount: - description: >- - Every additional tranche of an overdraft - balance to which an overdraft fee is - applied - title: IncrementalBorrowingAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeAmount: - description: >- - Amount charged for an overdraft - fee/charge (where it is charged in terms - of an amount rather than a rate) - title: FeeAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeRate: - description: >- - Rate charged for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - FeeRateType: - description: >- - Rate type for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRateType - type: string - enum: - - Gross - - Other - ApplicationFrequency: - description: >- - Frequency at which the overdraft charge - is applied to the account - title: ApplicationFrequency - type: string - enum: - - OnClosing - - OnOpening - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAnniversary - - Other - - PerHundredPounds - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - CalculationFrequency: - description: >- - How often is the overdraft fee/charge - calculated for the account. - title: CalculationFrequency - type: string - enum: - - OnClosing - - OnOpening - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAnniversary - - Other - - PerHundredPounds - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - Notes: - description: >- - Free text for capturing any other info - related to Overdraft Fees Charge Details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: array - title: OverdraftFeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - AnnualReview - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - MinMaxType: - description: Min Max type - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - Indicates whether the advertised - overdraft rate is guaranteed to be - offered to a borrower by the bank e.g. - if it’s part of a government scheme, or - whether the rate may vary dependent on - the applicant’s circumstances. - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - OtherFeeType: - description: >- - Other Fee type which is not available in - the standard code set - type: object - title: OtherFeeType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherFeeRateType: - description: >- - Other fee rate type code which is not - available in the standard code set - type: object - title: OtherFeeRateType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies that are - not available in the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in the standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - required: - - FeeType - - ApplicationFrequency - additionalProperties: false - minItems: 1 - required: - - OverdraftFeeChargeDetail - additionalProperties: false - required: - - TierValueMin - additionalProperties: false - minItems: 1 - OverdraftFeesCharges: - description: Overdraft fees and charges details - type: array - title: OverdraftFeesCharges - items: - description: Overdraft fees and charges details - type: object - properties: - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: array - title: OverdraftFeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - AnnualReview - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - MinMaxType: - description: Min Max type - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - Indicates whether the advertised - overdraft rate is guaranteed to be - offered to a borrower by the bank e.g. - if it’s part of a government scheme, or - whether the rate may vary dependent on - the applicant’s circumstances. - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - OverdraftFeeChargeDetail: - description: Details about the fees/charges - type: array - title: OverdraftFeeChargeDetail - items: - description: Details about the fees/charges - type: object - properties: - FeeType: - description: Overdraft fee type - title: FeeType - type: string - enum: - - ArrangedOverdraft - - AnnualReview - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - NegotiableIndicator: - description: >- - Indicates whether fee and charges are - negotiable - title: NegotiableIndicator - type: boolean - OverdraftControlIndicator: - description: >- - Indicates if the fee/charge is already - covered by an 'Overdraft Control' fee or - not. - title: OverdraftControlIndicator - type: boolean - IncrementalBorrowingAmount: - description: >- - Every additional tranche of an overdraft - balance to which an overdraft fee is - applied - title: IncrementalBorrowingAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeAmount: - description: >- - Amount charged for an overdraft - fee/charge (where it is charged in terms - of an amount rather than a rate) - title: FeeAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeRate: - description: >- - Rate charged for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - FeeRateType: - description: >- - Rate type for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRateType - type: string - enum: - - Gross - - Other - ApplicationFrequency: - description: >- - Frequency at which the overdraft charge - is applied to the account - title: ApplicationFrequency - type: string - enum: - - OnClosing - - OnOpening - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAnniversary - - Other - - PerHundredPounds - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - CalculationFrequency: - description: >- - How often is the overdraft fee/charge - calculated for the account. - title: CalculationFrequency - type: string - enum: - - OnClosing - - OnOpening - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAnniversary - - Other - - PerHundredPounds - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - Notes: - description: >- - Free text for capturing any other info - related to Overdraft Fees Charge Details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: array - title: OverdraftFeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge. - Capping can either be based on an amount - (in gbp), an amount (in items) or a - rate. - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - AnnualReview - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - MinMaxType: - description: Min Max type - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - Indicates whether the advertised - overdraft rate is guaranteed to be - offered to a borrower by the bank e.g. - if it’s part of a government scheme, or - whether the rate may vary dependent on - the applicant’s circumstances. - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - OtherFeeType: - description: >- - Other Fee type which is not available in - the standard code set - type: object - title: OtherFeeType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherFeeRateType: - description: >- - Other fee rate type code which is not - available in the standard code set - type: object - title: OtherFeeRateType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies that are - not available in the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in the standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - required: - - FeeType - - ApplicationFrequency - additionalProperties: false - minItems: 1 - required: - - OverdraftFeeChargeDetail - additionalProperties: false - required: - - TierBandMethod - - OverdraftTierBand - additionalProperties: false - minItems: 1 - additionalProperties: false - required: - - OverdraftTierBandSet - OtherFeesCharges: - description: >- - Contains details of fees and charges which are not - associated with either Overdraft or features/benefits - type: array - title: OtherFeesCharges - items: - description: >- - Contains details of fees and charges which are not - associated with either Overdraft or features/benefits - type: object - properties: - TariffType: - description: TariffType which defines the fee and charges. - title: TariffType - type: string - enum: - - Electronic - - Mixed - - Other - TariffName: - description: Name of the tariff - title: TariffName - type: string - minLength: 1 - maxLength: 350 - OtherTariffType: - description: >- - Other tariff type which is not in the standard - list. - type: object - title: OtherTariffType - properties: - Code: - description: >- - The four letter Mnemonic used within an XML - file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of the - code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - FeeChargeDetail: - description: Other fees/charges details - type: array - title: FeeChargeDetail - items: - description: Other fees/charges details - type: object - properties: - FeeCategory: - description: >- - Categorisation of fees and charges into - standard categories. - title: FeeCategory - type: string - enum: - - Other - - Servicing - FeeType: - description: Fee/Charge Type - title: FeeType - type: string - enum: - - Other - - ServiceCAccountFee - - ServiceCAccountFeeMonthly - - ServiceCAccountFeeQuarterly - - ServiceCFixedTariff - - ServiceCBusiDepAccBreakage - - ServiceCMinimumMonthlyFee - - ServiceCOther - NegotiableIndicator: - description: >- - Fee/charge which is usually negotiable - rather than a fixed amount - title: NegotiableIndicator - type: boolean - FeeAmount: - description: >- - Fee Amount charged for a fee/charge (where - it is charged in terms of an amount rather - than a rate) - title: FeeAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeRate: - description: >- - Rate charged for Fee/Charge (where it is - charged in terms of a rate rather than an - amount) - title: FeeRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - FeeRateType: - description: >- - Rate type for Fee/Charge (where it is - charged in terms of a rate rather than an - amount) - title: FeeRateType - type: string - enum: - - Gross - - Other - ApplicationFrequency: - description: >- - How frequently the fee/charge is applied to - the account - title: ApplicationFrequency - type: string - enum: - - OnClosing - - OnOpening - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAnniversary - - Other - - PerHundredPounds - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - CalculationFrequency: - description: How frequently the fee/charge is calculated - title: CalculationFrequency - type: string - enum: - - OnClosing - - OnOpening - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAnniversary - - Other - - PerHundredPounds - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - Notes: - description: >- - Optional additional notes to supplement the - fee/charge details. - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - FeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular or group of - fee/charge - type: array - title: FeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular or group of - fee/charge - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - Other - - ServiceCAccountFee - - ServiceCAccountFeeMonthly - - ServiceCAccountFeeQuarterly - - ServiceCFixedTariff - - ServiceCBusiDepAccBreakage - - ServiceCMinimumMonthlyFee - - ServiceCOther - minItems: 1 - MinMaxType: - description: Min Max type - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on - the number of occurrences rather than - capped at a particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: >- - Cap amount charged for a fee/charge - (where it is charged in terms of an - amount rather than a rate) - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Free text for adding extra details for - fee charge cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - OtherFeeCategoryType: - type: object - title: OtherFeeCategoryType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherFeeType: - description: >- - Other Fee/charge type which is not available - in the standard code set - type: object - title: OtherFeeType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - FeeCategory: - description: >- - Categorisation of fees and charges into - standard categories. - title: FeeCategory - type: string - enum: - - Other - - Servicing - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - FeeCategory - - Name - - Description - OtherFeeRateType: - description: >- - Other fee rate type which is not available - in the standard code set - type: object - title: OtherFeeRateType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies not covered in - the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - FeeApplicableRange: - description: >- - Range or amounts or rates for which the - fee/charge applies - type: object - title: FeeApplicableRange - properties: - MinimumAmount: - description: >- - Minimum Amount on which fee/charge is - applicable (where it is expressed as an - amount) - title: MinimumAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - MaximumAmount: - description: >- - Maximum Amount on which fee is - applicable (where it is expressed as an - amount) - title: MaximumAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - MinimumRate: - description: >- - Minimum rate on which fee/charge is - applicable(where it is expressed as an - rate) - title: MinimumRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - MaximumRate: - description: >- - Maximum rate on which fee/charge is - applicable(where it is expressed as an - rate) - title: MaximumRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - additionalProperties: false - required: - - FeeCategory - - FeeType - - ApplicationFrequency - additionalProperties: false - minItems: 1 - FeeChargeCap: - description: >- - Details about any caps (maximum charges) that - apply to a particular or group of fee/charge - type: array - title: FeeChargeCap - items: - description: >- - Details about any caps (maximum charges) that - apply to a particular or group of fee/charge - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - Other - - ServiceCAccountFee - - ServiceCAccountFeeMonthly - - ServiceCAccountFeeQuarterly - - ServiceCFixedTariff - - ServiceCBusiDepAccBreakage - - ServiceCMinimumMonthlyFee - - ServiceCOther - minItems: 1 - MinMaxType: - description: Min Max type - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on the - number of occurrences rather than capped at - a particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: >- - Cap amount charged for a fee/charge (where - it is charged in terms of an amount rather - than a rate) - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for which - the fee/charge is capped - title: CappingPeriod - type: string - enum: - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Free text for adding extra details for fee - charge cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not available - in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not available - in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - required: - - FeeChargeDetail - additionalProperties: false - additionalProperties: false - PCA: - type: object - title: PCA - properties: - ProductDetails: - type: object - title: ProductDetails - properties: - Segment: - description: >- - Market segmentation is a marketing term referring to - the aggregating of prospective buyers into groups, - or segments, that have common needs and respond - similarly to a marketing action. Market segmentation - enables companies to target different categories of - consumers who perceive the full value of certain - products and services differently from one another. - - - Read more: Market Segmentation - http://www.investopedia.com/terms/m/marketsegmentation.asp#ixzz4gfEEalTd - - With respect to PCA products, they are segmented in - relation to different markets that they wish to - focus on. - title: Segment - type: array - items: - description: >- - Market segmentation is a marketing term referring - to the aggregating of prospective buyers into - groups, or segments, that have common needs and - respond similarly to a marketing action. Market - segmentation enables companies to target different - categories of consumers who perceive the full - value of certain products and services differently - from one another. - - - Read more: Market Segmentation - http://www.investopedia.com/terms/m/marketsegmentation.asp#ixzz4gfEEalTd - - With respect to PCA products, they are segmented - in relation to different markets that they wish to - focus on. - type: string - enum: - - Basic - - BenefitAndReward - - CreditInterest - - Cashback - - General - - Graduate - - Other - - Overdraft - - Packaged - - Premium - - Reward - - Student - - YoungAdult - - Youth - MonthlyMaximumCharge: - description: >- - The maximum relevant charges that could accrue as - defined fully in Part 7 of the CMA order - title: MonthlyMaximumCharge - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - Notes: - description: >- - Optional additional notes to supplement the Core - product details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - additionalProperties: false - CreditInterest: - description: >- - Details about the interest that may be payable to the - PCA account holders - type: object - title: CreditInterest - properties: - TierBandSet: - description: >- - The group of tiers or bands for which credit - interest can be applied. - type: array - title: TierBandSet - items: - description: >- - The group of tiers or bands for which credit - interest can be applied. - type: object - properties: - TierBandMethod: - description: >- - The methodology of how credit interest is - charged. It can be:- - - - 1. Banded - - Interest rates are banded. i.e. Increasing - rate on whole balance as balance increases. - - - 2. Tiered - - Interest rates are tiered. i.e. increasing - rate for each tier as balance increases, but - interest paid on tier fixed for that tier and - not on whole balance. - - - 3. Whole - - The same interest rate is applied irrespective - of the PCA balance - title: TierBandMethod - type: string - enum: - - Tiered - - Whole - CalculationMethod: - description: Methods of calculating interest - title: CalculationMethod - type: string - enum: - - Compound - - SimpleInterest - Destination: - description: >- - Describes whether accrued interest is payable - only to the PCA or to another bank account - title: Destination - type: string - enum: - - PayAway - - SelfCredit - Notes: - description: >- - Optional additional notes to supplement the - Tier Band Set details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - TierBand: - description: Tier Band Details - type: array - title: TierBand - items: - description: Tier Band Details - type: object - properties: - Identification: - description: >- - Unique and unambiguous identification of - a Tier Band for a PCA. - title: Identification - type: string - minLength: 1 - maxLength: 35 - TierValueMinimum: - description: >- - Minimum deposit value for which the - credit interest tier applies. - title: TierValueMinimum - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - TierValueMaximum: - description: >- - Maximum deposit value for which the - credit interest tier applies. - title: TierValueMaximum - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CalculationFrequency: - description: >- - How often is credit interest calculated - for the account. - title: CalculationFrequency - type: string - enum: - - PerAcademicTerm - - Daily - - HalfYearly - - Monthly - - Other - - Quarterly - - PerStatementDate - - Weekly - - Yearly - ApplicationFrequency: - description: >- - How often is interest applied to the PCA - for this tier/band i.e. how often the - financial institution pays accumulated - interest to the customer's PCA. - title: ApplicationFrequency - type: string - enum: - - PerAcademicTerm - - Daily - - HalfYearly - - Monthly - - Other - - Quarterly - - PerStatementDate - - Weekly - - Yearly - DepositInterestAppliedCoverage: - description: Amount on which Interest applied. - title: DepositInterestAppliedCoverage - type: string - enum: - - Tiered - - Whole - FixedVariableInterestRateType: - description: 'Type of interest rate, Fixed or Variable' - title: FixedVariableInterestRateType - type: string - enum: - - Fixed - - Variable - AER: - description: >- - The annual equivalent rate (AER) is - interest that is calculated under the - assumption that any interest paid is - combined with the original balance and - the next interest payment will be based - on the slightly higher account balance. - Overall, this means that interest can be - compounded several times in a year - depending on the number of times that - interest payments are made. - - - Read more: Annual Equivalent Rate (AER) - http://www.investopedia.com/terms/a/aer.asp#ixzz4gfR7IO1A - title: AER - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - BankInterestRateType: - description: >- - Interest rate types, other than AER, - which financial institutions may use to - describe the annual interest rate - payable to the PCA. - title: BankInterestRateType - type: string - enum: - - LinkedBaseRate - - Gross - - Net - - Other - BankInterestRate: - description: Bank Interest for the PCA product - title: BankInterestRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - Notes: - description: >- - Optional additional notes to supplement - the Tier Band details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherBankInterestType: - description: >- - Other interest rate types which are not - available in the standard code list - type: object - title: OtherBankInterestType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies that are - not available in the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in the standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - required: - - TierValueMinimum - - ApplicationFrequency - - FixedVariableInterestRateType - - AER - additionalProperties: false - minItems: 1 - required: - - TierBandMethod - - TierBand - additionalProperties: false - minItems: 1 - additionalProperties: false - required: - - TierBandSet - Overdraft: - description: 'Details about Overdraft rates, fees & charges' - type: object - title: Overdraft - properties: - Notes: - description: Associated Notes about the overdraft rates - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftTierBandSet: - description: Tier band set details - type: array - title: OverdraftTierBandSet - items: - description: Tier band set details - type: object - properties: - TierBandMethod: - description: >- - The methodology of how overdraft is charged. - It can be: - - 'Whole' Where the same charge/rate is applied - to the entirety of the overdraft balance - (where charges are applicable). - - 'Tiered' Where different charges/rates are - applied dependent on overdraft maximum and - minimum balance amount tiers defined by the - lending financial organisation - - 'Banded' Where different charges/rates are - applied dependent on overdraft maximum and - minimum balance amount bands defined by a - government organisation. - title: TierBandMethod - type: string - enum: - - Tiered - - Whole - - Banded - OverdraftType: - description: >- - An overdraft can either be 'committed' which - means that the facility cannot be withdrawn - without reasonable notification before it's - agreed end date, or 'on demand' which means - that the financial institution can demand - repayment at any point in time. - title: OverdraftType - type: string - enum: - - Committed - - OnDemand - - Other - Identification: - description: >- - Unique and unambiguous identification of a - Tier Band for a overdraft product. - title: Identification - type: string - minLength: 1 - maxLength: 35 - AuthorisedIndicator: - description: >- - Indicates if the Overdraft is authorised (Y) - or unauthorised (N) - title: AuthorisedIndicator - type: boolean - BufferAmount: - description: >- - When a customer exceeds their credit limit, a - financial institution will not charge the - customer unauthorised overdraft charges if - they do not exceed by more than the buffer - amount. Note: Authorised overdraft charges may - still apply. - title: BufferAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - Notes: - description: >- - Optional additional notes to supplement the - overdraft Tier Band Set details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftTierBand: - description: >- - Provides overdraft details for a specific tier - or band - type: array - title: OverdraftTierBand - items: - description: >- - Provides overdraft details for a specific - tier or band - type: object - properties: - Identification: - description: >- - Unique and unambiguous identification of - a Tier Band for a overdraft. - title: Identification - type: string - minLength: 1 - maxLength: 35 - TierValueMin: - description: Minimum value of Overdraft Tier/Band - title: TierValueMin - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - TierValueMax: - description: Maximum value of Overdraft Tier/Band - title: TierValueMax - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - OverdraftInterestChargingCoverage: - description: >- - Interest charged on whole amount or - tiered/banded - title: OverdraftInterestChargingCoverage - type: string - enum: - - Tiered - - Whole - BankGuaranteedIndicator: - description: >- - Indicates that a bank provides the - overdraft limit up to TierValueMIn to - all customers automatically - title: BankGuaranteedIndicator - type: boolean - EAR: - description: >- - EAR means Effective Annual Rate and/or - Equivalent Annual Rate (frequently - - used interchangeably), being the actual - annual interest rate of an Overdraft. - title: EAR - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - Notes: - description: >- - Optional additional notes to supplement - the Tier/band details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OverdraftFeesCharges: - description: Overdraft fees and charges - type: array - title: OverdraftFeesCharges - items: - description: Overdraft fees and charges - type: object - properties: - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge - type: array - title: OverdraftFeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - AnnualReview - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - OverdraftControlIndicator: - description: >- - Specifies for the overdraft control - feature/benefit - title: OverdraftControlIndicator - type: boolean - MinMaxType: - description: >- - Indicates that this is the minimum/ - maximum fee/charge that can be applied - by the financial institution - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on - the number of occurrences rather than - capped at a particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - AcademicTerm - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - OverdraftFeeChargeDetail: - description: Details about the fees/charges - type: array - title: OverdraftFeeChargeDetail - items: - description: Details about the fees/charges - type: object - properties: - FeeType: - description: Overdraft fee type - title: FeeType - type: string - enum: - - ArrangedOverdraft - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - AnnualReview - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - OverdraftControlIndicator: - description: >- - Specifies for the overdraft control - feature/benefit - title: OverdraftControlIndicator - type: boolean - IncrementalBorrowingAmount: - description: >- - Every additional tranche of an overdraft - balance to which an overdraft fee is - applied - title: IncrementalBorrowingAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeAmount: - description: >- - Amount charged for an overdraft - fee/charge (where it is charged in terms - of an amount rather than a rate) - title: FeeAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeRate: - description: >- - Rate charged for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - FeeRateType: - description: >- - Rate type for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRateType - type: string - enum: - - LinkedBaseRate - - Gross - - Net - - Other - ApplicationFrequency: - description: >- - Frequency at which the overdraft charge - is applied to the account - title: ApplicationFrequency - type: string - enum: - - AccountClosing - - AccountOpening - - AcademicTerm - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAccountAnniversary - - Other - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - CalculationFrequency: - description: >- - How often is the overdraft fee/charge - calculated for the account. - title: CalculationFrequency - type: string - enum: - - AccountClosing - - AccountOpening - - AcademicTerm - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAccountAnniversary - - Other - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - Notes: - description: >- - Free text for capturing any other info - related to Overdraft Fees Charge Details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other Fee type which is not available in - the standard code set - type: object - title: OtherFeeType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherFeeRateType: - description: >- - Other fee rate type code which is not - available in the standard code set - type: object - title: OtherFeeRateType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies that are - not available in the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in the standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge - type: object - title: OverdraftFeeChargeCap - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - AnnualReview - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - OverdraftControlIndicator: - description: >- - Specifies for the overdraft control - feature/benefit - title: OverdraftControlIndicator - type: boolean - MinMaxType: - description: >- - Indicates that this is the minimum/ - maximum fee/charge that can be applied - by the financial institution - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on - the number of occurrences rather than - capped at a particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - AcademicTerm - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - additionalProperties: false - required: - - FeeType - - MinMaxType - required: - - FeeType - - ApplicationFrequency - additionalProperties: false - minItems: 1 - required: - - OverdraftFeeChargeDetail - additionalProperties: false - required: - - TierValueMin - additionalProperties: false - minItems: 1 - OverdraftFeesCharges: - description: Overdraft fees and charges details - type: array - title: OverdraftFeesCharges - items: - description: Overdraft fees and charges details - type: object - properties: - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge - type: array - title: OverdraftFeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - AnnualReview - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - OverdraftControlIndicator: - description: >- - Specifies for the overdraft control - feature/benefit - title: OverdraftControlIndicator - type: boolean - MinMaxType: - description: >- - Indicates that this is the minimum/ - maximum fee/charge that can be applied - by the financial institution - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on - the number of occurrences rather than - capped at a particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - AcademicTerm - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - OverdraftFeeChargeDetail: - description: Details about the fees/charges - type: array - title: OverdraftFeeChargeDetail - items: - description: Details about the fees/charges - type: object - properties: - FeeType: - description: Overdraft fee type - title: FeeType - type: string - enum: - - ArrangedOverdraft - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - AnnualReview - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - OverdraftControlIndicator: - description: >- - Specifies for the overdraft control - feature/benefit - title: OverdraftControlIndicator - type: boolean - IncrementalBorrowingAmount: - description: >- - Every additional tranche of an overdraft - balance to which an overdraft fee is - applied - title: IncrementalBorrowingAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeAmount: - description: >- - Amount charged for an overdraft - fee/charge (where it is charged in terms - of an amount rather than a rate) - title: FeeAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeRate: - description: >- - Rate charged for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - FeeRateType: - description: >- - Rate type for overdraft fee/charge - (where it is charged in terms of a rate - rather than an amount) - title: FeeRateType - type: string - enum: - - LinkedBaseRate - - Gross - - Net - - Other - ApplicationFrequency: - description: >- - Frequency at which the overdraft charge - is applied to the account - title: ApplicationFrequency - type: string - enum: - - AccountClosing - - AccountOpening - - AcademicTerm - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAccountAnniversary - - Other - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - CalculationFrequency: - description: >- - How often is the overdraft fee/charge - calculated for the account. - title: CalculationFrequency - type: string - enum: - - AccountClosing - - AccountOpening - - AcademicTerm - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAccountAnniversary - - Other - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - Notes: - description: >- - Free text for capturing any other info - related to Overdraft Fees Charge Details - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other Fee type which is not available in - the standard code set - type: object - title: OtherFeeType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherFeeRateType: - description: >- - Other fee rate type code which is not - available in the standard code set - type: object - title: OtherFeeRateType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies that are - not available in the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in the standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OverdraftFeeChargeCap: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge - type: object - title: OverdraftFeeChargeCap - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Overdraft fee type - type: string - enum: - - ArrangedOverdraft - - EmergencyBorrowing - - BorrowingItem - - OverdraftRenewal - - AnnualReview - - OverdraftSetup - - Surcharge - - TempOverdraft - - UnauthorisedBorrowing - - UnauthorisedPaidTrans - - Other - - UnauthorisedUnpaidTrans - minItems: 1 - OverdraftControlIndicator: - description: >- - Specifies for the overdraft control - feature/benefit - title: OverdraftControlIndicator - type: boolean - MinMaxType: - description: >- - Indicates that this is the minimum/ - maximum fee/charge that can be applied - by the financial institution - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on - the number of occurrences rather than - capped at a particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: Cap amount charged for a fee/charge - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - AcademicTerm - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Notes related to Overdraft fee charge - cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - additionalProperties: false - required: - - FeeType - - MinMaxType - required: - - FeeType - - ApplicationFrequency - additionalProperties: false - minItems: 1 - required: - - OverdraftFeeChargeDetail - additionalProperties: false - required: - - TierBandMethod - - OverdraftTierBand - additionalProperties: false - minItems: 1 - additionalProperties: false - required: - - OverdraftTierBandSet - OtherFeesCharges: - description: >- - Contains details of fees and charges which are not - associated with either borrowing or features/benefits - type: object - title: OtherFeesCharges - properties: - FeeChargeDetail: - description: Other fees/charges details - type: array - title: FeeChargeDetail - items: - description: Other fees/charges details - type: object - properties: - FeeCategory: - description: >- - Categorisation of fees and charges into - standard categories. - title: FeeCategory - type: string - enum: - - Other - - Servicing - FeeType: - description: Fee/Charge Type - title: FeeType - type: string - enum: - - ServiceCAccountFee - - ServiceCAccountFeeMonthly - - ServiceCOther - - Other - FeeAmount: - description: >- - Fee Amount charged for a fee/charge (where it - is charged in terms of an amount rather than a - rate) - title: FeeAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - FeeRate: - description: >- - Rate charged for Fee/Charge (where it is - charged in terms of a rate rather than an - amount) - title: FeeRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - FeeRateType: - description: >- - Rate type for Fee/Charge (where it is charged - in terms of a rate rather than an amount) - title: FeeRateType - type: string - enum: - - LinkedBaseRate - - Gross - - Net - - Other - ApplicationFrequency: - description: >- - How frequently the fee/charge is applied to - the account - title: ApplicationFrequency - type: string - enum: - - AccountClosing - - AccountOpening - - AcademicTerm - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAccountAnniversary - - Other - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - CalculationFrequency: - description: How frequently the fee/charge is calculated - title: CalculationFrequency - type: string - enum: - - AccountClosing - - AccountOpening - - AcademicTerm - - ChargingPeriod - - Daily - - PerItem - - Monthly - - OnAccountAnniversary - - Other - - PerHour - - PerOccurrence - - PerSheet - - PerTransaction - - PerTransactionAmount - - PerTransactionPercentage - - Quarterly - - SixMonthly - - StatementMonthly - - Weekly - - Yearly - Notes: - description: >- - Optional additional notes to supplement the - fee/charge details. - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeCategoryType: - type: object - title: OtherFeeCategoryType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of the - code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherFeeType: - description: >- - Other Fee/charge type which is not available - in the standard code set - type: object - title: OtherFeeType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - FeeCategory: - description: >- - Categorisation of fees and charges into - standard categories. - title: FeeCategory - type: string - enum: - - Other - - Servicing - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of the - code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - FeeCategory - - Name - - Description - OtherFeeRateType: - description: >- - Other fee rate type which is not available in - the standard code set - type: object - title: OtherFeeRateType - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of the - code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherApplicationFrequency: - description: >- - Other application frequencies not covered in - the standard code list - type: object - title: OtherApplicationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of the - code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - OtherCalculationFrequency: - description: >- - Other calculation frequency which is not - available in standard code set. - type: object - title: OtherCalculationFrequency - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of the - code - title: Description - type: string - minLength: 1 - maxLength: 350 - additionalProperties: false - required: - - Name - - Description - FeeChargeCap: - description: >- - Details about any caps (maximum charges) that - apply to a particular fee/charge - type: array - title: FeeChargeCap - items: - description: >- - Details about any caps (maximum charges) - that apply to a particular fee/charge - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - ServiceCAccountFee - - ServiceCAccountFeeMonthly - - ServiceCOther - - Other - minItems: 1 - MinMaxType: - description: >- - Indicates that this is the minimum/ - maximum fee/charge that can be applied - by the financial institution - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on - the number of occurrences rather than - capped at a particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: >- - Cap amount charged for a fee/charge - (where it is charged in terms of an - amount rather than a rate) - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for - which the fee/charge is capped - title: CappingPeriod - type: string - enum: - - AcademicTerm - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Free text for adding extra details for - fee charge cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not - available in the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not - available in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - FeeApplicableRange: - description: >- - Range or amounts or rates for which the - fee/charge applies - type: object - title: FeeApplicableRange - properties: - MinimumAmount: - description: >- - Minimum Amount on which fee/charge is - applicable (where it is expressed as an - amount) - title: MinimumAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - MaximumAmount: - description: >- - Maximum Amount on which fee is applicable - (where it is expressed as an amount) - title: MaximumAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - MinimumRate: - description: >- - Minimum rate on which fee/charge is - applicable(where it is expressed as an - rate) - title: MinimumRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - MaximumRate: - description: >- - Maximum rate on which fee/charge is - applicable(where it is expressed as an - rate) - title: MaximumRate - type: string - pattern: '^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$' - additionalProperties: false - required: - - FeeCategory - - FeeType - - ApplicationFrequency - additionalProperties: false - minItems: 1 - FeeChargeCap: - description: >- - Details about any caps (maximum charges) that apply - to a particular fee/charge - type: array - title: FeeChargeCap - items: - description: >- - Details about any caps (maximum charges) that - apply to a particular fee/charge - type: object - properties: - FeeType: - description: Fee/charge type which is being capped - title: FeeType - type: array - items: - description: Fee/charge type which is being capped - type: string - enum: - - ServiceCAccountFee - - ServiceCAccountFeeMonthly - - ServiceCOther - - Other - minItems: 1 - MinMaxType: - description: >- - Indicates that this is the minimum/ maximum - fee/charge that can be applied by the - financial institution - title: MinMaxType - type: string - enum: - - Minimum - - Maximum - FeeCapOccurrence: - description: >- - fee/charges are captured dependent on the - number of occurrences rather than capped at a - particular amount - title: FeeCapOccurrence - type: number - format: float - FeeCapAmount: - description: >- - Cap amount charged for a fee/charge (where it - is charged in terms of an amount rather than a - rate) - title: FeeCapAmount - type: string - pattern: '^(-?\d{1,14}){1}(\.\d{1,4}){0,1}$' - CappingPeriod: - description: >- - Period e.g. day, week, month etc. for which - the fee/charge is capped - title: CappingPeriod - type: string - enum: - - AcademicTerm - - Day - - Half Year - - Month - - Quarter - - Week - - Year - Notes: - description: >- - Free text for adding extra details for fee - charge cap - title: Notes - type: array - items: - description: maxLength 2000 text - type: string - minLength: 1 - maxLength: 2000 - OtherFeeType: - description: >- - Other fee type code which is not available in - the standard code set - type: array - title: OtherFeeType - items: - description: >- - Other fee type code which is not available - in the standard code set - type: object - properties: - Code: - description: >- - The four letter Mnemonic used within an - XML file to identify a code - title: Code - type: string - pattern: '^\w{0,4}$' - minLength: 0 - maxLength: 4 - Name: - description: Long name associated with the code - title: Name - type: string - minLength: 1 - maxLength: 70 - Description: - description: >- - Description to describe the purpose of - the code - title: Description - type: string - minLength: 1 - maxLength: 350 - required: - - Name - - Description - additionalProperties: false - required: - - FeeType - - MinMaxType - additionalProperties: false - additionalProperties: false - required: - - FeeChargeDetail - additionalProperties: false - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadScheduledPayment2: - type: object - required: - - Data - properties: - Data: - type: object - properties: - ScheduledPayment: - type: array - items: - $ref: '#/definitions/OBScheduledPayment2' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadStandingOrder4: - type: object - required: - - Data - properties: - Data: - type: object - properties: - StandingOrder: - type: array - items: - $ref: '#/definitions/OBStandingOrder4' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadStandingOrder5: - type: object - required: - - Data - properties: - Data: - type: object - properties: - StandingOrder: - type: array - items: - $ref: '#/definitions/OBStandingOrder5' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadStatement1: - type: object - required: - - Data - properties: - Data: - $ref: '#/definitions/OBReadDataStatement2' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadStatement2: - type: object - required: - - Data - properties: - Data: - $ref: '#/definitions/OBReadDataStatement2' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadTransaction4: - type: object - required: - - Data - properties: - Data: - $ref: '#/definitions/OBReadDataTransaction5' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBReadTransaction5: - type: object - required: - - Data - properties: - Data: - $ref: '#/definitions/OBReadDataTransaction5' - Links: - $ref: '#/definitions/Links' - Meta: - $ref: '#/definitions/Meta' - OBRisk2: - description: >- - The Risk section is sent by the initiating party to the ASPSP. It is used - to specify additional details for risk scoring for Account Info. - type: object - properties: {} - additionalProperties: false - OBScheduledPayment2: - type: object - required: - - AccountId - - ScheduledPaymentDateTime - - ScheduledType - - InstructedAmount - properties: - AccountId: - $ref: '#/definitions/AccountId' - ScheduledPaymentId: - $ref: '#/definitions/ScheduledPaymentId' - ScheduledPaymentDateTime: - $ref: '#/definitions/ScheduledPaymentDateTime' - ScheduledType: - $ref: '#/definitions/OBExternalScheduleType1Code' - Reference: - $ref: '#/definitions/Reference' - InstructedAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_9' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_1' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_0' - OBScheduledPayment2Basic: - type: object - required: - - AccountId - - ScheduledPaymentDateTime - - ScheduledType - - InstructedAmount - properties: - AccountId: - $ref: '#/definitions/AccountId' - ScheduledPaymentId: - $ref: '#/definitions/ScheduledPaymentId' - ScheduledPaymentDateTime: - $ref: '#/definitions/ScheduledPaymentDateTime' - ScheduledType: - $ref: '#/definitions/OBExternalScheduleType1Code' - Reference: - $ref: '#/definitions/Reference' - InstructedAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_9' - OBScheduledPayment2Detail: - type: object - required: - - AccountId - - ScheduledPaymentDateTime - - ScheduledType - - InstructedAmount - - CreditorAccount - properties: - AccountId: - $ref: '#/definitions/AccountId' - ScheduledPaymentId: - $ref: '#/definitions/ScheduledPaymentId' - ScheduledPaymentDateTime: - $ref: '#/definitions/ScheduledPaymentDateTime' - ScheduledType: - $ref: '#/definitions/OBExternalScheduleType1Code' - Reference: - $ref: '#/definitions/Reference' - InstructedAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_9' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_1' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_0' - OBStandingOrder4: - type: object - required: - - AccountId - - Frequency - properties: - AccountId: - $ref: '#/definitions/AccountId' - StandingOrderId: - $ref: '#/definitions/StandingOrderId' - Frequency: - $ref: '#/definitions/Frequency_0' - Reference: - $ref: '#/definitions/Reference' - FirstPaymentDateTime: - $ref: '#/definitions/FirstPaymentDateTime' - NextPaymentDateTime: - $ref: '#/definitions/NextPaymentDateTime' - FinalPaymentDateTime: - $ref: '#/definitions/FinalPaymentDateTime' - StandingOrderStatusCode: - $ref: '#/definitions/OBExternalStandingOrderStatus1Code' - FirstPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_0' - NextPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_1' - FinalPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_2' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_1' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_0' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBStandingOrder4Basic: - type: object - required: - - AccountId - - Frequency - properties: - AccountId: - $ref: '#/definitions/AccountId' - StandingOrderId: - $ref: '#/definitions/StandingOrderId' - Frequency: - $ref: '#/definitions/Frequency_0' - Reference: - $ref: '#/definitions/Reference' - FirstPaymentDateTime: - $ref: '#/definitions/FirstPaymentDateTime' - NextPaymentDateTime: - $ref: '#/definitions/NextPaymentDateTime' - FinalPaymentDateTime: - $ref: '#/definitions/FinalPaymentDateTime' - StandingOrderStatusCode: - $ref: '#/definitions/OBExternalStandingOrderStatus1Code' - FirstPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_0' - NextPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_1' - FinalPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_2' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBStandingOrder4Detail: - type: object - required: - - AccountId - - Frequency - - CreditorAccount - properties: - AccountId: - $ref: '#/definitions/AccountId' - StandingOrderId: - $ref: '#/definitions/StandingOrderId' - Frequency: - $ref: '#/definitions/Frequency_0' - Reference: - $ref: '#/definitions/Reference' - FirstPaymentDateTime: - $ref: '#/definitions/FirstPaymentDateTime' - NextPaymentDateTime: - $ref: '#/definitions/NextPaymentDateTime' - FinalPaymentDateTime: - $ref: '#/definitions/FinalPaymentDateTime' - StandingOrderStatusCode: - $ref: '#/definitions/OBExternalStandingOrderStatus1Code' - FirstPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_0' - NextPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_1' - FinalPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_2' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_1' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_0' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBStandingOrder5: - type: object - required: - - AccountId - - Frequency - properties: - AccountId: - $ref: '#/definitions/AccountId' - StandingOrderId: - $ref: '#/definitions/StandingOrderId' - Frequency: - $ref: '#/definitions/Frequency_1' - Reference: - $ref: '#/definitions/Reference' - FirstPaymentDateTime: - $ref: '#/definitions/FirstPaymentDateTime' - NextPaymentDateTime: - $ref: '#/definitions/NextPaymentDateTime' - FinalPaymentDateTime: - $ref: '#/definitions/FinalPaymentDateTime' - StandingOrderStatusCode: - $ref: '#/definitions/OBExternalStandingOrderStatus1Code' - FirstPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_0' - NextPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_1' - FinalPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_2' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_1' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_0' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBStandingOrder5Basic: - type: object - required: - - AccountId - - Frequency - properties: - AccountId: - $ref: '#/definitions/AccountId' - StandingOrderId: - $ref: '#/definitions/StandingOrderId' - Frequency: - $ref: '#/definitions/Frequency_1' - Reference: - $ref: '#/definitions/Reference' - FirstPaymentDateTime: - $ref: '#/definitions/FirstPaymentDateTime' - NextPaymentDateTime: - $ref: '#/definitions/NextPaymentDateTime' - FinalPaymentDateTime: - $ref: '#/definitions/FinalPaymentDateTime' - StandingOrderStatusCode: - $ref: '#/definitions/OBExternalStandingOrderStatus1Code' - FirstPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_0' - NextPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_1' - FinalPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_2' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBStandingOrder5Detail: - type: object - required: - - AccountId - - Frequency - - CreditorAccount - properties: - AccountId: - $ref: '#/definitions/AccountId' - StandingOrderId: - $ref: '#/definitions/StandingOrderId' - Frequency: - $ref: '#/definitions/Frequency_1' - Reference: - $ref: '#/definitions/Reference' - FirstPaymentDateTime: - $ref: '#/definitions/FirstPaymentDateTime' - NextPaymentDateTime: - $ref: '#/definitions/NextPaymentDateTime' - FinalPaymentDateTime: - $ref: '#/definitions/FinalPaymentDateTime' - StandingOrderStatusCode: - $ref: '#/definitions/OBExternalStandingOrderStatus1Code' - FirstPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_0' - NextPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_1' - FinalPaymentAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_2' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification5_1' - CreditorAccount: - $ref: '#/definitions/OBCashAccount5_0' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBStatement2: - type: object - description: Provides further details on a statement resource. - required: - - AccountId - - Type - - StartDateTime - - EndDateTime - - CreationDateTime - properties: - AccountId: - $ref: '#/definitions/AccountId' - StatementId: - $ref: '#/definitions/StatementId' - StatementReference: - $ref: '#/definitions/StatementReference' - Type: - $ref: '#/definitions/OBExternalStatementType1Code' - StartDateTime: - $ref: '#/definitions/StartDateTime' - EndDateTime: - $ref: '#/definitions/EndDateTime' - CreationDateTime: - $ref: '#/definitions/CreationDateTime' - StatementDescription: - type: array - items: - description: Other descriptions that may be available for the statement resource. - type: string - minLength: 1 - maxLength: 500 - StatementBenefit: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a benefit or reward - amount for the statement resource. - required: - - Type - - Amount - properties: - Type: - $ref: '#/definitions/OBExternalStatementBenefitType1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_3' - StatementFee: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a fee for the statement - resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - Description: - $ref: '#/definitions/Description_1' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementFeeType1Code' - Rate: - $ref: '#/definitions/OBRate1_0' - RateType: - $ref: '#/definitions/OBExternalStatementFeeRateType1Code' - Frequency: - $ref: '#/definitions/OBExternalStatementFeeFrequency1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_4' - StatementInterest: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic interest amount - related to the statement resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - Description: - $ref: '#/definitions/Description_2' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementInterestType1Code' - Rate: - $ref: '#/definitions/OBRate1_1' - RateType: - $ref: '#/definitions/OBExternalStatementInterestRateType1Code' - Frequency: - $ref: '#/definitions/OBExternalStatementInterestFrequency1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_5' - StatementAmount: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic amount for the - statement resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementAmountType1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_6' - StatementDateTime: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic date time for - the statement resource. - required: - - DateTime - - Type - properties: - DateTime: - $ref: '#/definitions/DateTime' - Type: - $ref: '#/definitions/OBExternalStatementDateTimeType1Code' - StatementRate: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic rate related to - the statement resource. - required: - - Rate - - Type - properties: - Rate: - $ref: '#/definitions/OBExternalStatementRateType1Code' - Type: - $ref: '#/definitions/Type_0' - StatementValue: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic number value - related to the statement resource. - required: - - Value - - Type - properties: - Value: - $ref: '#/definitions/OBExternalStatementValueType1Code' - Type: - $ref: '#/definitions/Type_1' - OBStatement2Basic: - type: object - description: Provides further details on a statement resource. - required: - - AccountId - - Type - - StartDateTime - - EndDateTime - - CreationDateTime - properties: - AccountId: - $ref: '#/definitions/AccountId' - StatementId: - $ref: '#/definitions/StatementId' - StatementReference: - $ref: '#/definitions/StatementReference' - Type: - $ref: '#/definitions/OBExternalStatementType1Code' - StartDateTime: - $ref: '#/definitions/StartDateTime' - EndDateTime: - $ref: '#/definitions/EndDateTime' - CreationDateTime: - $ref: '#/definitions/CreationDateTime' - StatementDescription: - type: array - items: - description: Other descriptions that may be available for the statement resource. - type: string - minLength: 1 - maxLength: 500 - StatementBenefit: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a benefit or reward - amount for the statement resource. - required: - - Type - - Amount - properties: - Type: - $ref: '#/definitions/OBExternalStatementBenefitType1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_3' - StatementFee: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a fee for the statement - resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - Description: - $ref: '#/definitions/Description_1' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementFeeType1Code' - Rate: - $ref: '#/definitions/OBRate1_0' - RateType: - $ref: '#/definitions/OBExternalStatementFeeRateType1Code' - Frequency: - $ref: '#/definitions/OBExternalStatementFeeFrequency1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_4' - StatementInterest: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic interest amount - related to the statement resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - Description: - $ref: '#/definitions/Description_2' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementInterestType1Code' - Rate: - $ref: '#/definitions/OBRate1_1' - RateType: - $ref: '#/definitions/OBExternalStatementInterestRateType1Code' - Frequency: - $ref: '#/definitions/OBExternalStatementInterestFrequency1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_5' - StatementDateTime: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic date time for - the statement resource. - required: - - DateTime - - Type - properties: - DateTime: - $ref: '#/definitions/DateTime' - Type: - $ref: '#/definitions/OBExternalStatementDateTimeType1Code' - StatementRate: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic rate related to - the statement resource. - required: - - Rate - - Type - properties: - Rate: - $ref: '#/definitions/OBExternalStatementRateType1Code' - Type: - $ref: '#/definitions/Type_0' - StatementValue: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic number value - related to the statement resource. - required: - - Value - - Type - properties: - Value: - $ref: '#/definitions/OBExternalStatementValueType1Code' - Type: - $ref: '#/definitions/Type_1' - OBStatement2Detail: - type: object - description: Provides further details on a statement resource. - required: - - AccountId - - Type - - StartDateTime - - EndDateTime - - CreationDateTime - properties: - AccountId: - $ref: '#/definitions/AccountId' - StatementId: - $ref: '#/definitions/StatementId' - StatementReference: - $ref: '#/definitions/StatementReference' - Type: - $ref: '#/definitions/OBExternalStatementType1Code' - StartDateTime: - $ref: '#/definitions/StartDateTime' - EndDateTime: - $ref: '#/definitions/EndDateTime' - CreationDateTime: - $ref: '#/definitions/CreationDateTime' - StatementDescription: - type: array - items: - description: Other descriptions that may be available for the statement resource. - type: string - minLength: 1 - maxLength: 500 - StatementBenefit: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a benefit or reward - amount for the statement resource. - required: - - Type - - Amount - properties: - Type: - $ref: '#/definitions/OBExternalStatementBenefitType1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_3' - StatementFee: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a fee for the statement - resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - Description: - $ref: '#/definitions/Description_1' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementFeeType1Code' - Rate: - $ref: '#/definitions/OBRate1_0' - RateType: - $ref: '#/definitions/OBExternalStatementFeeRateType1Code' - Frequency: - $ref: '#/definitions/OBExternalStatementFeeFrequency1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_4' - StatementInterest: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic interest amount - related to the statement resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - Description: - $ref: '#/definitions/Description_2' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementInterestType1Code' - Rate: - $ref: '#/definitions/OBRate1_1' - RateType: - $ref: '#/definitions/OBExternalStatementInterestRateType1Code' - Frequency: - $ref: '#/definitions/OBExternalStatementInterestFrequency1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_5' - StatementAmount: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic amount for the - statement resource. - required: - - CreditDebitIndicator - - Type - - Amount - properties: - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_0' - Type: - $ref: '#/definitions/OBExternalStatementAmountType1Code' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_6' - StatementDateTime: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic date time for - the statement resource. - required: - - DateTime - - Type - properties: - DateTime: - $ref: '#/definitions/DateTime' - Type: - $ref: '#/definitions/OBExternalStatementDateTimeType1Code' - StatementRate: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic rate related to - the statement resource. - required: - - Rate - - Type - properties: - Rate: - $ref: '#/definitions/OBExternalStatementRateType1Code' - Type: - $ref: '#/definitions/Type_0' - StatementValue: - type: array - items: - type: object - description: >- - Set of elements used to provide details of a generic number value - related to the statement resource. - required: - - Value - - Type - properties: - Value: - $ref: '#/definitions/OBExternalStatementValueType1Code' - Type: - $ref: '#/definitions/Type_1' - OBSupplementaryData1: - type: object - properties: {} - additionalProperties: true - description: >- - Additional information that can not be captured in the structured fields - and/or any other specific block. - OBTransaction5: - type: object - description: Provides further details on an entry in the report. - required: - - AccountId - - CreditDebitIndicator - - Status - - BookingDateTime - - Amount - properties: - AccountId: - $ref: '#/definitions/AccountId' - TransactionId: - $ref: '#/definitions/TransactionId' - TransactionReference: - $ref: '#/definitions/TransactionReference' - StatementReference: - type: array - items: - $ref: '#/definitions/StatementReference' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_1' - Status: - $ref: '#/definitions/OBEntryStatus1Code' - BookingDateTime: - $ref: '#/definitions/BookingDateTime' - ValueDateTime: - $ref: '#/definitions/ValueDateTime' - TransactionInformation: - $ref: '#/definitions/TransactionInformation' - AddressLine: - $ref: '#/definitions/AddressLine' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_7' - ChargeAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_8' - CurrencyExchange: - $ref: '#/definitions/OBCurrencyExchange5' - BankTransactionCode: - $ref: '#/definitions/OBBankTransactionCodeStructure1' - ProprietaryBankTransactionCode: - $ref: '#/definitions/ProprietaryBankTransactionCodeStructure1' - Balance: - $ref: '#/definitions/OBTransactionCashBalance' - MerchantDetails: - $ref: '#/definitions/OBMerchantDetails1' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6_0' - CreditorAccount: - $ref: '#/definitions/OBCashAccount6_0' - DebtorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6_1' - DebtorAccount: - $ref: '#/definitions/OBCashAccount6_1' - CardInstrument: - $ref: '#/definitions/OBTransactionCardInstrument1' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBTransaction5Basic: - type: object - description: Provides further details on an entry in the report. - required: - - AccountId - - CreditDebitIndicator - - Status - - BookingDateTime - - Amount - properties: - AccountId: - $ref: '#/definitions/AccountId' - TransactionId: - $ref: '#/definitions/TransactionId' - TransactionReference: - $ref: '#/definitions/TransactionReference' - StatementReference: - type: array - items: - $ref: '#/definitions/StatementReference' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_1' - Status: - $ref: '#/definitions/OBEntryStatus1Code' - BookingDateTime: - $ref: '#/definitions/BookingDateTime' - ValueDateTime: - $ref: '#/definitions/ValueDateTime' - AddressLine: - $ref: '#/definitions/AddressLine' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_7' - ChargeAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_8' - CurrencyExchange: - $ref: '#/definitions/OBCurrencyExchange5' - BankTransactionCode: - $ref: '#/definitions/OBBankTransactionCodeStructure1' - ProprietaryBankTransactionCode: - $ref: '#/definitions/ProprietaryBankTransactionCodeStructure1' - CardInstrument: - $ref: '#/definitions/OBTransactionCardInstrument1' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBTransaction5Detail: - type: object - description: Provides further details on an entry in the report. - required: - - AccountId - - CreditDebitIndicator - - Status - - BookingDateTime - - Amount + - Code + - SubCode + description: >- + Set of elements used to fully identify the type of underlying transaction + resulting in an entry. properties: - AccountId: - $ref: '#/definitions/AccountId' - TransactionId: - $ref: '#/definitions/TransactionId' - TransactionReference: - $ref: '#/definitions/TransactionReference' - StatementReference: - type: array - items: - $ref: '#/definitions/StatementReference' - CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_1' - Status: - $ref: '#/definitions/OBEntryStatus1Code' - BookingDateTime: - $ref: '#/definitions/BookingDateTime' - ValueDateTime: - $ref: '#/definitions/ValueDateTime' - TransactionInformation: - $ref: '#/definitions/TransactionInformation' - AddressLine: - $ref: '#/definitions/AddressLine' - Amount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_7' - ChargeAmount: - $ref: '#/definitions/OBActiveOrHistoricCurrencyAndAmount_8' - CurrencyExchange: - $ref: '#/definitions/OBCurrencyExchange5' - BankTransactionCode: - $ref: '#/definitions/OBBankTransactionCodeStructure1' - ProprietaryBankTransactionCode: - $ref: '#/definitions/ProprietaryBankTransactionCodeStructure1' - Balance: - $ref: '#/definitions/OBTransactionCashBalance' - MerchantDetails: - $ref: '#/definitions/OBMerchantDetails1' - CreditorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6_0' - CreditorAccount: - $ref: '#/definitions/OBCashAccount6_0' - DebtorAgent: - $ref: '#/definitions/OBBranchAndFinancialInstitutionIdentification6_1' - DebtorAccount: - $ref: '#/definitions/OBCashAccount6_1' - CardInstrument: - $ref: '#/definitions/OBTransactionCardInstrument1' - SupplementaryData: - $ref: '#/definitions/OBSupplementaryData1' - OBTransactionCardInstrument1: + Code: + description: Specifies the family within a domain. + type: string + SubCode: + description: Specifies the sub-product family within a specific family. + type: string + ProprietaryBankTransactionCodeStructure1: type: object required: - - CardSchemeName - description: Set of elements to describe the card instrument used in the transaction. + - Code + description: Set of elements to fully identify a proprietary bank transaction code. properties: - CardSchemeName: - description: Name of the card scheme. + Code: + description: >- + Proprietary bank transaction code to identify the underlying + transaction. type: string - enum: - - AmericanExpress - - Diners - - Discover - - MasterCard - - VISA - AuthorisationType: - description: The card authorisation type. + minLength: 1 + maxLength: 35 + Issuer: + description: Identification of the issuer of the proprietary bank transaction code. type: string - enum: - - ConsumerDevice - - Contactless - - None - - PIN - Name: - description: Name of the cardholder using the card instrument. + minLength: 1 + maxLength: 35 + OBMerchantDetails1: + type: object + description: Details of the merchant involved in the transaction. + properties: + MerchantName: + description: Name by which the merchant is known. type: string minLength: 1 - maxLength: 70 - Identification: + maxLength: 350 + MerchantCategoryCode: description: >- - Identification assigned by an institution to identify the card - instrument used in the transaction. This identification is known by - the account owner, and may be masked. + Category code conform to ISO 18245, related to the type of services or + goods the merchant provides for the transaction. type: string - minLength: 1 - maxLength: 34 + minLength: 3 + maxLength: 4 OBTransactionCashBalance: type: object required: @@ -10342,7 +1303,7 @@ definitions: is applied to the account. properties: CreditDebitIndicator: - $ref: '#/definitions/OBCreditDebitCode_2' + $ref: '#/definitions/OBCreditDebitCode' Type: $ref: '#/definitions/OBBalanceType1Code' Amount: @@ -10357,679 +1318,156 @@ definitions: Amount: $ref: '#/definitions/OBActiveCurrencyAndAmount_SimpleType' Currency: - $ref: '#/definitions/ActiveOrHistoricCurrencyCode_1' - OB_Amount1_0: - description: Cap amount charged for a fee/charge - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - OB_Amount1_1: - description: >- - Every additional tranche of an overdraft balance to which an overdraft fee - is applied - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - OB_Amount1_2: - description: >- - Amount charged for an overdraft fee/charge (where it is charged in terms - of an amount rather than a rate) - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - OB_Amount1_3: - description: >- - Fee Amount charged for a fee/charge (where it is charged in terms of an - amount rather than a rate) - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - OB_Amount1_4: - description: >- - Cap amount charged for a fee/charge (where it is charged in terms of an - amount rather than a rate) - type: string - pattern: '^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$' - OB_CodeMnemonic: - description: The four letter Mnemonic used within an XML file to identify a code - type: string - pattern: '^\\w{0,4}$' - OB_FeeCategory1Code: - description: Categorisation of fees and charges into standard categories. - type: string - enum: - - FCOT - - FCRE - - FCSV - OB_FeeFrequency1Code_0: - description: Frequency at which the overdraft charge is applied to the account - type: string - enum: - - FEAC - - FEAO - - FECP - - FEDA - - FEHO - - FEI - - FEMO - - FEOA - - FEOT - - FEPC - - FEPH - - FEPO - - FEPS - - FEPT - - FEPTA - - FEPTP - - FEQU - - FESM - - FEST - - FEWE - - FEYE - OB_FeeFrequency1Code_1: - description: How often is the overdraft fee/charge calculated for the account. - type: string - enum: - - FEAC - - FEAO - - FECP - - FEDA - - FEHO - - FEI - - FEMO - - FEOA - - FEOT - - FEPC - - FEPH - - FEPO - - FEPS - - FEPT - - FEPTA - - FEPTP - - FEQU - - FESM - - FEST - - FEWE - - FEYE - OB_FeeFrequency1Code_2: - description: How frequently the fee/charge is applied to the account - type: string - enum: - - FEAC - - FEAO - - FECP - - FEDA - - FEHO - - FEI - - FEMO - - FEOA - - FEOT - - FEPC - - FEPH - - FEPO - - FEPS - - FEPT - - FEPTA - - FEPTP - - FEQU - - FESM - - FEST - - FEWE - - FEYE - OB_FeeFrequency1Code_3: - description: How frequently the fee/charge is calculated - type: string - enum: - - FEAC - - FEAO - - FECP - - FEDA - - FEHO - - FEI - - FEMO - - FEOA - - FEOT - - FEPC - - FEPH - - FEPO - - FEPS - - FEPT - - FEPTA - - FEPTP - - FEQU - - FESM - - FEST - - FEWE - - FEYE - OB_FeeFrequency1Code_4: - description: 'Period e.g. day, week, month etc. for which the fee/charge is capped' - type: string - enum: - - FEAC - - FEAO - - FECP - - FEDA - - FEHO - - FEI - - FEMO - - FEOA - - FEOT - - FEPC - - FEPH - - FEPO - - FEPS - - FEPT - - FEPTA - - FEPTP - - FEQU - - FESM - - FEST - - FEWE - - FEYE - OB_FeeType1Code: - description: Fee/Charge Type - type: string - enum: - - FEPF - - FTOT - - FYAF - - FYAM - - FYAQ - - FYCP - - FYDB - - FYMI - - FYXX - OB_InterestCalculationMethod1Code: - description: Methods of calculating interest - type: string - enum: - - ITCO - - ITOT - - ITSI - OB_InterestFixedVariableType1Code: - description: 'Type of interest rate, Fixed or Variable' - type: string - enum: - - INFI - - INVA - OB_InterestRateType1Code_0: - description: >- - Rate type for overdraft fee/charge (where it is charged in terms of a rate - rather than an amount) - type: string - enum: - - INBB - - INFR - - INGR - - INLR - - INNE - - INOT - OB_InterestRateType1Code_1: - description: >- - Rate type for Fee/Charge (where it is charged in terms of a rate rather - than an amount) - type: string - enum: - - INBB - - INFR - - INGR - - INLR - - INNE - - INOT - OB_MinMaxType1Code: - description: Min Max type - type: string - enum: - - FMMN - - FMMX - OB_OtherCodeType1_0: - type: object - required: - - Name - - Description - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_1: + $ref: '#/definitions/ActiveOrHistoricCurrencyCode' + OBBranchAndFinancialInstitutionIdentification6: type: object - required: - - Name - - Description - description: >- - Other application frequencies that are not available in the standard code - list + description: Financial institution servicing an account for the creditor. properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' + SchemeName: + $ref: '#/definitions/OBExternalFinancialInstitutionIdentification4Code' + Identification: + $ref: '#/definitions/Identification' Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_2: + $ref: '#/definitions/Name' + PostalAddress: + type: object + OBCashAccount6: type: object - required: - - Name - - Description description: >- - Other calculation frequency which is not available in the standard code - set. - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_3: - type: object - required: - - Name - - Description - description: Other Fee type which is not available in the standard code set - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_4: - type: object - required: - - Name - - Description - description: Other fee rate type code which is not available in the standard code set - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_5: - type: object - required: - - Name - - Description - description: Other fee rate type which is not in the standard rate type list - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_6: - type: object - required: - - Name - - Description - description: Other application frequencies not covered in the standard code list - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_7: - type: object - required: - - Name - - Description - description: Other calculation frequency which is not available in standard code set. - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherCodeType1_8: - type: object - required: - - Name - - Description - description: Other fee rate type which is not available in the standard code set - properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OtherFeeChargeDetailType: - type: object - required: - - FeeCategory - - Name - - Description - description: Other Fee/charge type which is not available in the standard code set + Unambiguous identification of the account of the creditor, in the case of + a debit transaction. properties: - Code: - $ref: '#/definitions/OB_CodeMnemonic' - FeeCategory: - $ref: '#/definitions/OB_FeeCategory1Code' + SchemeName: + $ref: '#/definitions/OBExternalAccountIdentification4Code' + Identification: + $ref: '#/definitions/Identification' Name: - $ref: '#/definitions/Name_3' - Description: - $ref: '#/definitions/Description_3' - OB_OverdraftFeeType1Code: - description: Overdraft fee type - type: string - enum: - - FBAO - - FBAR - - FBEB - - FBIT - - FBOR - - FBOS - - FBSC - - FBTO - - FBUB - - FBUT - - FTOT - - FTUT - OB_Period1Code: - description: 'Period e.g. day, week, month etc. for which the fee/charge is capped' - type: string - enum: - - PACT - - PDAY - - PHYR - - PMTH - - PQTR - - PWEK - - PYER - OB_Rate1_0: - description: >- - Rate charged for overdraft fee/charge (where it is charged in terms of a - rate rather than an amount) - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - OB_Rate1_1: - description: >- - Rate charged for Fee/Charge (where it is charged in terms of a rate rather - than an amount) - type: string - pattern: '^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$' - PartyId: - description: >- - A unique and immutable identifier used to identify the customer resource. - This identifier has no meaning to the account owner. - type: string - minLength: 1 - maxLength: 40 - PartyNumber: - description: Number assigned by an agent to identify its customer. - type: string - minLength: 1 - maxLength: 35 - PhoneNumber_0: - description: >- - Collection of information that identifies a phone number, as defined by - telecom services. - type: string - pattern: '\+[0-9]{1,3}-[0-9()+\-]{1,30}' - PhoneNumber_1: - description: >- - Collection of information that identifies a mobile phone number, as - defined by telecom services. - type: string - pattern: '\+[0-9]{1,3}-[0-9()+\-]{1,30}' - PostCode: - description: >- - Identifier consisting of a group of letters and/or numbers that is added - to a postal address to assist the sorting of mail. - type: string - minLength: 1 - maxLength: 16 - ProprietaryBankTransactionCodeStructure1: + $ref: '#/definitions/Name' + SecondaryIdentification: + $ref: '#/definitions/SecondaryIdentification' + OBTransactionCardInstrument1: type: object required: - - Code - description: Set of elements to fully identify a proprietary bank transaction code. + - CardSchemeName + description: Set of elements to describe the card instrument used in the transaction. properties: - Code: - description: >- - Proprietary bank transaction code to identify the underlying - transaction. + CardSchemeName: + description: Name of the card scheme. + type: string + enum: + - AmericanExpress + - Diners + - Discover + - MasterCard + - VISA + AuthorisationType: + description: The card authorisation type. + type: string + enum: + - ConsumerDevice + - Contactless + - None + - PIN + Name: + description: Name of the cardholder using the card instrument. type: string minLength: 1 - maxLength: 35 - Issuer: - description: Identification of the issuer of the proprietary bank transaction code. + maxLength: 70 + Identification: + description: >- + Identification assigned by an institution to identify the card + instrument used in the transaction. This identification is known by + the account owner, and may be masked. type: string minLength: 1 - maxLength: 35 - Reference: - description: >- - Unique reference, as assigned by the creditor, to unambiguously refer to - the payment transaction. - - Usage: If available, the initiating party should provide this reference in - the structured remittance information, to enable reconciliation by the - creditor upon receipt of the amount of money. - - If the business context requires the use of a creditor reference or a - payment remit identification, and only one identifier can be passed - through the end-to-end chain, the creditor's reference or payment - remittance identification should be quoted in the end-to-end transaction - identification. - type: string - minLength: 1 - maxLength: 35 - ScheduledPaymentDateTime: - description: >- - The date on which the scheduled payment will be made.All dates in the JSON - payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - ScheduledPaymentId: - description: >- - A unique and immutable identifier used to identify the scheduled payment - resource. This identifier has no meaning to the account owner. - type: string - minLength: 1 - maxLength: 40 - SecondaryIdentification: - description: >- - This is secondary identification of the account, as assigned by the - account servicing institution. - - This can be used by building societies to additionally identify accounts - with a roll number (in addition to a sort code and account number - combination). - type: string - minLength: 1 - maxLength: 34 - StandingOrderId: - description: >- - A unique and immutable identifier used to identify the standing order - resource. This identifier has no meaning to the account owner. - type: string - minLength: 1 - maxLength: 40 - StartDateTime: - description: >- - Date and time at which the statement period starts.All dates in the JSON - payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 - type: string - format: date-time - StatementId: - description: >- - Unique identifier for the statement resource within an servicing - institution. This identifier is both unique and immutable. - type: string - minLength: 1 - maxLength: 40 - StatementReference: - description: >- - Unique reference for the statement. This reference may be optionally - populated if available. - type: string - minLength: 1 - maxLength: 35 - StatusUpdateDateTime: + maxLength: 34 + OBSupplementaryData1: + type: object + properties: {} + additionalProperties: true description: >- - Date and time at which the resource status was updated.All dates in the - JSON payloads are represented in ISO 8601 date-time format. - - All date-time fields in responses must include the timezone. An example is - below: - - 2017-04-05T10:43:07+00:00 + Additional information that can not be captured in the structured fields + and/or any other specific block. + Links: + type: object + description: Links relevant to the payload + properties: + Self: + type: string + format: uri + First: + type: string + format: uri + Prev: + type: string + format: uri + Next: + type: string + format: uri + Last: + type: string + format: uri + additionalProperties: false + required: + - Self + Meta: + type: object + properties: + TotalPages: + type: integer + format: int32 + FirstAvailableDateTime: + $ref: '#/definitions/ISODateTime' + LastAvailableDateTime: + $ref: '#/definitions/ISODateTime' + title: MetaData + description: Meta Data relevant to the payload + additionalProperties: { } + ISODateTime: type: string format: date-time - StreetName: - description: Name of a street or thoroughfare. - type: string - minLength: 1 - maxLength: 70 - TownName: - description: 'Name of a built-up area, with defined boundaries, and a local government.' - type: string - minLength: 1 - maxLength: 35 - TransactionId: - description: >- - Unique identifier for the transaction within an servicing institution. - This identifier is both unique and immutable. - type: string - minLength: 1 - maxLength: 210 - TransactionInformation: - description: |- - Further details of the transaction. - This is the transaction narrative, which is unstructured text. - type: string - minLength: 1 - maxLength: 500 - TransactionReference: - description: >- - Unique reference for the transaction. This reference is optionally - populated, and may as an example be the FPID in the Faster Payments - context. - type: string - minLength: 1 - maxLength: 35 - Type_0: - description: 'Statement rate type, in a coded form.' - type: string - minLength: 1 - maxLength: 40 - Type_1: - description: 'Statement value type, in a coded form.' - type: string - minLength: 1 - maxLength: 40 - ValueDateTime: description: >- - Date and time at which assets become available to the account owner in - case of a credit entry, or cease to be available to the account owner in - case of a debit transaction entry. - - Usage: If transaction entry status is pending and value date is present, - then the value date refers to an expected/requested value date. - - For transaction entries subject to availability/float and for which - availability information is provided, the value date must not be used. In - this case the availability component identifies the number of availability - days.All dates in the JSON payloads are represented in ISO 8601 date-time + All dates in the JSON payloads are represented in ISO 8601 date-time format. - + All date-time fields in responses must include the timezone. An example is below: - + 2017-04-05T10:43:07+00:00 - type: string - format: date-time - OBReadData1: + OBError1: type: object - required: - - Permissions properties: - Permissions: - type: array - items: - $ref: '#/definitions/OBExternalPermissions1Code' - minItems: 1 - description: >- - Specifies the Open Banking account access data types. This is a list - of the data clusters being consented by the PSU, and requested for - authorisation with the ASPSP. - ExpirationDateTime: - description: >- - Specified date and time the permissions will expire. - - If this is not populated, the permissions will be open ended.All - dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An - example is below: - - 2017-04-05T10:43:07+00:00 + code: + description: 'error code' type: string - format: date-time - TransactionFromDateTime: + message: description: >- - Specified start date and time for the transaction query period. - - If this is not populated, the start date will be open ended, and - data will be returned from the earliest available transaction.All - dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An - example is below: - - 2017-04-05T10:43:07+00:00 + A description of the error that occurred. e.g., 'A mandatory field + isn't supplied' or 'RequestedExecutionDateTime must be in future' type: string - format: date-time - TransactionToDateTime: + minLength: 1 + maxLength: 500 + description: description: >- - Specified end date and time for the transaction query period. - - If this is not populated, the end date will be open ended, and - data will be returned to the latest available transaction.All - dates in the JSON payloads are represented in ISO 8601 date-time - format. - - All date-time fields in responses must include the timezone. An - example is below: - - 2017-04-05T10:43:07+00:00 + A description of the error that occurred. e.g., 'A mandatory field + isn't supplied' or 'RequestedExecutionDateTime must be in future' type: string - format: date-time - OBExternalPermissions1Code: - description: >- - Specifies the Open Banking account access data types. This is a - list of the data clusters being consented by the PSU, and - requested for authorisation with the ASPSP. - type: string - enum: - - ReadAccountsDetail - - ReadBalances - - ReadTransactionsDetail - OBExternalRequestStatus1Code: - description: Specifies the status of consent resource in code form. - type: string - enum: - - Authorised - - AwaitingAuthorisation - - Rejected - - Revoked + minLength: 1 + maxLength: 1000 + required: + - code + - message + - description + additionalProperties: false + minProperties: 1 + OBErrorResponse1: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/OBError1' + minItems: 1 x-wso2-security: apim: x-wso2-scopes: diff --git a/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/accounts-dynamic-endpoint-insequence.xml b/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/accounts-dynamic-endpoint-insequence.xml index 54919e9f..01f142f7 100644 --- a/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/accounts-dynamic-endpoint-insequence.xml +++ b/financial-services-accelerator/accelerators/fs-apim/repository/resources/apis/Accounts/accounts-dynamic-endpoint-insequence.xml @@ -27,11 +27,11 @@ -
+
-
+
diff --git a/financial-services-accelerator/accelerators/fs-apim/repository/resources/wso2am-4.4.0-deployment.toml b/financial-services-accelerator/accelerators/fs-apim/repository/resources/wso2am-4.4.0-deployment.toml index 85e8d087..f489441e 100755 --- a/financial-services-accelerator/accelerators/fs-apim/repository/resources/wso2am-4.4.0-deployment.toml +++ b/financial-services-accelerator/accelerators/fs-apim/repository/resources/wso2am-4.4.0-deployment.toml @@ -10,6 +10,9 @@ username = "admin@wso2.com" password = "wso2123" create_admin_account = true +[tenant_mgt] +enable_email_domain = true + [realm_manager] data_source= "WSO2UM_DB" @@ -17,21 +20,21 @@ data_source= "WSO2UM_DB" type = "database_unique_id" class = "org.wso2.carbon.user.core.jdbc.UniqueIDJDBCUserStoreManager" -[user_store.properties] -UsernameJavaRegEx = "a-zA-Z0-9@._-{3,30}$" -UsernameJavaScriptRegEx = "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$" -SCIMEnabled = false -IsBulkImportSupported = false -LeadingOrTrailingSpaceAllowedInUserName = false -UsernameWithEmailJavaScriptRegEx = "^[\\S]{3,30}$" +#[user_store.properties] +#UsernameJavaRegEx = "a-zA-Z0-9@._-{3,30}$" +#UsernameJavaScriptRegEx = "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$" +#SCIMEnabled = false +#IsBulkImportSupported = false +#LeadingOrTrailingSpaceAllowedInUserName = false +#UsernameWithEmailJavaScriptRegEx = "^[\\S]{3,30}$" -[authorization_manager] -class = "org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager" +#[authorization_manager] +#lass = "org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager" -[authorization_manager.properties] -AdminRoleManagementPermissions = "/permission" -AuthorizationCacheEnabled = true -GetAllRolesOfUserEnabled = false +#[authorization_manager.properties] +#AdminRoleManagementPermissions = "/permission" +#AuthorizationCacheEnabled = true +#GetAllRolesOfUserEnabled = false #================configs related to master-datasources.xml============= # for api manager data @@ -106,9 +109,6 @@ pool_options.validationQuery="SELECT 1" pool_options.validationInterval="30000" pool_options.defaultAutoCommit=true -[tenant_mgt] -enable_email_domain = true - [keystore.tls] file_name = "wso2carbon.jks" type = "JKS" @@ -194,8 +194,8 @@ token = "" [apim.key_manager] enable_lightweight_apikey_generation = true #service_url = "https://localhost:${mgt.transport.https.port}/services/" -#username = "$ref{super_admin.username}" -#password = "$ref{super_admin.password}" +username = "$ref{super_admin.username}" +password = "$ref{super_admin.password}" #pool.init_idle_capacity = 50 #pool.max_idle = 100 #key_validation_handler_type = "default" @@ -253,18 +253,24 @@ allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey","Internal-Key"] allow_credentials = false -#[apim.throttling] +[apim.throttling] +username = "$ref{super_admin.username}@carbon.super" #enable_data_publishing = true #enable_policy_deploy = true #enable_blacklist_condition = true #enable_persistence = true #throttle_decision_endpoints = ["tcp://localhost:5672","tcp://localhost:5672"] +[apim.throttling.policy_deploy] +username = "$ref{super_admin.username}@carbon.super" + #[apim.throttling.blacklist_condition] #start_delay = "5m" #period = "1h" -#[apim.throttling.jms] +[apim.throttling.jms] +password = "$ref{super_admin.password}" +username = "admin!wso2.com!carbon.super" #start_delay = "5m" #[apim.throttling.event_sync] @@ -347,7 +353,6 @@ HostnameVerifier = "AllowAll" HttpsProtocols = "TLSv1.2" PreferredCiphers = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - [[event_handler]] name="userPostSelfRegistration" subscriptions=["POST_ADD_USER"] @@ -390,6 +395,20 @@ iat_validity_period = "1h" #service_username = "admin" #service_password = "admin" +#[apimgt.mutual_ssl] +#enable_certificate_chain_validation = true + +[transport.passthru_https.listener.cert_revocation_validation] +enable = true +allow_cert_expiry_validation = true +allow_full_cert_chain_validation = false +cache_delay = 1000 +cache_size = 1024 + +[[apim.extension.listener]] +class = "org.wso2.financial.services.accelerator.gateway.executor.core.FSExtensionListenerImpl" +type = "AUTHENTICATION" + #================configs related to financial-services.xml============= [financial_services] publisher_url="https://localhost:9443" @@ -397,8 +416,18 @@ publisher_url="https://localhost:9443" [financial_services.gateway] request_router="org.wso2.financial.services.accelerator.gateway.executor.core.DefaultRequestRouter" +#============executors========================= +[[financial_services.gateway.executors]] +type = "Default" +[[financial_services.gateway.executors.executor]] +name = "org.wso2.financial.services.accelerator.gateway.executor.impl.consent.ConsentEnforcementExecutor" +priority = 1 +[[financial_services.gateway.executors.executor]] +name = "org.wso2.financial.services.accelerator.gateway.executor.impl.error.handling.DefaultErrorHandlingExecutor" +priority = 1000 + [financial_services.gateway.consent.validation] -endpoint="https://IS_HOSTNAME:9446/api/fs/consent/validate" +endpoint="https://IS_HOSTNAME:9446/api/fs/consent/validate/validate" [financial_services.gateway.cache] cache_access_expiry_minutes=60 @@ -408,3 +437,6 @@ cache_modified_expiry_minutes=60 [financial_services.http_connection_pool] max_connections = 2000 max_connections_per_route = 1500 + +[financial_services.identity] +consent_id_claim_name = "consent_id" diff --git a/financial-services-accelerator/accelerators/fs-is/repository/resources/wso2is-7.0.0-deployment.toml b/financial-services-accelerator/accelerators/fs-is/repository/resources/wso2is-7.0.0-deployment.toml index 77bf4c82..a5944ecf 100644 --- a/financial-services-accelerator/accelerators/fs-is/repository/resources/wso2is-7.0.0-deployment.toml +++ b/financial-services-accelerator/accelerators/fs-is/repository/resources/wso2is-7.0.0-deployment.toml @@ -283,6 +283,9 @@ read_timeout = 5000 [application_mgt] enable_role_validation = true +[transport.https.properties] +maxHttpHeaderSize = "65536" + #================configs related to financial-services.xml============= [[financial_services.jdbc_persistence_manager]] data_source.name = "WSO2FS_DB" diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java index 75b12d2e..f2565dcc 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.common/src/main/java/org/wso2/financial/services/accelerator/common/constant/FinancialServicesConstants.java @@ -86,6 +86,12 @@ public class FinancialServicesConstants { public static final String REQUEST_ROUTER = "Gateway.RequestRouter"; public static final String GATEWAY_CACHE_EXPIRY = "Gateway.Cache.GatewayCache.CacheAccessExpiry"; public static final String GATEWAY_CACHE_MODIFIED_EXPIRY = "Gateway.Cache.GatewayCache.CacheModifiedExpiry"; + public static final String CONSENT_VALIDATION_ENDPOINT = "Gateway.ConsentValidationEndpoint"; + public static final String KEYSTORE_LOCATION_TAG = "Security.InternalKeyStore.Location"; + public static final String KEYSTORE_PASSWORD_TAG = "Security.InternalKeyStore.Password"; + public static final String SIGNING_ALIAS_TAG = "Security.InternalKeyStore.KeyAlias"; + public static final String SIGNING_KEY_PASSWORD = "Security.InternalKeyStore.KeyPassword"; + //Event Notifications Constants public static final String EVENT_NOTIFICATION_GENERATOR = "EventNotifications.NotificationGeneration." + "NotificationGenerator"; diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/pom.xml b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/pom.xml index 0a7146a7..de89a00e 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/pom.xml +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/pom.xml @@ -203,6 +203,7 @@ com.fasterxml.jackson.core;version="${jackson.databinding.version}", org.owasp.encoder;version="${encoder.wso2.version}" + * !org.wso2.financial.services.accelerator.consent.mgt.extensions.internal, org.wso2.financial.services.accelerator.consent.mgt.extensions.*;version="${project.version}", diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentException.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentException.java index 085e1e5b..a81c94f0 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentException.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentException.java @@ -18,6 +18,7 @@ package org.wso2.financial.services.accelerator.consent.mgt.extensions.common; +import org.json.JSONArray; import org.json.JSONObject; import java.net.URI; @@ -52,36 +53,51 @@ public ConsentException(ResponseStatus status, String errorMessage) { errorMessage, null); } + public ConsentException(ResponseStatus status, JSONObject payload) { + + this.status = status; + this.payload = payload; + } + /** * This method is created to send error redirects in the authorization flow. The parameter validations are done * in compliance with the OAuth2 and OIDC specifications. * - * @param errorRedirectURI REQUIRED The base URI which the redirect should go to. + * @param errorURI REQUIRED The base URI which the redirect should go to. * @param error REQUIRED The error code of the error. Should be a supported value in OAuth2/OIDC * @param errorDescription OPTIONAL The description of the error. * @param state REQUIRED if a "state" parameter was present in the client authorization request. */ - public ConsentException(URI errorRedirectURI, AuthErrorCode error, String errorDescription, String state) { + public ConsentException(URI errorURI, AuthErrorCode error, String errorDescription, String state) { - if (errorRedirectURI != null && error != null) { + if (errorURI != null && error != null) { //add 302 as error code since this will be a redirect + errorRedirectURI = errorURI; this.status = ResponseStatus.FOUND; - this.payload = createDefaultErrorObject(errorRedirectURI, error.toString(), errorDescription, state); + this.payload = createDefaultErrorObject(errorURI, error.toString(), errorDescription, state); } } - public JSONObject createDefaultErrorObject(URI redirectURI, String errorCode, String errorMessage, String state) { + public JSONObject createDefaultErrorObject(URI redirectURI, String errorCode, String errorDescription, + String state) { JSONObject error = new JSONObject(); - error.put(ConsentExtensionConstants.ERROR, errorCode); - error.put(ConsentExtensionConstants.ERROR_DESCRIPTION, errorMessage); + error.put(ConsentExtensionConstants.ERROR_CODE, errorCode); + error.put(ConsentExtensionConstants.ERROR_MSG, "Consent Management Error"); + error.put(ConsentExtensionConstants.ERROR_DESCRIPTION, errorDescription); if (state != null) { error.put(ConsentExtensionConstants.STATE, state); } if (redirectURI != null) { error.put(ConsentExtensionConstants.REDIRECT_URI, redirectURI.toString()); } - return error; + + JSONArray errorList = new JSONArray(); + errorList.put(error); + + JSONObject errorObj = new JSONObject(); + errorObj.put(ConsentExtensionConstants.ERRORS, errorList); + return errorObj; } public JSONObject getPayload() { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionConstants.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionConstants.java index 86efe5c2..f2ade68e 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionConstants.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionConstants.java @@ -24,6 +24,7 @@ public class ConsentExtensionConstants { //Common Constants + public static final String TENANT_DOMAIN = "carbon.super"; public static final String UUID_REGEX = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"; public static final String ACCOUNTS = "accounts"; @@ -92,8 +93,10 @@ public class ConsentExtensionConstants { public static final String COF_ACCOUNT = "cofAccount"; public static final String PRIMARY = "primary"; public static final String ACCOUNT_IDS = "accountIds"; - public static final String ERROR = "error"; - public static final String ERROR_DESCRIPTION = "error_description"; + public static final String ERRORS = "errors"; + public static final String ERROR_CODE = "code"; + public static final String ERROR_MSG = "message"; + public static final String ERROR_DESCRIPTION = "description"; public static final String STATE = "state"; public static final String REDIRECT_URI = "redirect_uri"; //Consent Admin Handler Constants diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionUtils.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionUtils.java index c92e2be6..36291da8 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionUtils.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/common/ConsentExtensionUtils.java @@ -21,6 +21,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.json.JSONObject; +import org.wso2.carbon.identity.oauth2.util.OAuth2Util; +import org.wso2.carbon.user.api.UserStoreException; import org.wso2.financial.services.accelerator.common.exception.ConsentManagementException; import org.wso2.financial.services.accelerator.common.exception.ConsentManagementRuntimeException; import org.wso2.financial.services.accelerator.common.util.Generated; @@ -137,4 +139,39 @@ public static T getClassInstanceFromFQN(String classpath, Class classNam throw new ConsentManagementRuntimeException("Defined class" + classpath + "cannot be instantiated.", e); } } + + /** + * Method to resolve username from user ID. + * + * @param userID User ID + * @return Username + */ + @Generated(message = "Ignoring because OAuth2Util cannot be mocked with no constructors") + public static String resolveUsernameFromUserId(String userID) { + + if (!startsWithUUID(userID)) { + // If the user ID is not starting with a UUID that means request has sent the username, + // return the same user ID as the username. + return userID; + } + + String username = null; + try { + if (userID.contains(ConsentExtensionConstants.TENANT_DOMAIN)) { + username = OAuth2Util.resolveUsernameFromUserId(ConsentExtensionConstants.TENANT_DOMAIN, + userID.split("@" + ConsentExtensionConstants.TENANT_DOMAIN)[0]); + } else { + username = OAuth2Util.resolveUsernameFromUserId(ConsentExtensionConstants.TENANT_DOMAIN, userID); + } + } catch (UserStoreException e) { + log.debug("Returning null since user ID is not found in the database"); + return null; + } + return username; + } + + public static boolean startsWithUUID(String input) { + Pattern uuidPattern = Pattern.compile("^" + ConsentExtensionConstants.UUID_REGEX + ".*$"); + return uuidPattern.matcher(input).matches(); + } } diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/impl/DefaultConsentManageHandler.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/impl/DefaultConsentManageHandler.java index 0ac208ed..79036753 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/impl/DefaultConsentManageHandler.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/impl/DefaultConsentManageHandler.java @@ -197,10 +197,11 @@ public void handleDelete(ConsentManageData consentManageData) throws ConsentExce ConsentManageConstants.NO_CONSENT_FOR_CLIENT_ERROR); } - if (ConsentExtensionConstants.REVOKED_STATUS.equals(consentResource.getCurrentStatus())) { - log.error("Consent already in revoked state"); + if (ConsentExtensionConstants.REVOKED_STATUS.equals(consentResource.getCurrentStatus()) || + ConsentExtensionConstants.REJECTED_STATUS.equals(consentResource.getCurrentStatus())) { + log.error("Consent is already in revoked or rejected state"); throw new ConsentException(ResponseStatus.BAD_REQUEST, - "Consent already in revoked state"); + "Consent is already in revoked or rejected state"); } //Revoke tokens related to the consent if the flag 'shouldRevokeTokens' is true. diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/utils/ConsentManageUtils.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/utils/ConsentManageUtils.java index 48549d0c..d80667b4 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/utils/ConsentManageUtils.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/manage/utils/ConsentManageUtils.java @@ -66,9 +66,10 @@ public static boolean isTransactionFromToTimeValid(String fromDateVal, String to OffsetDateTime fromDate = OffsetDateTime.parse(fromDateVal); OffsetDateTime toDate = OffsetDateTime.parse(toDateVal); - // From date is earlier than To date - return toDate.isAfter(fromDate); + // From date is equal or earlier than To date + return toDate.isEqual(fromDate) || toDate.isAfter(fromDate); } catch (DateTimeParseException e) { + log.debug("Returning false since datetime cannot be parsed"); return false; } } diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/impl/DefaultConsentValidator.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/impl/DefaultConsentValidator.java index 4e59bf0e..d4e011a0 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/impl/DefaultConsentValidator.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/impl/DefaultConsentValidator.java @@ -30,6 +30,7 @@ import org.wso2.financial.services.accelerator.consent.mgt.dao.models.DetailedConsentResource; import org.wso2.financial.services.accelerator.consent.mgt.extensions.common.ConsentException; import org.wso2.financial.services.accelerator.consent.mgt.extensions.common.ConsentExtensionConstants; +import org.wso2.financial.services.accelerator.consent.mgt.extensions.common.ConsentExtensionUtils; import org.wso2.financial.services.accelerator.consent.mgt.extensions.common.ResponseStatus; import org.wso2.financial.services.accelerator.consent.mgt.extensions.validate.ConsentValidator; import org.wso2.financial.services.accelerator.consent.mgt.extensions.validate.model.ConsentValidateData; @@ -81,12 +82,12 @@ public void validate(ConsentValidateData consentValidateData, ConsentValidationR } //User Validation - String userIdFromToken = consentValidateData.getUserId(); + String userIdFromToken = ConsentExtensionUtils.resolveUsernameFromUserId(consentValidateData.getUserId()); boolean userIdMatching = false; ArrayList authResources = consentValidateData.getComprehensiveConsent() .getAuthorizationResources(); for (AuthorizationResource resource : authResources) { - if (userIdFromToken.contains(resource.getUserID())) { + if (userIdFromToken.equals(resource.getUserID())) { userIdMatching = true; break; } @@ -164,8 +165,8 @@ private void validateAccountSubmission(ConsentValidateData consentValidateData, log.error(PERMISSION_MISMATCH_ERROR); consentValidationResult.setValid(false); consentValidationResult.setErrorMessage(PERMISSION_MISMATCH_ERROR); - consentValidationResult.setErrorCode(ResponseStatus.UNAUTHORIZED.getReasonPhrase()); - consentValidationResult.setHttpCode(401); + consentValidationResult.setErrorCode(ResponseStatus.FORBIDDEN.getReasonPhrase()); + consentValidationResult.setHttpCode(HttpStatus.SC_FORBIDDEN); return; } @@ -184,8 +185,8 @@ private void validateAccountSubmission(ConsentValidateData consentValidateData, log.error(CONSENT_EXPIRED_ERROR); consentValidationResult.setValid(false); consentValidationResult.setErrorMessage(CONSENT_EXPIRED_ERROR); - consentValidationResult.setErrorCode(ResponseStatus.UNAUTHORIZED.getReasonPhrase()); - consentValidationResult.setHttpCode(HttpStatus.SC_UNAUTHORIZED); + consentValidationResult.setErrorCode(ResponseStatus.BAD_REQUEST.getReasonPhrase()); + consentValidationResult.setHttpCode(HttpStatus.SC_BAD_REQUEST); return; } consentValidationResult.setValid(true); diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/DefaultConsentValidatorTest.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/DefaultConsentValidatorTest.java index bab1a70d..c6194e24 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/DefaultConsentValidatorTest.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/test/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/validate/DefaultConsentValidatorTest.java @@ -20,11 +20,15 @@ import org.apache.http.HttpStatus; import org.json.JSONObject; +import org.mockito.MockedStatic; +import org.mockito.Mockito; import org.testng.Assert; +import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import org.wso2.financial.services.accelerator.consent.mgt.dao.models.AuthorizationResource; import org.wso2.financial.services.accelerator.consent.mgt.dao.models.DetailedConsentResource; +import org.wso2.financial.services.accelerator.consent.mgt.extensions.common.ConsentExtensionUtils; import org.wso2.financial.services.accelerator.consent.mgt.extensions.common.ResponseStatus; import org.wso2.financial.services.accelerator.consent.mgt.extensions.util.TestConstants; import org.wso2.financial.services.accelerator.consent.mgt.extensions.util.TestUtil; @@ -33,7 +37,9 @@ import org.wso2.financial.services.accelerator.consent.mgt.extensions.validate.model.ConsentValidationResult; import java.util.ArrayList; +import java.util.List; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; @@ -46,11 +52,21 @@ public class DefaultConsentValidatorTest { DefaultConsentValidator validator = new DefaultConsentValidator(); ConsentValidateData consentValidateDataMock; ConsentValidationResult consentValidationResultMock; + MockedStatic extensionsUtilMockedStatic; @BeforeClass public void beforeTest() { consentValidateDataMock = mock(ConsentValidateData.class); consentValidationResultMock = spy(ConsentValidationResult.class); + + extensionsUtilMockedStatic = Mockito.mockStatic(ConsentExtensionUtils.class); + extensionsUtilMockedStatic.when(() -> ConsentExtensionUtils.resolveUsernameFromUserId(anyString())) + .thenReturn(TestConstants.SAMPLE_USER_ID); + } + + @AfterClass + public void afterTest() { + extensionsUtilMockedStatic.close(); } @Test @@ -98,12 +114,16 @@ public void testValidateWithStringReceipt() { public void testValidateWithUserIdMismatch() { DetailedConsentResource consentResource = mock(DetailedConsentResource.class); doReturn(TestConstants.VALID_INITIATION).when(consentResource).getReceipt(); - ArrayList authResources = TestUtil.getSampleAuthorizationResourceArray( - TestConstants.SAMPLE_CONSENT_ID, TestConstants.SAMPLE_AUTH_ID); + AuthorizationResource authorizationResource = new AuthorizationResource(TestConstants.SAMPLE_CONSENT_ID, + "admin", TestConstants.SAMPLE_AUTHORIZATION_STATUS, + TestConstants.SAMPLE_AUTH_TYPE, System.currentTimeMillis() / 1000); + authorizationResource.setAuthorizationID(TestConstants.SAMPLE_AUTH_ID); + + ArrayList authResources = new ArrayList<>(List.of(authorizationResource)); doReturn(authResources).when(consentResource).getAuthorizationResources(); doReturn(consentResource).when(consentValidateDataMock).getComprehensiveConsent(); - doReturn("admin").when(consentValidateDataMock).getUserId(); + doReturn("admin@wso2.com").when(consentValidateDataMock).getUserId(); validator.validate(consentValidateDataMock, consentValidationResultMock); @@ -242,10 +262,10 @@ public void testValidateWithInvalidPermissionsForAccounts() { validator.validate(consentValidateDataMock, consentValidationResultMock); Assert.assertFalse(consentValidationResultMock.isValid()); - Assert.assertEquals(consentValidationResultMock.getErrorCode(), ResponseStatus.UNAUTHORIZED.getReasonPhrase()); + Assert.assertEquals(consentValidationResultMock.getErrorCode(), ResponseStatus.FORBIDDEN.getReasonPhrase()); Assert.assertEquals(consentValidationResultMock.getErrorMessage(), "Permission mismatch. " + "Consent does not contain necessary permissions"); - Assert.assertEquals(consentValidationResultMock.getHttpCode(), HttpStatus.SC_UNAUTHORIZED); + Assert.assertEquals(consentValidationResultMock.getHttpCode(), HttpStatus.SC_FORBIDDEN); } @Test @@ -292,9 +312,9 @@ public void testValidateWithExpiredInitiationForAccounts() { validator.validate(consentValidateDataMock, consentValidationResultMock); Assert.assertFalse(consentValidationResultMock.isValid()); - Assert.assertEquals(consentValidationResultMock.getErrorCode(), ResponseStatus.UNAUTHORIZED.getReasonPhrase()); + Assert.assertEquals(consentValidationResultMock.getErrorCode(), ResponseStatus.BAD_REQUEST.getReasonPhrase()); Assert.assertEquals(consentValidationResultMock.getErrorMessage(), "Provided consent is expired"); - Assert.assertEquals(consentValidationResultMock.getHttpCode(), HttpStatus.SC_UNAUTHORIZED); + Assert.assertEquals(consentValidationResultMock.getHttpCode(), HttpStatus.SC_BAD_REQUEST); } @Test diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/pom.xml b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/pom.xml index 86ea23cf..7d8b94b7 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/pom.xml +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/pom.xml @@ -43,13 +43,17 @@ commons-lang3 - io.swagger.parser.v3 + org.wso2.orbit.io.swagger.v3 swagger-parser commons-io.wso2 commons-io + + io.jsonwebtoken + jjwt + org.wso2.carbon.apimgt org.wso2.carbon.apimgt.impl @@ -208,14 +212,17 @@ org.osgi.framework; version="${osgi.framework.imp.pkg.version.range}", org.osgi.service.component; version="${osgi.service.component.imp.pkg.version.range}", org.apache.commons.io;version="${org.apache.commons.io.version.range}", - io.swagger.parser.*;version="${swagger.parser.version}", + io.swagger.parser.*; version="${swagger.parser.v3.version}", + io.swagger.v3.*; version="${swagger.parser.v3.version}", org.apache.commons.logging;version="${commons.logging.version}", org.apache.http.*;version="${orbit.httpcore.version}", org.json;version="${org.json.version.range}", org.wso2.carbon.apimgt.common.gateway.*;version="${org.wso2.carbon.apimgt.version.range}", org.wso2.carbon.apimgt.impl;version="${org.wso2.carbon.apimgt.version.range}", - org.wso2.financial.services.accelerator.common.*;version="${project.version}" + org.wso2.financial.services.accelerator.common.*;version="${project.version}", + io.jsonwebtoken;version="${jjwt.version.range}" + * !org.wso2.financial.services.accelerator.gateway.internal, org.wso2.financial.services.accelerator.gateway.*;version="${project.version}", diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionListenerImpl.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionListenerImpl.java index 4c1b03cc..9f33d8e4 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionListenerImpl.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionListenerImpl.java @@ -49,19 +49,19 @@ public class FSExtensionListenerImpl implements ExtensionListener { @Generated(message = "Ignoring since the method has covered in other tests") public ExtensionResponseDTO preProcessRequest(RequestContextDTO requestContextDTO) { - FSAPIRequestContext fsapiRequestContext = new FSAPIRequestContext(requestContextDTO, new HashMap<>()); + FSAPIRequestContext fsApiRequestContext = new FSAPIRequestContext(requestContextDTO, new HashMap<>()); for (FinancialServicesGatewayExecutor gatewayExecutor : - GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForRequest(fsapiRequestContext)) { + GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForRequest(fsApiRequestContext)) { if (log.isDebugEnabled()) { log.debug("Executing preProcessRequest for executor: " + gatewayExecutor.getClass().getName()); } - gatewayExecutor.preProcessRequest(fsapiRequestContext); + gatewayExecutor.preProcessRequest(fsApiRequestContext); } - if (!fsapiRequestContext.isError()) { - setPropertiesToCache(requestContextDTO.getMsgInfo().getMessageId(), fsapiRequestContext.getContextProps()); + if (!fsApiRequestContext.isError()) { + setPropertiesToCache(requestContextDTO.getMsgInfo().getMessageId(), fsApiRequestContext.getContextProps()); } - return getResponseDTOForRequest(fsapiRequestContext); + return getResponseDTOForRequest(fsApiRequestContext); } @Override @@ -71,20 +71,20 @@ public ExtensionResponseDTO postProcessRequest(RequestContextDTO requestContextD Map contextProps = getPropertiesFromCache(requestContextDTO.getMsgInfo().getMessageId() + GatewayConstants.CONTEXT_PROP_CACHE_KEY); - FSAPIRequestContext fsapiRequestContext = new FSAPIRequestContext(requestContextDTO, contextProps); + FSAPIRequestContext fsApiRequestContext = new FSAPIRequestContext(requestContextDTO, contextProps); for (FinancialServicesGatewayExecutor gatewayExecutor : - GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForRequest(fsapiRequestContext)) { + GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForRequest(fsApiRequestContext)) { if (log.isDebugEnabled()) { log.debug("Executing postProcessRequest for executor: " + gatewayExecutor.getClass().getName()); } - gatewayExecutor.postProcessRequest(fsapiRequestContext); + gatewayExecutor.postProcessRequest(fsApiRequestContext); } - if (!fsapiRequestContext.isError()) { + if (!fsApiRequestContext.isError()) { setPropertiesToCache(requestContextDTO.getMsgInfo().getMessageId() + - GatewayConstants.CONTEXT_PROP_CACHE_KEY, fsapiRequestContext.getContextProps()); + GatewayConstants.CONTEXT_PROP_CACHE_KEY, fsApiRequestContext.getContextProps()); } - return getResponseDTOForRequest(fsapiRequestContext); + return getResponseDTOForRequest(fsApiRequestContext); } @Override @@ -93,20 +93,20 @@ public ExtensionResponseDTO preProcessResponse(ResponseContextDTO responseContex Map contextProps = getPropertiesFromCache(responseContextDTO.getMsgInfo().getMessageId() + GatewayConstants.CONTEXT_PROP_CACHE_KEY); - FSAPIResponseContext fsapiResponseContext = new FSAPIResponseContext(responseContextDTO, contextProps); + FSAPIResponseContext fsApiResponseContext = new FSAPIResponseContext(responseContextDTO, contextProps); for (FinancialServicesGatewayExecutor gatewayExecutor : - GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForResponse(fsapiResponseContext)) { + GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForResponse(fsApiResponseContext)) { if (log.isDebugEnabled()) { log.debug("Executing preProcessResponse for executor: " + gatewayExecutor.getClass().getName()); } - gatewayExecutor.preProcessResponse(fsapiResponseContext); + gatewayExecutor.preProcessResponse(fsApiResponseContext); } - if (!fsapiResponseContext.isError()) { + if (!fsApiResponseContext.isError()) { setPropertiesToCache(responseContextDTO.getMsgInfo().getMessageId() + - GatewayConstants.CONTEXT_PROP_CACHE_KEY, fsapiResponseContext.getContextProps()); + GatewayConstants.CONTEXT_PROP_CACHE_KEY, fsApiResponseContext.getContextProps()); } - return getResponseDTOForResponse(fsapiResponseContext); + return getResponseDTOForResponse(fsApiResponseContext); } @Override @@ -115,15 +115,15 @@ public ExtensionResponseDTO postProcessResponse(ResponseContextDTO responseConte Map contextProps = getPropertiesFromCache(responseContextDTO.getMsgInfo().getMessageId() + GatewayConstants.CONTEXT_PROP_CACHE_KEY); - FSAPIResponseContext fsapiResponseContext = new FSAPIResponseContext(responseContextDTO, contextProps); + FSAPIResponseContext fsApiResponseContext = new FSAPIResponseContext(responseContextDTO, contextProps); for (FinancialServicesGatewayExecutor gatewayExecutor : - GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForResponse(fsapiResponseContext)) { + GatewayDataHolder.getInstance().getRequestRouter().getExecutorsForResponse(fsApiResponseContext)) { if (log.isDebugEnabled()) { log.debug("Executing postProcessResponse for executor: " + gatewayExecutor.getClass().getName()); } - gatewayExecutor.postProcessResponse(fsapiResponseContext); + gatewayExecutor.postProcessResponse(fsApiResponseContext); } - ExtensionResponseDTO responseDTOForResponse = getResponseDTOForResponse(fsapiResponseContext); + ExtensionResponseDTO responseDTOForResponse = getResponseDTOForResponse(fsApiResponseContext); removePropertiesFromCache(responseContextDTO.getMsgInfo().getMessageId() + GatewayConstants.CONTEXT_PROP_CACHE_KEY); return responseDTOForResponse; @@ -132,27 +132,27 @@ public ExtensionResponseDTO postProcessResponse(ResponseContextDTO responseConte /** * Method to get response DTO for request path. * - * @param fsapiRequestContext API Request Context + * @param fsApiRequestContext API Request Context * @return ExtensionResponseDTO Extension Response DTO */ - protected ExtensionResponseDTO getResponseDTOForRequest(FSAPIRequestContext fsapiRequestContext) { + protected ExtensionResponseDTO getResponseDTOForRequest(FSAPIRequestContext fsApiRequestContext) { ExtensionResponseDTO extensionResponseDTO = new ExtensionResponseDTO(); - if (fsapiRequestContext.isError()) { - int statusCode = (!fsapiRequestContext.getContextProps().containsKey(GatewayConstants.ERROR_STATUS_PROP)) ? - HttpStatus.SC_INTERNAL_SERVER_ERROR : - (int) (fsapiRequestContext.getContextProperty(GatewayConstants.ERROR_STATUS_PROP)); + if (fsApiRequestContext.isError()) { + int statusCode = (!fsApiRequestContext.getContextProps().containsKey(GatewayConstants.ERROR_STATUS_PROP)) ? + HttpStatus.SC_INTERNAL_SERVER_ERROR : Integer.parseInt(fsApiRequestContext + .getContextProperty(GatewayConstants.ERROR_STATUS_PROP).toString()); extensionResponseDTO.setStatusCode(statusCode); extensionResponseDTO.setResponseStatus(ExtensionResponseStatus.RETURN_ERROR.toString()); - } else if (fsapiRequestContext.getContextProps().containsKey(GatewayConstants.IS_RETURN_RESPONSE) && - Boolean.parseBoolean(fsapiRequestContext.getContextProps() + } else if (fsApiRequestContext.getContextProps().containsKey(GatewayConstants.IS_RETURN_RESPONSE) && + Boolean.parseBoolean(fsApiRequestContext.getContextProps() .get(GatewayConstants.IS_RETURN_RESPONSE).toString())) { - Map headers = fsapiRequestContext.getMsgInfo().getHeaders(); + Map headers = fsApiRequestContext.getMsgInfo().getHeaders(); headers.put(GatewayConstants.CONTENT_TYPE_TAG, GatewayConstants.JSON_CONTENT_TYPE); - fsapiRequestContext.getMsgInfo().setHeaders(headers); + fsApiRequestContext.getMsgInfo().setHeaders(headers); extensionResponseDTO.setHeaders(headers); - if (fsapiRequestContext.getContextProps().containsKey(GatewayConstants.MODIFIED_STATUS)) { - extensionResponseDTO.setStatusCode(Integer.parseInt(fsapiRequestContext.getContextProps() + if (fsApiRequestContext.getContextProps().containsKey(GatewayConstants.MODIFIED_STATUS)) { + extensionResponseDTO.setStatusCode(Integer.parseInt(fsApiRequestContext.getContextProps() .get(GatewayConstants.MODIFIED_STATUS).toString())); } extensionResponseDTO.setResponseStatus(ExtensionResponseStatus.RETURN_ERROR.toString()); @@ -160,40 +160,40 @@ protected ExtensionResponseDTO getResponseDTOForRequest(FSAPIRequestContext fsap extensionResponseDTO.setResponseStatus(ExtensionResponseStatus.CONTINUE.toString()); } - String modifiedPayload = fsapiRequestContext.getModifiedPayload(); + String modifiedPayload = fsApiRequestContext.getModifiedPayload(); if (modifiedPayload != null) { extensionResponseDTO.setPayload(new ByteArrayInputStream(modifiedPayload.getBytes(StandardCharsets.UTF_8))); } - setHeadersToResponse(extensionResponseDTO, fsapiRequestContext.getAddedHeaders(), - fsapiRequestContext.getMsgInfo().getHeaders()); + setHeadersToResponse(extensionResponseDTO, fsApiRequestContext.getAddedHeaders(), + fsApiRequestContext.getMsgInfo().getHeaders()); return extensionResponseDTO; } /** * Method to get response DTO for response path. * - * @param fsapiResponseContext API Response Context + * @param fsApiResponseContext API Response Context * @return ExtensionResponseDTO Extension Response DTO */ - protected ExtensionResponseDTO getResponseDTOForResponse(FSAPIResponseContext fsapiResponseContext) { + protected ExtensionResponseDTO getResponseDTOForResponse(FSAPIResponseContext fsApiResponseContext) { ExtensionResponseDTO extensionResponseDTO = new ExtensionResponseDTO(); - if (fsapiResponseContext.isError()) { - int statusCode = (!fsapiResponseContext.getContextProps().containsKey(GatewayConstants.ERROR_STATUS_PROP)) ? - HttpStatus.SC_INTERNAL_SERVER_ERROR : - (int) (fsapiResponseContext.getContextProperty(GatewayConstants.ERROR_STATUS_PROP)); + if (fsApiResponseContext.isError()) { + int statusCode = (!fsApiResponseContext.getContextProps().containsKey(GatewayConstants.ERROR_STATUS_PROP)) ? + HttpStatus.SC_INTERNAL_SERVER_ERROR : Integer.parseInt(fsApiResponseContext + .getContextProperty(GatewayConstants.ERROR_STATUS_PROP).toString()); extensionResponseDTO.setStatusCode(statusCode); extensionResponseDTO.setResponseStatus(ExtensionResponseStatus.RETURN_ERROR.toString()); - } else if (fsapiResponseContext.getContextProps().containsKey(GatewayConstants.IS_RETURN_RESPONSE) && - Boolean.parseBoolean(fsapiResponseContext.getContextProps() + } else if (fsApiResponseContext.getContextProps().containsKey(GatewayConstants.IS_RETURN_RESPONSE) && + Boolean.parseBoolean(fsApiResponseContext.getContextProps() .get(GatewayConstants.IS_RETURN_RESPONSE).toString())) { - Map headers = fsapiResponseContext.getMsgInfo().getHeaders(); + Map headers = fsApiResponseContext.getMsgInfo().getHeaders(); headers.put(GatewayConstants.CONTENT_TYPE_TAG, GatewayConstants.JSON_CONTENT_TYPE); - fsapiResponseContext.getMsgInfo().setHeaders(headers); + fsApiResponseContext.getMsgInfo().setHeaders(headers); extensionResponseDTO.setHeaders(headers); - if (fsapiResponseContext.getContextProps().containsKey(GatewayConstants.MODIFIED_STATUS)) { - extensionResponseDTO.setStatusCode((Integer.parseInt(fsapiResponseContext.getContextProps() + if (fsApiResponseContext.getContextProps().containsKey(GatewayConstants.MODIFIED_STATUS)) { + extensionResponseDTO.setStatusCode((Integer.parseInt(fsApiResponseContext.getContextProps() .get(GatewayConstants.MODIFIED_STATUS).toString()))); } extensionResponseDTO.setResponseStatus(ExtensionResponseStatus.RETURN_ERROR.toString()); @@ -201,13 +201,13 @@ protected ExtensionResponseDTO getResponseDTOForResponse(FSAPIResponseContext fs extensionResponseDTO.setResponseStatus(ExtensionResponseStatus.CONTINUE.toString()); } - String modifiedPayload = fsapiResponseContext.getModifiedPayload(); + String modifiedPayload = fsApiResponseContext.getModifiedPayload(); if (modifiedPayload != null) { extensionResponseDTO.setPayload(new ByteArrayInputStream(modifiedPayload.getBytes(StandardCharsets.UTF_8))); } - setHeadersToResponse(extensionResponseDTO, fsapiResponseContext.getAddedHeaders(), - fsapiResponseContext.getMsgInfo().getHeaders()); + setHeadersToResponse(extensionResponseDTO, fsApiResponseContext.getAddedHeaders(), + fsApiResponseContext.getMsgInfo().getHeaders()); return extensionResponseDTO; } diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/impl/consent/ConsentEnforcementExecutor.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/impl/consent/ConsentEnforcementExecutor.java new file mode 100644 index 00000000..88be3af0 --- /dev/null +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/impl/consent/ConsentEnforcementExecutor.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + *

+ * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.financial.services.accelerator.gateway.executor.impl.consent; + +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.json.JSONObject; +import org.wso2.financial.services.accelerator.common.constant.FinancialServicesConstants; +import org.wso2.financial.services.accelerator.common.constant.FinancialServicesErrorCodes; +import org.wso2.financial.services.accelerator.common.exception.FinancialServicesException; +import org.wso2.financial.services.accelerator.common.util.Generated; +import org.wso2.financial.services.accelerator.common.util.HTTPClientUtils; +import org.wso2.financial.services.accelerator.gateway.executor.core.FinancialServicesGatewayExecutor; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIRequestContext; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIResponseContext; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSExecutorError; +import org.wso2.financial.services.accelerator.gateway.internal.GatewayDataHolder; +import org.wso2.financial.services.accelerator.gateway.util.GatewayConstants; +import org.wso2.financial.services.accelerator.gateway.util.GatewayUtils; + +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.security.Key; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +/** + * Consent Enforcement executor. + */ +public class ConsentEnforcementExecutor implements FinancialServicesGatewayExecutor { + + protected static final String ERROR_TITLE = "Consent Enforcement Error"; + protected static final String HEADERS_TAG = "headers"; + protected static final String BODY_TAG = "body"; + protected static final String CONTEXT_TAG = "context"; + protected static final String RESOURCE_TAG = "resource"; + protected static final String ELECTED_RESOURCE_TAG = "electedResource"; + protected static final String HTTP_METHOD = "httpMethod"; + protected static final String CONSENT_ID_TAG = "consentId"; + protected static final String USER_ID_TAG = "userId"; + protected static final String CLIENT_ID_TAG = "clientId"; + protected static final String RESOURCE_PARAMS = "resourceParams"; + private static final Log log = LogFactory.getLog(ConsentEnforcementExecutor.class); + private static final GatewayDataHolder dataHolder = GatewayDataHolder.getInstance(); + private static final String INFO_HEADER_TAG = "Account-Request-Information"; + private static final String IS_VALID = "isValid"; + private static final String ERROR_CODE = "errorCode"; + private static final String ERROR_MESSAGE = "errorMessage"; + private static final String HTTP_CODE = "httpCode"; + private static final String MODIFIED_PAYLOAD = "modifiedPayload"; + private static final String CONSENT_INFO = "consentInformation"; + private static volatile String consentValidationEndpoint; + private static volatile Key key; + + /** + * Method to handle request. + * + * @param fsApiRequestContext FS request context object + */ + @Generated(message = "Unit testable components are covered") + @Override + public void preProcessRequest(FSAPIRequestContext fsApiRequestContext) { + + } + + /** + * Method to handle post request. + * + * @param fsApiRequestContext FS request context object + */ + @Override + public void postProcessRequest(FSAPIRequestContext fsApiRequestContext) { + // Consent ID is required for consent enforcement. If the consent ID is null, we are assume this is a + // pre-consent creation call. Therefore consent enforcement is not required. + if (fsApiRequestContext.isError() || fsApiRequestContext.getConsentId() == null) { + return; + } + + Map requestHeaders = fsApiRequestContext.getMsgInfo().getHeaders(); + Map additionalParams = new HashMap<>(); + additionalParams.put(ELECTED_RESOURCE_TAG, fsApiRequestContext.getMsgInfo().getElectedResource()); + additionalParams.put(CONSENT_ID_TAG, fsApiRequestContext.getConsentId()); + additionalParams.put(USER_ID_TAG, fsApiRequestContext.getApiRequestInfo().getUsername()); + additionalParams.put(CLIENT_ID_TAG, fsApiRequestContext.getApiRequestInfo().getConsumerKey()); + additionalParams.put(RESOURCE_PARAMS, getResourceParamMap(fsApiRequestContext)); + + JSONObject validationRequest; + if (StringUtils.isNotBlank(fsApiRequestContext.getModifiedPayload())) { + validationRequest = createValidationRequestPayload(requestHeaders, + fsApiRequestContext.getModifiedPayload(), additionalParams); + } else { + validationRequest = createValidationRequestPayload(requestHeaders, + fsApiRequestContext.getRequestPayload(), additionalParams); + } + String enforcementJWTPayload = generateJWT(validationRequest.toString()); + JSONObject jsonResponse; + try { + String response = invokeConsentValidationService(enforcementJWTPayload); + jsonResponse = new JSONObject(response); + } catch (IOException | FinancialServicesException e) { + handleError(fsApiRequestContext, FinancialServicesErrorCodes.CONSENT_VALIDATION_REQUEST_FAILURE, + e.getMessage(), FinancialServicesErrorCodes.SERVER_ERROR_CODE); + return; + } + + boolean isValid = jsonResponse.getBoolean(IS_VALID); + if (!isValid) { + String errorCode = jsonResponse.get(ERROR_CODE).toString(); + String errorMessage = jsonResponse.get(ERROR_MESSAGE).toString(); + String httpCode = jsonResponse.get(HTTP_CODE).toString(); + handleError(fsApiRequestContext, errorCode, errorMessage, httpCode); + return; + } else if (!jsonResponse.isNull(MODIFIED_PAYLOAD)) { + Object modifiedPayloadObj = jsonResponse.get(MODIFIED_PAYLOAD); + if (modifiedPayloadObj != null) { + fsApiRequestContext.setModifiedPayload(modifiedPayloadObj.toString()); + } + } else if (!jsonResponse.isNull(CONSENT_INFO)) { + Object consentInformationObj = jsonResponse.get(CONSENT_INFO); + if (consentInformationObj != null) { + requestHeaders.put(INFO_HEADER_TAG, consentInformationObj.toString()); + fsApiRequestContext.setAddedHeaders(requestHeaders); + } + } + } + + /** + * Method to handle response. + * + * @param fsApiResponseContext FS response context object + */ + @Override + public void preProcessResponse(FSAPIResponseContext fsApiResponseContext) { + + } + + /** + * Method to handle post response. + * + * @param fsApiResponseContext FS response context object + */ + @Override + public void postProcessResponse(FSAPIResponseContext fsApiResponseContext) { + + } + + private static String getValidationEndpoint() { + + if (consentValidationEndpoint == null) { + synchronized (ConsentEnforcementExecutor.class) { + if (consentValidationEndpoint == null) { + consentValidationEndpoint = dataHolder + .getFinancialServicesConfigurationService().getConfigurations() + .get(FinancialServicesConstants.CONSENT_VALIDATION_ENDPOINT).toString(); + } + } + } + return consentValidationEndpoint; + + } + + /** + * Method to obtain signing key. + * + * @return Key as an Object. + */ + @SuppressFBWarnings("PATH_TRAVERSAL_IN") + // Suppressed content - dataHolder.getKeyStoreLocation() + // Suppression reason - False Positive : Keystore location is obtained from deployment.toml. So it can be marked + // as a trusted filepath + // Suppressed warning count - 1 + protected static Key getJWTSigningKey() { + + if (key == null) { + synchronized (ConsentEnforcementExecutor.class) { + if (key == null) { + try (FileInputStream is = new FileInputStream(dataHolder.getKeyStoreLocation())) { + KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); + keystore.load(is, dataHolder.getKeyStorePassword()); + key = keystore.getKey(dataHolder.getKeyAlias(), dataHolder.getKeyPassword().toCharArray()); + } catch (IOException | CertificateException | KeyStoreException | NoSuchAlgorithmException + | UnrecoverableKeyException e) { + log.error("Error occurred while retrieving private key from keystore ", e); + } + } + } + } + return key; + } + + /** + * Method to generate JWT. + * @param payload Payload to be signed + * @return Signed JWT + */ + protected String generateJWT(String payload) { + + return Jwts.builder() + .setPayload(payload) + .signWith(SignatureAlgorithm.RS512, getJWTSigningKey()) + .compact(); + } + + /** + * Method to invoke consent validation service when the JWT payload is provided. + * + * @param enforcementJWTPayload JWT Payload + * @return Response as a String + * @throws IOException When failed to invoke the validation endpoint or failed to parse the response. + */ + @Generated(message = "Ignoring from unit tests since this method require calling external component to function") + private String invokeConsentValidationService(String enforcementJWTPayload) throws IOException, + FinancialServicesException { + + HttpPost httpPost = new HttpPost(getValidationEndpoint()); + StringEntity params; + params = new StringEntity(enforcementJWTPayload); + httpPost.setEntity(params); + httpPost.setHeader(GatewayConstants.CONTENT_TYPE_TAG, GatewayConstants.JWT_CONTENT_TYPE); + String userName = GatewayUtils.getAPIMgtConfig(GatewayConstants.API_KEY_VALIDATOR_USERNAME); + String password = GatewayUtils.getAPIMgtConfig(GatewayConstants.API_KEY_VALIDATOR_PASSWORD); + httpPost.setHeader(GatewayConstants.AUTH_HEADER, GatewayUtils.getBasicAuthHeader(userName, password)); + CloseableHttpResponse response = HTTPClientUtils.getHttpsClient().execute(httpPost); + InputStream in = response.getEntity().getContent(); + return IOUtils.toString(in, String.valueOf(StandardCharsets.UTF_8)); + } + + /** + * Method to handle errors. + * + * @param fsApiRequestContext API Context + * @param errorCode Error Code + * @param errorMessage Error Message + * @param httpCode HTTP status code ( in 4XX range) + */ + protected void handleError(FSAPIRequestContext fsApiRequestContext, String errorCode, String errorMessage, + String httpCode) { + + fsApiRequestContext.setError(true); + ArrayList errors = fsApiRequestContext.getErrors(); + errors.add(new FSExecutorError(errorCode, ERROR_TITLE, errorMessage, httpCode)); + fsApiRequestContext.setErrors(errors); + fsApiRequestContext.addContextProperty(GatewayConstants.ERROR_STATUS_PROP, httpCode); + } + + /** + * Method to create validation payload. + * + * @param requestHeaders Request headers of original request + * @param requestPayload Request payload of original request + * @return JSON Object with added attributes. + */ + protected JSONObject createValidationRequestPayload(Map requestHeaders, String requestPayload, + Map additionalParams) { + + JSONObject validationRequest = new JSONObject(); + JSONObject headers = new JSONObject(); + requestHeaders.forEach(headers::put); + validationRequest.put(HEADERS_TAG, headers); + /*requestContextDTO.getMsgInfo().getPayloadHandler().consumeAsString() method sets the request payload as a + null string, hence adding string null check to the validation*/ + if (requestPayload != null && !requestPayload.isEmpty() && !requestPayload.equals("null")) { + //This assumes all input payloads are in Content-Type : Application/JSON + validationRequest.put(BODY_TAG, new JSONObject(requestPayload)); + } + additionalParams.forEach(validationRequest::put); + return validationRequest; + } + + /** + * Method to construct resource parameter map to invoke the validation service. + * + * @param fsApiRequestContext FS request context object + * @return A Map containing resource path(ex: /aisp/accounts/{AccountId}?queryParam=urlEncodedQueryParamValue), + * http method and context(ex: /open-banking/v3.1/aisp) + */ + private Map getResourceParamMap(FSAPIRequestContext fsApiRequestContext) { + + Map resourceMap = new HashMap<>(); + resourceMap.put(RESOURCE_TAG, fsApiRequestContext.getMsgInfo().getResource()); + resourceMap.put(HTTP_METHOD, fsApiRequestContext.getMsgInfo().getHttpMethod()); + resourceMap.put(CONTEXT_TAG, fsApiRequestContext.getApiRequestInfo().getContext()); + + return resourceMap; + } +} diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/impl/error/handling/DefaultErrorHandlingExecutor.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/impl/error/handling/DefaultErrorHandlingExecutor.java new file mode 100644 index 00000000..205f6d8c --- /dev/null +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/executor/impl/error/handling/DefaultErrorHandlingExecutor.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + *

+ * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.financial.services.accelerator.gateway.executor.impl.error.handling; + +import org.apache.http.HttpStatus; +import org.json.JSONArray; +import org.json.JSONObject; +import org.wso2.financial.services.accelerator.gateway.executor.core.FinancialServicesGatewayExecutor; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIRequestContext; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIResponseContext; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSExecutorError; +import org.wso2.financial.services.accelerator.gateway.util.GatewayConstants; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * Default Executor to handle gateway errors. + */ +public class DefaultErrorHandlingExecutor implements FinancialServicesGatewayExecutor { + + private static final String ERRORS_TAG = "errors"; + + /** + * Method to handle pre request. + * + * @param fsApiRequestContext FS request context object + */ + @Override + public void preProcessRequest(FSAPIRequestContext fsApiRequestContext) { + + handleRequestError(fsApiRequestContext); + + } + + /** + * Method to handle post request. + * + * @param fsApiRequestContext FS request context object + */ + @Override + public void postProcessRequest(FSAPIRequestContext fsApiRequestContext) { + + handleRequestError(fsApiRequestContext); + } + + /** + * Method to handle pre response. + * + * @param fsApiResponseContext FS response context object + */ + @Override + public void preProcessResponse(FSAPIResponseContext fsApiResponseContext) { + + handleResponseError(fsApiResponseContext); + } + + /** + * Method to handle post response. + * + * @param fsApiResponseContext FS response context object + */ + @Override + public void postProcessResponse(FSAPIResponseContext fsApiResponseContext) { + + handleResponseError(fsApiResponseContext); + } + + private void handleRequestError(FSAPIRequestContext fsApiRequestContext) { + + if (!fsApiRequestContext.isError()) { + return; + } + JSONObject payload = new JSONObject(); + ArrayList errors = fsApiRequestContext.getErrors(); + JSONArray errorList = getErrorJSON(errors); + HashSet statusCodes = new HashSet<>(); + + for (FSExecutorError error : errors) { + statusCodes.add(error.getHttpStatusCode()); + } + + payload.put(ERRORS_TAG, errorList); + if (!errorList.isEmpty()) { + fsApiRequestContext.setModifiedPayload(payload.toString()); + Map addedHeaders = fsApiRequestContext.getAddedHeaders(); + addedHeaders.put(GatewayConstants.CONTENT_TYPE_TAG, GatewayConstants.JSON_CONTENT_TYPE); + fsApiRequestContext.setAddedHeaders(addedHeaders); + } + int statusCode; + if (fsApiRequestContext.getContextProps().containsKey(GatewayConstants.ERROR_STATUS_PROP)) { + statusCode = Integer.parseInt(fsApiRequestContext + .getContextProperty(GatewayConstants.ERROR_STATUS_PROP).toString()); + } else if (isAnyClientErrors(statusCodes)) { + statusCode = HttpStatus.SC_BAD_REQUEST; + } else { + statusCode = HttpStatus.SC_INTERNAL_SERVER_ERROR; + } + fsApiRequestContext.addContextProperty(GatewayConstants.ERROR_STATUS_PROP, + String.valueOf(statusCode)); + } + + private void handleResponseError(FSAPIResponseContext fsApiResponseContext) { + + if (!fsApiResponseContext.isError()) { + return; + } + JSONObject payload = new JSONObject(); + ArrayList errors = fsApiResponseContext.getErrors(); + JSONArray errorList = getErrorJSON(errors); + HashSet statusCodes = new HashSet<>(); + + for (FSExecutorError error : errors) { + statusCodes.add(error.getHttpStatusCode()); + } + + payload.put(ERRORS_TAG, errorList); + fsApiResponseContext.setModifiedPayload(payload.toString()); + Map addedHeaders = fsApiResponseContext.getAddedHeaders(); + addedHeaders.put(GatewayConstants.CONTENT_TYPE_TAG, GatewayConstants.JSON_CONTENT_TYPE); + fsApiResponseContext.setAddedHeaders(addedHeaders); + int statusCode; + if (fsApiResponseContext.getContextProps().containsKey(GatewayConstants.ERROR_STATUS_PROP)) { + statusCode = Integer.parseInt(fsApiResponseContext + .getContextProperty(GatewayConstants.ERROR_STATUS_PROP).toString()); + } else if (isAnyClientErrors(statusCodes)) { + statusCode = HttpStatus.SC_BAD_REQUEST; + } else { + statusCode = HttpStatus.SC_INTERNAL_SERVER_ERROR; + } + fsApiResponseContext.addContextProperty(GatewayConstants.ERROR_STATUS_PROP, + String.valueOf(statusCode)); + } + + private JSONArray getErrorJSON(List errors) { + + JSONArray errorList = new JSONArray(); + for (FSExecutorError error : errors) { + JSONObject errorObj = new JSONObject(); + errorObj.put(GatewayConstants.CODE, error.getCode()); + errorObj.put(GatewayConstants.MESSAGE, error.getTitle()); + errorObj.put(GatewayConstants.DESCRIPTION, error.getMessage()); + Map links = error.getLinks(); + if (links != null && !links.isEmpty()) { + JSONObject linksObj = new JSONObject(); + links.forEach(linksObj::put); + errorObj.put(GatewayConstants.LINKS, linksObj); + } + errorList.put(errorObj); + } + return errorList; + } + + private boolean isAnyClientErrors(Set statusCodes) { + + return statusCodes.stream().anyMatch(statusCode -> statusCode.startsWith("4")); + } +} diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/internal/GatewayDataHolder.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/internal/GatewayDataHolder.java index e3b7b1b4..fdd17b93 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/internal/GatewayDataHolder.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/internal/GatewayDataHolder.java @@ -20,6 +20,7 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService; +import org.wso2.carbon.base.ServerConfiguration; import org.wso2.financial.services.accelerator.common.config.FinancialServicesConfigurationService; import org.wso2.financial.services.accelerator.common.constant.FinancialServicesConstants; import org.wso2.financial.services.accelerator.common.exception.FinancialServicesException; @@ -28,6 +29,7 @@ import org.wso2.financial.services.accelerator.gateway.cache.GatewayCache; import org.wso2.financial.services.accelerator.gateway.executor.core.AbstractRequestRouter; +import java.util.Arrays; import java.util.Map; /** @@ -43,6 +45,10 @@ public class GatewayDataHolder { private int gatewayCacheModifiedExpiry; private APIManagerConfigurationService apiManagerConfigurationService; private AbstractRequestRouter requestRouter; + private String keyStoreLocation; + private char[] keyStorePassword; + private String keyAlias; + private String keyPassword; private GatewayDataHolder() { @@ -135,6 +141,55 @@ public void setGatewayCacheModifiedExpiry(String expTime) { this.gatewayCacheModifiedExpiry = expTime == null ? 60 : Integer.parseInt(expTime); } + public String getKeyStoreLocation() { + + return keyStoreLocation == null ? ServerConfiguration.getInstance() + .getFirstProperty(FinancialServicesConstants.KEYSTORE_LOCATION_TAG) : keyStoreLocation; + } + + public void setKeyStoreLocation(String keyStoreLocation) { + + this.keyStoreLocation = keyStoreLocation; + } + + public char[] getKeyStorePassword() { + + if (this.keyStorePassword == null) { + this.keyStorePassword = ServerConfiguration.getInstance() + .getFirstProperty(FinancialServicesConstants.KEYSTORE_PASSWORD_TAG).toCharArray(); + } + return Arrays.copyOf(this.keyStorePassword, this.keyStorePassword.length); + } + + public void setKeyStorePassword(char[] keyStorePassword) { + + if (keyStorePassword != null) { + this.keyStorePassword = Arrays.copyOf(keyStorePassword, keyStorePassword.length); + } + } + + public String getKeyAlias() { + + return keyAlias == null ? ServerConfiguration.getInstance() + .getFirstProperty(FinancialServicesConstants.SIGNING_ALIAS_TAG) : keyAlias; + } + + public void setKeyAlias(String keyAlias) { + + this.keyAlias = keyAlias; + } + + public String getKeyPassword() { + + return keyPassword == null ? ServerConfiguration.getInstance() + .getFirstProperty(FinancialServicesConstants.SIGNING_KEY_PASSWORD) : keyPassword; + } + + public void setKeyPassword(String keyPassword) { + + this.keyPassword = keyPassword; + } + public void setApiManagerConfiguration(APIManagerConfigurationService apiManagerConfigurationService) { this.apiManagerConfigurationService = apiManagerConfigurationService; diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/util/GatewayConstants.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/util/GatewayConstants.java index 39159bbf..0575c608 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/util/GatewayConstants.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/main/java/org/wso2/financial/services/accelerator/gateway/util/GatewayConstants.java @@ -59,4 +59,8 @@ public class GatewayConstants { public static final String ERROR_STATUS_PROP = "errorStatusCode"; public static final String IS_RETURN_RESPONSE = "isReturnResponse"; public static final String MODIFIED_STATUS = "ModifiedStatus"; + public static final String CODE = "code"; + public static final String MESSAGE = "message"; + public static final String DESCRIPTION = "description"; + public static final String LINKS = "links"; } diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/GatewayTestConstants.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/GatewayTestConstants.java index 4629ba3c..1697dfbf 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/GatewayTestConstants.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/GatewayTestConstants.java @@ -29,7 +29,7 @@ public class GatewayTestConstants { public static final String VALID_EXECUTOR_CLASS = - "org.wso2.financial.services.accelerator.gateway.executor.core.MockOBExecutor"; + "org.wso2.financial.services.accelerator.gateway.executor.core.MockFSExecutor"; public static final Map VALID_EXECUTOR_MAP = Stream.of( new AbstractMap.SimpleImmutableEntry<>(1, VALID_EXECUTOR_CLASS)) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionImplTest.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionImplTest.java index 589cbe12..d576d328 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionImplTest.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/FSExtensionImplTest.java @@ -36,7 +36,7 @@ import java.util.Map; /** - * Test for open Banking extension implementation. + * Test for FS extension implementation. */ public class FSExtensionImplTest { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/MockOBExecutor.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/MockFSExecutor.java similarity index 94% rename from financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/MockOBExecutor.java rename to financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/MockFSExecutor.java index 55cc2eb7..8122dca0 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/MockOBExecutor.java +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/core/MockFSExecutor.java @@ -23,9 +23,9 @@ import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIResponseContext; /** - * Mock Open banking executor for testing. + * Mock FS executor for testing. */ -public class MockOBExecutor implements FinancialServicesGatewayExecutor { +public class MockFSExecutor implements FinancialServicesGatewayExecutor { @Override public void preProcessRequest(FSAPIRequestContext fsapiRequestContext) { diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/impl/consent/ConsentEnforcementExecutorTest.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/impl/consent/ConsentEnforcementExecutorTest.java new file mode 100644 index 00000000..79464dd7 --- /dev/null +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/impl/consent/ConsentEnforcementExecutorTest.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + *

+ * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.financial.services.accelerator.gateway.executor.impl.consent; + +import org.apache.commons.io.FileUtils; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.impl.client.CloseableHttpClient; +import org.json.JSONObject; +import org.mockito.MockedStatic; +import org.mockito.Mockito; +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; +import org.wso2.carbon.apimgt.common.gateway.dto.APIRequestInfoDTO; +import org.wso2.carbon.apimgt.common.gateway.dto.MsgInfoDTO; +import org.wso2.carbon.apimgt.impl.APIManagerConfiguration; +import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService; +import org.wso2.financial.services.accelerator.common.config.FinancialServicesConfigurationService; +import org.wso2.financial.services.accelerator.common.constant.FinancialServicesConstants; +import org.wso2.financial.services.accelerator.common.util.HTTPClientUtils; +import org.wso2.financial.services.accelerator.gateway.GatewayTestConstants; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIRequestContext; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSExecutorError; +import org.wso2.financial.services.accelerator.gateway.internal.GatewayDataHolder; +import org.wso2.financial.services.accelerator.gateway.util.GatewayUtils; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * Test for enforcement executor. + */ +public class ConsentEnforcementExecutorTest { + + private static ConsentEnforcementExecutor consentEnforcementExecutor; + private static MockedStatic httpClientUtilsMockedStatic; + + @BeforeClass + public static void beforeClass() throws IOException { + + GatewayDataHolder dataHolder = GatewayDataHolder.getInstance(); + String path = "src/test/resources"; + File file = new File(path); + String absolutePathForTestResources = file.getAbsolutePath(); + dataHolder.setKeyStoreLocation(absolutePathForTestResources + "/wso2carbon.jks"); + dataHolder.setKeyAlias("wso2carbon"); + dataHolder.setKeyPassword("wso2carbon"); + dataHolder.setKeyStorePassword("wso2carbon".toCharArray()); + + Map configs = new HashMap<>(); + configs.put(FinancialServicesConstants.CONSENT_VALIDATION_ENDPOINT, "http://localhost:8080"); + configs.put(FinancialServicesConstants.REQUEST_ROUTER, + "org.wso2.financial.services.accelerator.gateway.executor.core.DefaultRequestRouter"); + FinancialServicesConfigurationService financialServicesConfigurationService = + Mockito.mock(FinancialServicesConfigurationService.class); + Mockito.when(financialServicesConfigurationService.getConfigurations()).thenReturn(configs); + dataHolder.setFinancialServicesConfigurationService(financialServicesConfigurationService); + + APIManagerConfiguration apiManagerConfiguration = Mockito.mock(APIManagerConfiguration.class); + Mockito.when(apiManagerConfiguration.getFirstProperty(Mockito.anyString())).thenReturn("admin"); + APIManagerConfigurationService apimConfigurationService = Mockito.mock(APIManagerConfigurationService.class); + Mockito.when(apimConfigurationService.getAPIManagerConfiguration()).thenReturn(apiManagerConfiguration); + dataHolder.setApiManagerConfiguration(apimConfigurationService); + + File responseFile = new File("src/test/resources/test-validation-response.json"); + byte[] crlBytes = FileUtils.readFileToString(responseFile, String.valueOf(StandardCharsets.UTF_8)) + .getBytes(StandardCharsets.UTF_8); + InputStream inStream = new ByteArrayInputStream(crlBytes); + + HttpEntity httpEntityMock = Mockito.mock(HttpEntity.class); + Mockito.doReturn(inStream).when(httpEntityMock).getContent(); + + CloseableHttpClient httpClient = Mockito.mock(CloseableHttpClient.class); + CloseableHttpResponse httpResponse = Mockito.mock(CloseableHttpResponse.class); + Mockito.doReturn(httpEntityMock).when(httpResponse).getEntity(); + Mockito.doReturn(httpResponse).when(httpClient).execute(Mockito.any()); + + httpClientUtilsMockedStatic = Mockito.mockStatic(HTTPClientUtils.class); + httpClientUtilsMockedStatic.when(() -> HTTPClientUtils.getHttpsClient()).thenReturn(httpClient); + + consentEnforcementExecutor = new ConsentEnforcementExecutor(); + } + + @AfterClass + public static void afterClass() { + httpClientUtilsMockedStatic.close(); + } + + @Test(priority = 1) + public void testSigningKeyRetrieval() { + + Assert.assertNotNull(consentEnforcementExecutor.getJWTSigningKey()); + } + + @Test(priority = 2) + public void testJWTGeneration() { + + String jwtToken = consentEnforcementExecutor.generateJWT(GatewayTestConstants.CUSTOM_PAYLOAD); + Assert.assertNotNull(jwtToken); + String[] parts = jwtToken.split("\\."); + Assert.assertEquals(parts.length, 3); + } + + @Test(priority = 2) + public void testValidationPayloadCreation() { + + Map headers = new HashMap<>(); + headers.put("customHeader", "headerValue"); + headers.put("customHeader2", "headerValue2"); + JSONObject jsonObject = + consentEnforcementExecutor.createValidationRequestPayload(headers, + GatewayTestConstants.CUSTOM_PAYLOAD, new HashMap<>()); + Assert.assertNotNull(jsonObject); + Assert.assertEquals(((JSONObject) jsonObject.get(ConsentEnforcementExecutor.HEADERS_TAG)).get("customHeader"), + "headerValue"); + Assert.assertEquals(((JSONObject) jsonObject.get(ConsentEnforcementExecutor.BODY_TAG)).get("custom"), + "payload"); + } + + @Test(priority = 3) + public void testB64Decoder() throws UnsupportedEncodingException { + + String jwtToken = "eyJjdXN0b20iOiJwYXlsb2FkIn0"; + JSONObject jsonObject = GatewayUtils.decodeBase64(jwtToken); + Assert.assertEquals(jsonObject.get("custom").toString(), "payload"); + } + + @Test + public void testHandlerError() { + FSAPIRequestContext fsapiRequestContext = Mockito.mock(FSAPIRequestContext.class); + ArrayList errors = new ArrayList<>(); + Mockito.when(fsapiRequestContext.getErrors()).thenReturn(errors); + consentEnforcementExecutor.handleError(fsapiRequestContext, "Error", "Error", + "400"); + } + + @Test + public void testPostProcessRequest() { + String consentID = String.valueOf(UUID.randomUUID()); + + MsgInfoDTO msgInfoDTOMock = Mockito.mock(MsgInfoDTO.class); + Mockito.doReturn("/accounts").when(msgInfoDTOMock).getElectedResource(); + Mockito.doReturn("/accounts").when(msgInfoDTOMock).getResource(); + Mockito.doReturn("GET").when(msgInfoDTOMock).getHttpMethod(); + + APIRequestInfoDTO apiRequestInfoDTOMock = Mockito.mock(APIRequestInfoDTO.class); + Mockito.doReturn("admin@wso2.com").when(apiRequestInfoDTOMock).getUsername(); + Mockito.doReturn("test-client-id").when(apiRequestInfoDTOMock).getConsumerKey(); + Mockito.doReturn("/open-banking/v3.1/aisp").when(apiRequestInfoDTOMock).getContext(); + + FSAPIRequestContext fsapiRequestContext = Mockito.mock(FSAPIRequestContext.class); + Mockito.doReturn(false).when(fsapiRequestContext).isError(); + Mockito.doReturn(consentID).when(fsapiRequestContext).getConsentId(); + Mockito.doReturn(apiRequestInfoDTOMock).when(fsapiRequestContext).getApiRequestInfo(); + Mockito.doReturn(msgInfoDTOMock).when(fsapiRequestContext).getMsgInfo(); + + consentEnforcementExecutor.postProcessRequest(fsapiRequestContext); + } + +} diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/impl/error/handling/DefaultErrorHandlingExecutorTest.java b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/impl/error/handling/DefaultErrorHandlingExecutorTest.java new file mode 100644 index 00000000..150abfdc --- /dev/null +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/java/org/wso2/financial/services/accelerator/gateway/executor/impl/error/handling/DefaultErrorHandlingExecutorTest.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). + *

+ * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.financial.services.accelerator.gateway.executor.impl.error.handling; + +import org.mockito.Mockito; +import org.testng.annotations.Test; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIRequestContext; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSAPIResponseContext; +import org.wso2.financial.services.accelerator.gateway.executor.model.FSExecutorError; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +/** + * Test class for OBDefaultErrorHandler. + */ +public class DefaultErrorHandlingExecutorTest { + + Map contextProps = new HashMap<>(); + + @Test + public void testPreRequestFlow() { + + FSAPIRequestContext fsapiRequestContext = Mockito.mock(FSAPIRequestContext.class); + Mockito.when(fsapiRequestContext.isError()).thenReturn(true); + Mockito.when(fsapiRequestContext.getErrors()).thenReturn(getErrorList()); + Mockito.when(fsapiRequestContext.getContextProps()).thenReturn(contextProps); + + DefaultErrorHandlingExecutor errorHandlingExecutor = Mockito.spy(DefaultErrorHandlingExecutor.class); + errorHandlingExecutor.preProcessRequest(fsapiRequestContext); + verify(fsapiRequestContext, times(0)).setError(false); + } + + @Test + public void testPostRequestFlow() { + + FSAPIRequestContext fsapiRequestContext = Mockito.mock(FSAPIRequestContext.class); + Mockito.when(fsapiRequestContext.isError()).thenReturn(true); + Mockito.when(fsapiRequestContext.getErrors()).thenReturn(getErrorList()); + Mockito.when(fsapiRequestContext.getContextProps()).thenReturn(contextProps); + + DefaultErrorHandlingExecutor errorHandlingExecutor = Mockito.spy(DefaultErrorHandlingExecutor.class); + errorHandlingExecutor.postProcessRequest(fsapiRequestContext); + verify(fsapiRequestContext, times(0)).setError(false); + } + + @Test + public void testPreResponseFlow() { + + FSAPIResponseContext fsapiResponseContext = Mockito.mock(FSAPIResponseContext.class); + Mockito.when(fsapiResponseContext.isError()).thenReturn(true); + Mockito.when(fsapiResponseContext.getErrors()).thenReturn(getErrorList()); + Mockito.when(fsapiResponseContext.getContextProps()).thenReturn(contextProps); + + DefaultErrorHandlingExecutor errorHandlingExecutor = Mockito.spy(DefaultErrorHandlingExecutor.class); + errorHandlingExecutor.preProcessResponse(fsapiResponseContext); + verify(fsapiResponseContext, times(0)).setError(false); + } + + @Test + public void testPostResponseFlow() { + + FSAPIResponseContext fsapiResponseContext = Mockito.mock(FSAPIResponseContext.class); + Mockito.when(fsapiResponseContext.isError()).thenReturn(true); + Mockito.when(fsapiResponseContext.getErrors()).thenReturn(getErrorList()); + Mockito.when(fsapiResponseContext.getContextProps()).thenReturn(contextProps); + + DefaultErrorHandlingExecutor errorHandlingExecutor = Mockito.spy(DefaultErrorHandlingExecutor.class); + errorHandlingExecutor.postProcessResponse(fsapiResponseContext); + verify(fsapiResponseContext, times(0)).setError(false); + } + + private ArrayList getErrorList() { + + FSExecutorError error = new FSExecutorError("400", "Invalid Request", + "Mandatory parameter is missing", "400"); + + ArrayList errors = new ArrayList<>(); + errors.add(error); + return errors; + } +} diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/test-validation-response.json b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/test-validation-response.json new file mode 100644 index 00000000..a0ba4412 --- /dev/null +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/test-validation-response.json @@ -0,0 +1,12 @@ +{ + "isValid": true, + "errorCode": "", + "errorMessage": "", + "httpCode": "", + "modifiedPayload": { + "key": "value" + }, + "consentInformation": { + "key": "value" + } +} diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/testng.xml b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/testng.xml index 8e4cd5f5..b5603e04 100644 --- a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/testng.xml +++ b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/testng.xml @@ -22,6 +22,8 @@ + + diff --git a/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/wso2carbon.jks b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/wso2carbon.jks new file mode 100644 index 00000000..c8775783 Binary files /dev/null and b/financial-services-accelerator/components/org.wso2.financial.services.accelerator.gateway/src/test/resources/wso2carbon.jks differ diff --git a/pom.xml b/pom.xml index 7a9cc35d..07ea9463 100644 --- a/pom.xml +++ b/pom.xml @@ -454,9 +454,14 @@ ${oltu.version} - io.swagger.parser.v3 + org.wso2.orbit.io.swagger.v3 swagger-parser - ${swagger.parser.version} + ${swagger.parser.v3.version} + + + io.jsonwebtoken + jjwt + ${jjwt.version} org.quartz-scheduler @@ -623,16 +628,17 @@ 1.2.5 9.0.11 2.0.1.Final - 2.0.24 2.3.2 + 2.1.22.wso2v1 + 0.9.1 7.0.75 [7.0.75, 8.0.0) 7.0.26 [6.13.0, 7.0.62) 2.5.10 - 9.29.120 - [9.29.120, 9.29.121) + 9.30.10 + [9.29.120, 9.30.100) 0.8.6 5.3.1 @@ -643,6 +649,7 @@ [1.7.0, 4.0.0) [1.2.0, 4.0.0) + [4.9.26, 4.9.28) [2.6.0, 3.0.0) [2.9,3) [4.4.0, 5.0.0) @@ -650,5 +657,6 @@ [7.9.0, 10.0) [2.15.1, 2.16.0) [3.0.0, 4.0.0) + [0.9.1, 0.9.2)