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

misc: Add webhooks definition #320

Merged
merged 2 commits into from
Jan 24, 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
2,006 changes: 1,882 additions & 124 deletions openapi.yaml

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions src/openapi.yaml

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

6 changes: 6 additions & 0 deletions src/schemas/CreditNoteExtendedObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
allOf:
- $ref: "./CreditNoteObject.yaml"
- type: object
properties:
customer:
$ref: "./CustomerBaseObject.yaml"
43 changes: 43 additions & 0 deletions src/schemas/CreditNotePaymentProviderRefundError.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
type: object
required:
- lago_credit_note_id
- lago_customer_id
- external_customer_id
- payment_provider
properties:
lago_credit_note_id:
type: string
format: "uuid"
description: Unique identifier assigned to the credit note within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit note record within the Lago system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
lago_customer_id:
type: string
format: "uuid"
description: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
external_customer_id:
type: string
description: The customer external unique identifier (provided by your own application)
example: "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
provider_customer_id:
type: string
description: Unique identifier of the customer within the payment provider
example: "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
payment_provider:
type: string
enum:
- adyen
- cashfree
- gocardless
- stripe
description: The type of payment provider code
example: "stripe"
payment_provider_code:
type: string
description: Code of the payment provider
example: "Stripe Prod"
provider_error:
oneOf:
- type: string
- type: object
additionalProperties: true
16 changes: 12 additions & 4 deletions src/schemas/CustomerCheckoutUrl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@ description: .
properties:
customer:
type: object
required:
- lago_customer_id
- external_customer_id
- payment_provider
properties:
lago_customer_id:
type: string
example: 1a901a90-1a90-1a90-1a90-1a901a901a90
description: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
external_customer_id:
type: string
example: '5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba'
description: 'The customer external unique identifier (provided by your own application)'
example: "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
description: "The customer external unique identifier (provided by your own application)"
payment_provider:
type: string
example: 'stripe'
example: "stripe"
description: The Payment Provider name linked to the Customer.
payment_provider_code:
type: string
description: Code of the payment provider
example: "Stripe Prod"
checkout_url:
type: string
example: 'https://foo.bar'
example: "https://foo.bar"
description: The new generated Payment Provider Checkout URL for the Customer.
37 changes: 37 additions & 0 deletions src/schemas/CustomerIntegratrionErrorObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
type: object
required:
- lago_customer_id
- external_customer_id
- accounting_provider
- accounting_provider_code
- provider_error
properties:
lago_customer_id:
type: string
format: "uuid"
description: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
external_customer_id:
type: string
description: The customer external unique identifier (provided by your own application)
example: "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
accounting_provider:
type: string
enum:
- anrock
- hubspot
- netsuite
- okta
- salesforce
- xero
description: The type of accounting provider code
example: "anrock"
accounting_provider_code:
type: string
description: Code of the accounting provider
example: "Netsuite Prod"
provider_error:
oneOf:
- type: string
- type: object
additionalProperties: true
35 changes: 35 additions & 0 deletions src/schemas/CustomerPaymentProviderErrorObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
type: object
required:
- lago_customer_id
- external_customer_id
- payment_provider
- payment_provider_code
- provider_error
properties:
lago_customer_id:
type: string
format: "uuid"
description: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
external_customer_id:
type: string
description: The customer external unique identifier (provided by your own application)
example: "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
payment_provider:
type: string
enum:
- adyen
- cashfree
- gocardless
- stripe
description: The type of payment provider
example: "stripe"
payment_provider_code:
type: string
description: Code of the payment provider
example: "Stripe Prod"
provider_error:
oneOf:
- type: string
- type: object
additionalProperties: true
37 changes: 37 additions & 0 deletions src/schemas/CustomerTaxProviderErrorObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
type: object
required:
- lago_customer_id
- external_customer_id
- tax_provider
- tax_provider_code
- provider_error
properties:
lago_customer_id:
type: string
format: "uuid"
description: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
external_customer_id:
type: string
description: The customer external unique identifier (provided by your own application)
example: "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
tax_provider:
type: string
enum:
- anrock
- hubspot
- netsuite
- okta
- salesforce
- xero
description: The type of tax provider
example: "anrock"
tax_provider_code:
type: string
description: Code of the tax provider
example: "Stripe Prod"
provider_error:
oneOf:
- type: string
- type: object
additionalProperties: true
11 changes: 11 additions & 0 deletions src/schemas/CustomerViesCheckObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
allOf:
- $ref: "./CustomerBaseObject.yaml"
- type: object
properties:
vies_check:
type: object
properties:
valid:
type: boolean
description: "Whether the VIES check was successful"
example: true
22 changes: 22 additions & 0 deletions src/schemas/EventErrorsObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type: object
required:
- status
- error
- message
- event
properties:
status:
type: integer
description: HTTP status code. It will always be 422
example: 422
error:
type: string
description: HTTP error description. It will always be "Unprocessable Entity"
example: Unprocessable Entity
message:
oneOf:
- type: string
- type: object
additionalProperties: true
event:
$ref: "./EventObject.yaml"
27 changes: 27 additions & 0 deletions src/schemas/EventsErrorsObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: object
required:
- invalid_code
- missing_aggregation_property
- invalid_filter_values
properties:
invalid_code:
type: array
items:
type: string
description: List of event transaction_id with an invalid code
example:
- transaction_1234567890
missing_aggregation_property:
type: array
items:
type: string
description: List of event transaction_id with a missing aggregation property
example:
- transaction_1234567890
invalid_filter_values:
type: array
items:
type: string
description: List of event transaction_id with invalid filter values
example:
- transaction_1234567890
27 changes: 27 additions & 0 deletions src/schemas/FeeTaxProviderErrorObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: object
required:
- tax_provider_code
- lago_charge_id
- event_transaction_id
- provider_error
properties:
tax_provider_code:
type: string
description: Code of the tax provider
example: "Stripe Prod"
lago_charge_id:
type: string
format: "uuid"
nullable: true
description: Unique identifier assigned to the charge that the fee belongs to
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
event_transaction_id:
type: string
nullable: true
description: Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
example: "transaction_1234567890"
provider_error:
oneOf:
- type: string
- type: object
additionalProperties: true
Loading
Loading