com.paypal.api.payments
Class WebProfile

java.lang.Object
  extended by com.paypal.api.payments.WebProfile

public class WebProfile
extends Object


Constructor Summary
WebProfile()
          Default Constructor
WebProfile(String name)
          Parameterized Constructor
 
Method Summary
 CreateProfileResponse create(APIContext apiContext)
          Create a web experience profile by passing the name of the profile and other profile details in the request JSON to the request URI.
 CreateProfileResponse create(String accessToken)
          Create a web experience profile by passing the name of the profile and other profile details in the request JSON to the request URI.
 void delete(APIContext apiContext)
          Delete an existing web experience profile by passing the profile ID to the request URI.
 void delete(String accessToken)
          Delete an existing web experience profile by passing the profile ID to the request URI.
static WebProfile get(APIContext apiContext, String profileId)
          Retrieve the details of a particular web experience profile by passing the ID of the profile to the request URI.
static WebProfile get(String accessToken, String profileId)
          Retrieve the details of a particular web experience profile by passing the ID of the profile to the request URI.
 FlowConfig getFlowConfig()
          Getter for flowConfig
 String getId()
          Getter for id
 InputFields getInputFields()
          Getter for inputFields
static String getLastRequest()
          Returns the last request sent to the Service
static String getLastResponse()
          Returns the last response returned by the Service
static List<WebProfile> getList(APIContext apiContext)
          Lists all web experience profiles that exist for a merchant (or subject).
static List<WebProfile> getList(String accessToken)
          Lists all web experience profiles that exist for a merchant (or subject).
 String getName()
          Getter for name
 Presentation getPresentation()
          Getter for presentation
static OAuthTokenCredential initConfig(File file)
          Initialize using a File(Properties file)
static OAuthTokenCredential initConfig(InputStream is)
          Initialize using InputStream(of a Properties file)
static OAuthTokenCredential initConfig(Properties properties)
          Initialize using Properties
 void partialUpdate(APIContext apiContext, PatchRequest patchRequest)
          Partially update an existing web experience profile by passing the ID of the profile to the request URI.
 void partialUpdate(String accessToken, PatchRequest patchRequest)
          Partially update an existing web experience profile by passing the ID of the profile to the request URI.
 WebProfile setFlowConfig(FlowConfig flowConfig)
          Setter for flowConfig
 WebProfile setId(String id)
          Setter for id
 WebProfile setInputFields(InputFields inputFields)
          Setter for inputFields
 WebProfile setName(String name)
          Setter for name
 WebProfile setPresentation(Presentation presentation)
          Setter for presentation
 String toJSON()
          Returns a JSON string corresponding to object state
 String toString()
           
 void update(APIContext apiContext)
          Update a web experience profile by passing the ID of the profile to the request URI.
 void update(String accessToken)
          Update a web experience profile by passing the ID of the profile to the request URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebProfile

public WebProfile()
Default Constructor


WebProfile

public WebProfile(String name)
Parameterized Constructor

Method Detail

getLastRequest

public static String getLastRequest()
Returns the last request sent to the Service

Returns:
Last request sent to the server

getLastResponse

public static String getLastResponse()
Returns the last response returned by the Service

Returns:
Last response got from the Service

initConfig

public static OAuthTokenCredential initConfig(InputStream is)
                                       throws PayPalRESTException
Initialize using InputStream(of a Properties file)

Parameters:
is - InputStream
Returns:
OAuthTokenCredential instance using client ID and client secret loaded from configuration.
Throws:
PayPalRESTException

initConfig

public static OAuthTokenCredential initConfig(File file)
                                       throws PayPalRESTException
Initialize using a File(Properties file)

Parameters:
file - File object of a properties entity
Returns:
OAuthTokenCredential instance using client ID and client secret loaded from configuration.
Throws:
PayPalRESTException

initConfig

public static OAuthTokenCredential initConfig(Properties properties)
Initialize using Properties

Parameters:
properties - Properties object
Returns:
OAuthTokenCredential instance using client ID and client secret loaded from configuration.

setId

public WebProfile setId(String id)
Setter for id


getId

public String getId()
Getter for id


setName

public WebProfile setName(String name)
Setter for name


getName

public String getName()
Getter for name


setFlowConfig

public WebProfile setFlowConfig(FlowConfig flowConfig)
Setter for flowConfig


getFlowConfig

public FlowConfig getFlowConfig()
Getter for flowConfig


setInputFields

public WebProfile setInputFields(InputFields inputFields)
Setter for inputFields


getInputFields

public InputFields getInputFields()
Getter for inputFields


setPresentation

public WebProfile setPresentation(Presentation presentation)
Setter for presentation


getPresentation

public Presentation getPresentation()
Getter for presentation


create

public CreateProfileResponse create(String accessToken)
                             throws PayPalRESTException
Create a web experience profile by passing the name of the profile and other profile details in the request JSON to the request URI.

Parameters:
accessToken - Access Token used for the API call.
Returns:
CreateProfileResponse
Throws:
PayPalRESTException

create

public CreateProfileResponse create(APIContext apiContext)
                             throws PayPalRESTException
Create a web experience profile by passing the name of the profile and other profile details in the request JSON to the request URI.

Parameters:
apiContext - APIContext used for the API call.
Returns:
CreateProfileResponse
Throws:
PayPalRESTException

update

public void update(String accessToken)
            throws PayPalRESTException
Update a web experience profile by passing the ID of the profile to the request URI. In addition, pass the profile details in the request JSON. If your request does not include values for all profile detail fields, the previously set values for the omitted fields are removed by this operation.

Parameters:
accessToken - Access Token used for the API call.
Throws:
PayPalRESTException

update

public void update(APIContext apiContext)
            throws PayPalRESTException
Update a web experience profile by passing the ID of the profile to the request URI. In addition, pass the profile details in the request JSON. If your request does not include values for all profile detail fields, the previously set values for the omitted fields are removed by this operation.

Parameters:
apiContext - APIContext used for the API call.
Throws:
PayPalRESTException

partialUpdate

public void partialUpdate(String accessToken,
                          PatchRequest patchRequest)
                   throws PayPalRESTException
Partially update an existing web experience profile by passing the ID of the profile to the request URI. In addition, pass a patch object in the request JSON that specifies the operation to perform, path of the profile location to update, and a new value if needed to complete the operation.

Parameters:
accessToken - Access Token used for the API call.
patchRequest - PatchRequest
Throws:
PayPalRESTException

partialUpdate

public void partialUpdate(APIContext apiContext,
                          PatchRequest patchRequest)
                   throws PayPalRESTException
Partially update an existing web experience profile by passing the ID of the profile to the request URI. In addition, pass a patch object in the request JSON that specifies the operation to perform, path of the profile location to update, and a new value if needed to complete the operation.

Parameters:
apiContext - APIContext used for the API call.
patchRequest - PatchRequest
Throws:
PayPalRESTException

get

public static WebProfile get(String accessToken,
                             String profileId)
                      throws PayPalRESTException
Retrieve the details of a particular web experience profile by passing the ID of the profile to the request URI.

Parameters:
accessToken - Access Token used for the API call.
profileId - String
Returns:
WebProfile
Throws:
PayPalRESTException

get

public static WebProfile get(APIContext apiContext,
                             String profileId)
                      throws PayPalRESTException
Retrieve the details of a particular web experience profile by passing the ID of the profile to the request URI.

Parameters:
apiContext - APIContext used for the API call.
profileId - String
Returns:
WebProfile
Throws:
PayPalRESTException

getList

public static List<WebProfile> getList(String accessToken)
                                throws PayPalRESTException
Lists all web experience profiles that exist for a merchant (or subject).

Parameters:
accessToken - Access Token used for the API call.
Returns:
WebProfileList
Throws:
PayPalRESTException

getList

public static List<WebProfile> getList(APIContext apiContext)
                                throws PayPalRESTException
Lists all web experience profiles that exist for a merchant (or subject).

Parameters:
apiContext - APIContext used for the API call.
Returns:
WebProfileList
Throws:
PayPalRESTException

delete

public void delete(String accessToken)
            throws PayPalRESTException
Delete an existing web experience profile by passing the profile ID to the request URI.

Parameters:
accessToken - Access Token used for the API call.
Throws:
PayPalRESTException

delete

public void delete(APIContext apiContext)
            throws PayPalRESTException
Delete an existing web experience profile by passing the profile ID to the request URI.

Parameters:
apiContext - APIContext used for the API call.
Throws:
PayPalRESTException

toJSON

public String toJSON()
Returns a JSON string corresponding to object state

Returns:
JSON representation

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015. All Rights Reserved.