Esempio n. 1
0
 /// <summary>
 /// Get Service Categories for a given payment option ID
 /// </summary>
 /// <param name="paymentOptionId">Payment Option ID</param>
 /// <returns>Response object containing service categories</returns>
 public static PAYNLSDK.API.Service.GetCategories.Response GetCategories(int? paymentOptionId)
 {
     ServiceGetCategories request = new ServiceGetCategories();
     request.PaymentOptionId = paymentOptionId;
     Client c = new Client("", "");
     c.PerformRequest(request);
     return request.Response;
 }
Esempio n. 2
0
        /// <summary>
        /// Get Service Categories for a given payment option ID
        /// </summary>
        /// <param name="paymentOptionId">Payment Option ID, if null return all</param>
        /// <returns>Response object containing service categories</returns>
        public PAYNLSDK.API.Service.GetCategories.Response GetCategories(int?paymentOptionId = null)
        {
            ServiceGetCategories request = new ServiceGetCategories();

            request.PaymentOptionId = paymentOptionId;

            _webClient.PerformRequest(request);
            return(request.Response);
        }
Esempio n. 3
0
        /// <summary>
        /// Get Service Categories for a given payment option ID
        /// </summary>
        /// <param name="paymentOptionId">Payment Option ID</param>
        /// <returns>Response object containing service categories</returns>
        static public PAYNLSDK.API.Service.GetCategories.Response GetCategories(int?paymentOptionId)
        {
            ServiceGetCategories request = new ServiceGetCategories();

            request.PaymentOptionId = paymentOptionId;
            Client c = new Client("", "");

            c.PerformRequest(request);
            return(request.Response);
        }
Esempio n. 4
0
        /// <summary>
        /// Get Service Categories for a given payment option ID
        /// </summary>
        /// <param name="paymentOptionId">Payment Option ID</param>
        /// <returns>Response object containing service categories</returns>
        static public API.Service.GetCategories.Response GetCategories(IClient client, int?paymentOptionId = null)
        {
            var request = new ServiceGetCategories()
            {
                PaymentOptionId = paymentOptionId
            };

            client.PerformRequest(request);

            return(request.Response);
        }
Esempio n. 5
0
        /// <summary>
        /// Get Service Categories for a given payment option ID
        /// </summary>
        /// <param name="paymentOptionId">Payment Option ID</param>
        /// <returns>Response object containing service categories</returns>
        public async Task <API.Service.GetCategories.Response> GetCategoriesAsync(int?paymentOptionId)
        {
            var request = new ServiceGetCategories
            {
                PaymentOptionId = paymentOptionId
            };

            await ClientService.PerformPostRequestAsync(request);

            return(request.Response);
        }
Esempio n. 6
0
        /// <summary>
        /// Get Service Categories for a given payment option ID
        /// </summary>
        /// <param name="paymentOptionId">Payment Option ID</param>
        /// <returns>Response object containing service categories</returns>
        static public PAYNLSDK.API.Service.GetCategories.Response GetCategories(int?paymentOptionId, string apiToken = null, string serviceId = null)
        {
            ServiceGetCategories request = new ServiceGetCategories();

            request.PaymentOptionId = paymentOptionId;
            request.SetApiToken(apiToken);
            request.SetServiceId(serviceId);
            Client c = new Client("", "");

            c.PerformRequest(request);
            return(request.Response);
        }
Esempio n. 7
0
        private void serviceCategoriesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ClearDebug();
                PAYNLSDK.API.Service.GetCategories.Request fixture = new PAYNLSDK.API.Service.GetCategories.Request();
                InitRequestDebug(fixture);
                DumpNvc(fixture.GetParameters());

                MyStaticPayNlClient.Client.PerformRequest(fixture);
                DebugRawResponse(fixture);
                tbMain.Text = fixture.Response.ToString();
            }
            catch (PayNlException ee)
            {
                AddDebug("~~EXCEPTION~~");
                AddDebug(ee.Message);
            }
        }
Esempio n. 8
0
        private async void ServiceCategoriesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ClearDebug();
                var fixture = new PAYNLSDK.API.Service.GetCategories.Request();
                InitRequestDebug(fixture);
                DumpNvc(fixture.GetParameters());

                await ClientService.PerformPostRequestAsync(fixture);

                DebugRawResponse(fixture);
                tbMain.Text = fixture.Response.ToString();
            }
            catch (ErrorException ee)
            {
                AddDebug("~~EXCEPTION~~");
                AddDebug(ee.Message);
            }
        }
Esempio n. 9
0
        private void serviceCategoriesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                APISettings.InitAPI();
                ClearDebug();
                PAYNLSDK.API.Service.GetCategories.Request fixture = new PAYNLSDK.API.Service.GetCategories.Request();
                InitRequestDebug(fixture);
                DumpNvc(fixture.GetParameters());

                APISettings.Client.PerformRequest(fixture);
                DebugRawResponse(fixture);
                tbMain.Text = fixture.Response.ToString();
            }
            catch (ErrorException ee)
            {
                AddDebug("~~EXCEPTION~~");
                AddDebug(ee.Message);
            }
        }