/** * AUTO_GENERATED */ public GetFundingPlansResponse GetFundingPlans(GetFundingPlansRequest getFundingPlansRequest, string apiUserName) { string response = Call("GetFundingPlans", getFundingPlansRequest.ToNVPString(""), apiUserName); NVPUtil util = new NVPUtil(); return(GetFundingPlansResponse.CreateInstance(util.ParseNVPString(response), "", -1)); }
/// <summary> /// /// </summary> ///<param name="getFundingPlansRequest"></param> ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> public GetFundingPlansResponse GetFundingPlans(GetFundingPlansRequest getFundingPlansRequest, ICredential credential) { IAPICallPreHandler apiCallPreHandler = new PlatformAPICallPreHandler(this.config, getFundingPlansRequest.ToNVPString(string.Empty), ServiceName, "GetFundingPlans", credential); ((PlatformAPICallPreHandler)apiCallPreHandler).SDKName = SDKName; ((PlatformAPICallPreHandler)apiCallPreHandler).SDKVersion = SDKVersion; ((PlatformAPICallPreHandler)apiCallPreHandler).PortName = "AdaptivePayments"; NVPUtil util = new NVPUtil(); return(GetFundingPlansResponse.CreateInstance(util.ParseNVPString(Call(apiCallPreHandler)), string.Empty, -1)); }
/// <summary> /// Handle GetFundingPlans API call /// </summary> /// <param name="context"></param> private void GetFundingPlans(HttpContext context) { NameValueCollection parameters = context.Request.Params; GetFundingPlansRequest req = new GetFundingPlansRequest(new RequestEnvelope("en_US"), parameters["payKey"]); // All set. Fire the request AdaptivePaymentsService service = new AdaptivePaymentsService(); GetFundingPlansResponse resp = null; try { resp = service.GetFundingPlans(req); } catch (System.Exception e) { context.Response.Write(e.Message); return; } // Display response values. Dictionary<string, string> keyResponseParams = new Dictionary<string, string>(); string redirectUrl = null; if (!(resp.responseEnvelope.ack == AckCode.FAILURE) && !(resp.responseEnvelope.ack == AckCode.FAILUREWITHWARNING)) { int idx = 1; foreach (FundingPlan plan in resp.fundingPlan) { keyResponseParams.Add("Funding plan Id " + idx, plan.fundingPlanId); keyResponseParams.Add("Funding plan amount " + idx, plan.fundingAmount.amount + plan.fundingAmount.code ); idx++; } } displayResponse(context, "GetFundingPlans", keyResponseParams, service.getLastRequest(), service.getLastResponse(), resp.error, redirectUrl); }