diff --git a/src/Resources/Receivers/Receivers.php b/src/Resources/Receivers/Receivers.php index 53dcd15..1a39bf1 100644 --- a/src/Resources/Receivers/Receivers.php +++ b/src/Resources/Receivers/Receivers.php @@ -71,6 +71,100 @@ enum OwnerRole: string case CONTROLLING_PERSON = 'controlling_person'; } +enum AccountPurpose: string +{ + case CHARITABLE_DONATIONS = 'charitable_donations'; + case ECOMMERCE_RETAIL_PAYMENTS = 'ecommerce_retail_payments'; + case INVESTMENT_PURPOSES = 'investment_purposes'; + case BUSINESS_EXPENSES = 'business_expenses'; + case PAYMENTS_TO_FRIENDS_OR_FAMILY_ABROAD = 'payments_to_friends_or_family_abroad'; + case PERSONAL_OR_LIVING_EXPENSES = 'personal_or_living_expenses'; + case PROTECT_WEALTH = 'protect_wealth'; + case PURCHASE_GOODS_AND_SERVICES = 'purchase_goods_and_services'; + case RECEIVE_PAYMENTS_FOR_GOODS_AND_SERVICES = 'receive_payments_for_goods_and_services'; + case TAX_OPTIMIZATION = 'tax_optimization'; + case THIRD_PARTY_MONEY_TRANSMISSION = 'third_party_money_transmission'; + case OTHER = 'other'; + case PAYROLL = 'payroll'; + case TREASURY_MANAGEMENT = 'treasury_management'; +} + +enum ReceiverBusinessType: string +{ + case CORPORATION = 'corporation'; + case LLC = 'llc'; + case PARTNERSHIP = 'partnership'; + case SOLE_PROPRIETORSHIP = 'sole_proprietorship'; + case TRUST = 'trust'; + case NON_PROFIT = 'non_profit'; +} + +enum BusinessIndustry: string +{ + case NAICS_541511 = '541511'; + case NAICS_541512 = '541512'; + case NAICS_541519 = '541519'; + case NAICS_518210 = '518210'; + case NAICS_511210 = '511210'; + case NAICS_541611 = '541611'; + case NAICS_541618 = '541618'; + case NAICS_541330 = '541330'; + case NAICS_541990 = '541990'; + case NAICS_522110 = '522110'; + case NAICS_523110 = '523110'; + case NAICS_523920 = '523920'; + case NAICS_423430 = '423430'; + case NAICS_423690 = '423690'; + case NAICS_423110 = '423110'; + case NAICS_423830 = '423830'; + case NAICS_423840 = '423840'; + case NAICS_423510 = '423510'; + case NAICS_424210 = '424210'; + case NAICS_424690 = '424690'; + case NAICS_424990 = '424990'; + case NAICS_454110 = '454110'; + case NAICS_334111 = '334111'; + case NAICS_334118 = '334118'; + case NAICS_325412 = '325412'; + case NAICS_339112 = '339112'; + case NAICS_336111 = '336111'; + case NAICS_336390 = '336390'; + case NAICS_551112 = '551112'; + case NAICS_561499 = '561499'; + case NAICS_488510 = '488510'; + case NAICS_484121 = '484121'; + case NAICS_493110 = '493110'; + case NAICS_424410 = '424410'; + case NAICS_424480 = '424480'; + case NAICS_315990 = '315990'; + case NAICS_313110 = '313110'; + case NAICS_213112 = '213112'; + case NAICS_517110 = '517110'; + case NAICS_541214 = '541214'; +} + +enum EstimatedAnnualRevenue: string +{ + case RANGE_0_99999 = '0_99999'; + case RANGE_100000_999999 = '100000_999999'; + case RANGE_1000000_9999999 = '1000000_9999999'; + case RANGE_10000000_49999999 = '10000000_49999999'; + case RANGE_50000000_249999999 = '50000000_249999999'; + case RANGE_2500000000_PLUS = '2500000000_plus'; +} + +enum SourceOfWealth: string +{ + case BUSINESS_DIVIDENDS_OR_PROFITS = 'business_dividends_or_profits'; + case INVESTMENTS = 'investments'; + case ASSET_SALES = 'asset_sales'; + case CLIENT_INVESTOR_CONTRIBUTIONS = 'client_investor_contributions'; + case GAMBLING = 'gambling'; + case CHARITABLE_CONTRIBUTIONS = 'charitable_contributions'; + case INHERITANCE = 'inheritance'; + case AFFILIATE_OR_ROYALTY_INCOME = 'affiliate_or_royalty_income'; +} + enum LimitIncreaseRequestStatus: string { case IN_REVIEW = 'in_review'; @@ -110,7 +204,9 @@ public function __construct( public string $idDocFrontFile, public ?string $idDocBackFile, public ProofOfAddressDocType $proofOfAddressDocType, - public string $proofOfAddressDocFile + public ?string $proofOfAddressDocFile, + public ?float $ownershipPercentage, + public ?string $title ) {} public static function fromArray(array $data): self @@ -135,7 +231,9 @@ public static function fromArray(array $data): self idDocFrontFile: $data['id_doc_front_file'], idDocBackFile: $data['id_doc_back_file'] ?? null, proofOfAddressDocType: ProofOfAddressDocType::from($data['proof_of_address_doc_type']), - proofOfAddressDocFile: $data['proof_of_address_doc_file'] + proofOfAddressDocFile: $data['proof_of_address_doc_file'] ?? null, + ownershipPercentage: isset($data['ownership_percentage']) ? (float) $data['ownership_percentage'] : null, + title: $data['title'] ?? null ); } @@ -160,6 +258,8 @@ public function toArray(): array 'id_doc_back_file' => $this->idDocBackFile, 'proof_of_address_doc_type' => $this->proofOfAddressDocType->value, 'proof_of_address_doc_file' => $this->proofOfAddressDocFile, + 'ownership_percentage' => $this->ownershipPercentage, + 'title' => $this->title, ]; } } @@ -549,197 +649,216 @@ public static function fromArray(array $data): self readonly class CreateIndividualWithStandardKYCInput { public function __construct( - public string $addressLine1, - public string $city, public Country $country, - public string $dateOfBirth, public string $email, - public string $firstName, - public ?string $phoneNumber, - public Country $idDocCountry, - public string $idDocFrontFile, - public IdentificationDocument $idDocType, - public ?string $idDocBackFile, - public string $lastName, - public string $postalCode, - public string $proofOfAddressDocFile, - public ProofOfAddressDocType $proofOfAddressDocType, - public string $stateProvinceRegion, - public string $taxId, - public string $tosId, + public ?string $addressLine1 = null, public ?string $addressLine2 = null, - public ?string $externalId = null + public ?string $city = null, + public ?string $dateOfBirth = null, + public ?string $firstName = null, + public ?string $phoneNumber = null, + public ?Country $idDocCountry = null, + public ?string $idDocFrontFile = null, + public ?IdentificationDocument $idDocType = null, + public ?string $idDocBackFile = null, + public ?string $lastName = null, + public ?string $postalCode = null, + public ?string $proofOfAddressDocFile = null, + public ?ProofOfAddressDocType $proofOfAddressDocType = null, + public ?string $stateProvinceRegion = null, + public ?string $taxId = null, + public ?string $tosId = null, + public ?string $externalId = null, + public ?AccountPurpose $accountPurpose = null, + public ?string $selfieFile = null, + public ?SourceOfWealth $sourceOfWealth = null, + public ?string $imageUrl = null, + public ?string $ipAddress = null, + public ?string $sourceOfFundsDocFile = null, + public ?SourceOfFundsDocType $sourceOfFundsDocType = null ) {} public function toArray(): array { - $data = [ + return array_filter([ 'kyc_type' => 'standard', 'type' => 'individual', + 'country' => $this->country->value, + 'email' => $this->email, 'address_line_1' => $this->addressLine1, + 'address_line_2' => $this->addressLine2, 'city' => $this->city, - 'country' => $this->country->value, 'date_of_birth' => $this->dateOfBirth, - 'email' => $this->email, 'first_name' => $this->firstName, 'phone_number' => $this->phoneNumber, - 'id_doc_country' => $this->idDocCountry->value, + 'id_doc_country' => $this->idDocCountry?->value, 'id_doc_front_file' => $this->idDocFrontFile, - 'id_doc_type' => $this->idDocType->value, + 'id_doc_type' => $this->idDocType?->value, 'id_doc_back_file' => $this->idDocBackFile, 'last_name' => $this->lastName, 'postal_code' => $this->postalCode, 'proof_of_address_doc_file' => $this->proofOfAddressDocFile, - 'proof_of_address_doc_type' => $this->proofOfAddressDocType->value, + 'proof_of_address_doc_type' => $this->proofOfAddressDocType?->value, 'state_province_region' => $this->stateProvinceRegion, 'tax_id' => $this->taxId, 'tos_id' => $this->tosId, - ]; - - if ($this->addressLine2 !== null) { - $data['address_line_2'] = $this->addressLine2; - } - - if ($this->externalId !== null) { - $data['external_id'] = $this->externalId; - } - - return $data; + 'external_id' => $this->externalId, + 'account_purpose' => $this->accountPurpose?->value, + 'selfie_file' => $this->selfieFile, + 'source_of_wealth' => $this->sourceOfWealth?->value, + 'image_url' => $this->imageUrl, + 'ip_address' => $this->ipAddress, + 'source_of_funds_doc_file' => $this->sourceOfFundsDocFile, + 'source_of_funds_doc_type' => $this->sourceOfFundsDocType?->value, + ], fn ($value) => $value !== null); } } readonly class CreateIndividualWithEnhancedKYCInput { public function __construct( - public string $addressLine1, - public string $city, public Country $country, - public string $dateOfBirth, public string $email, - public string $firstName, - public Country $idDocCountry, - public string $idDocFrontFile, - public IdentificationDocument $idDocType, - public ?string $idDocBackFile, - public string $individualHoldingDocFrontFile, - public string $lastName, - public string $postalCode, - public ?string $phoneNumber, - public string $proofOfAddressDocFile, - public ProofOfAddressDocType $proofOfAddressDocType, - public PurposeOfTransactions $purposeOfTransactions, - public string $sourceOfFundsDocFile, - public SourceOfFundsDocType $sourceOfFundsDocType, - public ?string $purposeOfTransactionsExplanation, - public string $stateProvinceRegion, - public string $taxId, - public string $tosId, + public ?string $addressLine1 = null, public ?string $addressLine2 = null, - public ?string $externalId = null + public ?string $city = null, + public ?string $dateOfBirth = null, + public ?string $firstName = null, + public ?Country $idDocCountry = null, + public ?string $idDocFrontFile = null, + public ?IdentificationDocument $idDocType = null, + public ?string $idDocBackFile = null, + public ?string $lastName = null, + public ?string $postalCode = null, + public ?string $phoneNumber = null, + public ?string $proofOfAddressDocFile = null, + public ?ProofOfAddressDocType $proofOfAddressDocType = null, + public ?PurposeOfTransactions $purposeOfTransactions = null, + public ?string $sourceOfFundsDocFile = null, + public ?SourceOfFundsDocType $sourceOfFundsDocType = null, + public ?string $purposeOfTransactionsExplanation = null, + public ?string $stateProvinceRegion = null, + public ?string $taxId = null, + public ?string $tosId = null, + public ?string $externalId = null, + public ?AccountPurpose $accountPurpose = null, + public ?string $selfieFile = null, + public ?SourceOfWealth $sourceOfWealth = null, + public ?string $imageUrl = null, + public ?string $ipAddress = null ) {} public function toArray(): array { - $data = [ + return array_filter([ 'kyc_type' => 'enhanced', 'type' => 'individual', + 'country' => $this->country->value, + 'email' => $this->email, 'address_line_1' => $this->addressLine1, + 'address_line_2' => $this->addressLine2, 'city' => $this->city, - 'country' => $this->country->value, 'date_of_birth' => $this->dateOfBirth, - 'email' => $this->email, 'first_name' => $this->firstName, - 'id_doc_country' => $this->idDocCountry->value, + 'id_doc_country' => $this->idDocCountry?->value, 'id_doc_front_file' => $this->idDocFrontFile, - 'id_doc_type' => $this->idDocType->value, + 'id_doc_type' => $this->idDocType?->value, 'id_doc_back_file' => $this->idDocBackFile, - 'individual_holding_doc_front_file' => $this->individualHoldingDocFrontFile, 'last_name' => $this->lastName, 'postal_code' => $this->postalCode, 'phone_number' => $this->phoneNumber, 'proof_of_address_doc_file' => $this->proofOfAddressDocFile, - 'proof_of_address_doc_type' => $this->proofOfAddressDocType->value, - 'purpose_of_transactions' => $this->purposeOfTransactions->value, + 'proof_of_address_doc_type' => $this->proofOfAddressDocType?->value, + 'purpose_of_transactions' => $this->purposeOfTransactions?->value, 'source_of_funds_doc_file' => $this->sourceOfFundsDocFile, - 'source_of_funds_doc_type' => $this->sourceOfFundsDocType->value, + 'source_of_funds_doc_type' => $this->sourceOfFundsDocType?->value, 'purpose_of_transactions_explanation' => $this->purposeOfTransactionsExplanation, 'state_province_region' => $this->stateProvinceRegion, 'tax_id' => $this->taxId, 'tos_id' => $this->tosId, - ]; - - if ($this->addressLine2 !== null) { - $data['address_line_2'] = $this->addressLine2; - } - - if ($this->externalId !== null) { - $data['external_id'] = $this->externalId; - } - - return $data; + 'external_id' => $this->externalId, + 'account_purpose' => $this->accountPurpose?->value, + 'selfie_file' => $this->selfieFile, + 'source_of_wealth' => $this->sourceOfWealth?->value, + 'image_url' => $this->imageUrl, + 'ip_address' => $this->ipAddress, + ], fn ($value) => $value !== null); } } readonly class CreateBusinessWithStandardKYBInput { public function __construct( - public string $addressLine1, - public string $city, public Country $country, public string $email, - public string $formationDate, - public string $incorporationDocFile, - public string $legalName, - public array $owners, - public string $postalCode, - public string $proofOfAddressDocFile, - public ProofOfAddressDocType $proofOfAddressDocType, - public string $proofOfOwnershipDocFile, - public string $stateProvinceRegion, - public string $taxId, - public string $tosId, - public ?string $website, + public ?string $addressLine1 = null, public ?string $addressLine2 = null, + public ?string $city = null, + public ?string $formationDate = null, + public ?string $incorporationDocFile = null, + public ?string $legalName = null, + public ?array $owners = null, + public ?string $postalCode = null, + public ?string $proofOfAddressDocFile = null, + public ?ProofOfAddressDocType $proofOfAddressDocType = null, + public ?string $proofOfOwnershipDocFile = null, + public ?string $stateProvinceRegion = null, + public ?string $taxId = null, + public ?string $tosId = null, + public ?string $website = null, public ?string $alternateName = null, - public ?string $externalId = null + public ?string $externalId = null, + public ?AccountPurpose $accountPurpose = null, + public ?string $businessDescription = null, + public ?BusinessIndustry $businessIndustry = null, + public ?ReceiverBusinessType $businessType = null, + public ?EstimatedAnnualRevenue $estimatedAnnualRevenue = null, + public ?bool $publiclyTraded = null, + public ?SourceOfWealth $sourceOfWealth = null, + public ?string $imageUrl = null, + public ?string $ipAddress = null, + public ?string $phoneNumber = null, + public ?string $sourceOfFundsDocFile = null, + public ?SourceOfFundsDocType $sourceOfFundsDocType = null ) {} public function toArray(): array { - $data = [ + return array_filter([ 'kyc_type' => 'standard', 'type' => 'business', - 'address_line_1' => $this->addressLine1, - 'city' => $this->city, 'country' => $this->country->value, 'email' => $this->email, + 'address_line_1' => $this->addressLine1, + 'address_line_2' => $this->addressLine2, + 'city' => $this->city, 'formation_date' => $this->formationDate, 'incorporation_doc_file' => $this->incorporationDocFile, 'legal_name' => $this->legalName, - 'owners' => array_map(fn ($o) => $o->toArray(), $this->owners), + 'owners' => $this->owners !== null ? array_map(fn ($o) => $o->toArray(), $this->owners) : null, 'postal_code' => $this->postalCode, 'proof_of_address_doc_file' => $this->proofOfAddressDocFile, - 'proof_of_address_doc_type' => $this->proofOfAddressDocType->value, + 'proof_of_address_doc_type' => $this->proofOfAddressDocType?->value, 'proof_of_ownership_doc_file' => $this->proofOfOwnershipDocFile, 'state_province_region' => $this->stateProvinceRegion, 'tax_id' => $this->taxId, 'tos_id' => $this->tosId, 'website' => $this->website, - ]; - - if ($this->addressLine2 !== null) { - $data['address_line_2'] = $this->addressLine2; - } - - if ($this->alternateName !== null) { - $data['alternate_name'] = $this->alternateName; - } - - if ($this->externalId !== null) { - $data['external_id'] = $this->externalId; - } - - return $data; + 'alternate_name' => $this->alternateName, + 'external_id' => $this->externalId, + 'account_purpose' => $this->accountPurpose?->value, + 'business_description' => $this->businessDescription, + 'business_industry' => $this->businessIndustry?->value, + 'business_type' => $this->businessType?->value, + 'estimated_annual_revenue' => $this->estimatedAnnualRevenue?->value, + 'publicly_traded' => $this->publiclyTraded, + 'source_of_wealth' => $this->sourceOfWealth?->value, + 'image_url' => $this->imageUrl, + 'ip_address' => $this->ipAddress, + 'phone_number' => $this->phoneNumber, + 'source_of_funds_doc_file' => $this->sourceOfFundsDocFile, + 'source_of_funds_doc_type' => $this->sourceOfFundsDocType?->value, + ], fn ($value) => $value !== null); } } @@ -790,11 +909,18 @@ public function __construct( public ?string $proofOfOwnershipDocFile = null, public ?SourceOfFundsDocType $sourceOfFundsDocType = null, public ?string $sourceOfFundsDocFile = null, - public ?string $individualHoldingDocFrontFile = null, public ?PurposeOfTransactions $purposeOfTransactions = null, public ?string $purposeOfTransactionsExplanation = null, public ?string $externalId = null, - public ?string $tosId = null + public ?string $tosId = null, + public ?AccountPurpose $accountPurpose = null, + public ?string $businessDescription = null, + public ?BusinessIndustry $businessIndustry = null, + public ?ReceiverBusinessType $businessType = null, + public ?EstimatedAnnualRevenue $estimatedAnnualRevenue = null, + public ?bool $publiclyTraded = null, + public ?string $selfieFile = null, + public ?SourceOfWealth $sourceOfWealth = null ) {} public function toArray(): array @@ -829,11 +955,18 @@ public function toArray(): array 'proof_of_ownership_doc_file' => $this->proofOfOwnershipDocFile, 'source_of_funds_doc_type' => $this->sourceOfFundsDocType?->value, 'source_of_funds_doc_file' => $this->sourceOfFundsDocFile, - 'individual_holding_doc_front_file' => $this->individualHoldingDocFrontFile, 'purpose_of_transactions' => $this->purposeOfTransactions?->value, 'purpose_of_transactions_explanation' => $this->purposeOfTransactionsExplanation, 'external_id' => $this->externalId, 'tos_id' => $this->tosId, + 'account_purpose' => $this->accountPurpose?->value, + 'business_description' => $this->businessDescription, + 'business_industry' => $this->businessIndustry?->value, + 'business_type' => $this->businessType?->value, + 'estimated_annual_revenue' => $this->estimatedAnnualRevenue?->value, + 'publicly_traded' => $this->publiclyTraded, + 'selfie_file' => $this->selfieFile, + 'source_of_wealth' => $this->sourceOfWealth?->value, ], fn ($value) => $value !== null); } } diff --git a/src/Resources/VirtualAccounts/VirtualAccounts.php b/src/Resources/VirtualAccounts/VirtualAccounts.php index 384cb44..0bb6d5e 100644 --- a/src/Resources/VirtualAccounts/VirtualAccounts.php +++ b/src/Resources/VirtualAccounts/VirtualAccounts.php @@ -8,6 +8,13 @@ use BlindPay\SDK\Types\BlindPayApiResponse; use BlindPay\SDK\Types\StablecoinToken; +enum BankingPartner: string +{ + case JPMORGAN = 'jpmorgan'; + case CITI = 'citi'; + case HSBC = 'hsbc'; +} + readonly class VirtualAccountUsDetails { public function __construct( @@ -207,16 +214,25 @@ public function toArray(): array { public function __construct( public string $receiverId, + public BankingPartner $bankingPartner, public string $blockchainWalletId, - public StablecoinToken $token + public StablecoinToken $token, + public ?string $signedAgreementId = null ) {} public function toArray(): array { - return [ + $data = [ + 'banking_partner' => $this->bankingPartner->value, 'blockchain_wallet_id' => $this->blockchainWalletId, 'token' => $this->token->value, ]; + + if ($this->signedAgreementId !== null) { + $data['signed_agreement_id'] = $this->signedAgreementId; + } + + return $data; } } diff --git a/tests/Resources/Receivers/ReceiversTest.php b/tests/Resources/Receivers/ReceiversTest.php index 4f9f848..525682b 100644 --- a/tests/Resources/Receivers/ReceiversTest.php +++ b/tests/Resources/Receivers/ReceiversTest.php @@ -5,15 +5,20 @@ namespace BlindPay\SDK\Tests\Resources; use BlindPay\SDK\BlindPay; +use BlindPay\SDK\Resources\Receivers\AccountPurpose; +use BlindPay\SDK\Resources\Receivers\BusinessIndustry; use BlindPay\SDK\Resources\Receivers\CreateBusinessWithStandardKYBInput; use BlindPay\SDK\Resources\Receivers\CreateIndividualWithEnhancedKYCInput; use BlindPay\SDK\Resources\Receivers\CreateIndividualWithStandardKYCInput; +use BlindPay\SDK\Resources\Receivers\EstimatedAnnualRevenue; use BlindPay\SDK\Resources\Receivers\IdentificationDocument; use BlindPay\SDK\Resources\Receivers\LimitIncreaseRequestSupportingDocumentType; use BlindPay\SDK\Resources\Receivers\ProofOfAddressDocType; use BlindPay\SDK\Resources\Receivers\PurposeOfTransactions; +use BlindPay\SDK\Resources\Receivers\ReceiverBusinessType; use BlindPay\SDK\Resources\Receivers\RequestLimitIncreaseInput; use BlindPay\SDK\Resources\Receivers\SourceOfFundsDocType; +use BlindPay\SDK\Resources\Receivers\SourceOfWealth; use BlindPay\SDK\Resources\Receivers\UpdateReceiverInput; use BlindPay\SDK\Types\Country; use GuzzleHttp\Client; @@ -195,6 +200,8 @@ public function it_lists_receivers(): void 'id_doc_back_file' => 'https://example.com/image.png', 'proof_of_address_doc_type' => 'UTILITY_BILL', 'proof_of_address_doc_file' => 'https://example.com/image.png', + 'ownership_percentage' => 25, + 'title' => 'CEO', 'id' => 'ub_000000000000', 'instance_id' => 'in_000000000000', 'receiver_id' => 're_IOxAUL24LG7P', @@ -239,25 +246,25 @@ public function it_creates_an_individual_receiver_with_standard_kyc(): void $this->mockResponse($mockedReceiver); $input = new CreateIndividualWithStandardKYCInput( + country: Country::BR, + email: 'bernardo.simonassi@gmail.com', addressLine1: 'Av. Paulista, 1000', + addressLine2: 'Apto 101', city: 'São Paulo', - country: Country::BR, dateOfBirth: '1998-02-02T00:00:00.000Z', - email: 'bernardo.simonassi@gmail.com', firstName: 'Bernardo', - idDocBackFile: 'https://example.com/image.png', + phoneNumber: '+5511987654321', idDocCountry: Country::BR, idDocFrontFile: 'https://example.com/image.png', idDocType: IdentificationDocument::PASSPORT, + idDocBackFile: 'https://example.com/image.png', lastName: 'Simonassi', - phoneNumber: '+5511987654321', postalCode: '01310-100', proofOfAddressDocFile: 'https://example.com/image.png', proofOfAddressDocType: ProofOfAddressDocType::UTILITY_BILL, stateProvinceRegion: 'SP', taxId: '12345678900', - tosId: 'to_tPiz4bM2nh5K', - addressLine2: 'Apto 101' + tosId: 'to_tPiz4bM2nh5K' ); $response = $this->blindpay->receivers->createIndividualWithStandardKYC($input); @@ -277,30 +284,30 @@ public function it_creates_an_individual_receiver_with_enhanced_kyc(): void $this->mockResponse($mockedReceiver); $input = new CreateIndividualWithEnhancedKYCInput( + country: Country::BR, + email: 'bernardo.simonassi@gmail.com', addressLine1: 'Av. Paulista, 1000', + addressLine2: 'Apto 101', city: 'São Paulo', - country: Country::BR, dateOfBirth: '1998-02-02T00:00:00.000Z', - email: 'bernardo.simonassi@gmail.com', firstName: 'Bernardo', - idDocBackFile: 'https://example.com/image.png', idDocCountry: Country::BR, idDocFrontFile: 'https://example.com/image.png', idDocType: IdentificationDocument::PASSPORT, - individualHoldingDocFrontFile: 'https://example.com/image.png', + idDocBackFile: 'https://example.com/image.png', lastName: 'Simonassi', - phoneNumber: '+5511987654321', postalCode: '01310-100', + phoneNumber: '+5511987654321', proofOfAddressDocFile: 'https://example.com/image.png', proofOfAddressDocType: ProofOfAddressDocType::UTILITY_BILL, purposeOfTransactions: PurposeOfTransactions::PERSONAL_OR_LIVING_EXPENSES, - purposeOfTransactionsExplanation: 'I am receiving salary payments from my employer', sourceOfFundsDocFile: 'https://example.com/image.png', sourceOfFundsDocType: SourceOfFundsDocType::SAVINGS, + purposeOfTransactionsExplanation: 'I am receiving salary payments from my employer', stateProvinceRegion: 'SP', taxId: '12345678900', tosId: 'to_3ZZhllJkvo5Z', - addressLine2: 'Apto 101' + selfieFile: 'https://example.com/image.png' ); $response = $this->blindpay->receivers->createIndividualWithEnhancedKYC($input); @@ -341,15 +348,18 @@ public function toArray(): array 'id_doc_back_file' => 'https://example.com/image.png', 'proof_of_address_doc_type' => 'UTILITY_BILL', 'proof_of_address_doc_file' => 'https://example.com/image.png', + 'ownership_percentage' => 25, + 'title' => 'CEO', ]; } }; $input = new CreateBusinessWithStandardKYBInput( - addressLine1: 'Av. Brigadeiro Faria Lima, 400', - city: 'São Paulo', country: Country::BR, email: 'contato@empresa.com.br', + addressLine1: 'Av. Brigadeiro Faria Lima, 400', + addressLine2: 'Sala 1201', + city: 'São Paulo', formationDate: '2010-05-20T00:00:00.000Z', incorporationDocFile: 'https://example.com/image.png', legalName: 'Empresa Exemplo Ltda', @@ -361,9 +371,15 @@ public function toArray(): array stateProvinceRegion: 'SP', taxId: '20096178000195', tosId: 'to_nppX66ntvtHs', - addressLine2: 'Sala 1201', + website: 'https://site.com/', alternateName: 'Exemplo', - website: 'https://site.com/' + businessType: ReceiverBusinessType::LLC, + businessDescription: 'Software development company', + businessIndustry: BusinessIndustry::NAICS_541511, + estimatedAnnualRevenue: EstimatedAnnualRevenue::RANGE_1000000_9999999, + sourceOfWealth: SourceOfWealth::AFFILIATE_OR_ROYALTY_INCOME, + publiclyTraded: false, + accountPurpose: AccountPurpose::TREASURY_MANAGEMENT ); $response = $this->blindpay->receivers->createBusinessWithStandardKYB($input); @@ -485,12 +501,15 @@ public function it_updates_a_receiver(): void 'id_doc_type' => 'PASSPORT', 'id_doc_front_file' => 'https://example.com/image.png', 'id_doc_back_file' => 'https://example.com/image.png', + 'proof_of_address_doc_type' => 'UTILITY_BILL', + 'proof_of_address_doc_file' => 'https://example.com/image.png', + 'ownership_percentage' => 25, + 'title' => 'CEO', ]], incorporationDocFile: 'https://example.com/image.png', proofOfOwnershipDocFile: 'https://example.com/image.png', sourceOfFundsDocType: SourceOfFundsDocType::SAVINGS, sourceOfFundsDocFile: 'https://example.com/image.png', - individualHoldingDocFrontFile: 'https://example.com/image.png', purposeOfTransactions: PurposeOfTransactions::PERSONAL_OR_LIVING_EXPENSES, purposeOfTransactionsExplanation: 'I am receiving salary payments from my employer', externalId: 'some-external-id', diff --git a/tests/Resources/VirtualAccounts/VirtualAccountsTest.php b/tests/Resources/VirtualAccounts/VirtualAccountsTest.php index 79a1539..f53dd96 100644 --- a/tests/Resources/VirtualAccounts/VirtualAccountsTest.php +++ b/tests/Resources/VirtualAccounts/VirtualAccountsTest.php @@ -5,6 +5,7 @@ namespace BlindPay\SDK\Tests\Resources; use BlindPay\SDK\BlindPay; +use BlindPay\SDK\Resources\VirtualAccounts\BankingPartner; use BlindPay\SDK\Resources\VirtualAccounts\CreateVirtualAccountInput; use BlindPay\SDK\Resources\VirtualAccounts\UpdateVirtualAccountInput; use BlindPay\SDK\Types\StablecoinToken; @@ -113,6 +114,7 @@ public function it_creates_a_virtual_account(): void $input = new CreateVirtualAccountInput( receiverId: 're_000000000000', + bankingPartner: BankingPartner::JPMORGAN, blockchainWalletId: 'bw_000000000000', token: StablecoinToken::USDC );