Skip to content

Releases: Procuret/procuret-dotnet

Procuret .NET `0.0.6`

Choose a tag to compare

@hwjeremy hwjeremy released this 10 Apr 23:25

Procuret .NET 0.0.6 makes the following changes:

  • Replaces String supplier IDs with long to better align with Procuret API expectations
  • Adds the Currency type, supplied to InstalmentLink.Create to define the default currency for the payment link
  • Updates to .NET 8
  • [No public interface effect] Replaces XML serialisation with JSON

0.0.6 is not backward compatible with earlier Procuret .NET versions. To update to 0.0.6, you will need to...

  • Replace any String supplier ID values with long equivalents
  • Add the denomination parameter to any invocations of InstalmentLink.Create

Here is an example invocation of InstalmentLink.Create, demonstrating passing a long supplierId and denomination:

var link = await InstalmentLink.Create(
    supplierId: 589121125121,
    customerEmail: "someone@somewhere.com",
    invoiceIdentifier: "INV-001",
    invoiceValue: Convert.ToDecimal("422.22"),
    communciation: CommunicationOption.NotifyCustomer,
    session: session,
    denomination: Currency.Aud
)

Installation

You can install Procuret .NET 0.0.6 via Nuget.

Support

For help, please write to us at support@procuret.com

Procuret .NET 0.0.5

Choose a tag to compare

@hwjeremy hwjeremy released this 22 Jan 01:47

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.

Procuret .NET 0.0.4

Choose a tag to compare

@hwjeremy hwjeremy released this 11 Dec 02:28

Screen Shot 2020-12-11 at 1 22 50 pm

0.0.4 brings the new ProspectivePayment struct. ProspectivePayment allows you to preview the amount that a customer would pay, if they were to use Procuret for a purchase for a given value. You can receive a ProspectivePayment for any number of payment periods (e.g. 12 months, 3 months) that you wish to preview for the customer. We recommend requesting ProspectivePayment values for periods that we discuss with you, so that they match what is presented to customers in the payment portal.

Request a ProspectivePayment like so:

var payment = await ProspectivePayment.Retrieve(
    session: session                       // See Session example elsewhere
    supplierId: "589121125121",
    principle: Convert.ToDecimal("4200"),  // Includes GST
    paymentCount: 12                       // Implies 12 monthly payments
)

Console.WriteLine(payment.RecurringPayment.ToString())

Procuret .NET 0.0.3

Choose a tag to compare

@hwjeremy hwjeremy released this 09 Dec 04:23

Changelog:

  • .NET Standard target bumped to 2.0
  • Added EntityHeadline struct
  • InstalmentLink.Create() now returns Task (was Task<String>)

0.0.3 bumps the .NET Standard target version to 2.0 (.NET Framework 4.6.1+, .NET Core 2.0+). We are conscious of maintaining compatibility with a wide range of .NET code bases, but wish to take advantage of some 2.0 serialisation APIs. If you require compatibility with an earlier .NET version, please contact us.

0.0.2

Choose a tag to compare

@hwjeremy hwjeremy released this 24 Sep 05:21

Welcome to Procuret .NET. This initial release provides the InstalmentLink struct. InstalmentLink facilitates the creation of customised links to the Procuret Instalment Product (PIP). PIP allows a customer Business to pay for a purchase over time, while you the Supplier are paid upfront.

When you create an InstalmentLink, you can ask Procuret to send an email to the customer Business on your behalf.

Methods

static async Task<String>.create(...)

Parameters

  1. Int64 supplierId - Your unique Supplier ID
  2. String customerEmail - The email of the customer to whom a Procuret
    payment invitation email should be sent.
  3. String invoiceIdentifier - Your invoice identifier. E.g. "INV-001"
  4. Decimal invoiceValue - The amount payable by the customer
  5. CommunicationOption communication - Instance of CommunicationOption
    enumeration
  6. Session session - The Session to use when authenticating your request

Example Usage

await InstalmentLink.create(
    supplierId: 589121125121,
    customerEmail: "someone@somewhere.com",
    invoiceIdentifier: "INV-001",
    invoiceValue: Convert.ToDecimal("422.22"),
    communciation: CommunicationOption.NotifyCustomer,
    session: session // See Session create example above
)

At present, InstalmentLink does not return anything useful. The String
returned at task completion contains the raw JSON response from Procuret API.
You can expect a more useful return value in future versions of Procuret .NET.