Skip to content

Commit

Permalink
Finalize webhook definition
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Jan 17, 2025
1 parent 5dbecf6 commit 126d70b
Show file tree
Hide file tree
Showing 36 changed files with 2,795 additions and 125 deletions.
2,007 changes: 1,883 additions & 124 deletions openapi.yaml

Large diffs are not rendered by default.

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
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
25 changes: 25 additions & 0 deletions src/schemas/IntegrationProviderErrorObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
type: object
required:
- lago_integration_id
- provider
- provider_code
- provider_error
properties:
lago_integration_id:
type: string
format: "uuid"
description: Unique identifier assigned to the integration within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the integration's record within the Lago system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
provider:
type: string
description: The type of integration provider
example: "netsuite"
provider_code:
type: string
example: "netsuite-eu-1"
description: Unique code used to identify an integration connection.
provider_error:
oneOf:
- type: string
- type: object
additionalProperties: true
43 changes: 43 additions & 0 deletions src/schemas/InvoicePaymentFailureObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
type: object
required:
- lago_invoice_id
- lago_customer_id
- external_customer_id
- payment_provider
properties:
lago_invoice_id:
type: string
format: "uuid"
description: Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's 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
38 changes: 38 additions & 0 deletions src/schemas/PaymentProviderErrorObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
type: object
required:
- lago_payment_provider_id
- payment_provider_name
- payment_provider_code
- provider_error
- source
properties:
lago_payment_provider_id:
type: string
format: "uuid"
description: Unique identifier assigned to the payment provider within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment provider's record within the Lago system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
payment_provider_name:
type: string
description: The name of payment provider
example: "Stripe Prod"
payment_provider_code:
type: string
description: Code of the payment provider
example: "stripe"
source:
type: string
enum:
- stripe
description: The source of the error
example: "stripe"
action:
type: string
enum:
- payment_provider.register_webhook
description: The action that was being performed when the error occurred
example: "payment_provider.register_webhook"
provider_error:
oneOf:
- type: string
- type: object
additionalProperties: true
8 changes: 8 additions & 0 deletions src/schemas/SubscriptionWithCustomerObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
allOf:
- $ref: "./SubscriptionObject.yaml"
- type: object
properties:
plan:
$ref: "./PlanObject.yaml"
customer:
$ref: "./CustomerObject.yaml"
10 changes: 10 additions & 0 deletions src/schemas/SubscriptionWithThresholdObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
allOf:
- $ref: "./SubscriptionObject.yaml"
- type: object
properties:
plan:
$ref: "./PlanObject.yaml"
customer:
$ref: "./CustomerObject.yaml"
usage_threshold:
$ref: "./UsageThresholdObject.yaml"
Loading

0 comments on commit 126d70b

Please sign in to comment.