stripe 13.1.0.pre.beta.2 → 13.1.0.pre.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/examples/README.md +7 -2
- data/examples/example_template.rb +36 -0
- data/examples/meter_event_stream.rb +10 -0
- data/examples/{stripe_webhook_handler.rb → thinevent_webhook_handler.rb} +11 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +1 -1
- data/lib/stripe/resources/billing/credit_grant.rb +4 -1
- data/lib/stripe/resources/issuing/card.rb +2 -2
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
- data/lib/stripe/services/test_helpers/issuing/card_service.rb +1 -1
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/version.rb +1 -1
- metadata +4 -4
- data/examples/new_example.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df19974cec6125de295484a1352d7a77300d303bb7116be8b2921007b4f022c
|
4
|
+
data.tar.gz: f56676ab8ed4ccbc50f4f12c69766b6bbfc178c87e52bbda6509705d33f42e5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 741cd9b30a6570dbea2fa5fdbd9f808d227562d06e9ce79ee85ad5814a77bb10081ae025c7366901ad27ebd35d5634c43455841baaf2a8bce26ae6f52af65e65
|
7
|
+
data.tar.gz: 7218eccfda405be061e98e50c7a9fcdcd329aa417afec190f552737ae34d135ba2681737b186b4a18c80c2355dde00ba6a1dc68b78759e88c36877792c509f70
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 13.1.0-beta.3 - 2024-10-18
|
4
|
+
* [#1469](https://github.com/stripe/stripe-ruby/pull/1469) Update generated code for beta
|
5
|
+
|
6
|
+
|
3
7
|
## 13.1.0-beta.2 - 2024-10-08
|
4
8
|
* [#1468](https://github.com/stripe/stripe-ruby/pull/1468) Update generated code for beta
|
5
9
|
* Add support for `submit_card` test helper method on resource `Issuing.Card`
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v1314
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
13.1.0-beta.
|
1
|
+
13.1.0-beta.3
|
data/examples/README.md
CHANGED
@@ -3,9 +3,14 @@
|
|
3
3
|
From the examples folder, run:
|
4
4
|
`RUBYLIB=../lib ruby your_example.rb`
|
5
5
|
|
6
|
+
e.g.
|
7
|
+
|
8
|
+
`RUBYLIB=../lib ruby thinevent_webhook_handler.rb`
|
9
|
+
|
6
10
|
## Adding a new example
|
7
11
|
|
8
12
|
1. Clone new_example.rb
|
9
13
|
2. Implement your example
|
10
|
-
3.
|
11
|
-
4.
|
14
|
+
3. Fill out the file comment. Include a description and key steps that are being demonstrated.
|
15
|
+
4. Run it (as per above)
|
16
|
+
5. 👍
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# example_template.py - This is a template for defining new examples. It is not intended to be used directly.
|
4
|
+
#
|
5
|
+
# <describe what this example does>
|
6
|
+
#
|
7
|
+
# In this example, we:
|
8
|
+
# - <key step 1>
|
9
|
+
# - <key step 2
|
10
|
+
# - ...
|
11
|
+
#
|
12
|
+
# <describe assumptions about the user's stripe account, environment, or configuration;
|
13
|
+
# or things to watch out for when running>
|
14
|
+
|
15
|
+
require "stripe"
|
16
|
+
require "date"
|
17
|
+
|
18
|
+
class ExampleTemplate
|
19
|
+
attr_accessor :api_key
|
20
|
+
|
21
|
+
def initialize(api_key)
|
22
|
+
@api_key = api_key
|
23
|
+
end
|
24
|
+
|
25
|
+
def do_something_great
|
26
|
+
puts "Hello World"
|
27
|
+
# client = Stripe::StripeClient.new(api_key)
|
28
|
+
# client.v1
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Send meter events
|
33
|
+
api_key = "{{API_KEY}}"
|
34
|
+
|
35
|
+
example = ExampleTemplate.new(api_key)
|
36
|
+
example.do_something_great
|
@@ -1,5 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# meter_event_stream.py - use the high-throughput meter event stream to report create billing meter events.
|
4
|
+
#
|
5
|
+
# In this example, we:
|
6
|
+
# - create a meter event session and store the session's authentication token
|
7
|
+
# - define an event with a payload
|
8
|
+
# - use the meter_event_stream service accessor in StripeClient to create an event stream that reports this event
|
9
|
+
#
|
10
|
+
# This example expects a billing meter with an event_name of 'alpaca_ai_tokens'. If you have
|
11
|
+
# a different meter event name, you can change it before running this example.
|
12
|
+
|
3
13
|
require "stripe"
|
4
14
|
require "date"
|
5
15
|
|
@@ -1,6 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# typed: false
|
3
3
|
|
4
|
+
# thinevent_webhook_handler.rb - receive and process thin events like the
|
5
|
+
# v1.billing.meter.error_report_triggered event.
|
6
|
+
#
|
7
|
+
# In this example, we:
|
8
|
+
# - create a StripeClient called client
|
9
|
+
# - use client.parse_thin_event to parse the received thin event webhook body
|
10
|
+
# - call client.v2.core.events.retrieve to retrieve the full event object
|
11
|
+
# - if it is a V1BillingMeterErrorReportTriggeredEvent event type, call
|
12
|
+
# event.fetchRelatedObject to retrieve the Billing Meter object associated
|
13
|
+
# with the event.
|
14
|
+
|
4
15
|
require "stripe"
|
5
16
|
require "sinatra"
|
6
17
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
module Billing
|
6
|
-
# Indicates the credit balance for credits granted to a customer.
|
6
|
+
# Indicates the billing credit balance for billing credits granted to a customer.
|
7
7
|
class CreditBalanceSummary < SingletonAPIResource
|
8
8
|
OBJECT_NAME = "billing.credit_balance_summary"
|
9
9
|
def self.object_name
|
@@ -3,7 +3,10 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
module Billing
|
6
|
-
# A credit grant is
|
6
|
+
# A credit grant is an API resource that documents the allocation of some billing credits to a customer.
|
7
|
+
#
|
8
|
+
# Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
|
9
|
+
# end
|
7
10
|
class CreditGrant < APIResource
|
8
11
|
extend Stripe::APIOperations::Create
|
9
12
|
extend Stripe::APIOperations::List
|
@@ -124,7 +124,7 @@ module Stripe
|
|
124
124
|
)
|
125
125
|
end
|
126
126
|
|
127
|
-
# Updates the shipping status of the specified Issuing Card object to submitted. This method
|
127
|
+
# Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
|
128
128
|
def self.submit_card(card, params = {}, opts = {})
|
129
129
|
request_stripe_object(
|
130
130
|
method: :post,
|
@@ -134,7 +134,7 @@ module Stripe
|
|
134
134
|
)
|
135
135
|
end
|
136
136
|
|
137
|
-
# Updates the shipping status of the specified Issuing Card object to submitted. This method
|
137
|
+
# Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
|
138
138
|
def submit_card(params = {}, opts = {})
|
139
139
|
@resource.request_stripe_object(
|
140
140
|
method: :post,
|
@@ -31,7 +31,7 @@ module Stripe
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# Creates a single-use token that represents a bank account's details.
|
34
|
-
# You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
|
34
|
+
# You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
|
35
35
|
def self.create(params = {}, opts = {})
|
36
36
|
request_stripe_object(method: :post, path: "/v1/tokens", params: params, opts: opts)
|
37
37
|
end
|
@@ -6,9 +6,9 @@ module Stripe
|
|
6
6
|
module Billing
|
7
7
|
# Fix me empty_doc_string.
|
8
8
|
class MeterEvent < APIResource
|
9
|
-
OBJECT_NAME = "billing.meter_event"
|
9
|
+
OBJECT_NAME = "v2.billing.meter_event"
|
10
10
|
def self.object_name
|
11
|
-
"billing.meter_event"
|
11
|
+
"v2.billing.meter_event"
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -5,9 +5,9 @@ module Stripe
|
|
5
5
|
module V2
|
6
6
|
module Billing
|
7
7
|
class MeterEventAdjustment < APIResource
|
8
|
-
OBJECT_NAME = "billing.meter_event_adjustment"
|
8
|
+
OBJECT_NAME = "v2.billing.meter_event_adjustment"
|
9
9
|
def self.object_name
|
10
|
-
"billing.meter_event_adjustment"
|
10
|
+
"v2.billing.meter_event_adjustment"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -5,9 +5,9 @@ module Stripe
|
|
5
5
|
module V2
|
6
6
|
module Billing
|
7
7
|
class MeterEventSession < APIResource
|
8
|
-
OBJECT_NAME = "billing.meter_event_session"
|
8
|
+
OBJECT_NAME = "v2.billing.meter_event_session"
|
9
9
|
def self.object_name
|
10
|
-
"billing.meter_event_session"
|
10
|
+
"v2.billing.meter_event_session"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -49,7 +49,7 @@ module Stripe
|
|
49
49
|
)
|
50
50
|
end
|
51
51
|
|
52
|
-
# Updates the shipping status of the specified Issuing Card object to submitted. This method
|
52
|
+
# Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
|
53
53
|
def submit_card(card, params = {}, opts = {})
|
54
54
|
request(
|
55
55
|
method: :post,
|
@@ -4,7 +4,7 @@
|
|
4
4
|
module Stripe
|
5
5
|
class TokenService < StripeService
|
6
6
|
# Creates a single-use token that represents a bank account's details.
|
7
|
-
# You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
|
7
|
+
# You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
|
8
8
|
def create(params = {}, opts = {})
|
9
9
|
request(method: :post, path: "/v1/tokens", params: params, opts: opts, base_address: :api)
|
10
10
|
end
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.1.0.pre.beta.
|
4
|
+
version: 13.1.0.pre.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
14
14
|
for details.
|
@@ -30,9 +30,9 @@ files:
|
|
30
30
|
- Rakefile
|
31
31
|
- VERSION
|
32
32
|
- examples/README.md
|
33
|
+
- examples/example_template.rb
|
33
34
|
- examples/meter_event_stream.rb
|
34
|
-
- examples/
|
35
|
-
- examples/stripe_webhook_handler.rb
|
35
|
+
- examples/thinevent_webhook_handler.rb
|
36
36
|
- exe/stripe-console
|
37
37
|
- lib/data/ca-certificates.crt
|
38
38
|
- lib/stripe.rb
|
data/examples/new_example.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "stripe"
|
4
|
-
require "date"
|
5
|
-
|
6
|
-
class NewExample
|
7
|
-
attr_accessor :api_key
|
8
|
-
|
9
|
-
def initialize(api_key)
|
10
|
-
@api_key = api_key
|
11
|
-
end
|
12
|
-
|
13
|
-
def do_something_great
|
14
|
-
puts "Hello World"
|
15
|
-
# client = Stripe::StripeClient.new(api_key)
|
16
|
-
# client.v1
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
# Send meter events
|
21
|
-
api_key = "{{API_KEY}}"
|
22
|
-
|
23
|
-
example = NewExample.new(api_key)
|
24
|
-
example.do_something_great
|