Skip to content

Commit 6350c89

Browse files
committed
refactor: expose ContactImport on ContactImports class for consistent resend.Contacts.Imports.* access
1 parent 99a0e69 commit 6350c89

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

examples/contact_imports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
print("Created contact import with ID: {}".format(import_response["id"]))
4141
print(import_response)
4242

43-
contact_import: resend.ContactImport = resend.Contacts.Imports.get(import_response["id"])
43+
contact_import: resend.Contacts.Imports.ContactImport = resend.Contacts.Imports.get(import_response["id"])
4444
print("Retrieved contact import")
4545
print(contact_import)
4646

resend/contacts/imports/_contact_imports.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717

1818
class ContactImports:
19+
ContactImport = ContactImport
20+
1921
class CreateContactImportResponse(BaseResponse):
2022
"""
2123
CreateContactImportResponse wraps the response from a successful import creation.

tests/contact_imports_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_get_contact_import(self) -> None:
5454
}
5555
)
5656

57-
result: resend.ContactImport = resend.Contacts.Imports.get(
57+
result: resend.Contacts.Imports.ContactImport = resend.Contacts.Imports.get(
5858
"479e3145-dd38-476b-932c-529ceb705947"
5959
)
6060
assert result["id"] == "479e3145-dd38-476b-932c-529ceb705947"

0 commit comments

Comments
 (0)