Skip to content

Improved examples#3054

Merged
jar-stripe merged 4 commits intomasterfrom
jar/better-example
Feb 20, 2025
Merged

Improved examples#3054
jar-stripe merged 4 commits intomasterfrom
jar/better-example

Conversation

@jar-stripe
Copy link
Copy Markdown
Contributor

Why?

The Examples folder contains an example project to make it easy to run small code snippets against the local SDK codebase. We are improving these examples to make them easy to use and run in order to reduce friction when testing SDK functionality

What?

  • Implemented example resolution in Program.cs, so one can pass an example name on the command line
  • updated ExampleTemplate to list customers as an example, and pull api key from the environment
  • updated V2 meter event stream example to pull configuration from environment
  • added justfile recipe for running examples

…tive to Examples namespace) of the example to run

updated V2/MeterEventStream to pull configuration from the environment
updated ExampleTemplate to be a Customers.list call
@jar-stripe jar-stripe enabled auto-merge (squash) February 11, 2025 22:52
@jar-stripe jar-stripe requested a review from a team as a code owner February 19, 2025 20:19
Copy link
Copy Markdown
Contributor

@xavdid-stripe xavdid-stripe left a comment

Choose a reason for hiding this comment

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

nice! I like the just -> example script

@jar-stripe jar-stripe merged commit c908684 into master Feb 20, 2025
@jar-stripe jar-stripe deleted the jar/better-example branch February 20, 2025 22:57
ramya-stripe pushed a commit that referenced this pull request Mar 14, 2025
* changed Program to accept a command line argument with the name (relative to Examples namespace) of the example to run

* updated existing examples

* added usage instructions

* added just recipe
ramya-stripe added a commit that referenced this pull request Mar 14, 2025
* Update generated code for v1473

* Update generated code for v1479

* Update generated code for v1481

* Update generated code for v1483

* Update generated code for v1486

* Update generated code for v1487

* add codeowners file (#3055)

* Merge upstream and update generated code for v1490

* Update generated code for v1495

* Update generated code for v1496

* Improved examples (#3054)

* changed Program to accept a command line argument with the name (relative to Examples namespace) of the example to run

* updated existing examples

* added usage instructions

* added just recipe

* Merge upstream and update generated code for v1501

* Update generated code for v1501

* Update generated code for v1502

* Update generated code for v1504

* Update generated code for v1505

* Update generated code for v1505

* Update generated code (#3050)

* Update generated code for v1463

* Update generated code for v1494

* Update generated code for v1495

* Update generated code for v1501

* Update generated code for v1505

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com>

* Bump version to 47.4.0

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: David Brownman <109395161+xavdid-stripe@users.noreply.github.com>
Co-authored-by: jar-stripe <jar@stripe.com>
Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com>
Co-authored-by: Prathmesh Ranaut <prathmesh@stripe.com>
ramya-stripe added a commit that referenced this pull request Mar 19, 2025
* add codeowners file (#3055)

* Improved examples (#3054)

* changed Program to accept a command line argument with the name (relative to Examples namespace) of the example to run

* updated existing examples

* added usage instructions

* added just recipe

* Update generated code (#3050)

* Update generated code for v1463

* Update generated code for v1494

* Update generated code for v1495

* Update generated code for v1501

* Update generated code for v1505

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com>

* Bump version to 47.4.0

* Remove Upcoming Lines API from SDK (#3064)

* Revert changes to v2 apis

---------

Co-authored-by: David Brownman <109395161+xavdid-stripe@users.noreply.github.com>
Co-authored-by: jar-stripe <jar@stripe.com>
Co-authored-by: stripe-openapi[bot] <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Ramya Rao <ramya@stripe.com>
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