Search in sources :

Example 1 with FRCustomerInfoAddress

use of com.forgerock.openbanking.common.model.data.FRCustomerInfoAddress in project openbanking-aspsp by OpenBankingToolkit.

the class FakeDataApiController method generateCustomerInfo.

private void generateCustomerInfo(String userId) {
    DateTime birthdate = DateTime.now().minusYears(19);
    FRCustomerInfoAddress address = FRCustomerInfoAddress.builder().streetAddress(List.of("999", "Letsbe Avenue", "Hull")).country("UK").postalCode("HU11 3FU").addressType(FRAddressTypeCode.RESIDENTIAL).build();
    FRCustomerInfo customerInfo = FRCustomerInfo.builder().address(address).birthdate(birthdate).email("fred.blogs@acme.com").phoneNumber("07123123123").familyName("blogs").givenName("fred").partyId("r9082345kjf").initials("F. R.").title("Mr").userID(userId).build();
    this.customerInfoRepository.save(customerInfo);
}
Also used : FRCustomerInfo(com.forgerock.openbanking.common.model.data.FRCustomerInfo) FRCustomerInfoAddress(com.forgerock.openbanking.common.model.data.FRCustomerInfoAddress) DateTime(org.joda.time.DateTime)

Example 2 with FRCustomerInfoAddress

use of com.forgerock.openbanking.common.model.data.FRCustomerInfoAddress in project openbanking-aspsp by OpenBankingToolkit.

the class FRCustomerInfoConverter method toCustomerInfoAddress.

private static CustomerInfoAddress toCustomerInfoAddress(FRCustomerInfoAddress address) {
    CustomerInfoAddress customerInfoAddress = new CustomerInfoAddress();
    customerInfoAddress.setStreetAddress(address.getStreetAddress());
    customerInfoAddress.setAddressType(AddressTypeCode.fromValue(address.getAddressType().getValue()));
    customerInfoAddress.setCountry(address.getCountry());
    customerInfoAddress.setPostalCode(address.getPostalCode());
    return customerInfoAddress;
}
Also used : FRCustomerInfoAddress(com.forgerock.openbanking.common.model.data.FRCustomerInfoAddress) CustomerInfoAddress(uk.org.openbanking.datamodel.customerinfo.CustomerInfoAddress)

Aggregations

FRCustomerInfoAddress (com.forgerock.openbanking.common.model.data.FRCustomerInfoAddress)2 FRCustomerInfo (com.forgerock.openbanking.common.model.data.FRCustomerInfo)1 DateTime (org.joda.time.DateTime)1 CustomerInfoAddress (uk.org.openbanking.datamodel.customerinfo.CustomerInfoAddress)1