ToNVPString() public method

public ToNVPString ( string prefix ) : string
prefix string
return string
Esempio n. 1
0
        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(""));
        }
Esempio n. 2
0
 /**
   *AUTO_GENERATED
  	  */
 public SendInvoiceResponse SendInvoice(SendInvoiceRequest sendInvoiceRequest, string apiUserName)
 {
     string response = Call("SendInvoice", sendInvoiceRequest.ToNVPString(""), apiUserName);
     NVPUtil util = new NVPUtil();
     return SendInvoiceResponse.CreateInstance(util.ParseNVPString(response), "", -1);
 }
        /// <summary>
        /// 
        /// </summary>
        ///<param name="sendInvoiceRequest"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> 
        public SendInvoiceResponse SendInvoice(SendInvoiceRequest sendInvoiceRequest, ICredential credential)
        {
            IAPICallPreHandler apiCallPreHandler = new PlatformAPICallPreHandler(this.config, sendInvoiceRequest.ToNVPString(string.Empty), ServiceName, "SendInvoice", credential);
               	 	((PlatformAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
            ((PlatformAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
            ((PlatformAPICallPreHandler) apiCallPreHandler).PortName = "Invoice";

            NVPUtil util = new NVPUtil();
            return SendInvoiceResponse.CreateInstance(util.ParseNVPString(Call(apiCallPreHandler)), string.Empty, -1);
        }
 /**
   *AUTO_GENERATED
  	  */
 public SendInvoiceResponse SendInvoice(SendInvoiceRequest sendInvoiceRequest, string apiUserName)
 {
     IAPICallPreHandler apiCallPreHandler = null;
     apiCallPreHandler = new PlatformAPICallPreHandler(sendInvoiceRequest.ToNVPString(string.Empty), ServiceName, "SendInvoice", apiUserName, getAccessToken(), getAccessTokenSecret());
        	 	((PlatformAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
     ((PlatformAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
     string response = Call(apiCallPreHandler);
     NVPUtil util = new NVPUtil();
     return SendInvoiceResponse.CreateInstance(util.ParseNVPString(response), string.Empty, -1);
 }