public class CreditCard extends PayPalResource
| Constructor and Description |
|---|
CreditCard()
Default Constructor
|
CreditCard(String number,
String type,
int expireMonth,
int expireYear)
Parameterized Constructor
|
| Modifier and Type | Method and Description |
|---|---|
CreditCard |
create(APIContext apiContext)
Creates a new Credit Card Resource (aka Tokenize).
|
CreditCard |
create(String accessToken)
Creates a new Credit Card Resource (aka Tokenize).
|
void |
delete(APIContext apiContext)
Delete the Credit Card resource for the given identifier.
|
void |
delete(String accessToken)
Delete the Credit Card resource for the given identifier.
|
static CreditCard |
get(APIContext apiContext,
String creditCardId)
Obtain the Credit Card resource for the given identifier.
|
static CreditCard |
get(String accessToken,
String creditCardId)
Obtain the Credit Card resource for the given identifier.
|
Address |
getBillingAddress()
Getter for billingAddress
|
int |
getCvv2()
Getter for cvv2
Returns -1 if
cvv2 is null |
int |
getExpireMonth()
Getter for expireMonth
|
int |
getExpireYear()
Getter for expireYear
|
String |
getExternalCustomerId()
Getter for externalCustomerId
|
String |
getFirstName()
Getter for firstName
|
String |
getId()
Getter for id
|
String |
getLastName()
Getter for lastName
|
List<Links> |
getLinks()
Getter for links
|
String |
getNumber()
Getter for number
|
String |
getpayerId()
Getter for payer ID
|
String |
getState()
Getter for state
|
String |
getType()
Getter for type
|
String |
getValidUntil()
Getter for validUntil
|
static CreditCardHistory |
list(APIContext apiContext,
Map<String,String> containerMap)
Retrieves a list of Credit Card resources.
|
static CreditCardHistory |
list(String accessToken)
Retrieves a list of Credit Card resources.
|
static CreditCardHistory |
list(String accessToken,
Map<String,String> containerMap)
Retrieves a list of Credit Card resources.
|
CreditCard |
setBillingAddress(Address billingAddress)
Setter for billingAddress
|
CreditCard |
setCvv2(Integer cvv2)
Setter for cvv2
|
CreditCard |
setExpireMonth(int expireMonth)
Setter for expireMonth
|
CreditCard |
setExpireYear(int expireYear)
Setter for expireYear
|
CreditCard |
setExternalCustomerId(String externalCustomerId)
Setter for externalCustomerId
|
CreditCard |
setFirstName(String firstName)
Setter for firstName
|
CreditCard |
setId(String id)
Setter for id
|
CreditCard |
setLastName(String lastName)
Setter for lastName
|
CreditCard |
setLinks(List<Links> links)
Setter for links
|
CreditCard |
setNumber(String number)
Setter for number
|
CreditCard |
setPayerId(String payerId)
Setter for payer ID
|
CreditCard |
setState(String state)
Setter for state
|
CreditCard |
setType(String type)
Setter for type
|
CreditCard |
setValidUntil(String validUntil)
Setter for validUntil
|
CreditCard |
update(APIContext apiContext,
List<Patch> patchRequest)
Update information in a previously saved card.
|
CreditCard |
update(String accessToken,
List<Patch> patchRequest)
Update information in a previously saved card.
|
configureAndExecute, configureAndExecute, configureAndExecute, createAPICallPreHandler, getClientID, getClientSecret, getConfigurations, getLastRequest, getLastResponse, getOAuthTokenCredential, initConfig, initConfig, initConfig, initializeToDefaultequals, hashCode, toJSON, toStringpublic CreditCard setId(String id)
public String getId()
public CreditCard setNumber(String number)
public String getNumber()
public CreditCard setType(String type)
public String getType()
public CreditCard setExpireMonth(int expireMonth)
public int getExpireMonth()
public CreditCard setExpireYear(int expireYear)
public int getExpireYear()
public CreditCard setCvv2(Integer cvv2)
public int getCvv2()
cvv2 is nullpublic CreditCard setFirstName(String firstName)
public String getFirstName()
public CreditCard setLastName(String lastName)
public String getLastName()
public CreditCard setBillingAddress(Address billingAddress)
public Address getBillingAddress()
public CreditCard setExternalCustomerId(String externalCustomerId)
public String getExternalCustomerId()
public CreditCard setState(String state)
public String getState()
public CreditCard setValidUntil(String validUntil)
public String getValidUntil()
public CreditCard setLinks(List<Links> links)
public CreditCard setPayerId(String payerId)
public String getpayerId()
public CreditCard create(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic CreditCard create(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic static CreditCard get(String accessToken, String creditCardId) throws PayPalRESTException
accessToken - Access Token used for the API call.creditCardId - StringPayPalRESTExceptionpublic static CreditCard get(APIContext apiContext, String creditCardId) throws PayPalRESTException
apiContext - APIContext used for the API call.creditCardId - StringPayPalRESTExceptionpublic void delete(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic void delete(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic CreditCard update(String accessToken, List<Patch> patchRequest) throws PayPalRESTException
accessToken - Access Token used for the API call.patchRequest - ListPayPalRESTExceptionpublic CreditCard update(APIContext apiContext, List<Patch> patchRequest) throws PayPalRESTException
apiContext - APIContext used for the API call.patchRequest - ListPayPalRESTExceptionpublic static CreditCardHistory list(String accessToken, Map<String,String> containerMap) throws PayPalRESTException
accessToken - Access Token used for the API call.containerMap - MapPayPalRESTExceptionpublic static CreditCardHistory list(APIContext apiContext, Map<String,String> containerMap) throws PayPalRESTException
apiContext - APIContext used for the API call.containerMap - MapPayPalRESTExceptionpublic static CreditCardHistory list(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.containerMap - MapPayPalRESTExceptionCopyright © 2015. All Rights Reserved.