andrewkretzer / asaas-sdk-net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Asaas SDK for .NET

The Asaas SDK for .NET enables .NET developers to easily work with Asaas services.

This is a unofficial SDK, feel free to contribute or report any issues :)

Documentation

To make any requests, you must generate your Access Token in the Asaas environment you want to use. During the testing period we recommend using the Sandbox environment provided by Asaas. For more information, access the authentication section of the Asaas documentation

Example

ApiSettings apiSettings = new ApiSettings("YOUR_ACCESS_TOKEN", AsaasEnvironment.SANDBOX);

AsaasApi asaasApi = new AsaasApi(apiSettings);

ResponseObject<Customer> createdCustomerResponse = await asaasApi.Customer.Create(new CreateCustomerRequest
{
    Name = "João da Silva",
    CpfCnpj = "01020558075"
});

if (createdCustomerResponse.WasSucessfull())
{
    Customer customer = createdCustomerResponse.Data;

    ResponseObject<Payment> paymentResponse = await asaasApi.Payment.Create(new CreatePaymentRequest()
    {
        CustomerId = customer.Id,
        BillingType = BillingType.BOLETO,
        Value = 32.55M,
        DueDate = DateTime.Parse("12/12/2020")
    });
}

Installation

To install this library via NuGet console, use:

Install-Package Asaas.SDK

Contributors

License

This project is available under the MIT license. See the LICENSE file for more info.

:)

About

License:MIT License


Languages

Language:C# 100.0%