mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-14 00:00:44 -04:00
Compare commits
2 Commits
fcfeac740e
...
339d36b0a2
Author | SHA1 | Date | |
---|---|---|---|
|
339d36b0a2 | ||
|
e6b167565e |
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
@ -33,7 +33,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: gem build stripe.gemspec
|
run: gem build stripe.gemspec
|
||||||
- name: 'Upload Artifact'
|
- name: 'Upload Artifact'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: gems
|
name: gems
|
||||||
path: '*.gem'
|
path: '*.gem'
|
||||||
@ -43,9 +43,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
@ -69,7 +69,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download all workflow run artifacts
|
- name: Download all workflow run artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: gems
|
name: gems
|
||||||
path: gems
|
path: gems
|
||||||
|
@ -1 +1 @@
|
|||||||
v204
|
v219
|
@ -64,7 +64,6 @@ module Stripe
|
|||||||
|
|
||||||
nested_resource_class_methods :external_account,
|
nested_resource_class_methods :external_account,
|
||||||
operations: %i[create retrieve update delete list]
|
operations: %i[create retrieve update delete list]
|
||||||
|
|
||||||
nested_resource_class_methods :login_link, operations: %i[create]
|
nested_resource_class_methods :login_link, operations: %i[create]
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
|
@ -32,6 +32,12 @@ module Stripe
|
|||||||
assert_requested :get, "#{Stripe.api_base}/v1/accounts?limit=3"
|
assert_requested :get, "#{Stripe.api_base}/v1/accounts?limit=3"
|
||||||
end
|
end
|
||||||
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
|
context "Account.reject" do
|
||||||
should "support requests with args: reason, id" do
|
should "support requests with args: reason, id" do
|
||||||
Stripe::Account.reject("acct_xxxxxxxxxxxxx", { reason: "fraud" })
|
Stripe::Account.reject("acct_xxxxxxxxxxxxx", { reason: "fraud" })
|
||||||
@ -78,6 +84,31 @@ module Stripe
|
|||||||
assert_requested :get, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx?"
|
assert_requested :get, "#{Stripe.api_base}/v1/application_fees/fee_xxxxxxxxxxxxx?"
|
||||||
end
|
end
|
||||||
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
|
context "Apps.Secret.create" do
|
||||||
should "support requests with args: name, payload, scope" do
|
should "support requests with args: name, payload, scope" do
|
||||||
Stripe::Apps::Secret.create(
|
Stripe::Apps::Secret.create(
|
||||||
@ -571,31 +602,6 @@ module Stripe
|
|||||||
assert_requested :get, "#{Stripe.api_base}/v1/events/evt_xxxxxxxxxxxxx?"
|
assert_requested :get, "#{Stripe.api_base}/v1/events/evt_xxxxxxxxxxxxx?"
|
||||||
end
|
end
|
||||||
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
|
context "File.list" do
|
||||||
should "support requests with args: limit" do
|
should "support requests with args: limit" do
|
||||||
Stripe::File.list({ limit: 3 })
|
Stripe::File.list({ limit: 3 })
|
||||||
@ -1294,12 +1300,6 @@ module Stripe
|
|||||||
assert_requested :post, "#{Stripe.api_base}/v1/payouts/po_xxxxxxxxxxxxx"
|
assert_requested :post, "#{Stripe.api_base}/v1/payouts/po_xxxxxxxxxxxxx"
|
||||||
end
|
end
|
||||||
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
|
context "Person.retrieve" do
|
||||||
should "support requests with args: parent_id, id" do
|
should "support requests with args: parent_id, id" do
|
||||||
Stripe::Account.retrieve_person(
|
Stripe::Account.retrieve_person(
|
||||||
@ -1684,6 +1684,31 @@ module Stripe
|
|||||||
assert_requested :get, "#{Stripe.api_base}/v1/reporting/report_types/balance.summary.1?"
|
assert_requested :get, "#{Stripe.api_base}/v1/reporting/report_types/balance.summary.1?"
|
||||||
end
|
end
|
||||||
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
|
context "Review.approve" do
|
||||||
should "support requests with args: id" do
|
should "support requests with args: id" do
|
||||||
Stripe::Review.approve("prv_xxxxxxxxxxxxx")
|
Stripe::Review.approve("prv_xxxxxxxxxxxxx")
|
||||||
@ -2383,31 +2408,6 @@ module Stripe
|
|||||||
assert_requested :post, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx"
|
assert_requested :post, "#{Stripe.api_base}/v1/transfers/tr_xxxxxxxxxxxxx"
|
||||||
end
|
end
|
||||||
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
|
context "Treasury.CreditReversal.create" do
|
||||||
should "support requests with args: received_credit" do
|
should "support requests with args: received_credit" do
|
||||||
Stripe::Treasury::CreditReversal.create(
|
Stripe::Treasury::CreditReversal.create(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user