ProcuretAPI 0.0.6
dotnet add package ProcuretAPI --version 0.0.6
NuGet\Install-Package ProcuretAPI -Version 0.0.6
<PackageReference Include="ProcuretAPI" Version="0.0.6" />
<PackageVersion Include="ProcuretAPI" Version="0.0.6" />
<PackageReference Include="ProcuretAPI" />
paket add ProcuretAPI --version 0.0.6
#r "nuget: ProcuretAPI, 0.0.6"
#:package ProcuretAPI@0.0.6
#addin nuget:?package=ProcuretAPI&version=0.0.6
#tool nuget:?package=ProcuretAPI&version=0.0.6
Procuret .NET
A Microsoft .NET Standard library for interfacing with the Procuret API.
Contents
- .NET API Compatibility
- Installation
- Documentation
- Support
.NET API Compatibility
Procuret .NET targets .NET 8.0. If you require comptatiblity with an earlier .NET release, please contact us.
Installation
Procuret .NET is available as a Nuget package.
dotnet add package ProcuretAPI
See Microsoft's documentation for more information about installing Nuget packages in Visual Studios on Windows and macOS.
If you require assistance installing Procuret .NET in your development environment, please contact us.
Documentation
Procuret .NET offers a library of classes that map to services provided by the Procuret API.
Session
Sessions are the means of authenticating requests to the Procuret API. All requests to Procuret API, save for those creating Sessions themselves, require a Session.
In Procuret .NET, the Session
class will handle all authentication for you.
For example, it will compute the SHA256 signature that must be included
in your HTTP headers.
Initialiser
Parameters
String
apiKeyulong
sessionId
Example Initialisation
Session session = Session(
apiKey: "your_api_key",
sessionId: 441121225 // Your Session ID
)
struct InstalmentLink
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.
To create a new InstalmentLink
, call InstalmentLink.Create()
. .Create()
operates asynchronously, so use the await
keyword to initalise the link
into a variable.
Properties
String
PublicId - unique ID of thisInstalmentLink
EntityHeadline
Supplier - the Supplier to which the link appliesDecimal
InvoiceAmount - the amount the link attempts to transactString
InvoiceIdentifier - the identifier of the invoiceString
InviteeEmail - the email address associated with the linkCurrency
Denomination - the currency in which the link is denominated
Methods
static async Task<InstalmentLink>.Create(...)
Parameters
long
supplierId - Your unique Supplier IDString
customerEmail - The email of the customer to whom a Procuret payment invitation email should be sent.String
invoiceIdentifier - Your invoice identifier. E.g."INV-001"
Decimal
invoiceValue - The amount payable by the customerCommunicationOption
communication - Instance ofCommunicationOption
enumerationSession
session - TheSession
to use when authenticating your requestCurrency
denomination - The currency in which the link should be denominated
Example Usage
var link = 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
denomination: Currency.Aud
)
struct ProspectivePayment
A ProspectivePayment
represents the amount of money that a customer may
pay, per payment period, should they use the Procuret Instalment Product to pay
for their purchase.
In other words, you can use ProspectivePayment
to give customers a preview
of the cost of using Procuret. Retrieve a ProspectivePayment
for any
number of periods. At this time, Procuret .NET only supports monthly payments.
Properties
Decimal
RecurringPayment - The amount the customer will pay per periodlong
SupplierId - The ID of the Supplier to which thise price appliesInt16
PaymentCount - The number of payments the customer would makePeriod
Period - The length of the payment period (always.MONTH
)Cycle
Cycle - The cycle of the payment (always.ADVANCE
)
Methods
static async Task<ProspectivePayment> Retrieve(...)
Use .Retrieve() to look up the price a customer would pay per period using the Procuret Instalment Product.
Parameters
Session
session - An instance ofSession
authenticating your requestlong
supplierId - Your Supplier IDDecimal
principle - The total value of the purchase, including GSTInt16
paymentCount - The number of payments the customer would make
Example Usage
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());
static async Task<ProspectivePayment[]> RetrieveMany(...)
Parameters
Session
session - An instance ofSession
authenticating your requestlong
supplierId - Your Supplier IDDecimal
principle - The total value of the purchase, including GST
Example Usage
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());
}
struct EntityHeadline
A type containing basic data about a legal person.
Properties
long
EntityId - A unique Procuret identifier for the legal person
String
LegalEntityName - The name of the legal person, e.g. "ACME Ltd"
enum CommunicationOption
An enumeration of instructions you can send Procuret in some contexts, to tell it how you wish for it to contact (or not contact) the a customer.
Cases
.EMAIL_CUSTOMER
- Procuret will contact the customer by email.DO_NOT_CONTACT_CUSTOMER
- Procuret will not try to contact the customer
enum Currency
An enumeration of currencies in which Procuret transactions may be denominated.
Cases
.Aud
- Australian dollars.Nzd
- New Zealand dollars
Support
Please contact us anytime at support@procuret.com with any questions. To chat with us less formally, please feel free to tweet @hugh_jeremy.
For more general information about Procuret, please visit procuret.com.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.