Class UnauthorizedErrorBuilder
- All Implemented Interfaces:
Builder<UnauthorizedError>
Example to create an instance using the builder pattern
UnauthorizedError unauthorizedError = UnauthorizedError.builder()
.message("{message}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()builds UnauthorizedError with checking for non-null required valuesbuilds UnauthorizedError without checking for non-null required values"Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."Keys of Stores for which the required permission to modify is missing.Error-specific additional fields."Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."static UnauthorizedErrorBuilderof()factory method for an instance of UnauthorizedErrorBuilderstatic UnauthorizedErrorBuilderof(UnauthorizedError template) create builder for UnauthorizedError instanceplusStoresWithoutPermission(String... storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.storesWithoutPermission(String... storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.storesWithoutPermission(List<String> storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.Error-specific additional fields.
-
Constructor Details
-
UnauthorizedErrorBuilder
public UnauthorizedErrorBuilder()
-
-
Method Details
-
message
"Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."- Parameters:
message- value to be set- Returns:
- Builder
-
values
Error-specific additional fields.
- Parameters:
values- properties to be set- Returns:
- Builder
-
addValue
Error-specific additional fields.
- Parameters:
key- property namevalue- property value- Returns:
- Builder
-
storesWithoutPermission
public UnauthorizedErrorBuilder storesWithoutPermission(@Nullable String... storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.
This field is returned only for Cart Discounts.
- Parameters:
storesWithoutPermission- value to be set- Returns:
- Builder
-
storesWithoutPermission
public UnauthorizedErrorBuilder storesWithoutPermission(@Nullable List<String> storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.
This field is returned only for Cart Discounts.
- Parameters:
storesWithoutPermission- value to be set- Returns:
- Builder
-
plusStoresWithoutPermission
public UnauthorizedErrorBuilder plusStoresWithoutPermission(@Nullable String... storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.
This field is returned only for Cart Discounts.
- Parameters:
storesWithoutPermission- value to be set- Returns:
- Builder
-
getMessage
"Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getStoresWithoutPermission
Keys of Stores for which the required permission to modify is missing.
This field is returned only for Cart Discounts.
- Returns:
- storesWithoutPermission
-
build
builds UnauthorizedError with checking for non-null required values- Specified by:
buildin interfaceBuilder<UnauthorizedError>- Returns:
- UnauthorizedError
-
buildUnchecked
builds UnauthorizedError without checking for non-null required values- Returns:
- UnauthorizedError
-
of
factory method for an instance of UnauthorizedErrorBuilder- Returns:
- builder
-
of
create builder for UnauthorizedError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-