/** * AUTO_GENERATED */ public CreateAndSendInvoiceResponse CreateAndSendInvoice(CreateAndSendInvoiceRequest createAndSendInvoiceRequest, string apiUserName) { string response = Call("CreateAndSendInvoice", createAndSendInvoiceRequest.ToNVPString(""), apiUserName); NVPUtil util = new NVPUtil(); return(CreateAndSendInvoiceResponse.CreateInstance(util.ParseNVPString(response), "", -1)); }
public void createAndSendInvoiceResponseConstruction() { CreateAndSendInvoiceResponse cir = CreateAndSendInvoiceResponse.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); }
/// <summary> /// /// </summary> ///<param name="createAndSendInvoiceRequest"></param> ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> public CreateAndSendInvoiceResponse CreateAndSendInvoice(CreateAndSendInvoiceRequest createAndSendInvoiceRequest, ICredential credential) { IAPICallPreHandler apiCallPreHandler = new PlatformAPICallPreHandler(this.config, createAndSendInvoiceRequest.ToNVPString(string.Empty), ServiceName, "CreateAndSendInvoice", credential); ((PlatformAPICallPreHandler)apiCallPreHandler).SDKName = SDKName; ((PlatformAPICallPreHandler)apiCallPreHandler).SDKVersion = SDKVersion; ((PlatformAPICallPreHandler)apiCallPreHandler).PortName = "Invoice"; NVPUtil util = new NVPUtil(); return(CreateAndSendInvoiceResponse.CreateInstance(util.ParseNVPString(Call(apiCallPreHandler)), string.Empty, -1)); }