Skip to content
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

Add support for fetching customer costs #19

Merged
merged 6 commits into from
Dec 18, 2023
Merged

Conversation

arusahni
Copy link
Contributor

@arusahni arusahni commented Dec 13, 2023

This adds support for fetching customer costs. It only populates a subset of the fields and pricing strategies, matching what we need to internally support at the moment. To support testing, I created an additional plan in our test account that has a matrix price as well.

I'm very much open to bikeshedding the names of these structs.

Copy link

@guswynn guswynn left a comment

Choose a reason for hiding this comment

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

rust looks good! few small nits

src/client/customers.rs Show resolved Hide resolved
src/client/customers.rs Outdated Show resolved Hide resolved
src/client/customers.rs Outdated Show resolved Hide resolved
src/client/customers.rs Show resolved Hide resolved
@arusahni arusahni force-pushed the feat/customer-costs branch 4 times, most recently from b0621d2 to d5a819c Compare December 17, 2023 20:16
Depending on the time of day the event tests are run, the generated
events may fall in the future. Orb's search endpoint *defaults* to a
`timeframe_end` of `now()`, so future events are excluded even if there
are ID matches. By explicitly setting the `timeframe_end` to one second
after the furthest future event we can ensure all events will always be
returned.
Some runs of the subscription test pick up subscriptions from previous
runs. Minimize flakes by setting a floor for the fetched subscriptions
based on the first one created in the current test run.
Previously, when one amended an event, only the latest version of the
event was returned by the event search endpoint. That behavior has since
been revised by Orb, and now _all_ versions of events are returned.

Update the test to validate what we care about -- specifically, that the
amended event is returned by the search endpoint.
…t search results.

Orb has since changed the behavior of event amendment and deprecation,
and now always returns events, whether they are amended or deprecated.
@arusahni arusahni force-pushed the feat/customer-costs branch from d5a819c to 5d0531a Compare December 18, 2023 13:42
@arusahni arusahni merged commit 3be50d5 into main Dec 18, 2023
6 checks passed
@arusahni arusahni deleted the feat/customer-costs branch January 25, 2024 17:09
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.

2 participants