Compare commits

..

9 Commits

Author SHA1 Message Date
Annie Li
9a4dfdcb2f Codegen for openapi v221 2023-01-26 10:51:25 -08:00
Annie Li
50bbc0df17 Reset version to 8.2.0-beta.2 2023-01-26 10:51:08 -08:00
Annie Li
8226f0ad99 Include latest changes from the master branch 2023-01-26 10:51:08 -08:00
Annie Li
43fa8f5af7 Set version to 8.1.0 to simplify merge 2023-01-26 10:51:08 -08:00
Richard Marmorstein
990792f9c1
Merge pull request #1171 from stripe/richardm-dead-code
Remove unused `partial` param from `initialize_from`
2023-01-23 07:44:31 -08:00
Richard Marmorstein
a42bdeb640 initialize_from(..., partial) is dead code 2023-01-21 19:45:49 -06:00
Pavel Krymets
0e61789557 Bump version to 8.2.0-beta.2 2023-01-19 14:35:39 -08:00
Peter Goldstein
339d36b0a2
Adds Ruby 3.2 to the CI matrix. Update action versions to v3. (#1159)
Co-authored-by: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com>
2023-01-19 14:33:20 -08:00
pakrym-stripe
cfe69c131e
Merge pull request #1170 from stripe/latest-codegen-beta
API Updates for beta branch
2023-01-19 14:30:44 -08:00
7 changed files with 42 additions and 10 deletions

View File

@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
@ -33,7 +33,7 @@ jobs:
- name: Build - name: Build
run: gem build stripe.gemspec run: gem build stripe.gemspec
- name: 'Upload Artifact' - name: 'Upload Artifact'
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: gems name: gems
path: '*.gem' path: '*.gem'
@ -43,9 +43,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, jruby-9.4.0.0, truffleruby-head] ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, jruby-9.4.0.0, truffleruby-head]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download all workflow run artifacts - name: Download all workflow run artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: gems name: gems
path: gems path: gems

View File

@ -1,5 +1,10 @@
# Changelog # Changelog
## 8.2.0-beta.2 - 2023-01-19
* [#1170](https://github.com/stripe/stripe-ruby/pull/1170) API Updates for beta branch
* Updated stable APIs to the latest version
* Add support for `Tax.Settings` resource.
## 8.2.0-beta.1 - 2023-01-12 ## 8.2.0-beta.1 - 2023-01-12
* [#1167](https://github.com/stripe/stripe-ruby/pull/1167) API Updates for beta branch * [#1167](https://github.com/stripe/stripe-ruby/pull/1167) API Updates for beta branch
* Updated stable APIs to the latest version * Updated stable APIs to the latest version

View File

@ -1 +1 @@
v219 v221

View File

@ -1 +1 @@
8.2.0-beta.1 8.2.0-beta.2

View File

@ -9,6 +9,15 @@ module Stripe
OBJECT_NAME = "tax.transaction" OBJECT_NAME = "tax.transaction"
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end
def self.create_reversal(params = {}, opts = {}) def self.create_reversal(params = {}, opts = {})
request_stripe_object( request_stripe_object(
method: :post, method: :post,
@ -17,6 +26,24 @@ module Stripe
opts: opts opts: opts
) )
end end
def self.list_line_items(transaction, params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(transaction) }),
params: params,
opts: opts
)
end
def self.list_transactions(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/tax/transactions",
params: params,
opts: opts
)
end
end end
end end
end end

View File

@ -429,13 +429,13 @@ module Stripe
# * +:opts:+ Options for StripeObject like an API key. # * +:opts:+ Options for StripeObject like an API key.
# * +:partial:+ Indicates that the re-initialization should not attempt to # * +:partial:+ Indicates that the re-initialization should not attempt to
# remove accessors. # remove accessors.
protected def initialize_from(values, opts, partial = false) protected def initialize_from(values, opts)
@opts = Util.normalize_opts(opts) @opts = Util.normalize_opts(opts)
# the `#send` is here so that we can keep this method private # the `#send` is here so that we can keep this method private
@original_values = self.class.send(:deep_copy, values) @original_values = self.class.send(:deep_copy, values)
removed = partial ? Set.new : Set.new(@values.keys - values.keys) removed = Set.new(@values.keys - values.keys)
added = Set.new(values.keys - @values.keys) added = Set.new(values.keys - @values.keys)
# Wipe old state before setting new. This is useful for e.g. updating a # Wipe old state before setting new. This is useful for e.g. updating a

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
VERSION = "8.2.0-beta.1" VERSION = "8.2.0-beta.2"
end end