Interface RecommendedPlan.Builder

  • Method Details

    • planCode

      RecommendedPlan.Builder planCode(String planCode)

      This plan's key within the recommendation, for example pro. The request's planOptions.planPrices, and this plan's upgradePlanCodes and downgradePlanCodes, refer to plans by it. It is not a PlanId: CreatePlan assigns the PlanId when the plan is created.

      Parameters:
      planCode - This plan's key within the recommendation, for example pro. The request's planOptions.planPrices, and this plan's upgradePlanCodes and downgradePlanCodes, refer to plans by it. It is not a PlanId: CreatePlan assigns the PlanId when the plan is created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • name

      Plan name shown to buyers, for example Pro or Annual.

      Parameters:
      name - Plan name shown to buyers, for example Pro or Annual.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • billingCycle

      RecommendedPlan.Builder billingCycle(String billingCycle)

      How often the plan bills, as in CreatePlan's definition.billingCycle.

      Parameters:
      billingCycle - How often the plan bills, as in CreatePlan's definition.billingCycle.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • billingCycle

      RecommendedPlan.Builder billingCycle(BillingCycle billingCycle)

      How often the plan bills, as in CreatePlan's definition.billingCycle.

      Parameters:
      billingCycle - How often the plan bills, as in CreatePlan's definition.billingCycle.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • price

      Subscription price per billing cycle.

      Parameters:
      price - Subscription price per billing cycle.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • price

      Subscription price per billing cycle.

      This is a convenience method that creates an instance of the Price.Builder avoiding the need to create one manually via Price.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to price(Price).

      Parameters:
      price - a consumer that will call methods on Price.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • includedQuotas

      RecommendedPlan.Builder includedQuotas(Collection<RecommendedQuota> includedQuotas)

      Units included per action, with what happens past them.

      Parameters:
      includedQuotas - Units included per action, with what happens past them.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • includedQuotas

      RecommendedPlan.Builder includedQuotas(RecommendedQuota... includedQuotas)

      Units included per action, with what happens past them.

      Parameters:
      includedQuotas - Units included per action, with what happens past them.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • includedQuotas

      RecommendedPlan.Builder includedQuotas(Consumer<RecommendedQuota.Builder>... includedQuotas)

      Units included per action, with what happens past them.

      This is a convenience method that creates an instance of the RecommendedQuota.Builder avoiding the need to create one manually via RecommendedQuota.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to includedQuotas(List<RecommendedQuota>).

      Parameters:
      includedQuotas - a consumer that will call methods on RecommendedQuota.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • upgradePlanCodes

      RecommendedPlan.Builder upgradePlanCodes(Collection<String> upgradePlanCodes)

      Plan codes a subscriber can upgrade to, cheapest first.

      Parameters:
      upgradePlanCodes - Plan codes a subscriber can upgrade to, cheapest first.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • upgradePlanCodes

      RecommendedPlan.Builder upgradePlanCodes(String... upgradePlanCodes)

      Plan codes a subscriber can upgrade to, cheapest first.

      Parameters:
      upgradePlanCodes - Plan codes a subscriber can upgrade to, cheapest first.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • downgradePlanCodes

      RecommendedPlan.Builder downgradePlanCodes(Collection<String> downgradePlanCodes)

      Plan codes a subscriber can downgrade to, cheapest first.

      Parameters:
      downgradePlanCodes - Plan codes a subscriber can downgrade to, cheapest first.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • downgradePlanCodes

      RecommendedPlan.Builder downgradePlanCodes(String... downgradePlanCodes)

      Plan codes a subscriber can downgrade to, cheapest first.

      Parameters:
      downgradePlanCodes - Plan codes a subscriber can downgrade to, cheapest first.
      Returns:
      Returns a reference to this object so that method calls can be chained together.