stripe 7.2.0.pre.beta.1 → 7.2.0.pre.beta.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4845d5ca23b7a644ecea69e1ed4248990a2602e69ca624c01b3f2ccf6f89e21
4
- data.tar.gz: fb173da5fd059e3644062a92f93e9362f0f0c13f375753f5049ec16c10cbb766
3
+ metadata.gz: 797194319ccedb92416303a3b8d2582b5ab7170e37c3228f16d8f53fd3f362c7
4
+ data.tar.gz: ab15451423cd90284bb9a1f4cc059c165e0162d3b6227f772da996b99611ae73
5
5
  SHA512:
6
- metadata.gz: e46a5de00036241655b787669f934adf56fd18f9327468d1b7970cfbab2ee4407b4dab45a819bb3cebe18d63311bd7782aa2d19f6c84bc5985a0854d49240164
7
- data.tar.gz: 04cb4e8098a288ee885b3e0a9bc515c436f875cac7fda1819aa8b02fd0859984e376f1be61267cd21f95da686fdd1b78d08fc4a452a60cb3b621db42feb557e7
6
+ metadata.gz: 3bbb5e1b42344d84932db3835e0446fe159cd450a83c6b82eb242e0ae8a2bc787bd5185b89abc6521fb30f07ad9ea183c74a761fc8bd04752b5eb5f964cb4b73
7
+ data.tar.gz: db92e03cb8357a4e5a96c41154ce9d1a537e0fbabe1f6fccd497f392f5519c7f5b04ae3ce1f156bb996f643112659940b105b61d3f1b0a97e8c258502696acae
data/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.2.0-beta.2 - 2022-08-26
4
+ * [#1127](https://github.com/stripe/stripe-ruby/pull/1127) API Updates for beta branch
5
+ * Updated stable APIs to the latest version
6
+ * Add support for the beta [Gift Card API](https://stripe.com/docs/gift-cards).
7
+
8
+
3
9
  ## 7.2.0-beta.1 - 2022-08-23
4
10
  * [#1122](https://github.com/stripe/stripe-ruby/pull/1122) API Updates for beta branch
5
11
  - Updated stable APIs to the latest version
6
- - `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-ruby/blob/master/README.md#beta-sdks)
12
+ - `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-ruby/blob/master/README.md#beta-sdks)
7
13
 
8
14
  ## 7.1.0 - 2022-08-19
9
15
  * [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  group :development do
8
+ gem "coveralls_reborn", "~> 0.25.0" if RUBY_VERSION >= "3.1"
8
9
  gem "mocha", "~> 0.13.2"
9
10
  gem "rack", ">= 2.0.6"
10
11
  gem "rake"
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v184
1
+ v185
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/stripe.svg)](https://badge.fury.io/rb/stripe)
4
4
  [![Build Status](https://github.com/stripe/stripe-ruby/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-ruby/actions?query=branch%3Amaster)
5
+ [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-ruby/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-ruby?branch=master)
5
6
 
6
7
  The Stripe Ruby library provides convenient access to the Stripe API from
7
8
  applications written in the Ruby language. It includes a pre-defined set of
@@ -16,10 +17,6 @@ The library also provides other features. For example:
16
17
  - Built-in mechanisms for the serialization of parameters according to the
17
18
  expectations of Stripe's API.
18
19
 
19
- ## Support
20
-
21
- New features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
22
-
23
20
  ## Documentation
24
21
 
25
22
  See the [Ruby API docs](https://stripe.com/docs/api?lang=ruby).
@@ -297,6 +294,31 @@ You can disable this behavior if you prefer:
297
294
  Stripe.enable_telemetry = false
298
295
  ```
299
296
 
297
+ ### Beta SDKs
298
+
299
+ Stripe has features in the beta phase that can be accessed via the beta version of this package.
300
+ We would love for you to try these and share feedback with us before these features reach the stable phase.
301
+ To install a beta version use `gem install` with the exact version you'd like to use:
302
+
303
+ ```sh
304
+ gem install stripe -v 7.1.0.pre.beta.2
305
+ ```
306
+
307
+ > **Note**
308
+ > There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your Gemfile. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version.
309
+
310
+ We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.
311
+
312
+ If your beta feature requires a `Stripe-Version` header to be sent, use the `Stripe.api_version` field to set it:
313
+
314
+ ```python
315
+ Stripe.api_version += "; feature_beta=v3"
316
+ ```
317
+
318
+ ## Support
319
+
320
+ New features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
321
+
300
322
  ## Development
301
323
 
302
324
  The test suite depends on [stripe-mock], so make sure to fetch and run it from a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.2.0-beta.1
1
+ 7.2.0-beta.2
@@ -50,6 +50,8 @@ module Stripe
50
50
  FinancialConnections::AccountOwnership,
51
51
  FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
52
52
  FundingInstructions::OBJECT_NAME => FundingInstructions,
53
+ GiftCards::Card::OBJECT_NAME => GiftCards::Card,
54
+ GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction,
53
55
  Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
54
56
  Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
55
57
  Invoice::OBJECT_NAME => Invoice,
@@ -0,0 +1,25 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module GiftCards
6
+ # A gift card represents a single gift card owned by a customer, including the
7
+ # remaining balance, gift card code, and whether or not it is active.
8
+ class Card < APIResource
9
+ extend Stripe::APIOperations::Create
10
+ extend Stripe::APIOperations::List
11
+ include Stripe::APIOperations::Save
12
+
13
+ OBJECT_NAME = "gift_cards.card"
14
+
15
+ def self.validate(params = {}, opts = {})
16
+ request_stripe_object(
17
+ method: :post,
18
+ path: "/v1/gift_cards/cards/validate",
19
+ params: params,
20
+ opts: opts
21
+ )
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,56 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module GiftCards
6
+ # A gift card transaction represents a single transaction on a referenced gift card.
7
+ # A transaction is in one of three states, `confirmed`, `held` or `canceled`. A `confirmed`
8
+ # transaction is one that has added/deducted funds. A `held` transaction has created a
9
+ # temporary hold on funds, which can then be cancelled or confirmed. A `held` transaction
10
+ # can be confirmed into a `confirmed` transaction, or canceled into a `canceled` transaction.
11
+ # A `canceled` transaction has no effect on a gift card's balance.
12
+ class Transaction < APIResource
13
+ extend Stripe::APIOperations::Create
14
+ extend Stripe::APIOperations::List
15
+ include Stripe::APIOperations::Save
16
+
17
+ OBJECT_NAME = "gift_cards.transaction"
18
+
19
+ def cancel(params = {}, opts = {})
20
+ request_stripe_object(
21
+ method: :post,
22
+ path: format("/v1/gift_cards/transactions/%<id>s/cancel", { id: CGI.escape(self["id"]) }),
23
+ params: params,
24
+ opts: opts
25
+ )
26
+ end
27
+
28
+ def confirm(params = {}, opts = {})
29
+ request_stripe_object(
30
+ method: :post,
31
+ path: format("/v1/gift_cards/transactions/%<id>s/confirm", { id: CGI.escape(self["id"]) }),
32
+ params: params,
33
+ opts: opts
34
+ )
35
+ end
36
+
37
+ def self.cancel(id, params = {}, opts = {})
38
+ request_stripe_object(
39
+ method: :post,
40
+ path: format("/v1/gift_cards/transactions/%<id>s/cancel", { id: CGI.escape(id) }),
41
+ params: params,
42
+ opts: opts
43
+ )
44
+ end
45
+
46
+ def self.confirm(id, params = {}, opts = {})
47
+ request_stripe_object(
48
+ method: :post,
49
+ path: format("/v1/gift_cards/transactions/%<id>s/confirm", { id: CGI.escape(id) }),
50
+ params: params,
51
+ opts: opts
52
+ )
53
+ end
54
+ end
55
+ end
56
+ end
@@ -37,6 +37,8 @@ require "stripe/resources/financial_connections/account_owner"
37
37
  require "stripe/resources/financial_connections/account_ownership"
38
38
  require "stripe/resources/financial_connections/session"
39
39
  require "stripe/resources/funding_instructions"
40
+ require "stripe/resources/gift_cards/card"
41
+ require "stripe/resources/gift_cards/transaction"
40
42
  require "stripe/resources/identity/verification_report"
41
43
  require "stripe/resources/identity/verification_session"
42
44
  require "stripe/resources/invoice"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "7.2.0-beta.1"
4
+ VERSION = "7.2.0-beta.2"
5
5
  end
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: 7.2.0.pre.beta.1
4
+ version: 7.2.0.pre.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-23 00:00:00.000000000 Z
11
+ date: 2022-08-26 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.
@@ -88,6 +88,8 @@ files:
88
88
  - lib/stripe/resources/financial_connections/account_ownership.rb
89
89
  - lib/stripe/resources/financial_connections/session.rb
90
90
  - lib/stripe/resources/funding_instructions.rb
91
+ - lib/stripe/resources/gift_cards/card.rb
92
+ - lib/stripe/resources/gift_cards/transaction.rb
91
93
  - lib/stripe/resources/identity/verification_report.rb
92
94
  - lib/stripe/resources/identity/verification_session.rb
93
95
  - lib/stripe/resources/invoice.rb