cURL
curl --request POST \
--url https://api.smartbills.io/v1/quotas \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"key": "<string>",
"limit": 123,
"planId": 123,
"plan": {
"id": 123,
"name": "<string>",
"description": "<string>",
"key": "<string>",
"price": 123,
"currency": "<string>",
"isActive": true,
"isRecurring": true,
"billingPeriod": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stripeId": "<string>"
},
"usageId": 123,
"usage": {
"id": 123,
"key": "<string>",
"userId": 123,
"businessId": 123,
"currentUsage": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"warningNotifiedAt": "2023-11-07T05:31:56Z",
"limitNotifiedAt": "2023-11-07T05:31:56Z"
},
"userId": 123,
"businessId": 123,
"isActive": true,
"billingCycleAnchor": "2023-11-07T05:31:56Z",
"pendingLimit": 123,
"pendingLimitEffectiveAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.smartbills.io/v1/quotas"
payload = {
"id": 123,
"key": "<string>",
"limit": 123,
"planId": 123,
"plan": {
"id": 123,
"name": "<string>",
"description": "<string>",
"key": "<string>",
"price": 123,
"currency": "<string>",
"isActive": True,
"isRecurring": True,
"billingPeriod": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stripeId": "<string>"
},
"usageId": 123,
"usage": {
"id": 123,
"key": "<string>",
"userId": 123,
"businessId": 123,
"currentUsage": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"warningNotifiedAt": "2023-11-07T05:31:56Z",
"limitNotifiedAt": "2023-11-07T05:31:56Z"
},
"userId": 123,
"businessId": 123,
"isActive": True,
"billingCycleAnchor": "2023-11-07T05:31:56Z",
"pendingLimit": 123,
"pendingLimitEffectiveAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
key: '<string>',
limit: 123,
planId: 123,
plan: {
id: 123,
name: '<string>',
description: '<string>',
key: '<string>',
price: 123,
currency: '<string>',
isActive: true,
isRecurring: true,
billingPeriod: '<string>',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
stripeId: '<string>'
},
usageId: 123,
usage: {
id: 123,
key: '<string>',
userId: 123,
businessId: 123,
currentUsage: 123,
periodStart: '2023-11-07T05:31:56Z',
periodEnd: '2023-11-07T05:31:56Z',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
warningNotifiedAt: '2023-11-07T05:31:56Z',
limitNotifiedAt: '2023-11-07T05:31:56Z'
},
userId: 123,
businessId: 123,
isActive: true,
billingCycleAnchor: '2023-11-07T05:31:56Z',
pendingLimit: 123,
pendingLimitEffectiveAt: '2023-11-07T05:31:56Z',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.smartbills.io/v1/quotas', 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://api.smartbills.io/v1/quotas",
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([
'id' => 123,
'key' => '<string>',
'limit' => 123,
'planId' => 123,
'plan' => [
'id' => 123,
'name' => '<string>',
'description' => '<string>',
'key' => '<string>',
'price' => 123,
'currency' => '<string>',
'isActive' => true,
'isRecurring' => true,
'billingPeriod' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'stripeId' => '<string>'
],
'usageId' => 123,
'usage' => [
'id' => 123,
'key' => '<string>',
'userId' => 123,
'businessId' => 123,
'currentUsage' => 123,
'periodStart' => '2023-11-07T05:31:56Z',
'periodEnd' => '2023-11-07T05:31:56Z',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'warningNotifiedAt' => '2023-11-07T05:31:56Z',
'limitNotifiedAt' => '2023-11-07T05:31:56Z'
],
'userId' => 123,
'businessId' => 123,
'isActive' => true,
'billingCycleAnchor' => '2023-11-07T05:31:56Z',
'pendingLimit' => 123,
'pendingLimitEffectiveAt' => '2023-11-07T05:31:56Z',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.smartbills.io/v1/quotas"
payload := strings.NewReader("{\n \"id\": 123,\n \"key\": \"<string>\",\n \"limit\": 123,\n \"planId\": 123,\n \"plan\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"key\": \"<string>\",\n \"price\": 123,\n \"currency\": \"<string>\",\n \"isActive\": true,\n \"isRecurring\": true,\n \"billingPeriod\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"stripeId\": \"<string>\"\n },\n \"usageId\": 123,\n \"usage\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"userId\": 123,\n \"businessId\": 123,\n \"currentUsage\": 123,\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"warningNotifiedAt\": \"2023-11-07T05:31:56Z\",\n \"limitNotifiedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"userId\": 123,\n \"businessId\": 123,\n \"isActive\": true,\n \"billingCycleAnchor\": \"2023-11-07T05:31:56Z\",\n \"pendingLimit\": 123,\n \"pendingLimitEffectiveAt\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.smartbills.io/v1/quotas")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"key\": \"<string>\",\n \"limit\": 123,\n \"planId\": 123,\n \"plan\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"key\": \"<string>\",\n \"price\": 123,\n \"currency\": \"<string>\",\n \"isActive\": true,\n \"isRecurring\": true,\n \"billingPeriod\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"stripeId\": \"<string>\"\n },\n \"usageId\": 123,\n \"usage\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"userId\": 123,\n \"businessId\": 123,\n \"currentUsage\": 123,\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"warningNotifiedAt\": \"2023-11-07T05:31:56Z\",\n \"limitNotifiedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"userId\": 123,\n \"businessId\": 123,\n \"isActive\": true,\n \"billingCycleAnchor\": \"2023-11-07T05:31:56Z\",\n \"pendingLimit\": 123,\n \"pendingLimitEffectiveAt\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/quotas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"key\": \"<string>\",\n \"limit\": 123,\n \"planId\": 123,\n \"plan\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"key\": \"<string>\",\n \"price\": 123,\n \"currency\": \"<string>\",\n \"isActive\": true,\n \"isRecurring\": true,\n \"billingPeriod\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"stripeId\": \"<string>\"\n },\n \"usageId\": 123,\n \"usage\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"userId\": 123,\n \"businessId\": 123,\n \"currentUsage\": 123,\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"warningNotifiedAt\": \"2023-11-07T05:31:56Z\",\n \"limitNotifiedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"userId\": 123,\n \"businessId\": 123,\n \"isActive\": true,\n \"billingCycleAnchor\": \"2023-11-07T05:31:56Z\",\n \"pendingLimit\": 123,\n \"pendingLimitEffectiveAt\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"key": "<string>",
"limit": 123,
"isUnlimited": true,
"planId": 123,
"plan": {
"id": 123,
"name": "<string>",
"description": "<string>",
"key": "<string>",
"price": 123,
"currency": "<string>",
"isActive": true,
"isRecurring": true,
"billingPeriod": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stripeId": "<string>"
},
"usageId": 123,
"usage": {
"id": 123,
"key": "<string>",
"userId": 123,
"businessId": 123,
"currentUsage": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"warningNotifiedAt": "2023-11-07T05:31:56Z",
"limitNotifiedAt": "2023-11-07T05:31:56Z"
},
"userId": 123,
"businessId": 123,
"isActive": true,
"billingCycleAnchor": "2023-11-07T05:31:56Z",
"pendingLimit": 123,
"pendingLimitEffectiveAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Quotas
Post v1quotas
POST
/
v1
/
quotas
cURL
curl --request POST \
--url https://api.smartbills.io/v1/quotas \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"key": "<string>",
"limit": 123,
"planId": 123,
"plan": {
"id": 123,
"name": "<string>",
"description": "<string>",
"key": "<string>",
"price": 123,
"currency": "<string>",
"isActive": true,
"isRecurring": true,
"billingPeriod": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stripeId": "<string>"
},
"usageId": 123,
"usage": {
"id": 123,
"key": "<string>",
"userId": 123,
"businessId": 123,
"currentUsage": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"warningNotifiedAt": "2023-11-07T05:31:56Z",
"limitNotifiedAt": "2023-11-07T05:31:56Z"
},
"userId": 123,
"businessId": 123,
"isActive": true,
"billingCycleAnchor": "2023-11-07T05:31:56Z",
"pendingLimit": 123,
"pendingLimitEffectiveAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.smartbills.io/v1/quotas"
payload = {
"id": 123,
"key": "<string>",
"limit": 123,
"planId": 123,
"plan": {
"id": 123,
"name": "<string>",
"description": "<string>",
"key": "<string>",
"price": 123,
"currency": "<string>",
"isActive": True,
"isRecurring": True,
"billingPeriod": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stripeId": "<string>"
},
"usageId": 123,
"usage": {
"id": 123,
"key": "<string>",
"userId": 123,
"businessId": 123,
"currentUsage": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"warningNotifiedAt": "2023-11-07T05:31:56Z",
"limitNotifiedAt": "2023-11-07T05:31:56Z"
},
"userId": 123,
"businessId": 123,
"isActive": True,
"billingCycleAnchor": "2023-11-07T05:31:56Z",
"pendingLimit": 123,
"pendingLimitEffectiveAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
key: '<string>',
limit: 123,
planId: 123,
plan: {
id: 123,
name: '<string>',
description: '<string>',
key: '<string>',
price: 123,
currency: '<string>',
isActive: true,
isRecurring: true,
billingPeriod: '<string>',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
stripeId: '<string>'
},
usageId: 123,
usage: {
id: 123,
key: '<string>',
userId: 123,
businessId: 123,
currentUsage: 123,
periodStart: '2023-11-07T05:31:56Z',
periodEnd: '2023-11-07T05:31:56Z',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
warningNotifiedAt: '2023-11-07T05:31:56Z',
limitNotifiedAt: '2023-11-07T05:31:56Z'
},
userId: 123,
businessId: 123,
isActive: true,
billingCycleAnchor: '2023-11-07T05:31:56Z',
pendingLimit: 123,
pendingLimitEffectiveAt: '2023-11-07T05:31:56Z',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.smartbills.io/v1/quotas', 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://api.smartbills.io/v1/quotas",
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([
'id' => 123,
'key' => '<string>',
'limit' => 123,
'planId' => 123,
'plan' => [
'id' => 123,
'name' => '<string>',
'description' => '<string>',
'key' => '<string>',
'price' => 123,
'currency' => '<string>',
'isActive' => true,
'isRecurring' => true,
'billingPeriod' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'stripeId' => '<string>'
],
'usageId' => 123,
'usage' => [
'id' => 123,
'key' => '<string>',
'userId' => 123,
'businessId' => 123,
'currentUsage' => 123,
'periodStart' => '2023-11-07T05:31:56Z',
'periodEnd' => '2023-11-07T05:31:56Z',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'warningNotifiedAt' => '2023-11-07T05:31:56Z',
'limitNotifiedAt' => '2023-11-07T05:31:56Z'
],
'userId' => 123,
'businessId' => 123,
'isActive' => true,
'billingCycleAnchor' => '2023-11-07T05:31:56Z',
'pendingLimit' => 123,
'pendingLimitEffectiveAt' => '2023-11-07T05:31:56Z',
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.smartbills.io/v1/quotas"
payload := strings.NewReader("{\n \"id\": 123,\n \"key\": \"<string>\",\n \"limit\": 123,\n \"planId\": 123,\n \"plan\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"key\": \"<string>\",\n \"price\": 123,\n \"currency\": \"<string>\",\n \"isActive\": true,\n \"isRecurring\": true,\n \"billingPeriod\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"stripeId\": \"<string>\"\n },\n \"usageId\": 123,\n \"usage\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"userId\": 123,\n \"businessId\": 123,\n \"currentUsage\": 123,\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"warningNotifiedAt\": \"2023-11-07T05:31:56Z\",\n \"limitNotifiedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"userId\": 123,\n \"businessId\": 123,\n \"isActive\": true,\n \"billingCycleAnchor\": \"2023-11-07T05:31:56Z\",\n \"pendingLimit\": 123,\n \"pendingLimitEffectiveAt\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.smartbills.io/v1/quotas")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"key\": \"<string>\",\n \"limit\": 123,\n \"planId\": 123,\n \"plan\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"key\": \"<string>\",\n \"price\": 123,\n \"currency\": \"<string>\",\n \"isActive\": true,\n \"isRecurring\": true,\n \"billingPeriod\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"stripeId\": \"<string>\"\n },\n \"usageId\": 123,\n \"usage\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"userId\": 123,\n \"businessId\": 123,\n \"currentUsage\": 123,\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"warningNotifiedAt\": \"2023-11-07T05:31:56Z\",\n \"limitNotifiedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"userId\": 123,\n \"businessId\": 123,\n \"isActive\": true,\n \"billingCycleAnchor\": \"2023-11-07T05:31:56Z\",\n \"pendingLimit\": 123,\n \"pendingLimitEffectiveAt\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/quotas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"key\": \"<string>\",\n \"limit\": 123,\n \"planId\": 123,\n \"plan\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"key\": \"<string>\",\n \"price\": 123,\n \"currency\": \"<string>\",\n \"isActive\": true,\n \"isRecurring\": true,\n \"billingPeriod\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"stripeId\": \"<string>\"\n },\n \"usageId\": 123,\n \"usage\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"userId\": 123,\n \"businessId\": 123,\n \"currentUsage\": 123,\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"warningNotifiedAt\": \"2023-11-07T05:31:56Z\",\n \"limitNotifiedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"userId\": 123,\n \"businessId\": 123,\n \"isActive\": true,\n \"billingCycleAnchor\": \"2023-11-07T05:31:56Z\",\n \"pendingLimit\": 123,\n \"pendingLimitEffectiveAt\": \"2023-11-07T05:31:56Z\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"key": "<string>",
"limit": 123,
"isUnlimited": true,
"planId": 123,
"plan": {
"id": 123,
"name": "<string>",
"description": "<string>",
"key": "<string>",
"price": 123,
"currency": "<string>",
"isActive": true,
"isRecurring": true,
"billingPeriod": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stripeId": "<string>"
},
"usageId": 123,
"usage": {
"id": 123,
"key": "<string>",
"userId": 123,
"businessId": 123,
"currentUsage": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"warningNotifiedAt": "2023-11-07T05:31:56Z",
"limitNotifiedAt": "2023-11-07T05:31:56Z"
},
"userId": 123,
"businessId": 123,
"isActive": true,
"billingCycleAnchor": "2023-11-07T05:31:56Z",
"pendingLimit": 123,
"pendingLimitEffectiveAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Body
application/jsontext/jsonapplication/*+json
Available options:
DAILY, WEEKLY, MONTHLY, YEARLY, LIFETIME Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Available options:
DAILY, WEEKLY, MONTHLY, YEARLY, LIFETIME Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I