Skip to content

order price creation #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 14, 2020
Merged

order price creation #16

merged 9 commits into from
Oct 14, 2020

Conversation

thdaraujo
Copy link
Contributor

@thdaraujo thdaraujo commented Oct 14, 2020

What

  • adds field total_price_cents_usd to order creation
  • allows user to create order by passing mass_g or total_price_cents_usd, but not both

Why

  • to allow users to create orders by a desired total amount

SDK Release Checklist

  • Have you added an integration test for the changes?
  • Have you built the gem locally and made queries against it successfully?
  • Did you update the changelog?
  • Did you bump the package version?
  • For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?

@thdaraujo thdaraujo added the WIP This PR is work in progress. Don't bother reviewing. label Oct 14, 2020
@thdaraujo thdaraujo self-assigned this Oct 14, 2020
@thdaraujo thdaraujo changed the title Ta/order price creation order price creation Oct 14, 2020
@thdaraujo thdaraujo requested a review from biglovisa October 14, 2020 18:48
@thdaraujo thdaraujo added Needs Review The PR is ready to be reviewed and removed WIP This PR is work in progress. Don't bother reviewing. labels Oct 14, 2020
README.md Outdated
@@ -56,6 +56,10 @@ In Patch, orders represent a purchase of carbon offsets or negative emissions by
const mass = 1000000 // Pass in the mass in grams (i.e. 1 metric tonne)
patch.orders.createOrder({ mass_g: mass })

// Create an order with maximum total price
const totalPriceCentsUSD = 500 // Pass in the total price in cents (i.e. 5 dollars)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add to the README that you should pick either mass_g or total_price_cents_usd when creating an order?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a bit more context, see if that looks better!

Copy link
Contributor

@biglovisa biglovisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one question about whether or not we should specify in the readme to pick either mass_g or total_price_cents_usd.

@thdaraujo thdaraujo force-pushed the ta/order-price-creation branch from 9a44206 to d936c7e Compare October 14, 2020 22:08
@thdaraujo thdaraujo merged commit 49e127e into main Oct 14, 2020
@thdaraujo thdaraujo deleted the ta/order-price-creation branch October 14, 2020 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review The PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants