/payments/analysis/revenue-calculator-template
1 min
POST
https://app.amberflo.io/payments/analysis/revenue-calculator-template
Body Parameters
- bodypayment.analysis.modeling.PriceAnalysisModel.in
- objectpayment.analysis.modeling.by_rule.ByRulePriceAnalysisModel.in
- keypayment.analysis.modeling.PriceAnalysisModelKey.in
- accountIdstring
- idstring
- typestringDefaultby-rule
- namestring
- descriptionstring
- timeRangepayment.common.TimeRange.in
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- analysisProductPlanspayment.analysis.modeling.AnalysisProductPlan.in[]
- idstring
- referencePlanstring
- planBillingPeriodpayment.pricing.BillingPeriod.in
- intervalpayment.pricing.BillingPeriodInterval.in
- intervalsCountinteger<int32>
- itemToPriceIdsOverridesmap<string, string>
- meterNameToPriceOverridesmap<string, payment.pricing.price.PriceStateMachineNode.in>
- timeGroupingIntervalcom.amberflo.service.common.aggregation.AggregationInterval.in
- updateTimeInSecondsinteger<int64>
- customersBaseQuerypayment.analysis.modeling.by_rule.CustomersSampleSpaceKey.in
- filtersmap<string, string[]>
- takepayment.common.Take.in
- limitinteger<int32>
- isAscendingboolean
- customerSourcepayment.analysis.modeling.by_rule.CustomersSourceType.in
- usageSourcepayment.analysis.modeling.by_rule.UsageSourceType.in
- objectpayment.analysis.modeling.raw.RawPriceAnalysisModel.in
- keypayment.analysis.modeling.PriceAnalysisModelKey.in
- accountIdstring
- idstring
- typestringDefaultraw
- namestring
- descriptionstring
- timeRangepayment.common.TimeRange.in
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- analysisProductPlanspayment.analysis.modeling.AnalysisProductPlan.in[]
- idstring
- referencePlanstring
- planBillingPeriodpayment.pricing.BillingPeriod.in
- intervalpayment.pricing.BillingPeriodInterval.in
- intervalsCountinteger<int32>
- itemToPriceIdsOverridesmap<string, string>
- meterNameToPriceOverridesmap<string, payment.pricing.price.PriceStateMachineNode.in>
- timeGroupingIntervalcom.amberflo.service.common.aggregation.AggregationInterval.in
- updateTimeInSecondsinteger<int64>
- customerGroupsUsageStatspayment.analysis.modeling.raw.RawCustomerGroupUsageStats.in[]
- customerGroupIdstring
- customersInGroupinteger<int32>
- meterToCustomerUsageStatsMapmap<string, payment.analysis.modeling.raw.RawMeterUsageStats.in>
Responses
200
- payment.analysis.modeling.PriceAnalysisModel.out
- objectpayment.analysis.modeling.by_rule.ByRulePriceAnalysisModel.out
- keypayment.analysis.modeling.PriceAnalysisModelKey.out
- accountIdstring
- idstring
- typestringDefaultby-rule
- namestring
- descriptionstring
- timeRangepayment.common.TimeRange.out
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- analysisProductPlanspayment.analysis.modeling.AnalysisProductPlan.out[]
- idstring
- referencePlanstring
- planBillingPeriodpayment.pricing.BillingPeriod.out
- intervalpayment.pricing.BillingPeriodInterval.out
- intervalsCountinteger<int32>
- itemToPriceIdsOverridesmap<string, string>
- meterNameToPriceOverridesmap<string, payment.pricing.price.PriceStateMachineNode.out>
- timeGroupingIntervalcom.amberflo.service.common.aggregation.AggregationInterval.out
- updateTimeInSecondsinteger<int64>
- customersBaseQuerypayment.analysis.modeling.by_rule.CustomersSampleSpaceKey.out
- filtersmap<string, string[]>
- takepayment.common.Take.out
- limitinteger<int32>
- isAscendingboolean
- customerSourcepayment.analysis.modeling.by_rule.CustomersSourceType.out
- usageSourcepayment.analysis.modeling.by_rule.UsageSourceType.out
- objectpayment.analysis.modeling.raw.RawPriceAnalysisModel.out
- keypayment.analysis.modeling.PriceAnalysisModelKey.out
- accountIdstring
- idstring
- typestringDefaultraw
- namestring
- descriptionstring
- timeRangepayment.common.TimeRange.out
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- analysisProductPlanspayment.analysis.modeling.AnalysisProductPlan.out[]
- idstring
- referencePlanstring
- planBillingPeriodpayment.pricing.BillingPeriod.out
- intervalpayment.pricing.BillingPeriodInterval.out
- intervalsCountinteger<int32>
- itemToPriceIdsOverridesmap<string, string>
- meterNameToPriceOverridesmap<string, payment.pricing.price.PriceStateMachineNode.out>
- timeGroupingIntervalcom.amberflo.service.common.aggregation.AggregationInterval.out
- updateTimeInSecondsinteger<int64>
- customerGroupsUsageStatspayment.analysis.modeling.raw.RawCustomerGroupUsageStats.out[]
- customerGroupIdstring
- customersInGroupinteger<int32>
- meterToCustomerUsageStatsMapmap<string, payment.analysis.modeling.raw.RawMeterUsageStats.out>
curl
curl --request POST \
--url https://app.amberflo.io/payments/analysis/revenue-calculator-template \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"type": "by-rule"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"type": "by-rule"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/analysis/revenue-calculator-template", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/payments/analysis/revenue-calculator-template")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"type": "by-rule"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/analysis/revenue-calculator-template"
payload = json.dumps({
"type": "by-rule"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful request
{}