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 MyCompanyDraftBuilder
builder for company subtypestatic MyBusinessUnitDraft
deepCopy
(MyBusinessUnitDraft template) factory method to create a deep copy of MyBusinessUnitDraftstatic MyDivisionDraftBuilder
builder for division subtype@Valid List<BaseAddress>
Addresses used by the Business Unit.Indexes of entries inaddresses
to set as billing addresses.Email address of the Business Unit.@Valid CustomFieldsDraft
Custom Fields for the Business Unit.Index of the entry inaddresses
to set as the default billing address.Index of the entry inaddresses
to set as the default shipping address.@NotNull String
getKey()
User-defined unique identifier for the BusinessUnit.@NotNull String
getName()
Name of the Business Unit.Indexes of entries inaddresses
to set as shipping addresses.@NotNull BusinessUnitType
Type of the Business Unit indicating its position in a hierarchy.void
setAddresses
(BaseAddress... addresses) Addresses used by the Business Unit.void
setAddresses
(List<BaseAddress> addresses) Addresses used by the Business Unit.void
setBillingAddresses
(Integer... billingAddresses) Indexes of entries inaddresses
to set as billing addresses.void
setBillingAddresses
(List<Integer> billingAddresses) Indexes of entries inaddresses
to set as billing addresses.void
setContactEmail
(String contactEmail) Email address of the Business Unit.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Business Unit.void
setDefaultBillingAddress
(Integer defaultBillingAddress) Index of the entry inaddresses
to set as the default billing address.void
setDefaultShippingAddress
(Integer defaultShippingAddress) Index of the entry inaddresses
to set as the default shipping address.void
User-defined unique identifier for the BusinessUnit.void
Name of the Business Unit.void
setShippingAddresses
(Integer... shippingAddresses) Indexes of entries inaddresses
to set as shipping addresses.void
setShippingAddresses
(List<Integer> shippingAddresses) Indexes of entries inaddresses
to set as shipping addresses.static com.fasterxml.jackson.core.type.TypeReference<MyBusinessUnitDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withMyBusinessUnitDraft
(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:
getCustom
in interfaceCustomizableDraft<MyBusinessUnitDraft>
- Returns:
- custom
-
getAddresses
Addresses used by the Business Unit.
- Returns:
- addresses
-
getShippingAddresses
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Returns:
- shippingAddresses
-
getDefaultShippingAddress
Integer getDefaultShippingAddress()Index of the entry in
addresses
to set as the default shipping address.- Returns:
- defaultShippingAddress
-
getBillingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Returns:
- billingAddresses
-
getDefaultBillingAddress
Integer getDefaultBillingAddress()Index of the entry in
addresses
to 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:
setCustom
in 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
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
shippingAddresses
- values to be set
-
setShippingAddresses
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
shippingAddresses
- values to be set
-
setDefaultShippingAddress
Index of the entry in
addresses
to set as the default shipping address.- Parameters:
defaultShippingAddress
- value to be set
-
setBillingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
billingAddresses
- values to be set
-
setBillingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
billingAddresses
- values to be set
-
setDefaultBillingAddress
Index of the entry in
addresses
to set as the default billing address.- Parameters:
defaultBillingAddress
- value to be set
-
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
-