Class Billing.Builder

  • Enclosing class:
    Billing

    public static final class Billing.Builder
    extends Object
    Builder creates instances of Billing from values set by the builder's methods.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public Billing build()
        Returns:
        An instance of Billing created from the fields set on this builder.
      • firstName

        public final T firstName​(String name)
        Parameters:
        name - The first name associated with the address
        Returns:
        The builder object.
      • lastName

        public final T lastName​(String name)
        Parameters:
        name - The last name associated with the address
        Returns:
        The builder object.
      • company

        public final T company​(String name)
        Parameters:
        name - The company name associated with the address
        Returns:
        The builder object.
      • address

        public final T address​(String address)
        Parameters:
        address - The first line of the address
        Returns:
        The builder object.
      • address2

        public final T address2​(String address2)
        Parameters:
        address2 - The second line of the address
        Returns:
        The builder object.
      • city

        public final T city​(String name)
        Parameters:
        name - The city associated with the address
        Returns:
        The builder object.
      • region

        public final T region​(String code)
        Parameters:
        code - The ISO 3166-2 subdivision code for the region associated with the address
        Returns:
        The builder object.
      • country

        public final T country​(String code)
        Parameters:
        code - The ISO 3166-1 alpha-2 country code for the country associated with the address (e.g, "US")
        Returns:
        The builder object.
        Throws:
        IllegalArgumentException - when code is not a two-letter country code.
      • postal

        public final T postal​(String code)
        Parameters:
        code - The postal code for associated with the address
        Returns:
        The builder object.
      • phoneCountryCode

        public final T phoneCountryCode​(String code)
        Parameters:
        code - The phone country code for the phone number associated with the address
        Returns:
        The builder object.
      • phoneNumber

        public final T phoneNumber​(String number)
        Parameters:
        number - The phone number, without the country code, associated with the address
        Returns:
        The builder object.