Пример #1
0
        /**
         * AUTO_GENERATED
         */
        public MarkInvoiceAsRefundedResponse MarkInvoiceAsRefunded(MarkInvoiceAsRefundedRequest markInvoiceAsRefundedRequest, string apiUserName)
        {
            string  response = Call("MarkInvoiceAsRefunded", markInvoiceAsRefundedRequest.ToNVPString(""), apiUserName);
            NVPUtil util     = new NVPUtil();

            return(MarkInvoiceAsRefundedResponse.CreateInstance(util.ParseNVPString(response), "", -1));
        }
Пример #2
0
        /**
         *
         */
        public MarkInvoiceAsRefundedResponse MarkInvoiceAsRefunded(MarkInvoiceAsRefundedRequest MarkInvoiceAsRefundedRequest, string apiUsername)
        {
            string resp = call("MarkInvoiceAsRefunded", MarkInvoiceAsRefundedRequest.toNVPString(""), apiUsername);

            NVPUtil util = new NVPUtil();

            return(new MarkInvoiceAsRefundedResponse(util.parseNVPString(resp), ""));
        }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        ///<param name="markInvoiceAsRefundedRequest"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param>
        public MarkInvoiceAsRefundedResponse MarkInvoiceAsRefunded(MarkInvoiceAsRefundedRequest markInvoiceAsRefundedRequest, ICredential credential)
        {
            IAPICallPreHandler apiCallPreHandler = new PlatformAPICallPreHandler(this.config, markInvoiceAsRefundedRequest.ToNVPString(string.Empty), ServiceName, "MarkInvoiceAsRefunded", credential);

            ((PlatformAPICallPreHandler)apiCallPreHandler).SDKName    = SDKName;
            ((PlatformAPICallPreHandler)apiCallPreHandler).SDKVersion = SDKVersion;
            ((PlatformAPICallPreHandler)apiCallPreHandler).PortName   = "Invoice";

            NVPUtil util = new NVPUtil();

            return(MarkInvoiceAsRefundedResponse.CreateInstance(util.ParseNVPString(Call(apiCallPreHandler)), string.Empty, -1));
        }
Пример #4
0
        /// <summary>
        /// API call example for MarkInvoiceAsRefunded
        /// </summary>
        /// <param name="context"></param>
        private void MarkInvoiceAsRefunded(HttpContext context)
        {
            // Collect input params
            String invoiceId  = context.Request.Params["invoiceId"];
            String refundNote = context.Request.Params["refundNote"];
            String refundDate = context.Request.Params["refundDate"];

            OtherPaymentRefundDetailsType refundDetails = new OtherPaymentRefundDetailsType();

            if (refundNote != "")
            {
                refundDetails.note = refundNote;
            }
            if (refundDate != "")
            {
                refundDetails.date = refundDate;
            }

            MarkInvoiceAsRefundedRequest request =
                new MarkInvoiceAsRefundedRequest(new RequestEnvelope(ERROR_LANGUAGE), invoiceId, refundDetails);

            // Create service object and make the API call
            InvoiceService service;
            MarkInvoiceAsRefundedResponse response;

            try
            {
                service  = getService(context);
                response = service.MarkInvoiceAsRefunded(request);
            }
            catch (Exception e)
            {
                context.Response.Write(e.Message);
                return;
            }

            // Display response values.
            Dictionary <string, string> keyResponseParams = new Dictionary <string, string>();

            keyResponseParams.Add("API status", response.responseEnvelope.ack.ToString());
            keyResponseParams.Add("correlationId", response.responseEnvelope.correlationId);
            keyResponseParams.Add("invoiceId", response.invoiceID);
            keyResponseParams.Add("invoiceNumber", response.invoiceNumber);
            keyResponseParams.Add("invoiceUrl", response.invoiceURL);
            displayResponse(context, "MarkInvoiceAsRefunded", keyResponseParams, service.getLastRequest(),
                            service.getLastResponse(), response.error, null);
        }
Пример #5
0
        /// <summary>
        ///
        /// </summary>
        ///<param name="markInvoiceAsRefundedRequest"></param>

        public MarkInvoiceAsRefundedResponse MarkInvoiceAsRefunded(MarkInvoiceAsRefundedRequest markInvoiceAsRefundedRequest)
        {
            return(MarkInvoiceAsRefunded(markInvoiceAsRefundedRequest, (string)null));
        }
Пример #6
0
 public MarkInvoiceAsRefundedResponse MarkInvoiceAsRefunded(MarkInvoiceAsRefundedRequest MarkInvoiceAsRefundedRequest)
 {
     return(MarkInvoiceAsRefunded(MarkInvoiceAsRefundedRequest, null));
 }