Create address

Customer objects can have Address objects associated with them for later use when creating a Transaction.

Create address for a Customer

You can create an Address implicity when creating a Transaction, or directly as shown below.

CustomerAddressRequest addressReq = new CustomerAddressRequest()
    .company("Widgets Ltd")
    .firstName("John")
    .lastName("Hancock")
    .addressLine1("some street 123")
    .addressLine2("")
    .city("Zagreb")
    .postalCode("10000")
    .countryIsoCode2("HR");

Address address = gateway.address().create("customer_uid", addressReq);

Result

Address object is returned on success.