Interface MyBusinessUnitDraft
- All Superinterfaces:
CustomizableDraft<MyBusinessUnitDraft>,WithKey
- All Known Subinterfaces:
MyCompanyDraft,MyDivisionDraft
Example to create a subtype instance using the builder pattern
MyBusinessUnitDraft myBusinessUnitDraft = MyBusinessUnitDraft.companyBuilder()
key("{key}")
name("{name}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic MyCompanyDraftBuilderbuilder for company subtypecopyDeep()static MyBusinessUnitDraftdeepCopy(MyBusinessUnitDraft template) factory method to create a deep copy of MyBusinessUnitDraftstatic MyDivisionDraftBuilderbuilder for division subtype@Valid List<BaseAddress>Addresses used by the Business Unit.Indexes of entries inaddressesto set as billing addresses.Email address of the Business Unit.@Valid CustomFieldsDraftCustom Fields for the Business Unit.Index of the entry inaddressesto set as the default billing address.Index of the entry inaddressesto set as the default shipping address.@NotNull StringgetKey()User-defined unique identifier for the BusinessUnit.@NotNull StringgetName()Name of the Business Unit.Indexes of entries inaddressesto set as shipping addresses.@NotNull BusinessUnitTypeType of the Business Unit indicating its position in a hierarchy.voidsetAddresses(BaseAddress... addresses) Addresses used by the Business Unit.voidsetAddresses(List<BaseAddress> addresses) Addresses used by the Business Unit.voidsetBillingAddresses(Integer... billingAddresses) Indexes of entries inaddressesto set as billing addresses.voidsetBillingAddresses(List<Integer> billingAddresses) Indexes of entries inaddressesto set as billing addresses.voidsetContactEmail(String contactEmail) Email address of the Business Unit.voidsetCustom(CustomFieldsDraft custom) Custom Fields for the Business Unit.voidsetDefaultBillingAddress(Integer defaultBillingAddress) Index of the entry inaddressesto set as the default billing address.voidsetDefaultShippingAddress(Integer defaultShippingAddress) Index of the entry inaddressesto set as the default shipping address.voidUser-defined unique identifier for the BusinessUnit.voidName of the Business Unit.voidsetShippingAddresses(Integer... shippingAddresses) Indexes of entries inaddressesto set as shipping addresses.voidsetShippingAddresses(List<Integer> shippingAddresses) Indexes of entries inaddressesto set as shipping addresses.static com.fasterxml.jackson.core.type.TypeReference<MyBusinessUnitDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithMyBusinessUnitDraft(Function<MyBusinessUnitDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
User-defined unique identifier for the BusinessUnit.
-
getUnitType
Type of the Business Unit indicating its position in a hierarchy.
- Returns:
- unitType
-
getName
Name of the Business Unit.
- Returns:
- name
-
getContactEmail
String getContactEmail()Email address of the Business Unit.
- Returns:
- contactEmail
-
getCustom
Custom Fields for the Business Unit.
- Specified by:
getCustomin interfaceCustomizableDraft<MyBusinessUnitDraft>- Returns:
- custom
-
getAddresses
Addresses used by the Business Unit.
- Returns:
- addresses
-
getShippingAddresses
Indexes of entries in
addressesto set as shipping addresses. TheshippingAddressIdsof the Customer will be replaced by these addresses.- Returns:
- shippingAddresses
-
getDefaultShippingAddress
Integer getDefaultShippingAddress()Index of the entry in
addressesto set as the default shipping address.- Returns:
- defaultShippingAddress
-
getBillingAddresses
Indexes of entries in
addressesto set as billing addresses. ThebillingAddressIdsof the Customer will be replaced by these addresses.- Returns:
- billingAddresses
-
getDefaultBillingAddress
Integer getDefaultBillingAddress()Index of the entry in
addressesto set as the default billing address.- Returns:
- defaultBillingAddress
-
setKey
User-defined unique identifier for the BusinessUnit.
- Parameters:
key- value to be set
-
setName
Name of the Business Unit.
- Parameters:
name- value to be set
-
setContactEmail
Email address of the Business Unit.
- Parameters:
contactEmail- value to be set
-
setCustom
Custom Fields for the Business Unit.
- Specified by:
setCustomin interfaceCustomizableDraft<MyBusinessUnitDraft>- Parameters:
custom- value to be set
-
setAddresses
Addresses used by the Business Unit.
- Parameters:
addresses- values to be set
-
setAddresses
Addresses used by the Business Unit.
- Parameters:
addresses- values to be set
-
setShippingAddresses
Indexes of entries in
addressesto set as shipping addresses. TheshippingAddressIdsof the Customer will be replaced by these addresses.- Parameters:
shippingAddresses- values to be set
-
setShippingAddresses
Indexes of entries in
addressesto set as shipping addresses. TheshippingAddressIdsof the Customer will be replaced by these addresses.- Parameters:
shippingAddresses- values to be set
-
setDefaultShippingAddress
Index of the entry in
addressesto set as the default shipping address.- Parameters:
defaultShippingAddress- value to be set
-
setBillingAddresses
Indexes of entries in
addressesto set as billing addresses. ThebillingAddressIdsof the Customer will be replaced by these addresses.- Parameters:
billingAddresses- values to be set
-
setBillingAddresses
Indexes of entries in
addressesto set as billing addresses. ThebillingAddressIdsof the Customer will be replaced by these addresses.- Parameters:
billingAddresses- values to be set
-
setDefaultBillingAddress
Index of the entry in
addressesto set as the default billing address.- Parameters:
defaultBillingAddress- value to be set
-
copyDeep
MyBusinessUnitDraft copyDeep() -
deepCopy
factory method to create a deep copy of MyBusinessUnitDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
companyBuilder
builder for company subtype- Returns:
- builder
-
divisionBuilder
builder for division subtype- Returns:
- builder
-
withMyBusinessUnitDraft
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-