vendor/stripe/stripe-php/lib/Service/AccountService.php line 403

Open in your IDE?
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service;
  4. /**
  5.  * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  6.  *
  7.  * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  8.  */
  9. class AccountService extends AbstractService
  10. {
  11.     /**
  12.      * Returns a list of accounts connected to your platform via <a
  13.      * href="/docs/connect">Connect</a>. If you’re not a platform, the list is empty.
  14.      *
  15.      * @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
  16.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  17.      *
  18.      * @return \Stripe\Collection<\Stripe\Account>
  19.      *
  20.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  21.      */
  22.     public function all($params null$opts null)
  23.     {
  24.         return $this->requestCollection('get''/v1/accounts'$params$opts);
  25.     }
  26.     /**
  27.      * Returns a list of capabilities associated with the account. The capabilities are
  28.      * returned sorted by creation date, with the most recent capability appearing
  29.      * first.
  30.      *
  31.      * @param string $parentId
  32.      * @param null|array{expand?: string[]} $params
  33.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  34.      *
  35.      * @return \Stripe\Collection<\Stripe\Capability>
  36.      *
  37.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  38.      */
  39.     public function allCapabilities($parentId$params null$opts null)
  40.     {
  41.         return $this->requestCollection('get'$this->buildPath('/v1/accounts/%s/capabilities'$parentId), $params$opts);
  42.     }
  43.     /**
  44.      * List external accounts for an account.
  45.      *
  46.      * @param string $parentId
  47.      * @param null|array{ending_before?: string, expand?: string[], limit?: int, object?: string, starting_after?: string} $params
  48.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  49.      *
  50.      * @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card>
  51.      *
  52.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  53.      */
  54.     public function allExternalAccounts($parentId$params null$opts null)
  55.     {
  56.         return $this->requestCollection('get'$this->buildPath('/v1/accounts/%s/external_accounts'$parentId), $params$opts);
  57.     }
  58.     /**
  59.      * Returns a list of people associated with the account’s legal entity. The people
  60.      * are returned sorted by creation date, with the most recent people appearing
  61.      * first.
  62.      *
  63.      * @param string $parentId
  64.      * @param null|array{ending_before?: string, expand?: string[], limit?: int, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, representative?: bool}, starting_after?: string} $params
  65.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  66.      *
  67.      * @return \Stripe\Collection<\Stripe\Person>
  68.      *
  69.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  70.      */
  71.     public function allPersons($parentId$params null$opts null)
  72.     {
  73.         return $this->requestCollection('get'$this->buildPath('/v1/accounts/%s/persons'$parentId), $params$opts);
  74.     }
  75.     /**
  76.      * With <a href="/docs/connect">Connect</a>, you can create Stripe accounts for
  77.      * your users. To do this, you’ll first need to <a
  78.      * href="https://dashboard.stripe.com/account/applications/settings">register your
  79.      * platform</a>.
  80.      *
  81.      * If you’ve already collected information for your connected accounts, you <a
  82.      * href="/docs/connect/best-practices#onboarding">can prefill that information</a>
  83.      * when creating the account. Connect Onboarding won’t ask for the prefilled
  84.      * information during account onboarding. You can prefill any information on the
  85.      * account.
  86.      *
  87.      * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, controller?: array{fees?: array{payer?: string}, losses?: array{payments?: string}, requirement_collection?: string, stripe_dashboard?: array{type?: string}}, country?: string, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[]}, proof_of_ultimate_beneficial_ownership?: array{files?: string[]}}, email?: string, expand?: string[], external_account?: array|string, groups?: array{payments_pricing?: null|string}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, metadata?: null|array<string, string>, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}, type?: string} $params
  88.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  89.      *
  90.      * @return \Stripe\Account
  91.      *
  92.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  93.      */
  94.     public function create($params null$opts null)
  95.     {
  96.         return $this->request('post''/v1/accounts'$params$opts);
  97.     }
  98.     /**
  99.      * Create an external account for a given account.
  100.      *
  101.      * @param string $parentId
  102.      * @param null|array{default_for_currency?: bool, expand?: string[], external_account: array|string, metadata?: array<string, string>} $params
  103.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  104.      *
  105.      * @return \Stripe\BankAccount|\Stripe\Card
  106.      *
  107.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  108.      */
  109.     public function createExternalAccount($parentId$params null$opts null)
  110.     {
  111.         return $this->request('post'$this->buildPath('/v1/accounts/%s/external_accounts'$parentId), $params$opts);
  112.     }
  113.     /**
  114.      * Creates a login link for a connected account to access the Express Dashboard.
  115.      *
  116.      * <strong>You can only create login links for accounts that use the <a
  117.      * href="/connect/express-dashboard">Express Dashboard</a> and are connected to
  118.      * your platform</strong>.
  119.      *
  120.      * @param string $parentId
  121.      * @param null|array{expand?: string[]} $params
  122.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  123.      *
  124.      * @return \Stripe\LoginLink
  125.      *
  126.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  127.      */
  128.     public function createLoginLink($parentId$params null$opts null)
  129.     {
  130.         return $this->request('post'$this->buildPath('/v1/accounts/%s/login_links'$parentId), $params$opts);
  131.     }
  132.     /**
  133.      * Creates a new person.
  134.      *
  135.      * @param string $parentId
  136.      * @param null|array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, expand?: string[], first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, person_token?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}} $params
  137.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  138.      *
  139.      * @return \Stripe\Person
  140.      *
  141.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  142.      */
  143.     public function createPerson($parentId$params null$opts null)
  144.     {
  145.         return $this->request('post'$this->buildPath('/v1/accounts/%s/persons'$parentId), $params$opts);
  146.     }
  147.     /**
  148.      * With <a href="/connect">Connect</a>, you can delete accounts you manage.
  149.      *
  150.      * Test-mode accounts can be deleted at any time.
  151.      *
  152.      * Live-mode accounts that have access to the standard dashboard and Stripe is
  153.      * responsible for negative account balances cannot be deleted, which includes
  154.      * Standard accounts. All other Live-mode accounts, can be deleted when all <a
  155.      * href="/api/balance/balance_object">balances</a> are zero.
  156.      *
  157.      * If you want to delete your own account, use the <a
  158.      * href="https://dashboard.stripe.com/settings/account">account information tab in
  159.      * your account settings</a> instead.
  160.      *
  161.      * @param string $id
  162.      * @param null|array $params
  163.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  164.      *
  165.      * @return \Stripe\Account
  166.      *
  167.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  168.      */
  169.     public function delete($id$params null$opts null)
  170.     {
  171.         return $this->request('delete'$this->buildPath('/v1/accounts/%s'$id), $params$opts);
  172.     }
  173.     /**
  174.      * Delete a specified external account for a given account.
  175.      *
  176.      * @param string $parentId
  177.      * @param string $id
  178.      * @param null|array $params
  179.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  180.      *
  181.      * @return \Stripe\BankAccount|\Stripe\Card
  182.      *
  183.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  184.      */
  185.     public function deleteExternalAccount($parentId$id$params null$opts null)
  186.     {
  187.         return $this->request('delete'$this->buildPath('/v1/accounts/%s/external_accounts/%s'$parentId$id), $params$opts);
  188.     }
  189.     /**
  190.      * Deletes an existing person’s relationship to the account’s legal entity. Any
  191.      * person with a relationship for an account can be deleted through the API, except
  192.      * if the person is the <code>account_opener</code>. If your integration is using
  193.      * the <code>executive</code> parameter, you cannot delete the only verified
  194.      * <code>executive</code> on file.
  195.      *
  196.      * @param string $parentId
  197.      * @param string $id
  198.      * @param null|array $params
  199.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  200.      *
  201.      * @return \Stripe\Person
  202.      *
  203.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  204.      */
  205.     public function deletePerson($parentId$id$params null$opts null)
  206.     {
  207.         return $this->request('delete'$this->buildPath('/v1/accounts/%s/persons/%s'$parentId$id), $params$opts);
  208.     }
  209.     /**
  210.      * With <a href="/connect">Connect</a>, you can reject accounts that you have
  211.      * flagged as suspicious.
  212.      *
  213.      * Only accounts where your platform is liable for negative account balances, which
  214.      * includes Custom and Express accounts, can be rejected. Test-mode accounts can be
  215.      * rejected at any time. Live-mode accounts can only be rejected after all balances
  216.      * are zero.
  217.      *
  218.      * @param string $id
  219.      * @param null|array{expand?: string[], reason: string} $params
  220.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  221.      *
  222.      * @return \Stripe\Account
  223.      *
  224.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  225.      */
  226.     public function reject($id$params null$opts null)
  227.     {
  228.         return $this->request('post'$this->buildPath('/v1/accounts/%s/reject'$id), $params$opts);
  229.     }
  230.     /**
  231.      * Retrieves information about the specified Account Capability.
  232.      *
  233.      * @param string $parentId
  234.      * @param string $id
  235.      * @param null|array{expand?: string[]} $params
  236.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  237.      *
  238.      * @return \Stripe\Capability
  239.      *
  240.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  241.      */
  242.     public function retrieveCapability($parentId$id$params null$opts null)
  243.     {
  244.         return $this->request('get'$this->buildPath('/v1/accounts/%s/capabilities/%s'$parentId$id), $params$opts);
  245.     }
  246.     /**
  247.      * Retrieve a specified external account for a given account.
  248.      *
  249.      * @param string $parentId
  250.      * @param string $id
  251.      * @param null|array{expand?: string[]} $params
  252.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  253.      *
  254.      * @return \Stripe\BankAccount|\Stripe\Card
  255.      *
  256.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  257.      */
  258.     public function retrieveExternalAccount($parentId$id$params null$opts null)
  259.     {
  260.         return $this->request('get'$this->buildPath('/v1/accounts/%s/external_accounts/%s'$parentId$id), $params$opts);
  261.     }
  262.     /**
  263.      * Retrieves an existing person.
  264.      *
  265.      * @param string $parentId
  266.      * @param string $id
  267.      * @param null|array{expand?: string[]} $params
  268.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  269.      *
  270.      * @return \Stripe\Person
  271.      *
  272.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  273.      */
  274.     public function retrievePerson($parentId$id$params null$opts null)
  275.     {
  276.         return $this->request('get'$this->buildPath('/v1/accounts/%s/persons/%s'$parentId$id), $params$opts);
  277.     }
  278.     /**
  279.      * Updates a <a href="/connect/accounts">connected account</a> by setting the
  280.      * values of the parameters passed. Any parameters not provided are left unchanged.
  281.      *
  282.      * For accounts where <a
  283.      * href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
  284.      * is <code>application</code>, which includes Custom accounts, you can update any
  285.      * information on the account.
  286.      *
  287.      * For accounts where <a
  288.      * href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
  289.      * is <code>stripe</code>, which includes Standard and Express accounts, you can
  290.      * update all information until you create an <a href="/api/account_links">Account
  291.      * Link</a> or <a href="/api/account_sessions">Account Session</a> to start Connect
  292.      * onboarding, after which some properties can no longer be updated.
  293.      *
  294.      * To update your own account, use the <a
  295.      * href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our
  296.      * <a href="/docs/connect/updating-accounts">Connect</a> documentation to learn
  297.      * more about updating accounts.
  298.      *
  299.      * @param string $id
  300.      * @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[]}, proof_of_ultimate_beneficial_ownership?: array{files?: string[]}}, email?: string, expand?: string[], external_account?: null|array|string, groups?: array{payments_pricing?: null|string}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, metadata?: null|array<string, string>, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{default_account_tax_ids?: null|string[], hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}} $params
  301.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  302.      *
  303.      * @return \Stripe\Account
  304.      *
  305.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  306.      */
  307.     public function update($id$params null$opts null)
  308.     {
  309.         return $this->request('post'$this->buildPath('/v1/accounts/%s'$id), $params$opts);
  310.     }
  311.     /**
  312.      * Updates an existing Account Capability. Request or remove a capability by
  313.      * updating its <code>requested</code> parameter.
  314.      *
  315.      * @param string $parentId
  316.      * @param string $id
  317.      * @param null|array{expand?: string[], requested?: bool} $params
  318.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  319.      *
  320.      * @return \Stripe\Capability
  321.      *
  322.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  323.      */
  324.     public function updateCapability($parentId$id$params null$opts null)
  325.     {
  326.         return $this->request('post'$this->buildPath('/v1/accounts/%s/capabilities/%s'$parentId$id), $params$opts);
  327.     }
  328.     /**
  329.      * Updates the metadata, account holder name, account holder type of a bank account
  330.      * belonging to a connected account and optionally sets it as the default for its
  331.      * currency. Other bank account details are not editable by design.
  332.      *
  333.      * You can only update bank accounts when <a
  334.      * href="/api/accounts/object#account_object-controller-requirement_collection">account.controller.requirement_collection</a>
  335.      * is <code>application</code>, which includes <a
  336.      * href="/connect/custom-accounts">Custom accounts</a>.
  337.      *
  338.      * You can re-enable a disabled bank account by performing an update call without
  339.      * providing any arguments or changes.
  340.      *
  341.      * @param string $parentId
  342.      * @param string $id
  343.      * @param null|array{account_holder_name?: string, account_holder_type?: null|string, account_type?: string, address_city?: string, address_country?: string, address_line1?: string, address_line2?: string, address_state?: string, address_zip?: string, default_for_currency?: bool, documents?: array{bank_account_ownership_verification?: array{files?: string[]}}, exp_month?: string, exp_year?: string, expand?: string[], metadata?: null|array<string, string>, name?: string} $params
  344.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  345.      *
  346.      * @return \Stripe\BankAccount|\Stripe\Card
  347.      *
  348.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  349.      */
  350.     public function updateExternalAccount($parentId$id$params null$opts null)
  351.     {
  352.         return $this->request('post'$this->buildPath('/v1/accounts/%s/external_accounts/%s'$parentId$id), $params$opts);
  353.     }
  354.     /**
  355.      * Updates an existing person.
  356.      *
  357.      * @param string $parentId
  358.      * @param string $id
  359.      * @param null|array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, expand?: string[], first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, person_token?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}} $params
  360.      * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  361.      *
  362.      * @return \Stripe\Person
  363.      *
  364.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  365.      */
  366.     public function updatePerson($parentId$id$params null$opts null)
  367.     {
  368.         return $this->request('post'$this->buildPath('/v1/accounts/%s/persons/%s'$parentId$id), $params$opts);
  369.     }
  370.     /**
  371.      * Retrieves the details of an account.
  372.      *
  373.      * @param null|string $id
  374.      * @param null|array $params
  375.      * @param null|array|\Stripe\Util\RequestOptions $opts
  376.      *
  377.      * @return \Stripe\Account
  378.      *
  379.      * @throws \Stripe\Exception\ApiErrorException if the request fails
  380.      */
  381.     public function retrieve($id null$params null$opts null)
  382.     {
  383.         if (null === $id) {
  384.             return $this->request('get''/v1/account'$params$opts);
  385.         }
  386.         return $this->request('get'$this->buildPath('/v1/accounts/%s'$id), $params$opts);
  387.     }
  388. }