You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+86-16Lines changed: 86 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
FiscalAPI Python SDK - Official SDK for integrating with FiscalAPI, Mexico's electronic invoicing (CFDI 4.0) and fiscal services platform. Simplifies integration with SAT (Mexico's tax authority) for invoice creation, tax certificate management, and bulk downloads.
7
+
FiscalAPI Python SDK - Official SDK for integrating with FiscalAPI, Mexico's electronic invoicing (CFDI 4.0) and fiscal services platform. Simplifies integration with SAT (Mexico's tax authority) for invoice creation, tax certificate management, payroll invoices (CFDI de Nomina), and bulk downloads.
**Key Pattern - Field Aliasing:** Models use Pydantic `Field(alias="...")` for API JSON field mapping. When serializing, use `by_alias=True` and `exclude_none=True`.
66
73
74
+
### Public API Exports
75
+
76
+
All types are exported from the main package (`fiscalapi/__init__.py`):
77
+
```python
78
+
from fiscalapi import Invoice, Person, Product, FiscalApiClient, ApiResponse
79
+
```
80
+
81
+
Also available via submodules:
82
+
```python
83
+
from fiscalapi.models import Invoice, Person
84
+
from fiscalapi.services import InvoiceService, StampService
85
+
```
86
+
67
87
### Two Operation Modes
68
88
69
89
1.**By References** - Use pre-created object IDs (faster, less data transfer)
70
90
2.**By Values** - Send all field data directly (self-contained, no prior setup)
71
91
72
-
See `examples.py` and README.md for detailed examples of both modes.
73
-
74
92
### Request/Response Flow
75
93
76
94
1. Service method receives domain object
@@ -86,21 +104,73 @@ See `examples.py` and README.md for detailed examples of both modes.
86
104
87
105
## Key Files
88
106
89
-
-`fiscalapi/__init__.py` - Central exports for all models and services
107
+
-`fiscalapi/__init__.py` - Central exports for all 85 public types (models + services)
0 commit comments