private Authorization GetAuthorization()
 {
     Authorization authorize = new Authorization();
     authorize.amount = GetAmount();
     authorize.create_time = "2013-01-15T15:10:05.123Z";
     authorize.id = "007";
     authorize.parent_payment = "1000";
     authorize.state = "Authorized";
     authorize.links = GetLinksList();
     return authorize;
 }
        private string GetCaptureId(string accessToken, Authorization authorization)
        {
            // ###Amount
            // Let's you specify a capture amount.
            Amount amnt = new Amount();
            amnt.currency = "USD";
            amnt.total = "4.54";

            Capture capture = new Capture();
            capture.amount = amnt;

            // ##IsFinalCapture
            // If set to true, all remaining
            // funds held by the authorization
            // will be released in the funding
            // instrument. Default is ‘false’.
            capture.is_final_capture = true;

            // Capture by POSTing to
            // URI v1/payments/authorization/{authorization_id}/capture
            Capture responseCapture = authorization.Capture(accessToken, capture);

            return responseCapture.id;
        }
        public static Capture GetCapture(APIContext apiContext, Authorization authorization)
        {
            // ###Amount
            // Let's you specify a capture amount.
            Amount amnt = new Amount();
            amnt.currency = "USD";
            amnt.total = "1.00";

            Capture capture = new Capture();
            capture.amount = amnt;

            // ##IsFinalCapture
            // If set to true, all remaining 
            // funds held by the authorization 
            // will be released in the funding 
            // instrument. Default is ‘false’.
            capture.is_final_capture = true;

            // Capture by POSTing to
            // URI v1/payments/authorization/{authorization_id}/capture
            Capture responseCapture = authorization.Capture(apiContext, capture);

            return responseCapture;
        }
 public void AuthorizationConstructorTest()
 {
     Authorization target = new Authorization();
     Assert.IsNotNull(target);
 }