Interface CreatedBy
- All Superinterfaces:
ClientLogging
- All Known Implementing Classes:
CreatedByImpl
Present on resources created after 1 February 2019 except for events not tracked.
Example to create an instance using the builder pattern
CreatedBy createdBy = CreatedBy.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CreatedByBuilder
builder()
builder factory method for CreatedBystatic CreatedByBuilder
create builder for CreatedBy instancestatic CreatedBy
factory method to create a deep copy of CreatedByIndicates the anonymous session during which the resource was created.id
of the APIClient which created the resource.@Valid CustomerReference
Indicates the Customer who created the resource using a token from the password flow.External user ID provided byX-External-User-ID
HTTP Header.static CreatedBy
of()
factory methodstatic CreatedBy
factory method to create a shallow copy CreatedByvoid
setAnonymousId
(String anonymousId) Indicates the anonymous session during which the resource was created.void
setClientId
(String clientId) id
of the APIClient which created the resource.void
setCustomer
(CustomerReference customer) Indicates the Customer who created the resource using a token from the password flow.void
setExternalUserId
(String externalUserId) External user ID provided byX-External-User-ID
HTTP Header.static com.fasterxml.jackson.core.type.TypeReference<CreatedBy>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCreatedBy
(Function<CreatedBy, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.ClientLogging
withClientLogging
-
Method Details
-
getClientId
id
of the APIClient which created the resource.- Specified by:
getClientId
in interfaceClientLogging
- Returns:
- clientId
-
getExternalUserId
External user ID provided by
X-External-User-ID
HTTP Header.- Specified by:
getExternalUserId
in interfaceClientLogging
- Returns:
- externalUserId
-
getCustomer
Indicates the Customer who created the resource using a token from the password flow.
- Specified by:
getCustomer
in interfaceClientLogging
- Returns:
- customer
-
getAnonymousId
Indicates the anonymous session during which the resource was created.
- Specified by:
getAnonymousId
in interfaceClientLogging
- Returns:
- anonymousId
-
setClientId
id
of the APIClient which created the resource.- Specified by:
setClientId
in interfaceClientLogging
- Parameters:
clientId
- value to be set
-
setExternalUserId
External user ID provided by
X-External-User-ID
HTTP Header.- Specified by:
setExternalUserId
in interfaceClientLogging
- Parameters:
externalUserId
- value to be set
-
setCustomer
Indicates the Customer who created the resource using a token from the password flow.
- Specified by:
setCustomer
in interfaceClientLogging
- Parameters:
customer
- value to be set
-
setAnonymousId
Indicates the anonymous session during which the resource was created.
- Specified by:
setAnonymousId
in interfaceClientLogging
- Parameters:
anonymousId
- value to be set
-
of
factory method- Returns:
- instance of CreatedBy
-
of
factory method to create a shallow copy CreatedBy- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CreatedBy- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CreatedBy- Returns:
- builder
-
builder
create builder for CreatedBy instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCreatedBy
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
-