tangocard.sdk.request
Class PurchaseCardRequest
java.lang.Object
tangocard.sdk.request.BaseRequest
tangocard.sdk.request.PurchaseCardRequest
public class PurchaseCardRequest
- extends BaseRequest
Constructor Summary |
PurchaseCardRequest(TangoCardServiceApiEnum enumTangoCardServiceApi,
java.lang.String username,
java.lang.String password,
java.lang.String cardSku,
int cardValue,
boolean tcSend,
java.lang.String recipientName,
java.lang.String recipientEmail,
java.lang.String giftMessage,
java.lang.String giftFrom,
java.lang.String companyIdentifier)
Instantiates a new purchase card request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_cardSku
public java.lang.String _cardSku
_cardValue
public int _cardValue
_tcSend
public boolean _tcSend
_recipientName
public java.lang.String _recipientName
_recipientEmail
public java.lang.String _recipientEmail
_giftMessage
public java.lang.String _giftMessage
_giftFrom
public java.lang.String _giftFrom
_companyIdentifier
public java.lang.String _companyIdentifier
PurchaseCardRequest
public PurchaseCardRequest(TangoCardServiceApiEnum enumTangoCardServiceApi,
java.lang.String username,
java.lang.String password,
java.lang.String cardSku,
int cardValue,
boolean tcSend,
java.lang.String recipientName,
java.lang.String recipientEmail,
java.lang.String giftMessage,
java.lang.String giftFrom,
java.lang.String companyIdentifier)
- Instantiates a new purchase card request.
- Parameters:
enumTangoCardServiceApi
- The enum Tango Card service apiusername
- The username to access User's registered Tango Card accountpassword
- The password to access User's registered Tango Card accountcardSku
- The card skucardValue
- The card valuetcSend
- Determines if Tango Card Service will send an email with gift card information to recipientrecipientName
- The recipient namerecipientEmail
- The recipient emailgiftMessage
- The gift messagegiftFrom
- The gift fromcompanyIdentifier
- The Company identifier for which Email Template when sending Gift Card.
execute
public boolean execute(PurchaseCardResponse response)
throws java.lang.Exception
- Execute.
- Parameters:
response
- the response
- Returns:
- true, if successful
- Throws:
java.lang.Exception
- the exception
getJsonEncodedRequest
public java.lang.String getJsonEncodedRequest()
throws TangoCardSdkException
- Description copied from class:
BaseRequest
- Gets the JSON encoded request.
- Specified by:
getJsonEncodedRequest
in class BaseRequest
- Returns:
- the JSON encoded request
- Throws:
TangoCardSdkException
getRequestAction
public java.lang.String getRequestAction()
- Description copied from class:
BaseRequest
- Gets the request action.
- Specified by:
getRequestAction
in class BaseRequest
- Returns:
- the request action