Skip to content

Conversation

@pcothenet
Copy link
Contributor

@pcothenet pcothenet commented Mar 30, 2021

What

  • Updates default values for the API
  • Add the renewables project type

Why

  • The allowed query parameter for total_price_cents_usd was incorrect and affecting the Python library. This PR brings all libraries on the same base.

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?

@pcothenet pcothenet changed the title Update parameters for orders Update parameter validation Mar 30, 2021
expect(create_order_response.data.patch_fee_cents_usd).not_to be_empty
expect(order.id).not_to be_nil
expect(order.mass_g).to eq(order_mass_g)
expect(order.price_cents_usd.to_i).to be_between(expected_price - 1, expected_price + 1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We added offsets to the project used in this test and it threw things slightly out of bounds.

Because of the rounded nature of the calculation, the new average_price calculation disturbed this test. I am adding a tiny bit of slack to it (+1 / - 1 is small and keep things from bigger deviations)

@pcothenet pcothenet requested a review from biglovisa March 30, 2021 20:12
@pcothenet pcothenet marked this pull request as ready for review March 30, 2021 20:12
@pcothenet pcothenet merged commit 7b154a0 into main Mar 30, 2021
@pcothenet pcothenet deleted the pc/price branch March 30, 2021 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants