mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-08-13 00:02:50 -04:00
Compare commits
4 Commits
98d0ee99eb
...
6aa1fad10e
Author | SHA1 | Date | |
---|---|---|---|
|
6aa1fad10e | ||
|
7590b09181 | ||
|
ded501370d | ||
|
45d7e30a61 |
29
CHANGELOG.md
29
CHANGELOG.md
@ -1,5 +1,34 @@
|
||||
# Changelog
|
||||
|
||||
## 8.6.0 - 2023-07-13
|
||||
* [#1244](https://github.com/stripe/stripe-ruby/pull/1244) Update generated code
|
||||
* Add support for new resource `Tax.Settings`
|
||||
* Add support for `retrieve` and `update` methods on resource `Settings`
|
||||
* [#1241](https://github.com/stripe/stripe-ruby/pull/1241) Update generated code
|
||||
|
||||
* [#1209](https://github.com/stripe/stripe-ruby/pull/1209) Update shoulda-context version
|
||||
* [#1235](https://github.com/stripe/stripe-ruby/pull/1235) Allow "error" string as log level
|
||||
* [#1238](https://github.com/stripe/stripe-ruby/pull/1238) Update log level error message to include `error`
|
||||
* [#1231](https://github.com/stripe/stripe-ruby/pull/1231) fix: variable typo in README for instrumentation
|
||||
* [#1234](https://github.com/stripe/stripe-ruby/pull/1234) Update generated code
|
||||
|
||||
* [#1230](https://github.com/stripe/stripe-ruby/pull/1230) Update generated code
|
||||
* Release specs are identical.
|
||||
* [#1226](https://github.com/stripe/stripe-ruby/pull/1226) Update generated code
|
||||
|
||||
* [#1223](https://github.com/stripe/stripe-ruby/pull/1223) Update generated code
|
||||
|
||||
* [#1225](https://github.com/stripe/stripe-ruby/pull/1225) Downgrade jaro_winkler
|
||||
* [#1219](https://github.com/stripe/stripe-ruby/pull/1219) Update generated code
|
||||
|
||||
Documentation updates.
|
||||
* [#1215](https://github.com/stripe/stripe-ruby/pull/1215) Update generated code
|
||||
|
||||
* [#1208](https://github.com/stripe/stripe-ruby/pull/1208) Update generated code
|
||||
|
||||
* [#1204](https://github.com/stripe/stripe-ruby/pull/1204) Update generated code
|
||||
|
||||
|
||||
## 8.5.0 - 2023-03-30
|
||||
* [#1203](https://github.com/stripe/stripe-ruby/pull/1203) Update generated code
|
||||
* Remove support for `create` method on resource `Tax.Transaction`
|
||||
|
@ -1 +1 @@
|
||||
v406
|
||||
v424
|
@ -90,6 +90,7 @@ module Stripe
|
||||
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
|
||||
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
||||
Tax::Calculation::OBJECT_NAME => Tax::Calculation,
|
||||
Tax::Settings::OBJECT_NAME => Tax::Settings,
|
||||
Tax::Transaction::OBJECT_NAME => Tax::Transaction,
|
||||
TaxCode::OBJECT_NAME => TaxCode,
|
||||
TaxId::OBJECT_NAME => TaxId,
|
||||
|
@ -77,6 +77,7 @@ require "stripe/resources/subscription"
|
||||
require "stripe/resources/subscription_item"
|
||||
require "stripe/resources/subscription_schedule"
|
||||
require "stripe/resources/tax/calculation"
|
||||
require "stripe/resources/tax/settings"
|
||||
require "stripe/resources/tax/transaction"
|
||||
require "stripe/resources/tax_code"
|
||||
require "stripe/resources/tax_id"
|
||||
|
@ -2,9 +2,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
# Shipping rates describe the price of shipping presented to your customers and can be
|
||||
# applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)
|
||||
# and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.
|
||||
# Shipping rates describe the price of shipping presented to your customers and
|
||||
# applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping).
|
||||
class ShippingRate < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
extend Stripe::APIOperations::List
|
||||
|
15
lib/stripe/resources/tax/settings.rb
Normal file
15
lib/stripe/resources/tax/settings.rb
Normal file
@ -0,0 +1,15 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Tax
|
||||
# You can use Tax `Settings` to manage configurations used by Stripe Tax calculations.
|
||||
#
|
||||
# Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)
|
||||
class Settings < SingletonAPIResource
|
||||
include Stripe::APIOperations::Save
|
||||
|
||||
OBJECT_NAME = "tax.settings"
|
||||
end
|
||||
end
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
VERSION = "8.5.0"
|
||||
VERSION = "8.6.0"
|
||||
end
|
||||
|
@ -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" })
|
||||
@ -605,6 +611,62 @@ module Stripe
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/events/evt_xxxxxxxxxxxxx?"
|
||||
end
|
||||
end
|
||||
context "ExternalAccount.create" do
|
||||
should "support requests with args: external_account, parent_id" do
|
||||
Stripe::Account.create_external_account(
|
||||
"acct_xxxxxxxxxxxxx",
|
||||
{ external_account: "btok_xxxxxxxxxxxxx" }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts"
|
||||
end
|
||||
should "support requests with args: external_account, parent_id2" do
|
||||
Stripe::Account.create_external_account(
|
||||
"acct_xxxxxxxxxxxxx",
|
||||
{ external_account: "tok_xxxx_debit" }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts"
|
||||
end
|
||||
end
|
||||
context "ExternalAccount.delete" do
|
||||
should "support requests with args: parent_id, id" do
|
||||
Stripe::Account.delete_external_account(
|
||||
"acct_xxxxxxxxxxxxx",
|
||||
"ba_xxxxxxxxxxxxx"
|
||||
)
|
||||
assert_requested :delete, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/ba_xxxxxxxxxxxxx?"
|
||||
end
|
||||
should "support requests with args: parent_id, id2" do
|
||||
Stripe::Account.delete_external_account(
|
||||
"acct_xxxxxxxxxxxxx",
|
||||
"card_xxxxxxxxxxxxx"
|
||||
)
|
||||
assert_requested :delete, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/card_xxxxxxxxxxxxx?"
|
||||
end
|
||||
end
|
||||
context "ExternalAccount.list" do
|
||||
should "support requests with args: limit, parent_id" do
|
||||
Stripe::Account.list_external_accounts("acct_xxxxxxxxxxxxx", { limit: 3 })
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts?limit=3"
|
||||
end
|
||||
end
|
||||
context "ExternalAccount.update" do
|
||||
should "support requests with args: metadata, parent_id, id" do
|
||||
Stripe::Account.update_external_account(
|
||||
"acct_xxxxxxxxxxxxx",
|
||||
"ba_xxxxxxxxxxxxx",
|
||||
{ metadata: { order_id: "6735" } }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/ba_xxxxxxxxxxxxx"
|
||||
end
|
||||
should "support requests with args: metadata, parent_id, id2" do
|
||||
Stripe::Account.update_external_account(
|
||||
"acct_xxxxxxxxxxxxx",
|
||||
"card_xxxxxxxxxxxxx",
|
||||
{ metadata: { order_id: "6735" } }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/card_xxxxxxxxxxxxx"
|
||||
end
|
||||
end
|
||||
context "File.list" do
|
||||
should "support requests with args: limit" do
|
||||
Stripe::File.list({ limit: 3 })
|
||||
@ -1306,30 +1368,58 @@ 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(
|
||||
context "PaymentSource.create" do
|
||||
should "support requests with args: source, parent_id" do
|
||||
Stripe::Customer.create_source(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
"ba_xxxxxxxxxxxxx",
|
||||
{ metadata: { order_id: "6735" } }
|
||||
{ source: "btok_xxxxxxxxxxxxx" }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx"
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources"
|
||||
end
|
||||
should "support requests with args: name, parent_id, id" do
|
||||
Stripe::Customer.update_source(
|
||||
should "support requests with args: source, parent_id2" do
|
||||
Stripe::Customer.create_source(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
"card_xxxxxxxxxxxxx",
|
||||
{ name: "Jenny Rosen" }
|
||||
{ source: "tok_xxxx" }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx"
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources"
|
||||
end
|
||||
end
|
||||
context "PaymentSource.list" do
|
||||
should "support requests with args: object, limit, parent_id" do
|
||||
Stripe::Customer.list_sources(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
{
|
||||
object: "bank_account",
|
||||
limit: 3,
|
||||
}
|
||||
)
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources?object=bank_account&limit=3"
|
||||
end
|
||||
should "support requests with args: object, limit, parent_id2" do
|
||||
Stripe::Customer.list_sources(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
{
|
||||
object: "card",
|
||||
limit: 3,
|
||||
}
|
||||
)
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources?object=card&limit=3"
|
||||
end
|
||||
end
|
||||
context "PaymentSource.retrieve" do
|
||||
should "support requests with args: parent_id, id" do
|
||||
Stripe::Customer.retrieve_source(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
"ba_xxxxxxxxxxxxx"
|
||||
)
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx?"
|
||||
end
|
||||
should "support requests with args: parent_id, id2" do
|
||||
Stripe::Customer.retrieve_source(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
"card_xxxxxxxxxxxxx"
|
||||
)
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx?"
|
||||
end
|
||||
end
|
||||
context "Payout.cancel" do
|
||||
@ -1374,12 +1464,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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user