Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@ $results = $facturapi->ComercioExteriorCatalogs->searchTariffFractions([
]);
```

### Organizaciones: Definir Serie Por Defecto

```php
$result = $facturapi->Organizations->updateDefaultSeries(
'ORGANIZATION_ID',
[
'type' => 'I',
'series' => 'A',
]
);
```

## Manejo de Errores ⚠️

En respuestas no-2xx, el SDK lanza `Facturapi\Exceptions\FacturapiException`.
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@ $results = $facturapi->ComercioExteriorCatalogs->searchTariffFractions([
]);
```

### Organizations: Set Default Series

```php
$result = $facturapi->Organizations->updateDefaultSeries(
'ORGANIZATION_ID',
[
'type' => 'I',
'series' => 'A',
]
);
```

## Error Handling ⚠️

On non-2xx responses, the SDK throws `Facturapi\Exceptions\FacturapiException`.
Expand Down
3 changes: 2 additions & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
4.1.0
4.2.0

## Added
- `organizations.updateDefaultSeries($id, $params)` method to update an organization's default series.
- Organization team/access management methods:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot debiste limpiar los cambios que ya están en la versión del tag release actual

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corregido: limpié VERSION.md removiendo los cambios que ya correspondían al release tag actual y dejé solo el cambio nuevo de 4.2.0. Commit: f71f661.

- `listTeamAccess`, `retrieveTeamAccess`, `removeTeamAccess`
- `listSentTeamInvites`, `inviteUserToTeam`, `cancelTeamInvite`
Expand Down
23 changes: 23 additions & 0 deletions src/Resources/Organizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,29 @@ public function updateSeriesGroup($id, $series_name, $params): mixed
}
}

/**
* Update default series for an organization.
*
* @param string $id Organization ID.
* @param array $params Default series payload.
* @return mixed JSON-decoded response.
*
* @throws FacturapiException
*/
public function updateDefaultSeries($id, $params): mixed
{
try {
return json_decode(
$this->executeJsonPutRequest(
$this->getRequestUrl($id) . "/series-group/default-series",
$params
)
);
} catch (FacturapiException $e) {
throw $e;
}
}

/**
* Delete a series group for an organization.
*
Expand Down