From a5bedf78c1ba4f41ea0a0e6c7ed88f4f377b7f4b Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 3 Jun 2025 10:44:37 +0000 Subject: [PATCH 1/3] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.555.0 --- .speakeasy/gen.lock | 122 ++++++++++++++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +- README.md | 4 +- RELEASES.md | 12 +- build.gradle | 2 +- .../components/CollectionNoCursorRefund.md | 8 - docs/models/operations/AddBuyerRequest.md | 1 + .../AddBuyerShippingDetailsRequest.md | 1 + .../operations/CaptureTransactionRequest.md | 1 + .../ConfigureDigitalWalletRequest.md | 1 + .../CreateAccountUpdaterJobRequest.md | 1 + ...eateApplePayDigitalWalletSessionRequest.md | 1 + .../CreateCheckoutSessionRequest.md | 1 + ...teClickToPayDigitalWalletSessionRequest.md | 9 ++ .../CreateFullTransactionRefundRequest.md | 1 + .../CreateFullTransactionRefundResponse.md | 2 +- .../operations/CreateGiftCardRequest.md | 1 + ...ateGooglePayDigitalWalletSessionRequest.md | 1 + .../CreateMerchantAccountRequest.md | 9 ++ ...mentMethodNetworkTokenCryptogramRequest.md | 1 + .../CreatePaymentMethodNetworkTokenRequest.md | 1 + ...PaymentMethodPaymentServiceTokenRequest.md | 1 + .../operations/CreatePaymentMethodRequest.md | 1 + ...ePaymentServiceDefinitionSessionRequest.md | 1 + .../operations/CreatePaymentServiceRequest.md | 1 + .../CreatePaymentServiceSessionRequest.md | 1 + docs/models/operations/CreatePayoutRequest.md | 1 + .../CreateTransactionRefundRequest.md | 1 + .../operations/CreateTransactionRequest.md | 1 + docs/models/operations/DeleteBuyerRequest.md | 1 + .../DeleteBuyerShippingDetailsRequest.md | 1 + .../DeleteCheckoutSessionRequest.md | 1 + .../operations/DeleteDigitalWalletRequest.md | 1 + .../operations/DeleteGiftCardRequest.md | 1 + .../DeletePaymentMethodNetworkTokenRequest.md | 1 + ...PaymentMethodPaymentServiceTokenRequest.md | 1 + .../operations/DeletePaymentMethodRequest.md | 1 + .../operations/DeletePaymentServiceRequest.md | 1 + docs/models/operations/GetBuyerRequest.md | 1 + .../GetBuyerShippingDetailsRequest.md | 1 + .../operations/GetCheckoutSessionRequest.md | 1 + .../operations/GetDigitalWalletRequest.md | 1 + docs/models/operations/GetGiftCardRequest.md | 1 + .../operations/GetMerchantAccountRequest.md | 3 +- .../operations/GetPaymentMethodRequest.md | 1 + .../GetPaymentServiceDefinitionRequest.md | 3 +- .../operations/GetPaymentServiceRequest.md | 1 + docs/models/operations/GetPayoutRequest.md | 1 + docs/models/operations/GetRefundRequest.md | 1 + .../operations/GetTransactionRefundRequest.md | 1 + .../operations/GetTransactionRequest.md | 1 + .../models/operations/ListAuditLogsRequest.md | 1 + .../operations/ListBuyerGiftCardsRequest.md | 1 + .../ListBuyerPaymentMethodsRequest.md | 1 + .../ListBuyerShippingDetailsRequest.md | 1 + docs/models/operations/ListBuyersRequest.md | 1 + .../ListCardSchemeDefinitionsRequest.md | 1 + .../operations/ListDigitalWalletsRequest.md | 1 + .../operations/ListGiftCardBalancesRequest.md | 1 + .../models/operations/ListGiftCardsRequest.md | 1 + .../operations/ListMerchantAccountsRequest.md | 3 +- .../ListPaymentMethodNetworkTokensRequest.md | 1 + ...aymentMethodPaymentServiceTokensRequest.md | 1 + .../operations/ListPaymentMethodsRequest.md | 1 + .../operations/ListPaymentOptionsRequest.md | 1 + .../ListPaymentServiceDefinitionsRequest.md | 3 +- .../operations/ListPaymentServicesRequest.md | 1 + docs/models/operations/ListPayoutsRequest.md | 1 + .../ListTransactionEventsRequest.md | 1 + .../ListTransactionRefundsRequest.md | 1 + .../operations/ListTransactionsRequest.md | 1 + .../RegisterDigitalWalletDomainRequest.md | 1 + .../ResumePaymentMethodNetworkTokenRequest.md | 1 + ...SuspendPaymentMethodNetworkTokenRequest.md | 1 + .../operations/SyncTransactionRequest.md | 1 + .../UnregisterDigitalWalletDomainRequest.md | 1 + docs/models/operations/UpdateBuyerRequest.md | 1 + .../UpdateBuyerShippingDetailsRequest.md | 1 + .../UpdateCheckoutSessionRequest.md | 1 + .../operations/UpdateDigitalWalletRequest.md | 1 + .../UpdateMerchantAccountRequest.md | 1 + .../operations/UpdatePaymentServiceRequest.md | 1 + .../VerifyPaymentServiceCredentialsRequest.md | 1 + .../operations/VoidTransactionRequest.md | 1 + docs/sdks/all/README.md | 3 +- docs/sdks/balances/README.md | 1 + docs/sdks/buyers/README.md | 4 + docs/sdks/buyersgiftcards/README.md | 1 + docs/sdks/cardschemedefinitions/README.md | 1 + docs/sdks/checkoutsessions/README.md | 4 + docs/sdks/cryptogram/README.md | 16 +- docs/sdks/digitalwallets/README.md | 5 + docs/sdks/domains/README.md | 2 + docs/sdks/events/README.md | 16 +- docs/sdks/giftcards/README.md | 3 + docs/sdks/jobs/README.md | 1 + docs/sdks/merchantaccounts/README.md | 58 +++---- docs/sdks/networktokens/README.md | 5 + docs/sdks/paymentmethods/README.md | 3 + docs/sdks/paymentoptions/README.md | 1 + docs/sdks/paymentservicedefinitions/README.md | 3 + docs/sdks/paymentservices/README.md | 6 + docs/sdks/paymentservicetokens/README.md | 3 + docs/sdks/payouts/README.md | 3 + docs/sdks/refunds/README.md | 1 + docs/sdks/sessions/README.md | 17 +- docs/sdks/shippingdetails/README.md | 20 ++- docs/sdks/transactions/README.md | 5 + docs/sdks/transactionsrefunds/README.md | 3 + gradle.properties | 2 +- src/main/java/com/gr4vy/sdk/All.java | 18 ++- src/main/java/com/gr4vy/sdk/AuditLogs.java | 1 + src/main/java/com/gr4vy/sdk/Balances.java | 10 +- src/main/java/com/gr4vy/sdk/Buyers.java | 41 ++++- .../java/com/gr4vy/sdk/BuyersGiftCards.java | 5 +- .../com/gr4vy/sdk/CardSchemeDefinitions.java | 10 +- .../java/com/gr4vy/sdk/CheckoutSessions.java | 40 ++++- src/main/java/com/gr4vy/sdk/Cryptogram.java | 46 +----- .../java/com/gr4vy/sdk/DigitalWallets.java | 50 +++++- src/main/java/com/gr4vy/sdk/Domains.java | 20 ++- src/main/java/com/gr4vy/sdk/Events.java | 27 +--- src/main/java/com/gr4vy/sdk/GiftCards.java | 31 +++- src/main/java/com/gr4vy/sdk/Jobs.java | 10 +- .../java/com/gr4vy/sdk/MerchantAccounts.java | 79 +++++++++- .../java/com/gr4vy/sdk/NetworkTokens.java | 50 +++++- .../java/com/gr4vy/sdk/PaymentMethods.java | 31 +++- .../java/com/gr4vy/sdk/PaymentOptions.java | 10 +- .../gr4vy/sdk/PaymentServiceDefinitions.java | 42 ++++- .../com/gr4vy/sdk/PaymentServiceTokens.java | 25 ++- .../java/com/gr4vy/sdk/PaymentServices.java | 61 +++++++- src/main/java/com/gr4vy/sdk/Payouts.java | 26 +++- src/main/java/com/gr4vy/sdk/Refunds.java | 10 +- .../java/com/gr4vy/sdk/SDKConfiguration.java | 4 +- src/main/java/com/gr4vy/sdk/Sessions.java | 57 ++++++- .../java/com/gr4vy/sdk/ShippingDetails.java | 85 +++++----- src/main/java/com/gr4vy/sdk/Transactions.java | 51 +++++- .../com/gr4vy/sdk/TransactionsRefunds.java | 30 +++- .../components/CollectionNoCursorRefund.java | 99 ------------ .../models/operations/AddBuyerRequest.java | 55 ++++++- .../operations/AddBuyerRequestBuilder.java | 30 +++- .../AddBuyerShippingDetailsRequest.java | 55 ++++++- ...AddBuyerShippingDetailsRequestBuilder.java | 30 +++- .../operations/CaptureTransactionRequest.java | 55 ++++++- .../CaptureTransactionRequestBuilder.java | 30 +++- .../ConfigureDigitalWalletRequest.java | 55 ++++++- .../ConfigureDigitalWalletRequestBuilder.java | 30 +++- .../CreateAccountUpdaterJobRequest.java | 55 ++++++- ...CreateAccountUpdaterJobRequestBuilder.java | 30 +++- ...teApplePayDigitalWalletSessionRequest.java | 55 ++++++- ...PayDigitalWalletSessionRequestBuilder.java | 30 +++- .../CreateCheckoutSessionRequest.java | 54 ++++++- .../CreateCheckoutSessionRequestBuilder.java | 29 +++- ...ClickToPayDigitalWalletSessionRequest.java | 145 ++++++++++++++++++ ...PayDigitalWalletSessionRequestBuilder.java | 41 ++++- .../CreateFullTransactionRefundRequest.java | 55 ++++++- ...teFullTransactionRefundRequestBuilder.java | 30 +++- .../CreateFullTransactionRefundResponse.java | 48 +++--- .../operations/CreateGiftCardRequest.java | 55 ++++++- .../CreateGiftCardRequestBuilder.java | 30 +++- ...eGooglePayDigitalWalletSessionRequest.java | 55 ++++++- ...PayDigitalWalletSessionRequestBuilder.java | 30 +++- .../CreateMerchantAccountRequest.java | 145 ++++++++++++++++++ .../CreateMerchantAccountRequestBuilder.java | 41 ++++- ...ntMethodNetworkTokenCryptogramRequest.java | 55 ++++++- ...dNetworkTokenCryptogramRequestBuilder.java | 43 +----- ...reatePaymentMethodNetworkTokenRequest.java | 55 ++++++- ...ymentMethodNetworkTokenRequestBuilder.java | 30 +++- ...ymentMethodPaymentServiceTokenRequest.java | 55 ++++++- ...thodPaymentServiceTokenRequestBuilder.java | 30 +++- .../CreatePaymentMethodRequest.java | 55 ++++++- .../CreatePaymentMethodRequestBuilder.java | 30 +++- ...aymentServiceDefinitionSessionRequest.java | 59 +++++++ ...erviceDefinitionSessionRequestBuilder.java | 30 +++- .../CreatePaymentServiceRequest.java | 55 ++++++- .../CreatePaymentServiceRequestBuilder.java | 30 +++- .../CreatePaymentServiceSessionRequest.java | 55 ++++++- ...tePaymentServiceSessionRequestBuilder.java | 30 +++- .../operations/CreatePayoutRequest.java | 55 ++++++- .../CreatePayoutRequestBuilder.java | 30 +++- .../CreateTransactionRefundRequest.java | 55 ++++++- ...CreateTransactionRefundRequestBuilder.java | 30 +++- .../operations/CreateTransactionRequest.java | 55 ++++++- .../CreateTransactionRequestBuilder.java | 30 +++- .../models/operations/DeleteBuyerRequest.java | 55 ++++++- .../operations/DeleteBuyerRequestBuilder.java | 30 +++- .../DeleteBuyerShippingDetailsRequest.java | 55 ++++++- ...eteBuyerShippingDetailsRequestBuilder.java | 30 +++- .../DeleteCheckoutSessionRequest.java | 55 ++++++- .../DeleteCheckoutSessionRequestBuilder.java | 30 +++- .../DeleteDigitalWalletRequest.java | 55 ++++++- .../DeleteDigitalWalletRequestBuilder.java | 30 +++- .../operations/DeleteGiftCardRequest.java | 55 ++++++- .../DeleteGiftCardRequestBuilder.java | 30 +++- ...eletePaymentMethodNetworkTokenRequest.java | 55 ++++++- ...ymentMethodNetworkTokenRequestBuilder.java | 30 +++- ...ymentMethodPaymentServiceTokenRequest.java | 55 ++++++- ...thodPaymentServiceTokenRequestBuilder.java | 30 +++- .../DeletePaymentMethodRequest.java | 55 ++++++- .../DeletePaymentMethodRequestBuilder.java | 30 +++- .../DeletePaymentServiceRequest.java | 55 ++++++- .../DeletePaymentServiceRequestBuilder.java | 30 +++- .../models/operations/GetBuyerRequest.java | 55 ++++++- .../operations/GetBuyerRequestBuilder.java | 29 +++- .../GetBuyerShippingDetailsRequest.java | 55 ++++++- ...GetBuyerShippingDetailsRequestBuilder.java | 29 +++- .../operations/GetCheckoutSessionRequest.java | 55 ++++++- .../GetCheckoutSessionRequestBuilder.java | 29 +++- .../operations/GetDigitalWalletRequest.java | 55 ++++++- .../GetDigitalWalletRequestBuilder.java | 29 +++- .../models/operations/GetGiftCardRequest.java | 55 ++++++- .../operations/GetGiftCardRequestBuilder.java | 29 +++- .../operations/GetMerchantAccountRequest.java | 68 +++++++- .../GetMerchantAccountRequestBuilder.java | 29 +++- .../operations/GetPaymentMethodRequest.java | 55 ++++++- .../GetPaymentMethodRequestBuilder.java | 29 +++- .../GetPaymentServiceDefinitionRequest.java | 68 +++++++- ...aymentServiceDefinitionRequestBuilder.java | 29 +++- .../operations/GetPaymentServiceRequest.java | 55 ++++++- .../GetPaymentServiceRequestBuilder.java | 29 +++- .../models/operations/GetPayoutRequest.java | 55 ++++++- .../operations/GetPayoutRequestBuilder.java | 29 +++- .../models/operations/GetRefundRequest.java | 55 ++++++- .../operations/GetRefundRequestBuilder.java | 29 +++- .../GetTransactionRefundRequest.java | 55 ++++++- .../GetTransactionRefundRequestBuilder.java | 29 +++- .../operations/GetTransactionRequest.java | 55 ++++++- .../GetTransactionRequestBuilder.java | 29 +++- .../operations/ListAuditLogsRequest.java | 52 ++++++- .../operations/ListBuyerGiftCardsRequest.java | 55 ++++++- .../ListBuyerGiftCardsRequestBuilder.java | 29 +++- .../ListBuyerPaymentMethodsRequest.java | 52 ++++++- .../ListBuyerShippingDetailsRequest.java | 55 ++++++- ...istBuyerShippingDetailsRequestBuilder.java | 29 +++- .../models/operations/ListBuyersRequest.java | 52 ++++++- .../ListCardSchemeDefinitionsRequest.java | 55 ++++++- ...stCardSchemeDefinitionsRequestBuilder.java | 29 +++- .../operations/ListDigitalWalletsRequest.java | 55 ++++++- .../ListDigitalWalletsRequestBuilder.java | 29 +++- .../ListGiftCardBalancesRequest.java | 55 ++++++- .../ListGiftCardBalancesRequestBuilder.java | 30 +++- .../operations/ListGiftCardsRequest.java | 52 ++++++- .../ListMerchantAccountsRequest.java | 62 +++++++- .../ListMerchantAccountsRequestBuilder.java | 26 ++++ ...ListPaymentMethodNetworkTokensRequest.java | 55 ++++++- ...mentMethodNetworkTokensRequestBuilder.java | 29 +++- ...mentMethodPaymentServiceTokensRequest.java | 55 ++++++- ...hodPaymentServiceTokensRequestBuilder.java | 29 +++- .../operations/ListPaymentMethodsRequest.java | 52 ++++++- .../operations/ListPaymentOptionsRequest.java | 55 ++++++- .../ListPaymentOptionsRequestBuilder.java | 30 +++- .../ListPaymentServiceDefinitionsRequest.java | 62 +++++++- ...ymentServiceDefinitionsRequestBuilder.java | 26 ++++ .../ListPaymentServicesRequest.java | 52 ++++++- .../models/operations/ListPayoutsRequest.java | 52 ++++++- .../operations/ListPayoutsRequestBuilder.java | 26 ++++ .../ListTransactionEventsRequest.java | 52 ++++++- .../ListTransactionEventsRequestBuilder.java | 70 +-------- .../ListTransactionRefundsRequest.java | 55 ++++++- .../ListTransactionRefundsRequestBuilder.java | 29 +++- .../operations/ListTransactionsRequest.java | 52 ++++++- .../RegisterDigitalWalletDomainRequest.java | 55 ++++++- ...sterDigitalWalletDomainRequestBuilder.java | 30 +++- ...esumePaymentMethodNetworkTokenRequest.java | 55 ++++++- ...ymentMethodNetworkTokenRequestBuilder.java | 30 +++- .../operations/SDKMethodInterfaces.java | 88 +++++++++-- ...spendPaymentMethodNetworkTokenRequest.java | 55 ++++++- ...ymentMethodNetworkTokenRequestBuilder.java | 30 +++- .../operations/SyncTransactionRequest.java | 55 ++++++- .../SyncTransactionRequestBuilder.java | 30 +++- .../UnregisterDigitalWalletDomainRequest.java | 55 ++++++- ...sterDigitalWalletDomainRequestBuilder.java | 30 +++- .../models/operations/UpdateBuyerRequest.java | 55 ++++++- .../operations/UpdateBuyerRequestBuilder.java | 30 +++- .../UpdateBuyerShippingDetailsRequest.java | 55 ++++++- ...ateBuyerShippingDetailsRequestBuilder.java | 43 +----- .../UpdateCheckoutSessionRequest.java | 55 ++++++- .../UpdateCheckoutSessionRequestBuilder.java | 30 +++- .../UpdateDigitalWalletRequest.java | 55 ++++++- .../UpdateDigitalWalletRequestBuilder.java | 30 +++- .../UpdateMerchantAccountRequest.java | 59 +++++++ .../UpdateMerchantAccountRequestBuilder.java | 30 +++- .../UpdatePaymentServiceRequest.java | 55 ++++++- .../UpdatePaymentServiceRequestBuilder.java | 30 +++- ...erifyPaymentServiceCredentialsRequest.java | 55 ++++++- ...ymentServiceCredentialsRequestBuilder.java | 30 +++- .../operations/VoidTransactionRequest.java | 55 ++++++- .../VoidTransactionRequestBuilder.java | 30 +++- 288 files changed, 7437 insertions(+), 712 deletions(-) delete mode 100644 docs/models/components/CollectionNoCursorRefund.md create mode 100644 docs/models/operations/CreateClickToPayDigitalWalletSessionRequest.md create mode 100644 docs/models/operations/CreateMerchantAccountRequest.md delete mode 100644 src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorRefund.java create mode 100644 src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequest.java create mode 100644 src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequest.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f2d1efe9..5d8ae620 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 5bbaa3a9-baa0-471b-ba6a-13fd88e8c119 management: - docChecksum: fa78a4fc643f1b73e1f52fea1820c023 + docChecksum: 85ba7707907d8021dc9141b223acede6 docVersion: 1.0.0 - speakeasyVersion: 1.554.1 - generationVersion: 2.616.1 - releaseVersion: 1.0.0-beta.3 - configChecksum: 2787e0e4d2d82946d30f146f8dd114ce + speakeasyVersion: 1.555.0 + generationVersion: 2.618.0 + releaseVersion: 1.0.0-beta.4 + configChecksum: 353f214a9f22051e9829006a837efd05 repoURL: https://github.com/gr4vy/gr4vy-java.git published: true features: @@ -86,7 +86,6 @@ generatedFiles: - docs/models/components/CollectionNoCursorPaymentMethodSummary.md - docs/models/components/CollectionNoCursorPaymentOption.md - docs/models/components/CollectionNoCursorPaymentServiceToken.md - - docs/models/components/CollectionNoCursorRefund.md - docs/models/components/CollectionNoCursorShippingDetails.md - docs/models/components/CollectionPaymentMethod.md - docs/models/components/CollectionPaymentService.md @@ -254,6 +253,7 @@ generatedFiles: - docs/models/operations/CreateApplePayDigitalWalletSessionResponse.md - docs/models/operations/CreateCheckoutSessionRequest.md - docs/models/operations/CreateCheckoutSessionResponse.md + - docs/models/operations/CreateClickToPayDigitalWalletSessionRequest.md - docs/models/operations/CreateClickToPayDigitalWalletSessionResponse.md - docs/models/operations/CreateFullTransactionRefundRequest.md - docs/models/operations/CreateFullTransactionRefundResponse.md @@ -261,6 +261,7 @@ generatedFiles: - docs/models/operations/CreateGiftCardResponse.md - docs/models/operations/CreateGooglePayDigitalWalletSessionRequest.md - docs/models/operations/CreateGooglePayDigitalWalletSessionResponse.md + - docs/models/operations/CreateMerchantAccountRequest.md - docs/models/operations/CreateMerchantAccountResponse.md - docs/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.md - docs/models/operations/CreatePaymentMethodNetworkTokenCryptogramResponse.md @@ -512,7 +513,6 @@ generatedFiles: - src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorPaymentMethodSummary.java - src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorPaymentOption.java - src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorPaymentServiceToken.java - - src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorRefund.java - src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorShippingDetails.java - src/main/java/com/gr4vy/sdk/models/components/CollectionPaymentMethod.java - src/main/java/com/gr4vy/sdk/models/components/CollectionPaymentService.java @@ -689,6 +689,7 @@ generatedFiles: - src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequest.java - src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequestBuilder.java - src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionResponse.java + - src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequest.java - src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequestBuilder.java - src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionResponse.java - src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequest.java @@ -700,6 +701,7 @@ generatedFiles: - src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequest.java - src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequestBuilder.java - src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionResponse.java + - src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequest.java - src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequestBuilder.java - src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountResponse.java - src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.java @@ -951,6 +953,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -990,6 +993,7 @@ examples: limit: 20 search: "John" external_identifier: "buyer-12345" + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1024,6 +1028,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1060,6 +1065,8 @@ examples: parameters: path: buyer_id: "fe26475d-ec3e-4884-9553-f7356683f7f9" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1096,6 +1103,7 @@ examples: buyer_id: "fe26475d-ec3e-4884-9553-f7356683f7f9" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1134,6 +1142,7 @@ examples: buyer_id: "fe26475d-ec3e-4884-9553-f7356683f7f9" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1171,6 +1180,7 @@ examples: order_by: "desc" country: "US" currency: "USD" + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1205,6 +1215,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1241,6 +1252,7 @@ examples: buyer_id: "fe26475d-ec3e-4884-9553-f7356683f7f9" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1277,6 +1289,8 @@ examples: parameters: path: buyer_id: "fe26475d-ec3e-4884-9553-f7356683f7f9" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1312,6 +1326,8 @@ examples: path: buyer_id: "fe26475d-ec3e-4884-9553-f7356683f7f9" shipping_details_id: "bf8c36ad-02d9-4904-b0f9-a230b149e341" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1349,6 +1365,7 @@ examples: shipping_details_id: "bf8c36ad-02d9-4904-b0f9-a230b149e341" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1388,6 +1405,7 @@ examples: shipping_details_id: "bf8c36ad-02d9-4904-b0f9-a230b149e341" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1426,6 +1444,7 @@ examples: buyer_id: "fe26475d-ec3e-4884-9553-f7356683f7f9" buyer_external_identifier: "buyer-12345" external_identifier: "payment-method-12345" + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1460,6 +1479,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1496,6 +1516,8 @@ examples: parameters: path: payment_method_id: "ef9496d8-53a5-4aad-8ca2-00eb68334389" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1530,6 +1552,8 @@ examples: parameters: path: payment_method_id: "ef9496d8-53a5-4aad-8ca2-00eb68334389" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1564,6 +1588,7 @@ examples: payment_method_id: "ef9496d8-53a5-4aad-8ca2-00eb68334389" query: payment_service_id: "fffd152a-9532-4087-9a4f-de58754210f0" + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1600,6 +1625,7 @@ examples: payment_method_id: "ef9496d8-53a5-4aad-8ca2-00eb68334389" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1639,6 +1665,7 @@ examples: payment_service_token_id: "703f2d99-3fd1-44bc-9cbd-a25a2d597886" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1671,6 +1698,8 @@ examples: parameters: path: payment_method_id: "ef9496d8-53a5-4aad-8ca2-00eb68334389" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1707,6 +1736,7 @@ examples: payment_method_id: "ef9496d8-53a5-4aad-8ca2-00eb68334389" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1746,6 +1776,7 @@ examples: network_token_id: "f8dd5cfc-7834-4847-95dc-f75a360e2298" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1783,6 +1814,7 @@ examples: network_token_id: "f8dd5cfc-7834-4847-95dc-f75a360e2298" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1820,6 +1852,7 @@ examples: network_token_id: "f8dd5cfc-7834-4847-95dc-f75a360e2298" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1855,6 +1888,7 @@ examples: network_token_id: "f8dd5cfc-7834-4847-95dc-f75a360e2298" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1891,6 +1925,8 @@ examples: parameters: path: gift_card_id: "356d56e5-fe16-42ae-97ee-8d55d846ae2e" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1927,6 +1963,7 @@ examples: gift_card_id: "356d56e5-fe16-42ae-97ee-8d55d846ae2e" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -1961,6 +1998,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -1997,6 +2035,7 @@ examples: parameters: query: limit: 20 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2031,6 +2070,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2065,6 +2105,8 @@ examples: list_card_scheme_definitions: speakeasy-default-list-card-scheme-definitions: parameters: + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2099,6 +2141,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2133,6 +2176,8 @@ examples: list_digital_wallets: speakeasy-default-list-digital-wallets: parameters: + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2167,6 +2212,8 @@ examples: parameters: path: digital_wallet_id: "1808f5e6-b49c-4db9-94fa-22371ea352f5" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2203,6 +2250,7 @@ examples: digital_wallet_id: "1808f5e6-b49c-4db9-94fa-22371ea352f5" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2239,6 +2287,7 @@ examples: digital_wallet_id: "1808f5e6-b49c-4db9-94fa-22371ea352f5" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2273,6 +2322,8 @@ examples: create_google_pay_digital_wallet_session: speakeasy-default-create-google-pay-digital-wallet-session: parameters: + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2307,6 +2358,8 @@ examples: create_apple_pay_digital_wallet_session: speakeasy-default-create-apple-pay-digital-wallet-session: parameters: + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2340,6 +2393,9 @@ examples: application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed", "details": [{"location": "path", "pointer": "", "message": "Unknown ISO 4217 currency code: USX", "type": "value_error"}, {"location": "path", "pointer": "", "message": "Unknown ISO 4217 currency code: USX", "type": "value_error"}, {"location": "path", "pointer": "", "message": "Unknown ISO 4217 currency code: USX", "type": "value_error"}]} create_click_to_pay_digital_wallet_session: speakeasy-default-create-click-to-pay-digital-wallet-session: + parameters: + query: + application_name: "core-api" requestBody: application/json: {"checkout_session_id": "4137b1cf-39ac-42a8-bad6-1c680d5dab6b"} responses: @@ -2376,6 +2432,7 @@ examples: digital_wallet_id: "1808f5e6-b49c-4db9-94fa-22371ea352f5" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2414,6 +2471,7 @@ examples: digital_wallet_id: "" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2492,6 +2550,7 @@ examples: payment_method_scheme: "[\"visa\"]" payment_method_country: "[\"US\"]" used_3ds: true + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2526,6 +2585,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" idempotency-key: "request-12345" @@ -2563,6 +2623,8 @@ examples: parameters: path: transaction_id: "7099948d-7286-47e4-aad8-b68f7eb44591" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2599,6 +2661,7 @@ examples: transaction_id: "7099948d-7286-47e4-aad8-b68f7eb44591" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2637,6 +2700,7 @@ examples: transaction_id: "7099948d-7286-47e4-aad8-b68f7eb44591" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2707,6 +2771,7 @@ examples: transaction_id: "2ee546e0-3b11-478e-afec-fdb362611e22" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2741,6 +2806,8 @@ examples: parameters: path: transaction_id: "7099948d-7286-47e4-aad8-b68f7eb44591" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2777,6 +2844,7 @@ examples: transaction_id: "7099948d-7286-47e4-aad8-b68f7eb44591" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2814,6 +2882,8 @@ examples: path: transaction_id: "7099948d-7286-47e4-aad8-b68f7eb44591" refund_id: "6a1d4e46-14ed-4fe1-a45f-eff4e025d211" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2850,13 +2920,14 @@ examples: transaction_id: "7099948d-7286-47e4-aad8-b68f7eb44591" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: application/json: {"reason": "Refund due to user request.", "external_identifier": "refund-12345"} responses: "201": - application/json: {"items": [{"type": "refund", "id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211", "transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591", "payment_service_refund_id": "refund_xYqd43gySMtori", "status": "failed", "currency": "EUR", "amount": 1299, "reason": "Refund due to user request.", "target_type": "payment-method", "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt", "external_identifier": "refund-12345", "transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn", "transaction_external_identifier": "transaction-12345", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "creator": {"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "name": "Jhon Doe", "email_address": "jhon.doe@gr4vy.com"}}, {"type": "refund", "id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211", "transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591", "payment_service_refund_id": "refund_xYqd43gySMtori", "status": "failed", "currency": "EUR", "amount": 1299, "reason": "Refund due to user request.", "target_type": "payment-method", "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt", "external_identifier": "refund-12345", "transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn", "transaction_external_identifier": "transaction-12345", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "creator": {"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "name": "Jhon Doe", "email_address": "jhon.doe@gr4vy.com"}}, {"type": "refund", "id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211", "transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591", "payment_service_refund_id": "refund_xYqd43gySMtori", "status": "failed", "currency": "EUR", "amount": 1299, "reason": "Refund due to user request.", "target_type": "payment-method", "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt", "external_identifier": "refund-12345", "transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn", "transaction_external_identifier": "transaction-12345", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "creator": {"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "name": "Jhon Doe", "email_address": "jhon.doe@gr4vy.com"}}]} + application/json: {"items": [{"type": "refund", "id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211", "transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591", "payment_service_refund_id": "refund_xYqd43gySMtori", "status": "failed", "currency": "EUR", "amount": 1299, "reason": "Refund due to user request.", "target_type": "payment-method", "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt", "external_identifier": "refund-12345", "transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn", "transaction_external_identifier": "transaction-12345", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "creator": {"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "name": "Jhon Doe", "email_address": "jhon.doe@gr4vy.com"}}, {"type": "refund", "id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211", "transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591", "payment_service_refund_id": "refund_xYqd43gySMtori", "status": "failed", "currency": "EUR", "amount": 1299, "reason": "Refund due to user request.", "target_type": "payment-method", "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt", "external_identifier": "refund-12345", "transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn", "transaction_external_identifier": "transaction-12345", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "creator": {"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "name": "Jhon Doe", "email_address": "jhon.doe@gr4vy.com"}}, {"type": "refund", "id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211", "transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591", "payment_service_refund_id": "refund_xYqd43gySMtori", "status": "failed", "currency": "EUR", "amount": 1299, "reason": "Refund due to user request.", "target_type": "payment-method", "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt", "external_identifier": "refund-12345", "transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn", "transaction_external_identifier": "transaction-12345", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "creator": {"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "name": "Jhon Doe", "email_address": "jhon.doe@gr4vy.com"}}], "limit": 20, "next_cursor": "ZXhhbXBsZTE", "previous_cursor": "Xkjss7asS"} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation", "details": [{"location": "header", "pointer": "", "message": "Unknown ISO 4217 currency code: USX", "type": "value_error"}]} "401": @@ -2886,6 +2957,8 @@ examples: parameters: path: refund_id: "6a1d4e46-14ed-4fe1-a45f-eff4e025d211" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -2918,6 +2991,8 @@ examples: list_payment_options: speakeasy-default-list-payment-options: parameters: + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -2955,6 +3030,7 @@ examples: query: cursor: "ZXhhbXBsZTE" limit: 20 + application_name: "core-api" responses: "200": application/json: {"items": [], "limit": 20, "next_cursor": "ZXhhbXBsZTE", "previous_cursor": "Xkjss7asS"} @@ -2987,6 +3063,8 @@ examples: parameters: path: payment_service_definition_id: "adyen-ideal" + query: + application_name: "core-api" responses: "200": application/json: {"id": "adyen-ideal", "type": "payment-service-definition", "display_name": "iDEAL", "method": "multibanco", "fields": [{"key": "private_api_key", "display_name": "Private API key", "required": true, "format": "boolean", "secret": true}], "reporting_fields": [{"key": "private_api_key", "display_name": "Private API key", "required": true, "format": "multiline", "secret": true}, {"key": "private_api_key", "display_name": "Private API key", "required": true, "format": "multiline", "secret": true}], "supported_currencies": ["USD", "GBP", "EUR", "AUD"], "supported_countries": ["US"], "mode": "card", "icon_url": "https://example.com/icons/adyen-ideal.svg", "supported_features": {"key": true, "key1": false}, "required_checkout_fields": [{"required_fields": ["address.line1", "address.country", "address.city", "address.postal_code"], "conditions": {"country": ["IN"]}}, {"required_fields": ["address.line1", "address.country", "address.city", "address.postal_code"], "conditions": {"country": ["IN"]}}, {"required_fields": ["address.line1", "address.country", "address.city", "address.postal_code"], "conditions": {"country": ["IN"]}}], "configuration": {"approval_ui_target": "any", "approval_ui_height": "100px", "approval_ui_width": "100px", "cart_items_limit": 100, "cart_items_required": true, "cart_items_should_match_amount": true}} @@ -3019,6 +3097,8 @@ examples: parameters: path: payment_service_definition_id: "adyen-ideal" + query: + application_name: "core-api" requestBody: application/json: {} responses: @@ -3055,6 +3135,7 @@ examples: cursor: "ZXhhbXBsZTE" limit: 20 deleted: true + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3087,6 +3168,8 @@ examples: update_payment_service: speakeasy-default-update-payment-service: parameters: + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -3123,6 +3206,8 @@ examples: parameters: path: payment_service_id: "fffd152a-9532-4087-9a4f-de58754210f0" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3157,6 +3242,8 @@ examples: parameters: path: payment_service_id: "fffd152a-9532-4087-9a4f-de58754210f0" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -3195,6 +3282,7 @@ examples: payment_service_id: "fffd152a-9532-4087-9a4f-de58754210f0" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3229,6 +3317,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -3265,6 +3354,8 @@ examples: parameters: path: payment_service_id: "fffd152a-9532-4087-9a4f-de58754210f0" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -3305,6 +3396,7 @@ examples: action: "created" user_id: "14b7b8c5-a6ba-4fb6-bbab-52d43c7f37ef" resource_type: "user" + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3339,6 +3431,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -3377,6 +3470,7 @@ examples: session_id: "4137b1cf-39ac-42a8-bad6-1c680d5dab6b" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -3415,6 +3509,7 @@ examples: session_id: "4137b1cf-39ac-42a8-bad6-1c680d5dab6b" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3449,6 +3544,7 @@ examples: session_id: "4137b1cf-39ac-42a8-bad6-1c680d5dab6b" query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3483,6 +3579,7 @@ examples: cursor: "ZXhhbXBsZTE" limit: 20 search: "merchant-12345" + application_name: "core-api" responses: "200": application/json: {"items": [], "limit": 20, "next_cursor": "ZXhhbXBsZTE", "previous_cursor": "Xkjss7asS"} @@ -3515,6 +3612,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" requestBody: application/json: {"account_updater_enabled": true, "account_updater_request_encryption_key": "key-1234", "account_updater_request_encryption_key_id": "key-id-1234", "account_updater_response_decryption_key": "key-1234", "account_updater_response_decryption_key_id": "key-id-1234", "over_capture_amount": 1299, "over_capture_percentage": 25, "loon_client_key": "client-key-1234", "loon_secret_key": "key-12345", "loon_accepted_schemes": ["visa"], "visa_network_tokens_requestor_id": "id-12345", "visa_network_tokens_app_id": "id-12345", "amex_network_tokens_requestor_id": "id-12345", "amex_network_tokens_app_id": "id-12345", "mastercard_network_tokens_requestor_id": "id-12345", "mastercard_network_tokens_app_id": "id-12345", "outbound_webhook_url": "https://example.com/callback", "outbound_webhook_username": "user-12345", "outbound_webhook_password": "password-12345", "id": "merchant-12345", "display_name": "Example"} responses: @@ -3549,6 +3647,8 @@ examples: parameters: path: merchant_account_id: "merchant-12345" + query: + application_name: "core-api" responses: "200": application/json: {"type": "merchant-account", "id": "merchant-12345", "display_name": "John Doe", "outbound_webhook_url": "https://example.com/callback", "outbound_webhook_username": "user-12345", "outbound_webhook_password": "password-12345", "loon_client_key": "client-key-1234", "loon_secret_key": "key-12345", "loon_accepted_schemes": ["visa"], "account_updater_request_encryption_key": "key-1234", "account_updater_request_encryption_key_id": "key-id-1234", "account_updater_response_decryption_key": "key-1234", "account_updater_response_decryption_key_id": "key-id-1234", "account_updater_enabled": true, "over_capture_amount": 1299, "over_capture_percentage": 25, "visa_network_tokens_requestor_id": "id-12345", "visa_network_tokens_app_id": "id-12345", "amex_network_tokens_requestor_id": "id-12345", "amex_network_tokens_app_id": "id-12345", "mastercard_network_tokens_requestor_id": "id-12345", "mastercard_network_tokens_app_id": "id-12345", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} @@ -3583,6 +3683,7 @@ examples: merchant_account_id: "merchant-12345" query: timeout_in_seconds: 1 + application_name: "core-api" requestBody: application/json: {"account_updater_enabled": true, "account_updater_request_encryption_key": "key-1234", "account_updater_request_encryption_key_id": "key-id-1234", "account_updater_response_decryption_key": "key-1234", "account_updater_response_decryption_key_id": "key-id-1234", "over_capture_amount": 1299, "over_capture_percentage": 25, "loon_client_key": "client-key-1234", "loon_secret_key": "key-12345", "loon_accepted_schemes": ["visa"], "visa_network_tokens_requestor_id": "id-12345", "visa_network_tokens_app_id": "id-12345", "amex_network_tokens_requestor_id": "id-12345", "amex_network_tokens_app_id": "id-12345", "mastercard_network_tokens_requestor_id": "id-12345", "mastercard_network_tokens_app_id": "id-12345", "display_name": "Example", "outbound_webhook_url": "https://example.com/callback", "outbound_webhook_username": "user-12345", "outbound_webhook_password": "password-12345"} responses: @@ -3618,6 +3719,7 @@ examples: query: cursor: "ZXhhbXBsZTE" limit: 20 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3652,6 +3754,7 @@ examples: parameters: query: timeout_in_seconds: 1 + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" requestBody: @@ -3688,6 +3791,8 @@ examples: parameters: path: payout_id: "4344fef2-bc2f-49a6-924f-343e62f67224" + query: + application_name: "core-api" header: x-gr4vy-merchant-account-id: "default" responses: @@ -3725,6 +3830,7 @@ examples: query: cursor: "ZXhhbXBsZTE" limit: 100 + application_name: "core-api" responses: "200": application/json: {"items": [{"type": "transaction-event", "id": "f133a3b7-e67e-4d83-bcd3-3e438fedf348", "name": "transaction-api-request", "created_at": "2013-07-16T19:23:00.000+00:00", "context": {}}], "limit": 20, "next_cursor": "ZXhhbXBsZTE", "previous_cursor": "Xkjss7asS"} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 27ed9c9c..70612277 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -18,7 +18,7 @@ generation: oAuth2PasswordEnabled: false sdkHooksConfigAccess: true java: - version: 1.0.0-beta.3 + version: 1.0.0-beta.4 additionalDependencies: - testImplementation:org.junit.jupiter:junit-jupiter:5.10.0 - implementation:com.auth0:java-jwt:4.5.0 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index fbcd046c..05c0d99b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.554.1 +speakeasyVersion: 1.555.0 sources: Gr4vy: sourceNamespace: openapi @@ -9,11 +9,11 @@ sources: - 1.0.0 openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:769af343140411532f967959547d8b9131e10029846a8e287bf1f0fcee265be6 - sourceBlobDigest: sha256:2ba0bd520b3cc84796862bea0b8cc5ac30dd0e4369b5427a260720c691958e9c + sourceRevisionDigest: sha256:649749f10d750179d89439fc6017f485846878eb9d51ef07db2bad9b3fa74dfe + sourceBlobDigest: sha256:136aeecdb5ea0457e23e388d30ac5b990b86ab3a6f12113a18ff1f34698a85a7 tags: - latest - - speakeasy-sdk-regen-1748613308 + - speakeasy-sdk-regen-1748947398 - 1.0.0 targets: gr-4-vy: @@ -26,10 +26,10 @@ targets: java: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:769af343140411532f967959547d8b9131e10029846a8e287bf1f0fcee265be6 - sourceBlobDigest: sha256:2ba0bd520b3cc84796862bea0b8cc5ac30dd0e4369b5427a260720c691958e9c + sourceRevisionDigest: sha256:649749f10d750179d89439fc6017f485846878eb9d51ef07db2bad9b3fa74dfe + sourceBlobDigest: sha256:136aeecdb5ea0457e23e388d30ac5b990b86ab3a6f12113a18ff1f34698a85a7 codeSamplesNamespace: openapi-java-code-samples - codeSamplesRevisionDigest: sha256:f4cf1a0a30ee1e24377c962b9f570237524c48ad5c68bb67664462de122cf9ae + codeSamplesRevisionDigest: sha256:b6d486247c4c0327fb8eae5b7685f01b4776291bde0e46507bf139f2c4427233 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index fefa9abb..ba6de83a 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.gr4vy:sdk:1.0.0-beta.3' +implementation 'com.gr4vy:sdk:1.0.0-beta.4' ``` Maven: @@ -68,7 +68,7 @@ Maven: com.gr4vy sdk - 1.0.0-beta.3 + 1.0.0-beta.4 ``` diff --git a/RELEASES.md b/RELEASES.md index 3e733fdf..3de32f9c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -18,4 +18,14 @@ Based on: ### Generated - [java v1.0.0-beta.3] . ### Releases -- [Maven Central v1.0.0-beta.3] https://central.sonatype.com/artifact/com.gr4vy/sdk/1.0.0-beta.3 - . \ No newline at end of file +- [Maven Central v1.0.0-beta.3] https://central.sonatype.com/artifact/com.gr4vy/sdk/1.0.0-beta.3 - . + +## 2025-06-03 10:42:59 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.555.0 (2.618.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v1.0.0-beta.4] . +### Releases +- [Maven Central v1.0.0-beta.4] https://central.sonatype.com/artifact/com.gr4vy/sdk/1.0.0-beta.4 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index da534a58..208414c5 100644 --- a/build.gradle +++ b/build.gradle @@ -103,7 +103,7 @@ publishing { // https://github.com/gradle/gradle/issues/18619 groupId = "com.gr4vy" artifactId = "sdk" - version = "1.0.0-beta.3" + version = "1.0.0-beta.4" from components.java diff --git a/docs/models/components/CollectionNoCursorRefund.md b/docs/models/components/CollectionNoCursorRefund.md deleted file mode 100644 index 42bbd241..00000000 --- a/docs/models/components/CollectionNoCursorRefund.md +++ /dev/null @@ -1,8 +0,0 @@ -# CollectionNoCursorRefund - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `items` | List\<[Refund](../../models/components/Refund.md)> | :heavy_check_mark: | A list of items returned for this request. | \ No newline at end of file diff --git a/docs/models/operations/AddBuyerRequest.md b/docs/models/operations/AddBuyerRequest.md index 4e0aafa4..90956ac7 100644 --- a/docs/models/operations/AddBuyerRequest.md +++ b/docs/models/operations/AddBuyerRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `buyerCreate` | [BuyerCreate](../../models/components/BuyerCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddBuyerShippingDetailsRequest.md b/docs/models/operations/AddBuyerShippingDetailsRequest.md index e1886b37..c42f3a05 100644 --- a/docs/models/operations/AddBuyerShippingDetailsRequest.md +++ b/docs/models/operations/AddBuyerShippingDetailsRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to add shipping details to. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `shippingDetailsCreate` | [ShippingDetailsCreate](../../models/components/ShippingDetailsCreate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CaptureTransactionRequest.md b/docs/models/operations/CaptureTransactionRequest.md index c9bdb816..7ad97c78 100644 --- a/docs/models/operations/CaptureTransactionRequest.md +++ b/docs/models/operations/CaptureTransactionRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `transactionCapture` | [TransactionCapture](../../models/components/TransactionCapture.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/ConfigureDigitalWalletRequest.md b/docs/models/operations/ConfigureDigitalWalletRequest.md index 706d15a5..057dbf65 100644 --- a/docs/models/operations/ConfigureDigitalWalletRequest.md +++ b/docs/models/operations/ConfigureDigitalWalletRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `digitalWalletCreate` | [DigitalWalletCreate](../../models/components/DigitalWalletCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateAccountUpdaterJobRequest.md b/docs/models/operations/CreateAccountUpdaterJobRequest.md index 4566f8d2..bf96d97a 100644 --- a/docs/models/operations/CreateAccountUpdaterJobRequest.md +++ b/docs/models/operations/CreateAccountUpdaterJobRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `accountUpdaterJobCreate` | [AccountUpdaterJobCreate](../../models/components/AccountUpdaterJobCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateApplePayDigitalWalletSessionRequest.md b/docs/models/operations/CreateApplePayDigitalWalletSessionRequest.md index 762dbf85..bf52dcec 100644 --- a/docs/models/operations/CreateApplePayDigitalWalletSessionRequest.md +++ b/docs/models/operations/CreateApplePayDigitalWalletSessionRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `applePaySessionRequest` | [ApplePaySessionRequest](../../models/components/ApplePaySessionRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateCheckoutSessionRequest.md b/docs/models/operations/CreateCheckoutSessionRequest.md index d5511c8b..aea59daa 100644 --- a/docs/models/operations/CreateCheckoutSessionRequest.md +++ b/docs/models/operations/CreateCheckoutSessionRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `checkoutSessionCreate` | [Optional\](../../models/components/CheckoutSessionCreate.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateClickToPayDigitalWalletSessionRequest.md b/docs/models/operations/CreateClickToPayDigitalWalletSessionRequest.md new file mode 100644 index 00000000..16c60a44 --- /dev/null +++ b/docs/models/operations/CreateClickToPayDigitalWalletSessionRequest.md @@ -0,0 +1,9 @@ +# CreateClickToPayDigitalWalletSessionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | +| `clickToPaySessionRequest` | [ClickToPaySessionRequest](../../models/components/ClickToPaySessionRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateFullTransactionRefundRequest.md b/docs/models/operations/CreateFullTransactionRefundRequest.md index 030b28b6..a0f7a2b9 100644 --- a/docs/models/operations/CreateFullTransactionRefundRequest.md +++ b/docs/models/operations/CreateFullTransactionRefundRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `transactionRefundAllCreate` | [JsonNullable\](../../models/components/TransactionRefundAllCreate.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreateFullTransactionRefundResponse.md b/docs/models/operations/CreateFullTransactionRefundResponse.md index 93217564..36312b73 100644 --- a/docs/models/operations/CreateFullTransactionRefundResponse.md +++ b/docs/models/operations/CreateFullTransactionRefundResponse.md @@ -8,4 +8,4 @@ | `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `collectionNoCursorRefund` | [Optional\](../../models/components/CollectionNoCursorRefund.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file +| `collectionRefund` | [Optional\](../../models/components/CollectionRefund.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/CreateGiftCardRequest.md b/docs/models/operations/CreateGiftCardRequest.md index b2b83e25..f0f6b369 100644 --- a/docs/models/operations/CreateGiftCardRequest.md +++ b/docs/models/operations/CreateGiftCardRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `giftCardCreate` | [GiftCardCreate](../../models/components/GiftCardCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateGooglePayDigitalWalletSessionRequest.md b/docs/models/operations/CreateGooglePayDigitalWalletSessionRequest.md index 8478b495..7e8b0ef0 100644 --- a/docs/models/operations/CreateGooglePayDigitalWalletSessionRequest.md +++ b/docs/models/operations/CreateGooglePayDigitalWalletSessionRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `googlePaySessionRequest` | [GooglePaySessionRequest](../../models/components/GooglePaySessionRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateMerchantAccountRequest.md b/docs/models/operations/CreateMerchantAccountRequest.md new file mode 100644 index 00000000..61291f17 --- /dev/null +++ b/docs/models/operations/CreateMerchantAccountRequest.md @@ -0,0 +1,9 @@ +# CreateMerchantAccountRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | +| `merchantAccountCreate` | [MerchantAccountCreate](../../models/components/MerchantAccountCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.md b/docs/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.md index 52da6f01..5b3bfab0 100644 --- a/docs/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.md +++ b/docs/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.md @@ -7,5 +7,6 @@ | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `cryptogramCreate` | [CryptogramCreate](../../models/components/CryptogramCreate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentMethodNetworkTokenRequest.md b/docs/models/operations/CreatePaymentMethodNetworkTokenRequest.md index 8e58d6d4..6133d448 100644 --- a/docs/models/operations/CreatePaymentMethodNetworkTokenRequest.md +++ b/docs/models/operations/CreatePaymentMethodNetworkTokenRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `networkTokenCreate` | [NetworkTokenCreate](../../models/components/NetworkTokenCreate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.md b/docs/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.md index 17bacd15..63ff3f1c 100644 --- a/docs/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.md +++ b/docs/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `paymentServiceTokenCreate` | [PaymentServiceTokenCreate](../../models/components/PaymentServiceTokenCreate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentMethodRequest.md b/docs/models/operations/CreatePaymentMethodRequest.md index cccbb1c9..18e1aec4 100644 --- a/docs/models/operations/CreatePaymentMethodRequest.md +++ b/docs/models/operations/CreatePaymentMethodRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `requestBody` | [Body](../../models/operations/Body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentServiceDefinitionSessionRequest.md b/docs/models/operations/CreatePaymentServiceDefinitionSessionRequest.md index 6467369e..3140b983 100644 --- a/docs/models/operations/CreatePaymentServiceDefinitionSessionRequest.md +++ b/docs/models/operations/CreatePaymentServiceDefinitionSessionRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | | `paymentServiceDefinitionId` | *String* | :heavy_check_mark: | N/A | adyen-ideal | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `requestBody` | Map\ | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentServiceRequest.md b/docs/models/operations/CreatePaymentServiceRequest.md index b9af628d..8678e3bf 100644 --- a/docs/models/operations/CreatePaymentServiceRequest.md +++ b/docs/models/operations/CreatePaymentServiceRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `paymentServiceUpdate` | [PaymentServiceUpdate](../../models/components/PaymentServiceUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreatePaymentServiceSessionRequest.md b/docs/models/operations/CreatePaymentServiceSessionRequest.md index 89c453b8..8ee3155d 100644 --- a/docs/models/operations/CreatePaymentServiceSessionRequest.md +++ b/docs/models/operations/CreatePaymentServiceSessionRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `requestBody` | Map\ | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreatePayoutRequest.md b/docs/models/operations/CreatePayoutRequest.md index e89583f7..579dad5a 100644 --- a/docs/models/operations/CreatePayoutRequest.md +++ b/docs/models/operations/CreatePayoutRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `payoutCreate` | [PayoutCreate](../../models/components/PayoutCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateTransactionRefundRequest.md b/docs/models/operations/CreateTransactionRefundRequest.md index 48866ccd..b261f4a2 100644 --- a/docs/models/operations/CreateTransactionRefundRequest.md +++ b/docs/models/operations/CreateTransactionRefundRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `transactionRefundCreate` | [TransactionRefundCreate](../../models/components/TransactionRefundCreate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreateTransactionRequest.md b/docs/models/operations/CreateTransactionRequest.md index 242654a5..a2f4b210 100644 --- a/docs/models/operations/CreateTransactionRequest.md +++ b/docs/models/operations/CreateTransactionRequest.md @@ -5,6 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `idempotencyKey` | *JsonNullable\* | :heavy_minus_sign: | A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. | request-12345 | | `transactionCreate` | [TransactionCreate](../../models/components/TransactionCreate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/DeleteBuyerRequest.md b/docs/models/operations/DeleteBuyerRequest.md index ffb5d11d..b472010b 100644 --- a/docs/models/operations/DeleteBuyerRequest.md +++ b/docs/models/operations/DeleteBuyerRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to delete. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeleteBuyerShippingDetailsRequest.md b/docs/models/operations/DeleteBuyerShippingDetailsRequest.md index b0f6da2e..38d51b24 100644 --- a/docs/models/operations/DeleteBuyerShippingDetailsRequest.md +++ b/docs/models/operations/DeleteBuyerShippingDetailsRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to delete shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | | `shippingDetailsId` | *String* | :heavy_check_mark: | The ID of the shipping details to delete. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeleteCheckoutSessionRequest.md b/docs/models/operations/DeleteCheckoutSessionRequest.md index 8c3ac4c9..a791469b 100644 --- a/docs/models/operations/DeleteCheckoutSessionRequest.md +++ b/docs/models/operations/DeleteCheckoutSessionRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `sessionId` | *String* | :heavy_check_mark: | The ID of the checkout session. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeleteDigitalWalletRequest.md b/docs/models/operations/DeleteDigitalWalletRequest.md index 2891e7b1..0a33bcab 100644 --- a/docs/models/operations/DeleteDigitalWalletRequest.md +++ b/docs/models/operations/DeleteDigitalWalletRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to delete. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeleteGiftCardRequest.md b/docs/models/operations/DeleteGiftCardRequest.md index ce8e0506..06548bb1 100644 --- a/docs/models/operations/DeleteGiftCardRequest.md +++ b/docs/models/operations/DeleteGiftCardRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `giftCardId` | *String* | :heavy_check_mark: | The ID of the gift card. | 356d56e5-fe16-42ae-97ee-8d55d846ae2e | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeletePaymentMethodNetworkTokenRequest.md b/docs/models/operations/DeletePaymentMethodNetworkTokenRequest.md index 38a54c31..de9231d1 100644 --- a/docs/models/operations/DeletePaymentMethodNetworkTokenRequest.md +++ b/docs/models/operations/DeletePaymentMethodNetworkTokenRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.md b/docs/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.md index 2bfcce3a..1e1949e5 100644 --- a/docs/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.md +++ b/docs/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `paymentServiceTokenId` | *String* | :heavy_check_mark: | The ID of the payment service token | 703f2d99-3fd1-44bc-9cbd-a25a2d597886 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeletePaymentMethodRequest.md b/docs/models/operations/DeletePaymentMethodRequest.md index 95e69778..b36ef53c 100644 --- a/docs/models/operations/DeletePaymentMethodRequest.md +++ b/docs/models/operations/DeletePaymentMethodRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/DeletePaymentServiceRequest.md b/docs/models/operations/DeletePaymentServiceRequest.md index e1dafb8c..af3307ed 100644 --- a/docs/models/operations/DeletePaymentServiceRequest.md +++ b/docs/models/operations/DeletePaymentServiceRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetBuyerRequest.md b/docs/models/operations/GetBuyerRequest.md index efa1a416..51467ef9 100644 --- a/docs/models/operations/GetBuyerRequest.md +++ b/docs/models/operations/GetBuyerRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to retrieve. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetBuyerShippingDetailsRequest.md b/docs/models/operations/GetBuyerShippingDetailsRequest.md index fd8479df..e8fd32dc 100644 --- a/docs/models/operations/GetBuyerShippingDetailsRequest.md +++ b/docs/models/operations/GetBuyerShippingDetailsRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | | `shippingDetailsId` | *String* | :heavy_check_mark: | The ID of the shipping details to retrieve. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetCheckoutSessionRequest.md b/docs/models/operations/GetCheckoutSessionRequest.md index 22709f9d..02498499 100644 --- a/docs/models/operations/GetCheckoutSessionRequest.md +++ b/docs/models/operations/GetCheckoutSessionRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `sessionId` | *String* | :heavy_check_mark: | The ID of the checkout session. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetDigitalWalletRequest.md b/docs/models/operations/GetDigitalWalletRequest.md index a66e7cbe..58db6f16 100644 --- a/docs/models/operations/GetDigitalWalletRequest.md +++ b/docs/models/operations/GetDigitalWalletRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to read. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetGiftCardRequest.md b/docs/models/operations/GetGiftCardRequest.md index a390f542..d77f47fb 100644 --- a/docs/models/operations/GetGiftCardRequest.md +++ b/docs/models/operations/GetGiftCardRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `giftCardId` | *String* | :heavy_check_mark: | The ID of the gift card. | 356d56e5-fe16-42ae-97ee-8d55d846ae2e | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetMerchantAccountRequest.md b/docs/models/operations/GetMerchantAccountRequest.md index 2146fa14..674ba068 100644 --- a/docs/models/operations/GetMerchantAccountRequest.md +++ b/docs/models/operations/GetMerchantAccountRequest.md @@ -5,4 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `merchantAccountId` | *String* | :heavy_check_mark: | The ID of the merchant account | merchant-12345 | \ No newline at end of file +| `merchantAccountId` | *String* | :heavy_check_mark: | The ID of the merchant account | merchant-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPaymentMethodRequest.md b/docs/models/operations/GetPaymentMethodRequest.md index 7b575f03..28c77c25 100644 --- a/docs/models/operations/GetPaymentMethodRequest.md +++ b/docs/models/operations/GetPaymentMethodRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetPaymentServiceDefinitionRequest.md b/docs/models/operations/GetPaymentServiceDefinitionRequest.md index 9063d159..0bafbf8b 100644 --- a/docs/models/operations/GetPaymentServiceDefinitionRequest.md +++ b/docs/models/operations/GetPaymentServiceDefinitionRequest.md @@ -5,4 +5,5 @@ | Field | Type | Required | Description | Example | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `paymentServiceDefinitionId` | *String* | :heavy_check_mark: | N/A | adyen-ideal | \ No newline at end of file +| `paymentServiceDefinitionId` | *String* | :heavy_check_mark: | N/A | adyen-ideal | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPaymentServiceRequest.md b/docs/models/operations/GetPaymentServiceRequest.md index 341dfe3d..cec78f7d 100644 --- a/docs/models/operations/GetPaymentServiceRequest.md +++ b/docs/models/operations/GetPaymentServiceRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetPayoutRequest.md b/docs/models/operations/GetPayoutRequest.md index 180eb2dd..a7fc6b0d 100644 --- a/docs/models/operations/GetPayoutRequest.md +++ b/docs/models/operations/GetPayoutRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `payoutId` | *String* | :heavy_check_mark: | N/A | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | \ No newline at end of file diff --git a/docs/models/operations/GetRefundRequest.md b/docs/models/operations/GetRefundRequest.md index 2853e420..a2d428a7 100644 --- a/docs/models/operations/GetRefundRequest.md +++ b/docs/models/operations/GetRefundRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `refundId` | *String* | :heavy_check_mark: | N/A | 6a1d4e46-14ed-4fe1-a45f-eff4e025d211 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetTransactionRefundRequest.md b/docs/models/operations/GetTransactionRefundRequest.md index b18ce7ad..0bd4b639 100644 --- a/docs/models/operations/GetTransactionRefundRequest.md +++ b/docs/models/operations/GetTransactionRefundRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | | `refundId` | *String* | :heavy_check_mark: | N/A | 6a1d4e46-14ed-4fe1-a45f-eff4e025d211 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/GetTransactionRequest.md b/docs/models/operations/GetTransactionRequest.md index e6fde850..5fc338e3 100644 --- a/docs/models/operations/GetTransactionRequest.md +++ b/docs/models/operations/GetTransactionRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListAuditLogsRequest.md b/docs/models/operations/ListAuditLogsRequest.md index 8d51f4e6..390cad04 100644 --- a/docs/models/operations/ListAuditLogsRequest.md +++ b/docs/models/operations/ListAuditLogsRequest.md @@ -9,5 +9,6 @@ | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | | `action` | [JsonNullable\](../../models/components/AuditLogAction.md) | :heavy_minus_sign: | Filters the results to only the items for which the `audit-log` has an `action` that matches this value. | created | | `userId` | *JsonNullable\* | :heavy_minus_sign: | Filters the results to only the items for which the `user` has an `id` that matches this value. | 14b7b8c5-a6ba-4fb6-bbab-52d43c7f37ef | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `resourceType` | *JsonNullable\* | :heavy_minus_sign: | Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. | user | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerGiftCardsRequest.md b/docs/models/operations/ListBuyerGiftCardsRequest.md index bf4a9dc7..73eb804b 100644 --- a/docs/models/operations/ListBuyerGiftCardsRequest.md +++ b/docs/models/operations/ListBuyerGiftCardsRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `buyerId` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerPaymentMethodsRequest.md b/docs/models/operations/ListBuyerPaymentMethodsRequest.md index 0e1f67f5..d6fce4f0 100644 --- a/docs/models/operations/ListBuyerPaymentMethodsRequest.md +++ b/docs/models/operations/ListBuyerPaymentMethodsRequest.md @@ -11,4 +11,5 @@ | `orderBy` | [Optional\](../../models/operations/OrderBy.md) | :heavy_minus_sign: | The direction to sort the payment methods in. | desc | | `country` | *JsonNullable\* | :heavy_minus_sign: | The country code to filter payment methods by. This only applies to payment methods with a `country` value. | US | | `currency` | *JsonNullable\* | :heavy_minus_sign: | The currency code to filter payment methods by. This only applies to payment methods with a `currency` value. | USD | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListBuyerShippingDetailsRequest.md b/docs/models/operations/ListBuyerShippingDetailsRequest.md index fccce914..6374c8d8 100644 --- a/docs/models/operations/ListBuyerShippingDetailsRequest.md +++ b/docs/models/operations/ListBuyerShippingDetailsRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListBuyersRequest.md b/docs/models/operations/ListBuyersRequest.md index 0abbe4a0..ea5c8ceb 100644 --- a/docs/models/operations/ListBuyersRequest.md +++ b/docs/models/operations/ListBuyersRequest.md @@ -9,4 +9,5 @@ | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | | `search` | *JsonNullable\* | :heavy_minus_sign: | Filters the results to only the buyers for which the `display_name` or `external_identifier` matches this value. | John | | `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | Filters the results to only the buyers for which the `external_identifier` matches this value. | buyer-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListCardSchemeDefinitionsRequest.md b/docs/models/operations/ListCardSchemeDefinitionsRequest.md index b33c50ef..404188be 100644 --- a/docs/models/operations/ListCardSchemeDefinitionsRequest.md +++ b/docs/models/operations/ListCardSchemeDefinitionsRequest.md @@ -5,4 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | \ No newline at end of file diff --git a/docs/models/operations/ListDigitalWalletsRequest.md b/docs/models/operations/ListDigitalWalletsRequest.md index 201645ac..df9065f7 100644 --- a/docs/models/operations/ListDigitalWalletsRequest.md +++ b/docs/models/operations/ListDigitalWalletsRequest.md @@ -5,4 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | \ No newline at end of file diff --git a/docs/models/operations/ListGiftCardBalancesRequest.md b/docs/models/operations/ListGiftCardBalancesRequest.md index 9988a86e..e5888a97 100644 --- a/docs/models/operations/ListGiftCardBalancesRequest.md +++ b/docs/models/operations/ListGiftCardBalancesRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `giftCardBalanceRequest` | [GiftCardBalanceRequest](../../models/components/GiftCardBalanceRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListGiftCardsRequest.md b/docs/models/operations/ListGiftCardsRequest.md index c171a9ac..ac2ceacf 100644 --- a/docs/models/operations/ListGiftCardsRequest.md +++ b/docs/models/operations/ListGiftCardsRequest.md @@ -9,4 +9,5 @@ | `buyerId` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `cursor` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `limit` | *Optional\* | :heavy_minus_sign: | N/A | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | \ No newline at end of file diff --git a/docs/models/operations/ListMerchantAccountsRequest.md b/docs/models/operations/ListMerchantAccountsRequest.md index 4141c694..da66f4be 100644 --- a/docs/models/operations/ListMerchantAccountsRequest.md +++ b/docs/models/operations/ListMerchantAccountsRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | -| `search` | *JsonNullable\* | :heavy_minus_sign: | The search term to filter merchant accounts by. | merchant-12345 | \ No newline at end of file +| `search` | *JsonNullable\* | :heavy_minus_sign: | The search term to filter merchant accounts by. | merchant-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/ListPaymentMethodNetworkTokensRequest.md b/docs/models/operations/ListPaymentMethodNetworkTokensRequest.md index eac52f3d..b4c57278 100644 --- a/docs/models/operations/ListPaymentMethodNetworkTokensRequest.md +++ b/docs/models/operations/ListPaymentMethodNetworkTokensRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListPaymentMethodPaymentServiceTokensRequest.md b/docs/models/operations/ListPaymentMethodPaymentServiceTokensRequest.md index ea2cdc43..a8bfdd2b 100644 --- a/docs/models/operations/ListPaymentMethodPaymentServiceTokensRequest.md +++ b/docs/models/operations/ListPaymentMethodPaymentServiceTokensRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `paymentServiceId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListPaymentMethodsRequest.md b/docs/models/operations/ListPaymentMethodsRequest.md index f0a3df26..36677152 100644 --- a/docs/models/operations/ListPaymentMethodsRequest.md +++ b/docs/models/operations/ListPaymentMethodsRequest.md @@ -11,4 +11,5 @@ | `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The external identifier of the buyer to filter payment methods by. | buyer-12345 | | `status` | List\<[PaymentMethodStatus](../../models/components/PaymentMethodStatus.md)> | :heavy_minus_sign: | N/A | | | `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The external identifier of the payment method to filter by. | payment-method-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListPaymentOptionsRequest.md b/docs/models/operations/ListPaymentOptionsRequest.md index 6e016044..55a9bcf0 100644 --- a/docs/models/operations/ListPaymentOptionsRequest.md +++ b/docs/models/operations/ListPaymentOptionsRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `paymentOptionRequest` | [PaymentOptionRequest](../../models/components/PaymentOptionRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ListPaymentServiceDefinitionsRequest.md b/docs/models/operations/ListPaymentServiceDefinitionsRequest.md index a53948b5..c8514a11 100644 --- a/docs/models/operations/ListPaymentServiceDefinitionsRequest.md +++ b/docs/models/operations/ListPaymentServiceDefinitionsRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | -| `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | \ No newline at end of file +| `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/ListPaymentServicesRequest.md b/docs/models/operations/ListPaymentServicesRequest.md index 192135ec..06b8794e 100644 --- a/docs/models/operations/ListPaymentServicesRequest.md +++ b/docs/models/operations/ListPaymentServicesRequest.md @@ -9,4 +9,5 @@ | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | | `deleted` | *JsonNullable\* | :heavy_minus_sign: | Return any deleted payment service. | true | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListPayoutsRequest.md b/docs/models/operations/ListPayoutsRequest.md index 630fdc94..d1e58b03 100644 --- a/docs/models/operations/ListPayoutsRequest.md +++ b/docs/models/operations/ListPayoutsRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListTransactionEventsRequest.md b/docs/models/operations/ListTransactionEventsRequest.md index b3f2939b..a0282d24 100644 --- a/docs/models/operations/ListTransactionEventsRequest.md +++ b/docs/models/operations/ListTransactionEventsRequest.md @@ -8,4 +8,5 @@ | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 100 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListTransactionRefundsRequest.md b/docs/models/operations/ListTransactionRefundsRequest.md index 097d2c85..88b9c43d 100644 --- a/docs/models/operations/ListTransactionRefundsRequest.md +++ b/docs/models/operations/ListTransactionRefundsRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/ListTransactionsRequest.md b/docs/models/operations/ListTransactionsRequest.md index 2314a895..33f68b75 100644 --- a/docs/models/operations/ListTransactionsRequest.md +++ b/docs/models/operations/ListTransactionsRequest.md @@ -48,4 +48,5 @@ | `isSubsequentPayment` | *JsonNullable\* | :heavy_minus_sign: | Filters for transactions where the `is_subsequent_payment` matches the provided value. | true | | `merchantInitiated` | *JsonNullable\* | :heavy_minus_sign: | Filters for transactions where the `merchant_initiated` matches the provided value. | true | | `used3ds` | *JsonNullable\* | :heavy_minus_sign: | Filters for transactions that attempted 3DS authentication or not. | true | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/RegisterDigitalWalletDomainRequest.md b/docs/models/operations/RegisterDigitalWalletDomainRequest.md index 192c5da5..a31fad6c 100644 --- a/docs/models/operations/RegisterDigitalWalletDomainRequest.md +++ b/docs/models/operations/RegisterDigitalWalletDomainRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to remove a domain for. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `digitalWalletDomain` | [DigitalWalletDomain](../../models/components/DigitalWalletDomain.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/ResumePaymentMethodNetworkTokenRequest.md b/docs/models/operations/ResumePaymentMethodNetworkTokenRequest.md index 69c65683..73b05096 100644 --- a/docs/models/operations/ResumePaymentMethodNetworkTokenRequest.md +++ b/docs/models/operations/ResumePaymentMethodNetworkTokenRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/SuspendPaymentMethodNetworkTokenRequest.md b/docs/models/operations/SuspendPaymentMethodNetworkTokenRequest.md index cb5bbbff..b06bed4a 100644 --- a/docs/models/operations/SuspendPaymentMethodNetworkTokenRequest.md +++ b/docs/models/operations/SuspendPaymentMethodNetworkTokenRequest.md @@ -7,4 +7,5 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/models/operations/SyncTransactionRequest.md b/docs/models/operations/SyncTransactionRequest.md index 6bd49682..e68d1205 100644 --- a/docs/models/operations/SyncTransactionRequest.md +++ b/docs/models/operations/SyncTransactionRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | \ No newline at end of file diff --git a/docs/models/operations/UnregisterDigitalWalletDomainRequest.md b/docs/models/operations/UnregisterDigitalWalletDomainRequest.md index 80b621b3..b0dac8a4 100644 --- a/docs/models/operations/UnregisterDigitalWalletDomainRequest.md +++ b/docs/models/operations/UnregisterDigitalWalletDomainRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | N/A | | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `digitalWalletDomain` | [DigitalWalletDomain](../../models/components/DigitalWalletDomain.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UpdateBuyerRequest.md b/docs/models/operations/UpdateBuyerRequest.md index fef80e69..9d2d497c 100644 --- a/docs/models/operations/UpdateBuyerRequest.md +++ b/docs/models/operations/UpdateBuyerRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to edit. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `buyerUpdate` | [BuyerUpdate](../../models/components/BuyerUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UpdateBuyerShippingDetailsRequest.md b/docs/models/operations/UpdateBuyerShippingDetailsRequest.md index 02489cb8..8a6040cc 100644 --- a/docs/models/operations/UpdateBuyerShippingDetailsRequest.md +++ b/docs/models/operations/UpdateBuyerShippingDetailsRequest.md @@ -7,5 +7,6 @@ | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to update shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | | `shippingDetailsId` | *String* | :heavy_check_mark: | The ID of the shipping details to update. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `shippingDetailsUpdate` | [ShippingDetailsUpdate](../../models/components/ShippingDetailsUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UpdateCheckoutSessionRequest.md b/docs/models/operations/UpdateCheckoutSessionRequest.md index 7fcd68c5..fd0fb3e1 100644 --- a/docs/models/operations/UpdateCheckoutSessionRequest.md +++ b/docs/models/operations/UpdateCheckoutSessionRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `sessionId` | *String* | :heavy_check_mark: | The ID of the checkout session. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `checkoutSessionCreate` | [CheckoutSessionCreate](../../models/components/CheckoutSessionCreate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UpdateDigitalWalletRequest.md b/docs/models/operations/UpdateDigitalWalletRequest.md index addddb27..dc4ce77e 100644 --- a/docs/models/operations/UpdateDigitalWalletRequest.md +++ b/docs/models/operations/UpdateDigitalWalletRequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to edit. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `digitalWalletUpdate` | [DigitalWalletUpdate](../../models/components/DigitalWalletUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UpdateMerchantAccountRequest.md b/docs/models/operations/UpdateMerchantAccountRequest.md index 032fd9dd..72c1cf12 100644 --- a/docs/models/operations/UpdateMerchantAccountRequest.md +++ b/docs/models/operations/UpdateMerchantAccountRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `merchantAccountId` | *String* | :heavy_check_mark: | The ID of the merchant account | merchant-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountUpdate` | [MerchantAccountUpdate](../../models/components/MerchantAccountUpdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/UpdatePaymentServiceRequest.md b/docs/models/operations/UpdatePaymentServiceRequest.md index 8fdb0139..a02b984c 100644 --- a/docs/models/operations/UpdatePaymentServiceRequest.md +++ b/docs/models/operations/UpdatePaymentServiceRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `paymentServiceCreate` | [PaymentServiceCreate](../../models/components/PaymentServiceCreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/VerifyPaymentServiceCredentialsRequest.md b/docs/models/operations/VerifyPaymentServiceCredentialsRequest.md index bb704603..6593f8d7 100644 --- a/docs/models/operations/VerifyPaymentServiceCredentialsRequest.md +++ b/docs/models/operations/VerifyPaymentServiceCredentialsRequest.md @@ -5,5 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `verifyCredentials` | [VerifyCredentials](../../models/components/VerifyCredentials.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/VoidTransactionRequest.md b/docs/models/operations/VoidTransactionRequest.md index 52996c51..db2c6a6e 100644 --- a/docs/models/operations/VoidTransactionRequest.md +++ b/docs/models/operations/VoidTransactionRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | \ No newline at end of file diff --git a/docs/sdks/all/README.md b/docs/sdks/all/README.md index a4606667..1dd6c84f 100644 --- a/docs/sdks/all/README.md +++ b/docs/sdks/all/README.md @@ -38,7 +38,7 @@ public class Application { .build()) .call(); - if (res.collectionNoCursorRefund().isPresent()) { + if (res.collectionRefund().isPresent()) { // handle response } } @@ -50,6 +50,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `transactionRefundAllCreate` | [JsonNullable\](../../models/components/TransactionRefundAllCreate.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index c9039f60..5c23a738 100644 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -58,6 +58,7 @@ public class Application { | Parameter | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `giftCardBalanceRequest` | [GiftCardBalanceRequest](../../models/components/GiftCardBalanceRequest.md) | :heavy_check_mark: | N/A | diff --git a/docs/sdks/buyers/README.md b/docs/sdks/buyers/README.md index 323c107f..93b60213 100644 --- a/docs/sdks/buyers/README.md +++ b/docs/sdks/buyers/README.md @@ -140,6 +140,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `buyerCreate` | [BuyerCreate](../../models/components/BuyerCreate.md) | :heavy_check_mark: | N/A | @@ -203,6 +204,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to retrieve. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -272,6 +274,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to edit. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `buyerUpdate` | [BuyerUpdate](../../models/components/BuyerUpdate.md) | :heavy_check_mark: | N/A | | @@ -333,6 +336,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to delete. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/docs/sdks/buyersgiftcards/README.md b/docs/sdks/buyersgiftcards/README.md index fa3f4ab5..c3076107 100644 --- a/docs/sdks/buyersgiftcards/README.md +++ b/docs/sdks/buyersgiftcards/README.md @@ -45,6 +45,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `buyerId` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | ### Response diff --git a/docs/sdks/cardschemedefinitions/README.md b/docs/sdks/cardschemedefinitions/README.md index 048d929c..b88c0b9f 100644 --- a/docs/sdks/cardschemedefinitions/README.md +++ b/docs/sdks/cardschemedefinitions/README.md @@ -43,6 +43,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | ### Response diff --git a/docs/sdks/checkoutsessions/README.md b/docs/sdks/checkoutsessions/README.md index a8bd5e54..a94f05ab 100644 --- a/docs/sdks/checkoutsessions/README.md +++ b/docs/sdks/checkoutsessions/README.md @@ -165,6 +165,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `checkoutSessionCreate` | [Optional\](../../models/components/CheckoutSessionCreate.md) | :heavy_minus_sign: | N/A | @@ -391,6 +392,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `sessionId` | *String* | :heavy_check_mark: | The ID of the checkout session. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `checkoutSessionCreate` | [CheckoutSessionCreate](../../models/components/CheckoutSessionCreate.md) | :heavy_check_mark: | N/A | | @@ -454,6 +456,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `sessionId` | *String* | :heavy_check_mark: | The ID of the checkout session. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -513,6 +516,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `sessionId` | *String* | :heavy_check_mark: | The ID of the checkout session. | 4137b1cf-39ac-42a8-bad6-1c680d5dab6b | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/docs/sdks/cryptogram/README.md b/docs/sdks/cryptogram/README.md index b9c7adcd..81663ed3 100644 --- a/docs/sdks/cryptogram/README.md +++ b/docs/sdks/cryptogram/README.md @@ -19,6 +19,7 @@ package hello.world; import com.gr4vy.sdk.Gr4vy; import com.gr4vy.sdk.models.components.CryptogramCreate; import com.gr4vy.sdk.models.errors.*; +import com.gr4vy.sdk.models.operations.CreatePaymentMethodNetworkTokenCryptogramRequest; import com.gr4vy.sdk.models.operations.CreatePaymentMethodNetworkTokenCryptogramResponse; import java.lang.Exception; @@ -30,12 +31,16 @@ public class Application { .bearerAuth("") .build(); - CreatePaymentMethodNetworkTokenCryptogramResponse res = sdk.paymentMethods().networkTokens().cryptogram().create() + CreatePaymentMethodNetworkTokenCryptogramRequest req = CreatePaymentMethodNetworkTokenCryptogramRequest.builder() .paymentMethodId("ef9496d8-53a5-4aad-8ca2-00eb68334389") .networkTokenId("f8dd5cfc-7834-4847-95dc-f75a360e2298") .cryptogramCreate(CryptogramCreate.builder() .merchantInitiated(false) .build()) + .build(); + + CreatePaymentMethodNetworkTokenCryptogramResponse res = sdk.paymentMethods().networkTokens().cryptogram().create() + .request(req) .call(); if (res.cryptogram().isPresent()) { @@ -47,12 +52,9 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | -| `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | -| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | -| `cryptogramCreate` | [CryptogramCreate](../../models/components/CryptogramCreate.md) | :heavy_check_mark: | N/A | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [CreatePaymentMethodNetworkTokenCryptogramRequest](../../models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response diff --git a/docs/sdks/digitalwallets/README.md b/docs/sdks/digitalwallets/README.md index 5e4ebdf4..b68b05f0 100644 --- a/docs/sdks/digitalwallets/README.md +++ b/docs/sdks/digitalwallets/README.md @@ -55,6 +55,7 @@ public class Application { | Parameter | Type | Required | Description | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `digitalWalletCreate` | [DigitalWalletCreate](../../models/components/DigitalWalletCreate.md) | :heavy_check_mark: | N/A | @@ -116,6 +117,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | ### Response @@ -178,6 +180,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to read. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -240,6 +243,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to delete. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -306,6 +310,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to edit. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `digitalWalletUpdate` | [DigitalWalletUpdate](../../models/components/DigitalWalletUpdate.md) | :heavy_check_mark: | N/A | | diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index 086a3472..fc39e97c 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -50,6 +50,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | The ID of the digital wallet to remove a domain for. | 1808f5e6-b49c-4db9-94fa-22371ea352f5 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `digitalWalletDomain` | [DigitalWalletDomain](../../models/components/DigitalWalletDomain.md) | :heavy_check_mark: | N/A | | @@ -117,6 +118,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | | `digitalWalletId` | *String* | :heavy_check_mark: | N/A | | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `digitalWalletDomain` | [DigitalWalletDomain](../../models/components/DigitalWalletDomain.md) | :heavy_check_mark: | N/A | | diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 5d9c0f04..d656c9f7 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -18,6 +18,7 @@ package hello.world; import com.gr4vy.sdk.Gr4vy; import com.gr4vy.sdk.models.errors.*; +import com.gr4vy.sdk.models.operations.ListTransactionEventsRequest; import com.gr4vy.sdk.models.operations.ListTransactionEventsResponse; import java.lang.Exception; @@ -29,9 +30,13 @@ public class Application { .bearerAuth("") .build(); - ListTransactionEventsResponse res = sdk.transactions().events().list() + ListTransactionEventsRequest req = ListTransactionEventsRequest.builder() .transactionId("7099948d-7286-47e4-aad8-b68f7eb44591") .cursor("ZXhhbXBsZTE") + .build(); + + ListTransactionEventsResponse res = sdk.transactions().events().list() + .request(req) .call(); if (res.collectionTransactionEvent().isPresent()) { @@ -43,12 +48,9 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | -| `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | -| `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 100 | -| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [ListTransactionEventsRequest](../../models/operations/ListTransactionEventsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response diff --git a/docs/sdks/giftcards/README.md b/docs/sdks/giftcards/README.md index 2ff4d62e..ce760d76 100644 --- a/docs/sdks/giftcards/README.md +++ b/docs/sdks/giftcards/README.md @@ -48,6 +48,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `giftCardId` | *String* | :heavy_check_mark: | The ID of the gift card. | 356d56e5-fe16-42ae-97ee-8d55d846ae2e | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -110,6 +111,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `giftCardId` | *String* | :heavy_check_mark: | The ID of the gift card. | 356d56e5-fe16-42ae-97ee-8d55d846ae2e | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -177,6 +179,7 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `giftCardCreate` | [GiftCardCreate](../../models/components/GiftCardCreate.md) | :heavy_check_mark: | N/A | diff --git a/docs/sdks/jobs/README.md b/docs/sdks/jobs/README.md index f5521877..625dc9c9 100644 --- a/docs/sdks/jobs/README.md +++ b/docs/sdks/jobs/README.md @@ -50,6 +50,7 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `accountUpdaterJobCreate` | [AccountUpdaterJobCreate](../../models/components/AccountUpdaterJobCreate.md) | :heavy_check_mark: | N/A | diff --git a/docs/sdks/merchantaccounts/README.md b/docs/sdks/merchantaccounts/README.md index 2203e61f..2cd3010d 100644 --- a/docs/sdks/merchantaccounts/README.md +++ b/docs/sdks/merchantaccounts/README.md @@ -50,6 +50,7 @@ public class Application { | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | | `search` | *JsonNullable\* | :heavy_minus_sign: | The search term to filter merchant accounts by. | merchant-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | ### Response @@ -98,32 +99,30 @@ public class Application { .bearerAuth("") .build(); - MerchantAccountCreate req = MerchantAccountCreate.builder() - .id("merchant-12345") - .displayName("Example") - .accountUpdaterRequestEncryptionKey("key-1234") - .accountUpdaterRequestEncryptionKeyId("key-id-1234") - .accountUpdaterResponseDecryptionKey("key-1234") - .accountUpdaterResponseDecryptionKeyId("key-id-1234") - .overCaptureAmount(1299L) - .overCapturePercentage(25L) - .loonClientKey("client-key-1234") - .loonSecretKey("key-12345") - .loonAcceptedSchemes(List.of( - CardScheme.VISA)) - .visaNetworkTokensRequestorId("id-12345") - .visaNetworkTokensAppId("id-12345") - .amexNetworkTokensRequestorId("id-12345") - .amexNetworkTokensAppId("id-12345") - .mastercardNetworkTokensRequestorId("id-12345") - .mastercardNetworkTokensAppId("id-12345") - .outboundWebhookUrl("https://example.com/callback") - .outboundWebhookUsername("user-12345") - .outboundWebhookPassword("password-12345") - .build(); - CreateMerchantAccountResponse res = sdk.merchantAccounts().create() - .request(req) + .merchantAccountCreate(MerchantAccountCreate.builder() + .id("merchant-12345") + .displayName("Example") + .accountUpdaterRequestEncryptionKey("key-1234") + .accountUpdaterRequestEncryptionKeyId("key-id-1234") + .accountUpdaterResponseDecryptionKey("key-1234") + .accountUpdaterResponseDecryptionKeyId("key-id-1234") + .overCaptureAmount(1299L) + .overCapturePercentage(25L) + .loonClientKey("client-key-1234") + .loonSecretKey("key-12345") + .loonAcceptedSchemes(List.of( + CardScheme.VISA)) + .visaNetworkTokensRequestorId("id-12345") + .visaNetworkTokensAppId("id-12345") + .amexNetworkTokensRequestorId("id-12345") + .amexNetworkTokensAppId("id-12345") + .mastercardNetworkTokensRequestorId("id-12345") + .mastercardNetworkTokensAppId("id-12345") + .outboundWebhookUrl("https://example.com/callback") + .outboundWebhookUsername("user-12345") + .outboundWebhookPassword("password-12345") + .build()) .call(); if (res.merchantAccount().isPresent()) { @@ -135,9 +134,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `request` | [MerchantAccountCreate](../../models/shared/MerchantAccountCreate.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | +| `merchantAccountCreate` | [MerchantAccountCreate](../../models/components/MerchantAccountCreate.md) | :heavy_check_mark: | N/A | ### Response @@ -199,6 +199,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | | `merchantAccountId` | *String* | :heavy_check_mark: | The ID of the merchant account | merchant-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | ### Response @@ -285,6 +286,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `merchantAccountId` | *String* | :heavy_check_mark: | The ID of the merchant account | merchant-12345 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountUpdate` | [MerchantAccountUpdate](../../models/components/MerchantAccountUpdate.md) | :heavy_check_mark: | N/A | | ### Response diff --git a/docs/sdks/networktokens/README.md b/docs/sdks/networktokens/README.md index 5ef62c95..a9e35838 100644 --- a/docs/sdks/networktokens/README.md +++ b/docs/sdks/networktokens/README.md @@ -49,6 +49,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -117,6 +118,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `networkTokenCreate` | [NetworkTokenCreate](../../models/components/NetworkTokenCreate.md) | :heavy_check_mark: | N/A | | @@ -182,6 +184,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -246,6 +249,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -308,6 +312,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `networkTokenId` | *String* | :heavy_check_mark: | The ID of the network token | f8dd5cfc-7834-4847-95dc-f75a360e2298 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/docs/sdks/paymentmethods/README.md b/docs/sdks/paymentmethods/README.md index 41fb04c8..caad8e7c 100644 --- a/docs/sdks/paymentmethods/README.md +++ b/docs/sdks/paymentmethods/README.md @@ -122,6 +122,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `requestBody` | [Body](../../models/operations/Body.md) | :heavy_check_mark: | N/A | @@ -185,6 +186,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -245,6 +247,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/docs/sdks/paymentoptions/README.md b/docs/sdks/paymentoptions/README.md index b9e04d46..8e707648 100644 --- a/docs/sdks/paymentoptions/README.md +++ b/docs/sdks/paymentoptions/README.md @@ -54,6 +54,7 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `paymentOptionRequest` | [PaymentOptionRequest](../../models/components/PaymentOptionRequest.md) | :heavy_check_mark: | N/A | diff --git a/docs/sdks/paymentservicedefinitions/README.md b/docs/sdks/paymentservicedefinitions/README.md index a53ea37d..c2011b43 100644 --- a/docs/sdks/paymentservicedefinitions/README.md +++ b/docs/sdks/paymentservicedefinitions/README.md @@ -47,6 +47,7 @@ public class Application { | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | ### Response @@ -108,6 +109,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | | `paymentServiceDefinitionId` | *String* | :heavy_check_mark: | N/A | adyen-ideal | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | ### Response @@ -172,6 +174,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | | `paymentServiceDefinitionId` | *String* | :heavy_check_mark: | N/A | adyen-ideal | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `requestBody` | Map\ | :heavy_check_mark: | N/A | | ### Response diff --git a/docs/sdks/paymentservices/README.md b/docs/sdks/paymentservices/README.md index f480762d..ee0ecdb3 100644 --- a/docs/sdks/paymentservices/README.md +++ b/docs/sdks/paymentservices/README.md @@ -182,6 +182,7 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `paymentServiceCreate` | [PaymentServiceCreate](../../models/components/PaymentServiceCreate.md) | :heavy_check_mark: | N/A | @@ -245,6 +246,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -328,6 +330,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `paymentServiceUpdate` | [PaymentServiceUpdate](../../models/components/PaymentServiceUpdate.md) | :heavy_check_mark: | N/A | | @@ -391,6 +394,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -458,6 +462,7 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `verifyCredentials` | [VerifyCredentials](../../models/components/VerifyCredentials.md) | :heavy_check_mark: | N/A | @@ -524,6 +529,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentServiceId` | *String* | :heavy_check_mark: | the ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `requestBody` | Map\ | :heavy_check_mark: | N/A | | diff --git a/docs/sdks/paymentservicetokens/README.md b/docs/sdks/paymentservicetokens/README.md index 03af4d1a..6fb4f57b 100644 --- a/docs/sdks/paymentservicetokens/README.md +++ b/docs/sdks/paymentservicetokens/README.md @@ -49,6 +49,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `paymentServiceId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the payment service | fffd152a-9532-4087-9a4f-de58754210f0 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -117,6 +118,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `paymentServiceTokenCreate` | [PaymentServiceTokenCreate](../../models/components/PaymentServiceTokenCreate.md) | :heavy_check_mark: | N/A | | @@ -180,6 +182,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `paymentMethodId` | *String* | :heavy_check_mark: | The ID of the payment method | ef9496d8-53a5-4aad-8ca2-00eb68334389 | | `paymentServiceTokenId` | *String* | :heavy_check_mark: | The ID of the payment service token | 703f2d99-3fd1-44bc-9cbd-a25a2d597886 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/docs/sdks/payouts/README.md b/docs/sdks/payouts/README.md index 642f2e61..6fc5bbf4 100644 --- a/docs/sdks/payouts/README.md +++ b/docs/sdks/payouts/README.md @@ -47,6 +47,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | | `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are at returned. | 20 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -170,6 +171,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `payoutCreate` | [PayoutCreate](../../models/components/PayoutCreate.md) | :heavy_check_mark: | N/A | @@ -233,6 +235,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `payoutId` | *String* | :heavy_check_mark: | N/A | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | ### Response diff --git a/docs/sdks/refunds/README.md b/docs/sdks/refunds/README.md index 25b26769..77891c5e 100644 --- a/docs/sdks/refunds/README.md +++ b/docs/sdks/refunds/README.md @@ -45,6 +45,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `refundId` | *String* | :heavy_check_mark: | N/A | 6a1d4e46-14ed-4fe1-a45f-eff4e025d211 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 2413ba19..649f8660 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -49,6 +49,7 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `googlePaySessionRequest` | [GooglePaySessionRequest](../../models/components/GooglePaySessionRequest.md) | :heavy_check_mark: | N/A | @@ -115,6 +116,7 @@ public class Application { | Parameter | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | `applePaySessionRequest` | [ApplePaySessionRequest](../../models/components/ApplePaySessionRequest.md) | :heavy_check_mark: | N/A | @@ -163,12 +165,10 @@ public class Application { .bearerAuth("") .build(); - ClickToPaySessionRequest req = ClickToPaySessionRequest.builder() - .checkoutSessionId("4137b1cf-39ac-42a8-bad6-1c680d5dab6b") - .build(); - CreateClickToPayDigitalWalletSessionResponse res = sdk.digitalWallets().sessions().clickToPay() - .request(req) + .clickToPaySessionRequest(ClickToPaySessionRequest.builder() + .checkoutSessionId("4137b1cf-39ac-42a8-bad6-1c680d5dab6b") + .build()) .call(); if (res.clickToPaySession().isPresent()) { @@ -180,9 +180,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `request` | [ClickToPaySessionRequest](../../models/shared/ClickToPaySessionRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | +| `clickToPaySessionRequest` | [ClickToPaySessionRequest](../../models/components/ClickToPaySessionRequest.md) | :heavy_check_mark: | N/A | ### Response diff --git a/docs/sdks/shippingdetails/README.md b/docs/sdks/shippingdetails/README.md index 29a224f0..c4ab73a7 100644 --- a/docs/sdks/shippingdetails/README.md +++ b/docs/sdks/shippingdetails/README.md @@ -68,6 +68,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to add shipping details to. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `shippingDetailsCreate` | [ShippingDetailsCreate](../../models/components/ShippingDetailsCreate.md) | :heavy_check_mark: | N/A | | @@ -131,6 +132,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -195,6 +197,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | | `shippingDetailsId` | *String* | :heavy_check_mark: | The ID of the shipping details to retrieve. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -232,6 +235,7 @@ import com.gr4vy.sdk.Gr4vy; import com.gr4vy.sdk.models.components.Address; import com.gr4vy.sdk.models.components.ShippingDetailsUpdate; import com.gr4vy.sdk.models.errors.*; +import com.gr4vy.sdk.models.operations.UpdateBuyerShippingDetailsRequest; import com.gr4vy.sdk.models.operations.UpdateBuyerShippingDetailsResponse; import java.lang.Exception; @@ -243,7 +247,7 @@ public class Application { .bearerAuth("") .build(); - UpdateBuyerShippingDetailsResponse res = sdk.buyers().shippingDetails().update() + UpdateBuyerShippingDetailsRequest req = UpdateBuyerShippingDetailsRequest.builder() .buyerId("fe26475d-ec3e-4884-9553-f7356683f7f9") .shippingDetailsId("bf8c36ad-02d9-4904-b0f9-a230b149e341") .shippingDetailsUpdate(ShippingDetailsUpdate.builder() @@ -263,6 +267,10 @@ public class Application { .organization("Gr4vy") .build()) .build()) + .build(); + + UpdateBuyerShippingDetailsResponse res = sdk.buyers().shippingDetails().update() + .request(req) .call(); if (res.shippingDetails().isPresent()) { @@ -274,12 +282,9 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to update shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | -| `shippingDetailsId` | *String* | :heavy_check_mark: | The ID of the shipping details to update. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | -| `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | -| `shippingDetailsUpdate` | [ShippingDetailsUpdate](../../models/components/ShippingDetailsUpdate.md) | :heavy_check_mark: | N/A | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [UpdateBuyerShippingDetailsRequest](../../models/operations/UpdateBuyerShippingDetailsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response @@ -343,6 +348,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `buyerId` | *String* | :heavy_check_mark: | The ID of the buyer to delete shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 | | `shippingDetailsId` | *String* | :heavy_check_mark: | The ID of the shipping details to delete. | bf8c36ad-02d9-4904-b0f9-a230b149e341 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 9efe9d9b..315c03c2 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -419,6 +419,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `idempotencyKey` | *JsonNullable\* | :heavy_minus_sign: | A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. | request-12345 | | `transactionCreate` | [TransactionCreate](../../models/components/TransactionCreate.md) | :heavy_check_mark: | N/A | | @@ -483,6 +484,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -636,6 +638,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `transactionCapture` | [TransactionCapture](../../models/components/TransactionCapture.md) | :heavy_check_mark: | N/A | | @@ -699,6 +702,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -761,6 +765,7 @@ public class Application { | Parameter | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | ### Response diff --git a/docs/sdks/transactionsrefunds/README.md b/docs/sdks/transactionsrefunds/README.md index d9fc38d5..207af6d6 100644 --- a/docs/sdks/transactionsrefunds/README.md +++ b/docs/sdks/transactionsrefunds/README.md @@ -47,6 +47,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response @@ -116,6 +117,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | | `transactionRefundCreate` | [TransactionRefundCreate](../../models/components/TransactionRefundCreate.md) | :heavy_check_mark: | N/A | | @@ -181,6 +183,7 @@ public class Application { | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `transactionId` | *String* | :heavy_check_mark: | N/A | 7099948d-7286-47e4-aad8-b68f7eb44591 | | `refundId` | *String* | :heavy_check_mark: | N/A | 6a1d4e46-14ed-4fe1-a45f-eff4e025d211 | +| `applicationName` | *Optional\* | :heavy_minus_sign: | N/A | | | `merchantAccountId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | | ### Response diff --git a/gradle.properties b/gradle.properties index bbdc880b..3a2d7919 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ groupId=com.gr4vy artifactId=sdk -version=1.0.0-beta.3 \ No newline at end of file +version=1.0.0-beta.4 \ No newline at end of file diff --git a/src/main/java/com/gr4vy/sdk/All.java b/src/main/java/com/gr4vy/sdk/All.java index 1b2bb4c5..1aaffb9c 100644 --- a/src/main/java/com/gr4vy/sdk/All.java +++ b/src/main/java/com/gr4vy/sdk/All.java @@ -4,7 +4,7 @@ package com.gr4vy.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import com.gr4vy.sdk.models.components.CollectionNoCursorRefund; +import com.gr4vy.sdk.models.components.CollectionRefund; import com.gr4vy.sdk.models.components.TransactionRefundAllCreate; import com.gr4vy.sdk.models.errors.APIException; import com.gr4vy.sdk.models.errors.Error400; @@ -73,7 +73,7 @@ public CreateFullTransactionRefundRequestBuilder create() { */ public CreateFullTransactionRefundResponse create( String transactionId) throws Exception { - return create(transactionId, JsonNullable.undefined(), JsonNullable.undefined()); + return create(transactionId, Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -82,6 +82,7 @@ public CreateFullTransactionRefundResponse create( *

Create a refund for all instruments on a transaction. * * @param transactionId + * @param applicationName * @param merchantAccountId * @param transactionRefundAllCreate * @return The response from the API call @@ -89,12 +90,14 @@ public CreateFullTransactionRefundResponse create( */ public CreateFullTransactionRefundResponse create( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, JsonNullable transactionRefundAllCreate) throws Exception { CreateFullTransactionRefundRequest request = CreateFullTransactionRefundRequest .builder() .transactionId(transactionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .transactionRefundAllCreate(transactionRefundAllCreate) .build(); @@ -121,6 +124,11 @@ public CreateFullTransactionRefundResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateFullTransactionRefundRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -189,10 +197,10 @@ public CreateFullTransactionRefundResponse create( if (Utils.statusCodeMatches(_httpRes.statusCode(), "201")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - CollectionNoCursorRefund _out = Utils.mapper().readValue( + CollectionRefund _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withCollectionNoCursorRefund(Optional.ofNullable(_out)); + new TypeReference() {}); + _res.withCollectionRefund(Optional.ofNullable(_out)); return _res; } else { throw new APIException( diff --git a/src/main/java/com/gr4vy/sdk/AuditLogs.java b/src/main/java/com/gr4vy/sdk/AuditLogs.java index 22af7654..cbb63d7e 100644 --- a/src/main/java/com/gr4vy/sdk/AuditLogs.java +++ b/src/main/java/com/gr4vy/sdk/AuditLogs.java @@ -217,6 +217,7 @@ public ListAuditLogsResponse list( request.limit(), request.action(), request.userId(), + request.applicationName(), request.resourceType(), request.merchantAccountId() )); diff --git a/src/main/java/com/gr4vy/sdk/Balances.java b/src/main/java/com/gr4vy/sdk/Balances.java index 6a456df6..404d3b2c 100644 --- a/src/main/java/com/gr4vy/sdk/Balances.java +++ b/src/main/java/com/gr4vy/sdk/Balances.java @@ -73,7 +73,7 @@ public ListGiftCardBalancesRequestBuilder list() { */ public ListGiftCardBalancesResponse list( GiftCardBalanceRequest giftCardBalanceRequest) throws Exception { - return list(JsonNullable.undefined(), giftCardBalanceRequest); + return list(Optional.empty(), JsonNullable.undefined(), giftCardBalanceRequest); } /** @@ -81,17 +81,20 @@ public ListGiftCardBalancesResponse list( * *

Fetch the balances for one or more gift cards. * + * @param applicationName * @param merchantAccountId * @param giftCardBalanceRequest * @return The response from the API call * @throws Exception if the API call fails */ public ListGiftCardBalancesResponse list( + Optional applicationName, JsonNullable merchantAccountId, GiftCardBalanceRequest giftCardBalanceRequest) throws Exception { ListGiftCardBalancesRequest request = ListGiftCardBalancesRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .giftCardBalanceRequest(giftCardBalanceRequest) .build(); @@ -119,6 +122,11 @@ public ListGiftCardBalancesResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListGiftCardBalancesRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/Buyers.java b/src/main/java/com/gr4vy/sdk/Buyers.java index 03ca0ca3..7844d733 100644 --- a/src/main/java/com/gr4vy/sdk/Buyers.java +++ b/src/main/java/com/gr4vy/sdk/Buyers.java @@ -257,6 +257,7 @@ public ListBuyersResponse list( request.limit(), request.search(), request.externalIdentifier(), + request.applicationName(), request.merchantAccountId() )); return Optional.of(_nextRequest.call()); @@ -518,7 +519,7 @@ public AddBuyerRequestBuilder create() { */ public AddBuyerResponse create( BuyerCreate buyerCreate) throws Exception { - return create(JsonNullable.undefined(), buyerCreate); + return create(Optional.empty(), JsonNullable.undefined(), buyerCreate); } /** @@ -526,17 +527,20 @@ public AddBuyerResponse create( * *

Create a new buyer record. * + * @param applicationName * @param merchantAccountId * @param buyerCreate Request body for creating a new buyer * @return The response from the API call * @throws Exception if the API call fails */ public AddBuyerResponse create( + Optional applicationName, JsonNullable merchantAccountId, BuyerCreate buyerCreate) throws Exception { AddBuyerRequest request = AddBuyerRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .buyerCreate(buyerCreate) .build(); @@ -564,6 +568,11 @@ public AddBuyerResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + AddBuyerRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -884,7 +893,7 @@ public GetBuyerRequestBuilder get() { */ public GetBuyerResponse get( String buyerId) throws Exception { - return get(buyerId, JsonNullable.undefined(), Optional.empty()); + return get(buyerId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -893,6 +902,7 @@ public GetBuyerResponse get( *

Fetches a buyer by its ID. * * @param buyerId The ID of the buyer to retrieve. + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -900,6 +910,7 @@ public GetBuyerResponse get( */ public GetBuyerResponse get( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -910,6 +921,7 @@ public GetBuyerResponse get( GetBuyerRequest .builder() .buyerId(buyerId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -925,6 +937,11 @@ public GetBuyerResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetBuyerRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1262,7 +1279,7 @@ public UpdateBuyerRequestBuilder update() { public UpdateBuyerResponse update( String buyerId, BuyerUpdate buyerUpdate) throws Exception { - return update(buyerId, JsonNullable.undefined(), buyerUpdate); + return update(buyerId, Optional.empty(), JsonNullable.undefined(), buyerUpdate); } /** @@ -1271,6 +1288,7 @@ public UpdateBuyerResponse update( *

Updates a buyer record. * * @param buyerId The ID of the buyer to edit. + * @param applicationName * @param merchantAccountId * @param buyerUpdate Request body for updating an existing buyer * @return The response from the API call @@ -1278,12 +1296,14 @@ public UpdateBuyerResponse update( */ public UpdateBuyerResponse update( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, BuyerUpdate buyerUpdate) throws Exception { UpdateBuyerRequest request = UpdateBuyerRequest .builder() .buyerId(buyerId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .buyerUpdate(buyerUpdate) .build(); @@ -1313,6 +1333,11 @@ public UpdateBuyerResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + UpdateBuyerRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1633,7 +1658,7 @@ public DeleteBuyerRequestBuilder delete() { */ public DeleteBuyerResponse delete( String buyerId) throws Exception { - return delete(buyerId, JsonNullable.undefined()); + return delete(buyerId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1642,17 +1667,20 @@ public DeleteBuyerResponse delete( *

Permanently removes a buyer record. * * @param buyerId The ID of the buyer to delete. + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public DeleteBuyerResponse delete( String buyerId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeleteBuyerRequest request = DeleteBuyerRequest .builder() .buyerId(buyerId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1668,6 +1696,11 @@ public DeleteBuyerResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeleteBuyerRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java b/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java index 5252f1d2..46a26233 100644 --- a/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java +++ b/src/main/java/com/gr4vy/sdk/BuyersGiftCards.java @@ -75,7 +75,7 @@ public ListBuyerGiftCardsRequestBuilder list() { * @throws Exception if the API call fails */ public ListBuyerGiftCardsResponse listDirect() throws Exception { - return list(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); + return list(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -85,6 +85,7 @@ public ListBuyerGiftCardsResponse listDirect() throws Exception { * * @param buyerExternalIdentifier * @param buyerId + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -93,6 +94,7 @@ public ListBuyerGiftCardsResponse listDirect() throws Exception { public ListBuyerGiftCardsResponse list( JsonNullable buyerExternalIdentifier, JsonNullable buyerId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -104,6 +106,7 @@ public ListBuyerGiftCardsResponse list( .builder() .buyerExternalIdentifier(buyerExternalIdentifier) .buyerId(buyerId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); diff --git a/src/main/java/com/gr4vy/sdk/CardSchemeDefinitions.java b/src/main/java/com/gr4vy/sdk/CardSchemeDefinitions.java index 08acf9b2..b9a565e5 100644 --- a/src/main/java/com/gr4vy/sdk/CardSchemeDefinitions.java +++ b/src/main/java/com/gr4vy/sdk/CardSchemeDefinitions.java @@ -75,7 +75,7 @@ public ListCardSchemeDefinitionsRequestBuilder list() { * @throws Exception if the API call fails */ public ListCardSchemeDefinitionsResponse listDirect() throws Exception { - return list(JsonNullable.undefined(), Optional.empty()); + return list(Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -83,12 +83,14 @@ public ListCardSchemeDefinitionsResponse listDirect() throws Exception { * *

Fetch a list of the definitions of each card scheme. * + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call * @throws Exception if the API call fails */ public ListCardSchemeDefinitionsResponse list( + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -98,6 +100,7 @@ public ListCardSchemeDefinitionsResponse list( ListCardSchemeDefinitionsRequest request = ListCardSchemeDefinitionsRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -111,6 +114,11 @@ public ListCardSchemeDefinitionsResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListCardSchemeDefinitionsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/CheckoutSessions.java b/src/main/java/com/gr4vy/sdk/CheckoutSessions.java index a61cade8..a8777104 100644 --- a/src/main/java/com/gr4vy/sdk/CheckoutSessions.java +++ b/src/main/java/com/gr4vy/sdk/CheckoutSessions.java @@ -91,7 +91,7 @@ public CreateCheckoutSessionRequestBuilder create() { * @throws Exception if the API call fails */ public CreateCheckoutSessionResponse createDirect() throws Exception { - return create(JsonNullable.undefined(), Optional.empty()); + return create(Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -99,17 +99,20 @@ public CreateCheckoutSessionResponse createDirect() throws Exception { * *

Create a new checkout session. * + * @param applicationName * @param merchantAccountId * @param checkoutSessionCreate * @return The response from the API call * @throws Exception if the API call fails */ public CreateCheckoutSessionResponse create( + Optional applicationName, JsonNullable merchantAccountId, Optional checkoutSessionCreate) throws Exception { CreateCheckoutSessionRequest request = CreateCheckoutSessionRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .checkoutSessionCreate(checkoutSessionCreate) .build(); @@ -134,6 +137,11 @@ public CreateCheckoutSessionResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateCheckoutSessionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -456,7 +464,7 @@ public UpdateCheckoutSessionRequestBuilder update() { public UpdateCheckoutSessionResponse update( String sessionId, CheckoutSessionCreate checkoutSessionCreate) throws Exception { - return update(sessionId, JsonNullable.undefined(), checkoutSessionCreate); + return update(sessionId, Optional.empty(), JsonNullable.undefined(), checkoutSessionCreate); } /** @@ -465,6 +473,7 @@ public UpdateCheckoutSessionResponse update( *

Update the information stored on a checkout session. * * @param sessionId The ID of the checkout session. + * @param applicationName * @param merchantAccountId * @param checkoutSessionCreate * @return The response from the API call @@ -472,12 +481,14 @@ public UpdateCheckoutSessionResponse update( */ public UpdateCheckoutSessionResponse update( String sessionId, + Optional applicationName, JsonNullable merchantAccountId, CheckoutSessionCreate checkoutSessionCreate) throws Exception { UpdateCheckoutSessionRequest request = UpdateCheckoutSessionRequest .builder() .sessionId(sessionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .checkoutSessionCreate(checkoutSessionCreate) .build(); @@ -507,6 +518,11 @@ public UpdateCheckoutSessionResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + UpdateCheckoutSessionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -827,7 +843,7 @@ public GetCheckoutSessionRequestBuilder get() { */ public GetCheckoutSessionResponse get( String sessionId) throws Exception { - return get(sessionId, JsonNullable.undefined(), Optional.empty()); + return get(sessionId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -836,6 +852,7 @@ public GetCheckoutSessionResponse get( *

Retrieve the information stored on a checkout session. * * @param sessionId The ID of the checkout session. + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -843,6 +860,7 @@ public GetCheckoutSessionResponse get( */ public GetCheckoutSessionResponse get( String sessionId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -853,6 +871,7 @@ public GetCheckoutSessionResponse get( GetCheckoutSessionRequest .builder() .sessionId(sessionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -868,6 +887,11 @@ public GetCheckoutSessionResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetCheckoutSessionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1187,7 +1211,7 @@ public DeleteCheckoutSessionRequestBuilder delete() { */ public DeleteCheckoutSessionResponse delete( String sessionId) throws Exception { - return delete(sessionId, JsonNullable.undefined()); + return delete(sessionId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1196,17 +1220,20 @@ public DeleteCheckoutSessionResponse delete( *

Deleta a checkout session and all of its (PCI) data. * * @param sessionId The ID of the checkout session. + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public DeleteCheckoutSessionResponse delete( String sessionId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeleteCheckoutSessionRequest request = DeleteCheckoutSessionRequest .builder() .sessionId(sessionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1222,6 +1249,11 @@ public DeleteCheckoutSessionResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeleteCheckoutSessionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/Cryptogram.java b/src/main/java/com/gr4vy/sdk/Cryptogram.java index 0ae30c8c..05536eaa 100644 --- a/src/main/java/com/gr4vy/sdk/Cryptogram.java +++ b/src/main/java/com/gr4vy/sdk/Cryptogram.java @@ -4,7 +4,6 @@ package com.gr4vy.sdk; import com.fasterxml.jackson.core.type.TypeReference; -import com.gr4vy.sdk.models.components.CryptogramCreate; import com.gr4vy.sdk.models.errors.APIException; import com.gr4vy.sdk.models.errors.Error400; import com.gr4vy.sdk.models.errors.Error401; @@ -38,7 +37,6 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; public class Cryptogram implements MethodCallCreatePaymentMethodNetworkTokenCryptogram { @@ -66,45 +64,12 @@ public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder create() { * *

Provision a cryptogram for a network token. * - * @param paymentMethodId The ID of the payment method - * @param networkTokenId The ID of the network token - * @param cryptogramCreate + * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ public CreatePaymentMethodNetworkTokenCryptogramResponse create( - String paymentMethodId, - String networkTokenId, - CryptogramCreate cryptogramCreate) throws Exception { - return create(paymentMethodId, networkTokenId, JsonNullable.undefined(), cryptogramCreate); - } - - /** - * Provision network token cryptogram - * - *

Provision a cryptogram for a network token. - * - * @param paymentMethodId The ID of the payment method - * @param networkTokenId The ID of the network token - * @param merchantAccountId - * @param cryptogramCreate - * @return The response from the API call - * @throws Exception if the API call fails - */ - public CreatePaymentMethodNetworkTokenCryptogramResponse create( - String paymentMethodId, - String networkTokenId, - JsonNullable merchantAccountId, - CryptogramCreate cryptogramCreate) throws Exception { - CreatePaymentMethodNetworkTokenCryptogramRequest request = - CreatePaymentMethodNetworkTokenCryptogramRequest - .builder() - .paymentMethodId(paymentMethodId) - .networkTokenId(networkTokenId) - .merchantAccountId(merchantAccountId) - .cryptogramCreate(cryptogramCreate) - .build(); - + CreatePaymentMethodNetworkTokenCryptogramRequest request) throws Exception { String _baseUrl = Utils.templateUrl( this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); String _url = Utils.generateURL( @@ -117,7 +82,7 @@ public CreatePaymentMethodNetworkTokenCryptogramResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "cryptogramCreate", @@ -130,6 +95,11 @@ public CreatePaymentMethodNetworkTokenCryptogramResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePaymentMethodNetworkTokenCryptogramRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/DigitalWallets.java b/src/main/java/com/gr4vy/sdk/DigitalWallets.java index 530205c6..dffc126e 100644 --- a/src/main/java/com/gr4vy/sdk/DigitalWallets.java +++ b/src/main/java/com/gr4vy/sdk/DigitalWallets.java @@ -111,7 +111,7 @@ public ConfigureDigitalWalletRequestBuilder create() { */ public ConfigureDigitalWalletResponse create( DigitalWalletCreate digitalWalletCreate) throws Exception { - return create(JsonNullable.undefined(), digitalWalletCreate); + return create(Optional.empty(), JsonNullable.undefined(), digitalWalletCreate); } /** @@ -119,17 +119,20 @@ public ConfigureDigitalWalletResponse create( * *

Register a digital wallet like Apple Pay, Google Pay, or Click to Pay. * + * @param applicationName * @param merchantAccountId * @param digitalWalletCreate Request body for registering a new digital wallet * @return The response from the API call * @throws Exception if the API call fails */ public ConfigureDigitalWalletResponse create( + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletCreate digitalWalletCreate) throws Exception { ConfigureDigitalWalletRequest request = ConfigureDigitalWalletRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .digitalWalletCreate(digitalWalletCreate) .build(); @@ -157,6 +160,11 @@ public ConfigureDigitalWalletResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ConfigureDigitalWalletRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -475,7 +483,7 @@ public ListDigitalWalletsRequestBuilder list() { * @throws Exception if the API call fails */ public ListDigitalWalletsResponse listDirect() throws Exception { - return list(JsonNullable.undefined(), Optional.empty()); + return list(Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -483,12 +491,14 @@ public ListDigitalWalletsResponse listDirect() throws Exception { * *

List configured digital wallets. * + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call * @throws Exception if the API call fails */ public ListDigitalWalletsResponse list( + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -498,6 +508,7 @@ public ListDigitalWalletsResponse list( ListDigitalWalletsRequest request = ListDigitalWalletsRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -511,6 +522,11 @@ public ListDigitalWalletsResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListDigitalWalletsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -846,7 +862,7 @@ public GetDigitalWalletRequestBuilder get() { */ public GetDigitalWalletResponse get( String digitalWalletId) throws Exception { - return get(digitalWalletId, JsonNullable.undefined(), Optional.empty()); + return get(digitalWalletId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -855,6 +871,7 @@ public GetDigitalWalletResponse get( *

Fetch the details a digital wallet. * * @param digitalWalletId The ID of the digital wallet to read. + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -862,6 +879,7 @@ public GetDigitalWalletResponse get( */ public GetDigitalWalletResponse get( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -872,6 +890,7 @@ public GetDigitalWalletResponse get( GetDigitalWalletRequest .builder() .digitalWalletId(digitalWalletId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -887,6 +906,11 @@ public GetDigitalWalletResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetDigitalWalletRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1222,7 +1246,7 @@ public DeleteDigitalWalletRequestBuilder delete() { */ public DeleteDigitalWalletResponse delete( String digitalWalletId) throws Exception { - return delete(digitalWalletId, JsonNullable.undefined()); + return delete(digitalWalletId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1231,17 +1255,20 @@ public DeleteDigitalWalletResponse delete( *

Delete a configured digital wallet. * * @param digitalWalletId The ID of the digital wallet to delete. + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public DeleteDigitalWalletResponse delete( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeleteDigitalWalletRequest request = DeleteDigitalWalletRequest .builder() .digitalWalletId(digitalWalletId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1257,6 +1284,11 @@ public DeleteDigitalWalletResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeleteDigitalWalletRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1579,7 +1611,7 @@ public UpdateDigitalWalletRequestBuilder update() { public UpdateDigitalWalletResponse update( String digitalWalletId, DigitalWalletUpdate digitalWalletUpdate) throws Exception { - return update(digitalWalletId, JsonNullable.undefined(), digitalWalletUpdate); + return update(digitalWalletId, Optional.empty(), JsonNullable.undefined(), digitalWalletUpdate); } /** @@ -1588,6 +1620,7 @@ public UpdateDigitalWalletResponse update( *

Update a digital wallet. * * @param digitalWalletId The ID of the digital wallet to edit. + * @param applicationName * @param merchantAccountId * @param digitalWalletUpdate Request body for editing a registered digital wallet * @return The response from the API call @@ -1595,12 +1628,14 @@ public UpdateDigitalWalletResponse update( */ public UpdateDigitalWalletResponse update( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletUpdate digitalWalletUpdate) throws Exception { UpdateDigitalWalletRequest request = UpdateDigitalWalletRequest .builder() .digitalWalletId(digitalWalletId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .digitalWalletUpdate(digitalWalletUpdate) .build(); @@ -1630,6 +1665,11 @@ public UpdateDigitalWalletResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + UpdateDigitalWalletRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/Domains.java b/src/main/java/com/gr4vy/sdk/Domains.java index fbb5b3bf..dd9fce13 100644 --- a/src/main/java/com/gr4vy/sdk/Domains.java +++ b/src/main/java/com/gr4vy/sdk/Domains.java @@ -78,7 +78,7 @@ public RegisterDigitalWalletDomainRequestBuilder create() { public RegisterDigitalWalletDomainResponse create( String digitalWalletId, DigitalWalletDomain digitalWalletDomain) throws Exception { - return create(digitalWalletId, JsonNullable.undefined(), digitalWalletDomain); + return create(digitalWalletId, Optional.empty(), JsonNullable.undefined(), digitalWalletDomain); } /** @@ -87,6 +87,7 @@ public RegisterDigitalWalletDomainResponse create( *

Register a digital wallet domain (Apple Pay only). * * @param digitalWalletId The ID of the digital wallet to remove a domain for. + * @param applicationName * @param merchantAccountId * @param digitalWalletDomain * @return The response from the API call @@ -94,12 +95,14 @@ public RegisterDigitalWalletDomainResponse create( */ public RegisterDigitalWalletDomainResponse create( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletDomain digitalWalletDomain) throws Exception { RegisterDigitalWalletDomainRequest request = RegisterDigitalWalletDomainRequest .builder() .digitalWalletId(digitalWalletId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .digitalWalletDomain(digitalWalletDomain) .build(); @@ -129,6 +132,11 @@ public RegisterDigitalWalletDomainResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + RegisterDigitalWalletDomainRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -451,7 +459,7 @@ public UnregisterDigitalWalletDomainRequestBuilder delete() { public UnregisterDigitalWalletDomainResponse delete( String digitalWalletId, DigitalWalletDomain digitalWalletDomain) throws Exception { - return delete(digitalWalletId, JsonNullable.undefined(), digitalWalletDomain); + return delete(digitalWalletId, Optional.empty(), JsonNullable.undefined(), digitalWalletDomain); } /** @@ -460,6 +468,7 @@ public UnregisterDigitalWalletDomainResponse delete( *

Remove a digital wallet domain (Apple Pay only). * * @param digitalWalletId + * @param applicationName * @param merchantAccountId * @param digitalWalletDomain * @return The response from the API call @@ -467,12 +476,14 @@ public UnregisterDigitalWalletDomainResponse delete( */ public UnregisterDigitalWalletDomainResponse delete( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletDomain digitalWalletDomain) throws Exception { UnregisterDigitalWalletDomainRequest request = UnregisterDigitalWalletDomainRequest .builder() .digitalWalletId(digitalWalletId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .digitalWalletDomain(digitalWalletDomain) .build(); @@ -502,6 +513,11 @@ public UnregisterDigitalWalletDomainResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + UnregisterDigitalWalletDomainRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/Events.java b/src/main/java/com/gr4vy/sdk/Events.java index a6a1a58a..438041a4 100644 --- a/src/main/java/com/gr4vy/sdk/Events.java +++ b/src/main/java/com/gr4vy/sdk/Events.java @@ -35,7 +35,6 @@ import com.gr4vy.sdk.utils.Utils; import java.io.InputStream; import java.lang.Exception; -import java.lang.Long; import java.lang.String; import java.net.http.HttpRequest; import java.net.http.HttpResponse; @@ -44,7 +43,6 @@ import java.util.List; import java.util.Optional; import java.util.concurrent.TimeUnit; -import org.openapitools.jackson.nullable.JsonNullable; public class Events implements MethodCallListTransactionEvents { @@ -72,13 +70,13 @@ public ListTransactionEventsRequestBuilder list() { * *

Fetch a list of events for a transaction. * - * @param transactionId + * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ public ListTransactionEventsResponse list( - String transactionId) throws Exception { - return list(transactionId, JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty()); + ListTransactionEventsRequest request) throws Exception { + return list(request, Optional.empty()); } /** @@ -86,33 +84,18 @@ public ListTransactionEventsResponse list( * *

Fetch a list of events for a transaction. * - * @param transactionId - * @param cursor A pointer to the page of results to return. - * @param limit The maximum number of items that are at returned. - * @param merchantAccountId + * @param request The request object containing all of the parameters for the API call. * @param options additional options * @return The response from the API call * @throws Exception if the API call fails */ public ListTransactionEventsResponse list( - String transactionId, - JsonNullable cursor, - Optional limit, - JsonNullable merchantAccountId, + ListTransactionEventsRequest request, Optional options) throws Exception { if (options.isPresent()) { options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } - ListTransactionEventsRequest request = - ListTransactionEventsRequest - .builder() - .transactionId(transactionId) - .cursor(cursor) - .limit(limit) - .merchantAccountId(merchantAccountId) - .build(); - String _baseUrl = Utils.templateUrl( this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); String _url = Utils.generateURL( diff --git a/src/main/java/com/gr4vy/sdk/GiftCards.java b/src/main/java/com/gr4vy/sdk/GiftCards.java index 5135ea30..0090cbbf 100644 --- a/src/main/java/com/gr4vy/sdk/GiftCards.java +++ b/src/main/java/com/gr4vy/sdk/GiftCards.java @@ -106,7 +106,7 @@ public GetGiftCardRequestBuilder get() { */ public GetGiftCardResponse get( String giftCardId) throws Exception { - return get(giftCardId, JsonNullable.undefined(), Optional.empty()); + return get(giftCardId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -115,6 +115,7 @@ public GetGiftCardResponse get( *

Fetch details about a gift card. * * @param giftCardId The ID of the gift card. + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -122,6 +123,7 @@ public GetGiftCardResponse get( */ public GetGiftCardResponse get( String giftCardId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -132,6 +134,7 @@ public GetGiftCardResponse get( GetGiftCardRequest .builder() .giftCardId(giftCardId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -147,6 +150,11 @@ public GetGiftCardResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetGiftCardRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -482,7 +490,7 @@ public DeleteGiftCardRequestBuilder delete() { */ public DeleteGiftCardResponse delete( String giftCardId) throws Exception { - return delete(giftCardId, JsonNullable.undefined()); + return delete(giftCardId, Optional.empty(), JsonNullable.undefined()); } /** @@ -491,17 +499,20 @@ public DeleteGiftCardResponse delete( *

Removes a gift card from our system. * * @param giftCardId The ID of the gift card. + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public DeleteGiftCardResponse delete( String giftCardId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeleteGiftCardRequest request = DeleteGiftCardRequest .builder() .giftCardId(giftCardId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -517,6 +528,11 @@ public DeleteGiftCardResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeleteGiftCardRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -837,7 +853,7 @@ public CreateGiftCardRequestBuilder create() { */ public CreateGiftCardResponse create( GiftCardCreate giftCardCreate) throws Exception { - return create(JsonNullable.undefined(), giftCardCreate); + return create(Optional.empty(), JsonNullable.undefined(), giftCardCreate); } /** @@ -845,17 +861,20 @@ public CreateGiftCardResponse create( * *

Store a new gift card in the vault. * + * @param applicationName * @param merchantAccountId * @param giftCardCreate * @return The response from the API call * @throws Exception if the API call fails */ public CreateGiftCardResponse create( + Optional applicationName, JsonNullable merchantAccountId, GiftCardCreate giftCardCreate) throws Exception { CreateGiftCardRequest request = CreateGiftCardRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .giftCardCreate(giftCardCreate) .build(); @@ -883,6 +902,11 @@ public CreateGiftCardResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateGiftCardRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1337,6 +1361,7 @@ public ListGiftCardsResponse list( request.buyerId(), JsonNullable.of(_nextCursor), request.limit(), + request.applicationName(), request.merchantAccountId() )); return Optional.of(_nextRequest.call()); diff --git a/src/main/java/com/gr4vy/sdk/Jobs.java b/src/main/java/com/gr4vy/sdk/Jobs.java index bba90223..226bfba8 100644 --- a/src/main/java/com/gr4vy/sdk/Jobs.java +++ b/src/main/java/com/gr4vy/sdk/Jobs.java @@ -73,7 +73,7 @@ public CreateAccountUpdaterJobRequestBuilder create() { */ public CreateAccountUpdaterJobResponse create( AccountUpdaterJobCreate accountUpdaterJobCreate) throws Exception { - return create(JsonNullable.undefined(), accountUpdaterJobCreate); + return create(Optional.empty(), JsonNullable.undefined(), accountUpdaterJobCreate); } /** @@ -81,17 +81,20 @@ public CreateAccountUpdaterJobResponse create( * *

Schedule one or more stored cards for an account update. * + * @param applicationName * @param merchantAccountId * @param accountUpdaterJobCreate * @return The response from the API call * @throws Exception if the API call fails */ public CreateAccountUpdaterJobResponse create( + Optional applicationName, JsonNullable merchantAccountId, AccountUpdaterJobCreate accountUpdaterJobCreate) throws Exception { CreateAccountUpdaterJobRequest request = CreateAccountUpdaterJobRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .accountUpdaterJobCreate(accountUpdaterJobCreate) .build(); @@ -119,6 +122,11 @@ public CreateAccountUpdaterJobResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateAccountUpdaterJobRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/MerchantAccounts.java b/src/main/java/com/gr4vy/sdk/MerchantAccounts.java index 6c27fd26..97d50b84 100644 --- a/src/main/java/com/gr4vy/sdk/MerchantAccounts.java +++ b/src/main/java/com/gr4vy/sdk/MerchantAccounts.java @@ -21,6 +21,7 @@ import com.gr4vy.sdk.models.errors.Error502; import com.gr4vy.sdk.models.errors.Error504; import com.gr4vy.sdk.models.errors.HTTPValidationError; +import com.gr4vy.sdk.models.operations.CreateMerchantAccountRequest; import com.gr4vy.sdk.models.operations.CreateMerchantAccountRequestBuilder; import com.gr4vy.sdk.models.operations.CreateMerchantAccountResponse; import com.gr4vy.sdk.models.operations.GetMerchantAccountRequest; @@ -99,7 +100,7 @@ public ListMerchantAccountsRequestBuilder list() { * @throws Exception if the API call fails */ public ListMerchantAccountsResponse listDirect() throws Exception { - return list(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty()); + return list(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), Optional.empty()); } /** @@ -110,6 +111,7 @@ public ListMerchantAccountsResponse listDirect() throws Exception { * @param cursor A pointer to the page of results to return. * @param limit The maximum number of items that are at returned. * @param search The search term to filter merchant accounts by. + * @param applicationName * @param options additional options * @return The response from the API call * @throws Exception if the API call fails @@ -118,6 +120,7 @@ public ListMerchantAccountsResponse list( JsonNullable cursor, Optional limit, JsonNullable search, + Optional applicationName, Optional options) throws Exception { if (options.isPresent()) { @@ -129,6 +132,7 @@ public ListMerchantAccountsResponse list( .cursor(cursor) .limit(limit) .search(search) + .applicationName(applicationName) .build(); String _baseUrl = Utils.templateUrl( @@ -241,7 +245,8 @@ public ListMerchantAccountsResponse list( ListMerchantAccountsRequestBuilder _nextRequest = list() .cursor(_nextCursor) .limit(limit) - .search(search); + .search(search) + .applicationName(applicationName); return Optional.of(_nextRequest.call()); }); @@ -495,12 +500,35 @@ public CreateMerchantAccountRequestBuilder create() { * *

Create a new merchant account in an instance. * - * @param request The request object containing all of the parameters for the API call. + * @param merchantAccountCreate * @return The response from the API call * @throws Exception if the API call fails */ public CreateMerchantAccountResponse create( - MerchantAccountCreate request) throws Exception { + MerchantAccountCreate merchantAccountCreate) throws Exception { + return create(Optional.empty(), merchantAccountCreate); + } + + /** + * Create a merchant account + * + *

Create a new merchant account in an instance. + * + * @param applicationName + * @param merchantAccountCreate + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateMerchantAccountResponse create( + Optional applicationName, + MerchantAccountCreate merchantAccountCreate) throws Exception { + CreateMerchantAccountRequest request = + CreateMerchantAccountRequest + .builder() + .applicationName(applicationName) + .merchantAccountCreate(merchantAccountCreate) + .build(); + String _baseUrl = Utils.templateUrl( this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); String _url = Utils.generateURL( @@ -511,10 +539,10 @@ public CreateMerchantAccountResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, - "request", + "merchantAccountCreate", "json", false); if (_serializedRequestBody == null) { @@ -524,6 +552,11 @@ public CreateMerchantAccountResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateMerchantAccountRequest.class, + request, + this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); Utils.configureSecurity(_req, @@ -843,7 +876,7 @@ public GetMerchantAccountRequestBuilder get() { */ public GetMerchantAccountResponse get( String merchantAccountId) throws Exception { - return get(merchantAccountId, Optional.empty()); + return get(merchantAccountId, Optional.empty(), Optional.empty()); } /** @@ -852,12 +885,14 @@ public GetMerchantAccountResponse get( *

Get info about a merchant account in an instance. * * @param merchantAccountId The ID of the merchant account + * @param applicationName * @param options additional options * @return The response from the API call * @throws Exception if the API call fails */ public GetMerchantAccountResponse get( String merchantAccountId, + Optional applicationName, Optional options) throws Exception { if (options.isPresent()) { @@ -867,6 +902,7 @@ public GetMerchantAccountResponse get( GetMerchantAccountRequest .builder() .merchantAccountId(merchantAccountId) + .applicationName(applicationName) .build(); String _baseUrl = Utils.templateUrl( @@ -881,6 +917,11 @@ public GetMerchantAccountResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetMerchantAccountRequest.class, + request, + this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); Utils.configureSecurity(_req, @@ -1217,10 +1258,29 @@ public UpdateMerchantAccountRequestBuilder update() { public UpdateMerchantAccountResponse update( String merchantAccountId, MerchantAccountUpdate merchantAccountUpdate) throws Exception { + return update(merchantAccountId, Optional.empty(), merchantAccountUpdate); + } + + /** + * Update a merchant account + * + *

Update info for a merchant account in an instance. + * + * @param merchantAccountId The ID of the merchant account + * @param applicationName + * @param merchantAccountUpdate + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateMerchantAccountResponse update( + String merchantAccountId, + Optional applicationName, + MerchantAccountUpdate merchantAccountUpdate) throws Exception { UpdateMerchantAccountRequest request = UpdateMerchantAccountRequest .builder() .merchantAccountId(merchantAccountId) + .applicationName(applicationName) .merchantAccountUpdate(merchantAccountUpdate) .build(); @@ -1249,6 +1309,11 @@ public UpdateMerchantAccountResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + UpdateMerchantAccountRequest.class, + request, + this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); Utils.configureSecurity(_req, diff --git a/src/main/java/com/gr4vy/sdk/NetworkTokens.java b/src/main/java/com/gr4vy/sdk/NetworkTokens.java index 654ee1d4..6ace9a12 100644 --- a/src/main/java/com/gr4vy/sdk/NetworkTokens.java +++ b/src/main/java/com/gr4vy/sdk/NetworkTokens.java @@ -104,7 +104,7 @@ public ListPaymentMethodNetworkTokensRequestBuilder list() { */ public ListPaymentMethodNetworkTokensResponse list( String paymentMethodId) throws Exception { - return list(paymentMethodId, JsonNullable.undefined(), Optional.empty()); + return list(paymentMethodId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -113,6 +113,7 @@ public ListPaymentMethodNetworkTokensResponse list( *

List all network tokens stored for a payment method. * * @param paymentMethodId The ID of the payment method + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -120,6 +121,7 @@ public ListPaymentMethodNetworkTokensResponse list( */ public ListPaymentMethodNetworkTokensResponse list( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -130,6 +132,7 @@ public ListPaymentMethodNetworkTokensResponse list( ListPaymentMethodNetworkTokensRequest .builder() .paymentMethodId(paymentMethodId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -145,6 +148,11 @@ public ListPaymentMethodNetworkTokensResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListPaymentMethodNetworkTokensRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -482,7 +490,7 @@ public CreatePaymentMethodNetworkTokenRequestBuilder create() { public CreatePaymentMethodNetworkTokenResponse create( String paymentMethodId, NetworkTokenCreate networkTokenCreate) throws Exception { - return create(paymentMethodId, JsonNullable.undefined(), networkTokenCreate); + return create(paymentMethodId, Optional.empty(), JsonNullable.undefined(), networkTokenCreate); } /** @@ -491,6 +499,7 @@ public CreatePaymentMethodNetworkTokenResponse create( *

Provision a network token for a payment method. * * @param paymentMethodId The ID of the payment method + * @param applicationName * @param merchantAccountId * @param networkTokenCreate * @return The response from the API call @@ -498,12 +507,14 @@ public CreatePaymentMethodNetworkTokenResponse create( */ public CreatePaymentMethodNetworkTokenResponse create( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, NetworkTokenCreate networkTokenCreate) throws Exception { CreatePaymentMethodNetworkTokenRequest request = CreatePaymentMethodNetworkTokenRequest .builder() .paymentMethodId(paymentMethodId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .networkTokenCreate(networkTokenCreate) .build(); @@ -533,6 +544,11 @@ public CreatePaymentMethodNetworkTokenResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePaymentMethodNetworkTokenRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -855,7 +871,7 @@ public SuspendPaymentMethodNetworkTokenRequestBuilder suspend() { public SuspendPaymentMethodNetworkTokenResponse suspend( String paymentMethodId, String networkTokenId) throws Exception { - return suspend(paymentMethodId, networkTokenId, JsonNullable.undefined()); + return suspend(paymentMethodId, networkTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -865,6 +881,7 @@ public SuspendPaymentMethodNetworkTokenResponse suspend( * * @param paymentMethodId The ID of the payment method * @param networkTokenId The ID of the network token + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails @@ -872,12 +889,14 @@ public SuspendPaymentMethodNetworkTokenResponse suspend( public SuspendPaymentMethodNetworkTokenResponse suspend( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { SuspendPaymentMethodNetworkTokenRequest request = SuspendPaymentMethodNetworkTokenRequest .builder() .paymentMethodId(paymentMethodId) .networkTokenId(networkTokenId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -893,6 +912,11 @@ public SuspendPaymentMethodNetworkTokenResponse suspend( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + SuspendPaymentMethodNetworkTokenRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1215,7 +1239,7 @@ public ResumePaymentMethodNetworkTokenRequestBuilder resume() { public ResumePaymentMethodNetworkTokenResponse resume( String paymentMethodId, String networkTokenId) throws Exception { - return resume(paymentMethodId, networkTokenId, JsonNullable.undefined()); + return resume(paymentMethodId, networkTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1225,6 +1249,7 @@ public ResumePaymentMethodNetworkTokenResponse resume( * * @param paymentMethodId The ID of the payment method * @param networkTokenId The ID of the network token + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails @@ -1232,12 +1257,14 @@ public ResumePaymentMethodNetworkTokenResponse resume( public ResumePaymentMethodNetworkTokenResponse resume( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { ResumePaymentMethodNetworkTokenRequest request = ResumePaymentMethodNetworkTokenRequest .builder() .paymentMethodId(paymentMethodId) .networkTokenId(networkTokenId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1253,6 +1280,11 @@ public ResumePaymentMethodNetworkTokenResponse resume( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ResumePaymentMethodNetworkTokenRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1575,7 +1607,7 @@ public DeletePaymentMethodNetworkTokenRequestBuilder delete() { public DeletePaymentMethodNetworkTokenResponse delete( String paymentMethodId, String networkTokenId) throws Exception { - return delete(paymentMethodId, networkTokenId, JsonNullable.undefined()); + return delete(paymentMethodId, networkTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1585,6 +1617,7 @@ public DeletePaymentMethodNetworkTokenResponse delete( * * @param paymentMethodId The ID of the payment method * @param networkTokenId The ID of the network token + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails @@ -1592,12 +1625,14 @@ public DeletePaymentMethodNetworkTokenResponse delete( public DeletePaymentMethodNetworkTokenResponse delete( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeletePaymentMethodNetworkTokenRequest request = DeletePaymentMethodNetworkTokenRequest .builder() .paymentMethodId(paymentMethodId) .networkTokenId(networkTokenId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1613,6 +1648,11 @@ public DeletePaymentMethodNetworkTokenResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeletePaymentMethodNetworkTokenRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/PaymentMethods.java b/src/main/java/com/gr4vy/sdk/PaymentMethods.java index a8568fdb..2c7f6d2f 100644 --- a/src/main/java/com/gr4vy/sdk/PaymentMethods.java +++ b/src/main/java/com/gr4vy/sdk/PaymentMethods.java @@ -248,6 +248,7 @@ public ListPaymentMethodsResponse list( request.buyerExternalIdentifier(), request.status(), request.externalIdentifier(), + request.applicationName(), request.merchantAccountId() )); return Optional.of(_nextRequest.call()); @@ -509,7 +510,7 @@ public CreatePaymentMethodRequestBuilder create() { */ public CreatePaymentMethodResponse create( Body requestBody) throws Exception { - return create(JsonNullable.undefined(), requestBody); + return create(Optional.empty(), JsonNullable.undefined(), requestBody); } /** @@ -517,17 +518,20 @@ public CreatePaymentMethodResponse create( * *

Store a new payment method. * + * @param applicationName * @param merchantAccountId * @param requestBody * @return The response from the API call * @throws Exception if the API call fails */ public CreatePaymentMethodResponse create( + Optional applicationName, JsonNullable merchantAccountId, Body requestBody) throws Exception { CreatePaymentMethodRequest request = CreatePaymentMethodRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .requestBody(requestBody) .build(); @@ -555,6 +559,11 @@ public CreatePaymentMethodResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePaymentMethodRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -875,7 +884,7 @@ public GetPaymentMethodRequestBuilder get() { */ public GetPaymentMethodResponse get( String paymentMethodId) throws Exception { - return get(paymentMethodId, JsonNullable.undefined(), Optional.empty()); + return get(paymentMethodId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -884,6 +893,7 @@ public GetPaymentMethodResponse get( *

Retrieve a payment method. * * @param paymentMethodId The ID of the payment method + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -891,6 +901,7 @@ public GetPaymentMethodResponse get( */ public GetPaymentMethodResponse get( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -901,6 +912,7 @@ public GetPaymentMethodResponse get( GetPaymentMethodRequest .builder() .paymentMethodId(paymentMethodId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -916,6 +928,11 @@ public GetPaymentMethodResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetPaymentMethodRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1251,7 +1268,7 @@ public DeletePaymentMethodRequestBuilder delete() { */ public DeletePaymentMethodResponse delete( String paymentMethodId) throws Exception { - return delete(paymentMethodId, JsonNullable.undefined()); + return delete(paymentMethodId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1260,17 +1277,20 @@ public DeletePaymentMethodResponse delete( *

Delete a payment method. * * @param paymentMethodId The ID of the payment method + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public DeletePaymentMethodResponse delete( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeletePaymentMethodRequest request = DeletePaymentMethodRequest .builder() .paymentMethodId(paymentMethodId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1286,6 +1306,11 @@ public DeletePaymentMethodResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeletePaymentMethodRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/PaymentOptions.java b/src/main/java/com/gr4vy/sdk/PaymentOptions.java index f454fd0e..cce277e4 100644 --- a/src/main/java/com/gr4vy/sdk/PaymentOptions.java +++ b/src/main/java/com/gr4vy/sdk/PaymentOptions.java @@ -73,7 +73,7 @@ public ListPaymentOptionsRequestBuilder list() { */ public ListPaymentOptionsResponse list( PaymentOptionRequest paymentOptionRequest) throws Exception { - return list(JsonNullable.undefined(), paymentOptionRequest); + return list(Optional.empty(), JsonNullable.undefined(), paymentOptionRequest); } /** @@ -81,17 +81,20 @@ public ListPaymentOptionsResponse list( * *

List the payment options available at checkout. filtering by country, currency, and additional fields passed to Flow rules. * + * @param applicationName * @param merchantAccountId * @param paymentOptionRequest * @return The response from the API call * @throws Exception if the API call fails */ public ListPaymentOptionsResponse list( + Optional applicationName, JsonNullable merchantAccountId, PaymentOptionRequest paymentOptionRequest) throws Exception { ListPaymentOptionsRequest request = ListPaymentOptionsRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .paymentOptionRequest(paymentOptionRequest) .build(); @@ -119,6 +122,11 @@ public ListPaymentOptionsResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListPaymentOptionsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/PaymentServiceDefinitions.java b/src/main/java/com/gr4vy/sdk/PaymentServiceDefinitions.java index c200e342..8a2e8289 100644 --- a/src/main/java/com/gr4vy/sdk/PaymentServiceDefinitions.java +++ b/src/main/java/com/gr4vy/sdk/PaymentServiceDefinitions.java @@ -96,7 +96,7 @@ public ListPaymentServiceDefinitionsRequestBuilder list() { * @throws Exception if the API call fails */ public ListPaymentServiceDefinitionsResponse listDirect() throws Exception { - return list(JsonNullable.undefined(), Optional.empty(), Optional.empty()); + return list(JsonNullable.undefined(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -106,6 +106,7 @@ public ListPaymentServiceDefinitionsResponse listDirect() throws Exception { * * @param cursor A pointer to the page of results to return. * @param limit The maximum number of items that are at returned. + * @param applicationName * @param options additional options * @return The response from the API call * @throws Exception if the API call fails @@ -113,6 +114,7 @@ public ListPaymentServiceDefinitionsResponse listDirect() throws Exception { public ListPaymentServiceDefinitionsResponse list( JsonNullable cursor, Optional limit, + Optional applicationName, Optional options) throws Exception { if (options.isPresent()) { @@ -123,6 +125,7 @@ public ListPaymentServiceDefinitionsResponse list( .builder() .cursor(cursor) .limit(limit) + .applicationName(applicationName) .build(); String _baseUrl = Utils.templateUrl( @@ -234,7 +237,8 @@ public ListPaymentServiceDefinitionsResponse list( } ListPaymentServiceDefinitionsRequestBuilder _nextRequest = list() .cursor(_nextCursor) - .limit(limit); + .limit(limit) + .applicationName(applicationName); return Optional.of(_nextRequest.call()); }); @@ -494,7 +498,7 @@ public GetPaymentServiceDefinitionRequestBuilder get() { */ public GetPaymentServiceDefinitionResponse get( String paymentServiceDefinitionId) throws Exception { - return get(paymentServiceDefinitionId, Optional.empty()); + return get(paymentServiceDefinitionId, Optional.empty(), Optional.empty()); } /** @@ -503,12 +507,14 @@ public GetPaymentServiceDefinitionResponse get( *

Get the definition of a payment service that can be configured. * * @param paymentServiceDefinitionId + * @param applicationName * @param options additional options * @return The response from the API call * @throws Exception if the API call fails */ public GetPaymentServiceDefinitionResponse get( String paymentServiceDefinitionId, + Optional applicationName, Optional options) throws Exception { if (options.isPresent()) { @@ -518,6 +524,7 @@ public GetPaymentServiceDefinitionResponse get( GetPaymentServiceDefinitionRequest .builder() .paymentServiceDefinitionId(paymentServiceDefinitionId) + .applicationName(applicationName) .build(); String _baseUrl = Utils.templateUrl( @@ -532,6 +539,11 @@ public GetPaymentServiceDefinitionResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetPaymentServiceDefinitionRequest.class, + request, + this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); Utils.configureSecurity(_req, @@ -868,10 +880,29 @@ public CreatePaymentServiceDefinitionSessionRequestBuilder session() { public CreatePaymentServiceDefinitionSessionResponse session( String paymentServiceDefinitionId, Map requestBody) throws Exception { + return session(paymentServiceDefinitionId, Optional.empty(), requestBody); + } + + /** + * Create a session for apayment service definition + * + *

Creates a session for a payment service that supports sessions. + * + * @param paymentServiceDefinitionId + * @param applicationName + * @param requestBody + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreatePaymentServiceDefinitionSessionResponse session( + String paymentServiceDefinitionId, + Optional applicationName, + Map requestBody) throws Exception { CreatePaymentServiceDefinitionSessionRequest request = CreatePaymentServiceDefinitionSessionRequest .builder() .paymentServiceDefinitionId(paymentServiceDefinitionId) + .applicationName(applicationName) .requestBody(requestBody) .build(); @@ -900,6 +931,11 @@ public CreatePaymentServiceDefinitionSessionResponse session( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePaymentServiceDefinitionSessionRequest.class, + request, + this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); Utils.configureSecurity(_req, diff --git a/src/main/java/com/gr4vy/sdk/PaymentServiceTokens.java b/src/main/java/com/gr4vy/sdk/PaymentServiceTokens.java index f64a0dd0..d222b106 100644 --- a/src/main/java/com/gr4vy/sdk/PaymentServiceTokens.java +++ b/src/main/java/com/gr4vy/sdk/PaymentServiceTokens.java @@ -90,7 +90,7 @@ public ListPaymentMethodPaymentServiceTokensRequestBuilder list() { */ public ListPaymentMethodPaymentServiceTokensResponse list( String paymentMethodId) throws Exception { - return list(paymentMethodId, JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); + return list(paymentMethodId, JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -100,6 +100,7 @@ public ListPaymentMethodPaymentServiceTokensResponse list( * * @param paymentMethodId The ID of the payment method * @param paymentServiceId The ID of the payment service + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -108,6 +109,7 @@ public ListPaymentMethodPaymentServiceTokensResponse list( public ListPaymentMethodPaymentServiceTokensResponse list( String paymentMethodId, JsonNullable paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -119,6 +121,7 @@ public ListPaymentMethodPaymentServiceTokensResponse list( .builder() .paymentMethodId(paymentMethodId) .paymentServiceId(paymentServiceId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -476,7 +479,7 @@ public CreatePaymentMethodPaymentServiceTokenRequestBuilder create() { public CreatePaymentMethodPaymentServiceTokenResponse create( String paymentMethodId, PaymentServiceTokenCreate paymentServiceTokenCreate) throws Exception { - return create(paymentMethodId, JsonNullable.undefined(), paymentServiceTokenCreate); + return create(paymentMethodId, Optional.empty(), JsonNullable.undefined(), paymentServiceTokenCreate); } /** @@ -485,6 +488,7 @@ public CreatePaymentMethodPaymentServiceTokenResponse create( *

Create a gateway tokens for a payment method. * * @param paymentMethodId The ID of the payment method + * @param applicationName * @param merchantAccountId * @param paymentServiceTokenCreate * @return The response from the API call @@ -492,12 +496,14 @@ public CreatePaymentMethodPaymentServiceTokenResponse create( */ public CreatePaymentMethodPaymentServiceTokenResponse create( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceTokenCreate paymentServiceTokenCreate) throws Exception { CreatePaymentMethodPaymentServiceTokenRequest request = CreatePaymentMethodPaymentServiceTokenRequest .builder() .paymentMethodId(paymentMethodId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .paymentServiceTokenCreate(paymentServiceTokenCreate) .build(); @@ -527,6 +533,11 @@ public CreatePaymentMethodPaymentServiceTokenResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePaymentMethodPaymentServiceTokenRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -849,7 +860,7 @@ public DeletePaymentMethodPaymentServiceTokenRequestBuilder delete() { public DeletePaymentMethodPaymentServiceTokenResponse delete( String paymentMethodId, String paymentServiceTokenId) throws Exception { - return delete(paymentMethodId, paymentServiceTokenId, JsonNullable.undefined()); + return delete(paymentMethodId, paymentServiceTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -859,6 +870,7 @@ public DeletePaymentMethodPaymentServiceTokenResponse delete( * * @param paymentMethodId The ID of the payment method * @param paymentServiceTokenId The ID of the payment service token + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails @@ -866,12 +878,14 @@ public DeletePaymentMethodPaymentServiceTokenResponse delete( public DeletePaymentMethodPaymentServiceTokenResponse delete( String paymentMethodId, String paymentServiceTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeletePaymentMethodPaymentServiceTokenRequest request = DeletePaymentMethodPaymentServiceTokenRequest .builder() .paymentMethodId(paymentMethodId) .paymentServiceTokenId(paymentServiceTokenId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -887,6 +901,11 @@ public DeletePaymentMethodPaymentServiceTokenResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeletePaymentMethodPaymentServiceTokenRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/PaymentServices.java b/src/main/java/com/gr4vy/sdk/PaymentServices.java index 5a21f6e8..46b6c8b7 100644 --- a/src/main/java/com/gr4vy/sdk/PaymentServices.java +++ b/src/main/java/com/gr4vy/sdk/PaymentServices.java @@ -250,6 +250,7 @@ public ListPaymentServicesResponse list( JsonNullable.of(_nextCursor), request.limit(), request.deleted(), + request.applicationName(), request.merchantAccountId() )); return Optional.of(_nextRequest.call()); @@ -511,7 +512,7 @@ public UpdatePaymentServiceRequestBuilder create() { */ public UpdatePaymentServiceResponse create( PaymentServiceCreate paymentServiceCreate) throws Exception { - return create(JsonNullable.undefined(), paymentServiceCreate); + return create(Optional.empty(), JsonNullable.undefined(), paymentServiceCreate); } /** @@ -519,17 +520,20 @@ public UpdatePaymentServiceResponse create( * *

Updates the configuration of a payment service. * + * @param applicationName * @param merchantAccountId * @param paymentServiceCreate Request body for activating a payment service * @return The response from the API call * @throws Exception if the API call fails */ public UpdatePaymentServiceResponse create( + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) throws Exception { UpdatePaymentServiceRequest request = UpdatePaymentServiceRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .paymentServiceCreate(paymentServiceCreate) .build(); @@ -557,6 +561,11 @@ public UpdatePaymentServiceResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + UpdatePaymentServiceRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -877,7 +886,7 @@ public GetPaymentServiceRequestBuilder get() { */ public GetPaymentServiceResponse get( String paymentServiceId) throws Exception { - return get(paymentServiceId, JsonNullable.undefined(), Optional.empty()); + return get(paymentServiceId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -886,6 +895,7 @@ public GetPaymentServiceResponse get( *

Get the details of a configured payment service. * * @param paymentServiceId the ID of the payment service + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -893,6 +903,7 @@ public GetPaymentServiceResponse get( */ public GetPaymentServiceResponse get( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -903,6 +914,7 @@ public GetPaymentServiceResponse get( GetPaymentServiceRequest .builder() .paymentServiceId(paymentServiceId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -918,6 +930,11 @@ public GetPaymentServiceResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetPaymentServiceRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1255,7 +1272,7 @@ public CreatePaymentServiceRequestBuilder update() { public CreatePaymentServiceResponse update( String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) throws Exception { - return update(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate); + return update(paymentServiceId, Optional.empty(), JsonNullable.undefined(), paymentServiceUpdate); } /** @@ -1264,6 +1281,7 @@ public CreatePaymentServiceResponse update( *

Configures a new payment service for use by merchants. * * @param paymentServiceId the ID of the payment service + * @param applicationName * @param merchantAccountId * @param paymentServiceUpdate Request body for updating a Payment Service * @return The response from the API call @@ -1271,12 +1289,14 @@ public CreatePaymentServiceResponse update( */ public CreatePaymentServiceResponse update( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceUpdate paymentServiceUpdate) throws Exception { CreatePaymentServiceRequest request = CreatePaymentServiceRequest .builder() .paymentServiceId(paymentServiceId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .paymentServiceUpdate(paymentServiceUpdate) .build(); @@ -1306,6 +1326,11 @@ public CreatePaymentServiceResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePaymentServiceRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1626,7 +1651,7 @@ public DeletePaymentServiceRequestBuilder delete() { */ public DeletePaymentServiceResponse delete( String paymentServiceId) throws Exception { - return delete(paymentServiceId, JsonNullable.undefined()); + return delete(paymentServiceId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1635,17 +1660,20 @@ public DeletePaymentServiceResponse delete( *

Deletes all the configuration of a payment service. * * @param paymentServiceId the ID of the payment service + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public DeletePaymentServiceResponse delete( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeletePaymentServiceRequest request = DeletePaymentServiceRequest .builder() .paymentServiceId(paymentServiceId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1661,6 +1689,11 @@ public DeletePaymentServiceResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeletePaymentServiceRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1981,7 +2014,7 @@ public VerifyPaymentServiceCredentialsRequestBuilder verify() { */ public VerifyPaymentServiceCredentialsResponse verify( VerifyCredentials verifyCredentials) throws Exception { - return verify(JsonNullable.undefined(), verifyCredentials); + return verify(Optional.empty(), JsonNullable.undefined(), verifyCredentials); } /** @@ -1989,17 +2022,20 @@ public VerifyPaymentServiceCredentialsResponse verify( * *

Verify the credentials of a configured payment service * + * @param applicationName * @param merchantAccountId * @param verifyCredentials * @return The response from the API call * @throws Exception if the API call fails */ public VerifyPaymentServiceCredentialsResponse verify( + Optional applicationName, JsonNullable merchantAccountId, VerifyCredentials verifyCredentials) throws Exception { VerifyPaymentServiceCredentialsRequest request = VerifyPaymentServiceCredentialsRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .verifyCredentials(verifyCredentials) .build(); @@ -2027,6 +2063,11 @@ public VerifyPaymentServiceCredentialsResponse verify( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + VerifyPaymentServiceCredentialsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -2349,7 +2390,7 @@ public CreatePaymentServiceSessionRequestBuilder session() { public CreatePaymentServiceSessionResponse session( String paymentServiceId, Map requestBody) throws Exception { - return session(paymentServiceId, JsonNullable.undefined(), requestBody); + return session(paymentServiceId, Optional.empty(), JsonNullable.undefined(), requestBody); } /** @@ -2358,6 +2399,7 @@ public CreatePaymentServiceSessionResponse session( *

Creates a session for a payment service that supports sessions. * * @param paymentServiceId the ID of the payment service + * @param applicationName * @param merchantAccountId * @param requestBody * @return The response from the API call @@ -2365,12 +2407,14 @@ public CreatePaymentServiceSessionResponse session( */ public CreatePaymentServiceSessionResponse session( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, Map requestBody) throws Exception { CreatePaymentServiceSessionRequest request = CreatePaymentServiceSessionRequest .builder() .paymentServiceId(paymentServiceId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .requestBody(requestBody) .build(); @@ -2400,6 +2444,11 @@ public CreatePaymentServiceSessionResponse session( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePaymentServiceSessionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/Payouts.java b/src/main/java/com/gr4vy/sdk/Payouts.java index e0fec881..b598cc3c 100644 --- a/src/main/java/com/gr4vy/sdk/Payouts.java +++ b/src/main/java/com/gr4vy/sdk/Payouts.java @@ -95,7 +95,7 @@ public ListPayoutsRequestBuilder list() { * @throws Exception if the API call fails */ public ListPayoutsResponse listDirect() throws Exception { - return list(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty()); + return list(JsonNullable.undefined(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -105,6 +105,7 @@ public ListPayoutsResponse listDirect() throws Exception { * * @param cursor A pointer to the page of results to return. * @param limit The maximum number of items that are at returned. + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -113,6 +114,7 @@ public ListPayoutsResponse listDirect() throws Exception { public ListPayoutsResponse list( JsonNullable cursor, Optional limit, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -124,6 +126,7 @@ public ListPayoutsResponse list( .builder() .cursor(cursor) .limit(limit) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -238,6 +241,7 @@ public ListPayoutsResponse list( ListPayoutsRequestBuilder _nextRequest = list() .cursor(_nextCursor) .limit(limit) + .applicationName(applicationName) .merchantAccountId(merchantAccountId); return Optional.of(_nextRequest.call()); }); @@ -500,7 +504,7 @@ public CreatePayoutRequestBuilder create() { */ public CreatePayoutResponse create( PayoutCreate payoutCreate) throws Exception { - return create(JsonNullable.undefined(), payoutCreate); + return create(Optional.empty(), JsonNullable.undefined(), payoutCreate); } /** @@ -508,6 +512,7 @@ public CreatePayoutResponse create( * *

Creates a new payout. * + * @param applicationName * @param merchantAccountId * @param payoutCreate PayoutCreate * @@ -516,11 +521,13 @@ public CreatePayoutResponse create( * @throws Exception if the API call fails */ public CreatePayoutResponse create( + Optional applicationName, JsonNullable merchantAccountId, PayoutCreate payoutCreate) throws Exception { CreatePayoutRequest request = CreatePayoutRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .payoutCreate(payoutCreate) .build(); @@ -548,6 +555,11 @@ public CreatePayoutResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreatePayoutRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -868,7 +880,7 @@ public GetPayoutRequestBuilder get() { */ public GetPayoutResponse get( String payoutId) throws Exception { - return get(payoutId, JsonNullable.undefined(), Optional.empty()); + return get(payoutId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -877,6 +889,7 @@ public GetPayoutResponse get( *

Retreives a payout. * * @param payoutId + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -884,6 +897,7 @@ public GetPayoutResponse get( */ public GetPayoutResponse get( String payoutId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -894,6 +908,7 @@ public GetPayoutResponse get( GetPayoutRequest .builder() .payoutId(payoutId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -909,6 +924,11 @@ public GetPayoutResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetPayoutRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/Refunds.java b/src/main/java/com/gr4vy/sdk/Refunds.java index 6f4a023e..fedffee0 100644 --- a/src/main/java/com/gr4vy/sdk/Refunds.java +++ b/src/main/java/com/gr4vy/sdk/Refunds.java @@ -77,7 +77,7 @@ public GetRefundRequestBuilder get() { */ public GetRefundResponse get( String refundId) throws Exception { - return get(refundId, JsonNullable.undefined(), Optional.empty()); + return get(refundId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -86,6 +86,7 @@ public GetRefundResponse get( *

Fetch a refund. * * @param refundId + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -93,6 +94,7 @@ public GetRefundResponse get( */ public GetRefundResponse get( String refundId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -103,6 +105,7 @@ public GetRefundResponse get( GetRefundRequest .builder() .refundId(refundId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -118,6 +121,11 @@ public GetRefundResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetRefundRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java index e2ef29bf..f6488c3d 100644 --- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java +++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java @@ -19,8 +19,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "1.0.0"; - public static final String SDK_VERSION = "1.0.0-beta.3"; - public static final String GEN_VERSION = "2.616.1"; + public static final String SDK_VERSION = "1.0.0-beta.4"; + public static final String GEN_VERSION = "2.618.0"; private static final String BASE_PACKAGE = "com.gr4vy.sdk"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/gr4vy/sdk/Sessions.java b/src/main/java/com/gr4vy/sdk/Sessions.java index 66b8dc26..40490c45 100644 --- a/src/main/java/com/gr4vy/sdk/Sessions.java +++ b/src/main/java/com/gr4vy/sdk/Sessions.java @@ -25,6 +25,7 @@ import com.gr4vy.sdk.models.operations.CreateApplePayDigitalWalletSessionRequest; import com.gr4vy.sdk.models.operations.CreateApplePayDigitalWalletSessionRequestBuilder; import com.gr4vy.sdk.models.operations.CreateApplePayDigitalWalletSessionResponse; +import com.gr4vy.sdk.models.operations.CreateClickToPayDigitalWalletSessionRequest; import com.gr4vy.sdk.models.operations.CreateClickToPayDigitalWalletSessionRequestBuilder; import com.gr4vy.sdk.models.operations.CreateClickToPayDigitalWalletSessionResponse; import com.gr4vy.sdk.models.operations.CreateGooglePayDigitalWalletSessionRequest; @@ -84,7 +85,7 @@ public CreateGooglePayDigitalWalletSessionRequestBuilder googlePay() { */ public CreateGooglePayDigitalWalletSessionResponse googlePay( GooglePaySessionRequest googlePaySessionRequest) throws Exception { - return googlePay(JsonNullable.undefined(), googlePaySessionRequest); + return googlePay(Optional.empty(), JsonNullable.undefined(), googlePaySessionRequest); } /** @@ -92,17 +93,20 @@ public CreateGooglePayDigitalWalletSessionResponse googlePay( * *

Create a session for use with Google Pay. * + * @param applicationName * @param merchantAccountId * @param googlePaySessionRequest * @return The response from the API call * @throws Exception if the API call fails */ public CreateGooglePayDigitalWalletSessionResponse googlePay( + Optional applicationName, JsonNullable merchantAccountId, GooglePaySessionRequest googlePaySessionRequest) throws Exception { CreateGooglePayDigitalWalletSessionRequest request = CreateGooglePayDigitalWalletSessionRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .googlePaySessionRequest(googlePaySessionRequest) .build(); @@ -130,6 +134,11 @@ public CreateGooglePayDigitalWalletSessionResponse googlePay( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateGooglePayDigitalWalletSessionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -450,7 +459,7 @@ public CreateApplePayDigitalWalletSessionRequestBuilder applePay() { */ public CreateApplePayDigitalWalletSessionResponse applePay( ApplePaySessionRequest applePaySessionRequest) throws Exception { - return applePay(JsonNullable.undefined(), applePaySessionRequest); + return applePay(Optional.empty(), JsonNullable.undefined(), applePaySessionRequest); } /** @@ -458,17 +467,20 @@ public CreateApplePayDigitalWalletSessionResponse applePay( * *

Create a session for use with Apple Pay. * + * @param applicationName * @param merchantAccountId * @param applePaySessionRequest * @return The response from the API call * @throws Exception if the API call fails */ public CreateApplePayDigitalWalletSessionResponse applePay( + Optional applicationName, JsonNullable merchantAccountId, ApplePaySessionRequest applePaySessionRequest) throws Exception { CreateApplePayDigitalWalletSessionRequest request = CreateApplePayDigitalWalletSessionRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .applePaySessionRequest(applePaySessionRequest) .build(); @@ -496,6 +508,11 @@ public CreateApplePayDigitalWalletSessionResponse applePay( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateApplePayDigitalWalletSessionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -810,12 +827,35 @@ public CreateClickToPayDigitalWalletSessionRequestBuilder clickToPay() { * *

Create a session for use with Click to Pay. * - * @param request The request object containing all of the parameters for the API call. + * @param clickToPaySessionRequest * @return The response from the API call * @throws Exception if the API call fails */ public CreateClickToPayDigitalWalletSessionResponse clickToPay( - ClickToPaySessionRequest request) throws Exception { + ClickToPaySessionRequest clickToPaySessionRequest) throws Exception { + return clickToPay(Optional.empty(), clickToPaySessionRequest); + } + + /** + * Create a Click to Pay session + * + *

Create a session for use with Click to Pay. + * + * @param applicationName + * @param clickToPaySessionRequest + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateClickToPayDigitalWalletSessionResponse clickToPay( + Optional applicationName, + ClickToPaySessionRequest clickToPaySessionRequest) throws Exception { + CreateClickToPayDigitalWalletSessionRequest request = + CreateClickToPayDigitalWalletSessionRequest + .builder() + .applicationName(applicationName) + .clickToPaySessionRequest(clickToPaySessionRequest) + .build(); + String _baseUrl = Utils.templateUrl( this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); String _url = Utils.generateURL( @@ -826,10 +866,10 @@ public CreateClickToPayDigitalWalletSessionResponse clickToPay( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, - "request", + "clickToPaySessionRequest", "json", false); if (_serializedRequestBody == null) { @@ -839,6 +879,11 @@ public CreateClickToPayDigitalWalletSessionResponse clickToPay( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateClickToPayDigitalWalletSessionRequest.class, + request, + this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); Utils.configureSecurity(_req, diff --git a/src/main/java/com/gr4vy/sdk/ShippingDetails.java b/src/main/java/com/gr4vy/sdk/ShippingDetails.java index 0a8a188a..762f5b31 100644 --- a/src/main/java/com/gr4vy/sdk/ShippingDetails.java +++ b/src/main/java/com/gr4vy/sdk/ShippingDetails.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.CollectionNoCursorShippingDetails; import com.gr4vy.sdk.models.components.ShippingDetailsCreate; -import com.gr4vy.sdk.models.components.ShippingDetailsUpdate; import com.gr4vy.sdk.models.errors.APIException; import com.gr4vy.sdk.models.errors.Error400; import com.gr4vy.sdk.models.errors.Error401; @@ -100,7 +99,7 @@ public AddBuyerShippingDetailsRequestBuilder create() { public AddBuyerShippingDetailsResponse create( String buyerId, ShippingDetailsCreate shippingDetailsCreate) throws Exception { - return create(buyerId, JsonNullable.undefined(), shippingDetailsCreate); + return create(buyerId, Optional.empty(), JsonNullable.undefined(), shippingDetailsCreate); } /** @@ -109,6 +108,7 @@ public AddBuyerShippingDetailsResponse create( *

Associate shipping details to a buyer. * * @param buyerId The ID of the buyer to add shipping details to. + * @param applicationName * @param merchantAccountId * @param shippingDetailsCreate * @return The response from the API call @@ -116,12 +116,14 @@ public AddBuyerShippingDetailsResponse create( */ public AddBuyerShippingDetailsResponse create( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, ShippingDetailsCreate shippingDetailsCreate) throws Exception { AddBuyerShippingDetailsRequest request = AddBuyerShippingDetailsRequest .builder() .buyerId(buyerId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .shippingDetailsCreate(shippingDetailsCreate) .build(); @@ -151,6 +153,11 @@ public AddBuyerShippingDetailsResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + AddBuyerShippingDetailsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -471,7 +478,7 @@ public ListBuyerShippingDetailsRequestBuilder list() { */ public ListBuyerShippingDetailsResponse list( String buyerId) throws Exception { - return list(buyerId, JsonNullable.undefined(), Optional.empty()); + return list(buyerId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -480,6 +487,7 @@ public ListBuyerShippingDetailsResponse list( *

List all the shipping details associated to a specific buyer. * * @param buyerId The ID of the buyer to retrieve shipping details for. + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -487,6 +495,7 @@ public ListBuyerShippingDetailsResponse list( */ public ListBuyerShippingDetailsResponse list( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -497,6 +506,7 @@ public ListBuyerShippingDetailsResponse list( ListBuyerShippingDetailsRequest .builder() .buyerId(buyerId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -512,6 +522,11 @@ public ListBuyerShippingDetailsResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListBuyerShippingDetailsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -849,7 +864,7 @@ public GetBuyerShippingDetailsRequestBuilder get() { public GetBuyerShippingDetailsResponse get( String buyerId, String shippingDetailsId) throws Exception { - return get(buyerId, shippingDetailsId, JsonNullable.undefined(), Optional.empty()); + return get(buyerId, shippingDetailsId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -859,6 +874,7 @@ public GetBuyerShippingDetailsResponse get( * * @param buyerId The ID of the buyer to retrieve shipping details for. * @param shippingDetailsId The ID of the shipping details to retrieve. + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -867,6 +883,7 @@ public GetBuyerShippingDetailsResponse get( public GetBuyerShippingDetailsResponse get( String buyerId, String shippingDetailsId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -878,6 +895,7 @@ public GetBuyerShippingDetailsResponse get( .builder() .buyerId(buyerId) .shippingDetailsId(shippingDetailsId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -893,6 +911,11 @@ public GetBuyerShippingDetailsResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetBuyerShippingDetailsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1222,45 +1245,12 @@ public UpdateBuyerShippingDetailsRequestBuilder update() { * *

Update the shipping details associated to a specific buyer. * - * @param buyerId The ID of the buyer to update shipping details for. - * @param shippingDetailsId The ID of the shipping details to update. - * @param shippingDetailsUpdate + * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ public UpdateBuyerShippingDetailsResponse update( - String buyerId, - String shippingDetailsId, - ShippingDetailsUpdate shippingDetailsUpdate) throws Exception { - return update(buyerId, shippingDetailsId, JsonNullable.undefined(), shippingDetailsUpdate); - } - - /** - * Update a buyer's shipping details - * - *

Update the shipping details associated to a specific buyer. - * - * @param buyerId The ID of the buyer to update shipping details for. - * @param shippingDetailsId The ID of the shipping details to update. - * @param merchantAccountId - * @param shippingDetailsUpdate - * @return The response from the API call - * @throws Exception if the API call fails - */ - public UpdateBuyerShippingDetailsResponse update( - String buyerId, - String shippingDetailsId, - JsonNullable merchantAccountId, - ShippingDetailsUpdate shippingDetailsUpdate) throws Exception { - UpdateBuyerShippingDetailsRequest request = - UpdateBuyerShippingDetailsRequest - .builder() - .buyerId(buyerId) - .shippingDetailsId(shippingDetailsId) - .merchantAccountId(merchantAccountId) - .shippingDetailsUpdate(shippingDetailsUpdate) - .build(); - + UpdateBuyerShippingDetailsRequest request) throws Exception { String _baseUrl = Utils.templateUrl( this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); String _url = Utils.generateURL( @@ -1273,7 +1263,7 @@ public UpdateBuyerShippingDetailsResponse update( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "shippingDetailsUpdate", @@ -1286,6 +1276,11 @@ public UpdateBuyerShippingDetailsResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + UpdateBuyerShippingDetailsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1608,7 +1603,7 @@ public DeleteBuyerShippingDetailsRequestBuilder delete() { public DeleteBuyerShippingDetailsResponse delete( String buyerId, String shippingDetailsId) throws Exception { - return delete(buyerId, shippingDetailsId, JsonNullable.undefined()); + return delete(buyerId, shippingDetailsId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1618,6 +1613,7 @@ public DeleteBuyerShippingDetailsResponse delete( * * @param buyerId The ID of the buyer to delete shipping details for. * @param shippingDetailsId The ID of the shipping details to delete. + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails @@ -1625,12 +1621,14 @@ public DeleteBuyerShippingDetailsResponse delete( public DeleteBuyerShippingDetailsResponse delete( String buyerId, String shippingDetailsId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { DeleteBuyerShippingDetailsRequest request = DeleteBuyerShippingDetailsRequest .builder() .buyerId(buyerId) .shippingDetailsId(shippingDetailsId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1646,6 +1644,11 @@ public DeleteBuyerShippingDetailsResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + DeleteBuyerShippingDetailsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/Transactions.java b/src/main/java/com/gr4vy/sdk/Transactions.java index 59bf4ef2..9a65379b 100644 --- a/src/main/java/com/gr4vy/sdk/Transactions.java +++ b/src/main/java/com/gr4vy/sdk/Transactions.java @@ -294,6 +294,7 @@ public ListTransactionsResponse list( request.isSubsequentPayment(), request.merchantInitiated(), request.used3ds(), + request.applicationName(), request.merchantAccountId() )); return Optional.of(_nextRequest.call()); @@ -555,7 +556,7 @@ public CreateTransactionRequestBuilder create() { */ public CreateTransactionResponse create( TransactionCreate transactionCreate) throws Exception { - return create(JsonNullable.undefined(), JsonNullable.undefined(), transactionCreate); + return create(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), transactionCreate); } /** @@ -563,6 +564,7 @@ public CreateTransactionResponse create( * *

Create a transaction. * + * @param applicationName * @param merchantAccountId * @param idempotencyKey A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. * @param transactionCreate @@ -570,12 +572,14 @@ public CreateTransactionResponse create( * @throws Exception if the API call fails */ public CreateTransactionResponse create( + Optional applicationName, JsonNullable merchantAccountId, JsonNullable idempotencyKey, TransactionCreate transactionCreate) throws Exception { CreateTransactionRequest request = CreateTransactionRequest .builder() + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .idempotencyKey(idempotencyKey) .transactionCreate(transactionCreate) @@ -604,6 +608,11 @@ public CreateTransactionResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateTransactionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -924,7 +933,7 @@ public GetTransactionRequestBuilder get() { */ public GetTransactionResponse get( String transactionId) throws Exception { - return get(transactionId, JsonNullable.undefined(), Optional.empty()); + return get(transactionId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -933,6 +942,7 @@ public GetTransactionResponse get( *

Fetch a single transaction by its ID. * * @param transactionId + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -940,6 +950,7 @@ public GetTransactionResponse get( */ public GetTransactionResponse get( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -950,6 +961,7 @@ public GetTransactionResponse get( GetTransactionRequest .builder() .transactionId(transactionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -965,6 +977,11 @@ public GetTransactionResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetTransactionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1302,7 +1319,7 @@ public CaptureTransactionRequestBuilder capture() { public CaptureTransactionResponse capture( String transactionId, TransactionCapture transactionCapture) throws Exception { - return capture(transactionId, JsonNullable.undefined(), transactionCapture); + return capture(transactionId, Optional.empty(), JsonNullable.undefined(), transactionCapture); } /** @@ -1311,6 +1328,7 @@ public CaptureTransactionResponse capture( *

Capture a previously authorized transaction. * * @param transactionId + * @param applicationName * @param merchantAccountId * @param transactionCapture Request body for capturing an authorized transaction * @return The response from the API call @@ -1318,12 +1336,14 @@ public CaptureTransactionResponse capture( */ public CaptureTransactionResponse capture( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, TransactionCapture transactionCapture) throws Exception { CaptureTransactionRequest request = CaptureTransactionRequest .builder() .transactionId(transactionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .transactionCapture(transactionCapture) .build(); @@ -1353,6 +1373,11 @@ public CaptureTransactionResponse capture( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CaptureTransactionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -1673,7 +1698,7 @@ public VoidTransactionRequestBuilder void_() { */ public VoidTransactionResponse void_( String transactionId) throws Exception { - return void_(transactionId, JsonNullable.undefined()); + return void_(transactionId, Optional.empty(), JsonNullable.undefined()); } /** @@ -1682,17 +1707,20 @@ public VoidTransactionResponse void_( *

Void a previously authorized transaction. * * @param transactionId + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public VoidTransactionResponse void_( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { VoidTransactionRequest request = VoidTransactionRequest .builder() .transactionId(transactionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -1708,6 +1736,11 @@ public VoidTransactionResponse void_( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + VoidTransactionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -2028,7 +2061,7 @@ public SyncTransactionRequestBuilder sync() { */ public SyncTransactionResponse sync( String transactionId) throws Exception { - return sync(transactionId, JsonNullable.undefined()); + return sync(transactionId, Optional.empty(), JsonNullable.undefined()); } /** @@ -2037,17 +2070,20 @@ public SyncTransactionResponse sync( *

Fetch the latest status for a transaction. * * @param transactionId + * @param applicationName * @param merchantAccountId * @return The response from the API call * @throws Exception if the API call fails */ public SyncTransactionResponse sync( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception { SyncTransactionRequest request = SyncTransactionRequest .builder() .transactionId(transactionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -2063,6 +2099,11 @@ public SyncTransactionResponse sync( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + SyncTransactionRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/TransactionsRefunds.java b/src/main/java/com/gr4vy/sdk/TransactionsRefunds.java index 370fbebb..965bb423 100644 --- a/src/main/java/com/gr4vy/sdk/TransactionsRefunds.java +++ b/src/main/java/com/gr4vy/sdk/TransactionsRefunds.java @@ -96,7 +96,7 @@ public ListTransactionRefundsRequestBuilder list() { */ public ListTransactionRefundsResponse list( String transactionId) throws Exception { - return list(transactionId, JsonNullable.undefined(), Optional.empty()); + return list(transactionId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -105,6 +105,7 @@ public ListTransactionRefundsResponse list( *

List refunds for a transaction. * * @param transactionId + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -112,6 +113,7 @@ public ListTransactionRefundsResponse list( */ public ListTransactionRefundsResponse list( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -122,6 +124,7 @@ public ListTransactionRefundsResponse list( ListTransactionRefundsRequest .builder() .transactionId(transactionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -137,6 +140,11 @@ public ListTransactionRefundsResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListTransactionRefundsRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -474,7 +482,7 @@ public CreateTransactionRefundRequestBuilder create() { public CreateTransactionRefundResponse create( String transactionId, TransactionRefundCreate transactionRefundCreate) throws Exception { - return create(transactionId, JsonNullable.undefined(), transactionRefundCreate); + return create(transactionId, Optional.empty(), JsonNullable.undefined(), transactionRefundCreate); } /** @@ -483,6 +491,7 @@ public CreateTransactionRefundResponse create( *

Create a refund for a transaction. * * @param transactionId + * @param applicationName * @param merchantAccountId * @param transactionRefundCreate * @return The response from the API call @@ -490,12 +499,14 @@ public CreateTransactionRefundResponse create( */ public CreateTransactionRefundResponse create( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, TransactionRefundCreate transactionRefundCreate) throws Exception { CreateTransactionRefundRequest request = CreateTransactionRefundRequest .builder() .transactionId(transactionId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .transactionRefundCreate(transactionRefundCreate) .build(); @@ -525,6 +536,11 @@ public CreateTransactionRefundResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + CreateTransactionRefundRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); @@ -847,7 +863,7 @@ public GetTransactionRefundRequestBuilder get() { public GetTransactionRefundResponse get( String transactionId, String refundId) throws Exception { - return get(transactionId, refundId, JsonNullable.undefined(), Optional.empty()); + return get(transactionId, refundId, Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -857,6 +873,7 @@ public GetTransactionRefundResponse get( * * @param transactionId * @param refundId + * @param applicationName * @param merchantAccountId * @param options additional options * @return The response from the API call @@ -865,6 +882,7 @@ public GetTransactionRefundResponse get( public GetTransactionRefundResponse get( String transactionId, String refundId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception { @@ -876,6 +894,7 @@ public GetTransactionRefundResponse get( .builder() .transactionId(transactionId) .refundId(refundId) + .applicationName(applicationName) .merchantAccountId(merchantAccountId) .build(); @@ -891,6 +910,11 @@ public GetTransactionRefundResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetTransactionRefundRequest.class, + request, + this.sdkConfiguration.globals)); _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); Optional _hookSecuritySource = Optional.of(this.sdkConfiguration.securitySource()); diff --git a/src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorRefund.java b/src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorRefund.java deleted file mode 100644 index 024e54c5..00000000 --- a/src/main/java/com/gr4vy/sdk/models/components/CollectionNoCursorRefund.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.gr4vy.sdk.models.components; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.gr4vy.sdk.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.List; -import java.util.Objects; - -public class CollectionNoCursorRefund { - - /** - * A list of items returned for this request. - */ - @JsonProperty("items") - private List items; - - @JsonCreator - public CollectionNoCursorRefund( - @JsonProperty("items") List items) { - Utils.checkNotNull(items, "items"); - this.items = items; - } - - /** - * A list of items returned for this request. - */ - @JsonIgnore - public List items() { - return items; - } - - public final static Builder builder() { - return new Builder(); - } - - /** - * A list of items returned for this request. - */ - public CollectionNoCursorRefund withItems(List items) { - Utils.checkNotNull(items, "items"); - this.items = items; - return this; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CollectionNoCursorRefund other = (CollectionNoCursorRefund) o; - return - Objects.deepEquals(this.items, other.items); - } - - @Override - public int hashCode() { - return Objects.hash( - items); - } - - @Override - public String toString() { - return Utils.toString(CollectionNoCursorRefund.class, - "items", items); - } - - public final static class Builder { - - private List items; - - private Builder() { - // force use of static builder() method - } - - /** - * A list of items returned for this request. - */ - public Builder items(List items) { - Utils.checkNotNull(items, "items"); - this.items = items; - return this; - } - - public CollectionNoCursorRefund build() { - return new CollectionNoCursorRefund( - items); - } - } -} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequest.java index 5e569515..8dce9802 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.BuyerCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class AddBuyerRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class AddBuyerRequest { @JsonCreator public AddBuyerRequest( + Optional applicationName, JsonNullable merchantAccountId, BuyerCreate buyerCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(buyerCreate, "buyerCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.buyerCreate = buyerCreate; } public AddBuyerRequest( BuyerCreate buyerCreate) { - this(JsonNullable.undefined(), buyerCreate); + this(Optional.empty(), JsonNullable.undefined(), buyerCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public AddBuyerRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public AddBuyerRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } AddBuyerRequest other = (AddBuyerRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.buyerCreate, other.buyerCreate); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, buyerCreate); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(AddBuyerRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "buyerCreate", buyerCreate); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private BuyerCreate buyerCreate; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder buyerCreate(BuyerCreate buyerCreate) { } public AddBuyerRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new AddBuyerRequest( + applicationName, merchantAccountId, buyerCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequestBuilder.java index 324dab8b..e5ba3802 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.BuyerCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class AddBuyerRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private BuyerCreate buyerCreate; private final SDKMethodInterfaces.MethodCallAddBuyer sdk; @@ -18,6 +25,18 @@ public class AddBuyerRequestBuilder { public AddBuyerRequestBuilder(SDKMethodInterfaces.MethodCallAddBuyer sdk) { this.sdk = sdk; } + + public AddBuyerRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public AddBuyerRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public AddBuyerRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public AddBuyerRequestBuilder buyerCreate(BuyerCreate buyerCreate) { } public AddBuyerResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, buyerCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequest.java index b12e0e9a..06893190 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.ShippingDetailsCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class AddBuyerShippingDetailsRequest { @@ -21,6 +24,9 @@ public class AddBuyerShippingDetailsRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=buyer_id") private String buyerId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class AddBuyerShippingDetailsRequest { @JsonCreator public AddBuyerShippingDetailsRequest( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, ShippingDetailsCreate shippingDetailsCreate) { Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(shippingDetailsCreate, "shippingDetailsCreate"); this.buyerId = buyerId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.shippingDetailsCreate = shippingDetailsCreate; } @@ -46,7 +55,7 @@ public AddBuyerShippingDetailsRequest( public AddBuyerShippingDetailsRequest( String buyerId, ShippingDetailsCreate shippingDetailsCreate) { - this(buyerId, JsonNullable.undefined(), shippingDetailsCreate); + this(buyerId, Optional.empty(), JsonNullable.undefined(), shippingDetailsCreate); } /** @@ -57,6 +66,11 @@ public String buyerId() { return buyerId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public AddBuyerShippingDetailsRequest withBuyerId(String buyerId) { return this; } + public AddBuyerShippingDetailsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public AddBuyerShippingDetailsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { AddBuyerShippingDetailsRequest other = (AddBuyerShippingDetailsRequest) o; return Objects.deepEquals(this.buyerId, other.buyerId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.shippingDetailsCreate, other.shippingDetailsCreate); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( buyerId, + applicationName, merchantAccountId, shippingDetailsCreate); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(AddBuyerShippingDetailsRequest.class, "buyerId", buyerId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "shippingDetailsCreate", shippingDetailsCreate); } @@ -143,6 +172,8 @@ public final static class Builder { private String buyerId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private ShippingDetailsCreate shippingDetailsCreate; @@ -160,6 +191,18 @@ public Builder buyerId(String buyerId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder shippingDetailsCreate(ShippingDetailsCreate shippingDetailsCreate } public AddBuyerShippingDetailsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new AddBuyerShippingDetailsRequest( buyerId, + applicationName, merchantAccountId, shippingDetailsCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequestBuilder.java index fdeb6988..46026500 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/AddBuyerShippingDetailsRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.ShippingDetailsCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class AddBuyerShippingDetailsRequestBuilder { private String buyerId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private ShippingDetailsCreate shippingDetailsCreate; private final SDKMethodInterfaces.MethodCallAddBuyerShippingDetails sdk; @@ -25,6 +32,18 @@ public AddBuyerShippingDetailsRequestBuilder buyerId(String buyerId) { this.buyerId = buyerId; return this; } + + public AddBuyerShippingDetailsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public AddBuyerShippingDetailsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public AddBuyerShippingDetailsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public AddBuyerShippingDetailsRequestBuilder shippingDetailsCreate(ShippingDetai } public AddBuyerShippingDetailsResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( buyerId, + applicationName, merchantAccountId, shippingDetailsCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequest.java index bf68ea4c..7e576d10 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionCapture; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CaptureTransactionRequest { @@ -18,6 +21,9 @@ public class CaptureTransactionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transaction_id") private String transactionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -30,12 +36,15 @@ public class CaptureTransactionRequest { @JsonCreator public CaptureTransactionRequest( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, TransactionCapture transactionCapture) { Utils.checkNotNull(transactionId, "transactionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(transactionCapture, "transactionCapture"); this.transactionId = transactionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.transactionCapture = transactionCapture; } @@ -43,7 +52,7 @@ public CaptureTransactionRequest( public CaptureTransactionRequest( String transactionId, TransactionCapture transactionCapture) { - this(transactionId, JsonNullable.undefined(), transactionCapture); + this(transactionId, Optional.empty(), JsonNullable.undefined(), transactionCapture); } @JsonIgnore @@ -51,6 +60,11 @@ public String transactionId() { return transactionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -74,6 +88,18 @@ public CaptureTransactionRequest withTransactionId(String transactionId) { return this; } + public CaptureTransactionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CaptureTransactionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -110,6 +136,7 @@ public boolean equals(java.lang.Object o) { CaptureTransactionRequest other = (CaptureTransactionRequest) o; return Objects.deepEquals(this.transactionId, other.transactionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.transactionCapture, other.transactionCapture); } @@ -118,6 +145,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( transactionId, + applicationName, merchantAccountId, transactionCapture); } @@ -126,6 +154,7 @@ public int hashCode() { public String toString() { return Utils.toString(CaptureTransactionRequest.class, "transactionId", transactionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "transactionCapture", transactionCapture); } @@ -134,6 +163,8 @@ public final static class Builder { private String transactionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private TransactionCapture transactionCapture; @@ -148,6 +179,18 @@ public Builder transactionId(String transactionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -173,10 +216,20 @@ public Builder transactionCapture(TransactionCapture transactionCapture) { } public CaptureTransactionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CaptureTransactionRequest( transactionId, + applicationName, merchantAccountId, transactionCapture); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequestBuilder.java index 8ce419cb..9f06da52 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CaptureTransactionRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionCapture; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CaptureTransactionRequestBuilder { private String transactionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private TransactionCapture transactionCapture; private final SDKMethodInterfaces.MethodCallCaptureTransaction sdk; @@ -25,6 +32,18 @@ public CaptureTransactionRequestBuilder transactionId(String transactionId) { this.transactionId = transactionId; return this; } + + public CaptureTransactionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CaptureTransactionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CaptureTransactionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public CaptureTransactionRequestBuilder transactionCapture(TransactionCapture tr } public CaptureTransactionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.capture( transactionId, + applicationName, merchantAccountId, transactionCapture); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequest.java index 4b2cd345..b01633bd 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ConfigureDigitalWalletRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class ConfigureDigitalWalletRequest { @JsonCreator public ConfigureDigitalWalletRequest( + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletCreate digitalWalletCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(digitalWalletCreate, "digitalWalletCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.digitalWalletCreate = digitalWalletCreate; } public ConfigureDigitalWalletRequest( DigitalWalletCreate digitalWalletCreate) { - this(JsonNullable.undefined(), digitalWalletCreate); + this(Optional.empty(), JsonNullable.undefined(), digitalWalletCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public ConfigureDigitalWalletRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ConfigureDigitalWalletRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } ConfigureDigitalWalletRequest other = (ConfigureDigitalWalletRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.digitalWalletCreate, other.digitalWalletCreate); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, digitalWalletCreate); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(ConfigureDigitalWalletRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "digitalWalletCreate", digitalWalletCreate); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletCreate digitalWalletCreate; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder digitalWalletCreate(DigitalWalletCreate digitalWalletCreate) { } public ConfigureDigitalWalletRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ConfigureDigitalWalletRequest( + applicationName, merchantAccountId, digitalWalletCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequestBuilder.java index a894fba9..40078600 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ConfigureDigitalWalletRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ConfigureDigitalWalletRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletCreate digitalWalletCreate; private final SDKMethodInterfaces.MethodCallConfigureDigitalWallet sdk; @@ -18,6 +25,18 @@ public class ConfigureDigitalWalletRequestBuilder { public ConfigureDigitalWalletRequestBuilder(SDKMethodInterfaces.MethodCallConfigureDigitalWallet sdk) { this.sdk = sdk; } + + public ConfigureDigitalWalletRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ConfigureDigitalWalletRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ConfigureDigitalWalletRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public ConfigureDigitalWalletRequestBuilder digitalWalletCreate(DigitalWalletCre } public ConfigureDigitalWalletResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, digitalWalletCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequest.java index a3bd5610..1426341f 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.AccountUpdaterJobCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateAccountUpdaterJobRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class CreateAccountUpdaterJobRequest { @JsonCreator public CreateAccountUpdaterJobRequest( + Optional applicationName, JsonNullable merchantAccountId, AccountUpdaterJobCreate accountUpdaterJobCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(accountUpdaterJobCreate, "accountUpdaterJobCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.accountUpdaterJobCreate = accountUpdaterJobCreate; } public CreateAccountUpdaterJobRequest( AccountUpdaterJobCreate accountUpdaterJobCreate) { - this(JsonNullable.undefined(), accountUpdaterJobCreate); + this(Optional.empty(), JsonNullable.undefined(), accountUpdaterJobCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public CreateAccountUpdaterJobRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateAccountUpdaterJobRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } CreateAccountUpdaterJobRequest other = (CreateAccountUpdaterJobRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.accountUpdaterJobCreate, other.accountUpdaterJobCreate); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, accountUpdaterJobCreate); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreateAccountUpdaterJobRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "accountUpdaterJobCreate", accountUpdaterJobCreate); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private AccountUpdaterJobCreate accountUpdaterJobCreate; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder accountUpdaterJobCreate(AccountUpdaterJobCreate accountUpdaterJob } public CreateAccountUpdaterJobRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreateAccountUpdaterJobRequest( + applicationName, merchantAccountId, accountUpdaterJobCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequestBuilder.java index 1df21d93..a45ef53b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateAccountUpdaterJobRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.AccountUpdaterJobCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateAccountUpdaterJobRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private AccountUpdaterJobCreate accountUpdaterJobCreate; private final SDKMethodInterfaces.MethodCallCreateAccountUpdaterJob sdk; @@ -18,6 +25,18 @@ public class CreateAccountUpdaterJobRequestBuilder { public CreateAccountUpdaterJobRequestBuilder(SDKMethodInterfaces.MethodCallCreateAccountUpdaterJob sdk) { this.sdk = sdk; } + + public CreateAccountUpdaterJobRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateAccountUpdaterJobRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateAccountUpdaterJobRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public CreateAccountUpdaterJobRequestBuilder accountUpdaterJobCreate(AccountUpda } public CreateAccountUpdaterJobResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, accountUpdaterJobCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequest.java index 8f008b3f..73a6d8ac 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.ApplePaySessionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateApplePayDigitalWalletSessionRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class CreateApplePayDigitalWalletSessionRequest { @JsonCreator public CreateApplePayDigitalWalletSessionRequest( + Optional applicationName, JsonNullable merchantAccountId, ApplePaySessionRequest applePaySessionRequest) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(applePaySessionRequest, "applePaySessionRequest"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.applePaySessionRequest = applePaySessionRequest; } public CreateApplePayDigitalWalletSessionRequest( ApplePaySessionRequest applePaySessionRequest) { - this(JsonNullable.undefined(), applePaySessionRequest); + this(Optional.empty(), JsonNullable.undefined(), applePaySessionRequest); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public CreateApplePayDigitalWalletSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateApplePayDigitalWalletSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } CreateApplePayDigitalWalletSessionRequest other = (CreateApplePayDigitalWalletSessionRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.applePaySessionRequest, other.applePaySessionRequest); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, applePaySessionRequest); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreateApplePayDigitalWalletSessionRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "applePaySessionRequest", applePaySessionRequest); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private ApplePaySessionRequest applePaySessionRequest; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder applePaySessionRequest(ApplePaySessionRequest applePaySessionRequ } public CreateApplePayDigitalWalletSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreateApplePayDigitalWalletSessionRequest( + applicationName, merchantAccountId, applePaySessionRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequestBuilder.java index 901a62f7..03dd5523 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateApplePayDigitalWalletSessionRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.ApplePaySessionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateApplePayDigitalWalletSessionRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private ApplePaySessionRequest applePaySessionRequest; private final SDKMethodInterfaces.MethodCallCreateApplePayDigitalWalletSession sdk; @@ -18,6 +25,18 @@ public class CreateApplePayDigitalWalletSessionRequestBuilder { public CreateApplePayDigitalWalletSessionRequestBuilder(SDKMethodInterfaces.MethodCallCreateApplePayDigitalWalletSession sdk) { this.sdk = sdk; } + + public CreateApplePayDigitalWalletSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateApplePayDigitalWalletSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateApplePayDigitalWalletSessionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public CreateApplePayDigitalWalletSessionRequestBuilder applePaySessionRequest(A } public CreateApplePayDigitalWalletSessionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.applePay( + applicationName, merchantAccountId, applePaySessionRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequest.java index 3e96ba43..00bc25ff 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequest.java @@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.CheckoutSessionCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; @@ -17,6 +19,9 @@ public class CreateCheckoutSessionRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -28,16 +33,24 @@ public class CreateCheckoutSessionRequest { @JsonCreator public CreateCheckoutSessionRequest( + Optional applicationName, JsonNullable merchantAccountId, Optional checkoutSessionCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(checkoutSessionCreate, "checkoutSessionCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.checkoutSessionCreate = checkoutSessionCreate; } public CreateCheckoutSessionRequest() { - this(JsonNullable.undefined(), Optional.empty()); + this(Optional.empty(), JsonNullable.undefined(), Optional.empty()); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -58,6 +71,18 @@ public final static Builder builder() { return new Builder(); } + public CreateCheckoutSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateCheckoutSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -99,6 +124,7 @@ public boolean equals(java.lang.Object o) { } CreateCheckoutSessionRequest other = (CreateCheckoutSessionRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.checkoutSessionCreate, other.checkoutSessionCreate); } @@ -106,6 +132,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, checkoutSessionCreate); } @@ -113,12 +140,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreateCheckoutSessionRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "checkoutSessionCreate", checkoutSessionCreate); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional checkoutSessionCreate = Optional.empty(); @@ -127,6 +157,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -158,9 +200,19 @@ public Builder checkoutSessionCreate(Optional c } public CreateCheckoutSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreateCheckoutSessionRequest( + applicationName, merchantAccountId, checkoutSessionCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequestBuilder.java index 9c38b6d1..f548e2cf 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateCheckoutSessionRequestBuilder.java @@ -3,7 +3,9 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.CheckoutSessionCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; @@ -12,6 +14,10 @@ public class CreateCheckoutSessionRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional checkoutSessionCreate = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateCheckoutSession sdk; @@ -19,6 +25,18 @@ public class CreateCheckoutSessionRequestBuilder { public CreateCheckoutSessionRequestBuilder(SDKMethodInterfaces.MethodCallCreateCheckoutSession sdk) { this.sdk = sdk; } + + public CreateCheckoutSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateCheckoutSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateCheckoutSessionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,9 +63,18 @@ public CreateCheckoutSessionRequestBuilder checkoutSessionCreate(Optional> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequest.java new file mode 100644 index 00000000..faaa69bb --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequest.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.models.components.ClickToPaySessionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; +import com.gr4vy.sdk.utils.SpeakeasyMetadata; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class CreateClickToPayDigitalWalletSessionRequest { + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + + @SpeakeasyMetadata("request:mediaType=application/json") + private ClickToPaySessionRequest clickToPaySessionRequest; + + @JsonCreator + public CreateClickToPayDigitalWalletSessionRequest( + Optional applicationName, + ClickToPaySessionRequest clickToPaySessionRequest) { + Utils.checkNotNull(applicationName, "applicationName"); + Utils.checkNotNull(clickToPaySessionRequest, "clickToPaySessionRequest"); + this.applicationName = applicationName; + this.clickToPaySessionRequest = clickToPaySessionRequest; + } + + public CreateClickToPayDigitalWalletSessionRequest( + ClickToPaySessionRequest clickToPaySessionRequest) { + this(Optional.empty(), clickToPaySessionRequest); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + + @JsonIgnore + public ClickToPaySessionRequest clickToPaySessionRequest() { + return clickToPaySessionRequest; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreateClickToPayDigitalWalletSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateClickToPayDigitalWalletSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + + public CreateClickToPayDigitalWalletSessionRequest withClickToPaySessionRequest(ClickToPaySessionRequest clickToPaySessionRequest) { + Utils.checkNotNull(clickToPaySessionRequest, "clickToPaySessionRequest"); + this.clickToPaySessionRequest = clickToPaySessionRequest; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateClickToPayDigitalWalletSessionRequest other = (CreateClickToPayDigitalWalletSessionRequest) o; + return + Objects.deepEquals(this.applicationName, other.applicationName) && + Objects.deepEquals(this.clickToPaySessionRequest, other.clickToPaySessionRequest); + } + + @Override + public int hashCode() { + return Objects.hash( + applicationName, + clickToPaySessionRequest); + } + + @Override + public String toString() { + return Utils.toString(CreateClickToPayDigitalWalletSessionRequest.class, + "applicationName", applicationName, + "clickToPaySessionRequest", clickToPaySessionRequest); + } + + public final static class Builder { + + private Optional applicationName; + + private ClickToPaySessionRequest clickToPaySessionRequest; + + private Builder() { + // force use of static builder() method + } + + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + + public Builder clickToPaySessionRequest(ClickToPaySessionRequest clickToPaySessionRequest) { + Utils.checkNotNull(clickToPaySessionRequest, "clickToPaySessionRequest"); + this.clickToPaySessionRequest = clickToPaySessionRequest; + return this; + } + + public CreateClickToPayDigitalWalletSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } + return new CreateClickToPayDigitalWalletSessionRequest( + applicationName, + clickToPaySessionRequest); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequestBuilder.java index f1a63d50..81a59895 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateClickToPayDigitalWalletSessionRequestBuilder.java @@ -3,28 +3,57 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.ClickToPaySessionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; +import java.lang.String; +import java.util.Optional; public class CreateClickToPayDigitalWalletSessionRequestBuilder { - private ClickToPaySessionRequest request; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); + private ClickToPaySessionRequest clickToPaySessionRequest; private final SDKMethodInterfaces.MethodCallCreateClickToPayDigitalWalletSession sdk; public CreateClickToPayDigitalWalletSessionRequestBuilder(SDKMethodInterfaces.MethodCallCreateClickToPayDigitalWalletSession sdk) { this.sdk = sdk; } + + public CreateClickToPayDigitalWalletSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } - public CreateClickToPayDigitalWalletSessionRequestBuilder request(ClickToPaySessionRequest request) { - Utils.checkNotNull(request, "request"); - this.request = request; + public CreateClickToPayDigitalWalletSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; return this; } - public CreateClickToPayDigitalWalletSessionResponse call() throws Exception { + public CreateClickToPayDigitalWalletSessionRequestBuilder clickToPaySessionRequest(ClickToPaySessionRequest clickToPaySessionRequest) { + Utils.checkNotNull(clickToPaySessionRequest, "clickToPaySessionRequest"); + this.clickToPaySessionRequest = clickToPaySessionRequest; + return this; + } + public CreateClickToPayDigitalWalletSessionResponse call() throws Exception { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.clickToPay( - request); + applicationName, + clickToPaySessionRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequest.java index ca59b637..1272b457 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequest.java @@ -5,13 +5,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionRefundAllCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateFullTransactionRefundRequest { @@ -19,6 +22,9 @@ public class CreateFullTransactionRefundRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transaction_id") private String transactionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -31,19 +37,22 @@ public class CreateFullTransactionRefundRequest { @JsonCreator public CreateFullTransactionRefundRequest( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, JsonNullable transactionRefundAllCreate) { Utils.checkNotNull(transactionId, "transactionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(transactionRefundAllCreate, "transactionRefundAllCreate"); this.transactionId = transactionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.transactionRefundAllCreate = transactionRefundAllCreate; } public CreateFullTransactionRefundRequest( String transactionId) { - this(transactionId, JsonNullable.undefined(), JsonNullable.undefined()); + this(transactionId, Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); } @JsonIgnore @@ -51,6 +60,11 @@ public String transactionId() { return transactionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -75,6 +89,18 @@ public CreateFullTransactionRefundRequest withTransactionId(String transactionId return this; } + public CreateFullTransactionRefundRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateFullTransactionRefundRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -117,6 +143,7 @@ public boolean equals(java.lang.Object o) { CreateFullTransactionRefundRequest other = (CreateFullTransactionRefundRequest) o; return Objects.deepEquals(this.transactionId, other.transactionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.transactionRefundAllCreate, other.transactionRefundAllCreate); } @@ -125,6 +152,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( transactionId, + applicationName, merchantAccountId, transactionRefundAllCreate); } @@ -133,6 +161,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreateFullTransactionRefundRequest.class, "transactionId", transactionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "transactionRefundAllCreate", transactionRefundAllCreate); } @@ -141,6 +170,8 @@ public final static class Builder { private String transactionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private JsonNullable transactionRefundAllCreate = JsonNullable.undefined(); @@ -155,6 +186,18 @@ public Builder transactionId(String transactionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -186,10 +229,20 @@ public Builder transactionRefundAllCreate(JsonNullable> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequestBuilder.java index b7145b4f..ca2f0e04 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionRefundAllCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateFullTransactionRefundRequestBuilder { private String transactionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private JsonNullable transactionRefundAllCreate = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallCreateFullTransactionRefund sdk; @@ -25,6 +32,18 @@ public CreateFullTransactionRefundRequestBuilder transactionId(String transactio this.transactionId = transactionId; return this; } + + public CreateFullTransactionRefundRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateFullTransactionRefundRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateFullTransactionRefundRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -51,10 +70,19 @@ public CreateFullTransactionRefundRequestBuilder transactionRefundAllCreate(Json } public CreateFullTransactionRefundResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( transactionId, + applicationName, merchantAccountId, transactionRefundAllCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundResponse.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundResponse.java index e7ee877f..f4f8b776 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundResponse.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateFullTransactionRefundResponse.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.gr4vy.sdk.models.components.CollectionNoCursorRefund; +import com.gr4vy.sdk.models.components.CollectionRefund; import com.gr4vy.sdk.utils.Response; import com.gr4vy.sdk.utils.Utils; import java.io.InputStream; @@ -37,22 +37,22 @@ public class CreateFullTransactionRefundResponse implements Response { /** * Successful Response */ - private Optional collectionNoCursorRefund; + private Optional collectionRefund; @JsonCreator public CreateFullTransactionRefundResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional collectionNoCursorRefund) { + Optional collectionRefund) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(collectionNoCursorRefund, "collectionNoCursorRefund"); + Utils.checkNotNull(collectionRefund, "collectionRefund"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.collectionNoCursorRefund = collectionNoCursorRefund; + this.collectionRefund = collectionRefund; } public CreateFullTransactionRefundResponse( @@ -91,8 +91,8 @@ public HttpResponse rawResponse() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional collectionNoCursorRefund() { - return (Optional) collectionNoCursorRefund; + public Optional collectionRefund() { + return (Optional) collectionRefund; } public final static Builder builder() { @@ -129,18 +129,18 @@ public CreateFullTransactionRefundResponse withRawResponse(HttpResponse collectionNoCursorRefund) { - Utils.checkNotNull(collectionNoCursorRefund, "collectionNoCursorRefund"); - this.collectionNoCursorRefund = collectionNoCursorRefund; + public CreateFullTransactionRefundResponse withCollectionRefund(Optional collectionRefund) { + Utils.checkNotNull(collectionRefund, "collectionRefund"); + this.collectionRefund = collectionRefund; return this; } @@ -158,7 +158,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.contentType, other.contentType) && Objects.deepEquals(this.statusCode, other.statusCode) && Objects.deepEquals(this.rawResponse, other.rawResponse) && - Objects.deepEquals(this.collectionNoCursorRefund, other.collectionNoCursorRefund); + Objects.deepEquals(this.collectionRefund, other.collectionRefund); } @Override @@ -167,7 +167,7 @@ public int hashCode() { contentType, statusCode, rawResponse, - collectionNoCursorRefund); + collectionRefund); } @Override @@ -176,7 +176,7 @@ public String toString() { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "collectionNoCursorRefund", collectionNoCursorRefund); + "collectionRefund", collectionRefund); } public final static class Builder { @@ -187,7 +187,7 @@ public final static class Builder { private HttpResponse rawResponse; - private Optional collectionNoCursorRefund = Optional.empty(); + private Optional collectionRefund = Optional.empty(); private Builder() { // force use of static builder() method @@ -223,18 +223,18 @@ public Builder rawResponse(HttpResponse rawResponse) { /** * Successful Response */ - public Builder collectionNoCursorRefund(CollectionNoCursorRefund collectionNoCursorRefund) { - Utils.checkNotNull(collectionNoCursorRefund, "collectionNoCursorRefund"); - this.collectionNoCursorRefund = Optional.ofNullable(collectionNoCursorRefund); + public Builder collectionRefund(CollectionRefund collectionRefund) { + Utils.checkNotNull(collectionRefund, "collectionRefund"); + this.collectionRefund = Optional.ofNullable(collectionRefund); return this; } /** * Successful Response */ - public Builder collectionNoCursorRefund(Optional collectionNoCursorRefund) { - Utils.checkNotNull(collectionNoCursorRefund, "collectionNoCursorRefund"); - this.collectionNoCursorRefund = collectionNoCursorRefund; + public Builder collectionRefund(Optional collectionRefund) { + Utils.checkNotNull(collectionRefund, "collectionRefund"); + this.collectionRefund = collectionRefund; return this; } @@ -243,7 +243,7 @@ public CreateFullTransactionRefundResponse build() { contentType, statusCode, rawResponse, - collectionNoCursorRefund); + collectionRefund); } } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequest.java index 0f3636cf..3c55ebd6 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.GiftCardCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateGiftCardRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class CreateGiftCardRequest { @JsonCreator public CreateGiftCardRequest( + Optional applicationName, JsonNullable merchantAccountId, GiftCardCreate giftCardCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(giftCardCreate, "giftCardCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.giftCardCreate = giftCardCreate; } public CreateGiftCardRequest( GiftCardCreate giftCardCreate) { - this(JsonNullable.undefined(), giftCardCreate); + this(Optional.empty(), JsonNullable.undefined(), giftCardCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public CreateGiftCardRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateGiftCardRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } CreateGiftCardRequest other = (CreateGiftCardRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.giftCardCreate, other.giftCardCreate); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, giftCardCreate); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreateGiftCardRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "giftCardCreate", giftCardCreate); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private GiftCardCreate giftCardCreate; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder giftCardCreate(GiftCardCreate giftCardCreate) { } public CreateGiftCardRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreateGiftCardRequest( + applicationName, merchantAccountId, giftCardCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequestBuilder.java index 19082d47..d477f7fa 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateGiftCardRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.GiftCardCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateGiftCardRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private GiftCardCreate giftCardCreate; private final SDKMethodInterfaces.MethodCallCreateGiftCard sdk; @@ -18,6 +25,18 @@ public class CreateGiftCardRequestBuilder { public CreateGiftCardRequestBuilder(SDKMethodInterfaces.MethodCallCreateGiftCard sdk) { this.sdk = sdk; } + + public CreateGiftCardRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateGiftCardRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateGiftCardRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public CreateGiftCardRequestBuilder giftCardCreate(GiftCardCreate giftCardCreate } public CreateGiftCardResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, giftCardCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequest.java index c33fbb6e..95c23fcc 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.GooglePaySessionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateGooglePayDigitalWalletSessionRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class CreateGooglePayDigitalWalletSessionRequest { @JsonCreator public CreateGooglePayDigitalWalletSessionRequest( + Optional applicationName, JsonNullable merchantAccountId, GooglePaySessionRequest googlePaySessionRequest) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(googlePaySessionRequest, "googlePaySessionRequest"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.googlePaySessionRequest = googlePaySessionRequest; } public CreateGooglePayDigitalWalletSessionRequest( GooglePaySessionRequest googlePaySessionRequest) { - this(JsonNullable.undefined(), googlePaySessionRequest); + this(Optional.empty(), JsonNullable.undefined(), googlePaySessionRequest); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public CreateGooglePayDigitalWalletSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateGooglePayDigitalWalletSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } CreateGooglePayDigitalWalletSessionRequest other = (CreateGooglePayDigitalWalletSessionRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.googlePaySessionRequest, other.googlePaySessionRequest); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, googlePaySessionRequest); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreateGooglePayDigitalWalletSessionRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "googlePaySessionRequest", googlePaySessionRequest); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private GooglePaySessionRequest googlePaySessionRequest; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder googlePaySessionRequest(GooglePaySessionRequest googlePaySessionR } public CreateGooglePayDigitalWalletSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreateGooglePayDigitalWalletSessionRequest( + applicationName, merchantAccountId, googlePaySessionRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequestBuilder.java index 73183658..acb7a992 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateGooglePayDigitalWalletSessionRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.GooglePaySessionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateGooglePayDigitalWalletSessionRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private GooglePaySessionRequest googlePaySessionRequest; private final SDKMethodInterfaces.MethodCallCreateGooglePayDigitalWalletSession sdk; @@ -18,6 +25,18 @@ public class CreateGooglePayDigitalWalletSessionRequestBuilder { public CreateGooglePayDigitalWalletSessionRequestBuilder(SDKMethodInterfaces.MethodCallCreateGooglePayDigitalWalletSession sdk) { this.sdk = sdk; } + + public CreateGooglePayDigitalWalletSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateGooglePayDigitalWalletSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateGooglePayDigitalWalletSessionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public CreateGooglePayDigitalWalletSessionRequestBuilder googlePaySessionRequest } public CreateGooglePayDigitalWalletSessionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.googlePay( + applicationName, merchantAccountId, googlePaySessionRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequest.java new file mode 100644 index 00000000..cfe238cc --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequest.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.models.components.MerchantAccountCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; +import com.gr4vy.sdk.utils.SpeakeasyMetadata; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public class CreateMerchantAccountRequest { + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + + @SpeakeasyMetadata("request:mediaType=application/json") + private MerchantAccountCreate merchantAccountCreate; + + @JsonCreator + public CreateMerchantAccountRequest( + Optional applicationName, + MerchantAccountCreate merchantAccountCreate) { + Utils.checkNotNull(applicationName, "applicationName"); + Utils.checkNotNull(merchantAccountCreate, "merchantAccountCreate"); + this.applicationName = applicationName; + this.merchantAccountCreate = merchantAccountCreate; + } + + public CreateMerchantAccountRequest( + MerchantAccountCreate merchantAccountCreate) { + this(Optional.empty(), merchantAccountCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + + @JsonIgnore + public MerchantAccountCreate merchantAccountCreate() { + return merchantAccountCreate; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreateMerchantAccountRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateMerchantAccountRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + + public CreateMerchantAccountRequest withMerchantAccountCreate(MerchantAccountCreate merchantAccountCreate) { + Utils.checkNotNull(merchantAccountCreate, "merchantAccountCreate"); + this.merchantAccountCreate = merchantAccountCreate; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMerchantAccountRequest other = (CreateMerchantAccountRequest) o; + return + Objects.deepEquals(this.applicationName, other.applicationName) && + Objects.deepEquals(this.merchantAccountCreate, other.merchantAccountCreate); + } + + @Override + public int hashCode() { + return Objects.hash( + applicationName, + merchantAccountCreate); + } + + @Override + public String toString() { + return Utils.toString(CreateMerchantAccountRequest.class, + "applicationName", applicationName, + "merchantAccountCreate", merchantAccountCreate); + } + + public final static class Builder { + + private Optional applicationName; + + private MerchantAccountCreate merchantAccountCreate; + + private Builder() { + // force use of static builder() method + } + + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + + public Builder merchantAccountCreate(MerchantAccountCreate merchantAccountCreate) { + Utils.checkNotNull(merchantAccountCreate, "merchantAccountCreate"); + this.merchantAccountCreate = merchantAccountCreate; + return this; + } + + public CreateMerchantAccountRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } + return new CreateMerchantAccountRequest( + applicationName, + merchantAccountCreate); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequestBuilder.java index 7b06bc8d..94b29c8b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateMerchantAccountRequestBuilder.java @@ -3,28 +3,57 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.MerchantAccountCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; +import java.lang.String; +import java.util.Optional; public class CreateMerchantAccountRequestBuilder { - private MerchantAccountCreate request; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); + private MerchantAccountCreate merchantAccountCreate; private final SDKMethodInterfaces.MethodCallCreateMerchantAccount sdk; public CreateMerchantAccountRequestBuilder(SDKMethodInterfaces.MethodCallCreateMerchantAccount sdk) { this.sdk = sdk; } + + public CreateMerchantAccountRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } - public CreateMerchantAccountRequestBuilder request(MerchantAccountCreate request) { - Utils.checkNotNull(request, "request"); - this.request = request; + public CreateMerchantAccountRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; return this; } - public CreateMerchantAccountResponse call() throws Exception { + public CreateMerchantAccountRequestBuilder merchantAccountCreate(MerchantAccountCreate merchantAccountCreate) { + Utils.checkNotNull(merchantAccountCreate, "merchantAccountCreate"); + this.merchantAccountCreate = merchantAccountCreate; + return this; + } + public CreateMerchantAccountResponse call() throws Exception { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( - request); + applicationName, + merchantAccountCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.java index 0ec877de..f30150f1 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.CryptogramCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodNetworkTokenCryptogramRequest { @@ -27,6 +30,9 @@ public class CreatePaymentMethodNetworkTokenCryptogramRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=network_token_id") private String networkTokenId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -40,14 +46,17 @@ public class CreatePaymentMethodNetworkTokenCryptogramRequest { public CreatePaymentMethodNetworkTokenCryptogramRequest( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId, CryptogramCreate cryptogramCreate) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); Utils.checkNotNull(networkTokenId, "networkTokenId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(cryptogramCreate, "cryptogramCreate"); this.paymentMethodId = paymentMethodId; this.networkTokenId = networkTokenId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.cryptogramCreate = cryptogramCreate; } @@ -56,7 +65,7 @@ public CreatePaymentMethodNetworkTokenCryptogramRequest( String paymentMethodId, String networkTokenId, CryptogramCreate cryptogramCreate) { - this(paymentMethodId, networkTokenId, JsonNullable.undefined(), cryptogramCreate); + this(paymentMethodId, networkTokenId, Optional.empty(), JsonNullable.undefined(), cryptogramCreate); } /** @@ -75,6 +84,11 @@ public String networkTokenId() { return networkTokenId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -110,6 +124,18 @@ public CreatePaymentMethodNetworkTokenCryptogramRequest withNetworkTokenId(Strin return this; } + public CreatePaymentMethodNetworkTokenCryptogramRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePaymentMethodNetworkTokenCryptogramRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -147,6 +173,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && Objects.deepEquals(this.networkTokenId, other.networkTokenId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.cryptogramCreate, other.cryptogramCreate); } @@ -156,6 +183,7 @@ public int hashCode() { return Objects.hash( paymentMethodId, networkTokenId, + applicationName, merchantAccountId, cryptogramCreate); } @@ -165,6 +193,7 @@ public String toString() { return Utils.toString(CreatePaymentMethodNetworkTokenCryptogramRequest.class, "paymentMethodId", paymentMethodId, "networkTokenId", networkTokenId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "cryptogramCreate", cryptogramCreate); } @@ -175,6 +204,8 @@ public final static class Builder { private String networkTokenId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private CryptogramCreate cryptogramCreate; @@ -201,6 +232,18 @@ public Builder networkTokenId(String networkTokenId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -226,11 +269,21 @@ public Builder cryptogramCreate(CryptogramCreate cryptogramCreate) { } public CreatePaymentMethodNetworkTokenCryptogramRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePaymentMethodNetworkTokenCryptogramRequest( paymentMethodId, networkTokenId, + applicationName, merchantAccountId, cryptogramCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequestBuilder.java index fecffb06..6b684691 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenCryptogramRequestBuilder.java @@ -3,60 +3,27 @@ */ package com.gr4vy.sdk.models.operations; -import com.gr4vy.sdk.models.components.CryptogramCreate; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; -import java.lang.String; -import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodNetworkTokenCryptogramRequestBuilder { - private String paymentMethodId; - private String networkTokenId; - private JsonNullable merchantAccountId = JsonNullable.undefined(); - private CryptogramCreate cryptogramCreate; + private CreatePaymentMethodNetworkTokenCryptogramRequest request; private final SDKMethodInterfaces.MethodCallCreatePaymentMethodNetworkTokenCryptogram sdk; public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder(SDKMethodInterfaces.MethodCallCreatePaymentMethodNetworkTokenCryptogram sdk) { this.sdk = sdk; } - public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder paymentMethodId(String paymentMethodId) { - Utils.checkNotNull(paymentMethodId, "paymentMethodId"); - this.paymentMethodId = paymentMethodId; - return this; - } - - public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder networkTokenId(String networkTokenId) { - Utils.checkNotNull(networkTokenId, "networkTokenId"); - this.networkTokenId = networkTokenId; - return this; - } - - public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder merchantAccountId(String merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = JsonNullable.of(merchantAccountId); - return this; - } - - public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder merchantAccountId(JsonNullable merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = merchantAccountId; - return this; - } - - public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder cryptogramCreate(CryptogramCreate cryptogramCreate) { - Utils.checkNotNull(cryptogramCreate, "cryptogramCreate"); - this.cryptogramCreate = cryptogramCreate; + public CreatePaymentMethodNetworkTokenCryptogramRequestBuilder request(CreatePaymentMethodNetworkTokenCryptogramRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } public CreatePaymentMethodNetworkTokenCryptogramResponse call() throws Exception { return sdk.create( - paymentMethodId, - networkTokenId, - merchantAccountId, - cryptogramCreate); + request); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequest.java index 30981417..f4acc70d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.NetworkTokenCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodNetworkTokenRequest { @@ -21,6 +24,9 @@ public class CreatePaymentMethodNetworkTokenRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_method_id") private String paymentMethodId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class CreatePaymentMethodNetworkTokenRequest { @JsonCreator public CreatePaymentMethodNetworkTokenRequest( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, NetworkTokenCreate networkTokenCreate) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(networkTokenCreate, "networkTokenCreate"); this.paymentMethodId = paymentMethodId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.networkTokenCreate = networkTokenCreate; } @@ -46,7 +55,7 @@ public CreatePaymentMethodNetworkTokenRequest( public CreatePaymentMethodNetworkTokenRequest( String paymentMethodId, NetworkTokenCreate networkTokenCreate) { - this(paymentMethodId, JsonNullable.undefined(), networkTokenCreate); + this(paymentMethodId, Optional.empty(), JsonNullable.undefined(), networkTokenCreate); } /** @@ -57,6 +66,11 @@ public String paymentMethodId() { return paymentMethodId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public CreatePaymentMethodNetworkTokenRequest withPaymentMethodId(String payment return this; } + public CreatePaymentMethodNetworkTokenRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePaymentMethodNetworkTokenRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { CreatePaymentMethodNetworkTokenRequest other = (CreatePaymentMethodNetworkTokenRequest) o; return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.networkTokenCreate, other.networkTokenCreate); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentMethodId, + applicationName, merchantAccountId, networkTokenCreate); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreatePaymentMethodNetworkTokenRequest.class, "paymentMethodId", paymentMethodId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "networkTokenCreate", networkTokenCreate); } @@ -143,6 +172,8 @@ public final static class Builder { private String paymentMethodId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private NetworkTokenCreate networkTokenCreate; @@ -160,6 +191,18 @@ public Builder paymentMethodId(String paymentMethodId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder networkTokenCreate(NetworkTokenCreate networkTokenCreate) { } public CreatePaymentMethodNetworkTokenRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePaymentMethodNetworkTokenRequest( paymentMethodId, + applicationName, merchantAccountId, networkTokenCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequestBuilder.java index 9ac94c02..410ad037 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodNetworkTokenRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.NetworkTokenCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodNetworkTokenRequestBuilder { private String paymentMethodId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private NetworkTokenCreate networkTokenCreate; private final SDKMethodInterfaces.MethodCallCreatePaymentMethodNetworkToken sdk; @@ -25,6 +32,18 @@ public CreatePaymentMethodNetworkTokenRequestBuilder paymentMethodId(String paym this.paymentMethodId = paymentMethodId; return this; } + + public CreatePaymentMethodNetworkTokenRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreatePaymentMethodNetworkTokenRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreatePaymentMethodNetworkTokenRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public CreatePaymentMethodNetworkTokenRequestBuilder networkTokenCreate(NetworkT } public CreatePaymentMethodNetworkTokenResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( paymentMethodId, + applicationName, merchantAccountId, networkTokenCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.java index 32e05848..e98186fb 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentServiceTokenCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodPaymentServiceTokenRequest { @@ -21,6 +24,9 @@ public class CreatePaymentMethodPaymentServiceTokenRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_method_id") private String paymentMethodId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class CreatePaymentMethodPaymentServiceTokenRequest { @JsonCreator public CreatePaymentMethodPaymentServiceTokenRequest( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceTokenCreate paymentServiceTokenCreate) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(paymentServiceTokenCreate, "paymentServiceTokenCreate"); this.paymentMethodId = paymentMethodId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.paymentServiceTokenCreate = paymentServiceTokenCreate; } @@ -46,7 +55,7 @@ public CreatePaymentMethodPaymentServiceTokenRequest( public CreatePaymentMethodPaymentServiceTokenRequest( String paymentMethodId, PaymentServiceTokenCreate paymentServiceTokenCreate) { - this(paymentMethodId, JsonNullable.undefined(), paymentServiceTokenCreate); + this(paymentMethodId, Optional.empty(), JsonNullable.undefined(), paymentServiceTokenCreate); } /** @@ -57,6 +66,11 @@ public String paymentMethodId() { return paymentMethodId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public CreatePaymentMethodPaymentServiceTokenRequest withPaymentMethodId(String return this; } + public CreatePaymentMethodPaymentServiceTokenRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePaymentMethodPaymentServiceTokenRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { CreatePaymentMethodPaymentServiceTokenRequest other = (CreatePaymentMethodPaymentServiceTokenRequest) o; return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.paymentServiceTokenCreate, other.paymentServiceTokenCreate); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentMethodId, + applicationName, merchantAccountId, paymentServiceTokenCreate); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreatePaymentMethodPaymentServiceTokenRequest.class, "paymentMethodId", paymentMethodId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "paymentServiceTokenCreate", paymentServiceTokenCreate); } @@ -143,6 +172,8 @@ public final static class Builder { private String paymentMethodId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentServiceTokenCreate paymentServiceTokenCreate; @@ -160,6 +191,18 @@ public Builder paymentMethodId(String paymentMethodId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder paymentServiceTokenCreate(PaymentServiceTokenCreate paymentServic } public CreatePaymentMethodPaymentServiceTokenRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePaymentMethodPaymentServiceTokenRequest( paymentMethodId, + applicationName, merchantAccountId, paymentServiceTokenCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequestBuilder.java index 2c95a60c..49344b26 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodPaymentServiceTokenRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentServiceTokenCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodPaymentServiceTokenRequestBuilder { private String paymentMethodId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentServiceTokenCreate paymentServiceTokenCreate; private final SDKMethodInterfaces.MethodCallCreatePaymentMethodPaymentServiceToken sdk; @@ -25,6 +32,18 @@ public CreatePaymentMethodPaymentServiceTokenRequestBuilder paymentMethodId(Stri this.paymentMethodId = paymentMethodId; return this; } + + public CreatePaymentMethodPaymentServiceTokenRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreatePaymentMethodPaymentServiceTokenRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreatePaymentMethodPaymentServiceTokenRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public CreatePaymentMethodPaymentServiceTokenRequestBuilder paymentServiceTokenC } public CreatePaymentMethodPaymentServiceTokenResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( paymentMethodId, + applicationName, merchantAccountId, paymentServiceTokenCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequest.java index 0d939491..e1924a98 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequest.java @@ -5,15 +5,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -25,17 +31,25 @@ public class CreatePaymentMethodRequest { @JsonCreator public CreatePaymentMethodRequest( + Optional applicationName, JsonNullable merchantAccountId, Body requestBody) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(requestBody, "requestBody"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.requestBody = requestBody; } public CreatePaymentMethodRequest( Body requestBody) { - this(JsonNullable.undefined(), requestBody); + this(Optional.empty(), JsonNullable.undefined(), requestBody); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -55,6 +69,18 @@ public final static Builder builder() { return new Builder(); } + public CreatePaymentMethodRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePaymentMethodRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -90,6 +116,7 @@ public boolean equals(java.lang.Object o) { } CreatePaymentMethodRequest other = (CreatePaymentMethodRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.requestBody, other.requestBody); } @@ -97,6 +124,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, requestBody); } @@ -104,12 +132,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreatePaymentMethodRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "requestBody", requestBody); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Body requestBody; @@ -118,6 +149,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -143,9 +186,19 @@ public Builder requestBody(Body requestBody) { } public CreatePaymentMethodRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePaymentMethodRequest( + applicationName, merchantAccountId, requestBody); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequestBuilder.java index 186c9190..25d97d41 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentMethodRequestBuilder.java @@ -3,13 +3,20 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentMethodRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Body requestBody; private final SDKMethodInterfaces.MethodCallCreatePaymentMethod sdk; @@ -17,6 +24,18 @@ public class CreatePaymentMethodRequestBuilder { public CreatePaymentMethodRequestBuilder(SDKMethodInterfaces.MethodCallCreatePaymentMethod sdk) { this.sdk = sdk; } + + public CreatePaymentMethodRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreatePaymentMethodRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreatePaymentMethodRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public CreatePaymentMethodRequestBuilder requestBody(Body requestBody) { } public CreatePaymentMethodResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, requestBody); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequest.java index 3a648acd..e5e7d058 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequest.java @@ -5,6 +5,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Object; @@ -12,30 +14,48 @@ import java.lang.String; import java.util.Map; import java.util.Objects; +import java.util.Optional; public class CreatePaymentServiceDefinitionSessionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_definition_id") private String paymentServiceDefinitionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + @SpeakeasyMetadata("request:mediaType=application/json") private Map requestBody; @JsonCreator public CreatePaymentServiceDefinitionSessionRequest( String paymentServiceDefinitionId, + Optional applicationName, Map requestBody) { Utils.checkNotNull(paymentServiceDefinitionId, "paymentServiceDefinitionId"); + Utils.checkNotNull(applicationName, "applicationName"); requestBody = Utils.emptyMapIfNull(requestBody); this.paymentServiceDefinitionId = paymentServiceDefinitionId; + this.applicationName = applicationName; this.requestBody = requestBody; } + + public CreatePaymentServiceDefinitionSessionRequest( + String paymentServiceDefinitionId, + Map requestBody) { + this(paymentServiceDefinitionId, Optional.empty(), requestBody); + } @JsonIgnore public String paymentServiceDefinitionId() { return paymentServiceDefinitionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + @JsonIgnore public Map requestBody() { return requestBody; @@ -51,6 +71,18 @@ public CreatePaymentServiceDefinitionSessionRequest withPaymentServiceDefinition return this; } + public CreatePaymentServiceDefinitionSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePaymentServiceDefinitionSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public CreatePaymentServiceDefinitionSessionRequest withRequestBody(Map requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; @@ -69,6 +101,7 @@ public boolean equals(java.lang.Object o) { CreatePaymentServiceDefinitionSessionRequest other = (CreatePaymentServiceDefinitionSessionRequest) o; return Objects.deepEquals(this.paymentServiceDefinitionId, other.paymentServiceDefinitionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.requestBody, other.requestBody); } @@ -76,6 +109,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentServiceDefinitionId, + applicationName, requestBody); } @@ -83,6 +117,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreatePaymentServiceDefinitionSessionRequest.class, "paymentServiceDefinitionId", paymentServiceDefinitionId, + "applicationName", applicationName, "requestBody", requestBody); } @@ -90,6 +125,8 @@ public final static class Builder { private String paymentServiceDefinitionId; + private Optional applicationName; + private Map requestBody; private Builder() { @@ -102,6 +139,18 @@ public Builder paymentServiceDefinitionId(String paymentServiceDefinitionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public Builder requestBody(Map requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; @@ -109,9 +158,19 @@ public Builder requestBody(Map requestBody) { } public CreatePaymentServiceDefinitionSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePaymentServiceDefinitionSessionRequest( paymentServiceDefinitionId, + applicationName, requestBody); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequestBuilder.java index 38f66421..fb4cbbde 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceDefinitionSessionRequestBuilder.java @@ -3,16 +3,23 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.Object; import java.lang.String; import java.util.HashMap; import java.util.Map; +import java.util.Optional; public class CreatePaymentServiceDefinitionSessionRequestBuilder { private String paymentServiceDefinitionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private Map requestBody = new HashMap<>(); private final SDKMethodInterfaces.MethodCallCreatePaymentServiceDefinitionSession sdk; @@ -25,6 +32,18 @@ public CreatePaymentServiceDefinitionSessionRequestBuilder paymentServiceDefinit this.paymentServiceDefinitionId = paymentServiceDefinitionId; return this; } + + public CreatePaymentServiceDefinitionSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreatePaymentServiceDefinitionSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreatePaymentServiceDefinitionSessionRequestBuilder requestBody(Map requestBody) { Utils.checkNotNull(requestBody, "requestBody"); @@ -33,9 +52,18 @@ public CreatePaymentServiceDefinitionSessionRequestBuilder requestBody(Map> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java index a2483764..3c99472a 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentServiceUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentServiceRequest { @@ -21,6 +24,9 @@ public class CreatePaymentServiceRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_id") private String paymentServiceId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class CreatePaymentServiceRequest { @JsonCreator public CreatePaymentServiceRequest( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceUpdate paymentServiceUpdate) { Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(paymentServiceUpdate, "paymentServiceUpdate"); this.paymentServiceId = paymentServiceId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.paymentServiceUpdate = paymentServiceUpdate; } @@ -46,7 +55,7 @@ public CreatePaymentServiceRequest( public CreatePaymentServiceRequest( String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) { - this(paymentServiceId, JsonNullable.undefined(), paymentServiceUpdate); + this(paymentServiceId, Optional.empty(), JsonNullable.undefined(), paymentServiceUpdate); } /** @@ -57,6 +66,11 @@ public String paymentServiceId() { return paymentServiceId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public CreatePaymentServiceRequest withPaymentServiceId(String paymentServiceId) return this; } + public CreatePaymentServiceRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePaymentServiceRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { CreatePaymentServiceRequest other = (CreatePaymentServiceRequest) o; return Objects.deepEquals(this.paymentServiceId, other.paymentServiceId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.paymentServiceUpdate, other.paymentServiceUpdate); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentServiceId, + applicationName, merchantAccountId, paymentServiceUpdate); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreatePaymentServiceRequest.class, "paymentServiceId", paymentServiceId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "paymentServiceUpdate", paymentServiceUpdate); } @@ -143,6 +172,8 @@ public final static class Builder { private String paymentServiceId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentServiceUpdate paymentServiceUpdate; @@ -160,6 +191,18 @@ public Builder paymentServiceId(String paymentServiceId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder paymentServiceUpdate(PaymentServiceUpdate paymentServiceUpdate) { } public CreatePaymentServiceRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePaymentServiceRequest( paymentServiceId, + applicationName, merchantAccountId, paymentServiceUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java index 11891f35..1595c035 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentServiceUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentServiceRequestBuilder { private String paymentServiceId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentServiceUpdate paymentServiceUpdate; private final SDKMethodInterfaces.MethodCallCreatePaymentService sdk; @@ -25,6 +32,18 @@ public CreatePaymentServiceRequestBuilder paymentServiceId(String paymentService this.paymentServiceId = paymentServiceId; return this; } + + public CreatePaymentServiceRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreatePaymentServiceRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreatePaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public CreatePaymentServiceRequestBuilder paymentServiceUpdate(PaymentServiceUpd } public CreatePaymentServiceResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.update( paymentServiceId, + applicationName, merchantAccountId, paymentServiceUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequest.java index b39fa850..83654d6d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequest.java @@ -5,6 +5,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Object; @@ -12,6 +14,7 @@ import java.lang.String; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentServiceSessionRequest { @@ -22,6 +25,9 @@ public class CreatePaymentServiceSessionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_id") private String paymentServiceId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -34,12 +40,15 @@ public class CreatePaymentServiceSessionRequest { @JsonCreator public CreatePaymentServiceSessionRequest( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, Map requestBody) { Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); requestBody = Utils.emptyMapIfNull(requestBody); this.paymentServiceId = paymentServiceId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.requestBody = requestBody; } @@ -47,7 +56,7 @@ public CreatePaymentServiceSessionRequest( public CreatePaymentServiceSessionRequest( String paymentServiceId, Map requestBody) { - this(paymentServiceId, JsonNullable.undefined(), requestBody); + this(paymentServiceId, Optional.empty(), JsonNullable.undefined(), requestBody); } /** @@ -58,6 +67,11 @@ public String paymentServiceId() { return paymentServiceId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -84,6 +98,18 @@ public CreatePaymentServiceSessionRequest withPaymentServiceId(String paymentSer return this; } + public CreatePaymentServiceSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePaymentServiceSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -120,6 +146,7 @@ public boolean equals(java.lang.Object o) { CreatePaymentServiceSessionRequest other = (CreatePaymentServiceSessionRequest) o; return Objects.deepEquals(this.paymentServiceId, other.paymentServiceId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.requestBody, other.requestBody); } @@ -128,6 +155,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentServiceId, + applicationName, merchantAccountId, requestBody); } @@ -136,6 +164,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreatePaymentServiceSessionRequest.class, "paymentServiceId", paymentServiceId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "requestBody", requestBody); } @@ -144,6 +173,8 @@ public final static class Builder { private String paymentServiceId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Map requestBody; @@ -161,6 +192,18 @@ public Builder paymentServiceId(String paymentServiceId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -186,10 +229,20 @@ public Builder requestBody(Map requestBody) { } public CreatePaymentServiceSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePaymentServiceSessionRequest( paymentServiceId, + applicationName, merchantAccountId, requestBody); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequestBuilder.java index 04a3398b..b97857c6 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePaymentServiceSessionRequestBuilder.java @@ -3,17 +3,24 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.Object; import java.lang.String; import java.util.HashMap; import java.util.Map; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePaymentServiceSessionRequestBuilder { private String paymentServiceId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Map requestBody = new HashMap<>(); private final SDKMethodInterfaces.MethodCallCreatePaymentServiceSession sdk; @@ -27,6 +34,18 @@ public CreatePaymentServiceSessionRequestBuilder paymentServiceId(String payment this.paymentServiceId = paymentServiceId; return this; } + + public CreatePaymentServiceSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreatePaymentServiceSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreatePaymentServiceSessionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -47,10 +66,19 @@ public CreatePaymentServiceSessionRequestBuilder requestBody(Map } public CreatePaymentServiceSessionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.session( paymentServiceId, + applicationName, merchantAccountId, requestBody); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequest.java index db18d180..b49c0010 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PayoutCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePayoutRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class CreatePayoutRequest { @JsonCreator public CreatePayoutRequest( + Optional applicationName, JsonNullable merchantAccountId, PayoutCreate payoutCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(payoutCreate, "payoutCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.payoutCreate = payoutCreate; } public CreatePayoutRequest( PayoutCreate payoutCreate) { - this(JsonNullable.undefined(), payoutCreate); + this(Optional.empty(), JsonNullable.undefined(), payoutCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public CreatePayoutRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreatePayoutRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } CreatePayoutRequest other = (CreatePayoutRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.payoutCreate, other.payoutCreate); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, payoutCreate); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreatePayoutRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "payoutCreate", payoutCreate); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private PayoutCreate payoutCreate; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder payoutCreate(PayoutCreate payoutCreate) { } public CreatePayoutRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreatePayoutRequest( + applicationName, merchantAccountId, payoutCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequestBuilder.java index 147e54ce..0e72f4c0 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreatePayoutRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PayoutCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreatePayoutRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private PayoutCreate payoutCreate; private final SDKMethodInterfaces.MethodCallCreatePayout sdk; @@ -18,6 +25,18 @@ public class CreatePayoutRequestBuilder { public CreatePayoutRequestBuilder(SDKMethodInterfaces.MethodCallCreatePayout sdk) { this.sdk = sdk; } + + public CreatePayoutRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreatePayoutRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreatePayoutRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public CreatePayoutRequestBuilder payoutCreate(PayoutCreate payoutCreate) { } public CreatePayoutResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, payoutCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequest.java index 55f333c8..ae8190e1 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionRefundCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateTransactionRefundRequest { @@ -18,6 +21,9 @@ public class CreateTransactionRefundRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transaction_id") private String transactionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -30,12 +36,15 @@ public class CreateTransactionRefundRequest { @JsonCreator public CreateTransactionRefundRequest( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, TransactionRefundCreate transactionRefundCreate) { Utils.checkNotNull(transactionId, "transactionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(transactionRefundCreate, "transactionRefundCreate"); this.transactionId = transactionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.transactionRefundCreate = transactionRefundCreate; } @@ -43,7 +52,7 @@ public CreateTransactionRefundRequest( public CreateTransactionRefundRequest( String transactionId, TransactionRefundCreate transactionRefundCreate) { - this(transactionId, JsonNullable.undefined(), transactionRefundCreate); + this(transactionId, Optional.empty(), JsonNullable.undefined(), transactionRefundCreate); } @JsonIgnore @@ -51,6 +60,11 @@ public String transactionId() { return transactionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -74,6 +88,18 @@ public CreateTransactionRefundRequest withTransactionId(String transactionId) { return this; } + public CreateTransactionRefundRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateTransactionRefundRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -110,6 +136,7 @@ public boolean equals(java.lang.Object o) { CreateTransactionRefundRequest other = (CreateTransactionRefundRequest) o; return Objects.deepEquals(this.transactionId, other.transactionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.transactionRefundCreate, other.transactionRefundCreate); } @@ -118,6 +145,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( transactionId, + applicationName, merchantAccountId, transactionRefundCreate); } @@ -126,6 +154,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreateTransactionRefundRequest.class, "transactionId", transactionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "transactionRefundCreate", transactionRefundCreate); } @@ -134,6 +163,8 @@ public final static class Builder { private String transactionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private TransactionRefundCreate transactionRefundCreate; @@ -148,6 +179,18 @@ public Builder transactionId(String transactionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -173,10 +216,20 @@ public Builder transactionRefundCreate(TransactionRefundCreate transactionRefund } public CreateTransactionRefundRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreateTransactionRefundRequest( transactionId, + applicationName, merchantAccountId, transactionRefundCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequestBuilder.java index 8bb14bbc..1e9115eb 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRefundRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionRefundCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateTransactionRefundRequestBuilder { private String transactionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private TransactionRefundCreate transactionRefundCreate; private final SDKMethodInterfaces.MethodCallCreateTransactionRefund sdk; @@ -25,6 +32,18 @@ public CreateTransactionRefundRequestBuilder transactionId(String transactionId) this.transactionId = transactionId; return this; } + + public CreateTransactionRefundRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateTransactionRefundRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateTransactionRefundRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public CreateTransactionRefundRequestBuilder transactionRefundCreate(Transaction } public CreateTransactionRefundResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( transactionId, + applicationName, merchantAccountId, transactionRefundCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequest.java index a7504e00..4c248664 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateTransactionRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -32,12 +38,15 @@ public class CreateTransactionRequest { @JsonCreator public CreateTransactionRequest( + Optional applicationName, JsonNullable merchantAccountId, JsonNullable idempotencyKey, TransactionCreate transactionCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(idempotencyKey, "idempotencyKey"); Utils.checkNotNull(transactionCreate, "transactionCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.idempotencyKey = idempotencyKey; this.transactionCreate = transactionCreate; @@ -45,7 +54,12 @@ public CreateTransactionRequest( public CreateTransactionRequest( TransactionCreate transactionCreate) { - this(JsonNullable.undefined(), JsonNullable.undefined(), transactionCreate); + this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), transactionCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -73,6 +87,18 @@ public final static Builder builder() { return new Builder(); } + public CreateTransactionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public CreateTransactionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -126,6 +152,7 @@ public boolean equals(java.lang.Object o) { } CreateTransactionRequest other = (CreateTransactionRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.idempotencyKey, other.idempotencyKey) && Objects.deepEquals(this.transactionCreate, other.transactionCreate); @@ -134,6 +161,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, idempotencyKey, transactionCreate); @@ -142,6 +170,7 @@ public int hashCode() { @Override public String toString() { return Utils.toString(CreateTransactionRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "idempotencyKey", idempotencyKey, "transactionCreate", transactionCreate); @@ -149,6 +178,8 @@ public String toString() { public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private JsonNullable idempotencyKey = JsonNullable.undefined(); @@ -159,6 +190,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -202,10 +245,20 @@ public Builder transactionCreate(TransactionCreate transactionCreate) { } public CreateTransactionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new CreateTransactionRequest( + applicationName, merchantAccountId, idempotencyKey, transactionCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequestBuilder.java index 26236e2d..a07f15dd 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/CreateTransactionRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.TransactionCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class CreateTransactionRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private JsonNullable idempotencyKey = JsonNullable.undefined(); private TransactionCreate transactionCreate; @@ -19,6 +26,18 @@ public class CreateTransactionRequestBuilder { public CreateTransactionRequestBuilder(SDKMethodInterfaces.MethodCallCreateTransaction sdk) { this.sdk = sdk; } + + public CreateTransactionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public CreateTransactionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public CreateTransactionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -51,10 +70,19 @@ public CreateTransactionRequestBuilder transactionCreate(TransactionCreate trans } public CreateTransactionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, idempotencyKey, transactionCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequest.java index c1927992..111bd8b4 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteBuyerRequest { @@ -20,6 +23,9 @@ public class DeleteBuyerRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=buyer_id") private String buyerId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class DeleteBuyerRequest { @JsonCreator public DeleteBuyerRequest( String buyerId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerId = buyerId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeleteBuyerRequest( String buyerId) { - this(buyerId, JsonNullable.undefined()); + this(buyerId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String buyerId() { return buyerId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public DeleteBuyerRequest withBuyerId(String buyerId) { return this; } + public DeleteBuyerRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeleteBuyerRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { DeleteBuyerRequest other = (DeleteBuyerRequest) o; return Objects.deepEquals(this.buyerId, other.buyerId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( buyerId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(DeleteBuyerRequest.class, "buyerId", buyerId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String buyerId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder buyerId(String buyerId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeleteBuyerRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeleteBuyerRequest( buyerId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequestBuilder.java index b4848216..0a9f4d0f 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteBuyerRequestBuilder { private String buyerId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeleteBuyer sdk; @@ -23,6 +30,18 @@ public DeleteBuyerRequestBuilder buyerId(String buyerId) { this.buyerId = buyerId; return this; } + + public DeleteBuyerRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeleteBuyerRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeleteBuyerRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public DeleteBuyerRequestBuilder merchantAccountId(JsonNullable merchant } public DeleteBuyerResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( buyerId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequest.java index da062aca..65d6145f 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteBuyerShippingDetailsRequest { @@ -26,6 +29,9 @@ public class DeleteBuyerShippingDetailsRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=shipping_details_id") private String shippingDetailsId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -36,19 +42,22 @@ public class DeleteBuyerShippingDetailsRequest { public DeleteBuyerShippingDetailsRequest( String buyerId, String shippingDetailsId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerId, "buyerId"); Utils.checkNotNull(shippingDetailsId, "shippingDetailsId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerId = buyerId; this.shippingDetailsId = shippingDetailsId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeleteBuyerShippingDetailsRequest( String buyerId, String shippingDetailsId) { - this(buyerId, shippingDetailsId, JsonNullable.undefined()); + this(buyerId, shippingDetailsId, Optional.empty(), JsonNullable.undefined()); } /** @@ -67,6 +76,11 @@ public String shippingDetailsId() { return shippingDetailsId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -97,6 +111,18 @@ public DeleteBuyerShippingDetailsRequest withShippingDetailsId(String shippingDe return this; } + public DeleteBuyerShippingDetailsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeleteBuyerShippingDetailsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -128,6 +154,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.buyerId, other.buyerId) && Objects.deepEquals(this.shippingDetailsId, other.shippingDetailsId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -136,6 +163,7 @@ public int hashCode() { return Objects.hash( buyerId, shippingDetailsId, + applicationName, merchantAccountId); } @@ -144,6 +172,7 @@ public String toString() { return Utils.toString(DeleteBuyerShippingDetailsRequest.class, "buyerId", buyerId, "shippingDetailsId", shippingDetailsId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -153,6 +182,8 @@ public final static class Builder { private String shippingDetailsId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -177,6 +208,18 @@ public Builder shippingDetailsId(String shippingDetailsId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -196,10 +239,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeleteBuyerShippingDetailsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeleteBuyerShippingDetailsRequest( buyerId, shippingDetailsId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequestBuilder.java index ff5077e4..aa0b93fe 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteBuyerShippingDetailsRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteBuyerShippingDetailsRequestBuilder { private String buyerId; private String shippingDetailsId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeleteBuyerShippingDetails sdk; @@ -30,6 +37,18 @@ public DeleteBuyerShippingDetailsRequestBuilder shippingDetailsId(String shippin this.shippingDetailsId = shippingDetailsId; return this; } + + public DeleteBuyerShippingDetailsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeleteBuyerShippingDetailsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeleteBuyerShippingDetailsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -44,10 +63,19 @@ public DeleteBuyerShippingDetailsRequestBuilder merchantAccountId(JsonNullable> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequest.java index 2cf4b5f5..063ebd3b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteCheckoutSessionRequest { @@ -20,6 +23,9 @@ public class DeleteCheckoutSessionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=session_id") private String sessionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class DeleteCheckoutSessionRequest { @JsonCreator public DeleteCheckoutSessionRequest( String sessionId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(sessionId, "sessionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.sessionId = sessionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeleteCheckoutSessionRequest( String sessionId) { - this(sessionId, JsonNullable.undefined()); + this(sessionId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String sessionId() { return sessionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public DeleteCheckoutSessionRequest withSessionId(String sessionId) { return this; } + public DeleteCheckoutSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeleteCheckoutSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { DeleteCheckoutSessionRequest other = (DeleteCheckoutSessionRequest) o; return Objects.deepEquals(this.sessionId, other.sessionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( sessionId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(DeleteCheckoutSessionRequest.class, "sessionId", sessionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String sessionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder sessionId(String sessionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeleteCheckoutSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeleteCheckoutSessionRequest( sessionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequestBuilder.java index 70fb223f..02d1cdbc 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteCheckoutSessionRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteCheckoutSessionRequestBuilder { private String sessionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeleteCheckoutSession sdk; @@ -23,6 +30,18 @@ public DeleteCheckoutSessionRequestBuilder sessionId(String sessionId) { this.sessionId = sessionId; return this; } + + public DeleteCheckoutSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeleteCheckoutSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeleteCheckoutSessionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public DeleteCheckoutSessionRequestBuilder merchantAccountId(JsonNullable> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequest.java index 0c05e894..057372e7 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteDigitalWalletRequest { @@ -20,6 +23,9 @@ public class DeleteDigitalWalletRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=digital_wallet_id") private String digitalWalletId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class DeleteDigitalWalletRequest { @JsonCreator public DeleteDigitalWalletRequest( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(digitalWalletId, "digitalWalletId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.digitalWalletId = digitalWalletId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeleteDigitalWalletRequest( String digitalWalletId) { - this(digitalWalletId, JsonNullable.undefined()); + this(digitalWalletId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String digitalWalletId() { return digitalWalletId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public DeleteDigitalWalletRequest withDigitalWalletId(String digitalWalletId) { return this; } + public DeleteDigitalWalletRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeleteDigitalWalletRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { DeleteDigitalWalletRequest other = (DeleteDigitalWalletRequest) o; return Objects.deepEquals(this.digitalWalletId, other.digitalWalletId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( digitalWalletId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(DeleteDigitalWalletRequest.class, "digitalWalletId", digitalWalletId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String digitalWalletId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder digitalWalletId(String digitalWalletId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeleteDigitalWalletRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeleteDigitalWalletRequest( digitalWalletId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequestBuilder.java index 26a7d619..38e4c96e 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteDigitalWalletRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteDigitalWalletRequestBuilder { private String digitalWalletId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeleteDigitalWallet sdk; @@ -23,6 +30,18 @@ public DeleteDigitalWalletRequestBuilder digitalWalletId(String digitalWalletId) this.digitalWalletId = digitalWalletId; return this; } + + public DeleteDigitalWalletRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeleteDigitalWalletRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeleteDigitalWalletRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public DeleteDigitalWalletRequestBuilder merchantAccountId(JsonNullable } public DeleteDigitalWalletResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( digitalWalletId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequest.java index 031f962c..7e291775 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteGiftCardRequest { @@ -20,6 +23,9 @@ public class DeleteGiftCardRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=gift_card_id") private String giftCardId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class DeleteGiftCardRequest { @JsonCreator public DeleteGiftCardRequest( String giftCardId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(giftCardId, "giftCardId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.giftCardId = giftCardId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeleteGiftCardRequest( String giftCardId) { - this(giftCardId, JsonNullable.undefined()); + this(giftCardId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String giftCardId() { return giftCardId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public DeleteGiftCardRequest withGiftCardId(String giftCardId) { return this; } + public DeleteGiftCardRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeleteGiftCardRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { DeleteGiftCardRequest other = (DeleteGiftCardRequest) o; return Objects.deepEquals(this.giftCardId, other.giftCardId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( giftCardId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(DeleteGiftCardRequest.class, "giftCardId", giftCardId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String giftCardId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder giftCardId(String giftCardId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeleteGiftCardRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeleteGiftCardRequest( giftCardId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequestBuilder.java index 5d02076b..f132d0a6 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeleteGiftCardRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeleteGiftCardRequestBuilder { private String giftCardId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeleteGiftCard sdk; @@ -23,6 +30,18 @@ public DeleteGiftCardRequestBuilder giftCardId(String giftCardId) { this.giftCardId = giftCardId; return this; } + + public DeleteGiftCardRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeleteGiftCardRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeleteGiftCardRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public DeleteGiftCardRequestBuilder merchantAccountId(JsonNullable merch } public DeleteGiftCardResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( giftCardId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequest.java index c8975947..692b36c3 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentMethodNetworkTokenRequest { @@ -26,6 +29,9 @@ public class DeletePaymentMethodNetworkTokenRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=network_token_id") private String networkTokenId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -36,19 +42,22 @@ public class DeletePaymentMethodNetworkTokenRequest { public DeletePaymentMethodNetworkTokenRequest( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); Utils.checkNotNull(networkTokenId, "networkTokenId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; this.networkTokenId = networkTokenId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeletePaymentMethodNetworkTokenRequest( String paymentMethodId, String networkTokenId) { - this(paymentMethodId, networkTokenId, JsonNullable.undefined()); + this(paymentMethodId, networkTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -67,6 +76,11 @@ public String networkTokenId() { return networkTokenId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -97,6 +111,18 @@ public DeletePaymentMethodNetworkTokenRequest withNetworkTokenId(String networkT return this; } + public DeletePaymentMethodNetworkTokenRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeletePaymentMethodNetworkTokenRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -128,6 +154,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && Objects.deepEquals(this.networkTokenId, other.networkTokenId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -136,6 +163,7 @@ public int hashCode() { return Objects.hash( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } @@ -144,6 +172,7 @@ public String toString() { return Utils.toString(DeletePaymentMethodNetworkTokenRequest.class, "paymentMethodId", paymentMethodId, "networkTokenId", networkTokenId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -153,6 +182,8 @@ public final static class Builder { private String networkTokenId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -177,6 +208,18 @@ public Builder networkTokenId(String networkTokenId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -196,10 +239,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeletePaymentMethodNetworkTokenRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeletePaymentMethodNetworkTokenRequest( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequestBuilder.java index 3d46607a..2b76ca50 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodNetworkTokenRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentMethodNetworkTokenRequestBuilder { private String paymentMethodId; private String networkTokenId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeletePaymentMethodNetworkToken sdk; @@ -30,6 +37,18 @@ public DeletePaymentMethodNetworkTokenRequestBuilder networkTokenId(String netwo this.networkTokenId = networkTokenId; return this; } + + public DeletePaymentMethodNetworkTokenRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeletePaymentMethodNetworkTokenRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeletePaymentMethodNetworkTokenRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -44,10 +63,19 @@ public DeletePaymentMethodNetworkTokenRequestBuilder merchantAccountId(JsonNulla } public DeletePaymentMethodNetworkTokenResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.java index f734c09c..a03614bf 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentMethodPaymentServiceTokenRequest { @@ -26,6 +29,9 @@ public class DeletePaymentMethodPaymentServiceTokenRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_token_id") private String paymentServiceTokenId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -36,19 +42,22 @@ public class DeletePaymentMethodPaymentServiceTokenRequest { public DeletePaymentMethodPaymentServiceTokenRequest( String paymentMethodId, String paymentServiceTokenId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); Utils.checkNotNull(paymentServiceTokenId, "paymentServiceTokenId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; this.paymentServiceTokenId = paymentServiceTokenId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeletePaymentMethodPaymentServiceTokenRequest( String paymentMethodId, String paymentServiceTokenId) { - this(paymentMethodId, paymentServiceTokenId, JsonNullable.undefined()); + this(paymentMethodId, paymentServiceTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -67,6 +76,11 @@ public String paymentServiceTokenId() { return paymentServiceTokenId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -97,6 +111,18 @@ public DeletePaymentMethodPaymentServiceTokenRequest withPaymentServiceTokenId(S return this; } + public DeletePaymentMethodPaymentServiceTokenRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeletePaymentMethodPaymentServiceTokenRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -128,6 +154,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && Objects.deepEquals(this.paymentServiceTokenId, other.paymentServiceTokenId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -136,6 +163,7 @@ public int hashCode() { return Objects.hash( paymentMethodId, paymentServiceTokenId, + applicationName, merchantAccountId); } @@ -144,6 +172,7 @@ public String toString() { return Utils.toString(DeletePaymentMethodPaymentServiceTokenRequest.class, "paymentMethodId", paymentMethodId, "paymentServiceTokenId", paymentServiceTokenId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -153,6 +182,8 @@ public final static class Builder { private String paymentServiceTokenId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -177,6 +208,18 @@ public Builder paymentServiceTokenId(String paymentServiceTokenId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -196,10 +239,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeletePaymentMethodPaymentServiceTokenRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeletePaymentMethodPaymentServiceTokenRequest( paymentMethodId, paymentServiceTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequestBuilder.java index 86db75d1..e0565820 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodPaymentServiceTokenRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentMethodPaymentServiceTokenRequestBuilder { private String paymentMethodId; private String paymentServiceTokenId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeletePaymentMethodPaymentServiceToken sdk; @@ -30,6 +37,18 @@ public DeletePaymentMethodPaymentServiceTokenRequestBuilder paymentServiceTokenI this.paymentServiceTokenId = paymentServiceTokenId; return this; } + + public DeletePaymentMethodPaymentServiceTokenRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeletePaymentMethodPaymentServiceTokenRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeletePaymentMethodPaymentServiceTokenRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -44,10 +63,19 @@ public DeletePaymentMethodPaymentServiceTokenRequestBuilder merchantAccountId(Js } public DeletePaymentMethodPaymentServiceTokenResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( paymentMethodId, paymentServiceTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequest.java index 9f2a3a02..ef4c74a7 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentMethodRequest { @@ -20,6 +23,9 @@ public class DeletePaymentMethodRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_method_id") private String paymentMethodId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class DeletePaymentMethodRequest { @JsonCreator public DeletePaymentMethodRequest( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeletePaymentMethodRequest( String paymentMethodId) { - this(paymentMethodId, JsonNullable.undefined()); + this(paymentMethodId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String paymentMethodId() { return paymentMethodId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public DeletePaymentMethodRequest withPaymentMethodId(String paymentMethodId) { return this; } + public DeletePaymentMethodRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeletePaymentMethodRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { DeletePaymentMethodRequest other = (DeletePaymentMethodRequest) o; return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentMethodId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(DeletePaymentMethodRequest.class, "paymentMethodId", paymentMethodId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String paymentMethodId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder paymentMethodId(String paymentMethodId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeletePaymentMethodRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeletePaymentMethodRequest( paymentMethodId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequestBuilder.java index 0b42a2ed..a8a08de8 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentMethodRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentMethodRequestBuilder { private String paymentMethodId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeletePaymentMethod sdk; @@ -23,6 +30,18 @@ public DeletePaymentMethodRequestBuilder paymentMethodId(String paymentMethodId) this.paymentMethodId = paymentMethodId; return this; } + + public DeletePaymentMethodRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeletePaymentMethodRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeletePaymentMethodRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public DeletePaymentMethodRequestBuilder merchantAccountId(JsonNullable } public DeletePaymentMethodResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( paymentMethodId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequest.java index f31e0e03..df7af824 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentServiceRequest { @@ -20,6 +23,9 @@ public class DeletePaymentServiceRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_id") private String paymentServiceId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class DeletePaymentServiceRequest { @JsonCreator public DeletePaymentServiceRequest( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentServiceId = paymentServiceId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public DeletePaymentServiceRequest( String paymentServiceId) { - this(paymentServiceId, JsonNullable.undefined()); + this(paymentServiceId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String paymentServiceId() { return paymentServiceId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public DeletePaymentServiceRequest withPaymentServiceId(String paymentServiceId) return this; } + public DeletePaymentServiceRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public DeletePaymentServiceRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { DeletePaymentServiceRequest other = (DeletePaymentServiceRequest) o; return Objects.deepEquals(this.paymentServiceId, other.paymentServiceId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentServiceId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(DeletePaymentServiceRequest.class, "paymentServiceId", paymentServiceId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String paymentServiceId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder paymentServiceId(String paymentServiceId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public DeletePaymentServiceRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new DeletePaymentServiceRequest( paymentServiceId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequestBuilder.java index 419614c6..36450b74 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/DeletePaymentServiceRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class DeletePaymentServiceRequestBuilder { private String paymentServiceId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallDeletePaymentService sdk; @@ -23,6 +30,18 @@ public DeletePaymentServiceRequestBuilder paymentServiceId(String paymentService this.paymentServiceId = paymentServiceId; return this; } + + public DeletePaymentServiceRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public DeletePaymentServiceRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public DeletePaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public DeletePaymentServiceRequestBuilder merchantAccountId(JsonNullable } public DeletePaymentServiceResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( paymentServiceId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequest.java index abbaba3c..1190756d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetBuyerRequest { @@ -20,6 +23,9 @@ public class GetBuyerRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=buyer_id") private String buyerId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class GetBuyerRequest { @JsonCreator public GetBuyerRequest( String buyerId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerId = buyerId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetBuyerRequest( String buyerId) { - this(buyerId, JsonNullable.undefined()); + this(buyerId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String buyerId() { return buyerId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public GetBuyerRequest withBuyerId(String buyerId) { return this; } + public GetBuyerRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetBuyerRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { GetBuyerRequest other = (GetBuyerRequest) o; return Objects.deepEquals(this.buyerId, other.buyerId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( buyerId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetBuyerRequest.class, "buyerId", buyerId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String buyerId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder buyerId(String buyerId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetBuyerRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetBuyerRequest( buyerId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequestBuilder.java index 2c6d0fc6..12f85751 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetBuyerRequestBuilder { private String buyerId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetBuyer sdk; @@ -27,6 +33,18 @@ public GetBuyerRequestBuilder buyerId(String buyerId) { this.buyerId = buyerId; return this; } + + public GetBuyerRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetBuyerRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetBuyerRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetBuyerRequestBuilder retryConfig(Optional retryConfig) { } public GetBuyerResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( buyerId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequest.java index b7272dc7..bd2b6f98 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetBuyerShippingDetailsRequest { @@ -26,6 +29,9 @@ public class GetBuyerShippingDetailsRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=shipping_details_id") private String shippingDetailsId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -36,19 +42,22 @@ public class GetBuyerShippingDetailsRequest { public GetBuyerShippingDetailsRequest( String buyerId, String shippingDetailsId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerId, "buyerId"); Utils.checkNotNull(shippingDetailsId, "shippingDetailsId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerId = buyerId; this.shippingDetailsId = shippingDetailsId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetBuyerShippingDetailsRequest( String buyerId, String shippingDetailsId) { - this(buyerId, shippingDetailsId, JsonNullable.undefined()); + this(buyerId, shippingDetailsId, Optional.empty(), JsonNullable.undefined()); } /** @@ -67,6 +76,11 @@ public String shippingDetailsId() { return shippingDetailsId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -97,6 +111,18 @@ public GetBuyerShippingDetailsRequest withShippingDetailsId(String shippingDetai return this; } + public GetBuyerShippingDetailsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetBuyerShippingDetailsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -128,6 +154,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.buyerId, other.buyerId) && Objects.deepEquals(this.shippingDetailsId, other.shippingDetailsId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -136,6 +163,7 @@ public int hashCode() { return Objects.hash( buyerId, shippingDetailsId, + applicationName, merchantAccountId); } @@ -144,6 +172,7 @@ public String toString() { return Utils.toString(GetBuyerShippingDetailsRequest.class, "buyerId", buyerId, "shippingDetailsId", shippingDetailsId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -153,6 +182,8 @@ public final static class Builder { private String shippingDetailsId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -177,6 +208,18 @@ public Builder shippingDetailsId(String shippingDetailsId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -196,10 +239,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetBuyerShippingDetailsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetBuyerShippingDetailsRequest( buyerId, shippingDetailsId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequestBuilder.java index fc115a2d..87dabac3 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetBuyerShippingDetailsRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -15,6 +17,10 @@ public class GetBuyerShippingDetailsRequestBuilder { private String buyerId; private String shippingDetailsId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetBuyerShippingDetails sdk; @@ -34,6 +40,18 @@ public GetBuyerShippingDetailsRequestBuilder shippingDetailsId(String shippingDe this.shippingDetailsId = shippingDetailsId; return this; } + + public GetBuyerShippingDetailsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetBuyerShippingDetailsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetBuyerShippingDetailsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -60,13 +78,22 @@ public GetBuyerShippingDetailsRequestBuilder retryConfig(Optional r } public GetBuyerShippingDetailsResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( buyerId, shippingDetailsId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequest.java index 6ea3ceba..a112f113 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetCheckoutSessionRequest { @@ -20,6 +23,9 @@ public class GetCheckoutSessionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=session_id") private String sessionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class GetCheckoutSessionRequest { @JsonCreator public GetCheckoutSessionRequest( String sessionId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(sessionId, "sessionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.sessionId = sessionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetCheckoutSessionRequest( String sessionId) { - this(sessionId, JsonNullable.undefined()); + this(sessionId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String sessionId() { return sessionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public GetCheckoutSessionRequest withSessionId(String sessionId) { return this; } + public GetCheckoutSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetCheckoutSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { GetCheckoutSessionRequest other = (GetCheckoutSessionRequest) o; return Objects.deepEquals(this.sessionId, other.sessionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( sessionId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetCheckoutSessionRequest.class, "sessionId", sessionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String sessionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder sessionId(String sessionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetCheckoutSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetCheckoutSessionRequest( sessionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequestBuilder.java index e6f1e246..572ab2c2 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetCheckoutSessionRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetCheckoutSessionRequestBuilder { private String sessionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetCheckoutSession sdk; @@ -27,6 +33,18 @@ public GetCheckoutSessionRequestBuilder sessionId(String sessionId) { this.sessionId = sessionId; return this; } + + public GetCheckoutSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetCheckoutSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetCheckoutSessionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetCheckoutSessionRequestBuilder retryConfig(Optional retryC } public GetCheckoutSessionResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( sessionId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequest.java index ec50ec30..8332c322 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetDigitalWalletRequest { @@ -20,6 +23,9 @@ public class GetDigitalWalletRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=digital_wallet_id") private String digitalWalletId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class GetDigitalWalletRequest { @JsonCreator public GetDigitalWalletRequest( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(digitalWalletId, "digitalWalletId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.digitalWalletId = digitalWalletId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetDigitalWalletRequest( String digitalWalletId) { - this(digitalWalletId, JsonNullable.undefined()); + this(digitalWalletId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String digitalWalletId() { return digitalWalletId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public GetDigitalWalletRequest withDigitalWalletId(String digitalWalletId) { return this; } + public GetDigitalWalletRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetDigitalWalletRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { GetDigitalWalletRequest other = (GetDigitalWalletRequest) o; return Objects.deepEquals(this.digitalWalletId, other.digitalWalletId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( digitalWalletId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetDigitalWalletRequest.class, "digitalWalletId", digitalWalletId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String digitalWalletId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder digitalWalletId(String digitalWalletId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetDigitalWalletRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetDigitalWalletRequest( digitalWalletId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequestBuilder.java index e6844587..02f5292b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetDigitalWalletRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetDigitalWalletRequestBuilder { private String digitalWalletId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetDigitalWallet sdk; @@ -27,6 +33,18 @@ public GetDigitalWalletRequestBuilder digitalWalletId(String digitalWalletId) { this.digitalWalletId = digitalWalletId; return this; } + + public GetDigitalWalletRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetDigitalWalletRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetDigitalWalletRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetDigitalWalletRequestBuilder retryConfig(Optional retryCon } public GetDigitalWalletResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( digitalWalletId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequest.java index f79af940..24225224 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetGiftCardRequest { @@ -20,6 +23,9 @@ public class GetGiftCardRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=gift_card_id") private String giftCardId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class GetGiftCardRequest { @JsonCreator public GetGiftCardRequest( String giftCardId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(giftCardId, "giftCardId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.giftCardId = giftCardId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetGiftCardRequest( String giftCardId) { - this(giftCardId, JsonNullable.undefined()); + this(giftCardId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String giftCardId() { return giftCardId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public GetGiftCardRequest withGiftCardId(String giftCardId) { return this; } + public GetGiftCardRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetGiftCardRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { GetGiftCardRequest other = (GetGiftCardRequest) o; return Objects.deepEquals(this.giftCardId, other.giftCardId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( giftCardId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetGiftCardRequest.class, "giftCardId", giftCardId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String giftCardId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder giftCardId(String giftCardId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetGiftCardRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetGiftCardRequest( giftCardId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequestBuilder.java index da19687c..ef3156b9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetGiftCardRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetGiftCardRequestBuilder { private String giftCardId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetGiftCard sdk; @@ -27,6 +33,18 @@ public GetGiftCardRequestBuilder giftCardId(String giftCardId) { this.giftCardId = giftCardId; return this; } + + public GetGiftCardRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetGiftCardRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetGiftCardRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetGiftCardRequestBuilder retryConfig(Optional retryConfig) } public GetGiftCardResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( giftCardId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequest.java index db79c243..e75101e0 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; public class GetMerchantAccountRequest { @@ -19,11 +22,22 @@ public class GetMerchantAccountRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=merchant_account_id") private String merchantAccountId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + @JsonCreator public GetMerchantAccountRequest( - String merchantAccountId) { + String merchantAccountId, + Optional applicationName) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + Utils.checkNotNull(applicationName, "applicationName"); this.merchantAccountId = merchantAccountId; + this.applicationName = applicationName; + } + + public GetMerchantAccountRequest( + String merchantAccountId) { + this(merchantAccountId, Optional.empty()); } /** @@ -34,6 +48,11 @@ public String merchantAccountId() { return merchantAccountId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + public final static Builder builder() { return new Builder(); } @@ -47,6 +66,18 @@ public GetMerchantAccountRequest withMerchantAccountId(String merchantAccountId) return this; } + public GetMerchantAccountRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetMerchantAccountRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -58,24 +89,29 @@ public boolean equals(java.lang.Object o) { } GetMerchantAccountRequest other = (GetMerchantAccountRequest) o; return - Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); + Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && + Objects.deepEquals(this.applicationName, other.applicationName); } @Override public int hashCode() { return Objects.hash( - merchantAccountId); + merchantAccountId, + applicationName); } @Override public String toString() { return Utils.toString(GetMerchantAccountRequest.class, - "merchantAccountId", merchantAccountId); + "merchantAccountId", merchantAccountId, + "applicationName", applicationName); } public final static class Builder { private String merchantAccountId; + + private Optional applicationName; private Builder() { // force use of static builder() method @@ -89,10 +125,32 @@ public Builder merchantAccountId(String merchantAccountId) { this.merchantAccountId = merchantAccountId; return this; } + + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetMerchantAccountRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetMerchantAccountRequest( - merchantAccountId); + merchantAccountId, + applicationName); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequestBuilder.java index 8b0a6a7c..c9d0e2bb 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetMerchantAccountRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -13,6 +15,10 @@ public class GetMerchantAccountRequestBuilder { private String merchantAccountId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetMerchantAccount sdk; @@ -26,6 +32,18 @@ public GetMerchantAccountRequestBuilder merchantAccountId(String merchantAccount return this; } + public GetMerchantAccountRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetMerchantAccountRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public GetMerchantAccountRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); @@ -39,11 +57,20 @@ public GetMerchantAccountRequestBuilder retryConfig(Optional retryC } public GetMerchantAccountResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( merchantAccountId, + applicationName, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequest.java index a71d4755..8a869027 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetPaymentMethodRequest { @@ -20,6 +23,9 @@ public class GetPaymentMethodRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_method_id") private String paymentMethodId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class GetPaymentMethodRequest { @JsonCreator public GetPaymentMethodRequest( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetPaymentMethodRequest( String paymentMethodId) { - this(paymentMethodId, JsonNullable.undefined()); + this(paymentMethodId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String paymentMethodId() { return paymentMethodId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public GetPaymentMethodRequest withPaymentMethodId(String paymentMethodId) { return this; } + public GetPaymentMethodRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetPaymentMethodRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { GetPaymentMethodRequest other = (GetPaymentMethodRequest) o; return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentMethodId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetPaymentMethodRequest.class, "paymentMethodId", paymentMethodId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String paymentMethodId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder paymentMethodId(String paymentMethodId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetPaymentMethodRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetPaymentMethodRequest( paymentMethodId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequestBuilder.java index 0119063f..a27fd3ec 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentMethodRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetPaymentMethodRequestBuilder { private String paymentMethodId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetPaymentMethod sdk; @@ -27,6 +33,18 @@ public GetPaymentMethodRequestBuilder paymentMethodId(String paymentMethodId) { this.paymentMethodId = paymentMethodId; return this; } + + public GetPaymentMethodRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetPaymentMethodRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetPaymentMethodRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetPaymentMethodRequestBuilder retryConfig(Optional retryCon } public GetPaymentMethodResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( paymentMethodId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequest.java index c83d9360..8f9282c3 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequest.java @@ -5,22 +5,36 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; public class GetPaymentServiceDefinitionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_definition_id") private String paymentServiceDefinitionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + @JsonCreator public GetPaymentServiceDefinitionRequest( - String paymentServiceDefinitionId) { + String paymentServiceDefinitionId, + Optional applicationName) { Utils.checkNotNull(paymentServiceDefinitionId, "paymentServiceDefinitionId"); + Utils.checkNotNull(applicationName, "applicationName"); this.paymentServiceDefinitionId = paymentServiceDefinitionId; + this.applicationName = applicationName; + } + + public GetPaymentServiceDefinitionRequest( + String paymentServiceDefinitionId) { + this(paymentServiceDefinitionId, Optional.empty()); } @JsonIgnore @@ -28,6 +42,11 @@ public String paymentServiceDefinitionId() { return paymentServiceDefinitionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + public final static Builder builder() { return new Builder(); } @@ -38,6 +57,18 @@ public GetPaymentServiceDefinitionRequest withPaymentServiceDefinitionId(String return this; } + public GetPaymentServiceDefinitionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetPaymentServiceDefinitionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -49,24 +80,29 @@ public boolean equals(java.lang.Object o) { } GetPaymentServiceDefinitionRequest other = (GetPaymentServiceDefinitionRequest) o; return - Objects.deepEquals(this.paymentServiceDefinitionId, other.paymentServiceDefinitionId); + Objects.deepEquals(this.paymentServiceDefinitionId, other.paymentServiceDefinitionId) && + Objects.deepEquals(this.applicationName, other.applicationName); } @Override public int hashCode() { return Objects.hash( - paymentServiceDefinitionId); + paymentServiceDefinitionId, + applicationName); } @Override public String toString() { return Utils.toString(GetPaymentServiceDefinitionRequest.class, - "paymentServiceDefinitionId", paymentServiceDefinitionId); + "paymentServiceDefinitionId", paymentServiceDefinitionId, + "applicationName", applicationName); } public final static class Builder { private String paymentServiceDefinitionId; + + private Optional applicationName; private Builder() { // force use of static builder() method @@ -77,10 +113,32 @@ public Builder paymentServiceDefinitionId(String paymentServiceDefinitionId) { this.paymentServiceDefinitionId = paymentServiceDefinitionId; return this; } + + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetPaymentServiceDefinitionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetPaymentServiceDefinitionRequest( - paymentServiceDefinitionId); + paymentServiceDefinitionId, + applicationName); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequestBuilder.java index f969ad94..0903f165 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceDefinitionRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -13,6 +15,10 @@ public class GetPaymentServiceDefinitionRequestBuilder { private String paymentServiceDefinitionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetPaymentServiceDefinition sdk; @@ -26,6 +32,18 @@ public GetPaymentServiceDefinitionRequestBuilder paymentServiceDefinitionId(Stri return this; } + public GetPaymentServiceDefinitionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetPaymentServiceDefinitionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public GetPaymentServiceDefinitionRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); @@ -39,11 +57,20 @@ public GetPaymentServiceDefinitionRequestBuilder retryConfig(Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( paymentServiceDefinitionId, + applicationName, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequest.java index 264763b1..f510d9b2 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetPaymentServiceRequest { @@ -20,6 +23,9 @@ public class GetPaymentServiceRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_service_id") private String paymentServiceId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class GetPaymentServiceRequest { @JsonCreator public GetPaymentServiceRequest( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentServiceId = paymentServiceId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetPaymentServiceRequest( String paymentServiceId) { - this(paymentServiceId, JsonNullable.undefined()); + this(paymentServiceId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String paymentServiceId() { return paymentServiceId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public GetPaymentServiceRequest withPaymentServiceId(String paymentServiceId) { return this; } + public GetPaymentServiceRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetPaymentServiceRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { GetPaymentServiceRequest other = (GetPaymentServiceRequest) o; return Objects.deepEquals(this.paymentServiceId, other.paymentServiceId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentServiceId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetPaymentServiceRequest.class, "paymentServiceId", paymentServiceId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String paymentServiceId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder paymentServiceId(String paymentServiceId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetPaymentServiceRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetPaymentServiceRequest( paymentServiceId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequestBuilder.java index 5bcf05ab..55d31429 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPaymentServiceRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetPaymentServiceRequestBuilder { private String paymentServiceId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetPaymentService sdk; @@ -27,6 +33,18 @@ public GetPaymentServiceRequestBuilder paymentServiceId(String paymentServiceId) this.paymentServiceId = paymentServiceId; return this; } + + public GetPaymentServiceRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetPaymentServiceRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetPaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetPaymentServiceRequestBuilder retryConfig(Optional retryCo } public GetPaymentServiceResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( paymentServiceId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequest.java index 8ec97fb1..68e4338d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetPayoutRequest { @@ -17,6 +20,9 @@ public class GetPayoutRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payout_id") private String payoutId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,16 +32,19 @@ public class GetPayoutRequest { @JsonCreator public GetPayoutRequest( String payoutId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(payoutId, "payoutId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.payoutId = payoutId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetPayoutRequest( String payoutId) { - this(payoutId, JsonNullable.undefined()); + this(payoutId, Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -43,6 +52,11 @@ public String payoutId() { return payoutId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -61,6 +75,18 @@ public GetPayoutRequest withPayoutId(String payoutId) { return this; } + public GetPayoutRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetPayoutRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { GetPayoutRequest other = (GetPayoutRequest) o; return Objects.deepEquals(this.payoutId, other.payoutId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( payoutId, + applicationName, merchantAccountId); } @@ -105,6 +133,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetPayoutRequest.class, "payoutId", payoutId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -112,6 +141,8 @@ public final static class Builder { private String payoutId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -124,6 +155,18 @@ public Builder payoutId(String payoutId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -143,9 +186,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetPayoutRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetPayoutRequest( payoutId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequestBuilder.java index b843f4cf..bad7c6b0 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetPayoutRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetPayoutRequestBuilder { private String payoutId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetPayout sdk; @@ -27,6 +33,18 @@ public GetPayoutRequestBuilder payoutId(String payoutId) { this.payoutId = payoutId; return this; } + + public GetPayoutRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetPayoutRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetPayoutRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetPayoutRequestBuilder retryConfig(Optional retryConfig) { } public GetPayoutResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( payoutId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequest.java index 1192e6ad..432d9ef6 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetRefundRequest { @@ -17,6 +20,9 @@ public class GetRefundRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=refund_id") private String refundId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,16 +32,19 @@ public class GetRefundRequest { @JsonCreator public GetRefundRequest( String refundId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(refundId, "refundId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.refundId = refundId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetRefundRequest( String refundId) { - this(refundId, JsonNullable.undefined()); + this(refundId, Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -43,6 +52,11 @@ public String refundId() { return refundId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -61,6 +75,18 @@ public GetRefundRequest withRefundId(String refundId) { return this; } + public GetRefundRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetRefundRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { GetRefundRequest other = (GetRefundRequest) o; return Objects.deepEquals(this.refundId, other.refundId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( refundId, + applicationName, merchantAccountId); } @@ -105,6 +133,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetRefundRequest.class, "refundId", refundId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -112,6 +141,8 @@ public final static class Builder { private String refundId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -124,6 +155,18 @@ public Builder refundId(String refundId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -143,9 +186,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetRefundRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetRefundRequest( refundId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequestBuilder.java index a00d650d..a387b219 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetRefundRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetRefundRequestBuilder { private String refundId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetRefund sdk; @@ -27,6 +33,18 @@ public GetRefundRequestBuilder refundId(String refundId) { this.refundId = refundId; return this; } + + public GetRefundRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetRefundRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetRefundRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetRefundRequestBuilder retryConfig(Optional retryConfig) { } public GetRefundResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( refundId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequest.java index 7d95a73d..e1d2dfe9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetTransactionRefundRequest { @@ -20,6 +23,9 @@ public class GetTransactionRefundRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=refund_id") private String refundId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -30,19 +36,22 @@ public class GetTransactionRefundRequest { public GetTransactionRefundRequest( String transactionId, String refundId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(transactionId, "transactionId"); Utils.checkNotNull(refundId, "refundId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.transactionId = transactionId; this.refundId = refundId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetTransactionRefundRequest( String transactionId, String refundId) { - this(transactionId, refundId, JsonNullable.undefined()); + this(transactionId, refundId, Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -55,6 +64,11 @@ public String refundId() { return refundId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -79,6 +93,18 @@ public GetTransactionRefundRequest withRefundId(String refundId) { return this; } + public GetTransactionRefundRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetTransactionRefundRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -110,6 +136,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.transactionId, other.transactionId) && Objects.deepEquals(this.refundId, other.refundId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -118,6 +145,7 @@ public int hashCode() { return Objects.hash( transactionId, refundId, + applicationName, merchantAccountId); } @@ -126,6 +154,7 @@ public String toString() { return Utils.toString(GetTransactionRefundRequest.class, "transactionId", transactionId, "refundId", refundId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -135,6 +164,8 @@ public final static class Builder { private String refundId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -153,6 +184,18 @@ public Builder refundId(String refundId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -172,10 +215,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetTransactionRefundRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetTransactionRefundRequest( transactionId, refundId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequestBuilder.java index 32d8aba0..613e7503 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRefundRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -15,6 +17,10 @@ public class GetTransactionRefundRequestBuilder { private String transactionId; private String refundId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetTransactionRefund sdk; @@ -34,6 +40,18 @@ public GetTransactionRefundRequestBuilder refundId(String refundId) { this.refundId = refundId; return this; } + + public GetTransactionRefundRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetTransactionRefundRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetTransactionRefundRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -60,13 +78,22 @@ public GetTransactionRefundRequestBuilder retryConfig(Optional retr } public GetTransactionRefundResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( transactionId, refundId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequest.java index 10e47a60..def9c0ae 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class GetTransactionRequest { @@ -17,6 +20,9 @@ public class GetTransactionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transaction_id") private String transactionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,16 +32,19 @@ public class GetTransactionRequest { @JsonCreator public GetTransactionRequest( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(transactionId, "transactionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.transactionId = transactionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public GetTransactionRequest( String transactionId) { - this(transactionId, JsonNullable.undefined()); + this(transactionId, Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -43,6 +52,11 @@ public String transactionId() { return transactionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -61,6 +75,18 @@ public GetTransactionRequest withTransactionId(String transactionId) { return this; } + public GetTransactionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public GetTransactionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { GetTransactionRequest other = (GetTransactionRequest) o; return Objects.deepEquals(this.transactionId, other.transactionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( transactionId, + applicationName, merchantAccountId); } @@ -105,6 +133,7 @@ public int hashCode() { public String toString() { return Utils.toString(GetTransactionRequest.class, "transactionId", transactionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -112,6 +141,8 @@ public final static class Builder { private String transactionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -124,6 +155,18 @@ public Builder transactionId(String transactionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -143,9 +186,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public GetTransactionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new GetTransactionRequest( transactionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequestBuilder.java index b60ba474..b7f13e7d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/GetTransactionRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class GetTransactionRequestBuilder { private String transactionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetTransaction sdk; @@ -27,6 +33,18 @@ public GetTransactionRequestBuilder transactionId(String transactionId) { this.transactionId = transactionId; return this; } + + public GetTransactionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public GetTransactionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public GetTransactionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public GetTransactionRequestBuilder retryConfig(Optional retryConfi } public GetTransactionResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.get( transactionId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListAuditLogsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListAuditLogsRequest.java index dccbe20d..d7462a7d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListAuditLogsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListAuditLogsRequest.java @@ -44,6 +44,9 @@ public class ListAuditLogsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=user_id") private JsonNullable userId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. */ @@ -62,24 +65,27 @@ public ListAuditLogsRequest( Optional limit, JsonNullable action, JsonNullable userId, + Optional applicationName, JsonNullable resourceType, JsonNullable merchantAccountId) { Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); Utils.checkNotNull(action, "action"); Utils.checkNotNull(userId, "userId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(resourceType, "resourceType"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.cursor = cursor; this.limit = limit; this.action = action; this.userId = userId; + this.applicationName = applicationName; this.resourceType = resourceType; this.merchantAccountId = merchantAccountId; } public ListAuditLogsRequest() { - this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -115,6 +121,11 @@ public JsonNullable userId() { return userId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. */ @@ -207,6 +218,18 @@ public ListAuditLogsRequest withUserId(JsonNullable userId) { return this; } + public ListAuditLogsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListAuditLogsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. */ @@ -258,6 +281,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.limit, other.limit) && Objects.deepEquals(this.action, other.action) && Objects.deepEquals(this.userId, other.userId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.resourceType, other.resourceType) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -269,6 +293,7 @@ public int hashCode() { limit, action, userId, + applicationName, resourceType, merchantAccountId); } @@ -280,6 +305,7 @@ public String toString() { "limit", limit, "action", action, "userId", userId, + "applicationName", applicationName, "resourceType", resourceType, "merchantAccountId", merchantAccountId); } @@ -294,6 +320,8 @@ public final static class Builder { private JsonNullable userId = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable resourceType = JsonNullable.undefined(); private JsonNullable merchantAccountId = JsonNullable.undefined(); @@ -374,6 +402,18 @@ public Builder userId(JsonNullable userId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. */ @@ -414,11 +454,15 @@ public ListAuditLogsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListAuditLogsRequest( cursor, limit, action, userId, + applicationName, resourceType, merchantAccountId); } @@ -428,5 +472,11 @@ public ListAuditLogsRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java index 48d6839a..e8f3e246 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListBuyerGiftCardsRequest { @@ -20,6 +23,9 @@ public class ListBuyerGiftCardsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=buyer_id") private JsonNullable buyerId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -30,17 +36,20 @@ public class ListBuyerGiftCardsRequest { public ListBuyerGiftCardsRequest( JsonNullable buyerExternalIdentifier, JsonNullable buyerId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerExternalIdentifier = buyerExternalIdentifier; this.buyerId = buyerId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListBuyerGiftCardsRequest() { - this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -53,6 +62,11 @@ public JsonNullable buyerId() { return buyerId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -89,6 +103,18 @@ public ListBuyerGiftCardsRequest withBuyerId(JsonNullable buyerId) { return this; } + public ListBuyerGiftCardsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListBuyerGiftCardsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -120,6 +146,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.buyerExternalIdentifier, other.buyerExternalIdentifier) && Objects.deepEquals(this.buyerId, other.buyerId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -128,6 +155,7 @@ public int hashCode() { return Objects.hash( buyerExternalIdentifier, buyerId, + applicationName, merchantAccountId); } @@ -136,6 +164,7 @@ public String toString() { return Utils.toString(ListBuyerGiftCardsRequest.class, "buyerExternalIdentifier", buyerExternalIdentifier, "buyerId", buyerId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -145,6 +174,8 @@ public final static class Builder { private JsonNullable buyerId = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -175,6 +206,18 @@ public Builder buyerId(JsonNullable buyerId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -194,10 +237,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListBuyerGiftCardsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListBuyerGiftCardsRequest( buyerExternalIdentifier, buyerId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java index fb684488..cf65f969 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerGiftCardsRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -15,6 +17,10 @@ public class ListBuyerGiftCardsRequestBuilder { private JsonNullable buyerExternalIdentifier = JsonNullable.undefined(); private JsonNullable buyerId = JsonNullable.undefined(); + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListBuyerGiftCards sdk; @@ -46,6 +52,18 @@ public ListBuyerGiftCardsRequestBuilder buyerId(JsonNullable buyerId) { this.buyerId = buyerId; return this; } + + public ListBuyerGiftCardsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListBuyerGiftCardsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListBuyerGiftCardsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -72,13 +90,22 @@ public ListBuyerGiftCardsRequestBuilder retryConfig(Optional retryC } public ListBuyerGiftCardsResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( buyerExternalIdentifier, buyerId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java index 8f11f358..a64d6c49 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerPaymentMethodsRequest.java @@ -54,6 +54,9 @@ public class ListBuyerPaymentMethodsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=currency") private JsonNullable currency; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -67,12 +70,14 @@ public ListBuyerPaymentMethodsRequest( Optional orderBy, JsonNullable country, JsonNullable currency, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerId, "buyerId"); Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); Utils.checkNotNull(orderBy, "orderBy"); Utils.checkNotNull(country, "country"); Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerId = buyerId; this.buyerExternalIdentifier = buyerExternalIdentifier; @@ -80,11 +85,12 @@ public ListBuyerPaymentMethodsRequest( this.orderBy = orderBy; this.country = country; this.currency = currency; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListBuyerPaymentMethodsRequest() { - this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } /** @@ -136,6 +142,11 @@ public JsonNullable currency() { return currency; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -238,6 +249,18 @@ public ListBuyerPaymentMethodsRequest withCurrency(JsonNullable currency return this; } + public ListBuyerPaymentMethodsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListBuyerPaymentMethodsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -273,6 +296,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.orderBy, other.orderBy) && Objects.deepEquals(this.country, other.country) && Objects.deepEquals(this.currency, other.currency) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -285,6 +309,7 @@ public int hashCode() { orderBy, country, currency, + applicationName, merchantAccountId); } @@ -297,6 +322,7 @@ public String toString() { "orderBy", orderBy, "country", country, "currency", currency, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -312,6 +338,8 @@ public final static class Builder { private JsonNullable currency = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -408,6 +436,18 @@ public Builder currency(JsonNullable currency) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -430,12 +470,16 @@ public ListBuyerPaymentMethodsRequest build() { if (orderBy == null) { orderBy = _SINGLETON_VALUE_OrderBy.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListBuyerPaymentMethodsRequest( buyerId, buyerExternalIdentifier, orderBy, country, currency, + applicationName, merchantAccountId); } @@ -450,5 +494,11 @@ public ListBuyerPaymentMethodsRequest build() { "order_by", "\"desc\"", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequest.java index 92a41bc5..cca188e2 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListBuyerShippingDetailsRequest { @@ -20,6 +23,9 @@ public class ListBuyerShippingDetailsRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=buyer_id") private String buyerId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class ListBuyerShippingDetailsRequest { @JsonCreator public ListBuyerShippingDetailsRequest( String buyerId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerId = buyerId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListBuyerShippingDetailsRequest( String buyerId) { - this(buyerId, JsonNullable.undefined()); + this(buyerId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String buyerId() { return buyerId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public ListBuyerShippingDetailsRequest withBuyerId(String buyerId) { return this; } + public ListBuyerShippingDetailsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListBuyerShippingDetailsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { ListBuyerShippingDetailsRequest other = (ListBuyerShippingDetailsRequest) o; return Objects.deepEquals(this.buyerId, other.buyerId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( buyerId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(ListBuyerShippingDetailsRequest.class, "buyerId", buyerId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String buyerId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder buyerId(String buyerId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListBuyerShippingDetailsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListBuyerShippingDetailsRequest( buyerId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequestBuilder.java index ecfc697d..6f8331d3 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyerShippingDetailsRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class ListBuyerShippingDetailsRequestBuilder { private String buyerId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListBuyerShippingDetails sdk; @@ -27,6 +33,18 @@ public ListBuyerShippingDetailsRequestBuilder buyerId(String buyerId) { this.buyerId = buyerId; return this; } + + public ListBuyerShippingDetailsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListBuyerShippingDetailsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListBuyerShippingDetailsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public ListBuyerShippingDetailsRequestBuilder retryConfig(Optional } public ListBuyerShippingDetailsResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( buyerId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyersRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyersRequest.java index cdeb59d5..f0d19289 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListBuyersRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListBuyersRequest.java @@ -42,6 +42,9 @@ public class ListBuyersRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=external_identifier") private JsonNullable externalIdentifier; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -54,21 +57,24 @@ public ListBuyersRequest( Optional limit, JsonNullable search, JsonNullable externalIdentifier, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); Utils.checkNotNull(search, "search"); Utils.checkNotNull(externalIdentifier, "externalIdentifier"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.cursor = cursor; this.limit = limit; this.search = search; this.externalIdentifier = externalIdentifier; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListBuyersRequest() { - this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } /** @@ -103,6 +109,11 @@ public JsonNullable externalIdentifier() { return externalIdentifier; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -187,6 +198,18 @@ public ListBuyersRequest withExternalIdentifier(JsonNullable externalIde return this; } + public ListBuyersRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListBuyersRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -220,6 +243,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.limit, other.limit) && Objects.deepEquals(this.search, other.search) && Objects.deepEquals(this.externalIdentifier, other.externalIdentifier) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -230,6 +254,7 @@ public int hashCode() { limit, search, externalIdentifier, + applicationName, merchantAccountId); } @@ -240,6 +265,7 @@ public String toString() { "limit", limit, "search", search, "externalIdentifier", externalIdentifier, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -253,6 +279,8 @@ public final static class Builder { private JsonNullable externalIdentifier = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -331,6 +359,18 @@ public Builder externalIdentifier(JsonNullable externalIdentifier) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -353,11 +393,15 @@ public ListBuyersRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListBuyersRequest( cursor, limit, search, externalIdentifier, + applicationName, merchantAccountId); } @@ -366,5 +410,11 @@ public ListBuyersRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequest.java index 78ea1007..5c7c01d5 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequest.java @@ -5,15 +5,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListCardSchemeDefinitionsRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -22,13 +28,21 @@ public class ListCardSchemeDefinitionsRequest { @JsonCreator public ListCardSchemeDefinitionsRequest( + Optional applicationName, JsonNullable merchantAccountId) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListCardSchemeDefinitionsRequest() { - this(JsonNullable.undefined()); + this(Optional.empty(), JsonNullable.undefined()); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -43,6 +57,18 @@ public final static Builder builder() { return new Builder(); } + public ListCardSchemeDefinitionsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListCardSchemeDefinitionsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -72,29 +98,46 @@ public boolean equals(java.lang.Object o) { } ListCardSchemeDefinitionsRequest other = (ListCardSchemeDefinitionsRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId); } @Override public String toString() { return Utils.toString(ListCardSchemeDefinitionsRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -114,8 +157,18 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListCardSchemeDefinitionsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListCardSchemeDefinitionsRequest( + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequestBuilder.java index 900e992e..a8b81f76 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListCardSchemeDefinitionsRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -13,6 +15,10 @@ public class ListCardSchemeDefinitionsRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListCardSchemeDefinitions sdk; @@ -20,6 +26,18 @@ public class ListCardSchemeDefinitionsRequestBuilder { public ListCardSchemeDefinitionsRequestBuilder(SDKMethodInterfaces.MethodCallListCardSchemeDefinitions sdk) { this.sdk = sdk; } + + public ListCardSchemeDefinitionsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListCardSchemeDefinitionsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListCardSchemeDefinitionsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -46,11 +64,20 @@ public ListCardSchemeDefinitionsRequestBuilder retryConfig(Optional } public ListCardSchemeDefinitionsResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequest.java index d6e0a68a..9a0476ff 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequest.java @@ -5,15 +5,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListDigitalWalletsRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -22,13 +28,21 @@ public class ListDigitalWalletsRequest { @JsonCreator public ListDigitalWalletsRequest( + Optional applicationName, JsonNullable merchantAccountId) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListDigitalWalletsRequest() { - this(JsonNullable.undefined()); + this(Optional.empty(), JsonNullable.undefined()); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -43,6 +57,18 @@ public final static Builder builder() { return new Builder(); } + public ListDigitalWalletsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListDigitalWalletsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -72,29 +98,46 @@ public boolean equals(java.lang.Object o) { } ListDigitalWalletsRequest other = (ListDigitalWalletsRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId); } @Override public String toString() { return Utils.toString(ListDigitalWalletsRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -114,8 +157,18 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListDigitalWalletsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListDigitalWalletsRequest( + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequestBuilder.java index 0ada81b0..d4e80be8 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListDigitalWalletsRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -13,6 +15,10 @@ public class ListDigitalWalletsRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListDigitalWallets sdk; @@ -20,6 +26,18 @@ public class ListDigitalWalletsRequestBuilder { public ListDigitalWalletsRequestBuilder(SDKMethodInterfaces.MethodCallListDigitalWallets sdk) { this.sdk = sdk; } + + public ListDigitalWalletsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListDigitalWalletsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListDigitalWalletsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -46,11 +64,20 @@ public ListDigitalWalletsRequestBuilder retryConfig(Optional retryC } public ListDigitalWalletsResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequest.java index 7d5564d8..23ecf5ba 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.GiftCardBalanceRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListGiftCardBalancesRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class ListGiftCardBalancesRequest { @JsonCreator public ListGiftCardBalancesRequest( + Optional applicationName, JsonNullable merchantAccountId, GiftCardBalanceRequest giftCardBalanceRequest) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(giftCardBalanceRequest, "giftCardBalanceRequest"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.giftCardBalanceRequest = giftCardBalanceRequest; } public ListGiftCardBalancesRequest( GiftCardBalanceRequest giftCardBalanceRequest) { - this(JsonNullable.undefined(), giftCardBalanceRequest); + this(Optional.empty(), JsonNullable.undefined(), giftCardBalanceRequest); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public ListGiftCardBalancesRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListGiftCardBalancesRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } ListGiftCardBalancesRequest other = (ListGiftCardBalancesRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.giftCardBalanceRequest, other.giftCardBalanceRequest); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, giftCardBalanceRequest); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(ListGiftCardBalancesRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "giftCardBalanceRequest", giftCardBalanceRequest); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private GiftCardBalanceRequest giftCardBalanceRequest; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder giftCardBalanceRequest(GiftCardBalanceRequest giftCardBalanceRequ } public ListGiftCardBalancesRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListGiftCardBalancesRequest( + applicationName, merchantAccountId, giftCardBalanceRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequestBuilder.java index 25f3f662..b85f96e2 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardBalancesRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.GiftCardBalanceRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListGiftCardBalancesRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private GiftCardBalanceRequest giftCardBalanceRequest; private final SDKMethodInterfaces.MethodCallListGiftCardBalances sdk; @@ -18,6 +25,18 @@ public class ListGiftCardBalancesRequestBuilder { public ListGiftCardBalancesRequestBuilder(SDKMethodInterfaces.MethodCallListGiftCardBalances sdk) { this.sdk = sdk; } + + public ListGiftCardBalancesRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListGiftCardBalancesRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListGiftCardBalancesRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public ListGiftCardBalancesRequestBuilder giftCardBalanceRequest(GiftCardBalance } public ListGiftCardBalancesResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.list( + applicationName, merchantAccountId, giftCardBalanceRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardsRequest.java index db3ee336..3206dd9a 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListGiftCardsRequest.java @@ -30,6 +30,9 @@ public class ListGiftCardsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") private Optional limit; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -42,21 +45,24 @@ public ListGiftCardsRequest( JsonNullable buyerId, JsonNullable cursor, Optional limit, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); Utils.checkNotNull(buyerId, "buyerId"); Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.buyerExternalIdentifier = buyerExternalIdentifier; this.buyerId = buyerId; this.cursor = cursor; this.limit = limit; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListGiftCardsRequest() { - this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -79,6 +85,11 @@ public Optional limit() { return limit; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -139,6 +150,18 @@ public ListGiftCardsRequest withLimit(Optional limit) { return this; } + public ListGiftCardsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListGiftCardsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -172,6 +195,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.buyerId, other.buyerId) && Objects.deepEquals(this.cursor, other.cursor) && Objects.deepEquals(this.limit, other.limit) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -182,6 +206,7 @@ public int hashCode() { buyerId, cursor, limit, + applicationName, merchantAccountId); } @@ -192,6 +217,7 @@ public String toString() { "buyerId", buyerId, "cursor", cursor, "limit", limit, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -205,6 +231,8 @@ public final static class Builder { private Optional limit; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -259,6 +287,18 @@ public Builder limit(Optional limit) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -281,11 +321,15 @@ public ListGiftCardsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListGiftCardsRequest( buyerExternalIdentifier, buyerId, cursor, limit, + applicationName, merchantAccountId); } @@ -294,5 +338,11 @@ public ListGiftCardsRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequest.java index 4584db9c..6c41813c 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequest.java @@ -36,21 +36,27 @@ public class ListMerchantAccountsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=search") private JsonNullable search; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + @JsonCreator public ListMerchantAccountsRequest( JsonNullable cursor, Optional limit, - JsonNullable search) { + JsonNullable search, + Optional applicationName) { Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); Utils.checkNotNull(search, "search"); + Utils.checkNotNull(applicationName, "applicationName"); this.cursor = cursor; this.limit = limit; this.search = search; + this.applicationName = applicationName; } public ListMerchantAccountsRequest() { - this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); + this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -77,6 +83,11 @@ public JsonNullable search() { return search; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + public final static Builder builder() { return new Builder(); } @@ -135,6 +146,18 @@ public ListMerchantAccountsRequest withSearch(JsonNullable search) { return this; } + public ListMerchantAccountsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListMerchantAccountsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -148,7 +171,8 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.cursor, other.cursor) && Objects.deepEquals(this.limit, other.limit) && - Objects.deepEquals(this.search, other.search); + Objects.deepEquals(this.search, other.search) && + Objects.deepEquals(this.applicationName, other.applicationName); } @Override @@ -156,7 +180,8 @@ public int hashCode() { return Objects.hash( cursor, limit, - search); + search, + applicationName); } @Override @@ -164,7 +189,8 @@ public String toString() { return Utils.toString(ListMerchantAccountsRequest.class, "cursor", cursor, "limit", limit, - "search", search); + "search", search, + "applicationName", applicationName); } public final static class Builder { @@ -174,6 +200,8 @@ public final static class Builder { private Optional limit; private JsonNullable search = JsonNullable.undefined(); + + private Optional applicationName; private Builder() { // force use of static builder() method @@ -232,15 +260,31 @@ public Builder search(JsonNullable search) { this.search = search; return this; } + + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListMerchantAccountsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListMerchantAccountsRequest( cursor, limit, - search); + search, + applicationName); } private static final LazySingletonValue> _SINGLETON_VALUE_Limit = @@ -248,5 +292,11 @@ public ListMerchantAccountsRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequestBuilder.java index ee1fdeb5..8d883ac9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListMerchantAccountsRequestBuilder.java @@ -24,6 +24,10 @@ public class ListMerchantAccountsRequestBuilder { "20", new TypeReference>() {}); private JsonNullable search = JsonNullable.undefined(); + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListMerchantAccounts sdk; @@ -67,6 +71,18 @@ public ListMerchantAccountsRequestBuilder search(JsonNullable search) { return this; } + public ListMerchantAccountsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListMerchantAccountsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public ListMerchantAccountsRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); @@ -82,6 +98,9 @@ public ListMerchantAccountsRequestBuilder retryConfig(Optional retr public ListMerchantAccountsResponse call() throws Exception { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); + } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); @@ -89,6 +108,7 @@ public ListMerchantAccountsResponse call() throws Exception { cursor, limit, search, + applicationName, options); } @@ -118,4 +138,10 @@ public Stream callAsStream() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequest.java index 61e97d1f..77ddf9ac 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListPaymentMethodNetworkTokensRequest { @@ -20,6 +23,9 @@ public class ListPaymentMethodNetworkTokensRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=payment_method_id") private String paymentMethodId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -29,16 +35,19 @@ public class ListPaymentMethodNetworkTokensRequest { @JsonCreator public ListPaymentMethodNetworkTokensRequest( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListPaymentMethodNetworkTokensRequest( String paymentMethodId) { - this(paymentMethodId, JsonNullable.undefined()); + this(paymentMethodId, Optional.empty(), JsonNullable.undefined()); } /** @@ -49,6 +58,11 @@ public String paymentMethodId() { return paymentMethodId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -70,6 +84,18 @@ public ListPaymentMethodNetworkTokensRequest withPaymentMethodId(String paymentM return this; } + public ListPaymentMethodNetworkTokensRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListPaymentMethodNetworkTokensRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -100,6 +126,7 @@ public boolean equals(java.lang.Object o) { ListPaymentMethodNetworkTokensRequest other = (ListPaymentMethodNetworkTokensRequest) o; return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -107,6 +134,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( paymentMethodId, + applicationName, merchantAccountId); } @@ -114,6 +142,7 @@ public int hashCode() { public String toString() { return Utils.toString(ListPaymentMethodNetworkTokensRequest.class, "paymentMethodId", paymentMethodId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -121,6 +150,8 @@ public final static class Builder { private String paymentMethodId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -136,6 +167,18 @@ public Builder paymentMethodId(String paymentMethodId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -155,9 +198,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListPaymentMethodNetworkTokensRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListPaymentMethodNetworkTokensRequest( paymentMethodId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequestBuilder.java index 1bfc36f6..7343ad9e 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodNetworkTokensRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class ListPaymentMethodNetworkTokensRequestBuilder { private String paymentMethodId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListPaymentMethodNetworkTokens sdk; @@ -27,6 +33,18 @@ public ListPaymentMethodNetworkTokensRequestBuilder paymentMethodId(String payme this.paymentMethodId = paymentMethodId; return this; } + + public ListPaymentMethodNetworkTokensRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListPaymentMethodNetworkTokensRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListPaymentMethodNetworkTokensRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public ListPaymentMethodNetworkTokensRequestBuilder retryConfig(Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( paymentMethodId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequest.java index cd041715..de4b9bdb 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListPaymentMethodPaymentServiceTokensRequest { @@ -26,6 +29,9 @@ public class ListPaymentMethodPaymentServiceTokensRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=payment_service_id") private JsonNullable paymentServiceId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -36,18 +42,21 @@ public class ListPaymentMethodPaymentServiceTokensRequest { public ListPaymentMethodPaymentServiceTokensRequest( String paymentMethodId, JsonNullable paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); Utils.checkNotNull(paymentServiceId, "paymentServiceId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; this.paymentServiceId = paymentServiceId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListPaymentMethodPaymentServiceTokensRequest( String paymentMethodId) { - this(paymentMethodId, JsonNullable.undefined(), JsonNullable.undefined()); + this(paymentMethodId, JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } /** @@ -66,6 +75,11 @@ public JsonNullable paymentServiceId() { return paymentServiceId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -105,6 +119,18 @@ public ListPaymentMethodPaymentServiceTokensRequest withPaymentServiceId(JsonNul return this; } + public ListPaymentMethodPaymentServiceTokensRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListPaymentMethodPaymentServiceTokensRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -136,6 +162,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && Objects.deepEquals(this.paymentServiceId, other.paymentServiceId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -144,6 +171,7 @@ public int hashCode() { return Objects.hash( paymentMethodId, paymentServiceId, + applicationName, merchantAccountId); } @@ -152,6 +180,7 @@ public String toString() { return Utils.toString(ListPaymentMethodPaymentServiceTokensRequest.class, "paymentMethodId", paymentMethodId, "paymentServiceId", paymentServiceId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -161,6 +190,8 @@ public final static class Builder { private JsonNullable paymentServiceId = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -194,6 +225,18 @@ public Builder paymentServiceId(JsonNullable paymentServiceId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -213,10 +256,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListPaymentMethodPaymentServiceTokensRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListPaymentMethodPaymentServiceTokensRequest( paymentMethodId, paymentServiceId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequestBuilder.java index e7b8568a..3ed93b65 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodPaymentServiceTokensRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -15,6 +17,10 @@ public class ListPaymentMethodPaymentServiceTokensRequestBuilder { private String paymentMethodId; private JsonNullable paymentServiceId = JsonNullable.undefined(); + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListPaymentMethodPaymentServiceTokens sdk; @@ -40,6 +46,18 @@ public ListPaymentMethodPaymentServiceTokensRequestBuilder paymentServiceId(Json this.paymentServiceId = paymentServiceId; return this; } + + public ListPaymentMethodPaymentServiceTokensRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListPaymentMethodPaymentServiceTokensRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListPaymentMethodPaymentServiceTokensRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -66,13 +84,22 @@ public ListPaymentMethodPaymentServiceTokensRequestBuilder retryConfig(Optional< } public ListPaymentMethodPaymentServiceTokensResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( paymentMethodId, paymentServiceId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodsRequest.java index ef519bab..ec47589d 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentMethodsRequest.java @@ -54,6 +54,9 @@ public class ListPaymentMethodsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=external_identifier") private JsonNullable externalIdentifier; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -68,6 +71,7 @@ public ListPaymentMethodsRequest( JsonNullable buyerExternalIdentifier, JsonNullable> status, JsonNullable externalIdentifier, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); @@ -75,6 +79,7 @@ public ListPaymentMethodsRequest( Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); Utils.checkNotNull(status, "status"); Utils.checkNotNull(externalIdentifier, "externalIdentifier"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.cursor = cursor; this.limit = limit; @@ -82,11 +87,12 @@ public ListPaymentMethodsRequest( this.buyerExternalIdentifier = buyerExternalIdentifier; this.status = status; this.externalIdentifier = externalIdentifier; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListPaymentMethodsRequest() { - this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } /** @@ -135,6 +141,11 @@ public JsonNullable externalIdentifier() { return externalIdentifier; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -249,6 +260,18 @@ public ListPaymentMethodsRequest withExternalIdentifier(JsonNullable ext return this; } + public ListPaymentMethodsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListPaymentMethodsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -284,6 +307,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.buyerExternalIdentifier, other.buyerExternalIdentifier) && Objects.deepEquals(this.status, other.status) && Objects.deepEquals(this.externalIdentifier, other.externalIdentifier) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -296,6 +320,7 @@ public int hashCode() { buyerExternalIdentifier, status, externalIdentifier, + applicationName, merchantAccountId); } @@ -308,6 +333,7 @@ public String toString() { "buyerExternalIdentifier", buyerExternalIdentifier, "status", status, "externalIdentifier", externalIdentifier, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -325,6 +351,8 @@ public final static class Builder { private JsonNullable externalIdentifier = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -433,6 +461,18 @@ public Builder externalIdentifier(JsonNullable externalIdentifier) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -455,6 +495,9 @@ public ListPaymentMethodsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListPaymentMethodsRequest( cursor, limit, @@ -462,6 +505,7 @@ public ListPaymentMethodsRequest build() { buyerExternalIdentifier, status, externalIdentifier, + applicationName, merchantAccountId); } @@ -470,5 +514,11 @@ public ListPaymentMethodsRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequest.java index 41620202..13d7edb9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentOptionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListPaymentOptionsRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class ListPaymentOptionsRequest { @JsonCreator public ListPaymentOptionsRequest( + Optional applicationName, JsonNullable merchantAccountId, PaymentOptionRequest paymentOptionRequest) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(paymentOptionRequest, "paymentOptionRequest"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.paymentOptionRequest = paymentOptionRequest; } public ListPaymentOptionsRequest( PaymentOptionRequest paymentOptionRequest) { - this(JsonNullable.undefined(), paymentOptionRequest); + this(Optional.empty(), JsonNullable.undefined(), paymentOptionRequest); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public ListPaymentOptionsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListPaymentOptionsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } ListPaymentOptionsRequest other = (ListPaymentOptionsRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.paymentOptionRequest, other.paymentOptionRequest); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, paymentOptionRequest); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(ListPaymentOptionsRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "paymentOptionRequest", paymentOptionRequest); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentOptionRequest paymentOptionRequest; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder paymentOptionRequest(PaymentOptionRequest paymentOptionRequest) { } public ListPaymentOptionsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListPaymentOptionsRequest( + applicationName, merchantAccountId, paymentOptionRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequestBuilder.java index a7fe6d91..ceaf7c28 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentOptionsRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentOptionRequest; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListPaymentOptionsRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentOptionRequest paymentOptionRequest; private final SDKMethodInterfaces.MethodCallListPaymentOptions sdk; @@ -18,6 +25,18 @@ public class ListPaymentOptionsRequestBuilder { public ListPaymentOptionsRequestBuilder(SDKMethodInterfaces.MethodCallListPaymentOptions sdk) { this.sdk = sdk; } + + public ListPaymentOptionsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListPaymentOptionsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListPaymentOptionsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public ListPaymentOptionsRequestBuilder paymentOptionRequest(PaymentOptionReques } public ListPaymentOptionsResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.list( + applicationName, merchantAccountId, paymentOptionRequest); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequest.java index 215afccf..68c9b0c0 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequest.java @@ -30,18 +30,24 @@ public class ListPaymentServiceDefinitionsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") private Optional limit; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + @JsonCreator public ListPaymentServiceDefinitionsRequest( JsonNullable cursor, - Optional limit) { + Optional limit, + Optional applicationName) { Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(applicationName, "applicationName"); this.cursor = cursor; this.limit = limit; + this.applicationName = applicationName; } public ListPaymentServiceDefinitionsRequest() { - this(JsonNullable.undefined(), Optional.empty()); + this(JsonNullable.undefined(), Optional.empty(), Optional.empty()); } /** @@ -60,6 +66,11 @@ public Optional limit() { return limit; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + public final static Builder builder() { return new Builder(); } @@ -100,6 +111,18 @@ public ListPaymentServiceDefinitionsRequest withLimit(Optional limit) { return this; } + public ListPaymentServiceDefinitionsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListPaymentServiceDefinitionsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -112,21 +135,24 @@ public boolean equals(java.lang.Object o) { ListPaymentServiceDefinitionsRequest other = (ListPaymentServiceDefinitionsRequest) o; return Objects.deepEquals(this.cursor, other.cursor) && - Objects.deepEquals(this.limit, other.limit); + Objects.deepEquals(this.limit, other.limit) && + Objects.deepEquals(this.applicationName, other.applicationName); } @Override public int hashCode() { return Objects.hash( cursor, - limit); + limit, + applicationName); } @Override public String toString() { return Utils.toString(ListPaymentServiceDefinitionsRequest.class, "cursor", cursor, - "limit", limit); + "limit", limit, + "applicationName", applicationName); } public final static class Builder { @@ -134,6 +160,8 @@ public final static class Builder { private JsonNullable cursor = JsonNullable.undefined(); private Optional limit; + + private Optional applicationName; private Builder() { // force use of static builder() method @@ -174,14 +202,30 @@ public Builder limit(Optional limit) { this.limit = limit; return this; } + + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListPaymentServiceDefinitionsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListPaymentServiceDefinitionsRequest( cursor, - limit); + limit, + applicationName); } private static final LazySingletonValue> _SINGLETON_VALUE_Limit = @@ -189,5 +233,11 @@ public ListPaymentServiceDefinitionsRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequestBuilder.java index 84555309..8c2afd51 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServiceDefinitionsRequestBuilder.java @@ -23,6 +23,10 @@ public class ListPaymentServiceDefinitionsRequestBuilder { "limit", "20", new TypeReference>() {}); + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListPaymentServiceDefinitions sdk; @@ -54,6 +58,18 @@ public ListPaymentServiceDefinitionsRequestBuilder limit(Optional limit) { return this; } + public ListPaymentServiceDefinitionsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListPaymentServiceDefinitionsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public ListPaymentServiceDefinitionsRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); @@ -69,12 +85,16 @@ public ListPaymentServiceDefinitionsRequestBuilder retryConfig(Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( cursor, limit, + applicationName, options); } @@ -104,4 +124,10 @@ public Stream callAsStream() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServicesRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServicesRequest.java index 37b51628..e5bb074c 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServicesRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPaymentServicesRequest.java @@ -45,6 +45,9 @@ public class ListPaymentServicesRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=deleted") private JsonNullable deleted; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -57,21 +60,24 @@ public ListPaymentServicesRequest( JsonNullable cursor, Optional limit, JsonNullable deleted, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(method, "method"); Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); Utils.checkNotNull(deleted, "deleted"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.method = method; this.cursor = cursor; this.limit = limit; this.deleted = deleted; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListPaymentServicesRequest() { - this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } /** @@ -107,6 +113,11 @@ public JsonNullable deleted() { return deleted; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -191,6 +202,18 @@ public ListPaymentServicesRequest withDeleted(JsonNullable deleted) { return this; } + public ListPaymentServicesRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListPaymentServicesRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -224,6 +247,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.cursor, other.cursor) && Objects.deepEquals(this.limit, other.limit) && Objects.deepEquals(this.deleted, other.deleted) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -234,6 +258,7 @@ public int hashCode() { cursor, limit, deleted, + applicationName, merchantAccountId); } @@ -244,6 +269,7 @@ public String toString() { "cursor", cursor, "limit", limit, "deleted", deleted, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -257,6 +283,8 @@ public final static class Builder { private JsonNullable deleted = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -335,6 +363,18 @@ public Builder deleted(JsonNullable deleted) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -357,11 +397,15 @@ public ListPaymentServicesRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListPaymentServicesRequest( method, cursor, limit, deleted, + applicationName, merchantAccountId); } @@ -370,5 +414,11 @@ public ListPaymentServicesRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java index 25f352ea..a322ee99 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java @@ -30,6 +30,9 @@ public class ListPayoutsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") private Optional limit; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -40,17 +43,20 @@ public class ListPayoutsRequest { public ListPayoutsRequest( JsonNullable cursor, Optional limit, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.cursor = cursor; this.limit = limit; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListPayoutsRequest() { - this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); + this(JsonNullable.undefined(), Optional.empty(), Optional.empty(), JsonNullable.undefined()); } /** @@ -69,6 +75,11 @@ public Optional limit() { return limit; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -117,6 +128,18 @@ public ListPayoutsRequest withLimit(Optional limit) { return this; } + public ListPayoutsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListPayoutsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -148,6 +171,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.cursor, other.cursor) && Objects.deepEquals(this.limit, other.limit) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -156,6 +180,7 @@ public int hashCode() { return Objects.hash( cursor, limit, + applicationName, merchantAccountId); } @@ -164,6 +189,7 @@ public String toString() { return Utils.toString(ListPayoutsRequest.class, "cursor", cursor, "limit", limit, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -173,6 +199,8 @@ public final static class Builder { private Optional limit; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -215,6 +243,18 @@ public Builder limit(Optional limit) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -237,9 +277,13 @@ public ListPayoutsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListPayoutsRequest( cursor, limit, + applicationName, merchantAccountId); } @@ -248,5 +292,11 @@ public ListPayoutsRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java index e4efa8da..ae2320f9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java @@ -23,6 +23,10 @@ public class ListPayoutsRequestBuilder { "limit", "20", new TypeReference>() {}); + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListPayouts sdk; @@ -54,6 +58,18 @@ public ListPayoutsRequestBuilder limit(Optional limit) { this.limit = limit; return this; } + + public ListPayoutsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListPayoutsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListPayoutsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -82,12 +98,16 @@ public ListPayoutsRequestBuilder retryConfig(Optional retryConfig) public ListPayoutsResponse call() throws Exception { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); + } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( cursor, limit, + applicationName, merchantAccountId, options); } @@ -118,4 +138,10 @@ public Stream callAsStream() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequest.java index 72665ec9..19832bee 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequest.java @@ -33,6 +33,9 @@ public class ListTransactionEventsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") private Optional limit; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -44,20 +47,23 @@ public ListTransactionEventsRequest( String transactionId, JsonNullable cursor, Optional limit, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(transactionId, "transactionId"); Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.transactionId = transactionId; this.cursor = cursor; this.limit = limit; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListTransactionEventsRequest( String transactionId) { - this(transactionId, JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); + this(transactionId, JsonNullable.undefined(), Optional.empty(), Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -81,6 +87,11 @@ public Optional limit() { return limit; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -135,6 +146,18 @@ public ListTransactionEventsRequest withLimit(Optional limit) { return this; } + public ListTransactionEventsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListTransactionEventsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -167,6 +190,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.transactionId, other.transactionId) && Objects.deepEquals(this.cursor, other.cursor) && Objects.deepEquals(this.limit, other.limit) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -176,6 +200,7 @@ public int hashCode() { transactionId, cursor, limit, + applicationName, merchantAccountId); } @@ -185,6 +210,7 @@ public String toString() { "transactionId", transactionId, "cursor", cursor, "limit", limit, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -196,6 +222,8 @@ public final static class Builder { private Optional limit; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -244,6 +272,18 @@ public Builder limit(Optional limit) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -266,10 +306,14 @@ public ListTransactionEventsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListTransactionEventsRequest( transactionId, cursor, limit, + applicationName, merchantAccountId); } @@ -278,5 +322,11 @@ public ListTransactionEventsRequest build() { "limit", "100", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequestBuilder.java index a83164cb..26fc4aa9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionEventsRequestBuilder.java @@ -3,26 +3,15 @@ */ package com.gr4vy.sdk.models.operations; -import com.fasterxml.jackson.core.type.TypeReference; -import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; -import java.lang.Long; -import java.lang.String; import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; public class ListTransactionEventsRequestBuilder { - private String transactionId; - private JsonNullable cursor = JsonNullable.undefined(); - private Optional limit = Utils.readDefaultOrConstValue( - "limit", - "100", - new TypeReference>() {}); - private JsonNullable merchantAccountId = JsonNullable.undefined(); + private ListTransactionEventsRequest request; private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListTransactionEvents sdk; @@ -30,45 +19,9 @@ public ListTransactionEventsRequestBuilder(SDKMethodInterfaces.MethodCallListTra this.sdk = sdk; } - public ListTransactionEventsRequestBuilder transactionId(String transactionId) { - Utils.checkNotNull(transactionId, "transactionId"); - this.transactionId = transactionId; - return this; - } - - public ListTransactionEventsRequestBuilder cursor(String cursor) { - Utils.checkNotNull(cursor, "cursor"); - this.cursor = JsonNullable.of(cursor); - return this; - } - - public ListTransactionEventsRequestBuilder cursor(JsonNullable cursor) { - Utils.checkNotNull(cursor, "cursor"); - this.cursor = cursor; - return this; - } - - public ListTransactionEventsRequestBuilder limit(long limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = Optional.of(limit); - return this; - } - - public ListTransactionEventsRequestBuilder limit(Optional limit) { - Utils.checkNotNull(limit, "limit"); - this.limit = limit; - return this; - } - - public ListTransactionEventsRequestBuilder merchantAccountId(String merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = JsonNullable.of(merchantAccountId); - return this; - } - - public ListTransactionEventsRequestBuilder merchantAccountId(JsonNullable merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = merchantAccountId; + public ListTransactionEventsRequestBuilder request(ListTransactionEventsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } @@ -85,22 +38,11 @@ public ListTransactionEventsRequestBuilder retryConfig(Optional ret } public ListTransactionEventsResponse call() throws Exception { - if (limit == null) { - limit = _SINGLETON_VALUE_Limit.value(); - } Optional options = Optional.of(Options.builder() + Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( - transactionId, - cursor, - limit, - merchantAccountId, + request, options); } - - private static final LazySingletonValue> _SINGLETON_VALUE_Limit = - new LazySingletonValue<>( - "limit", - "100", - new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequest.java index 63de11e8..b46d6f46 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ListTransactionRefundsRequest { @@ -17,6 +20,9 @@ public class ListTransactionRefundsRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transaction_id") private String transactionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,16 +32,19 @@ public class ListTransactionRefundsRequest { @JsonCreator public ListTransactionRefundsRequest( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(transactionId, "transactionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.transactionId = transactionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListTransactionRefundsRequest( String transactionId) { - this(transactionId, JsonNullable.undefined()); + this(transactionId, Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -43,6 +52,11 @@ public String transactionId() { return transactionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -61,6 +75,18 @@ public ListTransactionRefundsRequest withTransactionId(String transactionId) { return this; } + public ListTransactionRefundsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListTransactionRefundsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { ListTransactionRefundsRequest other = (ListTransactionRefundsRequest) o; return Objects.deepEquals(this.transactionId, other.transactionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( transactionId, + applicationName, merchantAccountId); } @@ -105,6 +133,7 @@ public int hashCode() { public String toString() { return Utils.toString(ListTransactionRefundsRequest.class, "transactionId", transactionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -112,6 +141,8 @@ public final static class Builder { private String transactionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -124,6 +155,18 @@ public Builder transactionId(String transactionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -143,9 +186,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ListTransactionRefundsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListTransactionRefundsRequest( transactionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequestBuilder.java index dc1d21c9..1db696d9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionRefundsRequestBuilder.java @@ -3,6 +3,8 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Options; import com.gr4vy.sdk.utils.RetryConfig; import com.gr4vy.sdk.utils.Utils; @@ -14,6 +16,10 @@ public class ListTransactionRefundsRequestBuilder { private String transactionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private Optional retryConfig = Optional.empty(); private final SDKMethodInterfaces.MethodCallListTransactionRefunds sdk; @@ -27,6 +33,18 @@ public ListTransactionRefundsRequestBuilder transactionId(String transactionId) this.transactionId = transactionId; return this; } + + public ListTransactionRefundsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ListTransactionRefundsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ListTransactionRefundsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -53,12 +71,21 @@ public ListTransactionRefundsRequestBuilder retryConfig(Optional re } public ListTransactionRefundsResponse call() throws Exception { - Optional options = Optional.of(Options.builder() + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } Optional options = Optional.of(Options.builder() .retryConfig(retryConfig) .build()); return sdk.list( transactionId, + applicationName, merchantAccountId, options); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionsRequest.java index 1a134f3f..c87966df 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListTransactionsRequest.java @@ -247,6 +247,9 @@ public class ListTransactionsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=used_3ds") private JsonNullable used3ds; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -298,6 +301,7 @@ public ListTransactionsRequest( JsonNullable isSubsequentPayment, JsonNullable merchantInitiated, JsonNullable used3ds, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(limit, "limit"); @@ -342,6 +346,7 @@ public ListTransactionsRequest( Utils.checkNotNull(isSubsequentPayment, "isSubsequentPayment"); Utils.checkNotNull(merchantInitiated, "merchantInitiated"); Utils.checkNotNull(used3ds, "used3ds"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.cursor = cursor; this.limit = limit; @@ -386,11 +391,12 @@ public ListTransactionsRequest( this.isSubsequentPayment = isSubsequentPayment; this.merchantInitiated = merchantInitiated; this.used3ds = used3ds; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ListTransactionsRequest() { - this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } /** @@ -709,6 +715,11 @@ public JsonNullable used3ds() { return used3ds; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -1423,6 +1434,18 @@ public ListTransactionsRequest withUsed3ds(JsonNullable used3ds) { return this; } + public ListTransactionsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ListTransactionsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -1495,6 +1518,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.isSubsequentPayment, other.isSubsequentPayment) && Objects.deepEquals(this.merchantInitiated, other.merchantInitiated) && Objects.deepEquals(this.used3ds, other.used3ds) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -1544,6 +1568,7 @@ public int hashCode() { isSubsequentPayment, merchantInitiated, used3ds, + applicationName, merchantAccountId); } @@ -1593,6 +1618,7 @@ public String toString() { "isSubsequentPayment", isSubsequentPayment, "merchantInitiated", merchantInitiated, "used3ds", used3ds, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -1684,6 +1710,8 @@ public final static class Builder { private JsonNullable used3ds = JsonNullable.undefined(); + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -2392,6 +2420,18 @@ public Builder used3ds(JsonNullable used3ds) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -2414,6 +2454,9 @@ public ListTransactionsRequest build() { if (limit == null) { limit = _SINGLETON_VALUE_Limit.value(); } + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ListTransactionsRequest( cursor, limit, @@ -2458,6 +2501,7 @@ public ListTransactionsRequest build() { isSubsequentPayment, merchantInitiated, used3ds, + applicationName, merchantAccountId); } @@ -2466,5 +2510,11 @@ public ListTransactionsRequest build() { "limit", "20", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequest.java index a18ac091..37438760 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletDomain; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class RegisterDigitalWalletDomainRequest { @@ -21,6 +24,9 @@ public class RegisterDigitalWalletDomainRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=digital_wallet_id") private String digitalWalletId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class RegisterDigitalWalletDomainRequest { @JsonCreator public RegisterDigitalWalletDomainRequest( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletDomain digitalWalletDomain) { Utils.checkNotNull(digitalWalletId, "digitalWalletId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(digitalWalletDomain, "digitalWalletDomain"); this.digitalWalletId = digitalWalletId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.digitalWalletDomain = digitalWalletDomain; } @@ -46,7 +55,7 @@ public RegisterDigitalWalletDomainRequest( public RegisterDigitalWalletDomainRequest( String digitalWalletId, DigitalWalletDomain digitalWalletDomain) { - this(digitalWalletId, JsonNullable.undefined(), digitalWalletDomain); + this(digitalWalletId, Optional.empty(), JsonNullable.undefined(), digitalWalletDomain); } /** @@ -57,6 +66,11 @@ public String digitalWalletId() { return digitalWalletId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public RegisterDigitalWalletDomainRequest withDigitalWalletId(String digitalWall return this; } + public RegisterDigitalWalletDomainRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public RegisterDigitalWalletDomainRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { RegisterDigitalWalletDomainRequest other = (RegisterDigitalWalletDomainRequest) o; return Objects.deepEquals(this.digitalWalletId, other.digitalWalletId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.digitalWalletDomain, other.digitalWalletDomain); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( digitalWalletId, + applicationName, merchantAccountId, digitalWalletDomain); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(RegisterDigitalWalletDomainRequest.class, "digitalWalletId", digitalWalletId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "digitalWalletDomain", digitalWalletDomain); } @@ -143,6 +172,8 @@ public final static class Builder { private String digitalWalletId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletDomain digitalWalletDomain; @@ -160,6 +191,18 @@ public Builder digitalWalletId(String digitalWalletId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder digitalWalletDomain(DigitalWalletDomain digitalWalletDomain) { } public RegisterDigitalWalletDomainRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new RegisterDigitalWalletDomainRequest( digitalWalletId, + applicationName, merchantAccountId, digitalWalletDomain); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequestBuilder.java index bee2d106..c3b7ce6e 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/RegisterDigitalWalletDomainRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletDomain; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class RegisterDigitalWalletDomainRequestBuilder { private String digitalWalletId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletDomain digitalWalletDomain; private final SDKMethodInterfaces.MethodCallRegisterDigitalWalletDomain sdk; @@ -25,6 +32,18 @@ public RegisterDigitalWalletDomainRequestBuilder digitalWalletId(String digitalW this.digitalWalletId = digitalWalletId; return this; } + + public RegisterDigitalWalletDomainRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public RegisterDigitalWalletDomainRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public RegisterDigitalWalletDomainRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public RegisterDigitalWalletDomainRequestBuilder digitalWalletDomain(DigitalWall } public RegisterDigitalWalletDomainResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( digitalWalletId, + applicationName, merchantAccountId, digitalWalletDomain); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequest.java index f60b0e96..dc96ecb7 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ResumePaymentMethodNetworkTokenRequest { @@ -26,6 +29,9 @@ public class ResumePaymentMethodNetworkTokenRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=network_token_id") private String networkTokenId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -36,19 +42,22 @@ public class ResumePaymentMethodNetworkTokenRequest { public ResumePaymentMethodNetworkTokenRequest( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); Utils.checkNotNull(networkTokenId, "networkTokenId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; this.networkTokenId = networkTokenId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public ResumePaymentMethodNetworkTokenRequest( String paymentMethodId, String networkTokenId) { - this(paymentMethodId, networkTokenId, JsonNullable.undefined()); + this(paymentMethodId, networkTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -67,6 +76,11 @@ public String networkTokenId() { return networkTokenId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -97,6 +111,18 @@ public ResumePaymentMethodNetworkTokenRequest withNetworkTokenId(String networkT return this; } + public ResumePaymentMethodNetworkTokenRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public ResumePaymentMethodNetworkTokenRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -128,6 +154,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && Objects.deepEquals(this.networkTokenId, other.networkTokenId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -136,6 +163,7 @@ public int hashCode() { return Objects.hash( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } @@ -144,6 +172,7 @@ public String toString() { return Utils.toString(ResumePaymentMethodNetworkTokenRequest.class, "paymentMethodId", paymentMethodId, "networkTokenId", networkTokenId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -153,6 +182,8 @@ public final static class Builder { private String networkTokenId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -177,6 +208,18 @@ public Builder networkTokenId(String networkTokenId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -196,10 +239,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public ResumePaymentMethodNetworkTokenRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new ResumePaymentMethodNetworkTokenRequest( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequestBuilder.java index 2a004494..f39a3e54 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/ResumePaymentMethodNetworkTokenRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class ResumePaymentMethodNetworkTokenRequestBuilder { private String paymentMethodId; private String networkTokenId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallResumePaymentMethodNetworkToken sdk; @@ -30,6 +37,18 @@ public ResumePaymentMethodNetworkTokenRequestBuilder networkTokenId(String netwo this.networkTokenId = networkTokenId; return this; } + + public ResumePaymentMethodNetworkTokenRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public ResumePaymentMethodNetworkTokenRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public ResumePaymentMethodNetworkTokenRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -44,10 +63,19 @@ public ResumePaymentMethodNetworkTokenRequestBuilder merchantAccountId(JsonNulla } public ResumePaymentMethodNetworkTokenResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.resume( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/SDKMethodInterfaces.java b/src/main/java/com/gr4vy/sdk/models/operations/SDKMethodInterfaces.java index b2c7b7e3..487bcff8 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/SDKMethodInterfaces.java @@ -9,7 +9,6 @@ import com.gr4vy.sdk.models.components.BuyerUpdate; import com.gr4vy.sdk.models.components.CheckoutSessionCreate; import com.gr4vy.sdk.models.components.ClickToPaySessionRequest; -import com.gr4vy.sdk.models.components.CryptogramCreate; import com.gr4vy.sdk.models.components.DigitalWalletCreate; import com.gr4vy.sdk.models.components.DigitalWalletDomain; import com.gr4vy.sdk.models.components.DigitalWalletUpdate; @@ -25,7 +24,6 @@ import com.gr4vy.sdk.models.components.PaymentServiceUpdate; import com.gr4vy.sdk.models.components.PayoutCreate; import com.gr4vy.sdk.models.components.ShippingDetailsCreate; -import com.gr4vy.sdk.models.components.ShippingDetailsUpdate; import com.gr4vy.sdk.models.components.TransactionCapture; import com.gr4vy.sdk.models.components.TransactionCreate; import com.gr4vy.sdk.models.components.TransactionRefundAllCreate; @@ -44,6 +42,7 @@ public class SDKMethodInterfaces { public interface MethodCallCreateAccountUpdaterJob { CreateAccountUpdaterJobResponse create( + Optional applicationName, JsonNullable merchantAccountId, AccountUpdaterJobCreate accountUpdaterJobCreate) throws Exception; } @@ -56,6 +55,7 @@ ListBuyersResponse list( public interface MethodCallAddBuyer { AddBuyerResponse create( + Optional applicationName, JsonNullable merchantAccountId, BuyerCreate buyerCreate) throws Exception; } @@ -63,6 +63,7 @@ AddBuyerResponse create( public interface MethodCallGetBuyer { GetBuyerResponse get( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -70,6 +71,7 @@ GetBuyerResponse get( public interface MethodCallUpdateBuyer { UpdateBuyerResponse update( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, BuyerUpdate buyerUpdate) throws Exception; } @@ -77,6 +79,7 @@ UpdateBuyerResponse update( public interface MethodCallDeleteBuyer { DeleteBuyerResponse delete( String buyerId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } @@ -90,6 +93,7 @@ public interface MethodCallListBuyerGiftCards { ListBuyerGiftCardsResponse list( JsonNullable buyerExternalIdentifier, JsonNullable buyerId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -97,6 +101,7 @@ ListBuyerGiftCardsResponse list( public interface MethodCallAddBuyerShippingDetails { AddBuyerShippingDetailsResponse create( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, ShippingDetailsCreate shippingDetailsCreate) throws Exception; } @@ -104,6 +109,7 @@ AddBuyerShippingDetailsResponse create( public interface MethodCallListBuyerShippingDetails { ListBuyerShippingDetailsResponse list( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -112,22 +118,21 @@ public interface MethodCallGetBuyerShippingDetails { GetBuyerShippingDetailsResponse get( String buyerId, String shippingDetailsId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } public interface MethodCallUpdateBuyerShippingDetails { UpdateBuyerShippingDetailsResponse update( - String buyerId, - String shippingDetailsId, - JsonNullable merchantAccountId, - ShippingDetailsUpdate shippingDetailsUpdate) throws Exception; + UpdateBuyerShippingDetailsRequest request) throws Exception; } public interface MethodCallDeleteBuyerShippingDetails { DeleteBuyerShippingDetailsResponse delete( String buyerId, String shippingDetailsId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } @@ -139,6 +144,7 @@ ListPaymentMethodsResponse list( public interface MethodCallCreatePaymentMethod { CreatePaymentMethodResponse create( + Optional applicationName, JsonNullable merchantAccountId, Body requestBody) throws Exception; } @@ -146,6 +152,7 @@ CreatePaymentMethodResponse create( public interface MethodCallGetPaymentMethod { GetPaymentMethodResponse get( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -153,6 +160,7 @@ GetPaymentMethodResponse get( public interface MethodCallDeletePaymentMethod { DeletePaymentMethodResponse delete( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } @@ -160,6 +168,7 @@ public interface MethodCallListPaymentMethodPaymentServiceTokens { ListPaymentMethodPaymentServiceTokensResponse list( String paymentMethodId, JsonNullable paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -167,6 +176,7 @@ ListPaymentMethodPaymentServiceTokensResponse list( public interface MethodCallCreatePaymentMethodPaymentServiceToken { CreatePaymentMethodPaymentServiceTokenResponse create( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceTokenCreate paymentServiceTokenCreate) throws Exception; } @@ -175,12 +185,14 @@ public interface MethodCallDeletePaymentMethodPaymentServiceToken { DeletePaymentMethodPaymentServiceTokenResponse delete( String paymentMethodId, String paymentServiceTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } public interface MethodCallListPaymentMethodNetworkTokens { ListPaymentMethodNetworkTokensResponse list( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -188,6 +200,7 @@ ListPaymentMethodNetworkTokensResponse list( public interface MethodCallCreatePaymentMethodNetworkToken { CreatePaymentMethodNetworkTokenResponse create( String paymentMethodId, + Optional applicationName, JsonNullable merchantAccountId, NetworkTokenCreate networkTokenCreate) throws Exception; } @@ -196,6 +209,7 @@ public interface MethodCallSuspendPaymentMethodNetworkToken { SuspendPaymentMethodNetworkTokenResponse suspend( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } @@ -203,6 +217,7 @@ public interface MethodCallResumePaymentMethodNetworkToken { ResumePaymentMethodNetworkTokenResponse resume( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } @@ -210,20 +225,19 @@ public interface MethodCallDeletePaymentMethodNetworkToken { DeletePaymentMethodNetworkTokenResponse delete( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } public interface MethodCallCreatePaymentMethodNetworkTokenCryptogram { CreatePaymentMethodNetworkTokenCryptogramResponse create( - String paymentMethodId, - String networkTokenId, - JsonNullable merchantAccountId, - CryptogramCreate cryptogramCreate) throws Exception; + CreatePaymentMethodNetworkTokenCryptogramRequest request) throws Exception; } public interface MethodCallGetGiftCard { GetGiftCardResponse get( String giftCardId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -231,11 +245,13 @@ GetGiftCardResponse get( public interface MethodCallDeleteGiftCard { DeleteGiftCardResponse delete( String giftCardId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } public interface MethodCallCreateGiftCard { CreateGiftCardResponse create( + Optional applicationName, JsonNullable merchantAccountId, GiftCardCreate giftCardCreate) throws Exception; } @@ -248,24 +264,28 @@ ListGiftCardsResponse list( public interface MethodCallListGiftCardBalances { ListGiftCardBalancesResponse list( + Optional applicationName, JsonNullable merchantAccountId, GiftCardBalanceRequest giftCardBalanceRequest) throws Exception; } public interface MethodCallListCardSchemeDefinitions { ListCardSchemeDefinitionsResponse list( + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } public interface MethodCallConfigureDigitalWallet { ConfigureDigitalWalletResponse create( + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletCreate digitalWalletCreate) throws Exception; } public interface MethodCallListDigitalWallets { ListDigitalWalletsResponse list( + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -273,6 +293,7 @@ ListDigitalWalletsResponse list( public interface MethodCallGetDigitalWallet { GetDigitalWalletResponse get( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -280,36 +301,42 @@ GetDigitalWalletResponse get( public interface MethodCallDeleteDigitalWallet { DeleteDigitalWalletResponse delete( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } public interface MethodCallUpdateDigitalWallet { UpdateDigitalWalletResponse update( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletUpdate digitalWalletUpdate) throws Exception; } public interface MethodCallCreateGooglePayDigitalWalletSession { CreateGooglePayDigitalWalletSessionResponse googlePay( + Optional applicationName, JsonNullable merchantAccountId, GooglePaySessionRequest googlePaySessionRequest) throws Exception; } public interface MethodCallCreateApplePayDigitalWalletSession { CreateApplePayDigitalWalletSessionResponse applePay( + Optional applicationName, JsonNullable merchantAccountId, ApplePaySessionRequest applePaySessionRequest) throws Exception; } public interface MethodCallCreateClickToPayDigitalWalletSession { CreateClickToPayDigitalWalletSessionResponse clickToPay( - ClickToPaySessionRequest request) throws Exception; + Optional applicationName, + ClickToPaySessionRequest clickToPaySessionRequest) throws Exception; } public interface MethodCallRegisterDigitalWalletDomain { RegisterDigitalWalletDomainResponse create( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletDomain digitalWalletDomain) throws Exception; } @@ -317,6 +344,7 @@ RegisterDigitalWalletDomainResponse create( public interface MethodCallUnregisterDigitalWalletDomain { UnregisterDigitalWalletDomainResponse delete( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletDomain digitalWalletDomain) throws Exception; } @@ -329,6 +357,7 @@ ListTransactionsResponse list( public interface MethodCallCreateTransaction { CreateTransactionResponse create( + Optional applicationName, JsonNullable merchantAccountId, JsonNullable idempotencyKey, TransactionCreate transactionCreate) throws Exception; @@ -337,6 +366,7 @@ CreateTransactionResponse create( public interface MethodCallGetTransaction { GetTransactionResponse get( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -344,6 +374,7 @@ GetTransactionResponse get( public interface MethodCallCaptureTransaction { CaptureTransactionResponse capture( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, TransactionCapture transactionCapture) throws Exception; } @@ -351,18 +382,21 @@ CaptureTransactionResponse capture( public interface MethodCallVoidTransaction { VoidTransactionResponse void_( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } public interface MethodCallSyncTransaction { SyncTransactionResponse sync( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } public interface MethodCallListTransactionRefunds { ListTransactionRefundsResponse list( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -370,6 +404,7 @@ ListTransactionRefundsResponse list( public interface MethodCallCreateTransactionRefund { CreateTransactionRefundResponse create( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, TransactionRefundCreate transactionRefundCreate) throws Exception; } @@ -378,6 +413,7 @@ public interface MethodCallGetTransactionRefund { GetTransactionRefundResponse get( String transactionId, String refundId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -385,28 +421,28 @@ GetTransactionRefundResponse get( public interface MethodCallCreateFullTransactionRefund { CreateFullTransactionRefundResponse create( String transactionId, + Optional applicationName, JsonNullable merchantAccountId, JsonNullable transactionRefundAllCreate) throws Exception; } public interface MethodCallListTransactionEvents { ListTransactionEventsResponse list( - String transactionId, - JsonNullable cursor, - Optional limit, - JsonNullable merchantAccountId, + ListTransactionEventsRequest request, Optional options) throws Exception; } public interface MethodCallGetRefund { GetRefundResponse get( String refundId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } public interface MethodCallListPaymentOptions { ListPaymentOptionsResponse list( + Optional applicationName, JsonNullable merchantAccountId, PaymentOptionRequest paymentOptionRequest) throws Exception; } @@ -415,18 +451,21 @@ public interface MethodCallListPaymentServiceDefinitions { ListPaymentServiceDefinitionsResponse list( JsonNullable cursor, Optional limit, + Optional applicationName, Optional options) throws Exception; } public interface MethodCallGetPaymentServiceDefinition { GetPaymentServiceDefinitionResponse get( String paymentServiceDefinitionId, + Optional applicationName, Optional options) throws Exception; } public interface MethodCallCreatePaymentServiceDefinitionSession { CreatePaymentServiceDefinitionSessionResponse session( String paymentServiceDefinitionId, + Optional applicationName, Map requestBody) throws Exception; } @@ -438,6 +477,7 @@ ListPaymentServicesResponse list( public interface MethodCallUpdatePaymentService { UpdatePaymentServiceResponse create( + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) throws Exception; } @@ -445,6 +485,7 @@ UpdatePaymentServiceResponse create( public interface MethodCallGetPaymentService { GetPaymentServiceResponse get( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -452,6 +493,7 @@ GetPaymentServiceResponse get( public interface MethodCallCreatePaymentService { CreatePaymentServiceResponse update( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceUpdate paymentServiceUpdate) throws Exception; } @@ -459,11 +501,13 @@ CreatePaymentServiceResponse update( public interface MethodCallDeletePaymentService { DeletePaymentServiceResponse delete( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } public interface MethodCallVerifyPaymentServiceCredentials { VerifyPaymentServiceCredentialsResponse verify( + Optional applicationName, JsonNullable merchantAccountId, VerifyCredentials verifyCredentials) throws Exception; } @@ -471,6 +515,7 @@ VerifyPaymentServiceCredentialsResponse verify( public interface MethodCallCreatePaymentServiceSession { CreatePaymentServiceSessionResponse session( String paymentServiceId, + Optional applicationName, JsonNullable merchantAccountId, Map requestBody) throws Exception; } @@ -483,6 +528,7 @@ ListAuditLogsResponse list( public interface MethodCallCreateCheckoutSession { CreateCheckoutSessionResponse create( + Optional applicationName, JsonNullable merchantAccountId, Optional checkoutSessionCreate) throws Exception; } @@ -490,6 +536,7 @@ CreateCheckoutSessionResponse create( public interface MethodCallUpdateCheckoutSession { UpdateCheckoutSessionResponse update( String sessionId, + Optional applicationName, JsonNullable merchantAccountId, CheckoutSessionCreate checkoutSessionCreate) throws Exception; } @@ -497,6 +544,7 @@ UpdateCheckoutSessionResponse update( public interface MethodCallGetCheckoutSession { GetCheckoutSessionResponse get( String sessionId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } @@ -504,6 +552,7 @@ GetCheckoutSessionResponse get( public interface MethodCallDeleteCheckoutSession { DeleteCheckoutSessionResponse delete( String sessionId, + Optional applicationName, JsonNullable merchantAccountId) throws Exception; } @@ -512,23 +561,27 @@ ListMerchantAccountsResponse list( JsonNullable cursor, Optional limit, JsonNullable search, + Optional applicationName, Optional options) throws Exception; } public interface MethodCallCreateMerchantAccount { CreateMerchantAccountResponse create( - MerchantAccountCreate request) throws Exception; + Optional applicationName, + MerchantAccountCreate merchantAccountCreate) throws Exception; } public interface MethodCallGetMerchantAccount { GetMerchantAccountResponse get( String merchantAccountId, + Optional applicationName, Optional options) throws Exception; } public interface MethodCallUpdateMerchantAccount { UpdateMerchantAccountResponse update( String merchantAccountId, + Optional applicationName, MerchantAccountUpdate merchantAccountUpdate) throws Exception; } @@ -536,12 +589,14 @@ public interface MethodCallListPayouts { ListPayoutsResponse list( JsonNullable cursor, Optional limit, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } public interface MethodCallCreatePayout { CreatePayoutResponse create( + Optional applicationName, JsonNullable merchantAccountId, PayoutCreate payoutCreate) throws Exception; } @@ -549,6 +604,7 @@ CreatePayoutResponse create( public interface MethodCallGetPayout { GetPayoutResponse get( String payoutId, + Optional applicationName, JsonNullable merchantAccountId, Optional options) throws Exception; } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequest.java index 25c983b0..635fcb12 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class SuspendPaymentMethodNetworkTokenRequest { @@ -26,6 +29,9 @@ public class SuspendPaymentMethodNetworkTokenRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=network_token_id") private String networkTokenId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -36,19 +42,22 @@ public class SuspendPaymentMethodNetworkTokenRequest { public SuspendPaymentMethodNetworkTokenRequest( String paymentMethodId, String networkTokenId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(paymentMethodId, "paymentMethodId"); Utils.checkNotNull(networkTokenId, "networkTokenId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.paymentMethodId = paymentMethodId; this.networkTokenId = networkTokenId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public SuspendPaymentMethodNetworkTokenRequest( String paymentMethodId, String networkTokenId) { - this(paymentMethodId, networkTokenId, JsonNullable.undefined()); + this(paymentMethodId, networkTokenId, Optional.empty(), JsonNullable.undefined()); } /** @@ -67,6 +76,11 @@ public String networkTokenId() { return networkTokenId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -97,6 +111,18 @@ public SuspendPaymentMethodNetworkTokenRequest withNetworkTokenId(String network return this; } + public SuspendPaymentMethodNetworkTokenRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public SuspendPaymentMethodNetworkTokenRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -128,6 +154,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.paymentMethodId, other.paymentMethodId) && Objects.deepEquals(this.networkTokenId, other.networkTokenId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -136,6 +163,7 @@ public int hashCode() { return Objects.hash( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } @@ -144,6 +172,7 @@ public String toString() { return Utils.toString(SuspendPaymentMethodNetworkTokenRequest.class, "paymentMethodId", paymentMethodId, "networkTokenId", networkTokenId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -153,6 +182,8 @@ public final static class Builder { private String networkTokenId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -177,6 +208,18 @@ public Builder networkTokenId(String networkTokenId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -196,10 +239,20 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public SuspendPaymentMethodNetworkTokenRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new SuspendPaymentMethodNetworkTokenRequest( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequestBuilder.java index 83f32cac..ebca3b06 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/SuspendPaymentMethodNetworkTokenRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class SuspendPaymentMethodNetworkTokenRequestBuilder { private String paymentMethodId; private String networkTokenId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallSuspendPaymentMethodNetworkToken sdk; @@ -30,6 +37,18 @@ public SuspendPaymentMethodNetworkTokenRequestBuilder networkTokenId(String netw this.networkTokenId = networkTokenId; return this; } + + public SuspendPaymentMethodNetworkTokenRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public SuspendPaymentMethodNetworkTokenRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public SuspendPaymentMethodNetworkTokenRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -44,10 +63,19 @@ public SuspendPaymentMethodNetworkTokenRequestBuilder merchantAccountId(JsonNull } public SuspendPaymentMethodNetworkTokenResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.suspend( paymentMethodId, networkTokenId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequest.java index 364a183b..34eca63f 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class SyncTransactionRequest { @@ -17,6 +20,9 @@ public class SyncTransactionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transaction_id") private String transactionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,16 +32,19 @@ public class SyncTransactionRequest { @JsonCreator public SyncTransactionRequest( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(transactionId, "transactionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.transactionId = transactionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public SyncTransactionRequest( String transactionId) { - this(transactionId, JsonNullable.undefined()); + this(transactionId, Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -43,6 +52,11 @@ public String transactionId() { return transactionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -61,6 +75,18 @@ public SyncTransactionRequest withTransactionId(String transactionId) { return this; } + public SyncTransactionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public SyncTransactionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { SyncTransactionRequest other = (SyncTransactionRequest) o; return Objects.deepEquals(this.transactionId, other.transactionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( transactionId, + applicationName, merchantAccountId); } @@ -105,6 +133,7 @@ public int hashCode() { public String toString() { return Utils.toString(SyncTransactionRequest.class, "transactionId", transactionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -112,6 +141,8 @@ public final static class Builder { private String transactionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -124,6 +155,18 @@ public Builder transactionId(String transactionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -143,9 +186,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public SyncTransactionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new SyncTransactionRequest( transactionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequestBuilder.java index ff0abb76..596b6f92 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/SyncTransactionRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class SyncTransactionRequestBuilder { private String transactionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallSyncTransaction sdk; @@ -23,6 +30,18 @@ public SyncTransactionRequestBuilder transactionId(String transactionId) { this.transactionId = transactionId; return this; } + + public SyncTransactionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public SyncTransactionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public SyncTransactionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public SyncTransactionRequestBuilder merchantAccountId(JsonNullable merc } public SyncTransactionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.sync( transactionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequest.java index d48c252a..808012b7 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletDomain; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UnregisterDigitalWalletDomainRequest { @@ -18,6 +21,9 @@ public class UnregisterDigitalWalletDomainRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=digital_wallet_id") private String digitalWalletId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -30,12 +36,15 @@ public class UnregisterDigitalWalletDomainRequest { @JsonCreator public UnregisterDigitalWalletDomainRequest( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletDomain digitalWalletDomain) { Utils.checkNotNull(digitalWalletId, "digitalWalletId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(digitalWalletDomain, "digitalWalletDomain"); this.digitalWalletId = digitalWalletId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.digitalWalletDomain = digitalWalletDomain; } @@ -43,7 +52,7 @@ public UnregisterDigitalWalletDomainRequest( public UnregisterDigitalWalletDomainRequest( String digitalWalletId, DigitalWalletDomain digitalWalletDomain) { - this(digitalWalletId, JsonNullable.undefined(), digitalWalletDomain); + this(digitalWalletId, Optional.empty(), JsonNullable.undefined(), digitalWalletDomain); } @JsonIgnore @@ -51,6 +60,11 @@ public String digitalWalletId() { return digitalWalletId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -74,6 +88,18 @@ public UnregisterDigitalWalletDomainRequest withDigitalWalletId(String digitalWa return this; } + public UnregisterDigitalWalletDomainRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public UnregisterDigitalWalletDomainRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -110,6 +136,7 @@ public boolean equals(java.lang.Object o) { UnregisterDigitalWalletDomainRequest other = (UnregisterDigitalWalletDomainRequest) o; return Objects.deepEquals(this.digitalWalletId, other.digitalWalletId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.digitalWalletDomain, other.digitalWalletDomain); } @@ -118,6 +145,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( digitalWalletId, + applicationName, merchantAccountId, digitalWalletDomain); } @@ -126,6 +154,7 @@ public int hashCode() { public String toString() { return Utils.toString(UnregisterDigitalWalletDomainRequest.class, "digitalWalletId", digitalWalletId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "digitalWalletDomain", digitalWalletDomain); } @@ -134,6 +163,8 @@ public final static class Builder { private String digitalWalletId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletDomain digitalWalletDomain; @@ -148,6 +179,18 @@ public Builder digitalWalletId(String digitalWalletId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -173,10 +216,20 @@ public Builder digitalWalletDomain(DigitalWalletDomain digitalWalletDomain) { } public UnregisterDigitalWalletDomainRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new UnregisterDigitalWalletDomainRequest( digitalWalletId, + applicationName, merchantAccountId, digitalWalletDomain); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequestBuilder.java index 62d06547..f38b452e 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UnregisterDigitalWalletDomainRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletDomain; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UnregisterDigitalWalletDomainRequestBuilder { private String digitalWalletId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletDomain digitalWalletDomain; private final SDKMethodInterfaces.MethodCallUnregisterDigitalWalletDomain sdk; @@ -25,6 +32,18 @@ public UnregisterDigitalWalletDomainRequestBuilder digitalWalletId(String digita this.digitalWalletId = digitalWalletId; return this; } + + public UnregisterDigitalWalletDomainRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public UnregisterDigitalWalletDomainRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public UnregisterDigitalWalletDomainRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public UnregisterDigitalWalletDomainRequestBuilder digitalWalletDomain(DigitalWa } public UnregisterDigitalWalletDomainResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.delete( digitalWalletId, + applicationName, merchantAccountId, digitalWalletDomain); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequest.java index 1acb39c5..ee16e34b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.BuyerUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdateBuyerRequest { @@ -21,6 +24,9 @@ public class UpdateBuyerRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=buyer_id") private String buyerId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class UpdateBuyerRequest { @JsonCreator public UpdateBuyerRequest( String buyerId, + Optional applicationName, JsonNullable merchantAccountId, BuyerUpdate buyerUpdate) { Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(buyerUpdate, "buyerUpdate"); this.buyerId = buyerId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.buyerUpdate = buyerUpdate; } @@ -46,7 +55,7 @@ public UpdateBuyerRequest( public UpdateBuyerRequest( String buyerId, BuyerUpdate buyerUpdate) { - this(buyerId, JsonNullable.undefined(), buyerUpdate); + this(buyerId, Optional.empty(), JsonNullable.undefined(), buyerUpdate); } /** @@ -57,6 +66,11 @@ public String buyerId() { return buyerId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public UpdateBuyerRequest withBuyerId(String buyerId) { return this; } + public UpdateBuyerRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public UpdateBuyerRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { UpdateBuyerRequest other = (UpdateBuyerRequest) o; return Objects.deepEquals(this.buyerId, other.buyerId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.buyerUpdate, other.buyerUpdate); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( buyerId, + applicationName, merchantAccountId, buyerUpdate); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(UpdateBuyerRequest.class, "buyerId", buyerId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "buyerUpdate", buyerUpdate); } @@ -143,6 +172,8 @@ public final static class Builder { private String buyerId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private BuyerUpdate buyerUpdate; @@ -160,6 +191,18 @@ public Builder buyerId(String buyerId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder buyerUpdate(BuyerUpdate buyerUpdate) { } public UpdateBuyerRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new UpdateBuyerRequest( buyerId, + applicationName, merchantAccountId, buyerUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequestBuilder.java index a65d8c6b..23f86775 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.BuyerUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdateBuyerRequestBuilder { private String buyerId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private BuyerUpdate buyerUpdate; private final SDKMethodInterfaces.MethodCallUpdateBuyer sdk; @@ -25,6 +32,18 @@ public UpdateBuyerRequestBuilder buyerId(String buyerId) { this.buyerId = buyerId; return this; } + + public UpdateBuyerRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public UpdateBuyerRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public UpdateBuyerRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public UpdateBuyerRequestBuilder buyerUpdate(BuyerUpdate buyerUpdate) { } public UpdateBuyerResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.update( buyerId, + applicationName, merchantAccountId, buyerUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequest.java index 534c1399..767cb139 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.ShippingDetailsUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdateBuyerShippingDetailsRequest { @@ -27,6 +30,9 @@ public class UpdateBuyerShippingDetailsRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=shipping_details_id") private String shippingDetailsId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -40,14 +46,17 @@ public class UpdateBuyerShippingDetailsRequest { public UpdateBuyerShippingDetailsRequest( String buyerId, String shippingDetailsId, + Optional applicationName, JsonNullable merchantAccountId, ShippingDetailsUpdate shippingDetailsUpdate) { Utils.checkNotNull(buyerId, "buyerId"); Utils.checkNotNull(shippingDetailsId, "shippingDetailsId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(shippingDetailsUpdate, "shippingDetailsUpdate"); this.buyerId = buyerId; this.shippingDetailsId = shippingDetailsId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.shippingDetailsUpdate = shippingDetailsUpdate; } @@ -56,7 +65,7 @@ public UpdateBuyerShippingDetailsRequest( String buyerId, String shippingDetailsId, ShippingDetailsUpdate shippingDetailsUpdate) { - this(buyerId, shippingDetailsId, JsonNullable.undefined(), shippingDetailsUpdate); + this(buyerId, shippingDetailsId, Optional.empty(), JsonNullable.undefined(), shippingDetailsUpdate); } /** @@ -75,6 +84,11 @@ public String shippingDetailsId() { return shippingDetailsId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -110,6 +124,18 @@ public UpdateBuyerShippingDetailsRequest withShippingDetailsId(String shippingDe return this; } + public UpdateBuyerShippingDetailsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public UpdateBuyerShippingDetailsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -147,6 +173,7 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.buyerId, other.buyerId) && Objects.deepEquals(this.shippingDetailsId, other.shippingDetailsId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.shippingDetailsUpdate, other.shippingDetailsUpdate); } @@ -156,6 +183,7 @@ public int hashCode() { return Objects.hash( buyerId, shippingDetailsId, + applicationName, merchantAccountId, shippingDetailsUpdate); } @@ -165,6 +193,7 @@ public String toString() { return Utils.toString(UpdateBuyerShippingDetailsRequest.class, "buyerId", buyerId, "shippingDetailsId", shippingDetailsId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "shippingDetailsUpdate", shippingDetailsUpdate); } @@ -175,6 +204,8 @@ public final static class Builder { private String shippingDetailsId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private ShippingDetailsUpdate shippingDetailsUpdate; @@ -201,6 +232,18 @@ public Builder shippingDetailsId(String shippingDetailsId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -226,11 +269,21 @@ public Builder shippingDetailsUpdate(ShippingDetailsUpdate shippingDetailsUpdate } public UpdateBuyerShippingDetailsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new UpdateBuyerShippingDetailsRequest( buyerId, shippingDetailsId, + applicationName, merchantAccountId, shippingDetailsUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequestBuilder.java index 346af828..41e34997 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateBuyerShippingDetailsRequestBuilder.java @@ -3,60 +3,27 @@ */ package com.gr4vy.sdk.models.operations; -import com.gr4vy.sdk.models.components.ShippingDetailsUpdate; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; -import java.lang.String; -import org.openapitools.jackson.nullable.JsonNullable; public class UpdateBuyerShippingDetailsRequestBuilder { - private String buyerId; - private String shippingDetailsId; - private JsonNullable merchantAccountId = JsonNullable.undefined(); - private ShippingDetailsUpdate shippingDetailsUpdate; + private UpdateBuyerShippingDetailsRequest request; private final SDKMethodInterfaces.MethodCallUpdateBuyerShippingDetails sdk; public UpdateBuyerShippingDetailsRequestBuilder(SDKMethodInterfaces.MethodCallUpdateBuyerShippingDetails sdk) { this.sdk = sdk; } - public UpdateBuyerShippingDetailsRequestBuilder buyerId(String buyerId) { - Utils.checkNotNull(buyerId, "buyerId"); - this.buyerId = buyerId; - return this; - } - - public UpdateBuyerShippingDetailsRequestBuilder shippingDetailsId(String shippingDetailsId) { - Utils.checkNotNull(shippingDetailsId, "shippingDetailsId"); - this.shippingDetailsId = shippingDetailsId; - return this; - } - - public UpdateBuyerShippingDetailsRequestBuilder merchantAccountId(String merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = JsonNullable.of(merchantAccountId); - return this; - } - - public UpdateBuyerShippingDetailsRequestBuilder merchantAccountId(JsonNullable merchantAccountId) { - Utils.checkNotNull(merchantAccountId, "merchantAccountId"); - this.merchantAccountId = merchantAccountId; - return this; - } - - public UpdateBuyerShippingDetailsRequestBuilder shippingDetailsUpdate(ShippingDetailsUpdate shippingDetailsUpdate) { - Utils.checkNotNull(shippingDetailsUpdate, "shippingDetailsUpdate"); - this.shippingDetailsUpdate = shippingDetailsUpdate; + public UpdateBuyerShippingDetailsRequestBuilder request(UpdateBuyerShippingDetailsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } public UpdateBuyerShippingDetailsResponse call() throws Exception { return sdk.update( - buyerId, - shippingDetailsId, - merchantAccountId, - shippingDetailsUpdate); + request); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequest.java index c9c3532d..8b63cb64 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.CheckoutSessionCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdateCheckoutSessionRequest { @@ -21,6 +24,9 @@ public class UpdateCheckoutSessionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=session_id") private String sessionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class UpdateCheckoutSessionRequest { @JsonCreator public UpdateCheckoutSessionRequest( String sessionId, + Optional applicationName, JsonNullable merchantAccountId, CheckoutSessionCreate checkoutSessionCreate) { Utils.checkNotNull(sessionId, "sessionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(checkoutSessionCreate, "checkoutSessionCreate"); this.sessionId = sessionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.checkoutSessionCreate = checkoutSessionCreate; } @@ -46,7 +55,7 @@ public UpdateCheckoutSessionRequest( public UpdateCheckoutSessionRequest( String sessionId, CheckoutSessionCreate checkoutSessionCreate) { - this(sessionId, JsonNullable.undefined(), checkoutSessionCreate); + this(sessionId, Optional.empty(), JsonNullable.undefined(), checkoutSessionCreate); } /** @@ -57,6 +66,11 @@ public String sessionId() { return sessionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public UpdateCheckoutSessionRequest withSessionId(String sessionId) { return this; } + public UpdateCheckoutSessionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public UpdateCheckoutSessionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { UpdateCheckoutSessionRequest other = (UpdateCheckoutSessionRequest) o; return Objects.deepEquals(this.sessionId, other.sessionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.checkoutSessionCreate, other.checkoutSessionCreate); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( sessionId, + applicationName, merchantAccountId, checkoutSessionCreate); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(UpdateCheckoutSessionRequest.class, "sessionId", sessionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "checkoutSessionCreate", checkoutSessionCreate); } @@ -143,6 +172,8 @@ public final static class Builder { private String sessionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private CheckoutSessionCreate checkoutSessionCreate; @@ -160,6 +191,18 @@ public Builder sessionId(String sessionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder checkoutSessionCreate(CheckoutSessionCreate checkoutSessionCreate } public UpdateCheckoutSessionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new UpdateCheckoutSessionRequest( sessionId, + applicationName, merchantAccountId, checkoutSessionCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequestBuilder.java index 71e04ce4..d823b2b1 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateCheckoutSessionRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.CheckoutSessionCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdateCheckoutSessionRequestBuilder { private String sessionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private CheckoutSessionCreate checkoutSessionCreate; private final SDKMethodInterfaces.MethodCallUpdateCheckoutSession sdk; @@ -25,6 +32,18 @@ public UpdateCheckoutSessionRequestBuilder sessionId(String sessionId) { this.sessionId = sessionId; return this; } + + public UpdateCheckoutSessionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public UpdateCheckoutSessionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public UpdateCheckoutSessionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public UpdateCheckoutSessionRequestBuilder checkoutSessionCreate(CheckoutSession } public UpdateCheckoutSessionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.update( sessionId, + applicationName, merchantAccountId, checkoutSessionCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequest.java index ca10a608..b7ae937e 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdateDigitalWalletRequest { @@ -21,6 +24,9 @@ public class UpdateDigitalWalletRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=digital_wallet_id") private String digitalWalletId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -33,12 +39,15 @@ public class UpdateDigitalWalletRequest { @JsonCreator public UpdateDigitalWalletRequest( String digitalWalletId, + Optional applicationName, JsonNullable merchantAccountId, DigitalWalletUpdate digitalWalletUpdate) { Utils.checkNotNull(digitalWalletId, "digitalWalletId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(digitalWalletUpdate, "digitalWalletUpdate"); this.digitalWalletId = digitalWalletId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.digitalWalletUpdate = digitalWalletUpdate; } @@ -46,7 +55,7 @@ public UpdateDigitalWalletRequest( public UpdateDigitalWalletRequest( String digitalWalletId, DigitalWalletUpdate digitalWalletUpdate) { - this(digitalWalletId, JsonNullable.undefined(), digitalWalletUpdate); + this(digitalWalletId, Optional.empty(), JsonNullable.undefined(), digitalWalletUpdate); } /** @@ -57,6 +66,11 @@ public String digitalWalletId() { return digitalWalletId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -83,6 +97,18 @@ public UpdateDigitalWalletRequest withDigitalWalletId(String digitalWalletId) { return this; } + public UpdateDigitalWalletRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public UpdateDigitalWalletRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -119,6 +145,7 @@ public boolean equals(java.lang.Object o) { UpdateDigitalWalletRequest other = (UpdateDigitalWalletRequest) o; return Objects.deepEquals(this.digitalWalletId, other.digitalWalletId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.digitalWalletUpdate, other.digitalWalletUpdate); } @@ -127,6 +154,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( digitalWalletId, + applicationName, merchantAccountId, digitalWalletUpdate); } @@ -135,6 +163,7 @@ public int hashCode() { public String toString() { return Utils.toString(UpdateDigitalWalletRequest.class, "digitalWalletId", digitalWalletId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "digitalWalletUpdate", digitalWalletUpdate); } @@ -143,6 +172,8 @@ public final static class Builder { private String digitalWalletId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletUpdate digitalWalletUpdate; @@ -160,6 +191,18 @@ public Builder digitalWalletId(String digitalWalletId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -185,10 +228,20 @@ public Builder digitalWalletUpdate(DigitalWalletUpdate digitalWalletUpdate) { } public UpdateDigitalWalletRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new UpdateDigitalWalletRequest( digitalWalletId, + applicationName, merchantAccountId, digitalWalletUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequestBuilder.java index 92e0702e..afdd3e20 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateDigitalWalletRequestBuilder.java @@ -3,15 +3,22 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.DigitalWalletUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdateDigitalWalletRequestBuilder { private String digitalWalletId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private DigitalWalletUpdate digitalWalletUpdate; private final SDKMethodInterfaces.MethodCallUpdateDigitalWallet sdk; @@ -25,6 +32,18 @@ public UpdateDigitalWalletRequestBuilder digitalWalletId(String digitalWalletId) this.digitalWalletId = digitalWalletId; return this; } + + public UpdateDigitalWalletRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public UpdateDigitalWalletRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public UpdateDigitalWalletRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -45,10 +64,19 @@ public UpdateDigitalWalletRequestBuilder digitalWalletUpdate(DigitalWalletUpdate } public UpdateDigitalWalletResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.update( digitalWalletId, + applicationName, merchantAccountId, digitalWalletUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequest.java index 83a4b5a8..a240ef27 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequest.java @@ -5,12 +5,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.MerchantAccountUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; public class UpdateMerchantAccountRequest { @@ -20,18 +23,30 @@ public class UpdateMerchantAccountRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=merchant_account_id") private String merchantAccountId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + @SpeakeasyMetadata("request:mediaType=application/json") private MerchantAccountUpdate merchantAccountUpdate; @JsonCreator public UpdateMerchantAccountRequest( String merchantAccountId, + Optional applicationName, MerchantAccountUpdate merchantAccountUpdate) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountUpdate, "merchantAccountUpdate"); this.merchantAccountId = merchantAccountId; + this.applicationName = applicationName; this.merchantAccountUpdate = merchantAccountUpdate; } + + public UpdateMerchantAccountRequest( + String merchantAccountId, + MerchantAccountUpdate merchantAccountUpdate) { + this(merchantAccountId, Optional.empty(), merchantAccountUpdate); + } /** * The ID of the merchant account @@ -41,6 +56,11 @@ public String merchantAccountId() { return merchantAccountId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + @JsonIgnore public MerchantAccountUpdate merchantAccountUpdate() { return merchantAccountUpdate; @@ -59,6 +79,18 @@ public UpdateMerchantAccountRequest withMerchantAccountId(String merchantAccount return this; } + public UpdateMerchantAccountRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public UpdateMerchantAccountRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public UpdateMerchantAccountRequest withMerchantAccountUpdate(MerchantAccountUpdate merchantAccountUpdate) { Utils.checkNotNull(merchantAccountUpdate, "merchantAccountUpdate"); this.merchantAccountUpdate = merchantAccountUpdate; @@ -77,6 +109,7 @@ public boolean equals(java.lang.Object o) { UpdateMerchantAccountRequest other = (UpdateMerchantAccountRequest) o; return Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountUpdate, other.merchantAccountUpdate); } @@ -84,6 +117,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( merchantAccountId, + applicationName, merchantAccountUpdate); } @@ -91,6 +125,7 @@ public int hashCode() { public String toString() { return Utils.toString(UpdateMerchantAccountRequest.class, "merchantAccountId", merchantAccountId, + "applicationName", applicationName, "merchantAccountUpdate", merchantAccountUpdate); } @@ -98,6 +133,8 @@ public final static class Builder { private String merchantAccountId; + private Optional applicationName; + private MerchantAccountUpdate merchantAccountUpdate; private Builder() { @@ -113,6 +150,18 @@ public Builder merchantAccountId(String merchantAccountId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + public Builder merchantAccountUpdate(MerchantAccountUpdate merchantAccountUpdate) { Utils.checkNotNull(merchantAccountUpdate, "merchantAccountUpdate"); this.merchantAccountUpdate = merchantAccountUpdate; @@ -120,9 +169,19 @@ public Builder merchantAccountUpdate(MerchantAccountUpdate merchantAccountUpdate } public UpdateMerchantAccountRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new UpdateMerchantAccountRequest( merchantAccountId, + applicationName, merchantAccountUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequestBuilder.java index f8d7a3c4..425151d0 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdateMerchantAccountRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.MerchantAccountUpdate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; public class UpdateMerchantAccountRequestBuilder { private String merchantAccountId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private MerchantAccountUpdate merchantAccountUpdate; private final SDKMethodInterfaces.MethodCallUpdateMerchantAccount sdk; @@ -23,6 +30,18 @@ public UpdateMerchantAccountRequestBuilder merchantAccountId(String merchantAcco this.merchantAccountId = merchantAccountId; return this; } + + public UpdateMerchantAccountRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public UpdateMerchantAccountRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public UpdateMerchantAccountRequestBuilder merchantAccountUpdate(MerchantAccountUpdate merchantAccountUpdate) { Utils.checkNotNull(merchantAccountUpdate, "merchantAccountUpdate"); @@ -31,9 +50,18 @@ public UpdateMerchantAccountRequestBuilder merchantAccountUpdate(MerchantAccount } public UpdateMerchantAccountResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.update( merchantAccountId, + applicationName, merchantAccountUpdate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java index 368542c5..0caf907b 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentServiceCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdatePaymentServiceRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class UpdatePaymentServiceRequest { @JsonCreator public UpdatePaymentServiceRequest( + Optional applicationName, JsonNullable merchantAccountId, PaymentServiceCreate paymentServiceCreate) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(paymentServiceCreate, "paymentServiceCreate"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.paymentServiceCreate = paymentServiceCreate; } public UpdatePaymentServiceRequest( PaymentServiceCreate paymentServiceCreate) { - this(JsonNullable.undefined(), paymentServiceCreate); + this(Optional.empty(), JsonNullable.undefined(), paymentServiceCreate); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public UpdatePaymentServiceRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public UpdatePaymentServiceRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } UpdatePaymentServiceRequest other = (UpdatePaymentServiceRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.paymentServiceCreate, other.paymentServiceCreate); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, paymentServiceCreate); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(UpdatePaymentServiceRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "paymentServiceCreate", paymentServiceCreate); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentServiceCreate paymentServiceCreate; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder paymentServiceCreate(PaymentServiceCreate paymentServiceCreate) { } public UpdatePaymentServiceRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new UpdatePaymentServiceRequest( + applicationName, merchantAccountId, paymentServiceCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java index da9cf837..6e80ef4a 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/UpdatePaymentServiceRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.PaymentServiceCreate; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class UpdatePaymentServiceRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private PaymentServiceCreate paymentServiceCreate; private final SDKMethodInterfaces.MethodCallUpdatePaymentService sdk; @@ -18,6 +25,18 @@ public class UpdatePaymentServiceRequestBuilder { public UpdatePaymentServiceRequestBuilder(SDKMethodInterfaces.MethodCallUpdatePaymentService sdk) { this.sdk = sdk; } + + public UpdatePaymentServiceRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public UpdatePaymentServiceRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public UpdatePaymentServiceRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public UpdatePaymentServiceRequestBuilder paymentServiceCreate(PaymentServiceCre } public UpdatePaymentServiceResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.create( + applicationName, merchantAccountId, paymentServiceCreate); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequest.java index 5e81b495..3e5b92b0 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequest.java @@ -5,16 +5,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.VerifyCredentials; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class VerifyPaymentServiceCredentialsRequest { + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,17 +32,25 @@ public class VerifyPaymentServiceCredentialsRequest { @JsonCreator public VerifyPaymentServiceCredentialsRequest( + Optional applicationName, JsonNullable merchantAccountId, VerifyCredentials verifyCredentials) { + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); Utils.checkNotNull(verifyCredentials, "verifyCredentials"); + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; this.verifyCredentials = verifyCredentials; } public VerifyPaymentServiceCredentialsRequest( VerifyCredentials verifyCredentials) { - this(JsonNullable.undefined(), verifyCredentials); + this(Optional.empty(), JsonNullable.undefined(), verifyCredentials); + } + + @JsonIgnore + public Optional applicationName() { + return applicationName; } /** @@ -56,6 +70,18 @@ public final static Builder builder() { return new Builder(); } + public VerifyPaymentServiceCredentialsRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public VerifyPaymentServiceCredentialsRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { } VerifyPaymentServiceCredentialsRequest other = (VerifyPaymentServiceCredentialsRequest) o; return + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId) && Objects.deepEquals(this.verifyCredentials, other.verifyCredentials); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + applicationName, merchantAccountId, verifyCredentials); } @@ -105,12 +133,15 @@ public int hashCode() { @Override public String toString() { return Utils.toString(VerifyPaymentServiceCredentialsRequest.class, + "applicationName", applicationName, "merchantAccountId", merchantAccountId, "verifyCredentials", verifyCredentials); } public final static class Builder { + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private VerifyCredentials verifyCredentials; @@ -119,6 +150,18 @@ private Builder() { // force use of static builder() method } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -144,9 +187,19 @@ public Builder verifyCredentials(VerifyCredentials verifyCredentials) { } public VerifyPaymentServiceCredentialsRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new VerifyPaymentServiceCredentialsRequest( + applicationName, merchantAccountId, verifyCredentials); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequestBuilder.java index 58230e33..35c38290 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/VerifyPaymentServiceCredentialsRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; import com.gr4vy.sdk.models.components.VerifyCredentials; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class VerifyPaymentServiceCredentialsRequestBuilder { + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private VerifyCredentials verifyCredentials; private final SDKMethodInterfaces.MethodCallVerifyPaymentServiceCredentials sdk; @@ -18,6 +25,18 @@ public class VerifyPaymentServiceCredentialsRequestBuilder { public VerifyPaymentServiceCredentialsRequestBuilder(SDKMethodInterfaces.MethodCallVerifyPaymentServiceCredentials sdk) { this.sdk = sdk; } + + public VerifyPaymentServiceCredentialsRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public VerifyPaymentServiceCredentialsRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public VerifyPaymentServiceCredentialsRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -38,9 +57,18 @@ public VerifyPaymentServiceCredentialsRequestBuilder verifyCredentials(VerifyCre } public VerifyPaymentServiceCredentialsResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.verify( + applicationName, merchantAccountId, verifyCredentials); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequest.java index 5887c79f..1938d113 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequest.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequest.java @@ -5,11 +5,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.SpeakeasyMetadata; import com.gr4vy.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class VoidTransactionRequest { @@ -17,6 +20,9 @@ public class VoidTransactionRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transaction_id") private String transactionId; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=application_name") + private Optional applicationName; + /** * The ID of the merchant account to use for this request. */ @@ -26,16 +32,19 @@ public class VoidTransactionRequest { @JsonCreator public VoidTransactionRequest( String transactionId, + Optional applicationName, JsonNullable merchantAccountId) { Utils.checkNotNull(transactionId, "transactionId"); + Utils.checkNotNull(applicationName, "applicationName"); Utils.checkNotNull(merchantAccountId, "merchantAccountId"); this.transactionId = transactionId; + this.applicationName = applicationName; this.merchantAccountId = merchantAccountId; } public VoidTransactionRequest( String transactionId) { - this(transactionId, JsonNullable.undefined()); + this(transactionId, Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -43,6 +52,11 @@ public String transactionId() { return transactionId; } + @JsonIgnore + public Optional applicationName() { + return applicationName; + } + /** * The ID of the merchant account to use for this request. */ @@ -61,6 +75,18 @@ public VoidTransactionRequest withTransactionId(String transactionId) { return this; } + public VoidTransactionRequest withApplicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public VoidTransactionRequest withApplicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -91,6 +117,7 @@ public boolean equals(java.lang.Object o) { VoidTransactionRequest other = (VoidTransactionRequest) o; return Objects.deepEquals(this.transactionId, other.transactionId) && + Objects.deepEquals(this.applicationName, other.applicationName) && Objects.deepEquals(this.merchantAccountId, other.merchantAccountId); } @@ -98,6 +125,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( transactionId, + applicationName, merchantAccountId); } @@ -105,6 +133,7 @@ public int hashCode() { public String toString() { return Utils.toString(VoidTransactionRequest.class, "transactionId", transactionId, + "applicationName", applicationName, "merchantAccountId", merchantAccountId); } @@ -112,6 +141,8 @@ public final static class Builder { private String transactionId; + private Optional applicationName; + private JsonNullable merchantAccountId = JsonNullable.undefined(); private Builder() { @@ -124,6 +155,18 @@ public Builder transactionId(String transactionId) { return this; } + public Builder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.ofNullable(applicationName); + return this; + } + + public Builder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } + /** * The ID of the merchant account to use for this request. */ @@ -143,9 +186,19 @@ public Builder merchantAccountId(JsonNullable merchantAccountId) { } public VoidTransactionRequest build() { + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return new VoidTransactionRequest( transactionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "application_name", + "\"core-api\"", + new TypeReference>() {}); } } diff --git a/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequestBuilder.java index e59542ab..c447b7e9 100644 --- a/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequestBuilder.java +++ b/src/main/java/com/gr4vy/sdk/models/operations/VoidTransactionRequestBuilder.java @@ -3,14 +3,21 @@ */ package com.gr4vy.sdk.models.operations; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; import com.gr4vy.sdk.utils.Utils; import java.lang.Exception; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; public class VoidTransactionRequestBuilder { private String transactionId; + private Optional applicationName = Utils.readDefaultOrConstValue( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); private JsonNullable merchantAccountId = JsonNullable.undefined(); private final SDKMethodInterfaces.MethodCallVoidTransaction sdk; @@ -23,6 +30,18 @@ public VoidTransactionRequestBuilder transactionId(String transactionId) { this.transactionId = transactionId; return this; } + + public VoidTransactionRequestBuilder applicationName(String applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = Optional.of(applicationName); + return this; + } + + public VoidTransactionRequestBuilder applicationName(Optional applicationName) { + Utils.checkNotNull(applicationName, "applicationName"); + this.applicationName = applicationName; + return this; + } public VoidTransactionRequestBuilder merchantAccountId(String merchantAccountId) { Utils.checkNotNull(merchantAccountId, "merchantAccountId"); @@ -37,9 +56,18 @@ public VoidTransactionRequestBuilder merchantAccountId(JsonNullable merc } public VoidTransactionResponse call() throws Exception { - + if (applicationName == null) { + applicationName = _SINGLETON_VALUE_ApplicationName.value(); + } return sdk.void_( transactionId, + applicationName, merchantAccountId); } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApplicationName = + new LazySingletonValue<>( + "applicationName", + "\"core-api\"", + new TypeReference>() {}); } From 478a0705f8c2b0cddc4bc70e04e25d935bedeec1 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:44:50 +0000 Subject: [PATCH 2/3] empty commit to trigger [run-tests] workflow From 6184e99e68fab41a63c089da0be9bc759f64508a Mon Sep 17 00:00:00 2001 From: Cristiano Betta Date: Tue, 3 Jun 2025 12:11:31 +0100 Subject: [PATCH 3/3] Fix tests --- gradlew.bat | 184 +++++++++--------- .../java/com/gr4vy/sdk/util/BaseTest.java | 2 +- 2 files changed, 93 insertions(+), 93 deletions(-) diff --git a/gradlew.bat b/gradlew.bat index 6689b85b..93e3f59f 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,92 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/test/java/com/gr4vy/sdk/util/BaseTest.java b/src/test/java/com/gr4vy/sdk/util/BaseTest.java index 29191674..a95a5828 100644 --- a/src/test/java/com/gr4vy/sdk/util/BaseTest.java +++ b/src/test/java/com/gr4vy/sdk/util/BaseTest.java @@ -84,7 +84,7 @@ protected void setupEnvironment() throws Exception { Gr4vy gr4vyAdminClient = createGr4vyClient(privateKey); String merchantAccountId = generateRandomMerchantId(8); CreateMerchantAccountResponse res = gr4vyAdminClient.merchantAccounts().create() - .request(MerchantAccountCreate.builder() + .merchantAccountCreate(MerchantAccountCreate.builder() .id(merchantAccountId) .displayName(merchantAccountId) .build())