io.sphere.sdk.customergroups.CustomerGroup Maven / Gradle / Ivy
package io.sphere.sdk.customergroups;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.customers.Customer;
import io.sphere.sdk.models.Resource;
import io.sphere.sdk.models.Reference;
/**
* A Customer can be a member of a customer group (e.g. reseller, gold member). Special prices can be assigned to specific products based on a customer group.
*
* @see io.sphere.sdk.customergroups.commands.CustomerGroupCreateCommand
* @see io.sphere.sdk.customergroups.commands.CustomerGroupUpdateCommand
* @see io.sphere.sdk.customergroups.commands.CustomerGroupDeleteCommand
* @see io.sphere.sdk.customergroups.queries.CustomerGroupQuery
* @see io.sphere.sdk.customergroups.queries.CustomerGroupByIdGet
* @see io.sphere.sdk.customers.commands.updateactions.SetCustomerGroup
* @see Customer#getCustomerGroup()
*/
@JsonDeserialize(as = CustomerGroupImpl.class)
public interface CustomerGroup extends Resource {
String getName();
@Override
default Reference toReference() {
return Reference.of(referenceTypeId(), getId(), this);
}
static String referenceTypeId() {
return "customer-group";
}
/**
*
* @deprecated use {@link #referenceTypeId()} instead
* @return referenceTypeId
*/
@Deprecated
static String typeId(){
return "customer-group";
}
static TypeReference typeReference(){
return new TypeReference() {
@Override
public String toString() {
return "TypeReference";
}
};
}
static Reference referenceOfId(final String id) {
return Reference.of(referenceTypeId(), id);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy