@blindpay/node 1.1.2 → 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 (44) hide show
  1. package/dist/{chunk-64EFLUS3.mjs → chunk-CPOSU35L.mjs} +10 -0
  2. package/dist/{chunk-BONN6PYB.mjs → chunk-MPJKYFDD.mjs} +9 -4
  3. package/dist/{chunk-YSH4QGAQ.mjs → chunk-URXUVGMC.mjs} +6 -6
  4. package/dist/index.d.mts +2 -2
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +20 -5
  7. package/dist/index.mjs +6 -6
  8. package/dist/resources/api-keys/api-keys.test.js +20 -5
  9. package/dist/resources/api-keys/api-keys.test.mjs +3 -3
  10. package/dist/resources/available/available.test.js +20 -5
  11. package/dist/resources/available/available.test.mjs +3 -3
  12. package/dist/resources/bank-accounts/bank-accounts.test.js +56 -5
  13. package/dist/resources/bank-accounts/bank-accounts.test.mjs +39 -3
  14. package/dist/resources/bank-accounts/index.d.mts +30 -1
  15. package/dist/resources/bank-accounts/index.d.ts +30 -1
  16. package/dist/resources/bank-accounts/index.js +10 -0
  17. package/dist/resources/bank-accounts/index.mjs +1 -1
  18. package/dist/resources/instances/instances.test.js +20 -5
  19. package/dist/resources/instances/instances.test.mjs +3 -3
  20. package/dist/resources/partner-fees/partner-fees.test.js +20 -5
  21. package/dist/resources/partner-fees/partner-fees.test.mjs +3 -3
  22. package/dist/resources/payins/payins-quotes.test.js +20 -5
  23. package/dist/resources/payins/payins-quotes.test.mjs +3 -3
  24. package/dist/resources/payins/payins.test.js +20 -5
  25. package/dist/resources/payins/payins.test.mjs +3 -3
  26. package/dist/resources/payouts/payouts.test.js +20 -5
  27. package/dist/resources/payouts/payouts.test.mjs +3 -3
  28. package/dist/resources/quotes/quotes.test.js +20 -5
  29. package/dist/resources/quotes/quotes.test.mjs +3 -3
  30. package/dist/resources/receivers/index.d.mts +169 -53
  31. package/dist/resources/receivers/index.d.ts +169 -53
  32. package/dist/resources/receivers/index.js +9 -4
  33. package/dist/resources/receivers/index.mjs +1 -1
  34. package/dist/resources/receivers/receivers.test.js +288 -171
  35. package/dist/resources/receivers/receivers.test.mjs +271 -169
  36. package/dist/resources/virtual-accounts/virtual-accounts.test.js +20 -5
  37. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +3 -3
  38. package/dist/resources/wallets/blockchain.test.js +20 -5
  39. package/dist/resources/wallets/blockchain.test.mjs +3 -3
  40. package/dist/resources/wallets/offramp.test.js +20 -5
  41. package/dist/resources/wallets/offramp.test.mjs +3 -3
  42. package/dist/resources/webhooks/webhooks.test.js +20 -5
  43. package/dist/resources/webhooks/webhooks.test.mjs +3 -3
  44. 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 = "1.1.2";
18717
+ var version = "2.0.0";
18718
18718
 
18719
18719
  // src/internal/blindpay-error.ts
18720
18720
  var BlindPayError = class extends Error {
@@ -18843,6 +18843,16 @@ function createBankAccountsResource(instanceId, client) {
18843
18843
  return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
18844
18844
  type: "international_swift"
18845
18845
  }, data));
18846
+ },
18847
+ createRtp(_o) {
18848
+ var _p = _o, {
18849
+ receiver_id
18850
+ } = _p, data = __objRest(_p, [
18851
+ "receiver_id"
18852
+ ]);
18853
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
18854
+ type: "rtp"
18855
+ }, data));
18846
18856
  }
18847
18857
  };
18848
18858
  }
@@ -18983,15 +18993,20 @@ function createReceiversResource(instanceId, client) {
18983
18993
  list() {
18984
18994
  return client.get(`/instances/${instanceId}/receivers`);
18985
18995
  },
18986
- create(_a3) {
18987
- 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) {
18988
19003
  return client.post(`/instances/${instanceId}/receivers`, data);
18989
19004
  },
18990
19005
  get(receiver_id) {
18991
19006
  return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
18992
19007
  },
18993
- update(_b) {
18994
- 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"]);
18995
19010
  return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
18996
19011
  },
18997
19012
  delete(receiver_id) {
@@ -19309,7 +19324,7 @@ describe("Receivers", () => {
19309
19324
  it("should list receivers", () => __async(null, null, function* () {
19310
19325
  const mockedReceivers = [
19311
19326
  {
19312
- id: "re_000000000000",
19327
+ id: "re_Euw7HN4OdxPn",
19313
19328
  type: "individual",
19314
19329
  kyc_type: "standard",
19315
19330
  kyc_status: "verifying",
@@ -19321,64 +19336,138 @@ describe("Receivers", () => {
19321
19336
  warning_id: null
19322
19337
  }
19323
19338
  ],
19324
- email: "email@example.com",
19325
- tax_id: "536804398",
19326
- address_line_1: "738 Plain St",
19327
- address_line_2: "Building 22",
19328
- city: "Marshfield",
19329
- state_province_region: "MA",
19330
- country: "US",
19331
- 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",
19332
19347
  ip_address: "127.0.0.1",
19333
19348
  image_url: "https://example.com/image.png",
19334
- phone_number: "+1234567890",
19349
+ phone_number: "+5511987654321",
19335
19350
  proof_of_address_doc_type: "UTILITY_BILL",
19336
19351
  proof_of_address_doc_file: "https://example.com/image.png",
19337
- first_name: "John",
19338
- last_name: "Doe",
19339
- 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",
19340
19355
  id_doc_country: "BR",
19341
19356
  id_doc_type: "PASSPORT",
19342
19357
  id_doc_front_file: "https://example.com/image.png",
19343
19358
  id_doc_back_file: "https://example.com/image.png",
19344
- legal_name: "Company Name Inc.",
19345
- alternate_name: "Company Name Inc.",
19346
- formation_date: "1998-01-01T00:00:00Z",
19347
- 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",
19348
19435
  owners: [
19349
19436
  {
19350
- id: "ub_000000000000",
19351
- first_name: "John",
19352
- last_name: "Doe",
19353
- address_line_1: "738 Plain St",
19354
- address_line_2: "Building 22",
19355
- city: "Marshfield",
19356
- state_province_region: "MA",
19357
- country: "US",
19358
- 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",
19359
19448
  id_doc_country: "BR",
19360
19449
  id_doc_type: "PASSPORT",
19361
19450
  id_doc_front_file: "https://example.com/image.png",
19362
- 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"
19363
19457
  }
19364
19458
  ],
19365
19459
  incorporation_doc_file: "https://example.com/image.png",
19366
19460
  proof_of_ownership_doc_file: "https://example.com/image.png",
19367
- source_of_funds_doc_type: "business_income",
19368
- source_of_funds_doc_file: "https://example.com/image.png",
19369
- individual_holding_doc_front_file: "https://example.com/image.png",
19370
- purpose_of_transactions: "business_transactions",
19371
- purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
19372
- external_id: "your_company_external_id",
19373
- instance_id: "in_000000000000",
19374
- tos_id: "to_000000000000",
19461
+ external_id: null,
19462
+ instance_id: "in_000000000002",
19463
+ tos_id: "to_nppX66ntvtHs",
19375
19464
  aiprise_validation_key: "",
19376
- created_at: "2021-01-01T00:00:00Z",
19377
- 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",
19378
19467
  limit: {
19379
- per_transaction: 1e5,
19380
- daily: 2e5,
19381
- monthly: 1e6
19468
+ per_transaction: 2e5,
19469
+ daily: 4e5,
19470
+ monthly: 2e6
19382
19471
  }
19383
19472
  }
19384
19473
  ];
@@ -19391,81 +19480,134 @@ describe("Receivers", () => {
19391
19480
  }));
19392
19481
  });
19393
19482
  describe("Create receiver", () => {
19394
- const mockedReceiver = {
19395
- id: "re_000000000000"
19396
- };
19397
- 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
+ };
19398
19487
  fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
19399
19488
  headers: { "Content-Type": "application/json" }
19400
19489
  });
19401
- const { data, error } = yield blindpay.receivers.create({
19490
+ const { data, error } = yield blindpay.receivers.createIndividualWithStandardKYC({
19402
19491
  type: "individual",
19403
19492
  kyc_type: "standard",
19404
- email: "email@example.com",
19405
- tax_id: "536804398",
19406
- address_line_1: "738 Plain St",
19407
- address_line_2: "Building 22",
19408
- city: "Marshfield",
19409
- state_province_region: "MA",
19410
- country: "US",
19411
- postal_code: "02050",
19412
- ip_address: "127.0.0.1",
19413
- image_url: "https://example.com/image.png",
19414
- 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",
19415
19507
  proof_of_address_doc_type: "UTILITY_BILL",
19416
19508
  proof_of_address_doc_file: "https://example.com/image.png",
19417
- first_name: "John",
19418
- last_name: "Doe",
19419
- 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",
19420
19535
  id_doc_country: "BR",
19421
19536
  id_doc_type: "PASSPORT",
19422
19537
  id_doc_front_file: "https://example.com/image.png",
19423
- id_doc_back_file: "https://example.com/image.png",
19424
- legal_name: "Company Name Inc.",
19425
- alternate_name: "Company Name Inc.",
19426
- formation_date: "1998-01-01T00:00:00Z",
19427
- 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/",
19428
19576
  owners: [
19429
19577
  {
19430
- first_name: "John",
19431
- last_name: "Doe",
19432
19578
  role: "beneficial_owner",
19433
- date_of_birth: "1998-01-01T00:00:00Z",
19434
- tax_id: "536804398",
19435
- address_line_1: "738 Plain St",
19436
- address_line_2: "Building 22",
19437
- city: "Marshfield",
19438
- state_province_region: "MA",
19439
- country: "US",
19440
- 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",
19441
19589
  id_doc_country: "BR",
19442
19590
  id_doc_type: "PASSPORT",
19443
19591
  id_doc_front_file: "https://example.com/image.png",
19444
19592
  id_doc_back_file: "https://example.com/image.png",
19593
+ proof_of_address_doc_type: "UTILITY_BILL",
19445
19594
  proof_of_address_doc_file: "https://example.com/image.png",
19446
- proof_of_address_doc_type: "UTILITY_BILL"
19595
+ id: "ub_000000000000",
19596
+ instance_id: "in_000000000000",
19597
+ receiver_id: "re_IOxAUL24LG7P"
19447
19598
  }
19448
- ],
19449
- incorporation_doc_file: "https://example.com/image.png",
19450
- proof_of_ownership_doc_file: "https://example.com/image.png",
19451
- source_of_funds_doc_type: "business_income",
19452
- source_of_funds_doc_file: "https://example.com/image.png",
19453
- individual_holding_doc_front_file: "https://example.com/image.png",
19454
- purpose_of_transactions: "business_transactions",
19455
- purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
19456
- external_id: "your_company_external_id",
19457
- tos_id: "to_000000000000"
19599
+ ]
19458
19600
  });
19459
19601
  globalExpect(error).toBeNull();
19460
- globalExpect(data).toEqual({ id: "re_000000000000" });
19602
+ globalExpect(data).toEqual({ id: "re_IOxAUL24LG7P" });
19461
19603
  }));
19462
19604
  });
19463
19605
  describe("Get receiver", () => {
19464
19606
  it("should get a receiver", () => __async(null, null, function* () {
19465
19607
  const mockedReceiver = {
19466
- id: "re_000000000000",
19608
+ id: "re_YuaMcI2B8zbQ",
19467
19609
  type: "individual",
19468
- kyc_type: "standard",
19610
+ kyc_type: "enhanced",
19469
19611
  kyc_status: "verifying",
19470
19612
  kyc_warnings: [
19471
19613
  {
@@ -19475,60 +19617,36 @@ describe("Receivers", () => {
19475
19617
  warning_id: null
19476
19618
  }
19477
19619
  ],
19478
- email: "email@example.com",
19479
- tax_id: "536804398",
19480
- address_line_1: "738 Plain St",
19481
- address_line_2: "Building 22",
19482
- city: "Marshfield",
19483
- state_province_region: "MA",
19484
- country: "US",
19485
- 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",
19486
19628
  ip_address: "127.0.0.1",
19487
19629
  image_url: "https://example.com/image.png",
19488
- phone_number: "+1234567890",
19630
+ phone_number: "+5511987654321",
19489
19631
  proof_of_address_doc_type: "UTILITY_BILL",
19490
19632
  proof_of_address_doc_file: "https://example.com/image.png",
19491
- first_name: "John",
19492
- last_name: "Doe",
19493
- 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",
19494
19636
  id_doc_country: "BR",
19495
19637
  id_doc_type: "PASSPORT",
19496
19638
  id_doc_front_file: "https://example.com/image.png",
19497
19639
  id_doc_back_file: "https://example.com/image.png",
19498
- legal_name: "Company Name Inc.",
19499
- alternate_name: "Company Name Inc.",
19500
- formation_date: "1998-01-01T00:00:00Z",
19501
- website: "https://example.com",
19502
- owners: [
19503
- {
19504
- id: "ub_000000000000",
19505
- first_name: "John",
19506
- last_name: "Doe",
19507
- address_line_1: "738 Plain St",
19508
- address_line_2: "Building 22",
19509
- city: "Marshfield",
19510
- state_province_region: "MA",
19511
- country: "US",
19512
- postal_code: "02050",
19513
- id_doc_country: "BR",
19514
- id_doc_type: "PASSPORT",
19515
- id_doc_front_file: "https://example.com/image.png",
19516
- id_doc_back_file: "https://example.com/image.png"
19517
- }
19518
- ],
19519
- incorporation_doc_file: "https://example.com/image.png",
19520
- proof_of_ownership_doc_file: "https://example.com/image.png",
19521
- source_of_funds_doc_type: "business_income",
19640
+ aiprise_validation_key: "",
19641
+ source_of_funds_doc_type: "savings",
19522
19642
  source_of_funds_doc_file: "https://example.com/image.png",
19523
19643
  individual_holding_doc_front_file: "https://example.com/image.png",
19524
- purpose_of_transactions: "business_transactions",
19525
- purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
19526
- 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",
19527
19646
  instance_id: "in_000000000000",
19528
- tos_id: "to_000000000000",
19529
- aiprise_validation_key: "",
19530
- created_at: "2021-01-01T00:00:00Z",
19531
- 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",
19532
19650
  limit: {
19533
19651
  per_transaction: 1e5,
19534
19652
  daily: 2e5,
@@ -19538,7 +19656,7 @@ describe("Receivers", () => {
19538
19656
  fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
19539
19657
  headers: { "Content-Type": "application/json" }
19540
19658
  });
19541
- const { data, error } = yield blindpay.receivers.get("re_000000000000");
19659
+ const { data, error } = yield blindpay.receivers.get("re_YuaMcI2B8zbQ");
19542
19660
  globalExpect(error).toBeNull();
19543
19661
  globalExpect(data).toEqual(mockedReceiver);
19544
19662
  }));
@@ -19549,45 +19667,44 @@ describe("Receivers", () => {
19549
19667
  headers: { "Content-Type": "application/json" }
19550
19668
  });
19551
19669
  const { data, error } = yield blindpay.receivers.update({
19552
- receiver_id: "re_000000000000",
19553
- email: "email@example.com",
19554
- tax_id: "536804398",
19555
- address_line_1: "738 Plain St",
19556
- address_line_2: "Building 22",
19557
- city: "Marshfield",
19558
- state_province_region: "MA",
19559
- country: "US",
19560
- 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",
19561
19679
  ip_address: "127.0.0.1",
19562
19680
  image_url: "https://example.com/image.png",
19563
- phone_number: "+1234567890",
19681
+ phone_number: "+5511987654321",
19564
19682
  proof_of_address_doc_type: "UTILITY_BILL",
19565
19683
  proof_of_address_doc_file: "https://example.com/image.png",
19566
- first_name: "John",
19567
- last_name: "Doe",
19568
- 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",
19569
19687
  id_doc_country: "BR",
19570
19688
  id_doc_type: "PASSPORT",
19571
19689
  id_doc_front_file: "https://example.com/image.png",
19572
19690
  id_doc_back_file: "https://example.com/image.png",
19573
- legal_name: "Company Name Inc.",
19574
- alternate_name: "Company Name Inc.",
19575
- formation_date: "1998-01-01T00:00:00Z",
19576
- website: "https://example.com",
19691
+ alternate_name: "Exemplo",
19692
+ formation_date: "2010-05-20T00:00:00.000Z",
19693
+ website: "https://site.com",
19577
19694
  owners: [
19578
19695
  {
19579
19696
  id: "ub_000000000000",
19580
- first_name: "John",
19581
- last_name: "Doe",
19697
+ first_name: "Carlos",
19698
+ last_name: "Silva",
19582
19699
  role: "beneficial_owner",
19583
- date_of_birth: "1998-01-01T00:00:00Z",
19584
- tax_id: "536804398",
19585
- address_line_1: "738 Plain St",
19586
- address_line_2: "Building 22",
19587
- city: "Marshfield",
19588
- state_province_region: "MA",
19589
- country: "US",
19590
- 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",
19591
19708
  id_doc_country: "BR",
19592
19709
  id_doc_type: "PASSPORT",
19593
19710
  id_doc_front_file: "https://example.com/image.png",
@@ -19596,13 +19713,13 @@ describe("Receivers", () => {
19596
19713
  ],
19597
19714
  incorporation_doc_file: "https://example.com/image.png",
19598
19715
  proof_of_ownership_doc_file: "https://example.com/image.png",
19599
- source_of_funds_doc_type: "business_income",
19716
+ source_of_funds_doc_type: "savings",
19600
19717
  source_of_funds_doc_file: "https://example.com/image.png",
19601
19718
  individual_holding_doc_front_file: "https://example.com/image.png",
19602
- purpose_of_transactions: "business_transactions",
19603
- purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
19604
- external_id: "your_company_external_id",
19605
- 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"
19606
19723
  });
19607
19724
  globalExpect(error).toBeNull();
19608
19725
  globalExpect(data).toEqual({ data: null });
@@ -19613,7 +19730,7 @@ describe("Receivers", () => {
19613
19730
  fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
19614
19731
  headers: { "Content-Type": "application/json" }
19615
19732
  });
19616
- const { data, error } = yield blindpay.receivers.delete("re_000000000000");
19733
+ const { data, error } = yield blindpay.receivers.delete("re_YuaMcI2B8zbQ");
19617
19734
  globalExpect(error).toBeNull();
19618
19735
  globalExpect(data).toEqual({ data: null });
19619
19736
  }));
@@ -19635,7 +19752,7 @@ describe("Receivers", () => {
19635
19752
  fetchMock.mockResponseOnce(JSON.stringify(mockedReceiverLimits), {
19636
19753
  headers: { "Content-Type": "application/json" }
19637
19754
  });
19638
- const { data, error } = yield blindpay.receivers.getLimits("re_000000000000");
19755
+ const { data, error } = yield blindpay.receivers.getLimits("re_YuaMcI2B8zbQ");
19639
19756
  globalExpect(error).toBeNull();
19640
19757
  globalExpect(data).toEqual(mockedReceiverLimits);
19641
19758
  }));