diff --git a/openapi.yaml b/openapi.yaml index cd3e74c1..23460756 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2605,6 +2605,7 @@ paths: parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page' + - $ref: '#/components/parameters/currency' - name: billing_entity_codes[] in: query description: Filter wallets by billing entity codes. @@ -2824,6 +2825,9 @@ paths: summary: List wallet alerts description: This endpoint enables the retrieval of all alerts for a wallet. operationId: getCustomerWalletAlerts + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/per_page' responses: '200': description: Wallet alerts @@ -6316,6 +6320,8 @@ paths: operationId: getSubscriptionAlerts parameters: - $ref: '#/components/parameters/subscription_status' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/per_page' responses: '200': description: Subscription alerts @@ -7517,6 +7523,14 @@ paths: schema: type: string example: inbound + - name: metadata[key] + in: query + description: Filter wallet transactions by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. For example, `metadata[color]=blue`. + required: false + explode: true + schema: + type: string + example: someValue responses: '200': description: Wallet transactions @@ -10742,6 +10756,15 @@ components: - failed - succeeded example: pending + currency: + name: currency + in: query + description: Filter the results by currency, expressed as an ISO 4217 code. + required: false + explode: true + schema: + type: string + example: EUR wallet_code: name: wallet_code in: path @@ -10777,15 +10800,6 @@ components: type: string format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - currency: - name: currency - in: query - description: Filter the results by currency, expressed as an ISO 4217 code. - required: false - explode: true - schema: - type: string - example: EUR plan_code: name: code in: path @@ -13170,6 +13184,12 @@ components: type: string description: The name of the coupon. example: Startup Deal + coupon_description: + type: + - string + - 'null' + description: The description of the parent coupon. + example: I am a coupon description coupon_status: type: string enum: @@ -17545,7 +17565,6 @@ components: - currency - rate_amount - credits_balance - - balance - balance_cents - consumed_credits - created_at @@ -17756,6 +17775,8 @@ components: - eu_bank_details WalletCreateInput: type: object + required: + - wallet properties: wallet: type: object @@ -17849,6 +17870,12 @@ components: - 'null' description: The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`. example: Tokens for models 'high-fidelity-boost' + transaction_priority: + type: integer + minimum: 1 + maximum: 50 + description: 'The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.' + example: 50 purchase_order_number: type: - string @@ -18068,6 +18095,18 @@ components: type: boolean description: A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. example: false + paid_top_up_min_amount_cents: + type: + - integer + - 'null' + description: Minimum amount of cents that can be top-up with a single paid transaction. + example: 100 + paid_top_up_max_amount_cents: + type: + - integer + - 'null' + description: Maximum amount of cents that can be top-up with a single paid transaction. + example: 1000 billing_entity_code: type: string example: default @@ -24998,6 +25037,19 @@ components: pattern: ^[0-9]+.?[0-9]*$ description: The number of voided credits. example: '5.0' + voided_transaction_id: + type: + - string + - 'null' + format: uuid + description: Unique identifier of the inbound wallet transaction to void. Only available on traceable wallets, and the target transaction must still have a remaining amount. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + priority: + type: integer + minimum: 1 + maximum: 50 + description: 'The priority of the wallet transaction. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.' + example: 50 invoice_requires_successful_payment: type: boolean description: A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. @@ -25071,6 +25123,10 @@ components: format: uuid description: Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + billing_entity_code: + type: string + example: default + description: The code of the billing entity associated with the wallet transaction. Falls back to the wallet's billing entity when the transaction does not carry one. lago_invoice_id: type: - string diff --git a/src/resources/customer_wallet_alerts.yaml b/src/resources/customer_wallet_alerts.yaml index 6638dc2a..bcd5c5b2 100644 --- a/src/resources/customer_wallet_alerts.yaml +++ b/src/resources/customer_wallet_alerts.yaml @@ -7,6 +7,9 @@ get: summary: List wallet alerts description: This endpoint enables the retrieval of all alerts for a wallet. operationId: getCustomerWalletAlerts + parameters: + - $ref: "../parameters/page.yaml" + - $ref: "../parameters/per_page.yaml" responses: "200": description: Wallet alerts diff --git a/src/resources/customer_wallets.yaml b/src/resources/customer_wallets.yaml index 0bd80396..18f9bfe0 100644 --- a/src/resources/customer_wallets.yaml +++ b/src/resources/customer_wallets.yaml @@ -37,6 +37,7 @@ get: parameters: - $ref: "../parameters/page.yaml" - $ref: "../parameters/per_page.yaml" + - $ref: "../parameters/currency.yaml" - name: billing_entity_codes[] in: query description: Filter wallets by billing entity codes. diff --git a/src/resources/subscription_alerts.yaml b/src/resources/subscription_alerts.yaml index b4b29fa6..3f93a663 100644 --- a/src/resources/subscription_alerts.yaml +++ b/src/resources/subscription_alerts.yaml @@ -14,6 +14,8 @@ get: operationId: getSubscriptionAlerts parameters: - $ref: "../parameters/subscription_status.yaml" + - $ref: "../parameters/page.yaml" + - $ref: "../parameters/per_page.yaml" responses: "200": description: Subscription alerts diff --git a/src/resources/wallet_transactions.yaml b/src/resources/wallet_transactions.yaml index c93b6588..66778132 100644 --- a/src/resources/wallet_transactions.yaml +++ b/src/resources/wallet_transactions.yaml @@ -39,6 +39,14 @@ get: schema: type: string example: "inbound" + - name: metadata[key] + in: query + description: Filter wallet transactions by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. For example, `metadata[color]=blue`. + required: false + explode: true + schema: + type: string + example: "someValue" responses: "200": description: Wallet transactions diff --git a/src/schemas/AppliedCouponObject.yaml b/src/schemas/AppliedCouponObject.yaml index b6cbea92..de9e8ee1 100644 --- a/src/schemas/AppliedCouponObject.yaml +++ b/src/schemas/AppliedCouponObject.yaml @@ -28,6 +28,12 @@ properties: type: string description: The name of the coupon. example: Startup Deal + coupon_description: + type: + - string + - "null" + description: The description of the parent coupon. + example: "I am a coupon description" coupon_status: type: string enum: diff --git a/src/schemas/WalletCreateInput.yaml b/src/schemas/WalletCreateInput.yaml index ae3a7095..986d4e3c 100644 --- a/src/schemas/WalletCreateInput.yaml +++ b/src/schemas/WalletCreateInput.yaml @@ -1,4 +1,6 @@ type: object +required: + - wallet properties: wallet: type: object @@ -92,6 +94,12 @@ properties: - "null" description: The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`. example: "Tokens for models 'high-fidelity-boost'" + transaction_priority: + type: integer + minimum: 1 + maximum: 50 + description: "The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." + example: 50 purchase_order_number: type: - string diff --git a/src/schemas/WalletObject.yaml b/src/schemas/WalletObject.yaml index be328759..0332e920 100644 --- a/src/schemas/WalletObject.yaml +++ b/src/schemas/WalletObject.yaml @@ -7,7 +7,6 @@ required: - currency - rate_amount - credits_balance - - balance - balance_cents - consumed_credits - created_at diff --git a/src/schemas/WalletTransactionCreateInput.yaml b/src/schemas/WalletTransactionCreateInput.yaml index 5c99e18d..f2aae95d 100644 --- a/src/schemas/WalletTransactionCreateInput.yaml +++ b/src/schemas/WalletTransactionCreateInput.yaml @@ -42,6 +42,19 @@ properties: pattern: "^[0-9]+.?[0-9]*$" description: The number of voided credits. example: "5.0" + voided_transaction_id: + type: + - string + - "null" + format: "uuid" + description: Unique identifier of the inbound wallet transaction to void. Only available on traceable wallets, and the target transaction must still have a remaining amount. + example: "1a901a90-1a90-1a90-1a90-1a901a901a90" + priority: + type: integer + minimum: 1 + maximum: 50 + description: "The priority of the wallet transaction. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." + example: 50 invoice_requires_successful_payment: type: boolean description: A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. diff --git a/src/schemas/WalletTransactionObject.yaml b/src/schemas/WalletTransactionObject.yaml index cff7f1f3..e996607b 100644 --- a/src/schemas/WalletTransactionObject.yaml +++ b/src/schemas/WalletTransactionObject.yaml @@ -32,6 +32,10 @@ properties: format: "uuid" description: Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system. example: "1a901a90-1a90-1a90-1a90-1a901a901a90" + billing_entity_code: + type: string + example: "default" + description: The code of the billing entity associated with the wallet transaction. Falls back to the wallet's billing entity when the transaction does not carry one. lago_invoice_id: type: - string diff --git a/src/schemas/WalletUpdateInput.yaml b/src/schemas/WalletUpdateInput.yaml index 38bd22ff..75b6cabe 100644 --- a/src/schemas/WalletUpdateInput.yaml +++ b/src/schemas/WalletUpdateInput.yaml @@ -34,6 +34,18 @@ properties: type: boolean description: A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. example: false + paid_top_up_min_amount_cents: + type: + - integer + - "null" + description: Minimum amount of cents that can be top-up with a single paid transaction. + example: 100 + paid_top_up_max_amount_cents: + type: + - integer + - "null" + description: Maximum amount of cents that can be top-up with a single paid transaction. + example: 1000 billing_entity_code: type: string example: "default"