@billkit-eu/sdk 0.7.0 → 0.7.1
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 +12 -1
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -8
- package/dist/index.d.ts +24 -8
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/resources.ts +23 -7
- package/src/version.ts +1 -1
package/package.json
CHANGED
package/src/resources.ts
CHANGED
|
@@ -170,7 +170,7 @@ export interface CustomerListParams extends BaseListParams {
|
|
|
170
170
|
|
|
171
171
|
/** Query parameters accepted by `GET /v1/products`. */
|
|
172
172
|
export interface ProductsListParams extends BaseListParams {
|
|
173
|
-
/** Expandable here: `prices`, `stats`. */
|
|
173
|
+
/** Expandable here: `prices`, `stats`, `default_price`. */
|
|
174
174
|
expand?: string[];
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -228,6 +228,14 @@ export interface UpdateProductParams extends IdempotencyOptions {
|
|
|
228
228
|
active?: boolean;
|
|
229
229
|
/** See {@link CreateProductParams.allow_promotion_codes}. */
|
|
230
230
|
allow_promotion_codes?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* The price the billing portal offers on that price's interval. Must be
|
|
233
|
+
* an active price of this product; anything else is a 400 on
|
|
234
|
+
* `default_price_id`. An explicit `null` **clears** the default and is
|
|
235
|
+
* sent as a JSON null rather than pruned (only `undefined` is dropped);
|
|
236
|
+
* omit the field to leave the default alone.
|
|
237
|
+
*/
|
|
238
|
+
default_price_id?: string | null;
|
|
231
239
|
}
|
|
232
240
|
|
|
233
241
|
/**
|
|
@@ -711,15 +719,20 @@ export interface CreditNotesListParams extends BaseListParams {
|
|
|
711
719
|
* VAT is decided against and that an invoice prints.
|
|
712
720
|
*
|
|
713
721
|
* `country_code` is required on every call: there is nothing to leave
|
|
714
|
-
* alone about a jurisdiction.
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
* real event.
|
|
722
|
+
* alone about a jurisdiction. The address fields and
|
|
723
|
+
* `registration_number` are partial-update: omit one to leave the stored
|
|
724
|
+
* value alone, or pass an explicit `null` to clear it, because moving
|
|
725
|
+
* office is a real event.
|
|
726
|
+
*
|
|
727
|
+
* `vat_id` can be set once. After that, a different value or `null` is
|
|
728
|
+
* refused with a 400 (`param: "vat_id"`, reason `vat_id_locked`) and the
|
|
729
|
+
* call writes nothing; re-sending the stored number is accepted. BillKit
|
|
730
|
+
* invoices you reverse-charged against it, so support changes it.
|
|
718
731
|
*/
|
|
719
732
|
export interface SetTenantBillingProfileParams extends IdempotencyOptions {
|
|
720
733
|
/** ISO-3166-1 alpha-2, e.g. `"NL"`. */
|
|
721
734
|
country_code: string;
|
|
722
|
-
/** Your own EU VAT registration
|
|
735
|
+
/** Your own EU VAT registration. Set once; support changes or clears it. */
|
|
723
736
|
vat_id?: string | null;
|
|
724
737
|
address_line1?: string | null;
|
|
725
738
|
address_line2?: string | null;
|
|
@@ -963,7 +976,10 @@ export class Products extends BaseResource {
|
|
|
963
976
|
return this.post<T, CreateProductParams>("/v1/products", params);
|
|
964
977
|
}
|
|
965
978
|
|
|
966
|
-
/**
|
|
979
|
+
/**
|
|
980
|
+
* Expandable: `prices` (every price on the product), `stats`, and
|
|
981
|
+
* `default_price` (the price `default_price_id` names).
|
|
982
|
+
*/
|
|
967
983
|
retrieve<T = unknown>(id: string, options: ExpandOptions = {}): Promise<T> {
|
|
968
984
|
return this.get<T>(`/v1/products/${p(id)}`, options);
|
|
969
985
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.7.
|
|
1
|
+
export const VERSION = "0.7.1";
|