From 4c7cecf7f681181f37a7355b866db75611ea8315 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:29:39 +0000 Subject: [PATCH] feat(client): add more builder convenience methods for lists (#304) --- .../api/models/BulkRequestCreateParams.kt | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/models/BulkRequestCreateParams.kt b/modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/models/BulkRequestCreateParams.kt index 815404b8..2c68981b 100644 --- a/modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/models/BulkRequestCreateParams.kt +++ b/modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/models/BulkRequestCreateParams.kt @@ -229,6 +229,96 @@ constructor( } } + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + paymentOrderAsyncCreateRequest: Resource.PaymentOrderAsyncCreateRequest + ) = + addResource( + Resource.ofPaymentOrderAsyncCreateRequest(paymentOrderAsyncCreateRequest) + ) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(expectedPaymentCreateRequest: Resource.ExpectedPaymentCreateRequest) = + addResource(Resource.ofExpectedPaymentCreateRequest(expectedPaymentCreateRequest)) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + ledgerTransactionCreateRequest: Resource.LedgerTransactionCreateRequest + ) = + addResource( + Resource.ofLedgerTransactionCreateRequest(ledgerTransactionCreateRequest) + ) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(transactionCreateRequest: Resource.TransactionCreateRequest) = + addResource(Resource.ofTransactionCreateRequest(transactionCreateRequest)) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(id: Resource.Id) = addResource(Resource.ofId(id)) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + paymentOrderUpdateRequestWithId: Resource.PaymentOrderUpdateRequestWithId + ) = + addResource( + Resource.ofPaymentOrderUpdateRequestWithId(paymentOrderUpdateRequestWithId) + ) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + expectedPaymentUpdateRequestWithId: Resource.ExpectedPaymentUpdateRequestWithId + ) = + addResource( + Resource.ofExpectedPaymentUpdateRequestWithId( + expectedPaymentUpdateRequestWithId + ) + ) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + transactionUpdateRequestWithId: Resource.TransactionUpdateRequestWithId + ) = + addResource( + Resource.ofTransactionUpdateRequestWithId(transactionUpdateRequestWithId) + ) + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + ledgerTransactionUpdateRequestWithId: Resource.LedgerTransactionUpdateRequestWithId + ) = + addResource( + Resource.ofLedgerTransactionUpdateRequestWithId( + ledgerTransactionUpdateRequestWithId + ) + ) + /** * Additional data represented as key-value pairs. Both the key and value must be * strings. @@ -342,6 +432,81 @@ constructor( */ fun addResource(resource: Resource) = apply { body.addResource(resource) } + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(paymentOrderAsyncCreateRequest: Resource.PaymentOrderAsyncCreateRequest) = + apply { + body.addResource(paymentOrderAsyncCreateRequest) + } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(expectedPaymentCreateRequest: Resource.ExpectedPaymentCreateRequest) = + apply { + body.addResource(expectedPaymentCreateRequest) + } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(ledgerTransactionCreateRequest: Resource.LedgerTransactionCreateRequest) = + apply { + body.addResource(ledgerTransactionCreateRequest) + } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(transactionCreateRequest: Resource.TransactionCreateRequest) = apply { + body.addResource(transactionCreateRequest) + } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(id: Resource.Id) = apply { body.addResource(id) } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(paymentOrderUpdateRequestWithId: Resource.PaymentOrderUpdateRequestWithId) = + apply { + body.addResource(paymentOrderUpdateRequestWithId) + } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + expectedPaymentUpdateRequestWithId: Resource.ExpectedPaymentUpdateRequestWithId + ) = apply { body.addResource(expectedPaymentUpdateRequestWithId) } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource(transactionUpdateRequestWithId: Resource.TransactionUpdateRequestWithId) = + apply { + body.addResource(transactionUpdateRequestWithId) + } + + /** + * An array of objects where each object contains the input params for a single + * `action_type` request on a `resource_type` resource + */ + fun addResource( + ledgerTransactionUpdateRequestWithId: Resource.LedgerTransactionUpdateRequestWithId + ) = apply { body.addResource(ledgerTransactionUpdateRequestWithId) } + /** * Additional data represented as key-value pairs. Both the key and value must be strings. */