Compare commits

..

No commits in common. "1af83889bbd7186627d431fb7ca1de5f8a7d9c48" and "96b7453ee9c21d1f1a564a71b4f917c9884a1acc" have entirely different histories.

5 changed files with 9 additions and 39 deletions

View File

@ -1 +1 @@
v406
v392

View File

@ -2,7 +2,7 @@
# frozen_string_literal: true
module Stripe
# A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
# A customer session allows you to grant client access to Stripe's frontend SDKs (like BillingJs)
# control over a customer.
class CustomerSession < APIResource
extend Stripe::APIOperations::Create

View File

@ -3,7 +3,6 @@
module Stripe
module FinancialConnections
# Describes an owner of an account.
class AccountOwner < StripeObject
OBJECT_NAME = "financial_connections.account_owner"
end

View File

@ -89,16 +89,13 @@ module Stripe
val = Stripe::LEVEL_DEBUG
elsif val == "info"
val = Stripe::LEVEL_INFO
elsif val == "error"
val = Stripe::LEVEL_ERROR
end
levels = [Stripe::LEVEL_INFO, Stripe::LEVEL_DEBUG, Stripe::LEVEL_ERROR]
if !val.nil? && !levels.include?(val)
raise ArgumentError,
"log_level should only be set to `nil`, `debug`, `info`," \
" or `error`"
"log_level should only be set to `nil`, `debug` or `info`"
end
@log_level = val
end

View File

@ -30,6 +30,12 @@ module Stripe
assert_requested :get, "#{Stripe.api_base}/v1/accounts?limit=3"
end
end
context "Account.persons" do
should "support requests with args: limit, parent_id" do
Stripe::Account.persons("acct_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/persons?limit=3"
end
end
context "Account.reject" do
should "support requests with args: reason, id" do
Stripe::Account.reject("acct_xxxxxxxxxxxxx", { reason: "fraud" })
@ -1306,32 +1312,6 @@ module Stripe
assert_requested :post, "#{Stripe.api_base}/v1/payment_methods/pm_xxxxxxxxxxxxx"
end
end
context "PaymentSource.update" do
should "support requests with args: customer, card, account_holder_name" do
Stripe::Customer.update_source(
"cus_123",
"card_123",
{ account_holder_name: "Kamil" }
)
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_123/sources/card_123"
end
should "support requests with args: metadata, parent_id, id" do
Stripe::Customer.update_source(
"cus_xxxxxxxxxxxxx",
"ba_xxxxxxxxxxxxx",
{ metadata: { order_id: "6735" } }
)
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx"
end
should "support requests with args: name, parent_id, id" do
Stripe::Customer.update_source(
"cus_xxxxxxxxxxxxx",
"card_xxxxxxxxxxxxx",
{ name: "Jenny Rosen" }
)
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx"
end
end
context "Payout.cancel" do
should "support requests with args: id" do
Stripe::Payout.cancel("po_xxxxxxxxxxxxx")
@ -1374,12 +1354,6 @@ module Stripe
assert_requested :post, "#{Stripe.api_base}/v1/payouts/po_xxxxxxxxxxxxx"
end
end
context "Person.list" do
should "support requests with args: limit, parent_id" do
Stripe::Account.list_persons("acct_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/persons?limit=3"
end
end
context "Person.retrieve" do
should "support requests with args: parent_id, id" do
Stripe::Account.retrieve_person(