Plans are collections of Prices which define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of Products. While Products help you track inventory or provisioning, plans and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing and billing cycle options should be represented by prices grouped together in a plan. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "Gold" product that has prices for $100/month, $1000/year, and $50 once with the alternative billing cycle and pricing options each represented by a different plan and the recurring and one-time prices represented by different prices
PlanAPI
Creates a new plan.
You must provide at least these values in your request:
name
Plan plan = zuoraClient.plans().create(params);
Parameter | Type | Tags | Description |
---|---|---|---|
params |
PlanCreateRequest |
Required | Plan request object. |
PlanCreateRequest params = PlanCreateRequest.builder()
.name("Monthly Plan")
.build();
Plan plan = zuoraClient.plans().create(params);
Plan plan = zuoraClient.plans().get(planId);
Parameter | Type | Tags | Description |
---|---|---|---|
id |
String |
Required | The unique identifier of a plan. |
final String PLAN_ID = "plan_id8";
Plan plan = zuoraClient.plans().get(PLAN_ID);
Plan plan = zuoraClient.plans().update(updatePlanRequest);
Parameter | Type | Tags | Description |
---|---|---|---|
plan |
Plan |
Required | Plan request object. |
final String PLAN_ID = "plan_id8";
Plan plan = zuoraClient.plans().get(PLAN_ID);
plan.setName("Plan Y")
Plan plan = zuoraClient.plans().update(plan);
Adds a price to the plan.
Plan plan = zuoraClient.plans().addPrice(priceCreateRequest);
Parameter | Type | Tags | Description |
---|---|---|---|
params |
PriceCreateRequest |
Required | Price create request. |
PriceCreateRequest params = PriceCreateRequest.builder()
.name("Gold")
.build();
Plan plan = zuoraClient.plans().addPrice(params);
final String PLAN_ID = "plan_id8";
Plan plan = zuoraClient.plans().delete(PLAN_ID);
Parameter | Type | Tags | Description |
---|---|---|---|
id |
String |
Required | The unique identifier of a plan. |
final String PLAN_ID = "plan_id8";
Plan plan = zuoraClient.plans().delete(PLAN_ID);