{"id":20355463,"url":"https://github.com/dcoxall/marketplace","last_synced_at":"2026-05-22T16:33:13.711Z","repository":{"id":148714363,"uuid":"70194869","full_name":"dcoxall/marketplace","owner":"dcoxall","description":null,"archived":false,"fork":false,"pushed_at":"2016-10-06T22:17:30.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-26T13:28:58.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcoxall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-06T21:31:41.000Z","updated_at":"2016-10-06T21:32:01.000Z","dependencies_parsed_at":"2023-05-28T18:15:31.334Z","dependency_job_id":null,"html_url":"https://github.com/dcoxall/marketplace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dcoxall/marketplace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoxall%2Fmarketplace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoxall%2Fmarketplace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoxall%2Fmarketplace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoxall%2Fmarketplace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcoxall","download_url":"https://codeload.github.com/dcoxall/marketplace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoxall%2Fmarketplace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33354036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T23:12:57.882Z","updated_at":"2026-05-22T16:33:13.692Z","avatar_url":"https://github.com/dcoxall.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Marketplace\n===========\n\nDeveloped to demonstrate a way to approach a promotions engine in Ruby. This project demonstrates\nthe use of ruby duck typing to support multiple types of promotions whilst also using `BigDecimal`\nand `Rational` to handle more complex arithmetic (requiring better precision and rounding\ncapabilities).\n\nDevelopment\n-----------\n\nTo execute the test suite simply run\n\n    $ bin/rspec -c\n\nConsiderations\n--------------\n\nIf I spent more time on this I would like to make a `ProductCatalog` that allows other classes to\nquery the entire range of available products. This would then remove the need to have the `Cart`\nfetch product data on behalf of the promotions.\n\nThe cart should probably track the applied promotions for receipts as well as then supporting\npromotions that can only be supplied with no other promotion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcoxall%2Fmarketplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcoxall%2Fmarketplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcoxall%2Fmarketplace/lists"}