Skip to content

Commit 8b4bf1c

Browse files
feat: Expose billing periods with invoice object (#319)
1 parent f73ba3f commit 8b4bf1c

File tree

3 files changed

+118
-1
lines changed

3 files changed

+118
-1
lines changed

openapi.yaml

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
type: object
2+
required:
3+
- lago_subscription_id
4+
- external_subscription_id
5+
- subscription_from_datetime
6+
- subscription_to_datetime
7+
- charges_from_datetime
8+
- charges_to_datetime
9+
- invoicing_reason
10+
properties:
11+
lago_subscription_id:
12+
type: string
13+
format: uuid
14+
description: Unique identifier assigned to the subscription, created by Lago.
15+
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
16+
external_subscription_id:
17+
type: string
18+
description: Unique identifier assigned to the subscription in your application.
19+
example: "external_id"
20+
lago_plan_id:
21+
type: string
22+
format: uuid
23+
description: Unique identifier assigned to the plan, created by Lago.
24+
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
25+
subscription_from_datetime:
26+
type: string
27+
format: "date-time"
28+
description: The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
29+
example: "2022-04-29T08:59:51Z"
30+
subscription_to_datetime:
31+
type: string
32+
format: "date-time"
33+
description: The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
34+
example: "2022-05-29T08:59:51Z"
35+
charges_from_datetime:
36+
type: string
37+
format: "date-time"
38+
description: The beginning date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the start date of the billing period or subscription period associated with the fees.
39+
example: "2022-04-29T08:59:51Z"
40+
charges_to_datetime:
41+
type: string
42+
format: "date-time"
43+
description: The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees.
44+
example: "2022-05-29T08:59:51Z"
45+
invoicing_reason:
46+
type: string
47+
enum:
48+
- subscription_starting
49+
- subscription_periodic
50+
- subscription_terminating
51+
- in_advance_charge
52+
- in_advance_charge_periodic
53+
- progressive_billing
54+
description: The reason explaining why this subscription appears on the invoice.
55+
example: "subscription_starting"

src/schemas/InvoiceObject.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
allOf:
2-
- $ref: './InvoiceBaseObject.yaml'
2+
- $ref: "./InvoiceBaseObject.yaml"
33
- type: object
44
properties:
55
customer:
66
$ref: "./CustomerObject.yaml"
77
description: The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice.
8+
billing_period:
9+
type: array
10+
items:
11+
$ref: "./BillingPeriodObject.yaml"
812
metadata:
913
type: array
1014
items:

0 commit comments

Comments
 (0)