Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raminmammadzada/sku-version-quality-mapper
A simple task to calculate the aggregated list of purchased products and quantity based on the list of purchased products codes.
https://github.com/raminmammadzada/sku-version-quality-mapper
Last synced: 2 days ago
JSON representation
A simple task to calculate the aggregated list of purchased products and quantity based on the list of purchased products codes.
- Host: GitHub
- URL: https://github.com/raminmammadzada/sku-version-quality-mapper
- Owner: RaminMammadzada
- Created: 2022-03-29T20:59:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-03-29T21:28:35.000Z (over 2 years ago)
- Last Synced: 2024-12-11T17:32:10.545Z (12 days ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SKU Version Quantity Mapper
## Description
It is a script to calculate the aggregated list of purchased products and quantity based on the list of purchased products codes.
The main class instance takes two inputs: a list of purchased product codes and a map of mappings for these codes. Then returns the aggregated list.
## Run app
You can run those functions in you own local environment.
- Clone the repository by typing:
`git clone https://github.com/RaminMammadzada/sku-version-quality-mapper.git`
- Type `./bin/main.rb` in the root file of the project. ( You may need to update file permissions by typing `chmod +x bin/main.rb `)
- If you have an issuse related to file permissions, you can also easily type `ruby bin/main.rb` in the root file of the project.
## Example cases
Inputs
List of products: `["CVCD", "SDFD", "DDDF", "SDFD"]`
Mappings: `{"CVCD": {"version": 1,"edition": "X"},"SDFD": {"version": 2,"edition": "Z"},"DDDF": {"version": 1}}`
Expected Output
Purchased items: `[{"version":1,"edition":"X","quantity":1},{"version":1,"quantity":1},{"version":2,"edition":"Z","qu antity":2}]`
## Run the tests
None of the tests added yet. It will be added with Rspec.
## Author
👤 **Ramin Mammadzada**
- Github: [@RaminMammadzada](https://github.com/RaminMammadzada)
- Twitter: [@RaminMammadzada](https://twitter.com/RaminMammadzada)
- Linkedin: [@RaminMammadzada](https://www.linkedin.com/in/raminmammadzada)## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check the [issues page](https://github.com/RaminMammadzada/sku-version-quality-mapper/issues).
## Show your support
Give a ⭐️ if you like this project!