diff --git a/spec/controllers/admin/stripe_accounts_controller_spec.rb b/spec/controllers/admin/stripe_accounts_controller_spec.rb index b5b0683c73..a1b5df8d69 100644 --- a/spec/controllers/admin/stripe_accounts_controller_spec.rb +++ b/spec/controllers/admin/stripe_accounts_controller_spec.rb @@ -5,12 +5,11 @@ require 'spec_helper' describe Admin::StripeAccountsController, type: :controller do let(:enterprise) { create(:distributor_enterprise) } - before do - Stripe.client_id = "some_id" - end - describe "#connect" do + let(:client_id) { ENV.fetch('STRIPE_CLIENT_ID', nil) } + before do + Stripe.client_id = client_id allow(controller).to receive(:spree_current_user) { enterprise.owner } end @@ -21,12 +20,12 @@ describe Admin::StripeAccountsController, type: :controller do expect(response).to redirect_to("https://connect.stripe.com/oauth/authorize?" \ "state=eyJhbGciOiJIUzI1NiJ9.eyJlbnRlcnByaXNlX2lkIjoiMSJ9" \ ".jSSFGn0bLhwuiQYK5ORmHWW7aay1l030bcfGwn1JbFg&" \ - "scope=read_write&client_id=some_id&response_type=code") + "scope=read_write&client_id=#{client_id}&response_type=code") end end describe "#destroy" do - let(:params) { { format: :json, id: "some_id" } } + let(:params) { { format: :json, id: "client_id" } } context "when the specified stripe account doesn't exist" do it "raises an error?" do @@ -34,8 +33,18 @@ describe Admin::StripeAccountsController, type: :controller do end end - context "when the specified stripe account exists" do - let(:stripe_account) { create(:stripe_account, enterprise:) } + context "when the specified stripe account exists", :vcr, :stripe_version do + let(:connected_account) do + Stripe::Account.create({ + type: 'standard', + country: 'AU', + email: 'jumping.jack@example.com', + business_type: "non_profit" + }) + end + let(:stripe_account) { + create(:stripe_account, enterprise:, stripe_user_id: connected_account.id) + } before do # So that we can stub #deauthorize_and_destroy @@ -43,6 +52,10 @@ describe Admin::StripeAccountsController, type: :controller do params[:id] = stripe_account.id end + after do + Stripe::Account.delete(connected_account.id) + end + context "when I don't manage the enterprise linked to the stripe account" do let(:some_user) { create(:user) } @@ -83,11 +96,6 @@ describe Admin::StripeAccountsController, type: :controller do describe "#status" do let(:params) { { format: :json, enterprise_id: enterprise.id } } - before do - Stripe.api_key = "sk_test_12345" - allow(Spree::Config).to receive(:stripe_connect_enabled).and_return(false) - end - context "when I don't manage the specified enterprise" do let(:user) { create(:user) } @@ -125,45 +133,48 @@ describe Admin::StripeAccountsController, type: :controller do end end - context "when a stripe account is associated with the specified enterprise" do + context "when a stripe account is associated with the specified enterprise", :vcr, + :stripe_version do + let(:connected_account) do + Stripe::Account.create({ + type: 'standard', + country: 'AU', + email: 'jumping.jack@example.com', + business_type: "non_profit" + }) + end let!(:account) { - create(:stripe_account, stripe_user_id: "acc_123", enterprise:) + create(:stripe_account, stripe_user_id: connected_account.id, enterprise:) } + after do + Stripe::Account.delete(connected_account.id) + end + context "but access has been revoked or does not exist on stripe's servers" do + let(:message) { + "The provided key 'sk_test_******************************uCJm' " \ + "does not have access to account 'acct_fake_account' (or that account " \ + "does not exist). Application access may have been revoked." + } before do - stub_request(:get, - "https://api.stripe.com/v1/accounts/acc_123").to_return(status: 404) + account.update(stripe_user_id: "acct_fake_account") end it "returns with a status of 'access_revoked'" do - get(:status, params:) - json_response = JSON.parse(response.body) - expect(json_response["status"]).to eq "access_revoked" + expect { + response = get(:status, params:) + }.to raise_error Stripe::PermissionError, message end end context "which is connected" do - let(:stripe_account_mock) do - { - id: "acc_123", - business_name: "My Org", - charges_enabled: true, - some_other_attr: "something" - } - end - - before do - stub_request(:get, "https://api.stripe.com/v1/accounts/acc_123") - .to_return(body: JSON.generate(stripe_account_mock)) - end - it "returns with a status of 'connected'" do - get(:status, params:) + response = get(:status, params:) json_response = JSON.parse(response.body) expect(json_response["status"]).to eq "connected" # serializes required attrs - expect(json_response["business_name"]).to eq "My Org" + expect(json_response["charges_enabled"]).to eq false # ignores other attrs expect(json_response["some_other_attr"]).to be nil end diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_don_t_manage_the_enterprise_linked_to_the_stripe_account/redirects_to_unauthorized.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_don_t_manage_the_enterprise_linked_to_the_stripe_account/redirects_to_unauthorized.yml new file mode 100644 index 0000000000..ec0c95ca38 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_don_t_manage_the_enterprise_linked_to_the_stripe_account/redirects_to_unauthorized.yml @@ -0,0 +1,316 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=jumping.jack%40example.com&business_type=non_profit + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:02 GMT + Content-Type: + - application/json + Content-Length: + - '3527' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Idempotency-Key: + - b963ad29-314d-4fa3-86c8-ed8d21182414 + Original-Request: + - req_Ph5LpkrVmGvJSp + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_Ph5LpkrVmGvJSp + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkXwQMV2WNdfaG", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": "non_profit", + "capabilities": {}, + "charges_enabled": false, + "company": { + "address": { + "city": null, + "country": "AU", + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "directors_provided": false, + "executives_provided": false, + "name": null, + "owners_provided": false, + "tax_id_provided": false, + "verification": { + "document": { + "back": null, + "details": null, + "details_code": null, + "front": null + } + } + }, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1711738381, + "default_currency": "aud", + "details_submitted": false, + "email": "jumping.jack@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OzkXwQMV2WNdfaG/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Fri, 29 Mar 2024 18:53:02 GMT +- request: + method: delete + uri: https://api.stripe.com/v1/accounts/acct_1OzkXwQMV2WNdfaG + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_Ph5LpkrVmGvJSp","request_duration_ms":2188}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:03 GMT + Content-Type: + - application/json + Content-Length: + - '77' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts%2F%3Aaccount; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_xbUYf1jqhpZXGn + Stripe-Account: + - acct_1OzkXwQMV2WNdfaG + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkXwQMV2WNdfaG", + "object": "account", + "deleted": true + } + recorded_at: Fri, 29 Mar 2024 18:53:03 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_manage_the_enterprise_linked_to_the_stripe_account/and_the_attempt_to_deauthorize_and_destroy_fails/redirects_to_unauthorized.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_manage_the_enterprise_linked_to_the_stripe_account/and_the_attempt_to_deauthorize_and_destroy_fails/redirects_to_unauthorized.yml new file mode 100644 index 0000000000..f7a27dfdd2 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_manage_the_enterprise_linked_to_the_stripe_account/and_the_attempt_to_deauthorize_and_destroy_fails/redirects_to_unauthorized.yml @@ -0,0 +1,318 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=jumping.jack%40example.com&business_type=non_profit + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_JGxjtcKW5dC7dD","request_duration_ms":910}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:08 GMT + Content-Type: + - application/json + Content-Length: + - '3527' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Idempotency-Key: + - 40c1e7cc-70fa-477f-afc9-5414eb47e9b7 + Original-Request: + - req_MZwNhnG2QwlJ04 + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_MZwNhnG2QwlJ04 + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkY24EZjTC8pH1", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": "non_profit", + "capabilities": {}, + "charges_enabled": false, + "company": { + "address": { + "city": null, + "country": "AU", + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "directors_provided": false, + "executives_provided": false, + "name": null, + "owners_provided": false, + "tax_id_provided": false, + "verification": { + "document": { + "back": null, + "details": null, + "details_code": null, + "front": null + } + } + }, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1711738387, + "default_currency": "aud", + "details_submitted": false, + "email": "jumping.jack@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OzkY24EZjTC8pH1/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Fri, 29 Mar 2024 18:53:08 GMT +- request: + method: delete + uri: https://api.stripe.com/v1/accounts/acct_1OzkY24EZjTC8pH1 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_MZwNhnG2QwlJ04","request_duration_ms":1764}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:09 GMT + Content-Type: + - application/json + Content-Length: + - '77' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts%2F%3Aaccount; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_tfFx6yqOhyxOEz + Stripe-Account: + - acct_1OzkY24EZjTC8pH1 + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkY24EZjTC8pH1", + "object": "account", + "deleted": true + } + recorded_at: Fri, 29 Mar 2024 18:53:09 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_manage_the_enterprise_linked_to_the_stripe_account/and_the_attempt_to_deauthorize_and_destroy_succeeds/redirects_to_unauthorized.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_manage_the_enterprise_linked_to_the_stripe_account/and_the_attempt_to_deauthorize_and_destroy_succeeds/redirects_to_unauthorized.yml new file mode 100644 index 0000000000..b69281afc0 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_destroy/when_the_specified_stripe_account_exists/when_I_manage_the_enterprise_linked_to_the_stripe_account/and_the_attempt_to_deauthorize_and_destroy_succeeds/redirects_to_unauthorized.yml @@ -0,0 +1,318 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=jumping.jack%40example.com&business_type=non_profit + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_xbUYf1jqhpZXGn","request_duration_ms":1121}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:05 GMT + Content-Type: + - application/json + Content-Length: + - '3527' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Idempotency-Key: + - 8f3afe92-8ae2-4e51-b958-949f48e942d3 + Original-Request: + - req_6C0wxXNZ11Bgnz + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_6C0wxXNZ11Bgnz + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkXzQN8gTLyS3G", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": "non_profit", + "capabilities": {}, + "charges_enabled": false, + "company": { + "address": { + "city": null, + "country": "AU", + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "directors_provided": false, + "executives_provided": false, + "name": null, + "owners_provided": false, + "tax_id_provided": false, + "verification": { + "document": { + "back": null, + "details": null, + "details_code": null, + "front": null + } + } + }, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1711738384, + "default_currency": "aud", + "details_submitted": false, + "email": "jumping.jack@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OzkXzQN8gTLyS3G/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Fri, 29 Mar 2024 18:53:05 GMT +- request: + method: delete + uri: https://api.stripe.com/v1/accounts/acct_1OzkXzQN8gTLyS3G + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_6C0wxXNZ11Bgnz","request_duration_ms":1887}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:06 GMT + Content-Type: + - application/json + Content-Length: + - '77' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts%2F%3Aaccount; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_JGxjtcKW5dC7dD + Stripe-Account: + - acct_1OzkXzQN8gTLyS3G + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkXzQN8gTLyS3G", + "object": "account", + "deleted": true + } + recorded_at: Fri, 29 Mar 2024 18:53:06 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_status/when_I_manage_the_specified_enterprise/when_Stripe_is_enabled/when_a_stripe_account_is_associated_with_the_specified_enterprise/but_access_has_been_revoked_or_does_not_exist_on_stripe_s_servers/returns_with_a_status_of_access_revoked_.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_status/when_I_manage_the_specified_enterprise/when_Stripe_is_enabled/when_a_stripe_account_is_associated_with_the_specified_enterprise/but_access_has_been_revoked_or_does_not_exist_on_stripe_s_servers/returns_with_a_status_of_access_revoked_.yml new file mode 100644 index 0000000000..6fb0d48c59 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_status/when_I_manage_the_specified_enterprise/when_Stripe_is_enabled/when_a_stripe_account_is_associated_with_the_specified_enterprise/but_access_has_been_revoked_or_does_not_exist_on_stripe_s_servers/returns_with_a_status_of_access_revoked_.yml @@ -0,0 +1,385 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=jumping.jack%40example.com&business_type=non_profit + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_tfFx6yqOhyxOEz","request_duration_ms":1044}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:11 GMT + Content-Type: + - application/json + Content-Length: + - '3527' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Idempotency-Key: + - 04c8a17e-a4e3-4013-829f-a734d08c842f + Original-Request: + - req_3nsCgMKYZfY3Wx + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_3nsCgMKYZfY3Wx + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkY6QPPCVWPRug", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": "non_profit", + "capabilities": {}, + "charges_enabled": false, + "company": { + "address": { + "city": null, + "country": "AU", + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "directors_provided": false, + "executives_provided": false, + "name": null, + "owners_provided": false, + "tax_id_provided": false, + "verification": { + "document": { + "back": null, + "details": null, + "details_code": null, + "front": null + } + } + }, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1711738391, + "default_currency": "aud", + "details_submitted": false, + "email": "jumping.jack@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OzkY6QPPCVWPRug/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Fri, 29 Mar 2024 18:53:12 GMT +- request: + method: get + uri: https://api.stripe.com/v1/accounts/acct_fake_account + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_3nsCgMKYZfY3Wx","request_duration_ms":1860}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 403 + message: Forbidden + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:12 GMT + Content-Type: + - application/json + Content-Length: + - '366' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Vary: + - Origin + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: | + { + "error": { + "message": "The provided key 'sk_test_******************************uCJm' does not have access to account 'acct_fake_account' (or that account does not exist). Application access may have been revoked.", + "type": "invalid_request_error", + "code": "account_invalid", + "doc_url": "https://stripe.com/docs/error-codes/account-invalid" + } + } + recorded_at: Fri, 29 Mar 2024 18:53:12 GMT +- request: + method: delete + uri: https://api.stripe.com/v1/accounts/acct_1OzkY6QPPCVWPRug + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_3nsCgMKYZfY3Wx","request_duration_ms":1860}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:13 GMT + Content-Type: + - application/json + Content-Length: + - '77' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts%2F%3Aaccount; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_vJuorSL1DL25TZ + Stripe-Account: + - acct_1OzkY6QPPCVWPRug + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkY6QPPCVWPRug", + "object": "account", + "deleted": true + } + recorded_at: Fri, 29 Mar 2024 18:53:13 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_status/when_I_manage_the_specified_enterprise/when_Stripe_is_enabled/when_a_stripe_account_is_associated_with_the_specified_enterprise/which_is_connected/returns_with_a_status_of_connected_.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_status/when_I_manage_the_specified_enterprise/when_Stripe_is_enabled/when_a_stripe_account_is_associated_with_the_specified_enterprise/which_is_connected/returns_with_a_status_of_connected_.yml new file mode 100644 index 0000000000..f6e0864aa4 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.13.0/Admin_StripeAccountsController/_status/when_I_manage_the_specified_enterprise/when_Stripe_is_enabled/when_a_stripe_account_is_associated_with_the_specified_enterprise/which_is_connected/returns_with_a_status_of_connected_.yml @@ -0,0 +1,547 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=jumping.jack%40example.com&business_type=non_profit + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_vJuorSL1DL25TZ","request_duration_ms":983}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:15 GMT + Content-Type: + - application/json + Content-Length: + - '3527' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Idempotency-Key: + - e53c1751-4670-4a7d-8fe1-0c0a8fb647fa + Original-Request: + - req_uzAqOcAR3ltbmh + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_uzAqOcAR3ltbmh + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkY9QQsxwR3QX7", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": "non_profit", + "capabilities": {}, + "charges_enabled": false, + "company": { + "address": { + "city": null, + "country": "AU", + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "directors_provided": false, + "executives_provided": false, + "name": null, + "owners_provided": false, + "tax_id_provided": false, + "verification": { + "document": { + "back": null, + "details": null, + "details_code": null, + "front": null + } + } + }, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1711738394, + "default_currency": "aud", + "details_submitted": false, + "email": "jumping.jack@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OzkY9QQsxwR3QX7/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Fri, 29 Mar 2024 18:53:15 GMT +- request: + method: get + uri: https://api.stripe.com/v1/accounts/acct_1OzkY9QQsxwR3QX7 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_uzAqOcAR3ltbmh","request_duration_ms":1896}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:15 GMT + Content-Type: + - application/json + Content-Length: + - '3527' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts%2F%3Aaccount; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_Lc3QvEcHt0FgLw + Stripe-Account: + - acct_1OzkY9QQsxwR3QX7 + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkY9QQsxwR3QX7", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": "non_profit", + "capabilities": {}, + "charges_enabled": false, + "company": { + "address": { + "city": null, + "country": "AU", + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "directors_provided": false, + "executives_provided": false, + "name": null, + "owners_provided": false, + "tax_id_provided": false, + "verification": { + "document": { + "back": null, + "details": null, + "details_code": null, + "front": null + } + } + }, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1711738394, + "default_currency": "aud", + "details_submitted": false, + "email": "jumping.jack@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OzkY9QQsxwR3QX7/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Fri, 29 Mar 2024 18:53:15 GMT +- request: + method: delete + uri: https://api.stripe.com/v1/accounts/acct_1OzkY9QQsxwR3QX7 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.13.0 + Authorization: + - "" + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_Lc3QvEcHt0FgLw","request_duration_ms":400}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - "" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Fri, 29 Mar 2024 18:53:16 GMT + Content-Type: + - application/json + Content-Length: + - '77' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts%2F%3Aaccount; block-all-mixed-content; + default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; + img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' + Cross-Origin-Opener-Policy-Report-Only: + - same-origin; report-to="coop" + Report-To: + - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}' + Reporting-Endpoints: + - coop="https://q.stripe.com/coop-report" + Request-Id: + - req_zHXfFMY9X0grgz + Stripe-Account: + - acct_1OzkY9QQsxwR3QX7 + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OzkY9QQsxwR3QX7", + "object": "account", + "deleted": true + } + recorded_at: Fri, 29 Mar 2024 18:53:16 GMT +recorded_with: VCR 6.2.0