@billkit-eu/sdk 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  Versioning is independent of the Python SDK; the two ship on their own cadence,
9
9
  so the numbers will diverge after this first release.
10
10
 
11
+ ## [0.7.0] - 2026-09-23
12
+
13
+ ### Fixed
14
+ - `CreateCouponParams.discount_type` now types the API's two literals, `"percent"` and `"fixed_cents"`; it had offered `"percentage"` / `"amount"`, neither of which the API accepts.
15
+ - Every path id is percent-encoded, so an id containing `/`, `?` or `#` can no longer rewrite the request onto a different route.
16
+ - `APIConnectionError` carries the original fetch failure as `cause`, including on the timeout path, so Node's "fetch failed" no longer hides the real reason.
17
+ - `BaseListParams` lost its index signature, so a misspelled filter is a compile error instead of a query parameter the server ignores. `ListParams` stays exported as a deprecated alias.
18
+
19
+ ### Added
20
+ - `apiKeys` resource: `create`, `retrieve`, `revoke`, `list`, `iter`.
21
+ - `invoices.sendEmail(id)` for `POST /v1/invoices/{id}/email`.
22
+ - `payments.retrieveProvider(id)` for `GET /v1/payments/{id}/provider`.
23
+ - `tenant.billingProfile()` / `tenant.setBillingProfile(params)` for the seller's country, VAT id and invoice address; an explicit `null` clears a field.
24
+ - `tenant.export()` returns the account's full JSON export as raw bytes.
25
+ - `webhookEndpoints.listEventTypes()` for the deliverable-event catalogue.
26
+ - `expand?: string[]` on `customers.list`, `products.list`, `subscriptions.list`, `payments.list`, `invoices.list` and `events.list`, and as an optional second argument on `products.retrieve`, `subscriptions.retrieve`, `payments.retrieve` and `invoices.retrieve`.
27
+ - `payments.list` types `customer_id`; `invoices.list` types `customer_id`, `subscription_id`, `payment_id` and `status`; `disputes.list` types `status` and `payment_id`. All are carried onto every page by `iter()`.
28
+ - `CreateCheckoutSessionParams.country`, so VAT applies to the first charge on the hosted flow.
29
+ - `CreateBillingPortalSessionParams.deliver_email`, which also emails the portal link to the customer.
30
+ - New exported types: `CreateApiKeyParams`, `SetTenantBillingProfileParams`, `ExpandOptions`, `DisputesListParams`, `InvoicesListParams`, `PaymentsListParams`, `ProductsListParams`, `SetCustomerVatNumberParams`, `UpdatePriceParams`.
31
+
32
+ ### Changed
33
+ - `UpdatePriceParams` accepts every field `PriceUpdate` does (`active`, `metadata`, `tax_behavior`, `payment_methods`, `refund_on_cancel`, `refund_window_initial_days`, `refund_window_renewal_days`), all optional, where `active` was previously required and alone.
34
+ - `SetCustomerVatNumberParams.vat_number` is `string | null`; an explicit `null` clears the registration and is not pruned.
35
+ - `billingPortalSessions.create` prunes undefined fields instead of sending a fixed body.
36
+
11
37
  ## [0.6.0] - 2026-09-23
12
38
 
13
39
  ### Added
package/README.md CHANGED
@@ -422,8 +422,10 @@ import type {
422
422
  } from "@billkit-eu/sdk";
423
423
 
424
424
  const couponParams: CreateCouponParams = {
425
+ // "percent" reads discount_value as whole percent; "fixed_cents" reads
426
+ // it as minor units off the charge. Those are the only two values.
425
427
  code: "WELCOME10",
426
- discount_type: "percentage",
428
+ discount_type: "percent",
427
429
  discount_value: 10,
428
430
  duration: "once",
429
431
  };