DigitalFemsa.net
1.2.1
dotnet add package DigitalFemsa.net --version 1.2.1
NuGet\Install-Package DigitalFemsa.net -Version 1.2.1
<PackageReference Include="DigitalFemsa.net" Version="1.2.1" />
<PackageVersion Include="DigitalFemsa.net" Version="1.2.1" />
<PackageReference Include="DigitalFemsa.net" />
paket add DigitalFemsa.net --version 1.2.1
#r "nuget: DigitalFemsa.net, 1.2.1"
#:package DigitalFemsa.net@1.2.1
#addin nuget:?package=DigitalFemsa.net&version=1.2.1
#tool nuget:?package=DigitalFemsa.net&version=1.2.1
DigitalFemsa .NET API Library
This is the officially supported .NET library for using DigitalFemsa's APIs.
Supported API versions
The library supports all APIs under the following services:
| API | Description | Service Name | Supported version |
|---|---|---|---|
| Payments API | Our classic integration for online payments. Current supported version | Payments API | v2.1.0 |
For more information, refer to our documentation.
Prerequisites
- DigitalFemsa account
- API key. your API credential .
- DigitalFemsa dotnet API Library supports .net standard 2.0 and above
Installation
Simply download and restore nuget packages https://www.nuget.org/packages/DigitalFemsa.net/ or install it from package manager
PM> Install-Package DigitalFemsa.net -Version x.x.x
Using the library
In order to submit http request to DigitalFemsa API you need to initialize the client. The following example makes a order request:
// Create a OrderRequest
using System;
using System.Collections.Generic;
using DigitalFemsa.net.Client;
using DigitalFemsa.net.Api;
using DigitalFemsa.net.Model;
// create the http client
string acceptLanguage = "en";
Configuration configuration = new()
{
AccessToken = "Your merchant XAPI key"
};
var ordersApi = new OrdersApi(configuration);
var customerApi = new CustomersApi(config);
// create customer
var customer = new Customer(
name: "test dot",
phone: "+573143159063",
email: "test@digitalfemsa.com"
);
CustomerResponse customerResponse = customerApi.CreateCustomer(customer);
// Create OrderRequest
var lineItems = new List<LineItems>{new (
name: "toshiba",
quantity: 1,
unitPrice: 1555
)};
var charges = new List<ChargeRequest>{new (
amount: 1555,
paymentMethod: new ChargeRequestPaymentMethod("cash")
)};
var customerInfo = new OrderRequestCustomerInfo(new CustomerInfoJustCustomerId(customerResponse.Id));
OrderRequest orderRequest = new OrderRequest(
currency: "MXN",
customerInfo: customerInfo,
lineItems: lineItems,
charges: charges
);
//Make the call to the service. This example code makes a call to /orders
OrderResponse response = ordersApi.CreateOrder(orderRequest, acceptLanguage);
Running the tests
Navigate to digitalfemsa-.net folder and run the following commands.
dotnet build
dotnet test
Versioning and release
To bump the library version across all relevant files, use the Makefile target. Usage (macOS, BSD sed):
make update-version VERSION=1.0.1
Contributing
We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements. Have a look at our contributing guidelines to find out how to raise a pull request.
Support
If you have a feature request, or spotted a bug or a technical problem, create an issue here.
For other questions, contact our Support Team.
Licence
This repository is available under the MIT license.
See also
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- JsonSubTypes (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 8.1.0)
- RestSharp (>= 112.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 8.0.5)
-
net6.0
- JsonSubTypes (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 8.1.0)
- RestSharp (>= 112.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 8.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
update entity webhook, nuget config