Skip to content

Procuret .NET 0.0.5

Latest
Compare
Choose a tag to compare
@hwjeremy hwjeremy released this 22 Jan 01:47
· 1 commit to master since this release

Screen Shot 2021-01-22 at 12 43 10 pm

Procuret .NET 0.0.5 is now [available via Nuget](https://www.nuget.org/packages/ProcuretAPI).

0.0.5's primary new feature is ProspectivePayment.RetrieveMany(). You can use .RetrieveMany()
to retrieve an array of recurring payments available to your customers, for a given transaction
value.

For example, a value of $2,000 might return options to pay for 6 months at $349.70 / months,
and 12 months at $184.01 per month.

ProspectivePayment.RetrieveMany() takes the following arguments:

  1. Session session - An instance of Session authenticating your request
  2. String supplierId - Your Supplier ID
  3. Decimal principle - The total value of the purchase, including GST

Here's an example of how to use it:

var payments = await ProspectivePayment.RetrieveMany(
    session: session,                      // See Session example elswhere
    supplierId: "589121125121",
    principle: Convert.ToDecimal("4200")   // Includes GST
);

foreach (ProspectivePayment payment in payments)
{
    Console.WriteLine(payment.RecurringPayment.ToString());
}

You will also find a new InstalmentLink.RetrieveMany() method. In its current state,
it is not terribly useful. However, it can be used to retrieve lists of InstalmentLink
that you have created.