Class CustomerCreateParams.Builder

  • Enclosing class:
    CustomerCreateParams

    public static class CustomerCreateParams.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public CustomerCreateParams build()
        Finalize and obtain parameter instance from this builder.
      • setBalance

        public CustomerCreateParams.Builder setBalance​(java.lang.Long balance)
        An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
      • setDescription

        public CustomerCreateParams.Builder setDescription​(java.lang.String description)
        An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
      • setEmail

        public CustomerCreateParams.Builder setEmail​(java.lang.String email)
        Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to 512 characters.
      • addExpand

        public CustomerCreateParams.Builder addExpand​(java.lang.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 CustomerCreateParams.expand for the field documentation.
      • addAllExpand

        public CustomerCreateParams.Builder addAllExpand​(java.util.List<java.lang.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 CustomerCreateParams.expand for the field documentation.
      • putExtraParam

        public CustomerCreateParams.Builder putExtraParam​(java.lang.String key,
                                                          java.lang.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 CustomerCreateParams.extraParams for the field documentation.
      • putAllExtraParam

        public CustomerCreateParams.Builder putAllExtraParam​(java.util.Map<java.lang.String,​java.lang.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 CustomerCreateParams.extraParams for the field documentation.
      • setInvoicePrefix

        public CustomerCreateParams.Builder setInvoicePrefix​(java.lang.String invoicePrefix)
        The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
      • putMetadata

        public CustomerCreateParams.Builder putMetadata​(java.lang.String key,
                                                        java.lang.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 CustomerCreateParams.metadata for the field documentation.
      • putAllMetadata

        public CustomerCreateParams.Builder putAllMetadata​(java.util.Map<java.lang.String,​java.lang.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 CustomerCreateParams.metadata for the field documentation.
      • setMetadata

        public CustomerCreateParams.Builder setMetadata​(EmptyParam metadata)
        Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
      • setMetadata

        public CustomerCreateParams.Builder setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
        Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
      • setNextInvoiceSequence

        public CustomerCreateParams.Builder setNextInvoiceSequence​(java.lang.Long nextInvoiceSequence)
        The sequence to be used on the customer's next invoice. Defaults to 1.
      • addPreferredLocale

        public CustomerCreateParams.Builder addPreferredLocale​(java.lang.String element)
        Add an element to `preferredLocales` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CustomerCreateParams.preferredLocales for the field documentation.
      • addAllPreferredLocale

        public CustomerCreateParams.Builder addAllPreferredLocale​(java.util.List<java.lang.String> elements)
        Add all elements to `preferredLocales` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CustomerCreateParams.preferredLocales for the field documentation.
      • setPromotionCode

        public CustomerCreateParams.Builder setPromotionCode​(java.lang.String promotionCode)
        The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.