All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stripe.param.TaxIdCollectionCreateParams Maven / Gradle / Ivy

There is a newer version: 28.2.0
Show newest version
// Generated by delombok at Fri May 03 17:08:00 PDT 2019
// Generated by com.stripe.generator.entity.SdkBuilder
package com.stripe.param;

import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import java.util.ArrayList;
import java.util.List;

public class TaxIdCollectionCreateParams extends ApiRequestParams {
  /**
   * Specifies which fields in the response should be expanded.
   */
  @SerializedName("expand")
  List expand;
  /**
   * Type of the tax ID, one of `eu_vat`, `nz_gst`, or `au_abn`.
   */
  @SerializedName("type")
  Type type;
  /**
   * Value of the tax ID.
   */
  @SerializedName("value")
  String value;

  private TaxIdCollectionCreateParams(List expand, Type type, String value) {
    this.expand = expand;
    this.type = type;
    this.value = value;
  }

  public static Builder builder() {
    return new com.stripe.param.TaxIdCollectionCreateParams.Builder();
  }


  public static class Builder {
    private List expand;
    private Type type;
    private String value;

    /**
     * Finalize and obtain parameter instance from this builder.
     */
    public TaxIdCollectionCreateParams build() {
      return new TaxIdCollectionCreateParams(this.expand, this.type, this.value);
    }

    /**
     * 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 {@link
     * TaxIdCollectionCreateParams#expand} for the field documentation.
     */
    public Builder addExpand(String element) {
      if (this.expand == null) {
        this.expand = new ArrayList<>();
      }
      this.expand.add(element);
      return this;
    }

    /**
     * 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 {@link
     * TaxIdCollectionCreateParams#expand} for the field documentation.
     */
    public Builder addAllExpand(List elements) {
      if (this.expand == null) {
        this.expand = new ArrayList<>();
      }
      this.expand.addAll(elements);
      return this;
    }

    /**
     * Type of the tax ID, one of `eu_vat`, `nz_gst`, or `au_abn`.
     */
    public Builder setType(Type type) {
      this.type = type;
      return this;
    }

    /**
     * Value of the tax ID.
     */
    public Builder setValue(String value) {
      this.value = value;
      return this;
    }
  }


  public enum Type implements ApiRequestParams.EnumParam {
    @SerializedName("au_abn")
    AU_ABN("au_abn"), @SerializedName("eu_vat")
    EU_VAT("eu_vat"), @SerializedName("nz_gst")
    NZ_GST("nz_gst");
    private final String value;

    Type(String value) {
      this.value = value;
    }

    @Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getValue() {
      return this.value;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy