Interface PlanDefinition.Builder

  • Method Details

    • name

      A human-readable display name for the plan.

      Parameters:
      name - A human-readable display name for the plan.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      PlanDefinition.Builder description(String description)

      A human-readable description of the plan.

      Parameters:
      description - A human-readable description of the plan.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • billingCycle

      PlanDefinition.Builder billingCycle(String billingCycle)

      How often the plan bills.

      Parameters:
      billingCycle - How often the plan bills.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • billingCycle

      PlanDefinition.Builder billingCycle(BillingCycle billingCycle)

      How often the plan bills.

      Parameters:
      billingCycle - How often the plan bills.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • subscriptionPrice

      PlanDefinition.Builder subscriptionPrice(Price subscriptionPrice)

      The recurring subscription price charged each billing cycle.

      Parameters:
      subscriptionPrice - The recurring subscription price charged each billing cycle.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • subscriptionPrice

      default PlanDefinition.Builder subscriptionPrice(Consumer<Price.Builder> subscriptionPrice)

      The recurring subscription price charged each 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 subscriptionPrice(Price).

      Parameters:
      subscriptionPrice - 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

      PlanDefinition.Builder includedQuotas(Map<String,AppQuotaConfig> includedQuotas)

      The usage quotas included with the plan, keyed by metric ID. Each entry prices one metric with either a flat grant or a tiered-priced grant.

      Parameters:
      includedQuotas - The usage quotas included with the plan, keyed by metric ID. Each entry prices one metric with either a flat grant or a tiered-priced grant.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • taxCode

      PlanDefinition.Builder taxCode(String taxCode)

      The product tax code for the plan's price. See ProductTaxCode.

      Parameters:
      taxCode - The product tax code for the plan's price. See ProductTaxCode.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • paymentFailurePolicy

      PlanDefinition.Builder paymentFailurePolicy(PaymentFailurePolicy paymentFailurePolicy)

      How the plan handles a failed recurring payment.

      Parameters:
      paymentFailurePolicy - How the plan handles a failed recurring payment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • paymentFailurePolicy

      default PlanDefinition.Builder paymentFailurePolicy(Consumer<PaymentFailurePolicy.Builder> paymentFailurePolicy)

      How the plan handles a failed recurring payment.

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

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

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