com.braintreegateway
Class AddressGateway

java.lang.Object
  extended by com.braintreegateway.AddressGateway

public class AddressGateway
extends Object

Provides methods to create, delete, find, and update Address objects. This class does not need to be instantiated directly. Instead, use BraintreeGateway.address() to get an instance of this class:

 BraintreeGateway gateway = new BraintreeGateway(...);
 gateway.address().create(...)
 


Field Summary
private  Http http
           
 
Constructor Summary
AddressGateway(Http http)
           
 
Method Summary
 Result<Address> create(String customerId, AddressRequest request)
          Creates an Address for a Customer.
 Result<Address> delete(String customerId, String id)
          Deletes a Customer's Address.
 Address find(String customerId, String id)
          Finds a Customer's Address.
 Result<Address> update(String customerId, String id, AddressRequest request)
          Updates a Customer's Address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

http

private Http http
Constructor Detail

AddressGateway

public AddressGateway(Http http)
Method Detail

create

public Result<Address> create(String customerId,
                              AddressRequest request)
Creates an Address for a Customer.

Parameters:
customerId - the id of the Customer.
request - the request object.
Returns:
a Result object.

delete

public Result<Address> delete(String customerId,
                              String id)
Deletes a Customer's Address.

Parameters:
customerId - the id of the Customer.
id - the id of the Address to delete.
Returns:
a Result object.

find

public Address find(String customerId,
                    String id)
Finds a Customer's Address.

Parameters:
customerId - the id of the Customer.
id - the id of the Address.
Returns:
the Address or raises a NotFoundException.

update

public Result<Address> update(String customerId,
                              String id,
                              AddressRequest request)
Updates a Customer's Address.

Parameters:
customerId - the id of the Customer.
id - the id of the Address.
request - the request object containing the AddressRequest parameters.
Returns:
the Address or raises a NotFoundException.


Copyright © 2013. All Rights Reserved.