@blindpay/node 1.2.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-E4S6NTNE.mjs → chunk-4CYRFSJ7.mjs} +2 -2
- package/dist/{chunk-BONN6PYB.mjs → chunk-E6ALTWR5.mjs} +21 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -6
- package/dist/index.mjs +2 -2
- package/dist/resources/api-keys/api-keys.test.js +20 -6
- package/dist/resources/api-keys/api-keys.test.mjs +2 -2
- package/dist/resources/available/available.test.js +20 -6
- package/dist/resources/available/available.test.mjs +2 -2
- package/dist/resources/bank-accounts/bank-accounts.test.js +20 -6
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +2 -2
- package/dist/resources/instances/instances.test.js +20 -6
- package/dist/resources/instances/instances.test.mjs +2 -2
- package/dist/resources/partner-fees/partner-fees.test.js +20 -6
- package/dist/resources/partner-fees/partner-fees.test.mjs +2 -2
- package/dist/resources/payins/payins-quotes.test.js +20 -6
- package/dist/resources/payins/payins-quotes.test.mjs +2 -2
- package/dist/resources/payins/payins.test.js +20 -6
- package/dist/resources/payins/payins.test.mjs +2 -2
- package/dist/resources/payouts/payouts.test.js +20 -6
- package/dist/resources/payouts/payouts.test.mjs +2 -2
- package/dist/resources/quotes/quotes.test.js +20 -6
- package/dist/resources/quotes/quotes.test.mjs +2 -2
- package/dist/resources/receivers/index.d.mts +163 -53
- package/dist/resources/receivers/index.d.ts +163 -53
- package/dist/resources/receivers/index.js +31 -5
- package/dist/resources/receivers/index.mjs +1 -1
- package/dist/resources/receivers/receivers.test.js +284 -174
- package/dist/resources/receivers/receivers.test.mjs +266 -170
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +20 -6
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +2 -2
- package/dist/resources/wallets/blockchain.test.js +20 -6
- package/dist/resources/wallets/blockchain.test.mjs +2 -2
- package/dist/resources/wallets/offramp.test.js +20 -6
- package/dist/resources/wallets/offramp.test.mjs +2 -2
- package/dist/resources/webhooks/webhooks.test.js +20 -6
- package/dist/resources/webhooks/webhooks.test.mjs +2 -2
- package/package.json +1 -1
|
@@ -18714,7 +18714,7 @@ var import_expect_type = __toESM(require_dist(), 1);
|
|
|
18714
18714
|
var import_node_crypto = require("crypto");
|
|
18715
18715
|
|
|
18716
18716
|
// package.json
|
|
18717
|
-
var version = "
|
|
18717
|
+
var version = "2.0.1";
|
|
18718
18718
|
|
|
18719
18719
|
// src/internal/blindpay-error.ts
|
|
18720
18720
|
var BlindPayError = class extends Error {
|
|
@@ -18993,15 +18993,29 @@ function createReceiversResource(instanceId, client) {
|
|
|
18993
18993
|
list() {
|
|
18994
18994
|
return client.get(`/instances/${instanceId}/receivers`);
|
|
18995
18995
|
},
|
|
18996
|
-
|
|
18997
|
-
|
|
18998
|
-
|
|
18996
|
+
createIndividualWithStandardKYC(data) {
|
|
18997
|
+
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
18998
|
+
kyc_type: "standard",
|
|
18999
|
+
type: "individual"
|
|
19000
|
+
}, data));
|
|
19001
|
+
},
|
|
19002
|
+
createIndividualWithEnhancedKYC(data) {
|
|
19003
|
+
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
19004
|
+
kyc_type: "enhanced",
|
|
19005
|
+
type: "individual"
|
|
19006
|
+
}, data));
|
|
19007
|
+
},
|
|
19008
|
+
createBusinessWithStandardKYB(data) {
|
|
19009
|
+
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
19010
|
+
kyc_type: "standard",
|
|
19011
|
+
type: "business"
|
|
19012
|
+
}, data));
|
|
18999
19013
|
},
|
|
19000
19014
|
get(receiver_id) {
|
|
19001
19015
|
return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
|
|
19002
19016
|
},
|
|
19003
|
-
update(
|
|
19004
|
-
var
|
|
19017
|
+
update(_a3) {
|
|
19018
|
+
var _b = _a3, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
|
|
19005
19019
|
return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
|
|
19006
19020
|
},
|
|
19007
19021
|
delete(receiver_id) {
|
|
@@ -19319,7 +19333,7 @@ describe("Receivers", () => {
|
|
|
19319
19333
|
it("should list receivers", () => __async(null, null, function* () {
|
|
19320
19334
|
const mockedReceivers = [
|
|
19321
19335
|
{
|
|
19322
|
-
id: "
|
|
19336
|
+
id: "re_Euw7HN4OdxPn",
|
|
19323
19337
|
type: "individual",
|
|
19324
19338
|
kyc_type: "standard",
|
|
19325
19339
|
kyc_status: "verifying",
|
|
@@ -19331,64 +19345,138 @@ describe("Receivers", () => {
|
|
|
19331
19345
|
warning_id: null
|
|
19332
19346
|
}
|
|
19333
19347
|
],
|
|
19334
|
-
email: "
|
|
19335
|
-
tax_id: "
|
|
19336
|
-
address_line_1: "
|
|
19337
|
-
address_line_2: "
|
|
19338
|
-
city: "
|
|
19339
|
-
state_province_region: "
|
|
19340
|
-
country: "
|
|
19341
|
-
postal_code: "
|
|
19348
|
+
email: "bernardo@gmail.com",
|
|
19349
|
+
tax_id: "12345678900",
|
|
19350
|
+
address_line_1: "Av. Paulista, 1000",
|
|
19351
|
+
address_line_2: "Apto 101",
|
|
19352
|
+
city: "S\xE3o Paulo",
|
|
19353
|
+
state_province_region: "SP",
|
|
19354
|
+
country: "BR",
|
|
19355
|
+
postal_code: "01310-100",
|
|
19342
19356
|
ip_address: "127.0.0.1",
|
|
19343
19357
|
image_url: "https://example.com/image.png",
|
|
19344
|
-
phone_number: "+
|
|
19358
|
+
phone_number: "+5511987654321",
|
|
19345
19359
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19346
19360
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19347
|
-
first_name: "
|
|
19348
|
-
last_name: "
|
|
19349
|
-
date_of_birth: "1998-
|
|
19361
|
+
first_name: "Bernardo",
|
|
19362
|
+
last_name: "Simonassi",
|
|
19363
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
19350
19364
|
id_doc_country: "BR",
|
|
19351
19365
|
id_doc_type: "PASSPORT",
|
|
19352
19366
|
id_doc_front_file: "https://example.com/image.png",
|
|
19353
19367
|
id_doc_back_file: "https://example.com/image.png",
|
|
19354
|
-
|
|
19355
|
-
|
|
19356
|
-
|
|
19357
|
-
|
|
19368
|
+
aiprise_validation_key: "",
|
|
19369
|
+
instance_id: "in_000000000000",
|
|
19370
|
+
tos_id: "to_3ZZhllJkvo5Z",
|
|
19371
|
+
created_at: "2021-01-01T00:00:00.000Z",
|
|
19372
|
+
updated_at: "2021-01-01T00:00:00.000Z",
|
|
19373
|
+
limit: {
|
|
19374
|
+
per_transaction: 1e5,
|
|
19375
|
+
daily: 2e5,
|
|
19376
|
+
monthly: 1e6
|
|
19377
|
+
}
|
|
19378
|
+
},
|
|
19379
|
+
{
|
|
19380
|
+
id: "re_YuaMcI2B8zbQ",
|
|
19381
|
+
type: "individual",
|
|
19382
|
+
kyc_type: "enhanced",
|
|
19383
|
+
kyc_status: "approved",
|
|
19384
|
+
kyc_warnings: null,
|
|
19385
|
+
email: "alice.johnson@example.com",
|
|
19386
|
+
tax_id: "98765432100",
|
|
19387
|
+
address_line_1: "123 Main St",
|
|
19388
|
+
address_line_2: null,
|
|
19389
|
+
city: "New York",
|
|
19390
|
+
state_province_region: "NY",
|
|
19391
|
+
country: "US",
|
|
19392
|
+
postal_code: "10001",
|
|
19393
|
+
ip_address: "192.168.1.1",
|
|
19394
|
+
image_url: null,
|
|
19395
|
+
phone_number: "+15555555555",
|
|
19396
|
+
proof_of_address_doc_type: "BANK_STATEMENT",
|
|
19397
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19398
|
+
first_name: "Alice",
|
|
19399
|
+
last_name: "Johnson",
|
|
19400
|
+
date_of_birth: "1990-05-10T00:00:00.000Z",
|
|
19401
|
+
id_doc_country: "US",
|
|
19402
|
+
id_doc_type: "PASSPORT",
|
|
19403
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
19404
|
+
id_doc_back_file: null,
|
|
19405
|
+
aiprise_validation_key: "enhanced-key",
|
|
19406
|
+
instance_id: "in_000000000001",
|
|
19407
|
+
source_of_funds_doc_type: "salary",
|
|
19408
|
+
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19409
|
+
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19410
|
+
purpose_of_transactions: "investment_purposes",
|
|
19411
|
+
purpose_of_transactions_explanation: "Investing in stocks",
|
|
19412
|
+
tos_id: "to_nppX66ntvtHs",
|
|
19413
|
+
created_at: "2022-02-02T00:00:00.000Z",
|
|
19414
|
+
updated_at: "2022-02-02T00:00:00.000Z",
|
|
19415
|
+
limit: {
|
|
19416
|
+
per_transaction: 5e4,
|
|
19417
|
+
daily: 1e5,
|
|
19418
|
+
monthly: 5e5
|
|
19419
|
+
}
|
|
19420
|
+
},
|
|
19421
|
+
{
|
|
19422
|
+
id: "re_IOxAUL24LG7P",
|
|
19423
|
+
type: "business",
|
|
19424
|
+
kyc_type: "standard",
|
|
19425
|
+
kyc_status: "pending",
|
|
19426
|
+
kyc_warnings: null,
|
|
19427
|
+
email: "business@example.com",
|
|
19428
|
+
tax_id: "20096178000195",
|
|
19429
|
+
address_line_1: "1 King St W",
|
|
19430
|
+
address_line_2: "Suite 100",
|
|
19431
|
+
city: "Toronto",
|
|
19432
|
+
state_province_region: "ON",
|
|
19433
|
+
country: "CA",
|
|
19434
|
+
postal_code: "M5H 1A1",
|
|
19435
|
+
ip_address: null,
|
|
19436
|
+
image_url: null,
|
|
19437
|
+
phone_number: "+14165555555",
|
|
19438
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19439
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19440
|
+
legal_name: "Business Corp",
|
|
19441
|
+
alternate_name: "BizCo",
|
|
19442
|
+
formation_date: "2010-01-01T00:00:00.000Z",
|
|
19443
|
+
website: "https://businesscorp.com",
|
|
19358
19444
|
owners: [
|
|
19359
19445
|
{
|
|
19360
|
-
|
|
19361
|
-
first_name: "
|
|
19362
|
-
last_name: "
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
|
|
19446
|
+
role: "beneficial_owner",
|
|
19447
|
+
first_name: "Carlos",
|
|
19448
|
+
last_name: "Silva",
|
|
19449
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
19450
|
+
tax_id: "12345678901",
|
|
19451
|
+
address_line_1: "Rua Augusta, 1500",
|
|
19452
|
+
address_line_2: null,
|
|
19453
|
+
city: "S\xE3o Paulo",
|
|
19454
|
+
state_province_region: "SP",
|
|
19455
|
+
country: "BR",
|
|
19456
|
+
postal_code: "01304-001",
|
|
19369
19457
|
id_doc_country: "BR",
|
|
19370
19458
|
id_doc_type: "PASSPORT",
|
|
19371
19459
|
id_doc_front_file: "https://example.com/image.png",
|
|
19372
|
-
id_doc_back_file: "https://example.com/image.png"
|
|
19460
|
+
id_doc_back_file: "https://example.com/image.png",
|
|
19461
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19462
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19463
|
+
id: "ub_000000000000",
|
|
19464
|
+
instance_id: "in_000000000000",
|
|
19465
|
+
receiver_id: "re_IOxAUL24LG7P"
|
|
19373
19466
|
}
|
|
19374
19467
|
],
|
|
19375
19468
|
incorporation_doc_file: "https://example.com/image.png",
|
|
19376
19469
|
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
19380
|
-
purpose_of_transactions: "business_transactions",
|
|
19381
|
-
purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
|
|
19382
|
-
external_id: "your_company_external_id",
|
|
19383
|
-
instance_id: "in_000000000000",
|
|
19384
|
-
tos_id: "to_000000000000",
|
|
19470
|
+
external_id: null,
|
|
19471
|
+
instance_id: "in_000000000002",
|
|
19472
|
+
tos_id: "to_nppX66ntvtHs",
|
|
19385
19473
|
aiprise_validation_key: "",
|
|
19386
|
-
created_at: "
|
|
19387
|
-
updated_at: "
|
|
19474
|
+
created_at: "2015-03-15T00:00:00.000Z",
|
|
19475
|
+
updated_at: "2015-03-15T00:00:00.000Z",
|
|
19388
19476
|
limit: {
|
|
19389
|
-
per_transaction:
|
|
19390
|
-
daily:
|
|
19391
|
-
monthly:
|
|
19477
|
+
per_transaction: 2e5,
|
|
19478
|
+
daily: 4e5,
|
|
19479
|
+
monthly: 2e6
|
|
19392
19480
|
}
|
|
19393
19481
|
}
|
|
19394
19482
|
];
|
|
@@ -19401,81 +19489,128 @@ describe("Receivers", () => {
|
|
|
19401
19489
|
}));
|
|
19402
19490
|
});
|
|
19403
19491
|
describe("Create receiver", () => {
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
19492
|
+
it("should create an individual receiver with standard KYC", () => __async(null, null, function* () {
|
|
19493
|
+
const mockedReceiver = {
|
|
19494
|
+
id: "re_Euw7HN4OdxPn"
|
|
19495
|
+
};
|
|
19408
19496
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
19409
19497
|
headers: { "Content-Type": "application/json" }
|
|
19410
19498
|
});
|
|
19411
|
-
const { data, error } = yield blindpay.receivers.
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19499
|
+
const { data, error } = yield blindpay.receivers.createIndividualWithStandardKYC({
|
|
19500
|
+
email: "bernardo.simonassi@gmail.com",
|
|
19501
|
+
tax_id: "12345678900",
|
|
19502
|
+
address_line_1: "Av. Paulista, 1000",
|
|
19503
|
+
address_line_2: "Apto 101",
|
|
19504
|
+
city: "S\xE3o Paulo",
|
|
19505
|
+
state_province_region: "SP",
|
|
19506
|
+
country: "BR",
|
|
19507
|
+
postal_code: "01310-100",
|
|
19508
|
+
first_name: "Bernardo",
|
|
19509
|
+
last_name: "Simonassi",
|
|
19510
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
19511
|
+
id_doc_country: "BR",
|
|
19512
|
+
id_doc_type: "PASSPORT",
|
|
19513
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
19425
19514
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19426
19515
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
19516
|
+
tos_id: "to_tPiz4bM2nh5K"
|
|
19517
|
+
});
|
|
19518
|
+
globalExpect(error).toBeNull();
|
|
19519
|
+
globalExpect(data).toEqual({ id: "re_Euw7HN4OdxPn" });
|
|
19520
|
+
}));
|
|
19521
|
+
it("should create an individual receiver with enhanced KYC", () => __async(null, null, function* () {
|
|
19522
|
+
const mockedReceiver = {
|
|
19523
|
+
id: "re_YuaMcI2B8zbQ"
|
|
19524
|
+
};
|
|
19525
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
19526
|
+
headers: { "Content-Type": "application/json" }
|
|
19527
|
+
});
|
|
19528
|
+
const { data, error } = yield blindpay.receivers.createIndividualWithEnhancedKYC({
|
|
19529
|
+
email: "bernardo.simonassi@gmail.com",
|
|
19530
|
+
tax_id: "12345678900",
|
|
19531
|
+
address_line_1: "Av. Paulista, 1000",
|
|
19532
|
+
address_line_2: "Apto 101",
|
|
19533
|
+
city: "S\xE3o Paulo",
|
|
19534
|
+
state_province_region: "SP",
|
|
19535
|
+
country: "BR",
|
|
19536
|
+
postal_code: "01310-100",
|
|
19537
|
+
first_name: "Bernardo",
|
|
19538
|
+
last_name: "Simonassi",
|
|
19539
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
19430
19540
|
id_doc_country: "BR",
|
|
19431
19541
|
id_doc_type: "PASSPORT",
|
|
19432
19542
|
id_doc_front_file: "https://example.com/image.png",
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19543
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19544
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19545
|
+
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19546
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
19547
|
+
source_of_funds_doc_type: "savings",
|
|
19548
|
+
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19549
|
+
tos_id: "to_3ZZhllJkvo5Z"
|
|
19550
|
+
});
|
|
19551
|
+
globalExpect(error).toBeNull();
|
|
19552
|
+
globalExpect(data).toEqual({ id: "re_YuaMcI2B8zbQ" });
|
|
19553
|
+
}));
|
|
19554
|
+
it("should create a business receiver with standard KYB", () => __async(null, null, function* () {
|
|
19555
|
+
const mockedReceiver = {
|
|
19556
|
+
id: "re_IOxAUL24LG7P"
|
|
19557
|
+
};
|
|
19558
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
19559
|
+
headers: { "Content-Type": "application/json" }
|
|
19560
|
+
});
|
|
19561
|
+
const { data, error } = yield blindpay.receivers.createBusinessWithStandardKYB({
|
|
19562
|
+
email: "contato@empresa.com.br",
|
|
19563
|
+
tax_id: "20096178000195",
|
|
19564
|
+
address_line_1: "Av. Brigadeiro Faria Lima, 400",
|
|
19565
|
+
address_line_2: "Sala 1201",
|
|
19566
|
+
city: "S\xE3o Paulo",
|
|
19567
|
+
state_province_region: "SP",
|
|
19568
|
+
country: "BR",
|
|
19569
|
+
postal_code: "04538-132",
|
|
19570
|
+
legal_name: "Empresa Exemplo Ltda",
|
|
19571
|
+
alternate_name: "Exemplo",
|
|
19572
|
+
formation_date: "2010-05-20T00:00:00.000Z",
|
|
19573
|
+
incorporation_doc_file: "https://example.com/image.png",
|
|
19574
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19575
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19576
|
+
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19577
|
+
tos_id: "to_nppX66ntvtHs",
|
|
19578
|
+
website: "https://site.com/",
|
|
19438
19579
|
owners: [
|
|
19439
19580
|
{
|
|
19440
|
-
first_name: "John",
|
|
19441
|
-
last_name: "Doe",
|
|
19442
19581
|
role: "beneficial_owner",
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19582
|
+
first_name: "Carlos",
|
|
19583
|
+
last_name: "Silva",
|
|
19584
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
19585
|
+
tax_id: "12345678901",
|
|
19586
|
+
address_line_1: "Rua Augusta, 1500",
|
|
19587
|
+
address_line_2: null,
|
|
19588
|
+
city: "S\xE3o Paulo",
|
|
19589
|
+
state_province_region: "SP",
|
|
19590
|
+
country: "BR",
|
|
19591
|
+
postal_code: "01304-001",
|
|
19451
19592
|
id_doc_country: "BR",
|
|
19452
19593
|
id_doc_type: "PASSPORT",
|
|
19453
19594
|
id_doc_front_file: "https://example.com/image.png",
|
|
19454
19595
|
id_doc_back_file: "https://example.com/image.png",
|
|
19596
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19455
19597
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19456
|
-
|
|
19598
|
+
id: "ub_000000000000",
|
|
19599
|
+
instance_id: "in_000000000000",
|
|
19600
|
+
receiver_id: "re_IOxAUL24LG7P"
|
|
19457
19601
|
}
|
|
19458
|
-
]
|
|
19459
|
-
incorporation_doc_file: "https://example.com/image.png",
|
|
19460
|
-
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19461
|
-
source_of_funds_doc_type: "business_income",
|
|
19462
|
-
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19463
|
-
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19464
|
-
purpose_of_transactions: "business_transactions",
|
|
19465
|
-
purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
|
|
19466
|
-
external_id: "your_company_external_id",
|
|
19467
|
-
tos_id: "to_000000000000"
|
|
19602
|
+
]
|
|
19468
19603
|
});
|
|
19469
19604
|
globalExpect(error).toBeNull();
|
|
19470
|
-
globalExpect(data).toEqual({ id: "
|
|
19605
|
+
globalExpect(data).toEqual({ id: "re_IOxAUL24LG7P" });
|
|
19471
19606
|
}));
|
|
19472
19607
|
});
|
|
19473
19608
|
describe("Get receiver", () => {
|
|
19474
19609
|
it("should get a receiver", () => __async(null, null, function* () {
|
|
19475
19610
|
const mockedReceiver = {
|
|
19476
|
-
id: "
|
|
19611
|
+
id: "re_YuaMcI2B8zbQ",
|
|
19477
19612
|
type: "individual",
|
|
19478
|
-
kyc_type: "
|
|
19613
|
+
kyc_type: "enhanced",
|
|
19479
19614
|
kyc_status: "verifying",
|
|
19480
19615
|
kyc_warnings: [
|
|
19481
19616
|
{
|
|
@@ -19485,60 +19620,36 @@ describe("Receivers", () => {
|
|
|
19485
19620
|
warning_id: null
|
|
19486
19621
|
}
|
|
19487
19622
|
],
|
|
19488
|
-
email: "
|
|
19489
|
-
tax_id: "
|
|
19490
|
-
address_line_1: "
|
|
19491
|
-
address_line_2: "
|
|
19492
|
-
city: "
|
|
19493
|
-
state_province_region: "
|
|
19494
|
-
country: "
|
|
19495
|
-
postal_code: "
|
|
19623
|
+
email: "bernardo.simonassi@gmail.com",
|
|
19624
|
+
tax_id: "12345678900",
|
|
19625
|
+
address_line_1: "Av. Paulista, 1000",
|
|
19626
|
+
address_line_2: "Apto 101",
|
|
19627
|
+
city: "S\xE3o Paulo",
|
|
19628
|
+
state_province_region: "SP",
|
|
19629
|
+
country: "BR",
|
|
19630
|
+
postal_code: "01310-100",
|
|
19496
19631
|
ip_address: "127.0.0.1",
|
|
19497
19632
|
image_url: "https://example.com/image.png",
|
|
19498
|
-
phone_number: "+
|
|
19633
|
+
phone_number: "+5511987654321",
|
|
19499
19634
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19500
19635
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19501
|
-
first_name: "
|
|
19502
|
-
last_name: "
|
|
19503
|
-
date_of_birth: "1998-
|
|
19636
|
+
first_name: "Bernardo",
|
|
19637
|
+
last_name: "Simonassi",
|
|
19638
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
19504
19639
|
id_doc_country: "BR",
|
|
19505
19640
|
id_doc_type: "PASSPORT",
|
|
19506
19641
|
id_doc_front_file: "https://example.com/image.png",
|
|
19507
19642
|
id_doc_back_file: "https://example.com/image.png",
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
formation_date: "1998-01-01T00:00:00Z",
|
|
19511
|
-
website: "https://example.com",
|
|
19512
|
-
owners: [
|
|
19513
|
-
{
|
|
19514
|
-
id: "ub_000000000000",
|
|
19515
|
-
first_name: "John",
|
|
19516
|
-
last_name: "Doe",
|
|
19517
|
-
address_line_1: "738 Plain St",
|
|
19518
|
-
address_line_2: "Building 22",
|
|
19519
|
-
city: "Marshfield",
|
|
19520
|
-
state_province_region: "MA",
|
|
19521
|
-
country: "US",
|
|
19522
|
-
postal_code: "02050",
|
|
19523
|
-
id_doc_country: "BR",
|
|
19524
|
-
id_doc_type: "PASSPORT",
|
|
19525
|
-
id_doc_front_file: "https://example.com/image.png",
|
|
19526
|
-
id_doc_back_file: "https://example.com/image.png"
|
|
19527
|
-
}
|
|
19528
|
-
],
|
|
19529
|
-
incorporation_doc_file: "https://example.com/image.png",
|
|
19530
|
-
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19531
|
-
source_of_funds_doc_type: "business_income",
|
|
19643
|
+
aiprise_validation_key: "",
|
|
19644
|
+
source_of_funds_doc_type: "savings",
|
|
19532
19645
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19533
19646
|
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19534
|
-
purpose_of_transactions: "
|
|
19535
|
-
purpose_of_transactions_explanation: "I am
|
|
19536
|
-
external_id: "your_company_external_id",
|
|
19647
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
19648
|
+
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
19537
19649
|
instance_id: "in_000000000000",
|
|
19538
|
-
tos_id: "
|
|
19539
|
-
|
|
19540
|
-
|
|
19541
|
-
updated_at: "2021-01-01T00:00:00Z",
|
|
19650
|
+
tos_id: "to_3ZZhllJkvo5Z",
|
|
19651
|
+
created_at: "2021-01-01T00:00:00.000Z",
|
|
19652
|
+
updated_at: "2021-01-01T00:00:00.000Z",
|
|
19542
19653
|
limit: {
|
|
19543
19654
|
per_transaction: 1e5,
|
|
19544
19655
|
daily: 2e5,
|
|
@@ -19548,7 +19659,7 @@ describe("Receivers", () => {
|
|
|
19548
19659
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
19549
19660
|
headers: { "Content-Type": "application/json" }
|
|
19550
19661
|
});
|
|
19551
|
-
const { data, error } = yield blindpay.receivers.get("
|
|
19662
|
+
const { data, error } = yield blindpay.receivers.get("re_YuaMcI2B8zbQ");
|
|
19552
19663
|
globalExpect(error).toBeNull();
|
|
19553
19664
|
globalExpect(data).toEqual(mockedReceiver);
|
|
19554
19665
|
}));
|
|
@@ -19559,45 +19670,44 @@ describe("Receivers", () => {
|
|
|
19559
19670
|
headers: { "Content-Type": "application/json" }
|
|
19560
19671
|
});
|
|
19561
19672
|
const { data, error } = yield blindpay.receivers.update({
|
|
19562
|
-
receiver_id: "
|
|
19563
|
-
email: "
|
|
19564
|
-
tax_id: "
|
|
19565
|
-
address_line_1: "
|
|
19566
|
-
address_line_2: "
|
|
19567
|
-
city: "
|
|
19568
|
-
state_province_region: "
|
|
19569
|
-
country: "
|
|
19570
|
-
postal_code: "
|
|
19673
|
+
receiver_id: "re_YuaMcI2B8zbQ",
|
|
19674
|
+
email: "bernardo.simonassi@gmail.com",
|
|
19675
|
+
tax_id: "12345678900",
|
|
19676
|
+
address_line_1: "Av. Paulista, 1000",
|
|
19677
|
+
address_line_2: "Apto 101",
|
|
19678
|
+
city: "S\xE3o Paulo",
|
|
19679
|
+
state_province_region: "SP",
|
|
19680
|
+
country: "BR",
|
|
19681
|
+
postal_code: "01310-100",
|
|
19571
19682
|
ip_address: "127.0.0.1",
|
|
19572
19683
|
image_url: "https://example.com/image.png",
|
|
19573
|
-
phone_number: "+
|
|
19684
|
+
phone_number: "+5511987654321",
|
|
19574
19685
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19575
19686
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19576
|
-
first_name: "
|
|
19577
|
-
last_name: "
|
|
19578
|
-
date_of_birth: "1998-
|
|
19687
|
+
first_name: "Bernardo",
|
|
19688
|
+
last_name: "Simonassi",
|
|
19689
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
19579
19690
|
id_doc_country: "BR",
|
|
19580
19691
|
id_doc_type: "PASSPORT",
|
|
19581
19692
|
id_doc_front_file: "https://example.com/image.png",
|
|
19582
19693
|
id_doc_back_file: "https://example.com/image.png",
|
|
19583
|
-
|
|
19584
|
-
|
|
19585
|
-
|
|
19586
|
-
website: "https://example.com",
|
|
19694
|
+
alternate_name: "Exemplo",
|
|
19695
|
+
formation_date: "2010-05-20T00:00:00.000Z",
|
|
19696
|
+
website: "https://site.com",
|
|
19587
19697
|
owners: [
|
|
19588
19698
|
{
|
|
19589
19699
|
id: "ub_000000000000",
|
|
19590
|
-
first_name: "
|
|
19591
|
-
last_name: "
|
|
19700
|
+
first_name: "Carlos",
|
|
19701
|
+
last_name: "Silva",
|
|
19592
19702
|
role: "beneficial_owner",
|
|
19593
|
-
date_of_birth: "
|
|
19594
|
-
tax_id: "
|
|
19595
|
-
address_line_1: "
|
|
19596
|
-
address_line_2:
|
|
19597
|
-
city: "
|
|
19598
|
-
state_province_region: "
|
|
19599
|
-
country: "
|
|
19600
|
-
postal_code: "
|
|
19703
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
19704
|
+
tax_id: "12345678901",
|
|
19705
|
+
address_line_1: "Rua Augusta, 1500",
|
|
19706
|
+
address_line_2: null,
|
|
19707
|
+
city: "S\xE3o Paulo",
|
|
19708
|
+
state_province_region: "SP",
|
|
19709
|
+
country: "BR",
|
|
19710
|
+
postal_code: "01304-001",
|
|
19601
19711
|
id_doc_country: "BR",
|
|
19602
19712
|
id_doc_type: "PASSPORT",
|
|
19603
19713
|
id_doc_front_file: "https://example.com/image.png",
|
|
@@ -19606,13 +19716,13 @@ describe("Receivers", () => {
|
|
|
19606
19716
|
],
|
|
19607
19717
|
incorporation_doc_file: "https://example.com/image.png",
|
|
19608
19718
|
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19609
|
-
source_of_funds_doc_type: "
|
|
19719
|
+
source_of_funds_doc_type: "savings",
|
|
19610
19720
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19611
19721
|
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19612
|
-
purpose_of_transactions: "
|
|
19613
|
-
purpose_of_transactions_explanation: "I am
|
|
19614
|
-
external_id: "
|
|
19615
|
-
tos_id: "
|
|
19722
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
19723
|
+
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
19724
|
+
external_id: "some-external-id",
|
|
19725
|
+
tos_id: "to_3ZZhllJkvo5Z"
|
|
19616
19726
|
});
|
|
19617
19727
|
globalExpect(error).toBeNull();
|
|
19618
19728
|
globalExpect(data).toEqual({ data: null });
|
|
@@ -19623,7 +19733,7 @@ describe("Receivers", () => {
|
|
|
19623
19733
|
fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
|
|
19624
19734
|
headers: { "Content-Type": "application/json" }
|
|
19625
19735
|
});
|
|
19626
|
-
const { data, error } = yield blindpay.receivers.delete("
|
|
19736
|
+
const { data, error } = yield blindpay.receivers.delete("re_YuaMcI2B8zbQ");
|
|
19627
19737
|
globalExpect(error).toBeNull();
|
|
19628
19738
|
globalExpect(data).toEqual({ data: null });
|
|
19629
19739
|
}));
|
|
@@ -19645,7 +19755,7 @@ describe("Receivers", () => {
|
|
|
19645
19755
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiverLimits), {
|
|
19646
19756
|
headers: { "Content-Type": "application/json" }
|
|
19647
19757
|
});
|
|
19648
|
-
const { data, error } = yield blindpay.receivers.getLimits("
|
|
19758
|
+
const { data, error } = yield blindpay.receivers.getLimits("re_YuaMcI2B8zbQ");
|
|
19649
19759
|
globalExpect(error).toBeNull();
|
|
19650
19760
|
globalExpect(data).toEqual(mockedReceiverLimits);
|
|
19651
19761
|
}));
|