@peepoglad/commercetools-messages
v2.1.0
Published
Mock of commercetools messages
Downloads
161
Readme
Commercetools Messages
This library mocks the Commercetools messages to ease testing of your typescript codebases.
Supported resources
- order
- customer
- product
- category
Installation
For npm:
npm i @peepoglad/commercetools-messages --save-dev
For yarn:
yarn add @peepoglad/commercetools-messages --dev
Usage
To build payload, import the package into your file:
import { ProductAddedToCategoryMessage } from '@commercetools/platform-sdk'
import { ProductAddedToCategory } from '@peepoglad/commercetools-messages'
const payload: ProductAddedToCategoryMessage = ProductAddedToCategory()
.id('gigaId')
.build()
...
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-giga-feature
- Commit your changes:
git commit -am 'Add some giga feature'
- Push to the branch:
git push origin my-new-giga-feature
- Submit a pull request :D