Skip to content

DOCSP-46497 & DOCSP-46233: Add historical and line item billing examples to Go SDK project #51

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 11 commits into from
Jul 9, 2025

Conversation

cbullinger
Copy link
Collaborator

@cbullinger cbullinger commented Jul 2, 2025

Description

Add examples, functions, and related tests for the following billing functionality:

  • pull and parse billing details (invoice line items)
  • get historical invoices

Project changes:

  • renamed cmd > examples
  • moved existing log and metric examples > examples/monitoring
  • added error and data formatting helpers; updated existing files and tests accordingly
  • minor updates for code consistency

Linked Jira tickets:

Related Tasks

docs repo tasks

  • generate BH file snippets

artifact repo tasks

  • update README.md
  • update CHANGELOG.md
  • generate BH file copies

@cbullinger cbullinger changed the title DOCSP-46497 & hist invoices DOCSP-46497 & DOCSP-46233: Add historical and line item billing examples to Go SDK project Jul 2, 2025
Copy link
Collaborator

@dacharyc dacharyc left a comment

Choose a reason for hiding this comment

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

This is a lot of work, and I'm very impressed with the thoroughness and handling you've done here! Only a couple of blocking comments related to the generated output project - it won't run as-is because there are some bits still hanging out from before you did the refactor. The rest of the comments are just Qs, kudos, and non-blocking nits.

We should probably also update the INTERNAL_README.md with the updated directory structure, similar to what you did in the README.md.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! 🎉

// NOTE: You can define a default global directory for all generated files by setting the ATLAS_DOWNLOADS_DIR environment variable.
func GenerateOutputPath(dir, prefix, extension string) (string, error) {
// If default download directory is set in .env, prepend it to the provided dir
defaultDir := os.Getenv("ATLAS_DOWNLOADS_DIR")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice - very thoughtful approach!

@cbullinger cbullinger requested a review from dacharyc July 9, 2025 13:08
Copy link
Collaborator

@dacharyc dacharyc left a comment

Choose a reason for hiding this comment

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

I think if we want to change the logic of the line_items example, we need to do the refactor in a different place. Otherwise, everything here LGTM!

@cbullinger cbullinger merged commit 2c6543b into mongodb:main Jul 9, 2025
@cbullinger cbullinger deleted the docsp-46497-hist-invoices branch July 9, 2025 19:21
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