Interface CustomerGroup
- All Superinterfaces:
BaseResource
,CustomerGroupMixin
,Customizable<CustomerGroup>
,DomainResource<CustomerGroup>
,Identifiable<CustomerGroup>
,Referencable<CustomerGroup>
,ResourceIdentifiable<CustomerGroup>
,Versioned<CustomerGroup>
,WithKey
- All Known Implementing Classes:
CustomerGroupImpl
Example to create an instance using the builder pattern
CustomerGroup customerGroup = CustomerGroup.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name("{name}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomerGroupBuilder
builder()
builder factory method for CustomerGroupstatic CustomerGroupBuilder
builder
(CustomerGroup template) create builder for CustomerGroup instancestatic CustomerGroup
deepCopy
(CustomerGroup template) factory method to create a deep copy of CustomerGroup@NotNull ZonedDateTime
Date and time (UTC) the CustomerGroup was initially created.@Valid CreatedBy
Present on resources created after 1 February 2019 except for events not tracked.@Valid CustomFields
Custom Fields for the CustomerGroup.@NotNull String
getId()
Unique identifier of the CustomerGroup.getKey()
User-defined unique identifier for the CustomerGroup.@NotNull ZonedDateTime
Date and time (UTC) the CustomerGroup was last updated.@Valid LastModifiedBy
Present on resources updated after 1 February 2019 except for events not tracked.@NotNull String
getName()
Unique name of the CustomerGroup.@NotNull Long
Current version of the CustomerGroup.static CustomerGroup
of()
factory methodstatic CustomerGroup
of
(CustomerGroup template) factory method to create a shallow copy CustomerGroupstatic ReferenceTypeId
void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the CustomerGroup was initially created.void
setCreatedBy
(CreatedBy createdBy) Present on resources created after 1 February 2019 except for events not tracked.void
setCustom
(CustomFields custom) Custom Fields for the CustomerGroup.void
Unique identifier of the CustomerGroup.void
User-defined unique identifier for the CustomerGroup.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the CustomerGroup was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources updated after 1 February 2019 except for events not tracked.void
Unique name of the CustomerGroup.void
setVersion
(Long version) Current version of the CustomerGroup.static com.fasterxml.jackson.core.type.TypeReference<CustomerGroup>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCustomerGroup
(Function<CustomerGroup, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.customer_group.CustomerGroupMixin
toReference, toResourceIdentifier
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the CustomerGroup.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<CustomerGroup>
- Specified by:
getId
in interfaceIdentifiable<CustomerGroup>
- Specified by:
getId
in interfaceVersioned<CustomerGroup>
- Returns:
- id
-
getVersion
Current version of the CustomerGroup.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<CustomerGroup>
- Specified by:
getVersion
in interfaceVersioned<CustomerGroup>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the CustomerGroup was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the CustomerGroup was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources updated after 1 February 2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier for the CustomerGroup.
-
getName
Unique name of the CustomerGroup.
- Returns:
- name
-
getCustom
Custom Fields for the CustomerGroup.
- Specified by:
getCustom
in interfaceCustomizable<CustomerGroup>
- Returns:
- custom
-
setId
Unique identifier of the CustomerGroup.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the CustomerGroup.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the CustomerGroup was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the CustomerGroup was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
Present on resources updated after 1 February 2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
createdBy
- value to be set
-
setKey
User-defined unique identifier for the CustomerGroup.
- Parameters:
key
- value to be set
-
setName
Unique name of the CustomerGroup.
- Parameters:
name
- value to be set
-
setCustom
Custom Fields for the CustomerGroup.
- Specified by:
setCustom
in interfaceCustomizable<CustomerGroup>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of CustomerGroup
-
of
factory method to create a shallow copy CustomerGroup- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CustomerGroup- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomerGroup- Returns:
- builder
-
builder
create builder for CustomerGroup instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCustomerGroup
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-