Skip to content

lfsgroup/FeeWise-csharp-netcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FeeWise - the C# library for the FeeWise Partner API

API for partners

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.122
  • SDK version: 1.0.0
  • Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen

Frameworks supported

  • .NET Core >=1.0
  • .NET Framework >=4.6
  • Mono/Xamarin >=vNext

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

Installation

Generate the DLL using your preferred tool (e.g. dotnet build)

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using FeeWise.Api;
using FeeWise.Client;
using FeeWise.Model;

Usage

To use the API client with a HTTP proxy, setup a System.Net.WebProxy

Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using FeeWise.Api;
using FeeWise.Client;
using FeeWise.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "http://localhost";
            // Configure API key authorization: APIAuth
            config.ApiKey.Add("X-API-KEY", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.ApiKeyPrefix.Add("X-API-KEY", "Bearer");
            // Configure API key authorization: PartnerAuth
            config.ApiKey.Add("X-CHANNEL-PARTNER-ID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.ApiKeyPrefix.Add("X-CHANNEL-PARTNER-ID", "Bearer");

            var apiInstance = new APIKeyApi(config);
            var apiKeyRotation = new ApiKeyRotation(); // ApiKeyRotation |  (optional) 

            try
            {
                // Rotate API Key
                ApiKeyResponse result = apiInstance.RotateApiKey(apiKeyRotation);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling APIKeyApi.RotateApiKey: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
APIKeyApi RotateApiKey POST /api/v3/partner/rotatekey Rotate API Key
AccountsApi CreateFirmBankAccount POST /api/v3/partner/firms/{firm_id}/accounts Create an account
BankAccountApi GetFirmBankAccountByID GET /api/v3/partner/firms/{firm_id}/accounts/{account_id} Get a bank account by ID.
BankAccountApi GetFirmBankAccounts GET /api/v3/partner/firms/{firm_id}/accounts List all firms bank account's.
BankAccountApi SetFirmsDefaultBankAccount POST /api/v3/partner/firms/{firm_id}/accounts/{account_id}/default Set firms default bank account.
DefaultApi DeleteFirmBankAccount DELETE /api/v3/partner/firms/{firm_id}/accounts/{account_id} Delete a bank account
FirmApi CreateFirm POST /api/v3/partner/firms Create a new firm
FirmApi CreateFirmAccountOwner POST /api/v3/partner/firms/{firm_id}/owner Create Firm Account Owner
FirmApi CreatePaymentToken POST /api/v3/partner/firms/{firm_id}/payment_token Create a payment token for a customer.
FirmApi DeletePaymentToken DELETE /api/v3/partner/firms/{firm_id}/payment_token/{payment_token} Delete a payment token.
FirmApi GetFirm GET /api/v3/partner/firms/{firm_id} Get a firm
FirmApi GetFirmBankAccountByID GET /api/v3/partner/firms/{firm_id}/accounts/{account_id} Get a bank account by ID.
FirmApi GetFirmBankAccounts GET /api/v3/partner/firms/{firm_id}/accounts List all firms bank account's.
FirmApi GetFirmCustomers GET /api/v3/partner/firms/{firm_id}/customers List all the customers for a firm.
FirmApi GetFirmDetails GET /api/v3/partner/firms/firm-details Get firm details
FirmApi GetFirms GET /api/v3/partner/firms Get firms
FirmApi GetMagicLink POST /api/v3/partner/firms/{firm_id}/magic-link Create a magic link
FirmApi PostFirmBrandingColour POST /api/v3/partner/firms/{firm_id}/branding/colour Set firm branding colour for firm dashboard
FirmApi PostUpload POST /api/v3/partner/firms/{firm_id}/upload Upload file
FirmApi SearchChargesByMetadata GET /api/v3/partner/firms/{firm_id}/charges/search Query metadata to search for Charges, for the given firm
FirmApi SetFirmsDefaultBankAccount POST /api/v3/partner/firms/{firm_id}/accounts/{account_id}/default Set firms default bank account.
FirmApi SyncFirm POST /api/v3/partner/firms/sync/{connect_id} Sync a firm by the FeeWise Connect ID
PartnerApi GetPartnerBranding GET /api/v3/partner/branding Get partner branding
PartnerApi PostPartnerBrandingColour POST /api/v3/partner/branding/colour Set partner colour
PartnerApi PostPartnerLogoUpload POST /api/v3/partner/upload Upload partner logo
PaymentsApi AdjustInvoiceAmount POST /api/v3/partner/invoices/{invoice_id}/adjust-amount Adjust an invoice.
PaymentsApi AdjustTrustDepositAmount POST /api/v3/partner/trust-deposits/{trust_deposit_id}/adjust-amount Adjust an trust deposit.
PaymentsApi CreateCharge POST /api/v3/partner/firms/{firm_id}/charges Create a Charge
PaymentsApi CreateChargeAndPayWithCustomerPaymentToken POST /api/v3/partner/firms/{firm_id}/charges/payment_token/{payment_token} Create Charge, and pay directly.
PaymentsApi CreateInvoice POST /api/v3/partner/invoices Create an Invoice
PaymentsApi CreateMatter POST /api/v3/partner/matters Create a matter
PaymentsApi CreateSplitCharge POST /api/v3/partner/firms/{firm_id}/charges/split Create split charges, each charge is distributed to its own settlement account.
PaymentsApi CreateTrustDeposit POST /api/v3/partner/trust-deposits Create a Trust Deposit
PaymentsApi GetChannelPartnerPayments GET /api/v3/partner/payments DEPRECATED use /transactions - Search for payments for the channel partner
PaymentsApi GetDebtorMatterStatement GET /api/v3/partner/statements/debtors/{debtor_id}/matters/{matter_id} Get a matter debtor statement
PaymentsApi GetExternalDebtorMatterStatement GET /api/v3/partner/statements/external/debtors/{external_debtor_id}/matters/{external_matter_id} Get a matter debtor statement
PaymentsApi GetInvoiceByExternalId GET /api/v3/partner/invoices/firm/{firm_id}/{external_id} Get invoice by external_id
PaymentsApi GetInvoiceById GET /api/v3/partner/invoices/{invoice_id} Get a specified invoice by id.
PaymentsApi GetMatterStatement GET /api/v3/partner/statements/matters/{matter_id} Get a matter statement
PaymentsApi GetTrustDepositByExternalId GET /api/v3/partner/trust-deposits/firm/{firm_id}/{external_id} Get Trust Deposit by external_id
PaymentsApi GetTrustDepositById GET /api/v3/partner/trust-deposits/{trust_deposit_id} Get a Trust Deposit by id.
PaymentsApi RecordExternalPayment POST /api/v3/partner/payments/external Record external payment.
PayoutsApi GetChannelPartnerPayouts GET /api/v3/partner/payouts Get payouts for the channel partner
PayoutsApi GetFirmPayouts GET /api/v3/partner/payouts/firms/{firm_id} Get payouts for the specified firm
PayoutsApi GetPayoutsForFirm GET /api/v3/partner/firms/{firm_id}/payouts
TransactionsApi GetFirmTransactions GET /api/v3/partner/firms/{firm_id}/transactions
TransactionsApi GetTransactionById GET /api/v3/partner/transactions/{transaction_id}
WebhookApi CreateWebhook POST /api/v3/partner/webhooks Create a webhook
WebhookApi DeleteWebhook DELETE /api/v3/partner/webhooks/{webhook_id} Delete Webhook
WebhookApi GetChannelPartnerEventTopics GET /api/v3/partner/events/topics Get a list of event topics for the channel partner
WebhookApi GetChannelPartnerWebhookEvents GET /api/v3/partner/events Get a list of events for the channel partner
WebhookApi GetWebhooks GET /api/v3/partner/webhooks Get list of webhooks for the partner
WebhookApi ReceiveWebhook POST /api/v3/partner/webhook/receiver Dummy receiver for webhooks.
WebhookApi UpdateWebhook PUT /api/v3/partner/webhooks Update a webhook

Documentation for Models

Documentation for Authorization

APIAuth

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

PartnerAuth

  • Type: API key
  • API key parameter name: X-CHANNEL-PARTNER-ID
  • Location: HTTP header

About

FeeWise partner API .net client package source

Resources

Stars

Watchers

Forks

Packages

No packages published