curl --request POST \
--url https://api.iugu.com/v1/invoices \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"ensure_workday_due_date": false
}
'
const sdk = require('api')('@iugu-dev/v1.0#cprxbcclkiqeh5n');
sdk.criarFatura({ensure_workday_due_date: false})
.then(({ data }) => console.log(data))
.catch(err => console.error(err));
require 'uri'
require 'net/http'
url = URI("https://api.iugu.com/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request.body = "{\"ensure_workday_due_date\":false}"
response = http.request(request)
puts response.read_body
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.iugu.com/v1/invoices', [
'body' => '{"ensure_workday_due_date":false}',
'headers' => [
'accept' => 'application/json',
'content-type' => 'application/json',
],
]);
import requests
url = "https://api.iugu.com/v1/invoices"
payload = { "ensure_workday_due_date": False }
headers = {
"accept": "application/json",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)