Compare commits

...

11 Commits

Author SHA1 Message Date
Richard Marmorstein
d10398a825 Codegen for openapi v223 2023-02-02 15:06:51 -06:00
Richard Marmorstein
6f70bd8696 Reset version to 8.2.0-beta.3 2023-02-02 15:06:37 -06:00
Richard Marmorstein
1d21c60802 Include latest changes from the master branch 2023-02-02 15:06:37 -06:00
Richard Marmorstein
b9c10b9c2f Set version to 8.2.0 to simplify merge 2023-02-02 15:06:37 -06:00
Richard Marmorstein
8be00fef4e Bump version to 8.2.0 2023-02-02 15:01:45 -06:00
Richard Marmorstein
6136198da4
Merge pull request #1173 from stripe/latest-codegen-master
API Updates
2023-02-02 12:33:05 -08:00
Richard Marmorstein
0b028811f2 bump CI 2023-02-02 14:27:11 -06:00
Richard Marmorstein
206b707d0c Add test 2023-02-02 14:05:46 -06:00
Richard Marmorstein
a9a687ab61 Codegen for openapi v223 2023-02-02 13:53:12 -06:00
Annie Li
446ffc7a22 Bump version to 8.2.0-beta.3 2023-01-26 16:15:28 -08:00
anniel-stripe
58db6d32ef
Merge pull request #1172 from stripe/latest-codegen-beta
API Updates for beta branch
2023-01-26 16:13:01 -08:00
11 changed files with 73 additions and 3 deletions

View File

@ -1,5 +1,15 @@
# Changelog # Changelog
## 8.2.0 - 2023-02-02
* [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
* Add support for `resume` method on resource `Subscription`
* [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
## 8.2.0-beta.3 - 2023-01-26
* [#1172](https://github.com/stripe/stripe-ruby/pull/1172) API Updates for beta branch
* Updated stable APIs to the latest version
* Add support for `list_transactions` method on resource `Tax.Transaction`
## 8.2.0-beta.2 - 2023-01-19 ## 8.2.0-beta.2 - 2023-01-19
* [#1170](https://github.com/stripe/stripe-ruby/pull/1170) API Updates for beta branch * [#1170](https://github.com/stripe/stripe-ruby/pull/1170) API Updates for beta branch
* Updated stable APIs to the latest version * Updated stable APIs to the latest version

View File

@ -1 +1 @@
v221 v223

View File

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

View File

@ -51,7 +51,9 @@ module Stripe
FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner, FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
FinancialConnections::AccountOwnership::OBJECT_NAME => FinancialConnections::AccountOwnership::OBJECT_NAME =>
FinancialConnections::AccountOwnership, FinancialConnections::AccountOwnership,
FinancialConnections::InferredBalance::OBJECT_NAME => FinancialConnections::InferredBalance,
FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session, FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
FinancialConnections::Transaction::OBJECT_NAME => FinancialConnections::Transaction,
FundingInstructions::OBJECT_NAME => FundingInstructions, FundingInstructions::OBJECT_NAME => FundingInstructions,
GiftCards::Card::OBJECT_NAME => GiftCards::Card, GiftCards::Card::OBJECT_NAME => GiftCards::Card,
GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction, GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction,

View File

@ -38,7 +38,9 @@ require "stripe/resources/file_link"
require "stripe/resources/financial_connections/account" require "stripe/resources/financial_connections/account"
require "stripe/resources/financial_connections/account_owner" require "stripe/resources/financial_connections/account_owner"
require "stripe/resources/financial_connections/account_ownership" require "stripe/resources/financial_connections/account_ownership"
require "stripe/resources/financial_connections/inferred_balance"
require "stripe/resources/financial_connections/session" require "stripe/resources/financial_connections/session"
require "stripe/resources/financial_connections/transaction"
require "stripe/resources/funding_instructions" require "stripe/resources/funding_instructions"
require "stripe/resources/gift_cards/card" require "stripe/resources/gift_cards/card"
require "stripe/resources/gift_cards/transaction" require "stripe/resources/gift_cards/transaction"

View File

@ -6,9 +6,12 @@ module Stripe
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
class Account < APIResource class Account < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
extend Stripe::APIOperations::NestedResource
OBJECT_NAME = "financial_connections.account" OBJECT_NAME = "financial_connections.account"
nested_resource_class_methods :inferred_balance, operations: %i[list]
def disconnect(params = {}, opts = {}) def disconnect(params = {}, opts = {})
request_stripe_object( request_stripe_object(
method: :post, method: :post,

View File

@ -0,0 +1,13 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
module FinancialConnections
# A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data.
class InferredBalance < APIResource
extend Stripe::APIOperations::List
OBJECT_NAME = "financial_connections.account_inferred_balance"
end
end
end

View File

@ -0,0 +1,13 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
module FinancialConnections
# A Transaction represents a real transaction that affects a Financial Connections Account balance.
class Transaction < APIResource
extend Stripe::APIOperations::List
OBJECT_NAME = "financial_connections.transaction"
end
end
end

View File

@ -31,6 +31,15 @@ module Stripe
) )
end end
def resume(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/subscriptions/%<subscription>s/resume", { subscription: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end
def self.cancel(subscription_exposed_id, params = {}, opts = {}) def self.cancel(subscription_exposed_id, params = {}, opts = {})
request_stripe_object( request_stripe_object(
method: :delete, method: :delete,
@ -49,6 +58,15 @@ module Stripe
) )
end end
def self.resume(subscription, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/subscriptions/%<subscription>s/resume", { subscription: CGI.escape(subscription) }),
params: params,
opts: opts
)
end
save_nested_resource :source save_nested_resource :source
def self.search(params = {}, opts = {}) def self.search(params = {}, opts = {})

View File

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

View File

@ -1876,6 +1876,15 @@ module Stripe
assert_requested :get, "#{Stripe.api_base}/v1/subscriptions?limit=3" assert_requested :get, "#{Stripe.api_base}/v1/subscriptions?limit=3"
end end
end end
context "Subscription.resume" do
should "support requests with args: id, proration_date, proration_behavior" do
Stripe::Subscription.resume(
"sub_xxxxxxxxxxxxx",
{ proration_date: 1_675_400_000, proration_behavior: "always_invoice" }
)
assert_requested :post, "#{Stripe.api_base}/v1/subscriptions/sub_xxxxxxxxxxxxx/resume"
end
end
context "Subscription.retrieve" do context "Subscription.retrieve" do
should "support requests with args: id" do should "support requests with args: id" do
Stripe::Subscription.retrieve("sub_xxxxxxxxxxxxx") Stripe::Subscription.retrieve("sub_xxxxxxxxxxxxx")