Description
I encountered a type mismatch between the Finch Python SDK and the official Finch API documentation regarding the payment.id field.
Currently, the SDK defines payment.id as str | None (Optional). However, the Official API Documentation for Payroll Payment specifies that the id field is a unique UUID and is strictly required (it does not indicate it can be null or undefined).
references
Current Behavior
When using strict type checking (e.g., Mypy or Pyright), accessing payment.id triggers a warning that the value could be None.
# Example of unnecessary boilerplate currently required
if payment.id:
process_payment(payment.id) # Mypy is happy
else:
# Dead code path that theoretically shouldn't exist
raise ValueError("Payment ID is missing")
Expected Behavior
The id field on the Payment object for the response should be typed as str (required). This aligns with the API contract and removes the need for unnecessary null checks in consumer code.
Description
I encountered a type mismatch between the Finch Python SDK and the official Finch API documentation regarding the
payment.idfield.Currently, the SDK defines
payment.idasstr | None(Optional). However, the Official API Documentation for Payroll Payment specifies that theidfield is a unique UUID and is strictly required (it does not indicate it can be null or undefined).references
finch.types.payroll.Payment(or relevant model location)Current Behavior
When using strict type checking (e.g., Mypy or Pyright), accessing
payment.idtriggers a warning that the value could beNone.Expected Behavior
The
idfield on the Payment object for the response should be typed as str (required). This aligns with the API contract and removes the need for unnecessary null checks in consumer code.