Listar pacotes de billing
curl --request GET \
--url https://fees.sandbox.lerian.net/v1/billing-packages \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>'import requests
url = "https://fees.sandbox.lerian.net/v1/billing-packages"
headers = {
"X-Organization-Id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Organization-Id': '<x-organization-id>', 'Content-Type': '<content-type>'}
};
fetch('https://fees.sandbox.lerian.net/v1/billing-packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fees.sandbox.lerian.net/v1/billing-packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://fees.sandbox.lerian.net/v1/billing-packages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://fees.sandbox.lerian.net/v1/billing-packages")
.header("X-Organization-Id", "<x-organization-id>")
.header("Content-Type", "<content-type>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/billing-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Content-Type"] = '<content-type>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"label": "<string>",
"description": "<string>",
"type": "volume",
"enable": true,
"organizationId": "<string>",
"ledgerId": "<string>",
"eventFilter": {
"transactionRoute": "<string>",
"status": "<string>"
},
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 123,
"maxQuantity": 123,
"unitPrice": "<string>"
}
],
"freeQuota": 123,
"discountTiers": [
{
"minQuantity": 123,
"discountPercentage": "<string>"
}
],
"countMode": "perRoute",
"assetCode": "<string>",
"debitAccountAlias": "<string>",
"creditAccountAlias": "<string>",
"feeAmount": "<string>",
"maintenanceCreditAccount": "<string>",
"accountTarget": {
"segmentId": "<string>",
"portfolioId": "<string>",
"aliases": [
"<string>"
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"page": 123,
"limit": 123,
"total": 123
}Listar pacotes de cobrança
Recupera todos os pacotes de billing para a organização e ledger informados.
GET
/
v1
/
billing-packages
Listar pacotes de billing
curl --request GET \
--url https://fees.sandbox.lerian.net/v1/billing-packages \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>'import requests
url = "https://fees.sandbox.lerian.net/v1/billing-packages"
headers = {
"X-Organization-Id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Organization-Id': '<x-organization-id>', 'Content-Type': '<content-type>'}
};
fetch('https://fees.sandbox.lerian.net/v1/billing-packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fees.sandbox.lerian.net/v1/billing-packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://fees.sandbox.lerian.net/v1/billing-packages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://fees.sandbox.lerian.net/v1/billing-packages")
.header("X-Organization-Id", "<x-organization-id>")
.header("Content-Type", "<content-type>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/billing-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Content-Type"] = '<content-type>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"label": "<string>",
"description": "<string>",
"type": "volume",
"enable": true,
"organizationId": "<string>",
"ledgerId": "<string>",
"eventFilter": {
"transactionRoute": "<string>",
"status": "<string>"
},
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 123,
"maxQuantity": 123,
"unitPrice": "<string>"
}
],
"freeQuota": 123,
"discountTiers": [
{
"minQuantity": 123,
"discountPercentage": "<string>"
}
],
"countMode": "perRoute",
"assetCode": "<string>",
"debitAccountAlias": "<string>",
"creditAccountAlias": "<string>",
"feeAmount": "<string>",
"maintenanceCreditAccount": "<string>",
"accountTarget": {
"segmentId": "<string>",
"portfolioId": "<string>",
"aliases": [
"<string>"
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"page": 123,
"limit": 123,
"total": 123
}Cabeçalhos
O identificador único da Organização associada à requisição.
Exemplo:
"019c96a0-0a98-7287-9a31-786e0809c769"
O token de autorização no formato 'Bearer '.
Importante: Este header é obrigatório se o seu ambiente possui o Access Manager habilitado. Para mais informações, consulte a documentação do Access Manager.
O tipo de mídia do recurso. Deve ser application/json.
Exemplo:
"application/json"
Parâmetros de consulta
Identificador único do Ledger.
Filtrar por tipo de pacote de billing: volume ou maintenance.
Opções disponíveis:
volume, maintenance Filtrar por status ativo. true retorna apenas pacotes ativos, false apenas inativos. Omita para retornar ambos.
Número da página (mínimo 1).
Número de registros por página (mínimo 1).
Esta página foi útil?

