Package com.braintreegateway
Class AddressGateway
- java.lang.Object
-
- com.braintreegateway.AddressGateway
-
public class AddressGateway extends Object
Provides methods to create, delete, find, and updateAddressobjects. This class does not need to be instantiated directly. Instead, useBraintreeGateway.address()to get an instance of this class:BraintreeGateway gateway = new BraintreeGateway(...); gateway.address().create(...)
-
-
Field Summary
Fields Modifier and Type Field Description private Configurationconfigurationprivate Httphttp
-
Constructor Summary
Constructors Constructor Description AddressGateway(Http http, Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Result<Address>create(String customerId, AddressRequest request)Result<Address>delete(String customerId, String id)Deletes a Customer'sAddress.Addressfind(String customerId, String id)Finds a Customer'sAddress.Result<Address>update(String customerId, String id, AddressRequest request)Updates a Customer'sAddress.
-
-
-
Field Detail
-
http
private Http http
-
configuration
private Configuration configuration
-
-
Constructor Detail
-
AddressGateway
public AddressGateway(Http http, Configuration configuration)
-
-
Method Detail
-
create
public Result<Address> create(String customerId, AddressRequest request)
-
find
public Address find(String customerId, String id)
Finds a Customer'sAddress.- Parameters:
customerId- the id of theCustomer.id- the id of theAddress.- Returns:
- the
Addressor raises aNotFoundException.
-
update
public Result<Address> update(String customerId, String id, AddressRequest request)
Updates a Customer'sAddress.- Parameters:
customerId- the id of theCustomer.id- the id of theAddress.request- the request object containing theAddressRequestparameters.- Returns:
- the
Addressor raises aNotFoundException.
-
-