Skip to content

Commit cc94237

Browse files
authored
feat: add cancel jobs endpoint in rule promotions (#43)
BREAKING CHANGE: add cancel jobs endpoint in rule promotions
1 parent 2bb6f2b commit cc94237

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/endpoints/rule-promotions.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ class RulePromotionsEndpoint extends CRUDExtend {
5757
)
5858
}
5959

60+
CancelJob(promotionId, jobId) {
61+
return this.request.send(`${this.endpoint}/${promotionId}/jobs/${jobId}/cancel`, 'POST')
62+
}
63+
6064
AddCodes(promotionId, codes) {
6165
return this.request.send(`${this.endpoint}/${promotionId}/codes`, 'POST', {
6266
type: 'promotion_codes',

src/types/rule-promotions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ export interface RulePromotionsEndpoint
166166
body: RulePromotionCodesJob
167167
): Promise<Resource<RulePromotionJob>>
168168

169+
CancelJob(promotionId: string, jobId: string): Promise<{}>
170+
169171
DeleteCode(promotionId: string, codeId: string): Promise<{}>
170172

171173
DeleteCodes(

0 commit comments

Comments
 (0)