@blindpay/node 1.2.0 → 2.0.0

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