@metronome/sdk 1.0.0 → 2.0.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 +65 -0
- package/bin/cli +5 -12
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +129 -5
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +129 -5
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +68 -64
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +68 -64
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +40 -39
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +40 -39
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +28 -6
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +28 -6
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +4 -3
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +4 -3
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +98 -77
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +98 -77
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +65 -46
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +65 -46
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +17 -16
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +17 -16
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +7 -4
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +7 -4
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts +117 -2
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +117 -2
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +49 -0
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +49 -0
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -0
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -0
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/payments.d.mts +116 -0
- package/resources/v1/payments.d.mts.map +1 -0
- package/resources/v1/payments.d.ts +116 -0
- package/resources/v1/payments.d.ts.map +1 -0
- package/resources/v1/payments.js +71 -0
- package/resources/v1/payments.js.map +1 -0
- package/resources/v1/payments.mjs +67 -0
- package/resources/v1/payments.mjs.map +1 -0
- package/resources/v1/usage.d.mts +4 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +4 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +4 -2
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +4 -2
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -0
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -0
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +109 -3
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +109 -3
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/internal/to-file.ts +1 -1
- package/src/resources/shared.ts +160 -5
- package/src/resources/v1/alerts.ts +68 -64
- package/src/resources/v1/contracts/contracts.ts +32 -6
- package/src/resources/v1/customers/alerts.ts +98 -77
- package/src/resources/v1/customers/customers.ts +18 -15
- package/src/resources/v1/customers/index.ts +1 -0
- package/src/resources/v1/customers/invoices.ts +142 -1
- package/src/resources/v1/index.ts +11 -0
- package/src/resources/v1/payments.ts +170 -0
- package/src/resources/v1/usage.ts +4 -2
- package/src/resources/v1/v1.ts +26 -0
- package/src/resources/v2/contracts.ts +144 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,7 +3,7 @@ export { BillingConfig, type BillingConfigRetrieveResponse, type BillingConfigCr
|
|
|
3
3
|
export { Commits, type CommitCreateResponse, type CommitUpdateEndDateResponse, type CommitCreateParams, type CommitListParams, type CommitUpdateEndDateParams, } from "./commits.mjs";
|
|
4
4
|
export { Credits, type CreditCreateResponse, type CreditUpdateEndDateResponse, type CreditCreateParams, type CreditListParams, type CreditUpdateEndDateParams, } from "./credits.mjs";
|
|
5
5
|
export { Customers, type Customer, type CustomerDetail, type CustomerCreateResponse, type CustomerRetrieveResponse, type CustomerArchiveResponse, type CustomerListBillableMetricsResponse, type CustomerListCostsResponse, type CustomerPreviewEventsResponse, type CustomerRetrieveBillingConfigurationsResponse, type CustomerSetNameResponse, type CustomerCreateParams, type CustomerRetrieveParams, type CustomerListParams, type CustomerArchiveParams, type CustomerListBillableMetricsParams, type CustomerListCostsParams, type CustomerPreviewEventsParams, type CustomerRetrieveBillingConfigurationsParams, type CustomerSetBillingConfigurationsParams, type CustomerSetIngestAliasesParams, type CustomerSetNameParams, type CustomerUpdateConfigParams, type CustomerDetailsCursorPage, type CustomerListBillableMetricsResponsesCursorPage, type CustomerListCostsResponsesCursorPage, } from "./customers.mjs";
|
|
6
|
-
export { Invoices, type Invoice, type InvoiceRetrieveResponse, type InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse, type InvoiceRetrieveParams, type InvoiceListParams, type InvoiceAddChargeParams, type InvoiceListBreakdownsParams, type InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage, } from "./invoices.mjs";
|
|
6
|
+
export { Invoices, type Invoice, type InvoiceRetrieveResponse, type InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse, type InvoiceRetrieveParams, type InvoiceListParams, type InvoiceAddChargeParams, type InvoiceListBreakdownsParams, type InvoiceRetrievePdfParams, type InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage, } from "./invoices.mjs";
|
|
7
7
|
export { NamedSchedules, type NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams, type NamedScheduleUpdateParams, } from "./named-schedules.mjs";
|
|
8
8
|
export { Plans, type PlanListResponse, type PlanAddResponse, type PlanEndResponse, type PlanListPriceAdjustmentsResponse, type PlanListParams, type PlanAddParams, type PlanEndParams, type PlanListPriceAdjustmentsParams, type PlanListResponsesCursorPage, type PlanListPriceAdjustmentsResponsesCursorPage, } from "./plans.mjs";
|
|
9
9
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,oCAAoC,GAC1C;OACM,EACL,aAAa,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,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gCAAgC,EACrC,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,2CAA2C,GACjD"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,oCAAoC,GAC1C;OACM,EACL,aAAa,EACb,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,GAC/B;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,6CAA6C,EAClD,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,2CAA2C,EAChD,KAAK,sCAAsC,EAC3C,KAAK,8BAA8B,EACnC,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,8CAA8C,EACnD,KAAK,oCAAoC,GAC1C;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,wCAAwC,GAC9C;OACM,EACL,cAAc,EACd,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gCAAgC,EACrC,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,2CAA2C,GACjD"}
|
|
@@ -3,7 +3,7 @@ export { BillingConfig, type BillingConfigRetrieveResponse, type BillingConfigCr
|
|
|
3
3
|
export { Commits, type CommitCreateResponse, type CommitUpdateEndDateResponse, type CommitCreateParams, type CommitListParams, type CommitUpdateEndDateParams, } from "./commits.js";
|
|
4
4
|
export { Credits, type CreditCreateResponse, type CreditUpdateEndDateResponse, type CreditCreateParams, type CreditListParams, type CreditUpdateEndDateParams, } from "./credits.js";
|
|
5
5
|
export { Customers, type Customer, type CustomerDetail, type CustomerCreateResponse, type CustomerRetrieveResponse, type CustomerArchiveResponse, type CustomerListBillableMetricsResponse, type CustomerListCostsResponse, type CustomerPreviewEventsResponse, type CustomerRetrieveBillingConfigurationsResponse, type CustomerSetNameResponse, type CustomerCreateParams, type CustomerRetrieveParams, type CustomerListParams, type CustomerArchiveParams, type CustomerListBillableMetricsParams, type CustomerListCostsParams, type CustomerPreviewEventsParams, type CustomerRetrieveBillingConfigurationsParams, type CustomerSetBillingConfigurationsParams, type CustomerSetIngestAliasesParams, type CustomerSetNameParams, type CustomerUpdateConfigParams, type CustomerDetailsCursorPage, type CustomerListBillableMetricsResponsesCursorPage, type CustomerListCostsResponsesCursorPage, } from "./customers.js";
|
|
6
|
-
export { Invoices, type Invoice, type InvoiceRetrieveResponse, type InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse, type InvoiceRetrieveParams, type InvoiceListParams, type InvoiceAddChargeParams, type InvoiceListBreakdownsParams, type InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage, } from "./invoices.js";
|
|
6
|
+
export { Invoices, type Invoice, type InvoiceRetrieveResponse, type InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse, type InvoiceRetrieveParams, type InvoiceListParams, type InvoiceAddChargeParams, type InvoiceListBreakdownsParams, type InvoiceRetrievePdfParams, type InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage, } from "./invoices.js";
|
|
7
7
|
export { NamedSchedules, type NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams, type NamedScheduleUpdateParams, } from "./named-schedules.js";
|
|
8
8
|
export { Plans, type PlanListResponse, type PlanAddResponse, type PlanEndResponse, type PlanListPriceAdjustmentsResponse, type PlanListParams, type PlanAddParams, type PlanEndParams, type PlanListPriceAdjustmentsParams, type PlanListResponsesCursorPage, type PlanListPriceAdjustmentsResponsesCursorPage, } from "./plans.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,oCAAoC,GAC1C;OACM,EACL,aAAa,EACb,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC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a,EAClB,KAAK,aAAa,EAClB,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,2CAA2C,GACjD"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,oCAAoC,GAC1C;OACM,EACL,aAAa,EACb,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,GAC/B;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,6CAA6C,EAClD,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,2CAA2C,EAChD,KAAK,sCAAsC,EAC3C,KAAK,8BAA8B,EACnC,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,8CAA8C,EACnD,KAAK,oCAAoC,GAC1C;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,wCAAwC,GAC9C;OACM,EACL,cAAc,EACd,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gCAAgC,EACrC,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,2CAA2C,GACjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAQkB;AAPhB,gGAAA,MAAM,OAAA;AAQR,sDAM0B;AALxB,+GAAA,aAAa,OAAA;AAMf,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,4CA2BqB;AA1BnB,sGAAA,SAAS,OAAA;AA2BX,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAQkB;AAPhB,gGAAA,MAAM,OAAA;AAQR,sDAM0B;AALxB,+GAAA,aAAa,OAAA;AAMf,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,4CA2BqB;AA1BnB,sGAAA,SAAS,OAAA;AA2BX,0CAaoB;AAZlB,oGAAA,QAAQ,OAAA;AAaV,wDAK2B;AAJzB,iHAAA,cAAc,OAAA;AAKhB,oCAYiB;AAXf,8FAAA,KAAK,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAOP;OACM,EACL,aAAa,GAKd;OACM,EACL,OAAO,GAMR;OACM,EACL,OAAO,GAMR;OACM,EACL,SAAS,GA0BV;OACM,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAOP;OACM,EACL,aAAa,GAKd;OACM,EACL,OAAO,GAMR;OACM,EACL,OAAO,GAMR;OACM,EACL,SAAS,GA0BV;OACM,EACL,QAAQ,GAYT;OACM,EACL,cAAc,GAIf;OACM,EACL,KAAK,GAWN"}
|
|
@@ -190,6 +190,47 @@ export declare class Invoices extends APIResource {
|
|
|
190
190
|
* ```
|
|
191
191
|
*/
|
|
192
192
|
listBreakdowns(params: InvoiceListBreakdownsParams, options?: RequestOptions): PagePromise<InvoiceListBreakdownsResponsesCursorPage, InvoiceListBreakdownsResponse>;
|
|
193
|
+
/**
|
|
194
|
+
* Retrieve a PDF version of a specific invoice by its unique identifier. This
|
|
195
|
+
* endpoint generates a professionally formatted invoice document suitable for
|
|
196
|
+
* sharing with customers, accounting teams, or for record-keeping purposes.
|
|
197
|
+
*
|
|
198
|
+
* ### Use this endpoint to:
|
|
199
|
+
*
|
|
200
|
+
* - Provide customers with downloadable or emailable copies of their invoices
|
|
201
|
+
* - Support accounting and finance teams with official billing documents
|
|
202
|
+
* - Maintain accurate records of billing transactions for audits and compliance
|
|
203
|
+
*
|
|
204
|
+
* ### Key response details:
|
|
205
|
+
*
|
|
206
|
+
* - The response is a binary PDF file representing the full invoice
|
|
207
|
+
* - The PDF includes all standard invoice information such as line items, totals,
|
|
208
|
+
* billing period, and customer details
|
|
209
|
+
* - The document is formatted for clarity and professionalism, suitable for
|
|
210
|
+
* official use
|
|
211
|
+
*
|
|
212
|
+
* ### Usage guidelines:
|
|
213
|
+
*
|
|
214
|
+
* - Ensure the `invoice_id` corresponds to an existing invoice for the specified
|
|
215
|
+
* `customer_id`
|
|
216
|
+
* - The PDF is generated on-demand; frequent requests for the same invoice may
|
|
217
|
+
* impact performance
|
|
218
|
+
* - Use appropriate headers to handle the binary response in your application
|
|
219
|
+
* (e.g., setting `Content-Type: application/pdf`)
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* const response =
|
|
224
|
+
* await client.v1.customers.invoices.retrievePdf({
|
|
225
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
226
|
+
* invoice_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
227
|
+
* });
|
|
228
|
+
*
|
|
229
|
+
* const content = await response.blob();
|
|
230
|
+
* console.log(content);
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
retrievePdf(params: InvoiceRetrievePdfParams, options?: RequestOptions): APIPromise<Response>;
|
|
193
234
|
}
|
|
194
235
|
export type InvoicesCursorPage = CursorPage<Invoice>;
|
|
195
236
|
export type InvoiceListBreakdownsResponsesCursorPage = CursorPage<InvoiceListBreakdownsResponse>;
|
|
@@ -205,7 +246,7 @@ export interface Invoice {
|
|
|
205
246
|
/**
|
|
206
247
|
* This field's availability is dependent on your client's configuration.
|
|
207
248
|
*/
|
|
208
|
-
billable_status?:
|
|
249
|
+
billable_status?: unknown;
|
|
209
250
|
/**
|
|
210
251
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
211
252
|
*/
|
|
@@ -532,14 +573,84 @@ export declare namespace Invoice {
|
|
|
532
573
|
billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
533
574
|
external_status?: 'DRAFT' | 'FINALIZED' | 'PAID' | 'UNCOLLECTIBLE' | 'VOID' | 'DELETED' | 'PAYMENT_FAILED' | 'INVALID_REQUEST_ERROR' | 'SKIPPED' | 'SENT' | 'QUEUED';
|
|
534
575
|
invoice_id?: string;
|
|
576
|
+
/**
|
|
577
|
+
* The subtotal amount invoiced, if available from the billing provider.
|
|
578
|
+
*/
|
|
579
|
+
invoiced_sub_total?: number;
|
|
580
|
+
/**
|
|
581
|
+
* The total amount invoiced, if available from the billing provider.
|
|
582
|
+
*/
|
|
583
|
+
invoiced_total?: number;
|
|
535
584
|
issued_at_timestamp?: string;
|
|
585
|
+
/**
|
|
586
|
+
* A URL to the PDF of the invoice, if available from the billing provider.
|
|
587
|
+
*/
|
|
588
|
+
pdf_url?: string;
|
|
589
|
+
/**
|
|
590
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
591
|
+
*/
|
|
592
|
+
tax?: CorrectedExternalInvoice.Tax;
|
|
593
|
+
}
|
|
594
|
+
namespace CorrectedExternalInvoice {
|
|
595
|
+
/**
|
|
596
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
597
|
+
*/
|
|
598
|
+
interface Tax {
|
|
599
|
+
/**
|
|
600
|
+
* The total tax amount applied to the invoice.
|
|
601
|
+
*/
|
|
602
|
+
total_tax_amount?: number;
|
|
603
|
+
/**
|
|
604
|
+
* The total taxable amount of the invoice.
|
|
605
|
+
*/
|
|
606
|
+
total_taxable_amount?: number;
|
|
607
|
+
/**
|
|
608
|
+
* The transaction ID associated with the tax calculation.
|
|
609
|
+
*/
|
|
610
|
+
transaction_id?: string;
|
|
611
|
+
}
|
|
536
612
|
}
|
|
537
613
|
}
|
|
538
614
|
interface ExternalInvoice {
|
|
539
615
|
billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
540
616
|
external_status?: 'DRAFT' | 'FINALIZED' | 'PAID' | 'UNCOLLECTIBLE' | 'VOID' | 'DELETED' | 'PAYMENT_FAILED' | 'INVALID_REQUEST_ERROR' | 'SKIPPED' | 'SENT' | 'QUEUED';
|
|
541
617
|
invoice_id?: string;
|
|
618
|
+
/**
|
|
619
|
+
* The subtotal amount invoiced, if available from the billing provider.
|
|
620
|
+
*/
|
|
621
|
+
invoiced_sub_total?: number;
|
|
622
|
+
/**
|
|
623
|
+
* The total amount invoiced, if available from the billing provider.
|
|
624
|
+
*/
|
|
625
|
+
invoiced_total?: number;
|
|
542
626
|
issued_at_timestamp?: string;
|
|
627
|
+
/**
|
|
628
|
+
* A URL to the PDF of the invoice, if available from the billing provider.
|
|
629
|
+
*/
|
|
630
|
+
pdf_url?: string;
|
|
631
|
+
/**
|
|
632
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
633
|
+
*/
|
|
634
|
+
tax?: ExternalInvoice.Tax;
|
|
635
|
+
}
|
|
636
|
+
namespace ExternalInvoice {
|
|
637
|
+
/**
|
|
638
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
639
|
+
*/
|
|
640
|
+
interface Tax {
|
|
641
|
+
/**
|
|
642
|
+
* The total tax amount applied to the invoice.
|
|
643
|
+
*/
|
|
644
|
+
total_tax_amount?: number;
|
|
645
|
+
/**
|
|
646
|
+
* The total taxable amount of the invoice.
|
|
647
|
+
*/
|
|
648
|
+
total_taxable_amount?: number;
|
|
649
|
+
/**
|
|
650
|
+
* The transaction ID associated with the tax calculation.
|
|
651
|
+
*/
|
|
652
|
+
transaction_id?: string;
|
|
653
|
+
}
|
|
543
654
|
}
|
|
544
655
|
interface InvoiceAdjustment {
|
|
545
656
|
credit_type: Shared.CreditTypeData;
|
|
@@ -704,7 +815,11 @@ export interface InvoiceListBreakdownsParams extends CursorPageParams {
|
|
|
704
815
|
*/
|
|
705
816
|
window_size?: 'HOUR' | 'DAY';
|
|
706
817
|
}
|
|
818
|
+
export interface InvoiceRetrievePdfParams {
|
|
819
|
+
customer_id: string;
|
|
820
|
+
invoice_id: string;
|
|
821
|
+
}
|
|
707
822
|
export declare namespace Invoices {
|
|
708
|
-
export { type Invoice as Invoice, type InvoiceRetrieveResponse as InvoiceRetrieveResponse, type InvoiceAddChargeResponse as InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse, type InvoicesCursorPage as InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage, type InvoiceRetrieveParams as InvoiceRetrieveParams, type InvoiceListParams as InvoiceListParams, type InvoiceAddChargeParams as InvoiceAddChargeParams, type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams, };
|
|
823
|
+
export { type Invoice as Invoice, type InvoiceRetrieveResponse as InvoiceRetrieveResponse, type InvoiceAddChargeResponse as InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse, type InvoicesCursorPage as InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage, type InvoiceRetrieveParams as InvoiceRetrieveParams, type InvoiceListParams as InvoiceListParams, type InvoiceAddChargeParams as InvoiceAddChargeParams, type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams, type InvoiceRetrievePdfParams as InvoiceRetrievePdfParams, };
|
|
709
824
|
}
|
|
710
825
|
//# sourceMappingURL=invoices.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"invoices.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EA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,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -190,6 +190,47 @@ export declare class Invoices extends APIResource {
|
|
|
190
190
|
* ```
|
|
191
191
|
*/
|
|
192
192
|
listBreakdowns(params: InvoiceListBreakdownsParams, options?: RequestOptions): PagePromise<InvoiceListBreakdownsResponsesCursorPage, InvoiceListBreakdownsResponse>;
|
|
193
|
+
/**
|
|
194
|
+
* Retrieve a PDF version of a specific invoice by its unique identifier. This
|
|
195
|
+
* endpoint generates a professionally formatted invoice document suitable for
|
|
196
|
+
* sharing with customers, accounting teams, or for record-keeping purposes.
|
|
197
|
+
*
|
|
198
|
+
* ### Use this endpoint to:
|
|
199
|
+
*
|
|
200
|
+
* - Provide customers with downloadable or emailable copies of their invoices
|
|
201
|
+
* - Support accounting and finance teams with official billing documents
|
|
202
|
+
* - Maintain accurate records of billing transactions for audits and compliance
|
|
203
|
+
*
|
|
204
|
+
* ### Key response details:
|
|
205
|
+
*
|
|
206
|
+
* - The response is a binary PDF file representing the full invoice
|
|
207
|
+
* - The PDF includes all standard invoice information such as line items, totals,
|
|
208
|
+
* billing period, and customer details
|
|
209
|
+
* - The document is formatted for clarity and professionalism, suitable for
|
|
210
|
+
* official use
|
|
211
|
+
*
|
|
212
|
+
* ### Usage guidelines:
|
|
213
|
+
*
|
|
214
|
+
* - Ensure the `invoice_id` corresponds to an existing invoice for the specified
|
|
215
|
+
* `customer_id`
|
|
216
|
+
* - The PDF is generated on-demand; frequent requests for the same invoice may
|
|
217
|
+
* impact performance
|
|
218
|
+
* - Use appropriate headers to handle the binary response in your application
|
|
219
|
+
* (e.g., setting `Content-Type: application/pdf`)
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* const response =
|
|
224
|
+
* await client.v1.customers.invoices.retrievePdf({
|
|
225
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
226
|
+
* invoice_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
227
|
+
* });
|
|
228
|
+
*
|
|
229
|
+
* const content = await response.blob();
|
|
230
|
+
* console.log(content);
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
retrievePdf(params: InvoiceRetrievePdfParams, options?: RequestOptions): APIPromise<Response>;
|
|
193
234
|
}
|
|
194
235
|
export type InvoicesCursorPage = CursorPage<Invoice>;
|
|
195
236
|
export type InvoiceListBreakdownsResponsesCursorPage = CursorPage<InvoiceListBreakdownsResponse>;
|
|
@@ -205,7 +246,7 @@ export interface Invoice {
|
|
|
205
246
|
/**
|
|
206
247
|
* This field's availability is dependent on your client's configuration.
|
|
207
248
|
*/
|
|
208
|
-
billable_status?:
|
|
249
|
+
billable_status?: unknown;
|
|
209
250
|
/**
|
|
210
251
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
211
252
|
*/
|
|
@@ -532,14 +573,84 @@ export declare namespace Invoice {
|
|
|
532
573
|
billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
533
574
|
external_status?: 'DRAFT' | 'FINALIZED' | 'PAID' | 'UNCOLLECTIBLE' | 'VOID' | 'DELETED' | 'PAYMENT_FAILED' | 'INVALID_REQUEST_ERROR' | 'SKIPPED' | 'SENT' | 'QUEUED';
|
|
534
575
|
invoice_id?: string;
|
|
576
|
+
/**
|
|
577
|
+
* The subtotal amount invoiced, if available from the billing provider.
|
|
578
|
+
*/
|
|
579
|
+
invoiced_sub_total?: number;
|
|
580
|
+
/**
|
|
581
|
+
* The total amount invoiced, if available from the billing provider.
|
|
582
|
+
*/
|
|
583
|
+
invoiced_total?: number;
|
|
535
584
|
issued_at_timestamp?: string;
|
|
585
|
+
/**
|
|
586
|
+
* A URL to the PDF of the invoice, if available from the billing provider.
|
|
587
|
+
*/
|
|
588
|
+
pdf_url?: string;
|
|
589
|
+
/**
|
|
590
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
591
|
+
*/
|
|
592
|
+
tax?: CorrectedExternalInvoice.Tax;
|
|
593
|
+
}
|
|
594
|
+
namespace CorrectedExternalInvoice {
|
|
595
|
+
/**
|
|
596
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
597
|
+
*/
|
|
598
|
+
interface Tax {
|
|
599
|
+
/**
|
|
600
|
+
* The total tax amount applied to the invoice.
|
|
601
|
+
*/
|
|
602
|
+
total_tax_amount?: number;
|
|
603
|
+
/**
|
|
604
|
+
* The total taxable amount of the invoice.
|
|
605
|
+
*/
|
|
606
|
+
total_taxable_amount?: number;
|
|
607
|
+
/**
|
|
608
|
+
* The transaction ID associated with the tax calculation.
|
|
609
|
+
*/
|
|
610
|
+
transaction_id?: string;
|
|
611
|
+
}
|
|
536
612
|
}
|
|
537
613
|
}
|
|
538
614
|
interface ExternalInvoice {
|
|
539
615
|
billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
540
616
|
external_status?: 'DRAFT' | 'FINALIZED' | 'PAID' | 'UNCOLLECTIBLE' | 'VOID' | 'DELETED' | 'PAYMENT_FAILED' | 'INVALID_REQUEST_ERROR' | 'SKIPPED' | 'SENT' | 'QUEUED';
|
|
541
617
|
invoice_id?: string;
|
|
618
|
+
/**
|
|
619
|
+
* The subtotal amount invoiced, if available from the billing provider.
|
|
620
|
+
*/
|
|
621
|
+
invoiced_sub_total?: number;
|
|
622
|
+
/**
|
|
623
|
+
* The total amount invoiced, if available from the billing provider.
|
|
624
|
+
*/
|
|
625
|
+
invoiced_total?: number;
|
|
542
626
|
issued_at_timestamp?: string;
|
|
627
|
+
/**
|
|
628
|
+
* A URL to the PDF of the invoice, if available from the billing provider.
|
|
629
|
+
*/
|
|
630
|
+
pdf_url?: string;
|
|
631
|
+
/**
|
|
632
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
633
|
+
*/
|
|
634
|
+
tax?: ExternalInvoice.Tax;
|
|
635
|
+
}
|
|
636
|
+
namespace ExternalInvoice {
|
|
637
|
+
/**
|
|
638
|
+
* Tax details for the invoice, if available from the billing provider.
|
|
639
|
+
*/
|
|
640
|
+
interface Tax {
|
|
641
|
+
/**
|
|
642
|
+
* The total tax amount applied to the invoice.
|
|
643
|
+
*/
|
|
644
|
+
total_tax_amount?: number;
|
|
645
|
+
/**
|
|
646
|
+
* The total taxable amount of the invoice.
|
|
647
|
+
*/
|
|
648
|
+
total_taxable_amount?: number;
|
|
649
|
+
/**
|
|
650
|
+
* The transaction ID associated with the tax calculation.
|
|
651
|
+
*/
|
|
652
|
+
transaction_id?: string;
|
|
653
|
+
}
|
|
543
654
|
}
|
|
544
655
|
interface InvoiceAdjustment {
|
|
545
656
|
credit_type: Shared.CreditTypeData;
|
|
@@ -704,7 +815,11 @@ export interface InvoiceListBreakdownsParams extends CursorPageParams {
|
|
|
704
815
|
*/
|
|
705
816
|
window_size?: 'HOUR' | 'DAY';
|
|
706
817
|
}
|
|
818
|
+
export interface InvoiceRetrievePdfParams {
|
|
819
|
+
customer_id: string;
|
|
820
|
+
invoice_id: string;
|
|
821
|
+
}
|
|
707
822
|
export declare namespace Invoices {
|
|
708
|
-
export { type Invoice as Invoice, type InvoiceRetrieveResponse as InvoiceRetrieveResponse, type InvoiceAddChargeResponse as InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse, type InvoicesCursorPage as InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage, type InvoiceRetrieveParams as InvoiceRetrieveParams, type InvoiceListParams as InvoiceListParams, type InvoiceAddChargeParams as InvoiceAddChargeParams, type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams, };
|
|
823
|
+
export { type Invoice as Invoice, type InvoiceRetrieveResponse as InvoiceRetrieveResponse, type InvoiceAddChargeResponse as InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse, type InvoicesCursorPage as InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage, type InvoiceRetrieveParams as InvoiceRetrieveParams, type InvoiceListParams as InvoiceListParams, type InvoiceAddChargeParams as InvoiceAddChargeParams, type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams, type InvoiceRetrievePdfParams as InvoiceRetrievePdfParams, };
|
|
709
824
|
}
|
|
710
825
|
//# sourceMappingURL=invoices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,QAAQ,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAKtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyDG;IACH,IAAI,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,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M,CAAC;IAEtB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Invoices = void 0;
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
7
8
|
const path_1 = require("../../../internal/utils/path.js");
|
|
8
9
|
class Invoices extends resource_1.APIResource {
|
|
9
10
|
/**
|
|
@@ -207,6 +208,54 @@ class Invoices extends resource_1.APIResource {
|
|
|
207
208
|
const { customer_id, ...query } = params;
|
|
208
209
|
return this._client.getAPIList((0, path_1.path) `/v1/customers/${customer_id}/invoices/breakdowns`, (pagination_1.CursorPage), { query, ...options });
|
|
209
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Retrieve a PDF version of a specific invoice by its unique identifier. This
|
|
213
|
+
* endpoint generates a professionally formatted invoice document suitable for
|
|
214
|
+
* sharing with customers, accounting teams, or for record-keeping purposes.
|
|
215
|
+
*
|
|
216
|
+
* ### Use this endpoint to:
|
|
217
|
+
*
|
|
218
|
+
* - Provide customers with downloadable or emailable copies of their invoices
|
|
219
|
+
* - Support accounting and finance teams with official billing documents
|
|
220
|
+
* - Maintain accurate records of billing transactions for audits and compliance
|
|
221
|
+
*
|
|
222
|
+
* ### Key response details:
|
|
223
|
+
*
|
|
224
|
+
* - The response is a binary PDF file representing the full invoice
|
|
225
|
+
* - The PDF includes all standard invoice information such as line items, totals,
|
|
226
|
+
* billing period, and customer details
|
|
227
|
+
* - The document is formatted for clarity and professionalism, suitable for
|
|
228
|
+
* official use
|
|
229
|
+
*
|
|
230
|
+
* ### Usage guidelines:
|
|
231
|
+
*
|
|
232
|
+
* - Ensure the `invoice_id` corresponds to an existing invoice for the specified
|
|
233
|
+
* `customer_id`
|
|
234
|
+
* - The PDF is generated on-demand; frequent requests for the same invoice may
|
|
235
|
+
* impact performance
|
|
236
|
+
* - Use appropriate headers to handle the binary response in your application
|
|
237
|
+
* (e.g., setting `Content-Type: application/pdf`)
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```ts
|
|
241
|
+
* const response =
|
|
242
|
+
* await client.v1.customers.invoices.retrievePdf({
|
|
243
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
244
|
+
* invoice_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
245
|
+
* });
|
|
246
|
+
*
|
|
247
|
+
* const content = await response.blob();
|
|
248
|
+
* console.log(content);
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
retrievePdf(params, options) {
|
|
252
|
+
const { customer_id, invoice_id } = params;
|
|
253
|
+
return this._client.get((0, path_1.path) `/v1/customers/${customer_id}/invoices/${invoice_id}/pdf`, {
|
|
254
|
+
...options,
|
|
255
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: 'application/pdf' }, options?.headers]),
|
|
256
|
+
__binaryResponse: true,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
210
259
|
}
|
|
211
260
|
exports.Invoices = Invoices;
|
|
212
261
|
//# sourceMappingURL=invoices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,4DAA0F;
|
|
1
|
+
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,4DAA0F;AAC1F,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,QAAQ,CAAC,MAA6B,EAAE,OAAwB;QAC9D,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,iBAAiB,WAAW,aAAa,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyDG;IACH,IAAI,CAAC,MAAyB,EAAE,OAAwB;QACtD,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE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AC;YACxE,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AArQD,4BAqQC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
3
|
import { CursorPage } from "../../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
4
5
|
import { path } from "../../../internal/utils/path.mjs";
|
|
5
6
|
export class Invoices extends APIResource {
|
|
6
7
|
/**
|
|
@@ -204,5 +205,53 @@ export class Invoices extends APIResource {
|
|
|
204
205
|
const { customer_id, ...query } = params;
|
|
205
206
|
return this._client.getAPIList(path `/v1/customers/${customer_id}/invoices/breakdowns`, (CursorPage), { query, ...options });
|
|
206
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Retrieve a PDF version of a specific invoice by its unique identifier. This
|
|
210
|
+
* endpoint generates a professionally formatted invoice document suitable for
|
|
211
|
+
* sharing with customers, accounting teams, or for record-keeping purposes.
|
|
212
|
+
*
|
|
213
|
+
* ### Use this endpoint to:
|
|
214
|
+
*
|
|
215
|
+
* - Provide customers with downloadable or emailable copies of their invoices
|
|
216
|
+
* - Support accounting and finance teams with official billing documents
|
|
217
|
+
* - Maintain accurate records of billing transactions for audits and compliance
|
|
218
|
+
*
|
|
219
|
+
* ### Key response details:
|
|
220
|
+
*
|
|
221
|
+
* - The response is a binary PDF file representing the full invoice
|
|
222
|
+
* - The PDF includes all standard invoice information such as line items, totals,
|
|
223
|
+
* billing period, and customer details
|
|
224
|
+
* - The document is formatted for clarity and professionalism, suitable for
|
|
225
|
+
* official use
|
|
226
|
+
*
|
|
227
|
+
* ### Usage guidelines:
|
|
228
|
+
*
|
|
229
|
+
* - Ensure the `invoice_id` corresponds to an existing invoice for the specified
|
|
230
|
+
* `customer_id`
|
|
231
|
+
* - The PDF is generated on-demand; frequent requests for the same invoice may
|
|
232
|
+
* impact performance
|
|
233
|
+
* - Use appropriate headers to handle the binary response in your application
|
|
234
|
+
* (e.g., setting `Content-Type: application/pdf`)
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```ts
|
|
238
|
+
* const response =
|
|
239
|
+
* await client.v1.customers.invoices.retrievePdf({
|
|
240
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
241
|
+
* invoice_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
242
|
+
* });
|
|
243
|
+
*
|
|
244
|
+
* const content = await response.blob();
|
|
245
|
+
* console.log(content);
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
retrievePdf(params, options) {
|
|
249
|
+
const { customer_id, invoice_id } = params;
|
|
250
|
+
return this._client.get(path `/v1/customers/${customer_id}/invoices/${invoice_id}/pdf`, {
|
|
251
|
+
...options,
|
|
252
|
+
headers: buildHeaders([{ Accept: 'application/pdf' }, options?.headers]),
|
|
253
|
+
__binaryResponse: true,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
207
256
|
}
|
|
208
257
|
//# sourceMappingURL=invoices.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;
|
|
1
|
+
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,QAAQ,CAAC,MA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C;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,WAAW,CAAC,MAAgC,EAAE,OAAwB;QACpE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,iBAAiB,WAAW,aAAa,UAAU,MAAM,EAAE;YACrF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACxE,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/v1/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ export { CustomFields, type CustomFieldListKeysResponse, type CustomFieldAddKeyP
|
|
|
7
7
|
export { Customers, type Customer, type CustomerDetail, type CustomerCreateResponse, type CustomerRetrieveResponse, type CustomerArchiveResponse, type CustomerListBillableMetricsResponse, type CustomerListCostsResponse, type CustomerPreviewEventsResponse, type CustomerRetrieveBillingConfigurationsResponse, type CustomerSetNameResponse, type CustomerCreateParams, type CustomerRetrieveParams, type CustomerListParams, type CustomerArchiveParams, type CustomerListBillableMetricsParams, type CustomerListCostsParams, type CustomerPreviewEventsParams, type CustomerRetrieveBillingConfigurationsParams, type CustomerSetBillingConfigurationsParams, type CustomerSetIngestAliasesParams, type CustomerSetNameParams, type CustomerUpdateConfigParams, type CustomerDetailsCursorPage, type CustomerListBillableMetricsResponsesCursorPage, type CustomerListCostsResponsesCursorPage, } from "./customers/index.mjs";
|
|
8
8
|
export { Dashboards, type DashboardGetEmbeddableURLResponse, type DashboardGetEmbeddableURLParams, } from "./dashboards.mjs";
|
|
9
9
|
export { Invoices, type InvoiceRegenerateResponse, type InvoiceVoidResponse, type InvoiceRegenerateParams, type InvoiceVoidParams, } from "./invoices.mjs";
|
|
10
|
+
export { Payments, type Payment, type PaymentStatus, type PaymentAttemptResponse, type PaymentCancelResponse, type PaymentListParams, type PaymentAttemptParams, type PaymentCancelParams, type PaymentsBodyCursorPage, } from "./payments.mjs";
|
|
10
11
|
export { Plans, type PlanDetail, type PlanListResponse, type PlanGetDetailsResponse, type PlanListChargesResponse, type PlanListCustomersResponse, type PlanListParams, type PlanGetDetailsParams, type PlanListChargesParams, type PlanListCustomersParams, type PlanListResponsesCursorPage, type PlanListChargesResponsesCursorPage, type PlanListCustomersResponsesCursorPage, } from "./plans.mjs";
|
|
11
12
|
export { PricingUnits, type PricingUnitListResponse, type PricingUnitListParams, type PricingUnitListResponsesCursorPage, } from "./pricing-units.mjs";
|
|
12
13
|
export { Services, type ServiceListResponse } from "./services.mjs";
|