using PayPal.Api;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace PayPal.Sample
{
publicpartialclass InvoiceGetList : BaseSamplePage
{
protectedoverridevoidRunSample()
{
Api Context
Pass in a APIContext object to authenticate
the call and to send a unique request id
(that ensures idempotency). The SDK generates
a request id if you do not pass one explicitly.
See Configuration.cs to know more about APIContext.
var apiContext = Configuration.GetAPIContext();
// Ignore workflow code segment
// Ignore workflow code segment#region Track Workflowthis.flow.AddNewRequest("Retrieve the list of recent invoices");
#endregion
Retrieve the 10 most recent invoices and include the total_count
var invoices = Invoice.GetAll(apiContext, pageSize: 10, totalCountRequired: true);
Api Context
Pass in a
APIContext
object to authenticate the call and to send a unique request id (that ensures idempotency). The SDK generates a request id if you do not pass one explicitly. See Configuration.cs to know more about APIContext.