Skip to content

Commit 7d05a3b

Browse files
authored
Merge pull request #72 from FacturAPI/FAC-1383/feature/self-invoice-settings
Add method to update self-invoice settings
2 parents 7295fb6 + 5bfeb48 commit 7d05a3b

File tree

5 files changed

+34
-10
lines changed

5 files changed

+34
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [4.9.0] 2025-06-16
9+
10+
### Added
11+
12+
- Add `organizations.updateSelfInvoiceSettings` method to update self-invoice settings for the organization.
13+
814
## [4.8.3] 2025-05-19
915

1016
### Fixed

package-lock.json

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "facturapi",
3-
"version": "4.8.3",
3+
"version": "4.9.0",
44
"description": "Librería oficial de Facturapi. Crea CFDIs timbrados y enviados al SAT, XML y PDF",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",
@@ -52,6 +52,6 @@
5252
"prettier-eslint-cli": "^8.0.1",
5353
"semistandard": "^17.0.0",
5454
"typescript": "^5.8.3",
55-
"vite": "^6.3.2"
55+
"vite": "^6.3.5"
5656
}
5757
}

src/resources/organizations.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,19 @@ export default class Organizations {
309309
me(): Promise<Organization> {
310310
return this.client.get('/organizations/me');
311311
}
312+
313+
/**
314+
* Updates the organization's self-invoice settings
315+
* @param id Organization Id
316+
* @param data Self-invoice settings
317+
* @returns Organization object
318+
*/
319+
updateSelfInvoiceSettings(
320+
id: string,
321+
data: Record<string, any>,
322+
): Promise<Organization> {
323+
return this.client.put('/organizations/' + id + '/self-invoice', {
324+
body: data,
325+
});
326+
}
312327
}

src/types/organization.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export interface Organization {
8181
self_invoice: {
8282
allowed_cfdi_uses: string[];
8383
apply_resico_isr: boolean;
84+
support_email: string;
85+
support_email_verified: boolean;
8486
};
8587
pending_plan_update: {
8688
plan: string;

0 commit comments

Comments
 (0)