Interface PlanPrice.Builder

  • Method Details

    • planCode

      PlanPrice.Builder planCode(String planCode)

      Plan code as returned in plans, for example pro. Each plan code appears once.

      Parameters:
      planCode - Plan code as returned in plans, for example pro. Each plan code appears once.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • actionName

      PlanPrice.Builder actionName(String actionName)

      With pay_as_you_go only: the action this rate is for, one of actions[].name; the other actions keep their recommended rates. Absent on pay_as_you_go: one rate for every charged action, accepted only when pricingModel is PER_USE.

      Parameters:
      actionName - With pay_as_you_go only: the action this rate is for, one of actions[].name; the other actions keep their recommended rates. Absent on pay_as_you_go: one rate for every charged action, accepted only when pricingModel is PER_USE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • price

      PlanPrice.Builder price(Price price)

      Price per billing cycle, or per use for pay_as_you_go (at least 0.01). A whole number of cents. USD only: another currencyCode is rejected.

      Parameters:
      price - Price per billing cycle, or per use for pay_as_you_go (at least 0.01). A whole number of cents. USD only: another currencyCode is rejected.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • price

      default PlanPrice.Builder price(Consumer<Price.Builder> price)

      Price per billing cycle, or per use for pay_as_you_go (at least 0.01). A whole number of cents. USD only: another currencyCode is rejected.

      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: