Interface MyCustomerDraft

All Superinterfaces:
CustomizableDraft<MyCustomerDraft>, io.vrap.rmf.base.client.Draft<MyCustomerDraft>
All Known Implementing Classes:
MyCustomerDraftImpl

public interface MyCustomerDraft extends CustomizableDraft<MyCustomerDraft>, io.vrap.rmf.base.client.Draft<MyCustomerDraft>
MyCustomerDraft
Example to create an instance using the builder pattern

     MyCustomerDraft myCustomerDraft = MyCustomerDraft.builder()
             .email("{email}")
             .password("{password}")
             .build()
 
  • Method Details

    • getEmail

      @NotNull @NotNull String getEmail()

      Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.

      Returns:
      email
    • getPassword

      @NotNull @NotNull String getPassword()

      Password of the Customer.

      Returns:
      password
    • getFirstName

      String getFirstName()

      Given name (first name) of the Customer.

      Returns:
      firstName
    • getLastName

      String getLastName()

      Family name (last name) of the Customer.

      Returns:
      lastName
    • getMiddleName

      String getMiddleName()

      Middle name of the Customer.

      Returns:
      middleName
    • getTitle

      String getTitle()

      Title of the Customer, for example, 'Dr.'.

      Returns:
      title
    • getSalutation

      String getSalutation()

      Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.

      Returns:
      salutation
    • getDateOfBirth

      LocalDate getDateOfBirth()

      Date of birth of the Customer.

      Returns:
      dateOfBirth
    • getCompanyName

      String getCompanyName()

      Company name of the Customer.

      Returns:
      companyName
    • getVatId

      String getVatId()

      Individual VAT ID of the Customer.

      Returns:
      vatId
    • getAddresses

      @Valid @Valid List<BaseAddress> getAddresses()

      Addresses of the Customer.

      Returns:
      addresses
    • getDefaultShippingAddress

      Long getDefaultShippingAddress()

      Index of the address in the addresses array to use as the default shipping address. The defaultShippingAddressId of the Customer will be set to the id of that address.

      Returns:
      defaultShippingAddress
    • getDefaultBillingAddress

      Long getDefaultBillingAddress()

      Index of the address in the addresses array to use as the default billing address. The defaultBillingAddressId of the Customer will be set to the id of that address.

      Returns:
      defaultBillingAddress
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Customer.

      Specified by:
      getCustom in interface CustomizableDraft<MyCustomerDraft>
      Returns:
      custom
    • getLocale

      String getLocale()

      Preferred language of the Customer. Must be one of the languages supported by the Project.

      Returns:
      locale
    • getStores

      @Valid @Valid List<StoreResourceIdentifier> getStores()

      Sets the Stores for the Customer.

      Returns:
      stores
    • setEmail

      void setEmail(String email)

      Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.

      Parameters:
      email - value to be set
    • setPassword

      void setPassword(String password)

      Password of the Customer.

      Parameters:
      password - value to be set
    • setFirstName

      void setFirstName(String firstName)

      Given name (first name) of the Customer.

      Parameters:
      firstName - value to be set
    • setLastName

      void setLastName(String lastName)

      Family name (last name) of the Customer.

      Parameters:
      lastName - value to be set
    • setMiddleName

      void setMiddleName(String middleName)

      Middle name of the Customer.

      Parameters:
      middleName - value to be set
    • setTitle

      void setTitle(String title)

      Title of the Customer, for example, 'Dr.'.

      Parameters:
      title - value to be set
    • setSalutation

      void setSalutation(String salutation)

      Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.

      Parameters:
      salutation - value to be set
    • setDateOfBirth

      void setDateOfBirth(LocalDate dateOfBirth)

      Date of birth of the Customer.

      Parameters:
      dateOfBirth - value to be set
    • setCompanyName

      void setCompanyName(String companyName)

      Company name of the Customer.

      Parameters:
      companyName - value to be set
    • setVatId

      void setVatId(String vatId)

      Individual VAT ID of the Customer.

      Parameters:
      vatId - value to be set
    • setAddresses

      void setAddresses(BaseAddress... addresses)

      Addresses of the Customer.

      Parameters:
      addresses - values to be set
    • setAddresses

      void setAddresses(List<BaseAddress> addresses)

      Addresses of the Customer.

      Parameters:
      addresses - values to be set
    • setDefaultShippingAddress

      void setDefaultShippingAddress(Long defaultShippingAddress)

      Index of the address in the addresses array to use as the default shipping address. The defaultShippingAddressId of the Customer will be set to the id of that address.

      Parameters:
      defaultShippingAddress - value to be set
    • setDefaultBillingAddress

      void setDefaultBillingAddress(Long defaultBillingAddress)

      Index of the address in the addresses array to use as the default billing address. The defaultBillingAddressId of the Customer will be set to the id of that address.

      Parameters:
      defaultBillingAddress - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Customer.

      Specified by:
      setCustom in interface CustomizableDraft<MyCustomerDraft>
      Parameters:
      custom - value to be set
    • setLocale

      void setLocale(String locale)

      Preferred language of the Customer. Must be one of the languages supported by the Project.

      Parameters:
      locale - value to be set
    • setStores

      void setStores(StoreResourceIdentifier... stores)

      Sets the Stores for the Customer.

      Parameters:
      stores - values to be set
    • setStores

      void setStores(List<StoreResourceIdentifier> stores)

      Sets the Stores for the Customer.

      Parameters:
      stores - values to be set
    • of

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

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

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

      static MyCustomerDraftBuilder builder()
      builder factory method for MyCustomerDraft
      Returns:
      builder
    • builder

      static MyCustomerDraftBuilder builder(MyCustomerDraft template)
      create builder for MyCustomerDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMyCustomerDraft

      default <T> T withMyCustomerDraft(Function<MyCustomerDraft,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<MyCustomerDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference