Skip to main content

rateplans

Creates, updates, deletes, gets or lists a rateplans resource.

Overview

Namerateplans
TypeResource
Idgoogle.apigee.rateplans

Fields

NameDatatypeDescription
namestringOutput only. Name of the rate plan.
descriptionstringDescription of the rate plan.
apiproductstringName of the API product that the rate plan is associated with.
billingPeriodstringFrequency at which the customer will be billed.
consumptionPricingRatesarrayAPI call volume ranges and the fees charged when the total number of API calls is within a given range. The method used to calculate the final fee depends on the selected pricing model. For example, if the pricing model is STAIRSTEP and the ranges are defined as follows: { "start": 1, "end": 100, "fee": 75 }, { "start": 101, "end": 200, "fee": 100 }, } Then the following fees would be charged based on the total number of API calls (assuming the currency selected is USD): 1 call costs $75 50 calls cost $75 * 150 calls cost $100 The number of API calls cannot exceed 200.
consumptionPricingTypestringPricing model used for consumption-based charges.
createdAtstringOutput only. Time that the rate plan was created in milliseconds since epoch.
currencyCodestringCurrency to be used for billing. Consists of a three-letter code as defined by the ISO 4217 standard.
displayNamestringDisplay name of the rate plan.
endTimestringTime when the rate plan will expire in milliseconds since epoch. Set to 0 or null to indicate that the rate plan should never expire.
fixedFeeFrequencyintegerFrequency at which the fixed fee is charged.
fixedRecurringFeeobjectRepresents an amount of money with its currency type.
lastModifiedAtstringOutput only. Time the rate plan was last modified in milliseconds since epoch.
paymentFundingModelstringDEPRECATED: This field is no longer supported and will eventually be removed when Apigee Hybrid 1.5/1.6 is no longer supported. Instead, use the billingType field inside DeveloperMonetizationConfig resource. Flag that specifies the billing account type, prepaid or postpaid.
revenueShareRatesarrayDetails of the revenue sharing model.
revenueShareTypestringMethod used to calculate the revenue that is shared with developers.
setupFeeobjectRepresents an amount of money with its currency type.
startTimestringTime when the rate plan becomes active in milliseconds since epoch.
statestringCurrent state of the rate plan (draft or published).

Methods

NameAccessible byRequired ParamsDescription
organizations_apiproducts_rateplans_getSELECTapiproductsId, organizationsId, rateplansIdGets the details of a rate plan.
organizations_apiproducts_rateplans_listSELECTapiproductsId, organizationsIdLists all the rate plans for an API product.
organizations_apiproducts_rateplans_createINSERTapiproductsId, organizationsIdCreate a rate plan that is associated with an API product in an organization. Using rate plans, API product owners can monetize their API products by configuring one or more of the following: - Billing frequency - Initial setup fees for using an API product - Payment funding model (postpaid only) - Fixed recurring or consumption-based charges for using an API product - Revenue sharing with developer partners An API product can have multiple rate plans associated with it but only one rate plan can be active at any point of time. **Note: From the developer's perspective, they purchase API products not rate plans.
organizations_apiproducts_rateplans_deleteDELETEapiproductsId, organizationsId, rateplansIdDeletes a rate plan.
organizations_apiproducts_rateplans_updateREPLACEapiproductsId, organizationsId, rateplansIdUpdates an existing rate plan.

SELECT examples

Lists all the rate plans for an API product.

SELECT
name,
description,
apiproduct,
billingPeriod,
consumptionPricingRates,
consumptionPricingType,
createdAt,
currencyCode,
displayName,
endTime,
fixedFeeFrequency,
fixedRecurringFee,
lastModifiedAt,
paymentFundingModel,
revenueShareRates,
revenueShareType,
setupFee,
startTime,
state
FROM google.apigee.rateplans
WHERE apiproductsId = '{{ apiproductsId }}'
AND organizationsId = '{{ organizationsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new rateplans resource.

/*+ create */
INSERT INTO google.apigee.rateplans (
apiproductsId,
organizationsId,
fixedFeeFrequency,
description,
consumptionPricingRates,
revenueShareType,
apiproduct,
state,
consumptionPricingType,
billingPeriod,
revenueShareRates,
startTime,
currencyCode,
paymentFundingModel,
endTime,
setupFee,
fixedRecurringFee,
displayName
)
SELECT
'{{ apiproductsId }}',
'{{ organizationsId }}',
'{{ fixedFeeFrequency }}',
'{{ description }}',
'{{ consumptionPricingRates }}',
'{{ revenueShareType }}',
'{{ apiproduct }}',
'{{ state }}',
'{{ consumptionPricingType }}',
'{{ billingPeriod }}',
'{{ revenueShareRates }}',
'{{ startTime }}',
'{{ currencyCode }}',
'{{ paymentFundingModel }}',
'{{ endTime }}',
'{{ setupFee }}',
'{{ fixedRecurringFee }}',
'{{ displayName }}'
;

REPLACE example

Replaces all fields in the specified rateplans resource.

/*+ update */
REPLACE google.apigee.rateplans
SET
fixedFeeFrequency = '{{ fixedFeeFrequency }}',
description = '{{ description }}',
consumptionPricingRates = '{{ consumptionPricingRates }}',
revenueShareType = '{{ revenueShareType }}',
apiproduct = '{{ apiproduct }}',
state = '{{ state }}',
consumptionPricingType = '{{ consumptionPricingType }}',
billingPeriod = '{{ billingPeriod }}',
revenueShareRates = '{{ revenueShareRates }}',
startTime = '{{ startTime }}',
currencyCode = '{{ currencyCode }}',
paymentFundingModel = '{{ paymentFundingModel }}',
endTime = '{{ endTime }}',
setupFee = '{{ setupFee }}',
fixedRecurringFee = '{{ fixedRecurringFee }}',
displayName = '{{ displayName }}'
WHERE
apiproductsId = '{{ apiproductsId }}'
AND organizationsId = '{{ organizationsId }}'
AND rateplansId = '{{ rateplansId }}';

DELETE example

Deletes the specified rateplans resource.

/*+ delete */
DELETE FROM google.apigee.rateplans
WHERE apiproductsId = '{{ apiproductsId }}'
AND organizationsId = '{{ organizationsId }}'
AND rateplansId = '{{ rateplansId }}';