Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Expose billing periods with invoice object #319

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions src/schemas/BillingPeriodObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
type: object
required:
- lago_subscription_id
- external_subscription_id
- subscription_from_datetime
- subscription_to_datetime
- charges_from_datetime
- charges_to_datetime
- invoicing_reason
properties:
lago_subscription_id:
type: string
format: uuid
description: Unique identifier assigned to the subscription, created by Lago.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
external_subscription_id:
type: string
description: Unique identifier assigned to the subscription in your application.
example: "external_id"
lago_plan_id:
type: string
format: uuid
description: Unique identifier assigned to the plan, created by Lago.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
subscription_from_datetime:
type: string
format: "date-time"
description: The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
example: "2022-04-29T08:59:51Z"
subscription_to_datetime:
type: string
format: "date-time"
description: The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
example: "2022-05-29T08:59:51Z"
charges_from_datetime:
type: string
format: "date-time"
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.
example: "2022-04-29T08:59:51Z"
charges_to_datetime:
type: string
format: "date-time"
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.
example: "2022-05-29T08:59:51Z"
invoicing_reason:
type: string
enum:
- subscription_starting
- subscription_periodic
- subscription_terminating
- in_advance_charge
- in_advance_charge_periodic
- progressive_billing
description: The reason explaining why this subscription appears on the invoice.
example: "subscription_starting"
6 changes: 5 additions & 1 deletion src/schemas/InvoiceObject.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
allOf:
- $ref: './InvoiceBaseObject.yaml'
- $ref: "./InvoiceBaseObject.yaml"
- type: object
properties:
customer:
$ref: "./CustomerObject.yaml"
description: The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice.
billing_period:
type: array
items:
$ref: "./BillingPeriodObject.yaml"
metadata:
type: array
items:
Expand Down
Loading