/** * */ public SendInvoiceResponse SendInvoice(SendInvoiceRequest SendInvoiceRequest, string apiUsername) { string resp = call("SendInvoice", SendInvoiceRequest.toNVPString(""), apiUsername); NVPUtil util = new NVPUtil(); return(new SendInvoiceResponse(util.parseNVPString(resp), "")); }
public void sendInvoiceRequestSerialization() { SendInvoiceRequest sir = new SendInvoiceRequest(); sir.invoiceID = "INV-123456"; sir.requestEnvelope = new RequestEnvelope("en_US"); string expectedNVPString = "requestEnvelope.errorLanguage=en_US&invoiceID=INV-123456&"; Assert.AreEqual(expectedNVPString, sir.toNVPString("")); sir = new SendInvoiceRequest(new RequestEnvelope("en_US"), "INV-123456"); Assert.AreEqual(expectedNVPString, sir.toNVPString("")); }