Skip to content

Conversation

@david-ruiz-cko
Copy link
Contributor

This pull request updates the file upload functionality to allow specifying the purpose of the file upload, making the API more flexible and robust. It also improves test coverage to ensure correct handling of the new purpose parameter and validation of required fields.

API Enhancements:

  • The upload method in the Files class now implements the purpose parameter, which must be one of 'dispute_evidence', 'additional_document', 'bank_verification', or 'identity_verification'. This replaces the previous hardcoded value and allows more flexibility for file uploads. [1] [2]

Testing Improvements:

  • Added tests to verify that files can be uploaded with different valid purpose values and that the purpose parameter is included in the request body.
  • Added a validation test to ensure that a ValidationError is thrown if the purpose parameter is missing from the upload request to extend the checks

@david-ruiz-cko david-ruiz-cko requested a review from a team December 16, 2025 16:39
@sonarqubecloud
Copy link

@david-ruiz-cko david-ruiz-cko merged commit e1872fa into master Dec 17, 2025
3 checks passed
@david-ruiz-cko david-ruiz-cko deleted the issue/418 branch December 17, 2025 09:14
david-ruiz-cko added a commit that referenced this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants