Skip to content

Add SalesOrdersEndpoint::delete()#10

Merged
loevgaard merged 1 commit into
2.xfrom
add-sales-order-delete
Jun 23, 2026
Merged

Add SalesOrdersEndpoint::delete()#10
loevgaard merged 1 commit into
2.xfrom
add-sales-order-delete

Conversation

@loevgaard

Copy link
Copy Markdown
Member

What

Adds a delete operation to the sales-orders endpoint:

$client->salesOrders()->delete(37707008); // DELETE /sales_orders/{id}

Mirrors the existing WebhooksEndpoint::delete() exactly — delete(int $id): void, routed through Client::delete() (which tolerates an empty response body). No interface changes needed (endpoints expose plain methods on the leaf).

Tests

SalesOrdersEndpointTest::it_deletes_a_sales_order_by_id — asserts the DELETE method and /sales_orders/5 URL via the scripted HTTP fake (same shape as the webhook delete test). No live test added — deleting against the real API is destructive.

Verification

  • PHPUnit: 107 tests / 250 assertions (3 live-API skipped)
  • PHPStan max: clean
  • ECS: clean

Delete a sales order by id (DELETE /sales_orders/{id}), mirroring
WebhooksEndpoint::delete().
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.08%. Comparing base (0bf7a00) to head (f34602f).

Additional details and impacted files
@@            Coverage Diff            @@
##                2.x      #10   +/-   ##
=========================================
  Coverage     98.07%   98.08%           
- Complexity      186      187    +1     
=========================================
  Files            33       33           
  Lines           520      522    +2     
=========================================
+ Hits            510      512    +2     
  Misses           10       10           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@loevgaard loevgaard merged commit 0011af1 into 2.x Jun 23, 2026
23 checks passed
@loevgaard loevgaard deleted the add-sales-order-delete branch June 23, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant