Interface CustomerAddress


public interface CustomerAddress

Different from Address in that key is required and id is not supported.


Example to create an instance using the builder pattern

     CustomerAddress customerAddress = CustomerAddress.builder()
             .key("{key}")
             .country("{country}")
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined identifier for the address. Must follow the pattern [a-zA-Z0-9_\-]{2,256} and must be unique per customer.

      Returns:
      key
    • getTitle

      String getTitle()
      Returns:
      title
    • getSalutation

      String getSalutation()
      Returns:
      salutation
    • getFirstName

      String getFirstName()
      Returns:
      firstName
    • getLastName

      String getLastName()
      Returns:
      lastName
    • getStreetName

      String getStreetName()
      Returns:
      streetName
    • getStreetNumber

      String getStreetNumber()
      Returns:
      streetNumber
    • getAdditionalStreetInfo

      String getAdditionalStreetInfo()
      Returns:
      additionalStreetInfo
    • getPostalCode

      String getPostalCode()
      Returns:
      postalCode
    • getCity

      String getCity()
      Returns:
      city
    • getRegion

      String getRegion()
      Returns:
      region
    • getState

      String getState()
      Returns:
      state
    • getCountry

      @NotNull @NotNull String getCountry()

      A two-digit country code as per ISO 3166-1 alpha-2.

      Returns:
      country
    • getCompany

      String getCompany()
      Returns:
      company
    • getDepartment

      String getDepartment()
      Returns:
      department
    • getBuilding

      String getBuilding()
      Returns:
      building
    • getApartment

      String getApartment()
      Returns:
      apartment
    • getPOBox

      String getPOBox()
      Returns:
      pOBox
    • getPhone

      String getPhone()
      Returns:
      phone
    • getMobile

      String getMobile()
      Returns:
      mobile
    • getEmail

      String getEmail()
      Returns:
      email
    • getFax

      String getFax()
      Returns:
      fax
    • getAdditionalAddressInfo

      String getAdditionalAddressInfo()
      Returns:
      additionalAddressInfo
    • getExternalId

      String getExternalId()
      Returns:
      externalId
    • getCustom

      @Valid @Valid Custom getCustom()

      Custom Fields for the address.

      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined identifier for the address. Must follow the pattern [a-zA-Z0-9_\-]{2,256} and must be unique per customer.

      Parameters:
      key - value to be set
    • setTitle

      void setTitle(String title)
      set title
      Parameters:
      title - value to be set
    • setSalutation

      void setSalutation(String salutation)
      set salutation
      Parameters:
      salutation - value to be set
    • setFirstName

      void setFirstName(String firstName)
      set firstName
      Parameters:
      firstName - value to be set
    • setLastName

      void setLastName(String lastName)
      set lastName
      Parameters:
      lastName - value to be set
    • setStreetName

      void setStreetName(String streetName)
      set streetName
      Parameters:
      streetName - value to be set
    • setStreetNumber

      void setStreetNumber(String streetNumber)
      set streetNumber
      Parameters:
      streetNumber - value to be set
    • setAdditionalStreetInfo

      void setAdditionalStreetInfo(String additionalStreetInfo)
      set additionalStreetInfo
      Parameters:
      additionalStreetInfo - value to be set
    • setPostalCode

      void setPostalCode(String postalCode)
      set postalCode
      Parameters:
      postalCode - value to be set
    • setCity

      void setCity(String city)
      set city
      Parameters:
      city - value to be set
    • setRegion

      void setRegion(String region)
      set region
      Parameters:
      region - value to be set
    • setState

      void setState(String state)
      set state
      Parameters:
      state - value to be set
    • setCountry

      void setCountry(String country)

      A two-digit country code as per ISO 3166-1 alpha-2.

      Parameters:
      country - value to be set
    • setCompany

      void setCompany(String company)
      set company
      Parameters:
      company - value to be set
    • setDepartment

      void setDepartment(String department)
      set department
      Parameters:
      department - value to be set
    • setBuilding

      void setBuilding(String building)
      set building
      Parameters:
      building - value to be set
    • setApartment

      void setApartment(String apartment)
      set apartment
      Parameters:
      apartment - value to be set
    • setPOBox

      void setPOBox(String pOBox)
      set pOBox
      Parameters:
      pOBox - value to be set
    • setPhone

      void setPhone(String phone)
      set phone
      Parameters:
      phone - value to be set
    • setMobile

      void setMobile(String mobile)
      set mobile
      Parameters:
      mobile - value to be set
    • setEmail

      void setEmail(String email)
      set email
      Parameters:
      email - value to be set
    • setFax

      void setFax(String fax)
      set fax
      Parameters:
      fax - value to be set
    • setAdditionalAddressInfo

      void setAdditionalAddressInfo(String additionalAddressInfo)
      set additionalAddressInfo
      Parameters:
      additionalAddressInfo - value to be set
    • setExternalId

      void setExternalId(String externalId)
      set externalId
      Parameters:
      externalId - value to be set
    • setCustom

      void setCustom(Custom custom)

      Custom Fields for the address.

      Parameters:
      custom - value to be set
    • of

      static CustomerAddress of()
      factory method
      Returns:
      instance of CustomerAddress
    • of

      static CustomerAddress of(CustomerAddress template)
      factory method to create a shallow copy CustomerAddress
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static CustomerAddress deepCopy(@Nullable CustomerAddress template)
      factory method to create a deep copy of CustomerAddress
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CustomerAddressBuilder builder()
      builder factory method for CustomerAddress
      Returns:
      builder
    • builder

      static CustomerAddressBuilder builder(CustomerAddress template)
      create builder for CustomerAddress instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomerAddress

      default <T> T withCustomerAddress(Function<CustomerAddress,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CustomerAddress> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference