Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Expose Price sync actions in syncActions

オープン
#1,432 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@danrleyt がすでに取り組んでいます。

2020年4月2日 から。

評価

この issue はまだ評価されていません。

説明

Type: New Feature Type: Onboarding Task
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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

commercetools/nodejs のほかの issue

commercetools/nodejs の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。