tangocard.sdk.request
Class PurchaseCardRequest

java.lang.Object
  extended by tangocard.sdk.request.BaseRequest
      extended by tangocard.sdk.request.PurchaseCardRequest

public class PurchaseCardRequest
extends BaseRequest


Field Summary
 java.lang.String _cardSku
           
 int _cardValue
           
 java.lang.String _companyIdentifier
           
 java.lang.String _giftFrom
           
 java.lang.String _giftMessage
           
 java.lang.String _recipientEmail
           
 java.lang.String _recipientName
           
 boolean _tcSend
           
 
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.
 
Method Summary
 boolean execute(PurchaseCardResponse response)
          Execute.
 java.lang.String getJsonEncodedRequest()
          Gets the JSON encoded request.
 java.lang.String getRequestAction()
          Gets the request action.
 
Methods inherited from class tangocard.sdk.request.BaseRequest
execute, getPassword, getTangoCardServiceApiEnum, getUsername, setPassword, setTangoCardServiceApiEnum, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_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
Constructor Detail

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 api
username - The username to access User's registered Tango Card account
password - The password to access User's registered Tango Card account
cardSku - The card sku
cardValue - The card value
tcSend - Determines if Tango Card Service will send an email with gift card information to recipient
recipientName - The recipient name
recipientEmail - The recipient email
giftMessage - The gift message
giftFrom - The gift from
companyIdentifier - The Company identifier for which Email Template when sending Gift Card.
Method Detail

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