Compare commits

..

2 Commits

Author SHA1 Message Date
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
e6b167565e
Codegen for openapi v219 (#1169) 2023-01-19 10:19:27 -08:00
4 changed files with 62 additions and 63 deletions

View File

@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
@ -33,7 +33,7 @@ jobs:
- name: Build
run: gem build stripe.gemspec
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: gems
path: '*.gem'
@ -43,9 +43,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
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:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: gems
path: gems

View File

@ -1 +1 @@
v204
v219

View File

@ -64,7 +64,6 @@ module Stripe
nested_resource_class_methods :external_account,
operations: %i[create retrieve update delete list]
nested_resource_class_methods :login_link, operations: %i[create]
def resource_url

View File

@ -32,6 +32,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" })
@ -78,6 +84,31 @@ module Stripe
assert_requested :get, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx?"
end
end
context "ApplicationFeeRefund.list" do
should "support requests with args: limit, parent_id" do
Stripe::ApplicationFee.list_refunds("fee_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx/refunds?limit=3"
end
end
context "ApplicationFeeRefund.retrieve" do
should "support requests with args: parent_id, id" do
Stripe::ApplicationFee.retrieve_refund(
"fee_xxxxxxxxxxxxx",
"fr_xxxxxxxxxxxxx"
)
assert_requested :get, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx?"
end
end
context "ApplicationFeeRefund.update" do
should "support requests with args: metadata, parent_id, id" do
Stripe::ApplicationFee.update_refund(
"fee_xxxxxxxxxxxxx",
"fr_xxxxxxxxxxxxx",
{ metadata: { order_id: "6735" } }
)
assert_requested :post, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"
end
end
context "Apps.Secret.create" do
should "support requests with args: name, payload, scope" do
Stripe::Apps::Secret.create(
@ -571,31 +602,6 @@ module Stripe
assert_requested :get, "#{Stripe.api_base}/v1/events/evt_xxxxxxxxxxxxx?"
end
end
context "FeeRefund.list" do
should "support requests with args: limit, parent_id" do
Stripe::ApplicationFee.list_refunds("fee_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx/refunds?limit=3"
end
end
context "FeeRefund.retrieve" do
should "support requests with args: parent_id, id" do
Stripe::ApplicationFee.retrieve_refund(
"fee_xxxxxxxxxxxxx",
"fr_xxxxxxxxxxxxx"
)
assert_requested :get, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx?"
end
end
context "FeeRefund.update" do
should "support requests with args: metadata, parent_id, id" do
Stripe::ApplicationFee.update_refund(
"fee_xxxxxxxxxxxxx",
"fr_xxxxxxxxxxxxx",
{ metadata: { order_id: "6735" } }
)
assert_requested :post, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"
end
end
context "File.list" do
should "support requests with args: limit" do
Stripe::File.list({ limit: 3 })
@ -1294,12 +1300,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(
@ -1684,6 +1684,31 @@ module Stripe
assert_requested :get, "#{Stripe.api_base}/v1/reporting/report_types/balance.summary.1?"
end
end
context "Reversal.list" do
should "support requests with args: limit, parent_id" do
Stripe::Transfer.list_reversals("tr_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx/reversals?limit=3"
end
end
context "Reversal.retrieve" do
should "support requests with args: parent_id, id" do
Stripe::Transfer.retrieve_reversal(
"tr_xxxxxxxxxxxxx",
"trr_xxxxxxxxxxxxx"
)
assert_requested :get, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx?"
end
end
context "Reversal.update" do
should "support requests with args: metadata, parent_id, id" do
Stripe::Transfer.update_reversal(
"tr_xxxxxxxxxxxxx",
"trr_xxxxxxxxxxxxx",
{ metadata: { order_id: "6735" } }
)
assert_requested :post, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"
end
end
context "Review.approve" do
should "support requests with args: id" do
Stripe::Review.approve("prv_xxxxxxxxxxxxx")
@ -2383,31 +2408,6 @@ module Stripe
assert_requested :post, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx"
end
end
context "TransferReversal.list" do
should "support requests with args: limit, parent_id" do
Stripe::Transfer.list_reversals("tr_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx/reversals?limit=3"
end
end
context "TransferReversal.retrieve" do
should "support requests with args: parent_id, id" do
Stripe::Transfer.retrieve_reversal(
"tr_xxxxxxxxxxxxx",
"trr_xxxxxxxxxxxxx"
)
assert_requested :get, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx?"
end
end
context "TransferReversal.update" do
should "support requests with args: metadata, parent_id, id" do
Stripe::Transfer.update_reversal(
"tr_xxxxxxxxxxxxx",
"trr_xxxxxxxxxxxxx",
{ metadata: { order_id: "6735" } }
)
assert_requested :post, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"
end
end
context "Treasury.CreditReversal.create" do
should "support requests with args: received_credit" do
Stripe::Treasury::CreditReversal.create(