blindpay 2.2.0__tar.gz → 2.3.0__tar.gz

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 (55) hide show
  1. {blindpay-2.2.0 → blindpay-2.3.0}/PKG-INFO +1 -1
  2. {blindpay-2.2.0 → blindpay-2.3.0}/pyproject.toml +1 -1
  3. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/__init__.py +9 -1
  4. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/client.py +40 -1
  5. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/__init__.py +6 -0
  6. blindpay-2.3.0/src/blindpay/resources/customers/__init__.py +47 -0
  7. blindpay-2.3.0/src/blindpay/resources/customers/customers.py +314 -0
  8. blindpay-2.3.0/src/blindpay/resources/limits/__init__.py +21 -0
  9. blindpay-2.3.0/src/blindpay/resources/limits/limits.py +58 -0
  10. blindpay-2.3.0/src/blindpay/resources/ownership/__init__.py +17 -0
  11. blindpay-2.3.0/src/blindpay/resources/ownership/ownership.py +49 -0
  12. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/payins/payins.py +2 -0
  13. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/payouts/payouts.py +3 -0
  14. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/upload/__init__.py +4 -0
  15. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/upload/upload.py +16 -1
  16. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/types.py +16 -0
  17. {blindpay-2.2.0 → blindpay-2.3.0}/.gitignore +0 -0
  18. {blindpay-2.2.0 → blindpay-2.3.0}/LICENSE +0 -0
  19. {blindpay-2.2.0 → blindpay-2.3.0}/README.md +0 -0
  20. {blindpay-2.2.0 → blindpay-2.3.0}/py.typed +0 -0
  21. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/_internal/__init__.py +0 -0
  22. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/_internal/api_client.py +0 -0
  23. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/_internal/exceptions.py +0 -0
  24. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/api_keys/__init__.py +0 -0
  25. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/api_keys/api_keys.py +0 -0
  26. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/available/__init__.py +0 -0
  27. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/available/available.py +0 -0
  28. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/bank_accounts/__init__.py +0 -0
  29. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/bank_accounts/bank_accounts.py +0 -0
  30. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/custodial_wallets/__init__.py +0 -0
  31. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/custodial_wallets/custodial_wallets.py +0 -0
  32. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/fees/__init__.py +0 -0
  33. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/fees/fees.py +0 -0
  34. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/instances/__init__.py +0 -0
  35. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/instances/instances.py +0 -0
  36. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/partner_fees/__init__.py +0 -0
  37. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/partner_fees/partner_fees.py +0 -0
  38. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/payins/__init__.py +0 -0
  39. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/payins/quotes.py +0 -0
  40. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/payouts/__init__.py +0 -0
  41. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/quotes/__init__.py +0 -0
  42. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/quotes/quotes.py +0 -0
  43. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/receivers/__init__.py +0 -0
  44. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/receivers/receivers.py +0 -0
  45. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/terms_of_service/__init__.py +0 -0
  46. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/terms_of_service/terms_of_service.py +0 -0
  47. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/transfers/__init__.py +0 -0
  48. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/transfers/transfers.py +0 -0
  49. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/virtual_accounts/__init__.py +0 -0
  50. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/virtual_accounts/virtual_accounts.py +0 -0
  51. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/wallets/__init__.py +0 -0
  52. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/wallets/blockchain.py +0 -0
  53. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/wallets/offramp.py +0 -0
  54. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/webhooks/__init__.py +0 -0
  55. {blindpay-2.2.0 → blindpay-2.3.0}/src/blindpay/resources/webhooks/webhooks.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: blindpay
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Official Python SDK for the Blindpay API — Global payments infrastructure
5
5
  Project-URL: Homepage, https://github.com/blindpaylabs/blindpay-python
6
6
  Project-URL: Repository, https://github.com/blindpaylabs/blindpay-python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "blindpay"
3
- version = "2.2.0"
3
+ version = "2.3.0"
4
4
  description = "Official Python SDK for the Blindpay API — Global payments infrastructure"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Blindpay", email = "alves@blindpay.com" }]
@@ -1,9 +1,11 @@
1
- __version__ = "2.2.0"
1
+ __version__ = "2.3.0"
2
2
 
3
3
  from ._internal.exceptions import BlindPayError
4
4
  from .client import BlindPay, BlindPaySync
5
5
  from .types import (
6
6
  AccountClass,
7
+ AipriseDocumentType,
8
+ ApprovalRate,
7
9
  BankAccountType,
8
10
  BankingPartner,
9
11
  BlindpayApiResponse,
@@ -13,6 +15,7 @@ from .types import (
13
15
  Currency,
14
16
  CurrencyType,
15
17
  ErrorResponse,
18
+ ManualExecutionStatus,
16
19
  Network,
17
20
  PaginationMetadata,
18
21
  PaginationParams,
@@ -27,6 +30,7 @@ from .types import (
27
30
  TrackingTransaction,
28
31
  TransactionDocumentType,
29
32
  TransactionStatus,
33
+ WebhookEvent,
30
34
  )
31
35
 
32
36
  __all__ = [
@@ -34,11 +38,14 @@ __all__ = [
34
38
  "BlindPaySync",
35
39
  "BlindPayError",
36
40
  "AccountClass",
41
+ "AipriseDocumentType",
42
+ "ApprovalRate",
37
43
  "BankAccountType",
38
44
  "BankingPartner",
39
45
  "Country",
40
46
  "Currency",
41
47
  "CurrencyType",
48
+ "ManualExecutionStatus",
42
49
  "Network",
43
50
  "PaymentMethod",
44
51
  "Rail",
@@ -46,6 +53,7 @@ __all__ = [
46
53
  "StablecoinToken",
47
54
  "TransactionDocumentType",
48
55
  "TransactionStatus",
56
+ "WebhookEvent",
49
57
  "BlindpayApiResponse",
50
58
  "BlindpayErrorResponse",
51
59
  "BlindpaySuccessResponse",
@@ -17,8 +17,11 @@ if TYPE_CHECKING:
17
17
  CustodialWalletsResource,
18
18
  CustodialWalletsResourceSync,
19
19
  )
20
+ from blindpay.resources.customers.customers import CustomersResource, CustomersResourceSync
20
21
  from blindpay.resources.fees.fees import FeesResource, FeesResourceSync
21
22
  from blindpay.resources.instances.instances import InstancesResource, InstancesResourceSync
23
+ from blindpay.resources.limits.limits import LimitsResource, LimitsResourceSync
24
+ from blindpay.resources.ownership.ownership import OwnershipResource, OwnershipResourceSync
22
25
  from blindpay.resources.partner_fees.partner_fees import PartnerFeesResource, PartnerFeesResourceSync
23
26
  from blindpay.resources.payins.payins import PayinsResource, PayinsResourceSync
24
27
  from blindpay.resources.payins.quotes import PayinQuotesResource, PayinQuotesResourceSync
@@ -39,7 +42,7 @@ if TYPE_CHECKING:
39
42
  from blindpay.resources.wallets.offramp import OfframpWalletsResource, OfframpWalletsResourceSync
40
43
  from blindpay.resources.webhooks.webhooks import WebhookEndpointsResource, WebhookEndpointsResourceSync
41
44
 
42
- __version__ = "2.2.0"
45
+ __version__ = "2.3.0"
43
46
 
44
47
  T = TypeVar("T")
45
48
 
@@ -283,6 +286,12 @@ class BlindPay:
283
286
  def instances(self) -> _InstancesNamespace:
284
287
  return _InstancesNamespace(self._instance_id, self._api)
285
288
 
289
+ @cached_property
290
+ def ownership(self) -> "OwnershipResource":
291
+ from blindpay.resources.ownership import create_ownership_resource
292
+
293
+ return create_ownership_resource(self._instance_id, self._api)
294
+
286
295
  @cached_property
287
296
  def partner_fees(self) -> "PartnerFeesResource":
288
297
  from blindpay.resources.partner_fees import create_partner_fees_resource
@@ -325,12 +334,24 @@ class BlindPay:
325
334
 
326
335
  return create_transfers_resource(self._instance_id, self._api)
327
336
 
337
+ @cached_property
338
+ def customers(self) -> "CustomersResource":
339
+ from blindpay.resources.customers import create_customers_resource
340
+
341
+ return create_customers_resource(self._instance_id, self._api)
342
+
328
343
  @cached_property
329
344
  def fees(self) -> "FeesResource":
330
345
  from blindpay.resources.fees import create_fees_resource
331
346
 
332
347
  return create_fees_resource(self._instance_id, self._api)
333
348
 
349
+ @cached_property
350
+ def limits(self) -> "LimitsResource":
351
+ from blindpay.resources.limits import create_limits_resource
352
+
353
+ return create_limits_resource(self._instance_id, self._api)
354
+
334
355
  @cached_property
335
356
  def upload(self) -> "UploadResource":
336
357
  from blindpay.resources.upload import create_upload_resource
@@ -513,6 +534,12 @@ class BlindPaySync:
513
534
  def instances(self) -> _InstancesNamespaceSync:
514
535
  return _InstancesNamespaceSync(self._instance_id, self._api)
515
536
 
537
+ @cached_property
538
+ def ownership(self) -> "OwnershipResourceSync":
539
+ from blindpay.resources.ownership import create_ownership_resource_sync
540
+
541
+ return create_ownership_resource_sync(self._instance_id, self._api)
542
+
516
543
  @cached_property
517
544
  def partner_fees(self) -> "PartnerFeesResourceSync":
518
545
  from blindpay.resources.partner_fees import create_partner_fees_resource_sync
@@ -555,12 +582,24 @@ class BlindPaySync:
555
582
 
556
583
  return create_transfers_resource_sync(self._instance_id, self._api)
557
584
 
585
+ @cached_property
586
+ def customers(self) -> "CustomersResourceSync":
587
+ from blindpay.resources.customers import create_customers_resource_sync
588
+
589
+ return create_customers_resource_sync(self._instance_id, self._api)
590
+
558
591
  @cached_property
559
592
  def fees(self) -> "FeesResourceSync":
560
593
  from blindpay.resources.fees import create_fees_resource_sync
561
594
 
562
595
  return create_fees_resource_sync(self._instance_id, self._api)
563
596
 
597
+ @cached_property
598
+ def limits(self) -> "LimitsResourceSync":
599
+ from blindpay.resources.limits import create_limits_resource_sync
600
+
601
+ return create_limits_resource_sync(self._instance_id, self._api)
602
+
564
603
  @cached_property
565
604
  def upload(self) -> "UploadResourceSync":
566
605
  from blindpay.resources.upload import create_upload_resource_sync
@@ -2,8 +2,11 @@ from .api_keys import create_api_keys_resource
2
2
  from .available import create_available_resource
3
3
  from .bank_accounts import create_bank_accounts_resource
4
4
  from .custodial_wallets import create_custodial_wallets_resource
5
+ from .customers import create_customers_resource
5
6
  from .fees import create_fees_resource
6
7
  from .instances import create_instances_resource
8
+ from .limits import create_limits_resource
9
+ from .ownership import create_ownership_resource
7
10
  from .partner_fees import create_partner_fees_resource
8
11
  from .payins import create_payin_quotes_resource, create_payins_resource
9
12
  from .payouts import create_payouts_resource
@@ -20,9 +23,12 @@ __all__ = [
20
23
  "create_api_keys_resource",
21
24
  "create_available_resource",
22
25
  "create_bank_accounts_resource",
26
+ "create_customers_resource",
23
27
  "create_custodial_wallets_resource",
24
28
  "create_fees_resource",
25
29
  "create_instances_resource",
30
+ "create_limits_resource",
31
+ "create_ownership_resource",
26
32
  "create_partner_fees_resource",
27
33
  "create_payins_resource",
28
34
  "create_payin_quotes_resource",
@@ -0,0 +1,47 @@
1
+ from .customers import (
2
+ AccountPurpose,
3
+ AdditionalInfoItem,
4
+ BusinessIndustry,
5
+ BusinessType,
6
+ CreateCustomerInput,
7
+ CreateCustomerResponse,
8
+ Customer,
9
+ CustomersResource,
10
+ CustomersResourceSync,
11
+ CustomerType,
12
+ EstimatedAnnualRevenue,
13
+ IdDocType,
14
+ KycType,
15
+ ListCustomersResponse,
16
+ ProofOfAddressDocType,
17
+ PurposeOfTransactions,
18
+ SourceOfWealth,
19
+ SuccessResponse,
20
+ UpdateCustomerInput,
21
+ create_customers_resource,
22
+ create_customers_resource_sync,
23
+ )
24
+
25
+ __all__ = [
26
+ "create_customers_resource",
27
+ "create_customers_resource_sync",
28
+ "AccountPurpose",
29
+ "AdditionalInfoItem",
30
+ "BusinessIndustry",
31
+ "BusinessType",
32
+ "CreateCustomerInput",
33
+ "CreateCustomerResponse",
34
+ "Customer",
35
+ "CustomerType",
36
+ "CustomersResource",
37
+ "CustomersResourceSync",
38
+ "EstimatedAnnualRevenue",
39
+ "IdDocType",
40
+ "KycType",
41
+ "ListCustomersResponse",
42
+ "ProofOfAddressDocType",
43
+ "PurposeOfTransactions",
44
+ "SourceOfWealth",
45
+ "SuccessResponse",
46
+ "UpdateCustomerInput",
47
+ ]
@@ -0,0 +1,314 @@
1
+ from typing import Any, Dict, List, Optional
2
+ from urllib.parse import urlencode
3
+
4
+ from typing_extensions import Literal, TypedDict
5
+
6
+ from ..._internal.api_client import InternalApiClient, InternalApiClientSync
7
+ from ...types import BlindpayApiResponse, Country, PaginationMetadata, PaginationParams
8
+
9
+ # Customer Types
10
+ CustomerType = Literal["individual", "business"]
11
+ KycType = Literal["light", "standard", "enhanced"]
12
+
13
+ ProofOfAddressDocType = Literal[
14
+ "UTILITY_BILL", "BANK_STATEMENT", "RENTAL_AGREEMENT", "TAX_DOCUMENT", "GOVERNMENT_CORRESPONDENCE"
15
+ ]
16
+
17
+ IdDocType = Literal["PASSPORT", "ID_CARD", "DRIVERS"]
18
+
19
+ PurposeOfTransactions = Literal[
20
+ "business_transactions",
21
+ "charitable_donations",
22
+ "investment_purposes",
23
+ "payments_to_friends_or_family_abroad",
24
+ "personal_or_living_expenses",
25
+ "protect_wealth",
26
+ "purchase_good_and_services",
27
+ "receive_payment_for_freelancing",
28
+ "receive_salary",
29
+ "other",
30
+ ]
31
+
32
+ AccountPurpose = Literal[
33
+ "charitable_donations",
34
+ "ecommerce_retail_payments",
35
+ "investment_purposes",
36
+ "business_expenses",
37
+ "payments_to_friends_or_family_abroad",
38
+ "personal_or_living_expenses",
39
+ "protect_wealth",
40
+ "purchase_goods_and_services",
41
+ "receive_payments_for_goods_and_services",
42
+ "tax_optimization",
43
+ "third_party_money_transmission",
44
+ "payroll",
45
+ "treasury_management",
46
+ "other",
47
+ ]
48
+
49
+ BusinessType = Literal["corporation", "llc", "partnership", "sole_proprietorship", "trust", "non_profit"]
50
+
51
+ EstimatedAnnualRevenue = Literal[
52
+ "0_99999", "100000_999999", "1000000_9999999", "10000000_49999999", "50000000_249999999", "250000000_plus"
53
+ ]
54
+
55
+ SourceOfWealth = Literal[
56
+ "business_dividends_or_profits",
57
+ "investments",
58
+ "asset_sales",
59
+ "client_investor_contributions",
60
+ "gambling",
61
+ "charitable_contributions",
62
+ "inheritance",
63
+ "affiliate_or_royalty_income",
64
+ ]
65
+
66
+ # Business Industry - abbreviated list (144 values mentioned in changelog)
67
+ BusinessIndustry = Literal[
68
+ "technology",
69
+ "finance",
70
+ "healthcare",
71
+ "retail",
72
+ "manufacturing",
73
+ "agriculture",
74
+ "education",
75
+ "transportation",
76
+ "real_estate",
77
+ "consulting",
78
+ # ... (This would need to be expanded with all 144 values)
79
+ ]
80
+
81
+
82
+ # Additional Info Item
83
+ class AdditionalInfoItem(TypedDict):
84
+ key: str
85
+ value: str
86
+
87
+
88
+ # Main Customer TypedDict
89
+ class Customer(TypedDict):
90
+ id: str
91
+ customer_id: str
92
+ type: CustomerType
93
+ kyc_type: KycType
94
+ email: str
95
+ tax_id: Optional[str]
96
+ address_line_1: Optional[str]
97
+ address_line_2: Optional[str]
98
+ city: Optional[str]
99
+ state_province_region: Optional[str]
100
+ country: Country
101
+ postal_code: Optional[str]
102
+ ip_address: Optional[str]
103
+ image_url: Optional[str]
104
+ phone_number: Optional[str]
105
+ proof_of_address_doc_type: Optional[ProofOfAddressDocType]
106
+ proof_of_address_doc_file: Optional[str]
107
+ first_name: Optional[str]
108
+ last_name: Optional[str]
109
+ date_of_birth: Optional[str] # Using str for unknown type
110
+ id_doc_country: Optional[Country]
111
+ id_doc_type: Optional[IdDocType]
112
+ id_doc_front_file: Optional[str]
113
+ id_doc_back_file: Optional[str]
114
+ legal_name: Optional[str]
115
+ alternate_name: Optional[str]
116
+ formation_date: Optional[str] # Using str for date-time
117
+ website: Optional[str]
118
+ owners: Optional[List[Dict[str, Any]]] # Array of objects
119
+ incorporation_doc_file: Optional[str]
120
+ proof_of_ownership_doc_file: Optional[str]
121
+ source_of_funds_doc_file: Optional[str]
122
+ selfie_file: Optional[str]
123
+ purpose_of_transactions: Optional[PurposeOfTransactions]
124
+ purpose_of_transactions_explanation: Optional[str]
125
+ account_purpose: Optional[AccountPurpose]
126
+ account_purpose_other: Optional[str]
127
+ business_type: Optional[BusinessType]
128
+ business_description: Optional[str]
129
+ business_industry: Optional[BusinessIndustry]
130
+ estimated_annual_revenue: Optional[EstimatedAnnualRevenue]
131
+ source_of_wealth: Optional[SourceOfWealth]
132
+ publicly_traded: Optional[bool]
133
+ occupation: Optional[str]
134
+ external_id: Optional[str]
135
+ tos_id: Optional[str]
136
+ additional_info: Optional[List[AdditionalInfoItem]]
137
+
138
+
139
+ # Input/Output Types
140
+ class CreateCustomerInput(TypedDict):
141
+ type: CustomerType
142
+ kyc_type: KycType
143
+ email: str
144
+ tax_id: Optional[str]
145
+ address_line_1: Optional[str]
146
+ address_line_2: Optional[str]
147
+ city: Optional[str]
148
+ state_province_region: Optional[str]
149
+ country: Country
150
+ postal_code: Optional[str]
151
+ ip_address: Optional[str]
152
+ image_url: Optional[str]
153
+ phone_number: Optional[str]
154
+ proof_of_address_doc_type: Optional[ProofOfAddressDocType]
155
+ proof_of_address_doc_file: Optional[str]
156
+ first_name: Optional[str]
157
+ last_name: Optional[str]
158
+ date_of_birth: Optional[str]
159
+ id_doc_country: Optional[Country]
160
+ id_doc_type: Optional[IdDocType]
161
+ id_doc_front_file: Optional[str]
162
+ id_doc_back_file: Optional[str]
163
+ legal_name: Optional[str]
164
+ alternate_name: Optional[str]
165
+ formation_date: Optional[str]
166
+ website: Optional[str]
167
+ owners: Optional[List[Dict[str, Any]]]
168
+ incorporation_doc_file: Optional[str]
169
+ proof_of_ownership_doc_file: Optional[str]
170
+ source_of_funds_doc_file: Optional[str]
171
+ selfie_file: Optional[str]
172
+ purpose_of_transactions: Optional[PurposeOfTransactions]
173
+ purpose_of_transactions_explanation: Optional[str]
174
+ account_purpose: Optional[AccountPurpose]
175
+ account_purpose_other: Optional[str]
176
+ business_type: Optional[BusinessType]
177
+ business_description: Optional[str]
178
+ business_industry: Optional[BusinessIndustry]
179
+ estimated_annual_revenue: Optional[EstimatedAnnualRevenue]
180
+ source_of_wealth: Optional[SourceOfWealth]
181
+ publicly_traded: Optional[bool]
182
+ occupation: Optional[str]
183
+ external_id: Optional[str]
184
+ tos_id: Optional[str]
185
+ additional_info: Optional[List[AdditionalInfoItem]]
186
+
187
+
188
+ class CreateCustomerResponse(TypedDict):
189
+ id: str
190
+ customer_id: str
191
+
192
+
193
+ class UpdateCustomerInput(TypedDict):
194
+ email: str
195
+ tax_id: Optional[str]
196
+ address_line_1: Optional[str]
197
+ address_line_2: Optional[str]
198
+ city: Optional[str]
199
+ state_province_region: Optional[str]
200
+ country: Country
201
+ postal_code: Optional[str]
202
+ ip_address: Optional[str]
203
+ image_url: Optional[str]
204
+ phone_number: Optional[str]
205
+ proof_of_address_doc_type: Optional[ProofOfAddressDocType]
206
+ proof_of_address_doc_file: Optional[str]
207
+ first_name: Optional[str]
208
+ last_name: Optional[str]
209
+ date_of_birth: Optional[str]
210
+ id_doc_country: Optional[Country]
211
+ id_doc_type: Optional[IdDocType]
212
+ id_doc_front_file: Optional[str]
213
+ id_doc_back_file: Optional[str]
214
+ legal_name: Optional[str]
215
+ alternate_name: Optional[str]
216
+ formation_date: Optional[str]
217
+ website: Optional[str]
218
+ owners: Optional[List[Dict[str, Any]]]
219
+ incorporation_doc_file: Optional[str]
220
+ proof_of_ownership_doc_file: Optional[str]
221
+ source_of_funds_doc_file: Optional[str]
222
+ selfie_file: Optional[str]
223
+ purpose_of_transactions: Optional[PurposeOfTransactions]
224
+ purpose_of_transactions_explanation: Optional[str]
225
+ account_purpose: Optional[AccountPurpose]
226
+ account_purpose_other: Optional[str]
227
+ business_type: Optional[BusinessType]
228
+ business_description: Optional[str]
229
+ business_industry: Optional[BusinessIndustry]
230
+ estimated_annual_revenue: Optional[EstimatedAnnualRevenue]
231
+ source_of_wealth: Optional[SourceOfWealth]
232
+ publicly_traded: Optional[bool]
233
+ occupation: Optional[str]
234
+ external_id: Optional[str]
235
+ tos_id: Optional[str]
236
+ additional_info: Optional[List[AdditionalInfoItem]]
237
+
238
+
239
+ class ListCustomersResponse(TypedDict):
240
+ data: List[Customer]
241
+ pagination: PaginationMetadata
242
+
243
+
244
+ class SuccessResponse(TypedDict):
245
+ success: bool
246
+
247
+
248
+ # --- Async resource ---
249
+
250
+
251
+ class CustomersResource:
252
+ def __init__(self, instance_id: str, client: InternalApiClient):
253
+ self._instance_id = instance_id
254
+ self._client = client
255
+
256
+ async def list(self, params: Optional[PaginationParams] = None) -> BlindpayApiResponse[ListCustomersResponse]:
257
+ query_string = ""
258
+ if params:
259
+ filtered_params = {k: v for k, v in params.items() if v is not None}
260
+ if filtered_params:
261
+ query_string = f"?{urlencode(filtered_params)}"
262
+ return await self._client.get(f"/instances/{self._instance_id}/customers{query_string}")
263
+
264
+ async def get(self, customer_id: str) -> BlindpayApiResponse[Customer]:
265
+ return await self._client.get(f"/instances/{self._instance_id}/customers/{customer_id}")
266
+
267
+ async def create(self, data: CreateCustomerInput) -> BlindpayApiResponse[CreateCustomerResponse]:
268
+ return await self._client.post(f"/instances/{self._instance_id}/customers", data)
269
+
270
+ async def update(self, customer_id: str, data: UpdateCustomerInput) -> BlindpayApiResponse[SuccessResponse]:
271
+ return await self._client.put(f"/instances/{self._instance_id}/customers/{customer_id}", data)
272
+
273
+ async def delete(self, customer_id: str) -> BlindpayApiResponse[SuccessResponse]:
274
+ return await self._client.delete(f"/instances/{self._instance_id}/customers/{customer_id}")
275
+
276
+
277
+ # --- Sync resource ---
278
+
279
+
280
+ class CustomersResourceSync:
281
+ def __init__(self, instance_id: str, client: InternalApiClientSync):
282
+ self._instance_id = instance_id
283
+ self._client = client
284
+
285
+ def list(self, params: Optional[PaginationParams] = None) -> BlindpayApiResponse[ListCustomersResponse]:
286
+ query_string = ""
287
+ if params:
288
+ filtered_params = {k: v for k, v in params.items() if v is not None}
289
+ if filtered_params:
290
+ query_string = f"?{urlencode(filtered_params)}"
291
+ return self._client.get(f"/instances/{self._instance_id}/customers{query_string}")
292
+
293
+ def get(self, customer_id: str) -> BlindpayApiResponse[Customer]:
294
+ return self._client.get(f"/instances/{self._instance_id}/customers/{customer_id}")
295
+
296
+ def create(self, data: CreateCustomerInput) -> BlindpayApiResponse[CreateCustomerResponse]:
297
+ return self._client.post(f"/instances/{self._instance_id}/customers", data)
298
+
299
+ def update(self, customer_id: str, data: UpdateCustomerInput) -> BlindpayApiResponse[SuccessResponse]:
300
+ return self._client.put(f"/instances/{self._instance_id}/customers/{customer_id}", data)
301
+
302
+ def delete(self, customer_id: str) -> BlindpayApiResponse[SuccessResponse]:
303
+ return self._client.delete(f"/instances/{self._instance_id}/customers/{customer_id}")
304
+
305
+
306
+ # --- Factory functions ---
307
+
308
+
309
+ def create_customers_resource(instance_id: str, client: InternalApiClient) -> CustomersResource:
310
+ return CustomersResource(instance_id, client)
311
+
312
+
313
+ def create_customers_resource_sync(instance_id: str, client: InternalApiClientSync) -> CustomersResourceSync:
314
+ return CustomersResourceSync(instance_id, client)
@@ -0,0 +1,21 @@
1
+ from .limits import (
2
+ CustomerLimits,
3
+ GetCustomerLimitsResponse,
4
+ LimitsResource,
5
+ LimitsResourceSync,
6
+ PayinLimit,
7
+ PayoutLimit,
8
+ create_limits_resource,
9
+ create_limits_resource_sync,
10
+ )
11
+
12
+ __all__ = [
13
+ "create_limits_resource",
14
+ "create_limits_resource_sync",
15
+ "CustomerLimits",
16
+ "GetCustomerLimitsResponse",
17
+ "LimitsResource",
18
+ "LimitsResourceSync",
19
+ "PayinLimit",
20
+ "PayoutLimit",
21
+ ]
@@ -0,0 +1,58 @@
1
+ from typing_extensions import TypedDict
2
+
3
+ from ..._internal.api_client import InternalApiClient, InternalApiClientSync
4
+ from ...types import BlindpayApiResponse
5
+
6
+
7
+ class PayinLimit(TypedDict):
8
+ daily: float
9
+ monthly: float
10
+
11
+
12
+ class PayoutLimit(TypedDict):
13
+ daily: float
14
+ monthly: float
15
+
16
+
17
+ class CustomerLimits(TypedDict):
18
+ payin: PayinLimit
19
+ payout: PayoutLimit
20
+
21
+
22
+ class GetCustomerLimitsResponse(TypedDict):
23
+ limits: CustomerLimits
24
+
25
+
26
+ # --- Async resource ---
27
+
28
+
29
+ class LimitsResource:
30
+ def __init__(self, instance_id: str, client: InternalApiClient):
31
+ self._instance_id = instance_id
32
+ self._client = client
33
+
34
+ async def get_customer_limits(self, customer_id: str) -> BlindpayApiResponse[GetCustomerLimitsResponse]:
35
+ return await self._client.get(f"/instances/{self._instance_id}/limits/customers/{customer_id}")
36
+
37
+
38
+ # --- Sync resource ---
39
+
40
+
41
+ class LimitsResourceSync:
42
+ def __init__(self, instance_id: str, client: InternalApiClientSync):
43
+ self._instance_id = instance_id
44
+ self._client = client
45
+
46
+ def get_customer_limits(self, customer_id: str) -> BlindpayApiResponse[GetCustomerLimitsResponse]:
47
+ return self._client.get(f"/instances/{self._instance_id}/limits/customers/{customer_id}")
48
+
49
+
50
+ # --- Factory functions ---
51
+
52
+
53
+ def create_limits_resource(instance_id: str, client: InternalApiClient) -> LimitsResource:
54
+ return LimitsResource(instance_id, client)
55
+
56
+
57
+ def create_limits_resource_sync(instance_id: str, client: InternalApiClientSync) -> LimitsResourceSync:
58
+ return LimitsResourceSync(instance_id, client)
@@ -0,0 +1,17 @@
1
+ from .ownership import (
2
+ MigrateInstanceOwnershipInput,
3
+ MigrateInstanceOwnershipResponse,
4
+ OwnershipResource,
5
+ OwnershipResourceSync,
6
+ create_ownership_resource,
7
+ create_ownership_resource_sync,
8
+ )
9
+
10
+ __all__ = [
11
+ "create_ownership_resource",
12
+ "create_ownership_resource_sync",
13
+ "MigrateInstanceOwnershipInput",
14
+ "MigrateInstanceOwnershipResponse",
15
+ "OwnershipResource",
16
+ "OwnershipResourceSync",
17
+ ]
@@ -0,0 +1,49 @@
1
+ from typing_extensions import TypedDict
2
+
3
+ from ..._internal.api_client import InternalApiClient, InternalApiClientSync
4
+ from ...types import BlindpayApiResponse
5
+
6
+
7
+ class MigrateInstanceOwnershipInput(TypedDict):
8
+ user_id: str
9
+
10
+
11
+ class MigrateInstanceOwnershipResponse(TypedDict):
12
+ success: bool
13
+
14
+
15
+ # --- Async resource ---
16
+
17
+
18
+ class OwnershipResource:
19
+ def __init__(self, instance_id: str, client: InternalApiClient):
20
+ self._instance_id = instance_id
21
+ self._client = client
22
+
23
+ async def migrate(
24
+ self, data: MigrateInstanceOwnershipInput
25
+ ) -> BlindpayApiResponse[MigrateInstanceOwnershipResponse]:
26
+ return await self._client.post(f"/instances/{self._instance_id}/ownership", data)
27
+
28
+
29
+ # --- Sync resource ---
30
+
31
+
32
+ class OwnershipResourceSync:
33
+ def __init__(self, instance_id: str, client: InternalApiClientSync):
34
+ self._instance_id = instance_id
35
+ self._client = client
36
+
37
+ def migrate(self, data: MigrateInstanceOwnershipInput) -> BlindpayApiResponse[MigrateInstanceOwnershipResponse]:
38
+ return self._client.post(f"/instances/{self._instance_id}/ownership", data)
39
+
40
+
41
+ # --- Factory functions ---
42
+
43
+
44
+ def create_ownership_resource(instance_id: str, client: InternalApiClient) -> OwnershipResource:
45
+ return OwnershipResource(instance_id, client)
46
+
47
+
48
+ def create_ownership_resource_sync(instance_id: str, client: InternalApiClientSync) -> OwnershipResourceSync:
49
+ return OwnershipResourceSync(instance_id, client)
@@ -4,6 +4,7 @@ from urllib.parse import urlencode
4
4
  from ..._internal.api_client import InternalApiClient, InternalApiClientSync
5
5
  from ...types import (
6
6
  BlindpayApiResponse,
7
+ ManualExecutionStatus,
7
8
  Network,
8
9
  PaginationMetadata,
9
10
  PaginationParams,
@@ -96,6 +97,7 @@ class Payin(TypedDict):
96
97
  pse_payment_link: Optional[str]
97
98
  pse_tax_id: Optional[str]
98
99
  partner_fee_id: Optional[str]
100
+ manual_execution_status: Optional[ManualExecutionStatus]
99
101
 
100
102
 
101
103
  class ListPayinsInput(PaginationParams):
@@ -96,6 +96,9 @@ class Payout(TypedDict):
96
96
  ted_bank_code: Optional[str]
97
97
  ted_branch_code: Optional[str]
98
98
  ted_cpf_cnpj: Optional[str]
99
+ billing_fee_amount: Optional[float]
100
+ cpn_payment_id: Optional[str]
101
+ sender_legal_name: Optional[str]
99
102
 
100
103
 
101
104
  class ListPayoutsInput(PaginationParams, total=False):
@@ -1,4 +1,6 @@
1
1
  from .upload import (
2
+ UploadAnalyzeInput,
3
+ UploadAnalyzeOutput,
2
4
  UploadBucket,
3
5
  UploadInput,
4
6
  UploadResource,
@@ -11,6 +13,8 @@ from .upload import (
11
13
  __all__ = [
12
14
  "create_upload_resource",
13
15
  "create_upload_resource_sync",
16
+ "UploadAnalyzeInput",
17
+ "UploadAnalyzeOutput",
14
18
  "UploadBucket",
15
19
  "UploadInput",
16
20
  "UploadResource",
@@ -1,7 +1,7 @@
1
1
  from typing_extensions import Literal, TypedDict
2
2
 
3
3
  from ..._internal.api_client import InternalApiClient, InternalApiClientSync
4
- from ...types import BlindpayApiResponse
4
+ from ...types import ApprovalRate, BlindpayApiResponse
5
5
 
6
6
  UploadBucket = Literal["avatar", "onboarding", "limit_increase"]
7
7
 
@@ -15,6 +15,15 @@ class UploadResponse(TypedDict):
15
15
  url: str
16
16
 
17
17
 
18
+ class UploadAnalyzeInput(TypedDict):
19
+ file: str
20
+
21
+
22
+ class UploadAnalyzeOutput(TypedDict):
23
+ approval_rate: ApprovalRate
24
+ description: str
25
+
26
+
18
27
  class UploadResource:
19
28
  def __init__(self, client: InternalApiClient):
20
29
  self._client = client
@@ -22,6 +31,9 @@ class UploadResource:
22
31
  async def create(self, data: UploadInput) -> BlindpayApiResponse[UploadResponse]:
23
32
  return await self._client.post("/upload", data)
24
33
 
34
+ async def analyze(self, data: UploadAnalyzeInput) -> BlindpayApiResponse[UploadAnalyzeOutput]:
35
+ return await self._client.post("/upload/analyze", data)
36
+
25
37
 
26
38
  class UploadResourceSync:
27
39
  def __init__(self, client: InternalApiClientSync):
@@ -30,6 +42,9 @@ class UploadResourceSync:
30
42
  def create(self, data: UploadInput) -> BlindpayApiResponse[UploadResponse]:
31
43
  return self._client.post("/upload", data)
32
44
 
45
+ def analyze(self, data: UploadAnalyzeInput) -> BlindpayApiResponse[UploadAnalyzeOutput]:
46
+ return self._client.post("/upload/analyze", data)
47
+
33
48
 
34
49
  def create_upload_resource(client: InternalApiClient) -> UploadResource:
35
50
  return UploadResource(client)
@@ -392,3 +392,19 @@ BankingPartner = Literal["cfsb", "citi", "hsbc", "jpmorgan"]
392
392
  PaymentMethod = Literal["ach", "wire", "pix", "spei", "transfers", "pse", "international_swift", "rtp", "ted"]
393
393
 
394
394
  KycStatus = Literal["awaiting_contract", "compliance_request"]
395
+
396
+ AipriseDocumentType = Literal[
397
+ "ADDRESS_PROOF_DOCUMENT",
398
+ "BANK_STATEMENT_DOCUMENT",
399
+ "OTHER",
400
+ "SOURCE_OF_FUNDS_DOCUMENT",
401
+ "TAX_CERTIFICATE",
402
+ "USER_SELFIE",
403
+ "VISA_DOCUMENT",
404
+ ]
405
+
406
+ ApprovalRate = Literal["high", "low", "medium"]
407
+
408
+ ManualExecutionStatus = Literal["failed"]
409
+
410
+ WebhookEvent = Literal["receiver.delete"]
File without changes
File without changes
File without changes
File without changes