Skip to content

Commit

Permalink
feat: add cancel jobs endpoint in rule promotions (#43)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: add cancel jobs endpoint in rule promotions
  • Loading branch information
ellanan authored Dec 18, 2024
1 parent 2bb6f2b commit cc94237
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/endpoints/rule-promotions.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class RulePromotionsEndpoint extends CRUDExtend {
)
}

CancelJob(promotionId, jobId) {
return this.request.send(`${this.endpoint}/${promotionId}/jobs/${jobId}/cancel`, 'POST')
}

AddCodes(promotionId, codes) {
return this.request.send(`${this.endpoint}/${promotionId}/codes`, 'POST', {
type: 'promotion_codes',
Expand Down
2 changes: 2 additions & 0 deletions src/types/rule-promotions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ export interface RulePromotionsEndpoint
body: RulePromotionCodesJob
): Promise<Resource<RulePromotionJob>>

CancelJob(promotionId: string, jobId: string): Promise<{}>

DeleteCode(promotionId: string, codeId: string): Promise<{}>

DeleteCodes(
Expand Down

0 comments on commit cc94237

Please sign in to comment.