Esempio n. 1
0
        /**
         * AUTO_GENERATED
         */
        public CreateInvoiceResponse CreateInvoice(CreateInvoiceRequest createInvoiceRequest, string apiUserName)
        {
            string  response = Call("CreateInvoice", createInvoiceRequest.ToNVPString(""), apiUserName);
            NVPUtil util     = new NVPUtil();

            return(CreateInvoiceResponse.CreateInstance(util.ParseNVPString(response), "", -1));
        }
Esempio n. 2
0
        public void createInvoiceResponseConstruction()
        {
            CreateInvoiceResponse cir = CreateInvoiceResponse.CreateInstance(validCreateInvoiceResponse, "", -1);

            Assert.AreEqual("INV2-PCWG-P78G-7EYV-94QY", cir.invoiceID);
            Assert.AreEqual("0056", cir.invoiceNumber);
            Assert.AreEqual(AckCode.SUCCESS, cir.responseEnvelope.ack);
            Assert.AreEqual("1917403", cir.responseEnvelope.build);
            Assert.AreEqual("9b3bb0a44d852", cir.responseEnvelope.correlationId);
            Assert.AreEqual("2011-05-30T03:31:18.988-07:00", cir.responseEnvelope.timestamp);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        ///<param name="createInvoiceRequest"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param>
        public CreateInvoiceResponse CreateInvoice(CreateInvoiceRequest createInvoiceRequest, ICredential credential)
        {
            IAPICallPreHandler apiCallPreHandler = new PlatformAPICallPreHandler(this.config, createInvoiceRequest.ToNVPString(string.Empty), ServiceName, "CreateInvoice", credential);

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

            NVPUtil util = new NVPUtil();

            return(CreateInvoiceResponse.CreateInstance(util.ParseNVPString(Call(apiCallPreHandler)), string.Empty, -1));
        }