Class CreditGrantCreateParams.Builder

java.lang.Object
com.stripe.param.billing.CreditGrantCreateParams.Builder
Enclosing class:
CreditGrantCreateParams

public static class CreditGrantCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public CreditGrantCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setAmount

      Required. Amount of this credit grant.
    • setApplicabilityConfig

      public CreditGrantCreateParams.Builder setApplicabilityConfig(CreditGrantCreateParams.ApplicabilityConfig applicabilityConfig)
      Required. Configuration specifying what this credit grant applies to. We currently only support metered prices that have a Billing Meter attached to them.
    • setCategory

      Required. The category of this credit grant.
    • setCustomer

      public CreditGrantCreateParams.Builder setCustomer(String customer)
      Required. ID of the customer to receive the billing credits.
    • setEffectiveAt

      public CreditGrantCreateParams.Builder setEffectiveAt(Long effectiveAt)
      The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
    • addExpand

      public CreditGrantCreateParams.Builder addExpand(String element)
      Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CreditGrantCreateParams.expand for the field documentation.
    • addAllExpand

      public CreditGrantCreateParams.Builder addAllExpand(List<String> elements)
      Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CreditGrantCreateParams.expand for the field documentation.
    • setExpiresAt

      public CreditGrantCreateParams.Builder setExpiresAt(Long expiresAt)
      The time when the billing credits expire. If not specified, the billing credits don't expire.
    • putExtraParam

      public CreditGrantCreateParams.Builder putExtraParam(String key, Object value)
      Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditGrantCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public CreditGrantCreateParams.Builder putAllExtraParam(Map<String,Object> map)
      Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditGrantCreateParams.extraParams for the field documentation.
    • putMetadata

      public CreditGrantCreateParams.Builder putMetadata(String key, String value)
      Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditGrantCreateParams.metadata for the field documentation.
    • putAllMetadata

      public CreditGrantCreateParams.Builder putAllMetadata(Map<String,String> map)
      Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditGrantCreateParams.metadata for the field documentation.
    • setName

      public CreditGrantCreateParams.Builder setName(String name)
      A descriptive name shown in the Dashboard.
    • setPriority

      public CreditGrantCreateParams.Builder setPriority(Long priority)
      The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.