Returns a single Promotion Rule by its ID. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionRules.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Promotion Rule and returns its attributes. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionRules.create({
bearer_token: '7381273269536713689562374856',
promotion_rule: {
promotion_id: '22',
type: 'Spree::Promotion::Rules::Country'
}
})
Update selected Promotion Rule. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionRules.update({
bearer_token: '7381273269536713689562374856',
id: '1',
promotion_rule: {
promotion_id: '22',
type: 'Spree::Promotion::Rules::Country'
}
})
This endpoint removes the specified Promotion Rule. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionRules.remove({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Protected
spreeOptional
tokens: ITokenOptional
params: anyOptional
responseParsing: ResponseParsingProtected
classifyProtected
processProtected
processProtected
spreeGenerated using TypeDoc
Returns a list of all Promotion Rules. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example: