Returns a single Promotion Action 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.promotionActions.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Promotion Action 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.promotionActions.create({
bearer_token: '7381273269536713689562374856',
promotion_action: {
type: 'Spree::Promotion::Actions::CreateAdjustment',
promotion_id: '22'
}
})
Update selected Promotion Action. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionActions.update({
bearer_token: '7381273269536713689562374856',
id: '1',
promotion_action: {
type: 'Spree::Promotion::Actions::CreateAdjustment'
}
})
This endpoint removes the specified Promotion Action. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.promotionActions.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 Actions. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example: