Expose Price sync actions in syncActions
@danrleyt がすでに取り組んでいます。
2020年4月2日 から。
評価
この issue はまだ評価されていません。
説明
Description
In our project we need to calculate update actions for 2 price drafts. We don't have a full product representation for the old price. It'd be very useful to have a createSyncPrices API which would return update actions for 2 price drafts.
Something like this
import { createSyncPrices } from '@commercetools/sync-actions'
import { createClient } from '@commercetools/sdk-client'
const syncPrices = createSyncPrices()
const client = createClient({
middlewares: [...],
})
const before = {
// ...
}
const now = {
// ...
}
const actions = syncPrices.buildActions(now, before)
const productsRequest = {
url: `/products/${before.id}`,
method: 'POST',
body: JSON.stringify({ version: before.version, actions }),
}
client.execute(productsRequest)
.then(result => ...)
.catch(error => ...)
Current Behavior
Currently the only way to achieve the goal is to provide 2 empty products with prices for which we want to get update actions.
- 主要言語
- JavaScript
- スター
- 77
- フォーク
- 70
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
commercetools/nodejs のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
commercetools/nodejs#1901 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
commercetools/nodejs#1895 · コメント 1 件 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 55/100
commercetools/nodejs#1891 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
commercetools/nodejs#1889 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
commercetools/nodejs#1884 · リアクション 4 件 ·
commercetools/nodejs の issue をすべて見る
似ている issue
-
factory-active factory-automatic harness/codex task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
ux
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
rr-djk/rr-djuikoo.com#53 ·
メンテナーはふだん 1 日以内に返信
-
new spec review
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
w3c/browser-specs#2666 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
thim81/openapi-format#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
decentespresso/dye2#13 ·