curl --request POST \
--url https://fees.sandbox.lerian.net/v1/packages \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"customer-brl-1",
"customer-brl-2",
"customer-brl-3"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "business-brl-2"
}
},
"enable": true
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/packages"
payload = {
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": ["customer-brl-1", "customer-brl-2", "customer-brl-3"],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": True,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": False,
"creditAccount": "business-brl-2"
}
},
"enable": True
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Organization-Id': '<x-organization-id>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
feeGroupLabel: 'Standard Package',
description: 'Package for testing',
transactionRoute: '019c96a0-10a0-72d2-9fb0-2b7de8093182',
segmentId: '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
minimumAmount: '3000.00',
maximumAmount: '6000.00',
waivedAccounts: ['customer-brl-1', 'customer-brl-2', 'customer-brl-3'],
fees: {
admFee: {
feeLabel: 'Administrative Fee',
calculationModel: {applicationRule: 'flatFee', calculations: [{type: 'flat', value: '16.00'}]},
referenceAmount: 'originalAmount',
priority: 1,
isDeductibleFrom: true,
creditAccount: 'business-brl-1',
routeFrom: '019c96a0-1071-7a0d-9916-a831221de252',
routeTo: '019c96a0-108c-7a74-8e31-3789daffe1ed'
},
iof: {
feeLabel: 'IOF',
calculationModel: {
applicationRule: 'percentual',
calculations: [{type: 'percentage', value: '6.00'}]
},
referenceAmount: 'afterFeesAmount',
priority: 2,
isDeductibleFrom: false,
creditAccount: 'business-brl-2'
}
},
enable: true
})
};
fetch('https://fees.sandbox.lerian.net/v1/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/packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feeGroupLabel' => 'Standard Package',
'description' => 'Package for testing',
'transactionRoute' => '019c96a0-10a0-72d2-9fb0-2b7de8093182',
'segmentId' => '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'minimumAmount' => '3000.00',
'maximumAmount' => '6000.00',
'waivedAccounts' => [
'customer-brl-1',
'customer-brl-2',
'customer-brl-3'
],
'fees' => [
'admFee' => [
'feeLabel' => 'Administrative Fee',
'calculationModel' => [
'applicationRule' => 'flatFee',
'calculations' => [
[
'type' => 'flat',
'value' => '16.00'
]
]
],
'referenceAmount' => 'originalAmount',
'priority' => 1,
'isDeductibleFrom' => true,
'creditAccount' => 'business-brl-1',
'routeFrom' => '019c96a0-1071-7a0d-9916-a831221de252',
'routeTo' => '019c96a0-108c-7a74-8e31-3789daffe1ed'
],
'iof' => [
'feeLabel' => 'IOF',
'calculationModel' => [
'applicationRule' => 'percentual',
'calculations' => [
[
'type' => 'percentage',
'value' => '6.00'
]
]
],
'referenceAmount' => 'afterFeesAmount',
'priority' => 2,
'isDeductibleFrom' => false,
'creditAccount' => 'business-brl-2'
]
],
'enable' => true
]),
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fees.sandbox.lerian.net/v1/packages"
payload := strings.NewReader("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://fees.sandbox.lerian.net/v1/packages")
.header("X-Organization-Id", "<x-organization-id>")
.header("Content-Type", "<content-type>")
.body("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}"
response = http.request(request)
puts response.read_bodyCriar um Pacote
Use este endpoint para criar pacotes junto com suas taxas associadas em uma única requisição.
curl --request POST \
--url https://fees.sandbox.lerian.net/v1/packages \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"customer-brl-1",
"customer-brl-2",
"customer-brl-3"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "business-brl-2"
}
},
"enable": true
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/packages"
payload = {
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": ["customer-brl-1", "customer-brl-2", "customer-brl-3"],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": True,
"creditAccount": "business-brl-1",
"routeFrom": "019c96a0-1071-7a0d-9916-a831221de252",
"routeTo": "019c96a0-108c-7a74-8e31-3789daffe1ed"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": False,
"creditAccount": "business-brl-2"
}
},
"enable": True
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Organization-Id': '<x-organization-id>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
feeGroupLabel: 'Standard Package',
description: 'Package for testing',
transactionRoute: '019c96a0-10a0-72d2-9fb0-2b7de8093182',
segmentId: '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
minimumAmount: '3000.00',
maximumAmount: '6000.00',
waivedAccounts: ['customer-brl-1', 'customer-brl-2', 'customer-brl-3'],
fees: {
admFee: {
feeLabel: 'Administrative Fee',
calculationModel: {applicationRule: 'flatFee', calculations: [{type: 'flat', value: '16.00'}]},
referenceAmount: 'originalAmount',
priority: 1,
isDeductibleFrom: true,
creditAccount: 'business-brl-1',
routeFrom: '019c96a0-1071-7a0d-9916-a831221de252',
routeTo: '019c96a0-108c-7a74-8e31-3789daffe1ed'
},
iof: {
feeLabel: 'IOF',
calculationModel: {
applicationRule: 'percentual',
calculations: [{type: 'percentage', value: '6.00'}]
},
referenceAmount: 'afterFeesAmount',
priority: 2,
isDeductibleFrom: false,
creditAccount: 'business-brl-2'
}
},
enable: true
})
};
fetch('https://fees.sandbox.lerian.net/v1/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/packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feeGroupLabel' => 'Standard Package',
'description' => 'Package for testing',
'transactionRoute' => '019c96a0-10a0-72d2-9fb0-2b7de8093182',
'segmentId' => '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'minimumAmount' => '3000.00',
'maximumAmount' => '6000.00',
'waivedAccounts' => [
'customer-brl-1',
'customer-brl-2',
'customer-brl-3'
],
'fees' => [
'admFee' => [
'feeLabel' => 'Administrative Fee',
'calculationModel' => [
'applicationRule' => 'flatFee',
'calculations' => [
[
'type' => 'flat',
'value' => '16.00'
]
]
],
'referenceAmount' => 'originalAmount',
'priority' => 1,
'isDeductibleFrom' => true,
'creditAccount' => 'business-brl-1',
'routeFrom' => '019c96a0-1071-7a0d-9916-a831221de252',
'routeTo' => '019c96a0-108c-7a74-8e31-3789daffe1ed'
],
'iof' => [
'feeLabel' => 'IOF',
'calculationModel' => [
'applicationRule' => 'percentual',
'calculations' => [
[
'type' => 'percentage',
'value' => '6.00'
]
]
],
'referenceAmount' => 'afterFeesAmount',
'priority' => 2,
'isDeductibleFrom' => false,
'creditAccount' => 'business-brl-2'
]
],
'enable' => true
]),
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fees.sandbox.lerian.net/v1/packages"
payload := strings.NewReader("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://fees.sandbox.lerian.net/v1/packages")
.header("X-Organization-Id", "<x-organization-id>")
.header("Content-Type", "<content-type>")
.body("{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"feeGroupLabel\": \"Standard Package\",\n \"description\": \"Package for testing\",\n \"transactionRoute\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"minimumAmount\": \"3000.00\",\n \"maximumAmount\": \"6000.00\",\n \"waivedAccounts\": [\n \"customer-brl-1\",\n \"customer-brl-2\",\n \"customer-brl-3\"\n ],\n \"fees\": {\n \"admFee\": {\n \"feeLabel\": \"Administrative Fee\",\n \"calculationModel\": {\n \"applicationRule\": \"flatFee\",\n \"calculations\": [\n {\n \"type\": \"flat\",\n \"value\": \"16.00\"\n }\n ]\n },\n \"referenceAmount\": \"originalAmount\",\n \"priority\": 1,\n \"isDeductibleFrom\": true,\n \"creditAccount\": \"business-brl-1\",\n \"routeFrom\": \"019c96a0-1071-7a0d-9916-a831221de252\",\n \"routeTo\": \"019c96a0-108c-7a74-8e31-3789daffe1ed\"\n },\n \"iof\": {\n \"feeLabel\": \"IOF\",\n \"calculationModel\": {\n \"applicationRule\": \"percentual\",\n \"calculations\": [\n {\n \"type\": \"percentage\",\n \"value\": \"6.00\"\n }\n ]\n },\n \"referenceAmount\": \"afterFeesAmount\",\n \"priority\": 2,\n \"isDeductibleFrom\": false,\n \"creditAccount\": \"business-brl-2\"\n }\n },\n \"enable\": true\n}"
response = http.request(request)
puts response.read_bodyCabeçalhos
O identificador único da Organização associada à requisição.
"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.
"application/json"
Corpo
Nome do grupo de taxas, utilizado para identificar o pacote de taxas configurado.
Identificador único do Ledger ao qual o pacote está vinculado no Midaz Ledger.
Valor mínimo da transação abaixo do qual as taxas do pacote não se aplicam. Importante: Use ponto (.) como separador decimal — vírgulas não são aceitas.
Valor máximo da transação acima do qual as taxas do pacote não se aplicam. Importante: Use ponto (.) como separador decimal — vírgulas não são aceitas.
Objeto contendo regras de taxas com nomes personalizados. Cada chave é definida pelo cliente (ex., admFee, iof) e seu valor deve seguir o schema do objeto Fee.
Show child attributes
Show child attributes
Se true, indica que o pacote está ativo.
Resumo breve do pacote explicando o que ele abrange.
A rota contábil principal que define a natureza da transação. Ajuda a agrupar operações relacionadas no ledger.
Identificador único do Segmento ao qual o pacote está vinculado no Midaz Ledger.
Lista de contas que estão isentas das taxas definidas no pacote.
Resposta
Indica que o recurso foi criado com sucesso e a operação foi concluída conforme esperado.
Identificador único do pacote, no formato UUIDv7.
Nome do grupo de taxas, utilizado para identificar o pacote de taxas configurado.
Identificador único do Ledger ao qual este Pacote de Taxas está vinculado no Midaz Ledger.
Valor mínimo da transação abaixo do qual as taxas do pacote não se aplicam.
Valor máximo da transação acima do qual as taxas do pacote não se aplicam.
Objeto contendo regras de taxas com nomes personalizados. Cada chave é definida pelo cliente (ex., admFee, iof) e seu valor deve seguir o schema do objeto Fee.
Show child attributes
Show child attributes
Se true, indica que o pacote está ativo.
Resumo breve do pacote explicando o que ele abrange.
A rota contábil principal que define a natureza da transação. Ajuda a agrupar operações relacionadas no ledger.
Identificador único do Segmento ao qual este Pacote de Taxas está vinculado no Midaz Ledger.
Lista de contas que estão isentas das taxas definidas no pacote.
Data em que o pacote foi criado.
Data em que o pacote foi atualizado pela última vez.
Data em que o pacote foi excluído.
Esta página foi útil?

