-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up examples and added documentation (#1470)
- Loading branch information
1 parent
540c7f7
commit 79ebfa5
Showing
5 changed files
with
64 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
# example_template.py - This is a template for defining new examples. It is not intended to be used directly. | ||
# | ||
# <describe what this example does> | ||
# | ||
# In this example, we: | ||
# - <key step 1> | ||
# - <key step 2 | ||
# - ... | ||
# | ||
# <describe assumptions about the user's stripe account, environment, or configuration; | ||
# or things to watch out for when running> | ||
|
||
require "stripe" | ||
require "date" | ||
|
||
class ExampleTemplate | ||
attr_accessor :api_key | ||
|
||
def initialize(api_key) | ||
@api_key = api_key | ||
end | ||
|
||
def do_something_great | ||
puts "Hello World" | ||
# client = Stripe::StripeClient.new(api_key) | ||
# client.v1 | ||
end | ||
end | ||
|
||
# Send meter events | ||
api_key = "{{API_KEY}}" | ||
|
||
example = ExampleTemplate.new(api_key) | ||
example.do_something_great |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
examples/stripe_webhook_handler.rb → examples/thinevent_webhook_handler.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters