An authorization transaction.

See PayPal Developer documentation for more information.

Inheritance: PayPalRelationalObject
Beispiel #1
0
        /// <summary>
        /// Reauthorizes an expired Authorization.
        /// </summary>
        /// <param name="apiContext">APIContext used for the API call.</param>
        /// <param name="authorization">The Authorization object containing the details of the authorization that should be reauthorized.</param>
        /// <returns>Authorization</returns>
        public static Authorization Reauthorize(APIContext apiContext, Authorization authorization)
        {
            // Validate the arguments to be used in the request
            ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
            ArgumentValidator.Validate(authorization, "authorization");

            // Configure and send the request
            var pattern = "v1/payments/authorization/{0}/reauthorize";
            var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { authorization.id });
            return PayPalResource.ConfigureAndExecute<Authorization>(apiContext, HttpMethod.POST, resourcePath, authorization.ConvertToJson());
        }
 /// <summary>
 /// Voids (cancels) an Authorization.
 /// </summary>
 /// <param name="apiContext">APIContext used for the API call.</param>
 /// <returns>Authorization</returns>
 public Authorization Void(APIContext apiContext)
 {
     return(Authorization.Void(apiContext, this.id));
 }
 /// <summary>
 /// Reauthorizes an expired Authorization.
 /// </summary>
 /// <param name="apiContext">APIContext used for the API call.</param>
 /// <returns>Authorization</returns>
 public Authorization Reauthorize(APIContext apiContext)
 {
     return(Authorization.Reauthorize(apiContext, this));
 }
 /// <summary>
 /// Creates (and processes) a new Capture Transaction added as a related resource.
 /// </summary>
 /// <param name="apiContext">APIContext used for the API call.</param>
 /// <param name="capture">Capture</param>
 /// <returns>Capture</returns>
 public Capture Capture(APIContext apiContext, Capture capture)
 {
     return(Authorization.Capture(apiContext, this.id, capture));
 }