mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-29 00:01:16 -04:00
Compare commits
6 Commits
61ba9d6b51
...
a60aee46a1
Author | SHA1 | Date | |
---|---|---|---|
|
a60aee46a1 | ||
|
66eced2bf1 | ||
|
2b76db0066 | ||
|
eea053d6e5 | ||
|
2f5c5c54aa | ||
|
346d961ce6 |
@ -1 +1 @@
|
|||||||
v682
|
v734
|
@ -52,6 +52,7 @@ module Stripe
|
|||||||
FinancialConnections::AccountOwnership::OBJECT_NAME =>
|
FinancialConnections::AccountOwnership::OBJECT_NAME =>
|
||||||
FinancialConnections::AccountOwnership,
|
FinancialConnections::AccountOwnership,
|
||||||
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,
|
||||||
Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
|
Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
|
||||||
Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
|
Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
|
||||||
|
@ -39,6 +39,7 @@ 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/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/identity/verification_report"
|
require "stripe/resources/identity/verification_report"
|
||||||
require "stripe/resources/identity/verification_session"
|
require "stripe/resources/identity/verification_session"
|
||||||
|
@ -5,7 +5,7 @@ module Stripe
|
|||||||
# This object represents files hosted on Stripe's servers. You can upload
|
# This object represents files hosted on Stripe's servers. You can upload
|
||||||
# files with the [create file](https://stripe.com/docs/api#create_file) request
|
# files with the [create file](https://stripe.com/docs/api#create_file) request
|
||||||
# (for example, when uploading dispute evidence). Stripe also
|
# (for example, when uploading dispute evidence). Stripe also
|
||||||
# creates files independetly (for example, the results of a [Sigma scheduled
|
# creates files independently (for example, the results of a [Sigma scheduled
|
||||||
# query](https://stripe.com/docs/api#scheduled_queries)).
|
# query](https://stripe.com/docs/api#scheduled_queries)).
|
||||||
#
|
#
|
||||||
# Related guide: [File upload guide](https://stripe.com/docs/file-upload)
|
# Related guide: [File upload guide](https://stripe.com/docs/file-upload)
|
||||||
|
@ -36,6 +36,24 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def subscribe(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/financial_connections/accounts/%<account>s/subscribe", { account: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def unsubscribe(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/financial_connections/accounts/%<account>s/unsubscribe", { account: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def self.disconnect(account, params = {}, opts = {})
|
def self.disconnect(account, params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -62,6 +80,24 @@ module Stripe
|
|||||||
opts: opts
|
opts: opts
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.subscribe(account, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/financial_connections/accounts/%<account>s/subscribe", { account: CGI.escape(account) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.unsubscribe(account, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/financial_connections/accounts/%<account>s/unsubscribe", { account: CGI.escape(account) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
13
lib/stripe/resources/financial_connections/transaction.rb
Normal file
13
lib/stripe/resources/financial_connections/transaction.rb
Normal 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
|
@ -613,6 +613,14 @@ module Stripe
|
|||||||
Stripe::FinancialConnections::Account.refresh_account("fca_xyz", { features: ["balance"] })
|
Stripe::FinancialConnections::Account.refresh_account("fca_xyz", { features: ["balance"] })
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/accounts/fca_xyz/refresh"
|
assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/accounts/fca_xyz/refresh"
|
||||||
end
|
end
|
||||||
|
should "Test financial connections accounts subscribe post" do
|
||||||
|
Stripe::FinancialConnections::Account.subscribe("fa_123", { features: ["transactions"] })
|
||||||
|
assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/accounts/fa_123/subscribe"
|
||||||
|
end
|
||||||
|
should "Test financial connections accounts unsubscribe post" do
|
||||||
|
Stripe::FinancialConnections::Account.unsubscribe("fa_123", { features: ["transactions"] })
|
||||||
|
assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/accounts/fa_123/unsubscribe"
|
||||||
|
end
|
||||||
should "Test financial connections sessions get" do
|
should "Test financial connections sessions get" do
|
||||||
Stripe::FinancialConnections::Session.retrieve("fcsess_xyz")
|
Stripe::FinancialConnections::Session.retrieve("fcsess_xyz")
|
||||||
assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/sessions/fcsess_xyz?"
|
assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/sessions/fcsess_xyz?"
|
||||||
@ -642,6 +650,14 @@ module Stripe
|
|||||||
})
|
})
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/sessions"
|
assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/sessions"
|
||||||
end
|
end
|
||||||
|
should "Test financial connections transactions get" do
|
||||||
|
Stripe::FinancialConnections::Transaction.retrieve("tr_123")
|
||||||
|
assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/transactions/tr_123?"
|
||||||
|
end
|
||||||
|
should "Test financial connections transactions get 2" do
|
||||||
|
Stripe::FinancialConnections::Transaction.list({ account: "fca_xyz" })
|
||||||
|
assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/transactions?account=fca_xyz"
|
||||||
|
end
|
||||||
should "Test identity verification reports get" do
|
should "Test identity verification reports get" do
|
||||||
Stripe::Identity::VerificationReport.list({ limit: 3 })
|
Stripe::Identity::VerificationReport.list({ limit: 3 })
|
||||||
assert_requested :get, "#{Stripe.api_base}/v1/identity/verification_reports?limit=3"
|
assert_requested :get, "#{Stripe.api_base}/v1/identity/verification_reports?limit=3"
|
||||||
@ -1571,6 +1587,22 @@ module Stripe
|
|||||||
Stripe::TaxRate.update("txr_xxxxxxxxxxxxx", { active: false })
|
Stripe::TaxRate.update("txr_xxxxxxxxxxxxx", { active: false })
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/tax_rates/txr_xxxxxxxxxxxxx"
|
assert_requested :post, "#{Stripe.api_base}/v1/tax_rates/txr_xxxxxxxxxxxxx"
|
||||||
end
|
end
|
||||||
|
should "Test tax registrations get" do
|
||||||
|
Stripe::Tax::Registration.list({ status: "all" })
|
||||||
|
assert_requested :get, "#{Stripe.api_base}/v1/tax/registrations?status=all"
|
||||||
|
end
|
||||||
|
should "Test tax registrations post" do
|
||||||
|
Stripe::Tax::Registration.create({
|
||||||
|
country: "IE",
|
||||||
|
country_options: { ie: { type: "oss_union" } },
|
||||||
|
active_from: "now",
|
||||||
|
})
|
||||||
|
assert_requested :post, "#{Stripe.api_base}/v1/tax/registrations"
|
||||||
|
end
|
||||||
|
should "Test tax registrations post 2" do
|
||||||
|
Stripe::Tax::Registration.update("taxreg_xxxxxxxxxxxxx", { expires_at: "now" })
|
||||||
|
assert_requested :post, "#{Stripe.api_base}/v1/tax/registrations/taxreg_xxxxxxxxxxxxx"
|
||||||
|
end
|
||||||
should "Test tax settings get" do
|
should "Test tax settings get" do
|
||||||
Stripe::Tax::Settings.retrieve
|
Stripe::Tax::Settings.retrieve
|
||||||
assert_requested :get, "#{Stripe.api_base}/v1/tax/settings?"
|
assert_requested :get, "#{Stripe.api_base}/v1/tax/settings?"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user