From 273849d3de0d77ceb156066655711b890349b568 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 6 Nov 2023 00:40:20 +0000 Subject: [PATCH 01/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.112.1 --- .gitattributes | 2 + .gitignore | 1 + README.md | 386 +++++--- RELEASES.md | 12 +- USAGE.md | 36 +- accounts.go | 173 ++-- balances.go | 101 ++- clients.go | 280 ++++-- .../operations/activateconfigrequest.md | 8 + .../operations/activateconfigresponse.md | 11 + .../addmetadataontransactionrequest.md | 10 + .../addmetadataontransactionresponse.md | 11 + .../operations/addmetadatatoaccountrequest.md | 10 + .../addmetadatatoaccountresponse.md | 11 + .../operations/addscopetoclientrequest.md | 9 + .../operations/addscopetoclientresponse.md | 10 + .../operations/addtransientscoperequest.md | 9 + .../operations/addtransientscoperesponse.md | 10 + .../operations/changeconfigsecretrequest.md | 9 + .../operations/changeconfigsecretresponse.md | 11 + docs/models/operations/confirmholdrequest.md | 9 + docs/models/operations/confirmholdresponse.md | 11 + .../connectorsstripetransferresponse.md | 11 + .../operations/countaccountsmetadata.md | 9 + .../models/operations/countaccountsrequest.md | 10 + .../operations/countaccountsresponse.md | 12 + .../operations/counttransactionsmetadata.md | 9 + .../operations/counttransactionsrequest.md | 17 + .../operations/counttransactionsresponse.md | 12 + .../models/operations/createbalancerequest.md | 9 + .../operations/createbalanceresponse.md | 12 + .../models/operations/createclientresponse.md | 11 + docs/models/operations/createscoperesponse.md | 11 + docs/models/operations/createsecretrequest.md | 9 + .../models/operations/createsecretresponse.md | 11 + .../operations/createtransactionrequest.md | 10 + .../operations/createtransactionresponse.md | 12 + .../operations/createtransactionsrequest.md | 9 + .../operations/createtransactionsresponse.md | 12 + .../models/operations/createwalletresponse.md | 12 + .../operations/createworkflowresponse.md | 12 + docs/models/operations/creditwalletrequest.md | 9 + .../models/operations/creditwalletresponse.md | 11 + .../operations/deactivateconfigrequest.md | 8 + .../operations/deactivateconfigresponse.md | 11 + docs/models/operations/debitwalletrequest.md | 9 + docs/models/operations/debitwalletresponse.md | 12 + docs/models/operations/deleteclientrequest.md | 8 + .../models/operations/deleteclientresponse.md | 10 + docs/models/operations/deleteconfigrequest.md | 8 + .../models/operations/deleteconfigresponse.md | 10 + .../deletescopefromclientrequest.md | 9 + .../deletescopefromclientresponse.md | 10 + docs/models/operations/deletescoperequest.md | 8 + docs/models/operations/deletescoperesponse.md | 10 + docs/models/operations/deletesecretrequest.md | 9 + .../models/operations/deletesecretresponse.md | 10 + .../operations/deletetransientscoperequest.md | 9 + .../deletetransientscoperesponse.md | 10 + docs/models/operations/getaccountrequest.md | 9 + docs/models/operations/getaccountresponse.md | 12 + docs/models/operations/getbalancerequest.md | 9 + docs/models/operations/getbalanceresponse.md | 12 + .../getbalancesaggregatedrequest.md | 9 + .../getbalancesaggregatedresponse.md | 12 + docs/models/operations/getbalancesrequest.md | 12 + docs/models/operations/getbalancesresponse.md | 12 + .../operations/getconnectortaskrequest.md | 9 + .../operations/getconnectortaskresponse.md | 11 + docs/models/operations/getflowrequest.md | 8 + docs/models/operations/getflowresponse.md | 12 + docs/models/operations/getholdrequest.md | 8 + docs/models/operations/getholdresponse.md | 12 + docs/models/operations/getholdsmetadata.md | 9 + docs/models/operations/getholdsrequest.md | 11 + docs/models/operations/getholdsresponse.md | 12 + docs/models/operations/getinforesponse.md | 12 + .../models/operations/getledgerinforequest.md | 8 + .../operations/getledgerinforesponse.md | 12 + .../operations/getmanyconfigsrequest.md | 9 + .../operations/getmanyconfigsresponse.md | 11 + docs/models/operations/getmappingrequest.md | 8 + docs/models/operations/getmappingresponse.md | 12 + docs/models/operations/getpaymentrequest.md | 8 + docs/models/operations/getpaymentresponse.md | 11 + .../operations/getserverinforesponse.md | 11 + .../operations/gettransactionrequest.md | 9 + .../operations/gettransactionresponse.md | 12 + .../operations/gettransactionsrequest.md | 10 + .../operations/gettransactionsresponse.md | 12 + docs/models/operations/getwalletrequest.md | 8 + docs/models/operations/getwalletresponse.md | 12 + .../getworkflowoccurrencerequest.md | 9 + .../getworkflowoccurrenceresponse.md | 12 + .../models/operations/insertconfigresponse.md | 12 + .../operations/installconnectorrequest.md | 9 + .../operations/installconnectorresponse.md | 10 + .../operations/listaccountsbalanceoperator.md | 16 + .../models/operations/listaccountsmetadata.md | 9 + docs/models/operations/listaccountsrequest.md | 18 + .../models/operations/listaccountsresponse.md | 12 + .../operations/listallconnectorsresponse.md | 11 + docs/models/operations/listbalancesrequest.md | 8 + .../models/operations/listbalancesresponse.md | 11 + docs/models/operations/listclientsresponse.md | 11 + .../listconfigsavailableconnectorsresponse.md | 11 + .../operations/listconnectortasksrequest.md | 10 + .../operations/listconnectortasksresponse.md | 11 + docs/models/operations/listflowsresponse.md | 12 + docs/models/operations/listlogsrequest.md | 17 + docs/models/operations/listlogsresponse.md | 12 + docs/models/operations/listpaymentsrequest.md | 10 + .../models/operations/listpaymentsresponse.md | 11 + docs/models/operations/listrunsrequest.md | 8 + docs/models/operations/listrunsresponse.md | 12 + docs/models/operations/listscopesresponse.md | 11 + .../operations/listtransactionsmetadata.md | 9 + .../operations/listtransactionsrequest.md | 22 + .../operations/listtransactionsresponse.md | 12 + docs/models/operations/listusersresponse.md | 11 + docs/models/operations/listwalletsmetadata.md | 9 + docs/models/operations/listwalletsrequest.md | 11 + docs/models/operations/listwalletsresponse.md | 11 + .../orchestrationgetserverinforesponse.md | 12 + .../paymentsgetserverinforesponse.md | 11 + .../operations/paymentslistaccountsrequest.md | 10 + .../paymentslistaccountsresponse.md | 11 + docs/models/operations/readclientrequest.md | 8 + docs/models/operations/readclientresponse.md | 11 + .../operations/readconnectorconfigrequest.md | 8 + .../operations/readconnectorconfigresponse.md | 11 + docs/models/operations/readscoperequest.md | 8 + docs/models/operations/readscoperesponse.md | 11 + docs/models/operations/readstatsrequest.md | 8 + docs/models/operations/readstatsresponse.md | 12 + docs/models/operations/readuserrequest.md | 8 + docs/models/operations/readuserresponse.md | 11 + .../operations/resetconnectorrequest.md | 8 + .../operations/resetconnectorresponse.md | 10 + .../operations/reverttransactionrequest.md | 9 + .../operations/reverttransactionresponse.md | 12 + docs/models/operations/runscriptrequest.md | 10 + docs/models/operations/runscriptresponse.md | 11 + docs/models/operations/runworkflowrequest.md | 10 + docs/models/operations/runworkflowresponse.md | 12 + .../operations/searchgetserverinforesponse.md | 11 + docs/models/operations/searchresponse.md | 11 + docs/models/operations/testconfigrequest.md | 8 + docs/models/operations/testconfigresponse.md | 11 + .../operations/uninstallconnectorrequest.md | 8 + .../operations/uninstallconnectorresponse.md | 10 + docs/models/operations/updateclientrequest.md | 9 + .../models/operations/updateclientresponse.md | 11 + .../models/operations/updatemappingrequest.md | 9 + .../operations/updatemappingresponse.md | 12 + docs/models/operations/updatescoperequest.md | 9 + docs/models/operations/updatescoperesponse.md | 11 + docs/models/operations/updatewalletrequest.md | 9 + .../operations/updatewalletrequestbody.md | 8 + .../models/operations/updatewalletresponse.md | 11 + docs/models/operations/voidholdrequest.md | 8 + docs/models/operations/voidholdresponse.md | 11 + .../walletsgetserverinforesponse.md | 12 + docs/models/shared/account.md | 10 + docs/models/shared/accountmetadata.md | 7 + docs/models/shared/accountresponse.md | 8 + docs/models/shared/accountscursor.md | 8 + docs/models/shared/accountscursorcursor.md | 12 + docs/models/shared/accountscursorresponse.md | 8 + .../shared/accountscursorresponsecursor.md | 12 + .../shared/accountwithvolumesandbalances.md | 12 + .../accountwithvolumesandbalancesmetadata.md | 7 + .../shared/aggregatebalancesresponse.md | 8 + docs/models/shared/assetholder.md | 8 + docs/models/shared/attempt.md | 17 + docs/models/shared/attemptresponse.md | 8 + docs/models/shared/balance.md | 8 + docs/models/shared/balancescursorresponse.md | 8 + .../shared/balancescursorresponsecursor.md | 12 + docs/models/shared/balancewithassets.md | 9 + docs/models/shared/bankingcircleconfig.md | 11 + docs/models/shared/client.md | 17 + docs/models/shared/clientsecret.md | 11 + docs/models/shared/config.md | 8 + docs/models/shared/configchangesecret.md | 8 + docs/models/shared/configinfo.md | 10 + docs/models/shared/configinforesponse.md | 8 + docs/models/shared/configresponse.md | 8 + docs/models/shared/configsresponse.md | 8 + docs/models/shared/configsresponsecursor.md | 12 + docs/models/shared/configuser.md | 10 + docs/models/shared/confirmholdrequest.md | 9 + docs/models/shared/connector.md | 13 + docs/models/shared/connectorconfig.md | 41 + docs/models/shared/connectorconfigresponse.md | 8 + .../shared/connectorsconfigsresponse.md | 8 + .../shared/connectorsconfigsresponsedata.md | 8 + .../connectorsconfigsresponsedataconnector.md | 8 + ...nnectorsconfigsresponsedataconnectorkey.md | 9 + docs/models/shared/connectorsresponse.md | 8 + docs/models/shared/connectorsresponsedata.md | 9 + docs/models/shared/contract.md | 9 + docs/models/shared/contractexpr.md | 7 + docs/models/shared/createbalancerequest.md | 8 + docs/models/shared/createbalanceresponse.md | 8 + docs/models/shared/createclientrequest.md | 14 + docs/models/shared/createclientresponse.md | 8 + docs/models/shared/createscoperequest.md | 9 + docs/models/shared/createscoperesponse.md | 8 + docs/models/shared/createsecretrequest.md | 9 + docs/models/shared/createsecretresponse.md | 8 + docs/models/shared/createwalletrequest.md | 9 + docs/models/shared/createwalletresponse.md | 8 + docs/models/shared/createworkflowrequest.md | 8 + docs/models/shared/createworkflowresponse.md | 8 + docs/models/shared/creditwalletrequest.md | 12 + docs/models/shared/currencycloudconfig.md | 11 + docs/models/shared/debitwalletrequest.md | 13 + docs/models/shared/debitwalletresponse.md | 8 + docs/models/shared/dummypayconfig.md | 10 + docs/models/shared/error.md | 9 + docs/models/shared/errorerrorcode.md | 8 + docs/models/shared/errorresponse.md | 10 + docs/models/shared/errorsenum.md | 14 + docs/models/shared/expandeddebithold.md | 14 + docs/models/shared/getbalanceresponse.md | 8 + docs/models/shared/getholdresponse.md | 8 + docs/models/shared/getholdsresponse.md | 8 + docs/models/shared/getholdsresponsecursor.md | 12 + docs/models/shared/gettransactionsresponse.md | 8 + .../shared/gettransactionsresponsecursor.md | 12 + docs/models/shared/getwalletresponse.md | 8 + .../shared/getworkflowoccurrenceresponse.md | 8 + docs/models/shared/getworkflowresponse.md | 8 + docs/models/shared/hold.md | 12 + docs/models/shared/ledgeraccountsubject.md | 9 + docs/models/shared/ledgerinfo.md | 9 + docs/models/shared/ledgerinforesponse.md | 8 + docs/models/shared/ledgerinfostorage.md | 8 + docs/models/shared/ledgerstorage.md | 9 + docs/models/shared/listbalancesresponse.md | 8 + .../shared/listbalancesresponsecursor.md | 12 + docs/models/shared/listclientsresponse.md | 8 + docs/models/shared/listrunsresponse.md | 8 + docs/models/shared/listrunsresponsecursor.md | 12 + docs/models/shared/listscopesresponse.md | 8 + docs/models/shared/listusersresponse.md | 8 + docs/models/shared/listwalletsresponse.md | 8 + .../shared/listwalletsresponsecursor.md | 12 + docs/models/shared/listworkflowsresponse.md | 8 + docs/models/shared/log.md | 12 + docs/models/shared/logdata.md | 7 + docs/models/shared/logscursorresponse.md | 8 + .../models/shared/logscursorresponsecursor.md | 12 + docs/models/shared/logtype.md | 9 + docs/models/shared/mapping.md | 8 + docs/models/shared/mappingresponse.md | 8 + docs/models/shared/migrationinfo.md | 11 + docs/models/shared/migrationinfostate.md | 9 + docs/models/shared/modulrconfig.md | 10 + docs/models/shared/monetary.md | 9 + docs/models/shared/payment.md | 20 + docs/models/shared/paymentadjustment.md | 12 + docs/models/shared/paymentadjustmentraw.md | 7 + docs/models/shared/paymentmetadata.md | 10 + .../models/shared/paymentmetadatachangelog.md | 9 + docs/models/shared/paymentraw.md | 7 + docs/models/shared/paymentresponse.md | 8 + docs/models/shared/paymentsaccount.md | 12 + docs/models/shared/paymentsaccounttype.md | 9 + docs/models/shared/paymentscheme.md | 25 + docs/models/shared/paymentscursor.md | 8 + docs/models/shared/paymentscursorcursor.md | 12 + docs/models/shared/paymentstatus.md | 11 + docs/models/shared/paymenttype.md | 11 + docs/models/shared/posting.md | 11 + docs/models/shared/posttransaction.md | 12 + docs/models/shared/posttransactionscript.md | 9 + .../shared/posttransactionscriptvars.md | 7 + docs/models/shared/query.md | 15 + docs/models/shared/readclientresponse.md | 8 + docs/models/shared/readscoperesponse.md | 8 + docs/models/shared/readuserresponse.md | 8 + docs/models/shared/response.md | 9 + docs/models/shared/responsecursor.md | 13 + docs/models/shared/responsecursordata.md | 7 + docs/models/shared/responsecursortotal.md | 9 + docs/models/shared/responsedata.md | 9 + docs/models/shared/runworkflowresponse.md | 8 + docs/models/shared/scope.md | 11 + docs/models/shared/script.md | 11 + docs/models/shared/scriptresponse.md | 11 + docs/models/shared/scriptvars.md | 7 + docs/models/shared/secret.md | 12 + docs/models/shared/security.md | 8 + docs/models/shared/serverinfo.md | 8 + docs/models/shared/stagestatus.md | 12 + docs/models/shared/stats.md | 9 + docs/models/shared/statsresponse.md | 8 + docs/models/shared/stripeconfig.md | 10 + docs/models/shared/stripetransferrequest.md | 11 + .../shared/stripetransferrequestmetadata.md | 11 + docs/models/shared/stripetransferresponse.md | 7 + docs/models/shared/subject.md | 17 + docs/models/shared/taskbankingcircle.md | 15 + .../shared/taskbankingcircledescriptor.md | 9 + docs/models/shared/taskbankingcirclestate.md | 7 + docs/models/shared/taskcurrencycloud.md | 15 + .../shared/taskcurrencyclouddescriptor.md | 8 + docs/models/shared/taskcurrencycloudstate.md | 7 + docs/models/shared/taskdummypay.md | 15 + docs/models/shared/taskdummypaydescriptor.md | 10 + docs/models/shared/taskdummypaystate.md | 7 + docs/models/shared/taskmodulr.md | 15 + docs/models/shared/taskmodulrdescriptor.md | 10 + docs/models/shared/taskmodulrstate.md | 7 + docs/models/shared/taskresponse.md | 8 + docs/models/shared/taskresponsedata.md | 41 + docs/models/shared/taskscursor.md | 8 + docs/models/shared/taskscursorcursor.md | 12 + docs/models/shared/taskscursorcursordata.md | 41 + docs/models/shared/taskstripe.md | 15 + docs/models/shared/taskstripedescriptor.md | 10 + docs/models/shared/taskstripestate.md | 7 + docs/models/shared/taskwise.md | 15 + docs/models/shared/taskwisedescriptor.md | 10 + docs/models/shared/taskwisestate.md | 7 + docs/models/shared/transaction.md | 14 + docs/models/shared/transactiondata.md | 11 + docs/models/shared/transactionresponse.md | 8 + docs/models/shared/transactions.md | 8 + .../shared/transactionscursorresponse.md | 8 + .../transactionscursorresponsecursor.md | 12 + docs/models/shared/transactionsresponse.md | 8 + docs/models/shared/updateclientrequest.md | 14 + docs/models/shared/updateclientresponse.md | 8 + docs/models/shared/updatescoperequest.md | 9 + docs/models/shared/updatescoperesponse.md | 8 + docs/models/shared/user.md | 10 + docs/models/shared/volume.md | 10 + docs/models/shared/wallet.md | 12 + docs/models/shared/walletserrorresponse.md | 9 + .../shared/walletserrorresponseerrorcode.md | 8 + docs/models/shared/walletstransaction.md | 14 + docs/models/shared/walletsubject.md | 10 + docs/models/shared/walletsvolume.md | 10 + docs/models/shared/walletwithbalances.md | 13 + .../shared/walletwithbalancesbalances.md | 8 + docs/models/shared/webhooksconfig.md | 14 + docs/models/shared/wiseconfig.md | 8 + docs/models/shared/workflow.md | 11 + docs/models/shared/workflowconfig.md | 8 + docs/models/shared/workflowoccurrence.md | 12 + docs/sdks/accounts/README.md | 236 +++++ docs/sdks/balances/README.md | 116 +++ docs/sdks/clients/README.md | 494 ++++++++++ docs/sdks/formance/README.md | 158 ++++ docs/sdks/ledger/README.md | 59 ++ docs/sdks/logs/README.md | 62 ++ docs/sdks/mapping/README.md | 119 +++ docs/sdks/orchestration/README.md | 365 ++++++++ docs/sdks/payments/README.md | 639 +++++++++++++ docs/sdks/scopes/README.md | 371 ++++++++ docs/sdks/script/README.md | 83 ++ docs/sdks/search/README.md | 110 +++ docs/sdks/server/README.md | 55 ++ docs/sdks/stats/README.md | 60 ++ docs/sdks/transactions/README.md | 439 +++++++++ docs/sdks/users/README.md | 105 +++ docs/sdks/wallets/README.md | 842 ++++++++++++++++++ docs/sdks/webhooks/README.md | 384 ++++++++ files.gen | 391 +++++++- formance.go | 445 ++++----- gen.yaml | 24 +- go.mod | 3 + go.sum | 6 + ledger.go | 65 +- logs.go | 59 +- mapping.go | 109 ++- orchestration.go | 287 ++++-- payments.go | 365 ++++++-- pkg/models/operations/activateconfig.go | 48 +- .../operations/addmetadataontransaction.go | 68 +- pkg/models/operations/addmetadatatoaccount.go | 72 +- pkg/models/operations/addscopetoclient.go | 46 +- pkg/models/operations/addtransientscope.go | 46 +- pkg/models/operations/changeconfigsecret.go | 57 +- pkg/models/operations/confirmhold.go | 56 +- .../operations/connectorsstripetransfer.go | 43 +- pkg/models/operations/countaccounts.go | 81 +- pkg/models/operations/counttransactions.go | 177 +++- pkg/models/operations/createbalance.go | 66 +- pkg/models/operations/createclient.go | 40 +- pkg/models/operations/createscope.go | 40 +- pkg/models/operations/createsecret.go | 57 +- pkg/models/operations/createtransaction.go | 81 +- pkg/models/operations/createtransactions.go | 67 +- pkg/models/operations/createwallet.go | 48 +- pkg/models/operations/createworkflow.go | 50 +- pkg/models/operations/creditwallet.go | 56 +- pkg/models/operations/deactivateconfig.go | 48 +- pkg/models/operations/debitwallet.go | 66 +- pkg/models/operations/deleteclient.go | 36 +- pkg/models/operations/deleteconfig.go | 36 +- pkg/models/operations/deletescope.go | 36 +- .../operations/deletescopefromclient.go | 46 +- pkg/models/operations/deletesecret.go | 44 +- pkg/models/operations/deletetransientscope.go | 46 +- pkg/models/operations/getaccount.go | 72 +- pkg/models/operations/getbalance.go | 64 +- pkg/models/operations/getbalances.go | 107 ++- .../operations/getbalancesaggregated.go | 68 +- pkg/models/operations/getconnectortask.go | 60 +- pkg/models/operations/getflow.go | 58 +- pkg/models/operations/gethold.go | 58 +- pkg/models/operations/getholds.go | 110 ++- pkg/models/operations/getinfo.go | 50 +- pkg/models/operations/getledgerinfo.go | 60 +- pkg/models/operations/getmanyconfigs.go | 58 +- pkg/models/operations/getmapping.go | 58 +- pkg/models/operations/getpayment.go | 48 +- pkg/models/operations/getserverinfo.go | 38 +- pkg/models/operations/gettransaction.go | 68 +- pkg/models/operations/gettransactions.go | 94 +- pkg/models/operations/getwallet.go | 57 +- .../operations/getworkflowoccurrence.go | 68 +- pkg/models/operations/insertconfig.go | 50 +- pkg/models/operations/installconnector.go | 47 +- pkg/models/operations/listaccounts.go | 242 ++++- pkg/models/operations/listallconnectors.go | 40 +- pkg/models/operations/listbalances.go | 47 +- pkg/models/operations/listclients.go | 40 +- .../listconfigsavailableconnectors.go | 40 +- pkg/models/operations/listconnectortasks.go | 83 +- pkg/models/operations/listflows.go | 50 +- pkg/models/operations/listlogs.go | 190 +++- pkg/models/operations/listpayments.go | 87 +- pkg/models/operations/listruns.go | 60 +- pkg/models/operations/listscopes.go | 40 +- pkg/models/operations/listtransactions.go | 246 ++++- pkg/models/operations/listusers.go | 40 +- pkg/models/operations/listwallets.go | 100 ++- pkg/models/operations/options.go | 87 ++ .../operations/orchestrationgetserverinfo.go | 48 +- .../operations/paymentsgetserverinfo.go | 38 +- pkg/models/operations/paymentslistaccounts.go | 87 +- pkg/models/operations/readclient.go | 48 +- pkg/models/operations/readconnectorconfig.go | 50 +- pkg/models/operations/readscope.go | 48 +- pkg/models/operations/readstats.go | 56 +- pkg/models/operations/readuser.go | 48 +- pkg/models/operations/resetconnector.go | 38 +- pkg/models/operations/reverttransaction.go | 68 +- pkg/models/operations/runscript.go | 75 +- pkg/models/operations/runworkflow.go | 77 +- pkg/models/operations/search.go | 38 +- pkg/models/operations/searchgetserverinfo.go | 38 +- pkg/models/operations/testconfig.go | 48 +- pkg/models/operations/uninstallconnector.go | 38 +- pkg/models/operations/updateclient.go | 57 +- pkg/models/operations/updatemapping.go | 69 +- pkg/models/operations/updatescope.go | 57 +- pkg/models/operations/updatewallet.go | 64 +- pkg/models/operations/voidhold.go | 47 +- pkg/models/operations/walletsgetserverinfo.go | 50 +- pkg/models/sdkerrors/sdkerror.go | 35 + pkg/models/shared/account.go | 32 +- pkg/models/shared/accountresponse.go | 9 + pkg/models/shared/accountscursor.go | 44 + pkg/models/shared/accountscursorresponse.go | 44 + .../shared/accountwithvolumesandbalances.go | 50 +- .../shared/aggregatebalancesresponse.go | 9 + pkg/models/shared/assetholder.go | 9 + pkg/models/shared/attempt.go | 102 +++ pkg/models/shared/attemptresponse.go | 11 +- pkg/models/shared/balance.go | 9 + pkg/models/shared/balancescursorresponse.go | 44 + pkg/models/shared/balancewithassets.go | 16 + pkg/models/shared/bankingcircleconfig.go | 30 + pkg/models/shared/client.go | 72 ++ pkg/models/shared/clientsecret.go | 30 + pkg/models/shared/config.go | 9 + pkg/models/shared/configchangesecret.go | 9 + pkg/models/shared/configinfo.go | 23 + pkg/models/shared/configinforesponse.go | 9 + pkg/models/shared/configresponse.go | 11 +- pkg/models/shared/configsresponse.go | 54 +- pkg/models/shared/configuser.go | 23 + pkg/models/shared/confirmholdrequest.go | 20 +- pkg/models/shared/connector.go | 47 + pkg/models/shared/connectorconfig.go | 159 ++++ pkg/models/shared/connectorconfigresponse.go | 11 +- pkg/models/shared/connectorenum.go | 12 - .../shared/connectorsconfigsresponse.go | 37 + pkg/models/shared/connectorsresponse.go | 27 +- pkg/models/shared/contract.go | 23 +- pkg/models/shared/createbalancerequest.go | 9 + pkg/models/shared/createbalanceresponse.go | 9 + pkg/models/shared/createclientrequest.go | 51 ++ pkg/models/shared/createclientresponse.go | 9 + pkg/models/shared/createscoperequest.go | 16 + pkg/models/shared/createscoperesponse.go | 9 + pkg/models/shared/createsecretrequest.go | 16 + pkg/models/shared/createsecretresponse.go | 9 + pkg/models/shared/createwalletrequest.go | 17 + pkg/models/shared/createwalletresponse.go | 9 + pkg/models/shared/createworkflowrequest.go | 9 + pkg/models/shared/createworkflowresponse.go | 9 + pkg/models/shared/creditwalletrequest.go | 45 +- pkg/models/shared/currencycloudconfig.go | 39 +- pkg/models/shared/debitwalletrequest.go | 72 +- pkg/models/shared/debitwalletresponse.go | 9 + pkg/models/shared/dummypayconfig.go | 46 +- pkg/models/shared/error.go | 47 +- pkg/models/shared/errorresponse.go | 29 +- pkg/models/shared/errorsenum.go | 50 ++ pkg/models/shared/errorsenumenum.go | 13 - pkg/models/shared/expandeddebithold.go | 84 +- pkg/models/shared/getbalanceresponse.go | 9 + pkg/models/shared/getholdresponse.go | 9 + pkg/models/shared/getholdsresponse.go | 44 + pkg/models/shared/gettransactionsresponse.go | 44 + pkg/models/shared/getwalletresponse.go | 9 + .../shared/getworkflowoccurrenceresponse.go | 9 + pkg/models/shared/getworkflowresponse.go | 9 + pkg/models/shared/hold.go | 64 +- pkg/models/shared/ledgeraccountsubject.go | 22 + pkg/models/shared/ledgerinfo.go | 33 + pkg/models/shared/ledgerinforesponse.go | 14 + pkg/models/shared/ledgerstorage.go | 16 + pkg/models/shared/listbalancesresponse.go | 44 + pkg/models/shared/listclientsresponse.go | 9 + pkg/models/shared/listrunsresponse.go | 57 ++ pkg/models/shared/listscopesresponse.go | 9 + pkg/models/shared/listusersresponse.go | 9 + pkg/models/shared/listwalletsresponse.go | 44 + pkg/models/shared/listworkflowsresponse.go | 9 + pkg/models/shared/log.go | 90 +- pkg/models/shared/logscursorresponse.go | 44 + pkg/models/shared/mapping.go | 9 + pkg/models/shared/mappingresponse.go | 9 + pkg/models/shared/migrationinfo.go | 83 ++ pkg/models/shared/modulrconfig.go | 23 + pkg/models/shared/monetary.go | 22 +- pkg/models/shared/payment.go | 260 +++++- pkg/models/shared/paymentadjustment.go | 62 +- pkg/models/shared/paymentmetadata.go | 23 + pkg/models/shared/paymentmetadatachangelog.go | 28 + pkg/models/shared/paymentresponse.go | 9 + pkg/models/shared/paymentsaccount.go | 87 +- pkg/models/shared/paymentscursor.go | 44 + pkg/models/shared/paymentstatus.go | 41 + pkg/models/shared/paymentstatusenum.go | 10 - pkg/models/shared/posting.go | 30 + pkg/models/shared/posttransaction.go | 70 +- pkg/models/shared/query.go | 58 ++ pkg/models/shared/readclientresponse.go | 9 + pkg/models/shared/readscoperesponse.go | 9 + pkg/models/shared/readuserresponse.go | 9 + pkg/models/shared/response.go | 96 +- pkg/models/shared/runworkflowresponse.go | 9 + pkg/models/shared/scope.go | 30 + pkg/models/shared/script.go | 42 +- pkg/models/shared/scriptresponse.go | 38 +- pkg/models/shared/secret.go | 37 + pkg/models/shared/security.go | 9 + pkg/models/shared/serverinfo.go | 9 + pkg/models/shared/stagestatus.go | 49 + pkg/models/shared/stats.go | 16 + pkg/models/shared/statsresponse.go | 9 + pkg/models/shared/stripeconfig.go | 48 +- pkg/models/shared/stripetransferrequest.go | 46 +- pkg/models/shared/stripetransferresponse.go | 6 + pkg/models/shared/subject.go | 93 ++ pkg/models/shared/taskbankingcircle.go | 91 +- pkg/models/shared/taskcurrencycloud.go | 84 +- pkg/models/shared/taskdummypay.go | 98 +- pkg/models/shared/taskmodulr.go | 110 ++- pkg/models/shared/taskresponse.go | 167 +++- pkg/models/shared/taskscursor.go | 210 ++++- pkg/models/shared/taskstripe.go | 110 ++- pkg/models/shared/taskwise.go | 110 ++- pkg/models/shared/transaction.go | 63 ++ pkg/models/shared/transactiondata.go | 42 + pkg/models/shared/transactionresponse.go | 9 + pkg/models/shared/transactions.go | 9 + .../shared/transactionscursorresponse.go | 44 + pkg/models/shared/transactionsresponse.go | 9 + pkg/models/shared/updateclientrequest.go | 51 ++ pkg/models/shared/updateclientresponse.go | 9 + pkg/models/shared/updatescoperequest.go | 16 + pkg/models/shared/updatescoperesponse.go | 9 + pkg/models/shared/user.go | 23 + pkg/models/shared/volume.go | 23 + pkg/models/shared/wallet.go | 61 +- pkg/models/shared/walletserrorresponse.go | 47 +- pkg/models/shared/walletstransaction.go | 64 ++ pkg/models/shared/walletsubject.go | 30 + pkg/models/shared/walletsvolume.go | 23 + pkg/models/shared/walletwithbalances.go | 73 +- pkg/models/shared/webhooksconfig.go | 78 ++ pkg/models/shared/wiseconfig.go | 9 + pkg/models/shared/workflow.go | 42 + pkg/models/shared/workflowconfig.go | 9 + pkg/models/shared/workflowoccurrence.go | 49 + pkg/types/bigint.go | 21 + pkg/types/date.go | 54 ++ pkg/types/datetime.go | 23 + pkg/types/decimal.go | 20 + pkg/types/pointers.go | 10 + pkg/utils/contenttype.go | 2 + pkg/utils/form.go | 41 +- pkg/utils/headers.go | 16 +- pkg/utils/json.go | 579 ++++++++++++ pkg/utils/pathparams.go | 92 +- pkg/utils/queryparams.go | 51 +- pkg/utils/requestbody.go | 71 +- pkg/utils/retries.go | 2 + pkg/utils/security.go | 150 ++-- pkg/utils/utils.go | 37 +- scopes.go | 218 +++-- script.go | 63 +- search.go | 50 +- server.go | 54 +- stats.go | 65 +- transactions.go | 296 ++++-- users.go | 79 +- wallets.go | 582 ++++++++---- webhooks.go | 262 ++++-- 629 files changed, 22670 insertions(+), 2054 deletions(-) create mode 100755 .gitattributes create mode 100755 .gitignore create mode 100755 docs/models/operations/activateconfigrequest.md create mode 100755 docs/models/operations/activateconfigresponse.md create mode 100755 docs/models/operations/addmetadataontransactionrequest.md create mode 100755 docs/models/operations/addmetadataontransactionresponse.md create mode 100755 docs/models/operations/addmetadatatoaccountrequest.md create mode 100755 docs/models/operations/addmetadatatoaccountresponse.md create mode 100755 docs/models/operations/addscopetoclientrequest.md create mode 100755 docs/models/operations/addscopetoclientresponse.md create mode 100755 docs/models/operations/addtransientscoperequest.md create mode 100755 docs/models/operations/addtransientscoperesponse.md create mode 100755 docs/models/operations/changeconfigsecretrequest.md create mode 100755 docs/models/operations/changeconfigsecretresponse.md create mode 100755 docs/models/operations/confirmholdrequest.md create mode 100755 docs/models/operations/confirmholdresponse.md create mode 100755 docs/models/operations/connectorsstripetransferresponse.md create mode 100755 docs/models/operations/countaccountsmetadata.md create mode 100755 docs/models/operations/countaccountsrequest.md create mode 100755 docs/models/operations/countaccountsresponse.md create mode 100755 docs/models/operations/counttransactionsmetadata.md create mode 100755 docs/models/operations/counttransactionsrequest.md create mode 100755 docs/models/operations/counttransactionsresponse.md create mode 100755 docs/models/operations/createbalancerequest.md create mode 100755 docs/models/operations/createbalanceresponse.md create mode 100755 docs/models/operations/createclientresponse.md create mode 100755 docs/models/operations/createscoperesponse.md create mode 100755 docs/models/operations/createsecretrequest.md create mode 100755 docs/models/operations/createsecretresponse.md create mode 100755 docs/models/operations/createtransactionrequest.md create mode 100755 docs/models/operations/createtransactionresponse.md create mode 100755 docs/models/operations/createtransactionsrequest.md create mode 100755 docs/models/operations/createtransactionsresponse.md create mode 100755 docs/models/operations/createwalletresponse.md create mode 100755 docs/models/operations/createworkflowresponse.md create mode 100755 docs/models/operations/creditwalletrequest.md create mode 100755 docs/models/operations/creditwalletresponse.md create mode 100755 docs/models/operations/deactivateconfigrequest.md create mode 100755 docs/models/operations/deactivateconfigresponse.md create mode 100755 docs/models/operations/debitwalletrequest.md create mode 100755 docs/models/operations/debitwalletresponse.md create mode 100755 docs/models/operations/deleteclientrequest.md create mode 100755 docs/models/operations/deleteclientresponse.md create mode 100755 docs/models/operations/deleteconfigrequest.md create mode 100755 docs/models/operations/deleteconfigresponse.md create mode 100755 docs/models/operations/deletescopefromclientrequest.md create mode 100755 docs/models/operations/deletescopefromclientresponse.md create mode 100755 docs/models/operations/deletescoperequest.md create mode 100755 docs/models/operations/deletescoperesponse.md create mode 100755 docs/models/operations/deletesecretrequest.md create mode 100755 docs/models/operations/deletesecretresponse.md create mode 100755 docs/models/operations/deletetransientscoperequest.md create mode 100755 docs/models/operations/deletetransientscoperesponse.md create mode 100755 docs/models/operations/getaccountrequest.md create mode 100755 docs/models/operations/getaccountresponse.md create mode 100755 docs/models/operations/getbalancerequest.md create mode 100755 docs/models/operations/getbalanceresponse.md create mode 100755 docs/models/operations/getbalancesaggregatedrequest.md create mode 100755 docs/models/operations/getbalancesaggregatedresponse.md create mode 100755 docs/models/operations/getbalancesrequest.md create mode 100755 docs/models/operations/getbalancesresponse.md create mode 100755 docs/models/operations/getconnectortaskrequest.md create mode 100755 docs/models/operations/getconnectortaskresponse.md create mode 100755 docs/models/operations/getflowrequest.md create mode 100755 docs/models/operations/getflowresponse.md create mode 100755 docs/models/operations/getholdrequest.md create mode 100755 docs/models/operations/getholdresponse.md create mode 100755 docs/models/operations/getholdsmetadata.md create mode 100755 docs/models/operations/getholdsrequest.md create mode 100755 docs/models/operations/getholdsresponse.md create mode 100755 docs/models/operations/getinforesponse.md create mode 100755 docs/models/operations/getledgerinforequest.md create mode 100755 docs/models/operations/getledgerinforesponse.md create mode 100755 docs/models/operations/getmanyconfigsrequest.md create mode 100755 docs/models/operations/getmanyconfigsresponse.md create mode 100755 docs/models/operations/getmappingrequest.md create mode 100755 docs/models/operations/getmappingresponse.md create mode 100755 docs/models/operations/getpaymentrequest.md create mode 100755 docs/models/operations/getpaymentresponse.md create mode 100755 docs/models/operations/getserverinforesponse.md create mode 100755 docs/models/operations/gettransactionrequest.md create mode 100755 docs/models/operations/gettransactionresponse.md create mode 100755 docs/models/operations/gettransactionsrequest.md create mode 100755 docs/models/operations/gettransactionsresponse.md create mode 100755 docs/models/operations/getwalletrequest.md create mode 100755 docs/models/operations/getwalletresponse.md create mode 100755 docs/models/operations/getworkflowoccurrencerequest.md create mode 100755 docs/models/operations/getworkflowoccurrenceresponse.md create mode 100755 docs/models/operations/insertconfigresponse.md create mode 100755 docs/models/operations/installconnectorrequest.md create mode 100755 docs/models/operations/installconnectorresponse.md create mode 100755 docs/models/operations/listaccountsbalanceoperator.md create mode 100755 docs/models/operations/listaccountsmetadata.md create mode 100755 docs/models/operations/listaccountsrequest.md create mode 100755 docs/models/operations/listaccountsresponse.md create mode 100755 docs/models/operations/listallconnectorsresponse.md create mode 100755 docs/models/operations/listbalancesrequest.md create mode 100755 docs/models/operations/listbalancesresponse.md create mode 100755 docs/models/operations/listclientsresponse.md create mode 100755 docs/models/operations/listconfigsavailableconnectorsresponse.md create mode 100755 docs/models/operations/listconnectortasksrequest.md create mode 100755 docs/models/operations/listconnectortasksresponse.md create mode 100755 docs/models/operations/listflowsresponse.md create mode 100755 docs/models/operations/listlogsrequest.md create mode 100755 docs/models/operations/listlogsresponse.md create mode 100755 docs/models/operations/listpaymentsrequest.md create mode 100755 docs/models/operations/listpaymentsresponse.md create mode 100755 docs/models/operations/listrunsrequest.md create mode 100755 docs/models/operations/listrunsresponse.md create mode 100755 docs/models/operations/listscopesresponse.md create mode 100755 docs/models/operations/listtransactionsmetadata.md create mode 100755 docs/models/operations/listtransactionsrequest.md create mode 100755 docs/models/operations/listtransactionsresponse.md create mode 100755 docs/models/operations/listusersresponse.md create mode 100755 docs/models/operations/listwalletsmetadata.md create mode 100755 docs/models/operations/listwalletsrequest.md create mode 100755 docs/models/operations/listwalletsresponse.md create mode 100755 docs/models/operations/orchestrationgetserverinforesponse.md create mode 100755 docs/models/operations/paymentsgetserverinforesponse.md create mode 100755 docs/models/operations/paymentslistaccountsrequest.md create mode 100755 docs/models/operations/paymentslistaccountsresponse.md create mode 100755 docs/models/operations/readclientrequest.md create mode 100755 docs/models/operations/readclientresponse.md create mode 100755 docs/models/operations/readconnectorconfigrequest.md create mode 100755 docs/models/operations/readconnectorconfigresponse.md create mode 100755 docs/models/operations/readscoperequest.md create mode 100755 docs/models/operations/readscoperesponse.md create mode 100755 docs/models/operations/readstatsrequest.md create mode 100755 docs/models/operations/readstatsresponse.md create mode 100755 docs/models/operations/readuserrequest.md create mode 100755 docs/models/operations/readuserresponse.md create mode 100755 docs/models/operations/resetconnectorrequest.md create mode 100755 docs/models/operations/resetconnectorresponse.md create mode 100755 docs/models/operations/reverttransactionrequest.md create mode 100755 docs/models/operations/reverttransactionresponse.md create mode 100755 docs/models/operations/runscriptrequest.md create mode 100755 docs/models/operations/runscriptresponse.md create mode 100755 docs/models/operations/runworkflowrequest.md create mode 100755 docs/models/operations/runworkflowresponse.md create mode 100755 docs/models/operations/searchgetserverinforesponse.md create mode 100755 docs/models/operations/searchresponse.md create mode 100755 docs/models/operations/testconfigrequest.md create mode 100755 docs/models/operations/testconfigresponse.md create mode 100755 docs/models/operations/uninstallconnectorrequest.md create mode 100755 docs/models/operations/uninstallconnectorresponse.md create mode 100755 docs/models/operations/updateclientrequest.md create mode 100755 docs/models/operations/updateclientresponse.md create mode 100755 docs/models/operations/updatemappingrequest.md create mode 100755 docs/models/operations/updatemappingresponse.md create mode 100755 docs/models/operations/updatescoperequest.md create mode 100755 docs/models/operations/updatescoperesponse.md create mode 100755 docs/models/operations/updatewalletrequest.md create mode 100755 docs/models/operations/updatewalletrequestbody.md create mode 100755 docs/models/operations/updatewalletresponse.md create mode 100755 docs/models/operations/voidholdrequest.md create mode 100755 docs/models/operations/voidholdresponse.md create mode 100755 docs/models/operations/walletsgetserverinforesponse.md create mode 100755 docs/models/shared/account.md create mode 100755 docs/models/shared/accountmetadata.md create mode 100755 docs/models/shared/accountresponse.md create mode 100755 docs/models/shared/accountscursor.md create mode 100755 docs/models/shared/accountscursorcursor.md create mode 100755 docs/models/shared/accountscursorresponse.md create mode 100755 docs/models/shared/accountscursorresponsecursor.md create mode 100755 docs/models/shared/accountwithvolumesandbalances.md create mode 100755 docs/models/shared/accountwithvolumesandbalancesmetadata.md create mode 100755 docs/models/shared/aggregatebalancesresponse.md create mode 100755 docs/models/shared/assetholder.md create mode 100755 docs/models/shared/attempt.md create mode 100755 docs/models/shared/attemptresponse.md create mode 100755 docs/models/shared/balance.md create mode 100755 docs/models/shared/balancescursorresponse.md create mode 100755 docs/models/shared/balancescursorresponsecursor.md create mode 100755 docs/models/shared/balancewithassets.md create mode 100755 docs/models/shared/bankingcircleconfig.md create mode 100755 docs/models/shared/client.md create mode 100755 docs/models/shared/clientsecret.md create mode 100755 docs/models/shared/config.md create mode 100755 docs/models/shared/configchangesecret.md create mode 100755 docs/models/shared/configinfo.md create mode 100755 docs/models/shared/configinforesponse.md create mode 100755 docs/models/shared/configresponse.md create mode 100755 docs/models/shared/configsresponse.md create mode 100755 docs/models/shared/configsresponsecursor.md create mode 100755 docs/models/shared/configuser.md create mode 100755 docs/models/shared/confirmholdrequest.md create mode 100755 docs/models/shared/connector.md create mode 100755 docs/models/shared/connectorconfig.md create mode 100755 docs/models/shared/connectorconfigresponse.md create mode 100755 docs/models/shared/connectorsconfigsresponse.md create mode 100755 docs/models/shared/connectorsconfigsresponsedata.md create mode 100755 docs/models/shared/connectorsconfigsresponsedataconnector.md create mode 100755 docs/models/shared/connectorsconfigsresponsedataconnectorkey.md create mode 100755 docs/models/shared/connectorsresponse.md create mode 100755 docs/models/shared/connectorsresponsedata.md create mode 100755 docs/models/shared/contract.md create mode 100755 docs/models/shared/contractexpr.md create mode 100755 docs/models/shared/createbalancerequest.md create mode 100755 docs/models/shared/createbalanceresponse.md create mode 100755 docs/models/shared/createclientrequest.md create mode 100755 docs/models/shared/createclientresponse.md create mode 100755 docs/models/shared/createscoperequest.md create mode 100755 docs/models/shared/createscoperesponse.md create mode 100755 docs/models/shared/createsecretrequest.md create mode 100755 docs/models/shared/createsecretresponse.md create mode 100755 docs/models/shared/createwalletrequest.md create mode 100755 docs/models/shared/createwalletresponse.md create mode 100755 docs/models/shared/createworkflowrequest.md create mode 100755 docs/models/shared/createworkflowresponse.md create mode 100755 docs/models/shared/creditwalletrequest.md create mode 100755 docs/models/shared/currencycloudconfig.md create mode 100755 docs/models/shared/debitwalletrequest.md create mode 100755 docs/models/shared/debitwalletresponse.md create mode 100755 docs/models/shared/dummypayconfig.md create mode 100755 docs/models/shared/error.md create mode 100755 docs/models/shared/errorerrorcode.md create mode 100755 docs/models/shared/errorresponse.md create mode 100755 docs/models/shared/errorsenum.md create mode 100755 docs/models/shared/expandeddebithold.md create mode 100755 docs/models/shared/getbalanceresponse.md create mode 100755 docs/models/shared/getholdresponse.md create mode 100755 docs/models/shared/getholdsresponse.md create mode 100755 docs/models/shared/getholdsresponsecursor.md create mode 100755 docs/models/shared/gettransactionsresponse.md create mode 100755 docs/models/shared/gettransactionsresponsecursor.md create mode 100755 docs/models/shared/getwalletresponse.md create mode 100755 docs/models/shared/getworkflowoccurrenceresponse.md create mode 100755 docs/models/shared/getworkflowresponse.md create mode 100755 docs/models/shared/hold.md create mode 100755 docs/models/shared/ledgeraccountsubject.md create mode 100755 docs/models/shared/ledgerinfo.md create mode 100755 docs/models/shared/ledgerinforesponse.md create mode 100755 docs/models/shared/ledgerinfostorage.md create mode 100755 docs/models/shared/ledgerstorage.md create mode 100755 docs/models/shared/listbalancesresponse.md create mode 100755 docs/models/shared/listbalancesresponsecursor.md create mode 100755 docs/models/shared/listclientsresponse.md create mode 100755 docs/models/shared/listrunsresponse.md create mode 100755 docs/models/shared/listrunsresponsecursor.md create mode 100755 docs/models/shared/listscopesresponse.md create mode 100755 docs/models/shared/listusersresponse.md create mode 100755 docs/models/shared/listwalletsresponse.md create mode 100755 docs/models/shared/listwalletsresponsecursor.md create mode 100755 docs/models/shared/listworkflowsresponse.md create mode 100755 docs/models/shared/log.md create mode 100755 docs/models/shared/logdata.md create mode 100755 docs/models/shared/logscursorresponse.md create mode 100755 docs/models/shared/logscursorresponsecursor.md create mode 100755 docs/models/shared/logtype.md create mode 100755 docs/models/shared/mapping.md create mode 100755 docs/models/shared/mappingresponse.md create mode 100755 docs/models/shared/migrationinfo.md create mode 100755 docs/models/shared/migrationinfostate.md create mode 100755 docs/models/shared/modulrconfig.md create mode 100755 docs/models/shared/monetary.md create mode 100755 docs/models/shared/payment.md create mode 100755 docs/models/shared/paymentadjustment.md create mode 100755 docs/models/shared/paymentadjustmentraw.md create mode 100755 docs/models/shared/paymentmetadata.md create mode 100755 docs/models/shared/paymentmetadatachangelog.md create mode 100755 docs/models/shared/paymentraw.md create mode 100755 docs/models/shared/paymentresponse.md create mode 100755 docs/models/shared/paymentsaccount.md create mode 100755 docs/models/shared/paymentsaccounttype.md create mode 100755 docs/models/shared/paymentscheme.md create mode 100755 docs/models/shared/paymentscursor.md create mode 100755 docs/models/shared/paymentscursorcursor.md create mode 100755 docs/models/shared/paymentstatus.md create mode 100755 docs/models/shared/paymenttype.md create mode 100755 docs/models/shared/posting.md create mode 100755 docs/models/shared/posttransaction.md create mode 100755 docs/models/shared/posttransactionscript.md create mode 100755 docs/models/shared/posttransactionscriptvars.md create mode 100755 docs/models/shared/query.md create mode 100755 docs/models/shared/readclientresponse.md create mode 100755 docs/models/shared/readscoperesponse.md create mode 100755 docs/models/shared/readuserresponse.md create mode 100755 docs/models/shared/response.md create mode 100755 docs/models/shared/responsecursor.md create mode 100755 docs/models/shared/responsecursordata.md create mode 100755 docs/models/shared/responsecursortotal.md create mode 100755 docs/models/shared/responsedata.md create mode 100755 docs/models/shared/runworkflowresponse.md create mode 100755 docs/models/shared/scope.md create mode 100755 docs/models/shared/script.md create mode 100755 docs/models/shared/scriptresponse.md create mode 100755 docs/models/shared/scriptvars.md create mode 100755 docs/models/shared/secret.md create mode 100755 docs/models/shared/security.md create mode 100755 docs/models/shared/serverinfo.md create mode 100755 docs/models/shared/stagestatus.md create mode 100755 docs/models/shared/stats.md create mode 100755 docs/models/shared/statsresponse.md create mode 100755 docs/models/shared/stripeconfig.md create mode 100755 docs/models/shared/stripetransferrequest.md create mode 100755 docs/models/shared/stripetransferrequestmetadata.md create mode 100755 docs/models/shared/stripetransferresponse.md create mode 100755 docs/models/shared/subject.md create mode 100755 docs/models/shared/taskbankingcircle.md create mode 100755 docs/models/shared/taskbankingcircledescriptor.md create mode 100755 docs/models/shared/taskbankingcirclestate.md create mode 100755 docs/models/shared/taskcurrencycloud.md create mode 100755 docs/models/shared/taskcurrencyclouddescriptor.md create mode 100755 docs/models/shared/taskcurrencycloudstate.md create mode 100755 docs/models/shared/taskdummypay.md create mode 100755 docs/models/shared/taskdummypaydescriptor.md create mode 100755 docs/models/shared/taskdummypaystate.md create mode 100755 docs/models/shared/taskmodulr.md create mode 100755 docs/models/shared/taskmodulrdescriptor.md create mode 100755 docs/models/shared/taskmodulrstate.md create mode 100755 docs/models/shared/taskresponse.md create mode 100755 docs/models/shared/taskresponsedata.md create mode 100755 docs/models/shared/taskscursor.md create mode 100755 docs/models/shared/taskscursorcursor.md create mode 100755 docs/models/shared/taskscursorcursordata.md create mode 100755 docs/models/shared/taskstripe.md create mode 100755 docs/models/shared/taskstripedescriptor.md create mode 100755 docs/models/shared/taskstripestate.md create mode 100755 docs/models/shared/taskwise.md create mode 100755 docs/models/shared/taskwisedescriptor.md create mode 100755 docs/models/shared/taskwisestate.md create mode 100755 docs/models/shared/transaction.md create mode 100755 docs/models/shared/transactiondata.md create mode 100755 docs/models/shared/transactionresponse.md create mode 100755 docs/models/shared/transactions.md create mode 100755 docs/models/shared/transactionscursorresponse.md create mode 100755 docs/models/shared/transactionscursorresponsecursor.md create mode 100755 docs/models/shared/transactionsresponse.md create mode 100755 docs/models/shared/updateclientrequest.md create mode 100755 docs/models/shared/updateclientresponse.md create mode 100755 docs/models/shared/updatescoperequest.md create mode 100755 docs/models/shared/updatescoperesponse.md create mode 100755 docs/models/shared/user.md create mode 100755 docs/models/shared/volume.md create mode 100755 docs/models/shared/wallet.md create mode 100755 docs/models/shared/walletserrorresponse.md create mode 100755 docs/models/shared/walletserrorresponseerrorcode.md create mode 100755 docs/models/shared/walletstransaction.md create mode 100755 docs/models/shared/walletsubject.md create mode 100755 docs/models/shared/walletsvolume.md create mode 100755 docs/models/shared/walletwithbalances.md create mode 100755 docs/models/shared/walletwithbalancesbalances.md create mode 100755 docs/models/shared/webhooksconfig.md create mode 100755 docs/models/shared/wiseconfig.md create mode 100755 docs/models/shared/workflow.md create mode 100755 docs/models/shared/workflowconfig.md create mode 100755 docs/models/shared/workflowoccurrence.md create mode 100755 docs/sdks/accounts/README.md create mode 100755 docs/sdks/balances/README.md create mode 100755 docs/sdks/clients/README.md create mode 100755 docs/sdks/formance/README.md create mode 100755 docs/sdks/ledger/README.md create mode 100755 docs/sdks/logs/README.md create mode 100755 docs/sdks/mapping/README.md create mode 100755 docs/sdks/orchestration/README.md create mode 100755 docs/sdks/payments/README.md create mode 100755 docs/sdks/scopes/README.md create mode 100755 docs/sdks/script/README.md create mode 100755 docs/sdks/search/README.md create mode 100755 docs/sdks/server/README.md create mode 100755 docs/sdks/stats/README.md create mode 100755 docs/sdks/transactions/README.md create mode 100755 docs/sdks/users/README.md create mode 100755 docs/sdks/wallets/README.md create mode 100755 docs/sdks/webhooks/README.md create mode 100755 pkg/models/operations/options.go create mode 100755 pkg/models/sdkerrors/sdkerror.go create mode 100755 pkg/models/shared/attempt.go create mode 100755 pkg/models/shared/connector.go create mode 100755 pkg/models/shared/connectorconfig.go delete mode 100755 pkg/models/shared/connectorenum.go create mode 100755 pkg/models/shared/errorsenum.go delete mode 100755 pkg/models/shared/errorsenumenum.go create mode 100755 pkg/models/shared/ledgeraccountsubject.go create mode 100755 pkg/models/shared/ledgerinfo.go create mode 100755 pkg/models/shared/ledgerinforesponse.go create mode 100755 pkg/models/shared/listrunsresponse.go create mode 100755 pkg/models/shared/migrationinfo.go create mode 100755 pkg/models/shared/paymentstatus.go delete mode 100755 pkg/models/shared/paymentstatusenum.go create mode 100755 pkg/models/shared/stripetransferresponse.go create mode 100755 pkg/models/shared/subject.go create mode 100755 pkg/models/shared/walletsubject.go create mode 100755 pkg/models/shared/webhooksconfig.go create mode 100755 pkg/types/bigint.go create mode 100755 pkg/types/datetime.go create mode 100755 pkg/types/decimal.go create mode 100755 pkg/types/pointers.go create mode 100755 pkg/utils/json.go diff --git a/.gitattributes b/.gitattributes new file mode 100755 index 0000000..e6a9944 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.go linguist-generated=false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..d3c2f59 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +# .gitignore diff --git a/README.md b/README.md index 5a4c7bf..b82fe8f 100755 --- a/README.md +++ b/README.md @@ -26,171 +26,315 @@ go get github.com/speakeasy-sdks/formance-go-sdk package main import ( - "context" - "log" - "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "context" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "log" ) func main() { - s := formance.New(shared.Security{ - Authorization: "Bearer YOUR_ACCESS_TOKEN_HERE", - }), - ) - - ctx := context.Background() - res, err := s.GetServerInfo(ctx) - if err != nil { - log.Fatal(err) - } - - if res.ServerInfo != nil { - // handle response - } + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Formance.GetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } } + ``` -## SDK Available Operations +## Available Resources and Operations -### Formance SDK +### [Formance SDK](docs/sdks/formance/README.md) -* `GetServerInfo` - Get server info -* `PaymentsgetServerInfo` - Get server info -* `SearchgetServerInfo` - Get server info +* [GetServerInfo](docs/sdks/formance/README.md#getserverinfo) - Get server info +* [PaymentsgetServerInfo](docs/sdks/formance/README.md#paymentsgetserverinfo) - Get server info +* [SearchgetServerInfo](docs/sdks/formance/README.md#searchgetserverinfo) - Get server info -### Accounts +### [Accounts](docs/sdks/accounts/README.md) -* `AddMetadataToAccount` - Add metadata to an account -* `CountAccounts` - Count the accounts from a ledger -* `GetAccount` - Get account by its address -* `ListAccounts` - List accounts from a ledger +* [AddMetadataToAccount](docs/sdks/accounts/README.md#addmetadatatoaccount) - Add metadata to an account +* [CountAccounts](docs/sdks/accounts/README.md#countaccounts) - Count the accounts from a ledger +* [GetAccount](docs/sdks/accounts/README.md#getaccount) - Get account by its address +* [ListAccounts](docs/sdks/accounts/README.md#listaccounts) - List accounts from a ledger -### Balances +### [Balances](docs/sdks/balances/README.md) -* `GetBalances` - Get the balances from a ledger's account -* `GetBalancesAggregated` - Get the aggregated balances from selected accounts +* [GetBalances](docs/sdks/balances/README.md#getbalances) - Get the balances from a ledger's account +* [GetBalancesAggregated](docs/sdks/balances/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts -### Clients +### [Clients](docs/sdks/clients/README.md) -* `AddScopeToClient` - Add scope to client -* `CreateClient` - Create client -* `CreateSecret` - Add a secret to a client -* `DeleteClient` - Delete client -* `DeleteScopeFromClient` - Delete scope from client -* `DeleteSecret` - Delete a secret from a client -* `ListClients` - List clients -* `ReadClient` - Read client -* `UpdateClient` - Update client +* [AddScopeToClient](docs/sdks/clients/README.md#addscopetoclient) - Add scope to client +* [CreateClient](docs/sdks/clients/README.md#createclient) - Create client +* [CreateSecret](docs/sdks/clients/README.md#createsecret) - Add a secret to a client +* [DeleteClient](docs/sdks/clients/README.md#deleteclient) - Delete client +* [DeleteScopeFromClient](docs/sdks/clients/README.md#deletescopefromclient) - Delete scope from client +* [DeleteSecret](docs/sdks/clients/README.md#deletesecret) - Delete a secret from a client +* [ListClients](docs/sdks/clients/README.md#listclients) - List clients +* [ReadClient](docs/sdks/clients/README.md#readclient) - Read client +* [UpdateClient](docs/sdks/clients/README.md#updateclient) - Update client -### Ledger +### [Ledger](docs/sdks/ledger/README.md) -* `GetLedgerInfo` - Get information about a ledger +* [GetLedgerInfo](docs/sdks/ledger/README.md#getledgerinfo) - Get information about a ledger -### Logs +### [Logs](docs/sdks/logs/README.md) -* `ListLogs` - List the logs from a ledger +* [ListLogs](docs/sdks/logs/README.md#listlogs) - List the logs from a ledger -### Mapping +### [Mapping](docs/sdks/mapping/README.md) -* `GetMapping` - Get the mapping of a ledger -* `UpdateMapping` - Update the mapping of a ledger +* [GetMapping](docs/sdks/mapping/README.md#getmapping) - Get the mapping of a ledger +* [UpdateMapping](docs/sdks/mapping/README.md#updatemapping) - Update the mapping of a ledger -### Orchestration +### [Orchestration](docs/sdks/orchestration/README.md) -* `CreateWorkflow` - Create workflow -* `GetFlow` - Get a flow by id -* `GetWorkflowOccurrence` - Get a workflow occurrence by id -* `ListFlows` - List registered flows -* `ListRuns` - List occurrences of a workflow -* `OrchestrationgetServerInfo` - Get server info -* `RunWorkflow` - Run workflow +* [CreateWorkflow](docs/sdks/orchestration/README.md#createworkflow) - Create workflow +* [GetFlow](docs/sdks/orchestration/README.md#getflow) - Get a flow by id +* [GetWorkflowOccurrence](docs/sdks/orchestration/README.md#getworkflowoccurrence) - Get a workflow occurrence by id +* [ListFlows](docs/sdks/orchestration/README.md#listflows) - List registered flows +* [ListRuns](docs/sdks/orchestration/README.md#listruns) - List occurrences of a workflow +* [OrchestrationgetServerInfo](docs/sdks/orchestration/README.md#orchestrationgetserverinfo) - Get server info +* [RunWorkflow](docs/sdks/orchestration/README.md#runworkflow) - Run workflow -### Payments +### [Payments](docs/sdks/payments/README.md) -* `ConnectorsStripeTransfer` - Transfer funds between Stripe accounts -* `GetConnectorTask` - Read a specific task of the connector -* `GetPayment` - Get a payment -* `InstallConnector` - Install a connector -* `ListAllConnectors` - List all installed connectors -* `ListConfigsAvailableConnectors` - List the configs of each available connector -* `ListConnectorTasks` - List tasks from a connector -* `ListPayments` - List payments -* `PaymentslistAccounts` - List accounts -* `ReadConnectorConfig` - Read the config of a connector -* `ResetConnector` - Reset a connector -* `UninstallConnector` - Uninstall a connector +* [ConnectorsStripeTransfer](docs/sdks/payments/README.md#connectorsstripetransfer) - Transfer funds between Stripe accounts +* [GetConnectorTask](docs/sdks/payments/README.md#getconnectortask) - Read a specific task of the connector +* [GetPayment](docs/sdks/payments/README.md#getpayment) - Get a payment +* [InstallConnector](docs/sdks/payments/README.md#installconnector) - Install a connector +* [ListAllConnectors](docs/sdks/payments/README.md#listallconnectors) - List all installed connectors +* [ListConfigsAvailableConnectors](docs/sdks/payments/README.md#listconfigsavailableconnectors) - List the configs of each available connector +* [ListConnectorTasks](docs/sdks/payments/README.md#listconnectortasks) - List tasks from a connector +* [ListPayments](docs/sdks/payments/README.md#listpayments) - List payments +* [PaymentslistAccounts](docs/sdks/payments/README.md#paymentslistaccounts) - List accounts +* [ReadConnectorConfig](docs/sdks/payments/README.md#readconnectorconfig) - Read the config of a connector +* [ResetConnector](docs/sdks/payments/README.md#resetconnector) - Reset a connector +* [UninstallConnector](docs/sdks/payments/README.md#uninstallconnector) - Uninstall a connector -### Scopes +### [Scopes](docs/sdks/scopes/README.md) -* `AddTransientScope` - Add a transient scope to a scope -* `CreateScope` - Create scope -* `DeleteScope` - Delete scope -* `DeleteTransientScope` - Delete a transient scope from a scope -* `ListScopes` - List scopes -* `ReadScope` - Read scope -* `UpdateScope` - Update scope +* [AddTransientScope](docs/sdks/scopes/README.md#addtransientscope) - Add a transient scope to a scope +* [CreateScope](docs/sdks/scopes/README.md#createscope) - Create scope +* [DeleteScope](docs/sdks/scopes/README.md#deletescope) - Delete scope +* [DeleteTransientScope](docs/sdks/scopes/README.md#deletetransientscope) - Delete a transient scope from a scope +* [ListScopes](docs/sdks/scopes/README.md#listscopes) - List scopes +* [ReadScope](docs/sdks/scopes/README.md#readscope) - Read scope +* [UpdateScope](docs/sdks/scopes/README.md#updatescope) - Update scope -### Script +### [Script](docs/sdks/script/README.md) -* `RunScript` - Execute a Numscript +* [~~RunScript~~](docs/sdks/script/README.md#runscript) - Execute a Numscript :warning: **Deprecated** -### Search +### [Search](docs/sdks/search/README.md) -* `Search` - Search +* [Search](docs/sdks/search/README.md#search) - Search -### Server +### [Server](docs/sdks/server/README.md) -* `GetInfo` - Show server information +* [GetInfo](docs/sdks/server/README.md#getinfo) - Show server information -### Stats +### [Stats](docs/sdks/stats/README.md) -* `ReadStats` - Get statistics from a ledger +* [ReadStats](docs/sdks/stats/README.md#readstats) - Get statistics from a ledger -### Transactions +### [Transactions](docs/sdks/transactions/README.md) -* `CreateTransactions` - Create a new batch of transactions to a ledger -* `AddMetadataOnTransaction` - Set the metadata of a transaction by its ID -* `CountTransactions` - Count the transactions from a ledger -* `CreateTransaction` - Create a new transaction to a ledger -* `GetTransaction` - Get transaction from a ledger by its ID -* `ListTransactions` - List transactions from a ledger -* `RevertTransaction` - Revert a ledger transaction by its ID +* [CreateTransactions](docs/sdks/transactions/README.md#createtransactions) - Create a new batch of transactions to a ledger +* [AddMetadataOnTransaction](docs/sdks/transactions/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID +* [CountTransactions](docs/sdks/transactions/README.md#counttransactions) - Count the transactions from a ledger +* [CreateTransaction](docs/sdks/transactions/README.md#createtransaction) - Create a new transaction to a ledger +* [GetTransaction](docs/sdks/transactions/README.md#gettransaction) - Get transaction from a ledger by its ID +* [ListTransactions](docs/sdks/transactions/README.md#listtransactions) - List transactions from a ledger +* [RevertTransaction](docs/sdks/transactions/README.md#reverttransaction) - Revert a ledger transaction by its ID -### Users +### [Users](docs/sdks/users/README.md) -* `ListUsers` - List users -* `ReadUser` - Read user +* [ListUsers](docs/sdks/users/README.md#listusers) - List users +* [ReadUser](docs/sdks/users/README.md#readuser) - Read user -### Wallets +### [Wallets](docs/sdks/wallets/README.md) -* `ConfirmHold` - Confirm a hold -* `CreateBalance` - Create a balance -* `CreateWallet` - Create a new wallet -* `CreditWallet` - Credit a wallet -* `DebitWallet` - Debit a wallet -* `GetBalance` - Get detailed balance -* `GetHold` - Get a hold -* `GetHolds` - Get all holds for a wallet -* `GetTransactions` -* `GetWallet` - Get a wallet -* `ListBalances` - List balances of a wallet -* `ListWallets` - List all wallets -* `UpdateWallet` - Update a wallet -* `VoidHold` - Cancel a hold -* `WalletsgetServerInfo` - Get server info +* [ConfirmHold](docs/sdks/wallets/README.md#confirmhold) - Confirm a hold +* [CreateBalance](docs/sdks/wallets/README.md#createbalance) - Create a balance +* [CreateWallet](docs/sdks/wallets/README.md#createwallet) - Create a new wallet +* [CreditWallet](docs/sdks/wallets/README.md#creditwallet) - Credit a wallet +* [DebitWallet](docs/sdks/wallets/README.md#debitwallet) - Debit a wallet +* [GetBalance](docs/sdks/wallets/README.md#getbalance) - Get detailed balance +* [GetHold](docs/sdks/wallets/README.md#gethold) - Get a hold +* [GetHolds](docs/sdks/wallets/README.md#getholds) - Get all holds for a wallet +* [GetTransactions](docs/sdks/wallets/README.md#gettransactions) +* [GetWallet](docs/sdks/wallets/README.md#getwallet) - Get a wallet +* [ListBalances](docs/sdks/wallets/README.md#listbalances) - List balances of a wallet +* [ListWallets](docs/sdks/wallets/README.md#listwallets) - List all wallets +* [UpdateWallet](docs/sdks/wallets/README.md#updatewallet) - Update a wallet +* [VoidHold](docs/sdks/wallets/README.md#voidhold) - Cancel a hold +* [WalletsgetServerInfo](docs/sdks/wallets/README.md#walletsgetserverinfo) - Get server info -### Webhooks +### [Webhooks](docs/sdks/webhooks/README.md) -* `ActivateConfig` - Activate one config -* `ChangeConfigSecret` - Change the signing secret of a config -* `DeactivateConfig` - Deactivate one config -* `DeleteConfig` - Delete one config -* `GetManyConfigs` - Get many configs -* `InsertConfig` - Insert a new config -* `TestConfig` - Test one config +* [ActivateConfig](docs/sdks/webhooks/README.md#activateconfig) - Activate one config +* [ChangeConfigSecret](docs/sdks/webhooks/README.md#changeconfigsecret) - Change the signing secret of a config +* [DeactivateConfig](docs/sdks/webhooks/README.md#deactivateconfig) - Deactivate one config +* [DeleteConfig](docs/sdks/webhooks/README.md#deleteconfig) - Delete one config +* [GetManyConfigs](docs/sdks/webhooks/README.md#getmanyconfigs) - Get many configs +* [InsertConfig](docs/sdks/webhooks/README.md#insertconfig) - Insert a new config +* [TestConfig](docs/sdks/webhooks/README.md#testconfig) - Test one config + + + + + + + + + + + +# Error Handling + +Handling errors in your SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass. + + + + + + + +# Server Selection + +## Select Server by Index + +You can override the default server globally using the `WithServerIndex` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `http://localhost` | None | +| 1 | `https://{organization}.sandbox.formance.cloud` | `organization` | + + +Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so: + * `WithOrganization string` + +For example: + + +```go +package main + +import ( + "context" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "log" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + formancegosdk.WithServerIndex(1), + ) + + ctx := context.Background() + res, err := s.Formance.GetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} + +``` + + +## Override Server URL Per-Client + +The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example: + + +```go +package main + +import ( + "context" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "log" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + formancegosdk.WithServerURL("http://localhost"), + ) + + ctx := context.Background() + res, err := s.Formance.GetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} + +``` + + + + + +# Custom HTTP Client + +The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface: + +```go +type HTTPClient interface { + Do(req *http.Request) (*http.Response, error) +} +``` + +The built-in `net/http` client satisfies this interface and a default client based on the built-in is provided by default. To replace this default with a client of your own, you can implement this interface yourself or provide your own client configured as desired. Here's a simple example, which adds a client with a 30 second timeout. + +```go +import ( + "net/http" + "time" + "github.com/myorg/your-go-sdk" +) + +var ( + httpClient = &http.Client{Timeout: 30 * time.Second} + sdkClient = sdk.New(sdk.WithClient(httpClient)) +) +``` + +This can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration. + + + + + + + + + + + + ### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) diff --git a/RELEASES.md b/RELEASES.md index 01be622..a3dc250 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -110,4 +110,14 @@ Based on: - OpenAPI Doc v1.0.0-rc.5 ./stack.yaml - Speakeasy CLI 1.12.0 https://github.com/speakeasy-api/speakeasy ### Releases -- [Go v0.3.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.3.1 - . \ No newline at end of file +- [Go v0.3.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.3.1 - . + +## 2023-11-06 00:40:07 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.112.1 (2.173.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.4.0] . +### Releases +- [Go v0.4.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.4.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 49cb03d..797b372 100755 --- a/USAGE.md +++ b/USAGE.md @@ -1,31 +1,31 @@ + + ```go package main import ( - "context" - "log" - "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "context" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "log" ) func main() { - s := formance.New( - WithSecurity( shared.Security{ - Authorization: "Bearer YOUR_ACCESS_TOKEN_HERE", - }), - ) + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) - ctx := context.Background() - res, err := s.GetServerInfo(ctx) - if err != nil { - log.Fatal(err) - } + ctx := context.Background() + res, err := s.Formance.GetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } - if res.ServerInfo != nil { - // handle response - } + if res.ServerInfo != nil { + // handle response + } } + ``` \ No newline at end of file diff --git a/accounts.go b/accounts.go index 5ce21a9..b29c58a 100755 --- a/accounts.go +++ b/accounts.go @@ -1,40 +1,45 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// accounts - Everything related to Accounts type accounts struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newAccounts(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *accounts { +func newAccounts(sdkConfig sdkConfiguration) *accounts { return &accounts{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // AddMetadataToAccount - Add metadata to an account -func (s *accounts) AddMetadataToAccount(ctx context.Context, request operations.AddMetadataToAccountRequest) (*operations.AddMetadataToAccountResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}/metadata", request, nil) +func (s *accounts) AddMetadataToAccount(ctx context.Context, requestBody map[string]interface{}, address string, ledger string) (*operations.AddMetadataToAccountResponse, error) { + request := operations.AddMetadataToAccountRequest{ + RequestBody: requestBody, + Address: address, + Ledger: ledger, + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "RequestBody", "json") + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}/metadata", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, true, false, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -46,10 +51,12 @@ func (s *accounts) AddMetadataToAccount(ctx context.Context, request operations. if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -58,7 +65,6 @@ func (s *accounts) AddMetadataToAccount(ctx context.Context, request operations. if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -67,17 +73,26 @@ func (s *accounts) AddMetadataToAccount(ctx context.Context, request operations. ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -85,20 +100,31 @@ func (s *accounts) AddMetadataToAccount(ctx context.Context, request operations. } // CountAccounts - Count the accounts from a ledger -func (s *accounts) CountAccounts(ctx context.Context, request operations.CountAccountsRequest) (*operations.CountAccountsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) +func (s *accounts) CountAccounts(ctx context.Context, ledger string, address *string, metadata *operations.CountAccountsMetadata) (*operations.CountAccountsResponse, error) { + request := operations.CountAccountsRequest{ + Ledger: ledger, + Address: address, + Metadata: metadata, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "HEAD", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -107,7 +133,6 @@ func (s *accounts) CountAccounts(ctx context.Context, request operations.CountAc if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -116,6 +141,13 @@ func (s *accounts) CountAccounts(ctx context.Context, request operations.CountAc ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: res.Headers = httpRes.Header @@ -123,12 +155,14 @@ func (s *accounts) CountAccounts(ctx context.Context, request operations.CountAc default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -136,16 +170,26 @@ func (s *accounts) CountAccounts(ctx context.Context, request operations.CountAc } // GetAccount - Get account by its address -func (s *accounts) GetAccount(ctx context.Context, request operations.GetAccountRequest) (*operations.GetAccountResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}", request, nil) +func (s *accounts) GetAccount(ctx context.Context, address string, ledger string) (*operations.GetAccountResponse, error) { + request := operations.GetAccountRequest{ + Address: address, + Ledger: ledger, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -154,7 +198,6 @@ func (s *accounts) GetAccount(ctx context.Context, request operations.GetAccount if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -163,26 +206,37 @@ func (s *accounts) GetAccount(ctx context.Context, request operations.GetAccount ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.AccountResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.AccountResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.AccountResponse = out + res.AccountResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -192,19 +246,24 @@ func (s *accounts) GetAccount(ctx context.Context, request operations.GetAccount // ListAccounts - List accounts from a ledger // List accounts from a ledger, sorted by address in descending order. func (s *accounts) ListAccounts(ctx context.Context, request operations.ListAccountsRequest) (*operations.ListAccountsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -213,7 +272,6 @@ func (s *accounts) ListAccounts(ctx context.Context, request operations.ListAcco if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -222,26 +280,37 @@ func (s *accounts) ListAccounts(ctx context.Context, request operations.ListAcco ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.AccountsCursorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.AccountsCursorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.AccountsCursorResponse = out + res.AccountsCursorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/balances.go b/balances.go index 06b0399..9ed378c 100755 --- a/balances.go +++ b/balances.go @@ -1,49 +1,50 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// balances - Everything related to Balances type balances struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newBalances(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *balances { +func newBalances(sdkConfig sdkConfiguration) *balances { return &balances{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // GetBalances - Get the balances from a ledger's account func (s *balances) GetBalances(ctx context.Context, request operations.GetBalancesRequest) (*operations.GetBalancesResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/balances", request, nil) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/balances", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -52,7 +53,6 @@ func (s *balances) GetBalances(ctx context.Context, request operations.GetBalanc if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -61,26 +61,37 @@ func (s *balances) GetBalances(ctx context.Context, request operations.GetBalanc ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.BalancesCursorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.BalancesCursorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.BalancesCursorResponse = out + res.BalancesCursorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -88,20 +99,30 @@ func (s *balances) GetBalances(ctx context.Context, request operations.GetBalanc } // GetBalancesAggregated - Get the aggregated balances from selected accounts -func (s *balances) GetBalancesAggregated(ctx context.Context, request operations.GetBalancesAggregatedRequest) (*operations.GetBalancesAggregatedResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/aggregate/balances", request, nil) +func (s *balances) GetBalancesAggregated(ctx context.Context, ledger string, address *string) (*operations.GetBalancesAggregatedResponse, error) { + request := operations.GetBalancesAggregatedRequest{ + Ledger: ledger, + Address: address, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/aggregate/balances", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -110,7 +131,6 @@ func (s *balances) GetBalancesAggregated(ctx context.Context, request operations if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -119,26 +139,37 @@ func (s *balances) GetBalancesAggregated(ctx context.Context, request operations ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.AggregateBalancesResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.AggregateBalancesResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.AggregateBalancesResponse = out + res.AggregateBalancesResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/clients.go b/clients.go index 1e14b21..2c44822 100755 --- a/clients.go +++ b/clients.go @@ -1,46 +1,52 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// clients - Everything related to Clients type clients struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newClients(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *clients { +func newClients(sdkConfig sdkConfiguration) *clients { return &clients{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // AddScopeToClient - Add scope to client -func (s *clients) AddScopeToClient(ctx context.Context, request operations.AddScopeToClientRequest) (*operations.AddScopeToClientResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) +func (s *clients) AddScopeToClient(ctx context.Context, clientID string, scopeID string) (*operations.AddScopeToClientResponse, error) { + request := operations.AddScopeToClientRequest{ + ClientID: clientID, + ScopeID: scopeID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -49,7 +55,6 @@ func (s *clients) AddScopeToClient(ctx context.Context, request operations.AddSc if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -58,6 +63,13 @@ func (s *clients) AddScopeToClient(ctx context.Context, request operations.AddSc ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -66,11 +78,11 @@ func (s *clients) AddScopeToClient(ctx context.Context, request operations.AddSc } // CreateClient - Create client -func (s *clients) CreateClient(ctx context.Context, request shared.CreateClientRequest) (*operations.CreateClientResponse, error) { - baseURL := s.serverURL +func (s *clients) CreateClient(ctx context.Context, request *shared.CreateClientRequest) (*operations.CreateClientResponse, error) { + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/clients" - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Request", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -79,10 +91,12 @@ func (s *clients) CreateClient(ctx context.Context, request shared.CreateClientR if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -91,7 +105,6 @@ func (s *clients) CreateClient(ctx context.Context, request shared.CreateClientR if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -100,16 +113,25 @@ func (s *clients) CreateClient(ctx context.Context, request shared.CreateClientR ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 201: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.CreateClientResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.CreateClientResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.CreateClientResponse = out + res.CreateClientResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -117,11 +139,19 @@ func (s *clients) CreateClient(ctx context.Context, request shared.CreateClientR } // CreateSecret - Add a secret to a client -func (s *clients) CreateSecret(ctx context.Context, request operations.CreateSecretRequest) (*operations.CreateSecretResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets", request, nil) +func (s *clients) CreateSecret(ctx context.Context, clientID string, createSecretRequest *shared.CreateSecretRequest) (*operations.CreateSecretResponse, error) { + request := operations.CreateSecretRequest{ + ClientID: clientID, + CreateSecretRequest: createSecretRequest, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "CreateSecretRequest", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreateSecretRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -130,10 +160,12 @@ func (s *clients) CreateSecret(ctx context.Context, request operations.CreateSec if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -142,7 +174,6 @@ func (s *clients) CreateSecret(ctx context.Context, request operations.CreateSec if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -151,16 +182,25 @@ func (s *clients) CreateSecret(ctx context.Context, request operations.CreateSec ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.CreateSecretResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.CreateSecretResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.CreateSecretResponse = out + res.CreateSecretResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -168,16 +208,25 @@ func (s *clients) CreateSecret(ctx context.Context, request operations.CreateSec } // DeleteClient - Delete client -func (s *clients) DeleteClient(ctx context.Context, request operations.DeleteClientRequest) (*operations.DeleteClientResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) +func (s *clients) DeleteClient(ctx context.Context, clientID string) (*operations.DeleteClientResponse, error) { + request := operations.DeleteClientRequest{ + ClientID: clientID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -186,7 +235,6 @@ func (s *clients) DeleteClient(ctx context.Context, request operations.DeleteCli if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -195,6 +243,13 @@ func (s *clients) DeleteClient(ctx context.Context, request operations.DeleteCli ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -203,16 +258,26 @@ func (s *clients) DeleteClient(ctx context.Context, request operations.DeleteCli } // DeleteScopeFromClient - Delete scope from client -func (s *clients) DeleteScopeFromClient(ctx context.Context, request operations.DeleteScopeFromClientRequest) (*operations.DeleteScopeFromClientResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) +func (s *clients) DeleteScopeFromClient(ctx context.Context, clientID string, scopeID string) (*operations.DeleteScopeFromClientResponse, error) { + request := operations.DeleteScopeFromClientRequest{ + ClientID: clientID, + ScopeID: scopeID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -221,7 +286,6 @@ func (s *clients) DeleteScopeFromClient(ctx context.Context, request operations. if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -230,6 +294,13 @@ func (s *clients) DeleteScopeFromClient(ctx context.Context, request operations. ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -238,16 +309,26 @@ func (s *clients) DeleteScopeFromClient(ctx context.Context, request operations. } // DeleteSecret - Delete a secret from a client -func (s *clients) DeleteSecret(ctx context.Context, request operations.DeleteSecretRequest) (*operations.DeleteSecretResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets/{secretId}", request, nil) +func (s *clients) DeleteSecret(ctx context.Context, clientID string, secretID string) (*operations.DeleteSecretResponse, error) { + request := operations.DeleteSecretRequest{ + ClientID: clientID, + SecretID: secretID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets/{secretId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -256,7 +337,6 @@ func (s *clients) DeleteSecret(ctx context.Context, request operations.DeleteSec if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -265,6 +345,13 @@ func (s *clients) DeleteSecret(ctx context.Context, request operations.DeleteSec ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -274,15 +361,17 @@ func (s *clients) DeleteSecret(ctx context.Context, request operations.DeleteSec // ListClients - List clients func (s *clients) ListClients(ctx context.Context) (*operations.ListClientsResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/clients" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -291,7 +380,6 @@ func (s *clients) ListClients(ctx context.Context) (*operations.ListClientsRespo if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -300,16 +388,25 @@ func (s *clients) ListClients(ctx context.Context) (*operations.ListClientsRespo ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ListClientsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ListClientsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ListClientsResponse = out + res.ListClientsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -317,16 +414,25 @@ func (s *clients) ListClients(ctx context.Context) (*operations.ListClientsRespo } // ReadClient - Read client -func (s *clients) ReadClient(ctx context.Context, request operations.ReadClientRequest) (*operations.ReadClientResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) +func (s *clients) ReadClient(ctx context.Context, clientID string) (*operations.ReadClientResponse, error) { + request := operations.ReadClientRequest{ + ClientID: clientID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -335,7 +441,6 @@ func (s *clients) ReadClient(ctx context.Context, request operations.ReadClientR if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -344,16 +449,25 @@ func (s *clients) ReadClient(ctx context.Context, request operations.ReadClientR ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ReadClientResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ReadClientResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ReadClientResponse = out + res.ReadClientResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -361,11 +475,19 @@ func (s *clients) ReadClient(ctx context.Context, request operations.ReadClientR } // UpdateClient - Update client -func (s *clients) UpdateClient(ctx context.Context, request operations.UpdateClientRequest) (*operations.UpdateClientResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) +func (s *clients) UpdateClient(ctx context.Context, clientID string, updateClientRequest *shared.UpdateClientRequest) (*operations.UpdateClientResponse, error) { + request := operations.UpdateClientRequest{ + ClientID: clientID, + UpdateClientRequest: updateClientRequest, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "UpdateClientRequest", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateClientRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -374,10 +496,12 @@ func (s *clients) UpdateClient(ctx context.Context, request operations.UpdateCli if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -386,7 +510,6 @@ func (s *clients) UpdateClient(ctx context.Context, request operations.UpdateCli if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -395,16 +518,25 @@ func (s *clients) UpdateClient(ctx context.Context, request operations.UpdateCli ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.UpdateClientResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.UpdateClientResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.UpdateClientResponse = out + res.UpdateClientResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/docs/models/operations/activateconfigrequest.md b/docs/models/operations/activateconfigrequest.md new file mode 100755 index 0000000..4279932 --- /dev/null +++ b/docs/models/operations/activateconfigrequest.md @@ -0,0 +1,8 @@ +# ActivateConfigRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | \ No newline at end of file diff --git a/docs/models/operations/activateconfigresponse.md b/docs/models/operations/activateconfigresponse.md new file mode 100755 index 0000000..36a9052 --- /dev/null +++ b/docs/models/operations/activateconfigresponse.md @@ -0,0 +1,11 @@ +# ActivateConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully activated. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addmetadataontransactionrequest.md b/docs/models/operations/addmetadataontransactionrequest.md new file mode 100755 index 0000000..15302f5 --- /dev/null +++ b/docs/models/operations/addmetadataontransactionrequest.md @@ -0,0 +1,10 @@ +# AddMetadataOnTransactionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | +| `RequestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | [object Object] | \ No newline at end of file diff --git a/docs/models/operations/addmetadataontransactionresponse.md b/docs/models/operations/addmetadataontransactionresponse.md new file mode 100755 index 0000000..37afeaa --- /dev/null +++ b/docs/models/operations/addmetadataontransactionresponse.md @@ -0,0 +1,11 @@ +# AddMetadataOnTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addmetadatatoaccountrequest.md b/docs/models/operations/addmetadatatoaccountrequest.md new file mode 100755 index 0000000..17f0b5d --- /dev/null +++ b/docs/models/operations/addmetadatatoaccountrequest.md @@ -0,0 +1,10 @@ +# AddMetadataToAccountRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `RequestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | [object Object] | +| `Address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/addmetadatatoaccountresponse.md b/docs/models/operations/addmetadatatoaccountresponse.md new file mode 100755 index 0000000..2a99068 --- /dev/null +++ b/docs/models/operations/addmetadatatoaccountresponse.md @@ -0,0 +1,11 @@ +# AddMetadataToAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addscopetoclientrequest.md b/docs/models/operations/addscopetoclientrequest.md new file mode 100755 index 0000000..7748807 --- /dev/null +++ b/docs/models/operations/addscopetoclientrequest.md @@ -0,0 +1,9 @@ +# AddScopeToClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | \ No newline at end of file diff --git a/docs/models/operations/addscopetoclientresponse.md b/docs/models/operations/addscopetoclientresponse.md new file mode 100755 index 0000000..192bbc5 --- /dev/null +++ b/docs/models/operations/addscopetoclientresponse.md @@ -0,0 +1,10 @@ +# AddScopeToClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addtransientscoperequest.md b/docs/models/operations/addtransientscoperequest.md new file mode 100755 index 0000000..32ebacf --- /dev/null +++ b/docs/models/operations/addtransientscoperequest.md @@ -0,0 +1,9 @@ +# AddTransientScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | +| `TransientScopeID` | *string* | :heavy_check_mark: | Transient scope ID | \ No newline at end of file diff --git a/docs/models/operations/addtransientscoperesponse.md b/docs/models/operations/addtransientscoperesponse.md new file mode 100755 index 0000000..7ceda34 --- /dev/null +++ b/docs/models/operations/addtransientscoperesponse.md @@ -0,0 +1,10 @@ +# AddTransientScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/changeconfigsecretrequest.md b/docs/models/operations/changeconfigsecretrequest.md new file mode 100755 index 0000000..7da1f3e --- /dev/null +++ b/docs/models/operations/changeconfigsecretrequest.md @@ -0,0 +1,9 @@ +# ChangeConfigSecretRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | +| `ConfigChangeSecret` | [*shared.ConfigChangeSecret](../../models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/changeconfigsecretresponse.md b/docs/models/operations/changeconfigsecretresponse.md new file mode 100755 index 0000000..a36d563 --- /dev/null +++ b/docs/models/operations/changeconfigsecretresponse.md @@ -0,0 +1,11 @@ +# ChangeConfigSecretResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Secret successfully changed. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/confirmholdrequest.md b/docs/models/operations/confirmholdrequest.md new file mode 100755 index 0000000..8c17599 --- /dev/null +++ b/docs/models/operations/confirmholdrequest.md @@ -0,0 +1,9 @@ +# ConfirmHoldRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `HoldID` | *string* | :heavy_check_mark: | N/A | +| `ConfirmHoldRequest` | [*shared.ConfirmHoldRequest](../../models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/confirmholdresponse.md b/docs/models/operations/confirmholdresponse.md new file mode 100755 index 0000000..f005845 --- /dev/null +++ b/docs/models/operations/confirmholdresponse.md @@ -0,0 +1,11 @@ +# ConfirmHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/connectorsstripetransferresponse.md b/docs/models/operations/connectorsstripetransferresponse.md new file mode 100755 index 0000000..eaf1f61 --- /dev/null +++ b/docs/models/operations/connectorsstripetransferresponse.md @@ -0,0 +1,11 @@ +# ConnectorsStripeTransferResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `StripeTransferResponse` | [*shared.StripeTransferResponse](../../models/shared/stripetransferresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/countaccountsmetadata.md b/docs/models/operations/countaccountsmetadata.md new file mode 100755 index 0000000..aa8a196 --- /dev/null +++ b/docs/models/operations/countaccountsmetadata.md @@ -0,0 +1,9 @@ +# CountAccountsMetadata + +Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/countaccountsrequest.md b/docs/models/operations/countaccountsrequest.md new file mode 100755 index 0000000..e17b8d3 --- /dev/null +++ b/docs/models/operations/countaccountsrequest.md @@ -0,0 +1,10 @@ +# CountAccountsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | +| `Metadata` | [*CountAccountsMetadata](../../models/operations/countaccountsmetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | \ No newline at end of file diff --git a/docs/models/operations/countaccountsresponse.md b/docs/models/operations/countaccountsresponse.md new file mode 100755 index 0000000..54f910b --- /dev/null +++ b/docs/models/operations/countaccountsresponse.md @@ -0,0 +1,12 @@ +# CountAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/counttransactionsmetadata.md b/docs/models/operations/counttransactionsmetadata.md new file mode 100755 index 0000000..bd9fe8c --- /dev/null +++ b/docs/models/operations/counttransactionsmetadata.md @@ -0,0 +1,9 @@ +# CountTransactionsMetadata + +Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/counttransactionsrequest.md b/docs/models/operations/counttransactionsrequest.md new file mode 100755 index 0000000..02fd870 --- /dev/null +++ b/docs/models/operations/counttransactionsrequest.md @@ -0,0 +1,17 @@ +# CountTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Account` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). | users:001 | +| `Destination` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). | users:001 | +| `EndTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
| | +| ~~`EndTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use `endTime` instead.
| | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Metadata` | [*CountTransactionsMetadata](../../models/operations/counttransactionsmetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Reference` | **string* | :heavy_minus_sign: | Filter transactions by reference field. | ref:001 | +| `Source` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account at source (regular expression placed between ^ and $). | users:001 | +| `StartTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
| | +| ~~`StartTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use `startTime` instead.
| | \ No newline at end of file diff --git a/docs/models/operations/counttransactionsresponse.md b/docs/models/operations/counttransactionsresponse.md new file mode 100755 index 0000000..12cf513 --- /dev/null +++ b/docs/models/operations/counttransactionsresponse.md @@ -0,0 +1,12 @@ +# CountTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createbalancerequest.md b/docs/models/operations/createbalancerequest.md new file mode 100755 index 0000000..0608572 --- /dev/null +++ b/docs/models/operations/createbalancerequest.md @@ -0,0 +1,9 @@ +# CreateBalanceRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `CreateBalanceRequest` | [*shared.CreateBalanceRequest](../../models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createbalanceresponse.md b/docs/models/operations/createbalanceresponse.md new file mode 100755 index 0000000..3288552 --- /dev/null +++ b/docs/models/operations/createbalanceresponse.md @@ -0,0 +1,12 @@ +# CreateBalanceResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateBalanceResponse` | [*shared.CreateBalanceResponse](../../models/shared/createbalanceresponse.md) | :heavy_minus_sign: | Created balance | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createclientresponse.md b/docs/models/operations/createclientresponse.md new file mode 100755 index 0000000..0ae3736 --- /dev/null +++ b/docs/models/operations/createclientresponse.md @@ -0,0 +1,11 @@ +# CreateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateClientResponse` | [*shared.CreateClientResponse](../../models/shared/createclientresponse.md) | :heavy_minus_sign: | Client created | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createscoperesponse.md b/docs/models/operations/createscoperesponse.md new file mode 100755 index 0000000..11dfd1e --- /dev/null +++ b/docs/models/operations/createscoperesponse.md @@ -0,0 +1,11 @@ +# CreateScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateScopeResponse` | [*shared.CreateScopeResponse](../../models/shared/createscoperesponse.md) | :heavy_minus_sign: | Created scope | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createsecretrequest.md b/docs/models/operations/createsecretrequest.md new file mode 100755 index 0000000..b5a08e3 --- /dev/null +++ b/docs/models/operations/createsecretrequest.md @@ -0,0 +1,9 @@ +# CreateSecretRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | +| `CreateSecretRequest` | [*shared.CreateSecretRequest](../../models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createsecretresponse.md b/docs/models/operations/createsecretresponse.md new file mode 100755 index 0000000..f2ebbae --- /dev/null +++ b/docs/models/operations/createsecretresponse.md @@ -0,0 +1,11 @@ +# CreateSecretResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateSecretResponse` | [*shared.CreateSecretResponse](../../models/shared/createsecretresponse.md) | :heavy_minus_sign: | Created secret | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createtransactionrequest.md b/docs/models/operations/createtransactionrequest.md new file mode 100755 index 0000000..2603d41 --- /dev/null +++ b/docs/models/operations/createtransactionrequest.md @@ -0,0 +1,10 @@ +# CreateTransactionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PostTransaction` | [shared.PostTransaction](../../models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | \ No newline at end of file diff --git a/docs/models/operations/createtransactionresponse.md b/docs/models/operations/createtransactionresponse.md new file mode 100755 index 0000000..ed87667 --- /dev/null +++ b/docs/models/operations/createtransactionresponse.md @@ -0,0 +1,12 @@ +# CreateTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionsResponse` | [*shared.TransactionsResponse](../../models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/createtransactionsrequest.md b/docs/models/operations/createtransactionsrequest.md new file mode 100755 index 0000000..87a865c --- /dev/null +++ b/docs/models/operations/createtransactionsrequest.md @@ -0,0 +1,9 @@ +# CreateTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `Transactions` | [shared.Transactions](../../models/shared/transactions.md) | :heavy_check_mark: | N/A | | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/createtransactionsresponse.md b/docs/models/operations/createtransactionsresponse.md new file mode 100755 index 0000000..ce2d90d --- /dev/null +++ b/docs/models/operations/createtransactionsresponse.md @@ -0,0 +1,12 @@ +# CreateTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionsResponse` | [*shared.TransactionsResponse](../../models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/createwalletresponse.md b/docs/models/operations/createwalletresponse.md new file mode 100755 index 0000000..d0592f1 --- /dev/null +++ b/docs/models/operations/createwalletresponse.md @@ -0,0 +1,12 @@ +# CreateWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateWalletResponse` | [*shared.CreateWalletResponse](../../models/shared/createwalletresponse.md) | :heavy_minus_sign: | Wallet created | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createworkflowresponse.md b/docs/models/operations/createworkflowresponse.md new file mode 100755 index 0000000..1b1d6aa --- /dev/null +++ b/docs/models/operations/createworkflowresponse.md @@ -0,0 +1,12 @@ +# CreateWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateWorkflowResponse` | [*shared.CreateWorkflowResponse](../../models/shared/createworkflowresponse.md) | :heavy_minus_sign: | Created workflow | +| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/creditwalletrequest.md b/docs/models/operations/creditwalletrequest.md new file mode 100755 index 0000000..4522463 --- /dev/null +++ b/docs/models/operations/creditwalletrequest.md @@ -0,0 +1,9 @@ +# CreditWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `CreditWalletRequest` | [*shared.CreditWalletRequest](../../models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/creditwalletresponse.md b/docs/models/operations/creditwalletresponse.md new file mode 100755 index 0000000..4f1ec99 --- /dev/null +++ b/docs/models/operations/creditwalletresponse.md @@ -0,0 +1,11 @@ +# CreditWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deactivateconfigrequest.md b/docs/models/operations/deactivateconfigrequest.md new file mode 100755 index 0000000..2604bd4 --- /dev/null +++ b/docs/models/operations/deactivateconfigrequest.md @@ -0,0 +1,8 @@ +# DeactivateConfigRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | \ No newline at end of file diff --git a/docs/models/operations/deactivateconfigresponse.md b/docs/models/operations/deactivateconfigresponse.md new file mode 100755 index 0000000..15ffb93 --- /dev/null +++ b/docs/models/operations/deactivateconfigresponse.md @@ -0,0 +1,11 @@ +# DeactivateConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully deactivated. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/debitwalletrequest.md b/docs/models/operations/debitwalletrequest.md new file mode 100755 index 0000000..ad31eae --- /dev/null +++ b/docs/models/operations/debitwalletrequest.md @@ -0,0 +1,9 @@ +# DebitWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `DebitWalletRequest` | [*shared.DebitWalletRequest](../../models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/debitwalletresponse.md b/docs/models/operations/debitwalletresponse.md new file mode 100755 index 0000000..a8b527b --- /dev/null +++ b/docs/models/operations/debitwalletresponse.md @@ -0,0 +1,12 @@ +# DebitWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `DebitWalletResponse` | [*shared.DebitWalletResponse](../../models/shared/debitwalletresponse.md) | :heavy_minus_sign: | Wallet successfully debited as a pending hold | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deleteclientrequest.md b/docs/models/operations/deleteclientrequest.md new file mode 100755 index 0000000..44fe54f --- /dev/null +++ b/docs/models/operations/deleteclientrequest.md @@ -0,0 +1,8 @@ +# DeleteClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | \ No newline at end of file diff --git a/docs/models/operations/deleteclientresponse.md b/docs/models/operations/deleteclientresponse.md new file mode 100755 index 0000000..ac17a0a --- /dev/null +++ b/docs/models/operations/deleteclientresponse.md @@ -0,0 +1,10 @@ +# DeleteClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deleteconfigrequest.md b/docs/models/operations/deleteconfigrequest.md new file mode 100755 index 0000000..e143e30 --- /dev/null +++ b/docs/models/operations/deleteconfigrequest.md @@ -0,0 +1,8 @@ +# DeleteConfigRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | \ No newline at end of file diff --git a/docs/models/operations/deleteconfigresponse.md b/docs/models/operations/deleteconfigresponse.md new file mode 100755 index 0000000..306c77b --- /dev/null +++ b/docs/models/operations/deleteconfigresponse.md @@ -0,0 +1,10 @@ +# DeleteConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deletescopefromclientrequest.md b/docs/models/operations/deletescopefromclientrequest.md new file mode 100755 index 0000000..1f75874 --- /dev/null +++ b/docs/models/operations/deletescopefromclientrequest.md @@ -0,0 +1,9 @@ +# DeleteScopeFromClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | \ No newline at end of file diff --git a/docs/models/operations/deletescopefromclientresponse.md b/docs/models/operations/deletescopefromclientresponse.md new file mode 100755 index 0000000..ea34061 --- /dev/null +++ b/docs/models/operations/deletescopefromclientresponse.md @@ -0,0 +1,10 @@ +# DeleteScopeFromClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deletescoperequest.md b/docs/models/operations/deletescoperequest.md new file mode 100755 index 0000000..ae3e48a --- /dev/null +++ b/docs/models/operations/deletescoperequest.md @@ -0,0 +1,8 @@ +# DeleteScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | \ No newline at end of file diff --git a/docs/models/operations/deletescoperesponse.md b/docs/models/operations/deletescoperesponse.md new file mode 100755 index 0000000..165d20c --- /dev/null +++ b/docs/models/operations/deletescoperesponse.md @@ -0,0 +1,10 @@ +# DeleteScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deletesecretrequest.md b/docs/models/operations/deletesecretrequest.md new file mode 100755 index 0000000..0091443 --- /dev/null +++ b/docs/models/operations/deletesecretrequest.md @@ -0,0 +1,9 @@ +# DeleteSecretRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | +| `SecretID` | *string* | :heavy_check_mark: | Secret ID | \ No newline at end of file diff --git a/docs/models/operations/deletesecretresponse.md b/docs/models/operations/deletesecretresponse.md new file mode 100755 index 0000000..d59ea6b --- /dev/null +++ b/docs/models/operations/deletesecretresponse.md @@ -0,0 +1,10 @@ +# DeleteSecretResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/deletetransientscoperequest.md b/docs/models/operations/deletetransientscoperequest.md new file mode 100755 index 0000000..482c44f --- /dev/null +++ b/docs/models/operations/deletetransientscoperequest.md @@ -0,0 +1,9 @@ +# DeleteTransientScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | +| `TransientScopeID` | *string* | :heavy_check_mark: | Transient scope ID | \ No newline at end of file diff --git a/docs/models/operations/deletetransientscoperesponse.md b/docs/models/operations/deletetransientscoperesponse.md new file mode 100755 index 0000000..6b09320 --- /dev/null +++ b/docs/models/operations/deletetransientscoperesponse.md @@ -0,0 +1,10 @@ +# DeleteTransientScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getaccountrequest.md b/docs/models/operations/getaccountrequest.md new file mode 100755 index 0000000..e7c7fcf --- /dev/null +++ b/docs/models/operations/getaccountrequest.md @@ -0,0 +1,9 @@ +# GetAccountRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `Address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/getaccountresponse.md b/docs/models/operations/getaccountresponse.md new file mode 100755 index 0000000..4f69b0e --- /dev/null +++ b/docs/models/operations/getaccountresponse.md @@ -0,0 +1,12 @@ +# GetAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `AccountResponse` | [*shared.AccountResponse](../../models/shared/accountresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getbalancerequest.md b/docs/models/operations/getbalancerequest.md new file mode 100755 index 0000000..27f8cfb --- /dev/null +++ b/docs/models/operations/getbalancerequest.md @@ -0,0 +1,9 @@ +# GetBalanceRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `BalanceName` | *string* | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getbalanceresponse.md b/docs/models/operations/getbalanceresponse.md new file mode 100755 index 0000000..6bdd936 --- /dev/null +++ b/docs/models/operations/getbalanceresponse.md @@ -0,0 +1,12 @@ +# GetBalanceResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetBalanceResponse` | [*shared.GetBalanceResponse](../../models/shared/getbalanceresponse.md) | :heavy_minus_sign: | Balance summary | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getbalancesaggregatedrequest.md b/docs/models/operations/getbalancesaggregatedrequest.md new file mode 100755 index 0000000..1a648bb --- /dev/null +++ b/docs/models/operations/getbalancesaggregatedrequest.md @@ -0,0 +1,9 @@ +# GetBalancesAggregatedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Address` | **string* | :heavy_minus_sign: | Filter balances involving given account, either as source or destination. | users:001 | \ No newline at end of file diff --git a/docs/models/operations/getbalancesaggregatedresponse.md b/docs/models/operations/getbalancesaggregatedresponse.md new file mode 100755 index 0000000..8729b46 --- /dev/null +++ b/docs/models/operations/getbalancesaggregatedresponse.md @@ -0,0 +1,12 @@ +# GetBalancesAggregatedResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `AggregateBalancesResponse` | [*shared.AggregateBalancesResponse](../../models/shared/aggregatebalancesresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getbalancesrequest.md b/docs/models/operations/getbalancesrequest.md new file mode 100755 index 0000000..e7d5c02 --- /dev/null +++ b/docs/models/operations/getbalancesrequest.md @@ -0,0 +1,12 @@ +# GetBalancesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Address` | **string* | :heavy_minus_sign: | Filter balances involving given account, either as source or destination. | users:001 | +| `After` | **string* | :heavy_minus_sign: | Pagination cursor, will return accounts after given address, in descending order. | users:003 | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
Deprecated, please use `cursor` instead. | aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | \ No newline at end of file diff --git a/docs/models/operations/getbalancesresponse.md b/docs/models/operations/getbalancesresponse.md new file mode 100755 index 0000000..fcad256 --- /dev/null +++ b/docs/models/operations/getbalancesresponse.md @@ -0,0 +1,12 @@ +# GetBalancesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `BalancesCursorResponse` | [*shared.BalancesCursorResponse](../../models/shared/balancescursorresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getconnectortaskrequest.md b/docs/models/operations/getconnectortaskrequest.md new file mode 100755 index 0000000..b59c62d --- /dev/null +++ b/docs/models/operations/getconnectortaskrequest.md @@ -0,0 +1,9 @@ +# GetConnectorTaskRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| `TaskID` | *string* | :heavy_check_mark: | The task ID. | \ No newline at end of file diff --git a/docs/models/operations/getconnectortaskresponse.md b/docs/models/operations/getconnectortaskresponse.md new file mode 100755 index 0000000..2fe2fb5 --- /dev/null +++ b/docs/models/operations/getconnectortaskresponse.md @@ -0,0 +1,11 @@ +# GetConnectorTaskResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TaskResponse` | [*shared.TaskResponse](../../models/shared/taskresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getflowrequest.md b/docs/models/operations/getflowrequest.md new file mode 100755 index 0000000..2caebe4 --- /dev/null +++ b/docs/models/operations/getflowrequest.md @@ -0,0 +1,8 @@ +# GetFlowRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `FlowID` | *string* | :heavy_check_mark: | The flow id | \ No newline at end of file diff --git a/docs/models/operations/getflowresponse.md b/docs/models/operations/getflowresponse.md new file mode 100755 index 0000000..5c7bf8c --- /dev/null +++ b/docs/models/operations/getflowresponse.md @@ -0,0 +1,12 @@ +# GetFlowResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | +| `GetWorkflowResponse` | [*shared.GetWorkflowResponse](../../models/shared/getworkflowresponse.md) | :heavy_minus_sign: | The workflow | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getholdrequest.md b/docs/models/operations/getholdrequest.md new file mode 100755 index 0000000..2dfc2a8 --- /dev/null +++ b/docs/models/operations/getholdrequest.md @@ -0,0 +1,8 @@ +# GetHoldRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `HoldID` | *string* | :heavy_check_mark: | The hold ID | \ No newline at end of file diff --git a/docs/models/operations/getholdresponse.md b/docs/models/operations/getholdresponse.md new file mode 100755 index 0000000..1676405 --- /dev/null +++ b/docs/models/operations/getholdresponse.md @@ -0,0 +1,12 @@ +# GetHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetHoldResponse` | [*shared.GetHoldResponse](../../models/shared/getholdresponse.md) | :heavy_minus_sign: | Holds | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getholdsmetadata.md b/docs/models/operations/getholdsmetadata.md new file mode 100755 index 0000000..03207d0 --- /dev/null +++ b/docs/models/operations/getholdsmetadata.md @@ -0,0 +1,9 @@ +# GetHoldsMetadata + +Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/getholdsrequest.md b/docs/models/operations/getholdsrequest.md new file mode 100755 index 0000000..0c14942 --- /dev/null +++ b/docs/models/operations/getholdsrequest.md @@ -0,0 +1,11 @@ +# GetHoldsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `Metadata` | [*GetHoldsMetadata](../../models/operations/getholdsmetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | +| `WalletID` | **string* | :heavy_minus_sign: | The wallet to filter on | | \ No newline at end of file diff --git a/docs/models/operations/getholdsresponse.md b/docs/models/operations/getholdsresponse.md new file mode 100755 index 0000000..eda9419 --- /dev/null +++ b/docs/models/operations/getholdsresponse.md @@ -0,0 +1,12 @@ +# GetHoldsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetHoldsResponse` | [*shared.GetHoldsResponse](../../models/shared/getholdsresponse.md) | :heavy_minus_sign: | Holds | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getinforesponse.md b/docs/models/operations/getinforesponse.md new file mode 100755 index 0000000..835462c --- /dev/null +++ b/docs/models/operations/getinforesponse.md @@ -0,0 +1,12 @@ +# GetInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ConfigInfoResponse` | [*shared.ConfigInfoResponse](../../models/shared/configinforesponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getledgerinforequest.md b/docs/models/operations/getledgerinforequest.md new file mode 100755 index 0000000..f45b795 --- /dev/null +++ b/docs/models/operations/getledgerinforequest.md @@ -0,0 +1,8 @@ +# GetLedgerInfoRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/getledgerinforesponse.md b/docs/models/operations/getledgerinforesponse.md new file mode 100755 index 0000000..44227bf --- /dev/null +++ b/docs/models/operations/getledgerinforesponse.md @@ -0,0 +1,12 @@ +# GetLedgerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `LedgerInfoResponse` | [*shared.LedgerInfoResponse](../../models/shared/ledgerinforesponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmanyconfigsrequest.md b/docs/models/operations/getmanyconfigsrequest.md new file mode 100755 index 0000000..4d2f18e --- /dev/null +++ b/docs/models/operations/getmanyconfigsrequest.md @@ -0,0 +1,9 @@ +# GetManyConfigsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `Endpoint` | **string* | :heavy_minus_sign: | Optional filter by endpoint URL | https://example.com | +| `ID` | **string* | :heavy_minus_sign: | Optional filter by Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | \ No newline at end of file diff --git a/docs/models/operations/getmanyconfigsresponse.md b/docs/models/operations/getmanyconfigsresponse.md new file mode 100755 index 0000000..d57c1e8 --- /dev/null +++ b/docs/models/operations/getmanyconfigsresponse.md @@ -0,0 +1,11 @@ +# GetManyConfigsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `ConfigsResponse` | [*shared.ConfigsResponse](../../models/shared/configsresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmappingrequest.md b/docs/models/operations/getmappingrequest.md new file mode 100755 index 0000000..1399e12 --- /dev/null +++ b/docs/models/operations/getmappingrequest.md @@ -0,0 +1,8 @@ +# GetMappingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/getmappingresponse.md b/docs/models/operations/getmappingresponse.md new file mode 100755 index 0000000..f2627ff --- /dev/null +++ b/docs/models/operations/getmappingresponse.md @@ -0,0 +1,12 @@ +# GetMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `MappingResponse` | [*shared.MappingResponse](../../models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getpaymentrequest.md b/docs/models/operations/getpaymentrequest.md new file mode 100755 index 0000000..537fe20 --- /dev/null +++ b/docs/models/operations/getpaymentrequest.md @@ -0,0 +1,8 @@ +# GetPaymentRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `PaymentID` | *string* | :heavy_check_mark: | The payment ID. | \ No newline at end of file diff --git a/docs/models/operations/getpaymentresponse.md b/docs/models/operations/getpaymentresponse.md new file mode 100755 index 0000000..f9b6db8 --- /dev/null +++ b/docs/models/operations/getpaymentresponse.md @@ -0,0 +1,11 @@ +# GetPaymentResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `PaymentResponse` | [*shared.PaymentResponse](../../models/shared/paymentresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getserverinforesponse.md b/docs/models/operations/getserverinforesponse.md new file mode 100755 index 0000000..172e4c7 --- /dev/null +++ b/docs/models/operations/getserverinforesponse.md @@ -0,0 +1,11 @@ +# GetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/gettransactionrequest.md b/docs/models/operations/gettransactionrequest.md new file mode 100755 index 0000000..9d6da7d --- /dev/null +++ b/docs/models/operations/gettransactionrequest.md @@ -0,0 +1,9 @@ +# GetTransactionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | \ No newline at end of file diff --git a/docs/models/operations/gettransactionresponse.md b/docs/models/operations/gettransactionresponse.md new file mode 100755 index 0000000..6479ff0 --- /dev/null +++ b/docs/models/operations/gettransactionresponse.md @@ -0,0 +1,12 @@ +# GetTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionResponse` | [*shared.TransactionResponse](../../models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/gettransactionsrequest.md b/docs/models/operations/gettransactionsrequest.md new file mode 100755 index 0000000..76f8dc4 --- /dev/null +++ b/docs/models/operations/gettransactionsrequest.md @@ -0,0 +1,10 @@ +# GetTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the cursor is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | +| `WalletID` | **string* | :heavy_minus_sign: | A wallet ID to filter on | | \ No newline at end of file diff --git a/docs/models/operations/gettransactionsresponse.md b/docs/models/operations/gettransactionsresponse.md new file mode 100755 index 0000000..c99b5fa --- /dev/null +++ b/docs/models/operations/gettransactionsresponse.md @@ -0,0 +1,12 @@ +# GetTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetTransactionsResponse` | [*shared.GetTransactionsResponse](../../models/shared/gettransactionsresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getwalletrequest.md b/docs/models/operations/getwalletrequest.md new file mode 100755 index 0000000..7a7f0a0 --- /dev/null +++ b/docs/models/operations/getwalletrequest.md @@ -0,0 +1,8 @@ +# GetWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getwalletresponse.md b/docs/models/operations/getwalletresponse.md new file mode 100755 index 0000000..50cd33d --- /dev/null +++ b/docs/models/operations/getwalletresponse.md @@ -0,0 +1,12 @@ +# GetWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetWalletResponse` | [*shared.GetWalletResponse](../../models/shared/getwalletresponse.md) | :heavy_minus_sign: | Wallet | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getworkflowoccurrencerequest.md b/docs/models/operations/getworkflowoccurrencerequest.md new file mode 100755 index 0000000..cfb6ecb --- /dev/null +++ b/docs/models/operations/getworkflowoccurrencerequest.md @@ -0,0 +1,9 @@ +# GetWorkflowOccurrenceRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `FlowID` | *string* | :heavy_check_mark: | The flow id | +| `RunID` | *string* | :heavy_check_mark: | The occurrence id | \ No newline at end of file diff --git a/docs/models/operations/getworkflowoccurrenceresponse.md b/docs/models/operations/getworkflowoccurrenceresponse.md new file mode 100755 index 0000000..6973e32 --- /dev/null +++ b/docs/models/operations/getworkflowoccurrenceresponse.md @@ -0,0 +1,12 @@ +# GetWorkflowOccurrenceResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | +| `GetWorkflowOccurrenceResponse` | [*shared.GetWorkflowOccurrenceResponse](../../models/shared/getworkflowoccurrenceresponse.md) | :heavy_minus_sign: | The workflow occurrence | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/insertconfigresponse.md b/docs/models/operations/insertconfigresponse.md new file mode 100755 index 0000000..48b6313 --- /dev/null +++ b/docs/models/operations/insertconfigresponse.md @@ -0,0 +1,12 @@ +# InsertConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Config created successfully. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `InsertConfig400TextPlainString` | **string* | :heavy_minus_sign: | Bad Request | \ No newline at end of file diff --git a/docs/models/operations/installconnectorrequest.md b/docs/models/operations/installconnectorrequest.md new file mode 100755 index 0000000..758c921 --- /dev/null +++ b/docs/models/operations/installconnectorrequest.md @@ -0,0 +1,9 @@ +# InstallConnectorRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `ConnectorConfig` | [shared.ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | +| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/installconnectorresponse.md b/docs/models/operations/installconnectorresponse.md new file mode 100755 index 0000000..b1318b5 --- /dev/null +++ b/docs/models/operations/installconnectorresponse.md @@ -0,0 +1,10 @@ +# InstallConnectorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listaccountsbalanceoperator.md b/docs/models/operations/listaccountsbalanceoperator.md new file mode 100755 index 0000000..3fde0e9 --- /dev/null +++ b/docs/models/operations/listaccountsbalanceoperator.md @@ -0,0 +1,16 @@ +# ListAccountsBalanceOperator + +Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. + + + +## Values + +| Name | Value | +| -------------------------------- | -------------------------------- | +| `ListAccountsBalanceOperatorGte` | gte | +| `ListAccountsBalanceOperatorLte` | lte | +| `ListAccountsBalanceOperatorGt` | gt | +| `ListAccountsBalanceOperatorLt` | lt | +| `ListAccountsBalanceOperatorE` | e | +| `ListAccountsBalanceOperatorNe` | ne | \ No newline at end of file diff --git a/docs/models/operations/listaccountsmetadata.md b/docs/models/operations/listaccountsmetadata.md new file mode 100755 index 0000000..6136598 --- /dev/null +++ b/docs/models/operations/listaccountsmetadata.md @@ -0,0 +1,9 @@ +# ListAccountsMetadata + +Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/listaccountsrequest.md b/docs/models/operations/listaccountsrequest.md new file mode 100755 index 0000000..69d701a --- /dev/null +++ b/docs/models/operations/listaccountsrequest.md @@ -0,0 +1,18 @@ +# ListAccountsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | +| `After` | **string* | :heavy_minus_sign: | Pagination cursor, will return accounts after given address, in descending order. | users:003 | +| `Balance` | **int64* | :heavy_minus_sign: | Filter accounts by their balance (default operator is gte) | 2400 | +| `BalanceOperator` | [*ListAccountsBalanceOperator](../../models/operations/listaccountsbalanceoperator.md) | :heavy_minus_sign: | Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
| gte | +| ~~`BalanceOperatorDeprecated`~~ | [*ListAccountsBalanceOperator](../../models/operations/listaccountsbalanceoperator.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
Deprecated, please use `balanceOperator` instead.
| gte | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Metadata` | [*ListAccountsMetadata](../../models/operations/listaccountsmetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| ~~`PageSizeDeprecated`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The maximum number of results to return per page.
Deprecated, please use `pageSize` instead.
| | +| ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use `cursor` instead.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | \ No newline at end of file diff --git a/docs/models/operations/listaccountsresponse.md b/docs/models/operations/listaccountsresponse.md new file mode 100755 index 0000000..eb8c921 --- /dev/null +++ b/docs/models/operations/listaccountsresponse.md @@ -0,0 +1,12 @@ +# ListAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `AccountsCursorResponse` | [*shared.AccountsCursorResponse](../../models/shared/accountscursorresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listallconnectorsresponse.md b/docs/models/operations/listallconnectorsresponse.md new file mode 100755 index 0000000..ec431eb --- /dev/null +++ b/docs/models/operations/listallconnectorsresponse.md @@ -0,0 +1,11 @@ +# ListAllConnectorsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ConnectorsResponse` | [*shared.ConnectorsResponse](../../models/shared/connectorsresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listbalancesrequest.md b/docs/models/operations/listbalancesrequest.md new file mode 100755 index 0000000..eb35a01 --- /dev/null +++ b/docs/models/operations/listbalancesrequest.md @@ -0,0 +1,8 @@ +# ListBalancesRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listbalancesresponse.md b/docs/models/operations/listbalancesresponse.md new file mode 100755 index 0000000..0c803e7 --- /dev/null +++ b/docs/models/operations/listbalancesresponse.md @@ -0,0 +1,11 @@ +# ListBalancesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListBalancesResponse` | [*shared.ListBalancesResponse](../../models/shared/listbalancesresponse.md) | :heavy_minus_sign: | Balances list | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listclientsresponse.md b/docs/models/operations/listclientsresponse.md new file mode 100755 index 0000000..4a2207e --- /dev/null +++ b/docs/models/operations/listclientsresponse.md @@ -0,0 +1,11 @@ +# ListClientsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListClientsResponse` | [*shared.ListClientsResponse](../../models/shared/listclientsresponse.md) | :heavy_minus_sign: | List of clients | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listconfigsavailableconnectorsresponse.md b/docs/models/operations/listconfigsavailableconnectorsresponse.md new file mode 100755 index 0000000..267f107 --- /dev/null +++ b/docs/models/operations/listconfigsavailableconnectorsresponse.md @@ -0,0 +1,11 @@ +# ListConfigsAvailableConnectorsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `ConnectorsConfigsResponse` | [*shared.ConnectorsConfigsResponse](../../models/shared/connectorsconfigsresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listconnectortasksrequest.md b/docs/models/operations/listconnectortasksrequest.md new file mode 100755 index 0000000..bca1819 --- /dev/null +++ b/docs/models/operations/listconnectortasksrequest.md @@ -0,0 +1,10 @@ +# ListConnectorTasksRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | \ No newline at end of file diff --git a/docs/models/operations/listconnectortasksresponse.md b/docs/models/operations/listconnectortasksresponse.md new file mode 100755 index 0000000..cc9fe0b --- /dev/null +++ b/docs/models/operations/listconnectortasksresponse.md @@ -0,0 +1,11 @@ +# ListConnectorTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TasksCursor` | [*shared.TasksCursor](../../models/shared/taskscursor.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/listflowsresponse.md b/docs/models/operations/listflowsresponse.md new file mode 100755 index 0000000..114b78e --- /dev/null +++ b/docs/models/operations/listflowsresponse.md @@ -0,0 +1,12 @@ +# ListFlowsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | +| `ListWorkflowsResponse` | [*shared.ListWorkflowsResponse](../../models/shared/listworkflowsresponse.md) | :heavy_minus_sign: | List of workflows | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listlogsrequest.md b/docs/models/operations/listlogsrequest.md new file mode 100755 index 0000000..a334098 --- /dev/null +++ b/docs/models/operations/listlogsrequest.md @@ -0,0 +1,17 @@ +# ListLogsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `After` | **string* | :heavy_minus_sign: | Pagination cursor, will return the logs after a given ID. (in descending order). | 1234 | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `EndTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
| | +| ~~`EndTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use `endTime` instead.
| | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| ~~`PageSizeDeprecated`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The maximum number of results to return per page.
Deprecated, please use `pageSize` instead.
| | +| ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use `cursor` instead.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `StartTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
| | +| ~~`StartTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use `startTime` instead.
| | \ No newline at end of file diff --git a/docs/models/operations/listlogsresponse.md b/docs/models/operations/listlogsresponse.md new file mode 100755 index 0000000..18518b5 --- /dev/null +++ b/docs/models/operations/listlogsresponse.md @@ -0,0 +1,12 @@ +# ListLogsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `LogsCursorResponse` | [*shared.LogsCursorResponse](../../models/shared/logscursorresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listpaymentsrequest.md b/docs/models/operations/listpaymentsrequest.md new file mode 100755 index 0000000..a56b491 --- /dev/null +++ b/docs/models/operations/listpaymentsrequest.md @@ -0,0 +1,10 @@ +# ListPaymentsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `Sort` | []*string* | :heavy_minus_sign: | Fields used to sort payments (default is date:desc). | | \ No newline at end of file diff --git a/docs/models/operations/listpaymentsresponse.md b/docs/models/operations/listpaymentsresponse.md new file mode 100755 index 0000000..8939fc3 --- /dev/null +++ b/docs/models/operations/listpaymentsresponse.md @@ -0,0 +1,11 @@ +# ListPaymentsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `PaymentsCursor` | [*shared.PaymentsCursor](../../models/shared/paymentscursor.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listrunsrequest.md b/docs/models/operations/listrunsrequest.md new file mode 100755 index 0000000..fcd25c8 --- /dev/null +++ b/docs/models/operations/listrunsrequest.md @@ -0,0 +1,8 @@ +# ListRunsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `FlowID` | *string* | :heavy_check_mark: | The flow id | \ No newline at end of file diff --git a/docs/models/operations/listrunsresponse.md b/docs/models/operations/listrunsresponse.md new file mode 100755 index 0000000..39fe21f --- /dev/null +++ b/docs/models/operations/listrunsresponse.md @@ -0,0 +1,12 @@ +# ListRunsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | +| `ListRunsResponse` | [*shared.ListRunsResponse](../../models/shared/listrunsresponse.md) | :heavy_minus_sign: | List of workflow occurrences | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listscopesresponse.md b/docs/models/operations/listscopesresponse.md new file mode 100755 index 0000000..de5bdf4 --- /dev/null +++ b/docs/models/operations/listscopesresponse.md @@ -0,0 +1,11 @@ +# ListScopesResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListScopesResponse` | [*shared.ListScopesResponse](../../models/shared/listscopesresponse.md) | :heavy_minus_sign: | List of scopes | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listtransactionsmetadata.md b/docs/models/operations/listtransactionsmetadata.md new file mode 100755 index 0000000..05efc52 --- /dev/null +++ b/docs/models/operations/listtransactionsmetadata.md @@ -0,0 +1,9 @@ +# ListTransactionsMetadata + +Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/listtransactionsrequest.md b/docs/models/operations/listtransactionsrequest.md new file mode 100755 index 0000000..ffa8abf --- /dev/null +++ b/docs/models/operations/listtransactionsrequest.md @@ -0,0 +1,22 @@ +# ListTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Account` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). | users:001 | +| `After` | **string* | :heavy_minus_sign: | Pagination cursor, will return transactions after given txid (in descending order). | 1234 | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `Destination` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). | users:001 | +| `EndTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
| | +| ~~`EndTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use `endTime` instead.
| | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Metadata` | [*ListTransactionsMetadata](../../models/operations/listtransactionsmetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| ~~`PageSizeDeprecated`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The maximum number of results to return per page.
Deprecated, please use `pageSize` instead.
| | +| ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use `cursor` instead.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `Reference` | **string* | :heavy_minus_sign: | Find transactions by reference field. | ref:001 | +| `Source` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account at source (regular expression placed between ^ and $). | users:001 | +| `StartTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
| | +| ~~`StartTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use `startTime` instead.
| | \ No newline at end of file diff --git a/docs/models/operations/listtransactionsresponse.md b/docs/models/operations/listtransactionsresponse.md new file mode 100755 index 0000000..dbcde85 --- /dev/null +++ b/docs/models/operations/listtransactionsresponse.md @@ -0,0 +1,12 @@ +# ListTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionsCursorResponse` | [*shared.TransactionsCursorResponse](../../models/shared/transactionscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/listusersresponse.md b/docs/models/operations/listusersresponse.md new file mode 100755 index 0000000..601e737 --- /dev/null +++ b/docs/models/operations/listusersresponse.md @@ -0,0 +1,11 @@ +# ListUsersResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListUsersResponse` | [*shared.ListUsersResponse](../../models/shared/listusersresponse.md) | :heavy_minus_sign: | List of users | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listwalletsmetadata.md b/docs/models/operations/listwalletsmetadata.md new file mode 100755 index 0000000..87c27b5 --- /dev/null +++ b/docs/models/operations/listwalletsmetadata.md @@ -0,0 +1,9 @@ +# ListWalletsMetadata + +Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/listwalletsrequest.md b/docs/models/operations/listwalletsrequest.md new file mode 100755 index 0000000..370355b --- /dev/null +++ b/docs/models/operations/listwalletsrequest.md @@ -0,0 +1,11 @@ +# ListWalletsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `Metadata` | [*ListWalletsMetadata](../../models/operations/listwalletsmetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Name` | **string* | :heavy_minus_sign: | Filter on wallet name | | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | \ No newline at end of file diff --git a/docs/models/operations/listwalletsresponse.md b/docs/models/operations/listwalletsresponse.md new file mode 100755 index 0000000..5055d31 --- /dev/null +++ b/docs/models/operations/listwalletsresponse.md @@ -0,0 +1,11 @@ +# ListWalletsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListWalletsResponse` | [*shared.ListWalletsResponse](../../models/shared/listwalletsresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/orchestrationgetserverinforesponse.md b/docs/models/operations/orchestrationgetserverinforesponse.md new file mode 100755 index 0000000..46cb39f --- /dev/null +++ b/docs/models/operations/orchestrationgetserverinforesponse.md @@ -0,0 +1,12 @@ +# OrchestrationgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | +| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/paymentsgetserverinforesponse.md b/docs/models/operations/paymentsgetserverinforesponse.md new file mode 100755 index 0000000..bad79e1 --- /dev/null +++ b/docs/models/operations/paymentsgetserverinforesponse.md @@ -0,0 +1,11 @@ +# PaymentsgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/paymentslistaccountsrequest.md b/docs/models/operations/paymentslistaccountsrequest.md new file mode 100755 index 0000000..343f619 --- /dev/null +++ b/docs/models/operations/paymentslistaccountsrequest.md @@ -0,0 +1,10 @@ +# PaymentslistAccountsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `Sort` | []*string* | :heavy_minus_sign: | Fields used to sort payments (default is date:desc). | | \ No newline at end of file diff --git a/docs/models/operations/paymentslistaccountsresponse.md b/docs/models/operations/paymentslistaccountsresponse.md new file mode 100755 index 0000000..fee21b7 --- /dev/null +++ b/docs/models/operations/paymentslistaccountsresponse.md @@ -0,0 +1,11 @@ +# PaymentslistAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `AccountsCursor` | [*shared.AccountsCursor](../../models/shared/accountscursor.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readclientrequest.md b/docs/models/operations/readclientrequest.md new file mode 100755 index 0000000..b970757 --- /dev/null +++ b/docs/models/operations/readclientrequest.md @@ -0,0 +1,8 @@ +# ReadClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | \ No newline at end of file diff --git a/docs/models/operations/readclientresponse.md b/docs/models/operations/readclientresponse.md new file mode 100755 index 0000000..95da333 --- /dev/null +++ b/docs/models/operations/readclientresponse.md @@ -0,0 +1,11 @@ +# ReadClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ReadClientResponse` | [*shared.ReadClientResponse](../../models/shared/readclientresponse.md) | :heavy_minus_sign: | Retrieved client | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readconnectorconfigrequest.md b/docs/models/operations/readconnectorconfigrequest.md new file mode 100755 index 0000000..eb437e6 --- /dev/null +++ b/docs/models/operations/readconnectorconfigrequest.md @@ -0,0 +1,8 @@ +# ReadConnectorConfigRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/readconnectorconfigresponse.md b/docs/models/operations/readconnectorconfigresponse.md new file mode 100755 index 0000000..d2ef298 --- /dev/null +++ b/docs/models/operations/readconnectorconfigresponse.md @@ -0,0 +1,11 @@ +# ReadConnectorConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `ConnectorConfigResponse` | [*shared.ConnectorConfigResponse](../../models/shared/connectorconfigresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readscoperequest.md b/docs/models/operations/readscoperequest.md new file mode 100755 index 0000000..6c9d3e7 --- /dev/null +++ b/docs/models/operations/readscoperequest.md @@ -0,0 +1,8 @@ +# ReadScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | \ No newline at end of file diff --git a/docs/models/operations/readscoperesponse.md b/docs/models/operations/readscoperesponse.md new file mode 100755 index 0000000..f830df4 --- /dev/null +++ b/docs/models/operations/readscoperesponse.md @@ -0,0 +1,11 @@ +# ReadScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ReadScopeResponse` | [*shared.ReadScopeResponse](../../models/shared/readscoperesponse.md) | :heavy_minus_sign: | Retrieved scope | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readstatsrequest.md b/docs/models/operations/readstatsrequest.md new file mode 100755 index 0000000..1be5ec7 --- /dev/null +++ b/docs/models/operations/readstatsrequest.md @@ -0,0 +1,8 @@ +# ReadStatsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Ledger` | *string* | :heavy_check_mark: | name of the ledger | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/readstatsresponse.md b/docs/models/operations/readstatsresponse.md new file mode 100755 index 0000000..0bec295 --- /dev/null +++ b/docs/models/operations/readstatsresponse.md @@ -0,0 +1,12 @@ +# ReadStatsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatsResponse` | [*shared.StatsResponse](../../models/shared/statsresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readuserrequest.md b/docs/models/operations/readuserrequest.md new file mode 100755 index 0000000..69fb9f8 --- /dev/null +++ b/docs/models/operations/readuserrequest.md @@ -0,0 +1,8 @@ +# ReadUserRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `UserID` | *string* | :heavy_check_mark: | User ID | \ No newline at end of file diff --git a/docs/models/operations/readuserresponse.md b/docs/models/operations/readuserresponse.md new file mode 100755 index 0000000..fb2cb57 --- /dev/null +++ b/docs/models/operations/readuserresponse.md @@ -0,0 +1,11 @@ +# ReadUserResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ReadUserResponse` | [*shared.ReadUserResponse](../../models/shared/readuserresponse.md) | :heavy_minus_sign: | Retrieved user | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/resetconnectorrequest.md b/docs/models/operations/resetconnectorrequest.md new file mode 100755 index 0000000..3b7f11c --- /dev/null +++ b/docs/models/operations/resetconnectorrequest.md @@ -0,0 +1,8 @@ +# ResetConnectorRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/resetconnectorresponse.md b/docs/models/operations/resetconnectorresponse.md new file mode 100755 index 0000000..b7349da --- /dev/null +++ b/docs/models/operations/resetconnectorresponse.md @@ -0,0 +1,10 @@ +# ResetConnectorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/reverttransactionrequest.md b/docs/models/operations/reverttransactionrequest.md new file mode 100755 index 0000000..902139e --- /dev/null +++ b/docs/models/operations/reverttransactionrequest.md @@ -0,0 +1,9 @@ +# RevertTransactionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | \ No newline at end of file diff --git a/docs/models/operations/reverttransactionresponse.md b/docs/models/operations/reverttransactionresponse.md new file mode 100755 index 0000000..3bd704d --- /dev/null +++ b/docs/models/operations/reverttransactionresponse.md @@ -0,0 +1,12 @@ +# RevertTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionResponse` | [*shared.TransactionResponse](../../models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/runscriptrequest.md b/docs/models/operations/runscriptrequest.md new file mode 100755 index 0000000..2a03d60 --- /dev/null +++ b/docs/models/operations/runscriptrequest.md @@ -0,0 +1,10 @@ +# RunScriptRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `Script` | [shared.Script](../../models/shared/script.md) | :heavy_check_mark: | N/A | | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | \ No newline at end of file diff --git a/docs/models/operations/runscriptresponse.md b/docs/models/operations/runscriptresponse.md new file mode 100755 index 0000000..7215131 --- /dev/null +++ b/docs/models/operations/runscriptresponse.md @@ -0,0 +1,11 @@ +# RunScriptResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ScriptResponse` | [*shared.ScriptResponse](../../models/shared/scriptresponse.md) | :heavy_minus_sign: | On success, it will return a 200 status code, and the resulting transaction under the `transaction` field.

On failure, it will also return a 200 status code, and the following fields:
- `details`: contains a URL. When there is an error parsing Numscript, the result can be difficult to read—the provided URL will render the error in an easy-to-read format.
- `errorCode` and `error_code` (deprecated): contains the string code of the error
- `errorMessage` and `error_message` (deprecated): contains a human-readable indication of what went wrong, for example that an account had insufficient funds, or that there was an error in the provided Numscript.
| +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/runworkflowrequest.md b/docs/models/operations/runworkflowrequest.md new file mode 100755 index 0000000..6d1db6a --- /dev/null +++ b/docs/models/operations/runworkflowrequest.md @@ -0,0 +1,10 @@ +# RunWorkflowRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `FlowID` | *string* | :heavy_check_mark: | The flow id | +| `RequestBody` | map[string]*string* | :heavy_minus_sign: | N/A | +| `Wait` | **bool* | :heavy_minus_sign: | Wait end of the workflow before return | \ No newline at end of file diff --git a/docs/models/operations/runworkflowresponse.md b/docs/models/operations/runworkflowresponse.md new file mode 100755 index 0000000..182fdd9 --- /dev/null +++ b/docs/models/operations/runworkflowresponse.md @@ -0,0 +1,12 @@ +# RunWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | +| `RunWorkflowResponse` | [*shared.RunWorkflowResponse](../../models/shared/runworkflowresponse.md) | :heavy_minus_sign: | The workflow occurrence | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/searchgetserverinforesponse.md b/docs/models/operations/searchgetserverinforesponse.md new file mode 100755 index 0000000..e728aa7 --- /dev/null +++ b/docs/models/operations/searchgetserverinforesponse.md @@ -0,0 +1,11 @@ +# SearchgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/searchresponse.md b/docs/models/operations/searchresponse.md new file mode 100755 index 0000000..74816dd --- /dev/null +++ b/docs/models/operations/searchresponse.md @@ -0,0 +1,11 @@ +# SearchResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Response` | [*shared.Response](../../models/shared/response.md) | :heavy_minus_sign: | Success | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/testconfigrequest.md b/docs/models/operations/testconfigrequest.md new file mode 100755 index 0000000..1f37112 --- /dev/null +++ b/docs/models/operations/testconfigrequest.md @@ -0,0 +1,8 @@ +# TestConfigRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | \ No newline at end of file diff --git a/docs/models/operations/testconfigresponse.md b/docs/models/operations/testconfigresponse.md new file mode 100755 index 0000000..09b8403 --- /dev/null +++ b/docs/models/operations/testconfigresponse.md @@ -0,0 +1,11 @@ +# TestConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `AttemptResponse` | [*shared.AttemptResponse](../../models/shared/attemptresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/uninstallconnectorrequest.md b/docs/models/operations/uninstallconnectorrequest.md new file mode 100755 index 0000000..77656e5 --- /dev/null +++ b/docs/models/operations/uninstallconnectorrequest.md @@ -0,0 +1,8 @@ +# UninstallConnectorRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/uninstallconnectorresponse.md b/docs/models/operations/uninstallconnectorresponse.md new file mode 100755 index 0000000..cc34c54 --- /dev/null +++ b/docs/models/operations/uninstallconnectorresponse.md @@ -0,0 +1,10 @@ +# UninstallConnectorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updateclientrequest.md b/docs/models/operations/updateclientrequest.md new file mode 100755 index 0000000..8380a84 --- /dev/null +++ b/docs/models/operations/updateclientrequest.md @@ -0,0 +1,9 @@ +# UpdateClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | +| `UpdateClientRequest` | [*shared.UpdateClientRequest](../../models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateclientresponse.md b/docs/models/operations/updateclientresponse.md new file mode 100755 index 0000000..1b47de5 --- /dev/null +++ b/docs/models/operations/updateclientresponse.md @@ -0,0 +1,11 @@ +# UpdateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `UpdateClientResponse` | [*shared.UpdateClientResponse](../../models/shared/updateclientresponse.md) | :heavy_minus_sign: | Updated client | \ No newline at end of file diff --git a/docs/models/operations/updatemappingrequest.md b/docs/models/operations/updatemappingrequest.md new file mode 100755 index 0000000..aeaf81f --- /dev/null +++ b/docs/models/operations/updatemappingrequest.md @@ -0,0 +1,9 @@ +# UpdateMappingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `Mapping` | [shared.Mapping](../../models/shared/mapping.md) | :heavy_check_mark: | N/A | | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/updatemappingresponse.md b/docs/models/operations/updatemappingresponse.md new file mode 100755 index 0000000..a0ae95c --- /dev/null +++ b/docs/models/operations/updatemappingresponse.md @@ -0,0 +1,12 @@ +# UpdateMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `MappingResponse` | [*shared.MappingResponse](../../models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updatescoperequest.md b/docs/models/operations/updatescoperequest.md new file mode 100755 index 0000000..cb5f607 --- /dev/null +++ b/docs/models/operations/updatescoperequest.md @@ -0,0 +1,9 @@ +# UpdateScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | +| `UpdateScopeRequest` | [*shared.UpdateScopeRequest](../../models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatescoperesponse.md b/docs/models/operations/updatescoperesponse.md new file mode 100755 index 0000000..a980c61 --- /dev/null +++ b/docs/models/operations/updatescoperesponse.md @@ -0,0 +1,11 @@ +# UpdateScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `UpdateScopeResponse` | [*shared.UpdateScopeResponse](../../models/shared/updatescoperesponse.md) | :heavy_minus_sign: | Updated scope | \ No newline at end of file diff --git a/docs/models/operations/updatewalletrequest.md b/docs/models/operations/updatewalletrequest.md new file mode 100755 index 0000000..17fbf65 --- /dev/null +++ b/docs/models/operations/updatewalletrequest.md @@ -0,0 +1,9 @@ +# UpdateWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `RequestBody` | [*UpdateWalletRequestBody](../../models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewalletrequestbody.md b/docs/models/operations/updatewalletrequestbody.md new file mode 100755 index 0000000..2ea0e77 --- /dev/null +++ b/docs/models/operations/updatewalletrequestbody.md @@ -0,0 +1,8 @@ +# UpdateWalletRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Custom metadata to attach to this wallet. | \ No newline at end of file diff --git a/docs/models/operations/updatewalletresponse.md b/docs/models/operations/updatewalletresponse.md new file mode 100755 index 0000000..2ed290f --- /dev/null +++ b/docs/models/operations/updatewalletresponse.md @@ -0,0 +1,11 @@ +# UpdateWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/voidholdrequest.md b/docs/models/operations/voidholdrequest.md new file mode 100755 index 0000000..48a6253 --- /dev/null +++ b/docs/models/operations/voidholdrequest.md @@ -0,0 +1,8 @@ +# VoidHoldRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `HoldID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/voidholdresponse.md b/docs/models/operations/voidholdresponse.md new file mode 100755 index 0000000..fd3d2c0 --- /dev/null +++ b/docs/models/operations/voidholdresponse.md @@ -0,0 +1,11 @@ +# VoidHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/walletsgetserverinforesponse.md b/docs/models/operations/walletsgetserverinforesponse.md new file mode 100755 index 0000000..ae9ca76 --- /dev/null +++ b/docs/models/operations/walletsgetserverinforesponse.md @@ -0,0 +1,12 @@ +# WalletsgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/shared/account.md b/docs/models/shared/account.md new file mode 100755 index 0000000..a1833cb --- /dev/null +++ b/docs/models/shared/account.md @@ -0,0 +1,10 @@ +# Account + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | +| `Metadata` | [*AccountMetadata](../../models/shared/accountmetadata.md) | :heavy_minus_sign: | N/A | | +| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | \ No newline at end of file diff --git a/docs/models/shared/accountmetadata.md b/docs/models/shared/accountmetadata.md new file mode 100755 index 0000000..f41637b --- /dev/null +++ b/docs/models/shared/accountmetadata.md @@ -0,0 +1,7 @@ +# AccountMetadata + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/accountresponse.md b/docs/models/shared/accountresponse.md new file mode 100755 index 0000000..b4f1f6e --- /dev/null +++ b/docs/models/shared/accountresponse.md @@ -0,0 +1,8 @@ +# AccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Data` | [AccountWithVolumesAndBalances](../../models/shared/accountwithvolumesandbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursor.md b/docs/models/shared/accountscursor.md new file mode 100755 index 0000000..d0cca6e --- /dev/null +++ b/docs/models/shared/accountscursor.md @@ -0,0 +1,8 @@ +# AccountsCursor + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Cursor` | [AccountsCursorCursor](../../models/shared/accountscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursorcursor.md b/docs/models/shared/accountscursorcursor.md new file mode 100755 index 0000000..1996d8c --- /dev/null +++ b/docs/models/shared/accountscursorcursor.md @@ -0,0 +1,12 @@ +# AccountsCursorCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Data` | [][PaymentsAccount](../../models/shared/paymentsaccount.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/accountscursorresponse.md b/docs/models/shared/accountscursorresponse.md new file mode 100755 index 0000000..9aca72f --- /dev/null +++ b/docs/models/shared/accountscursorresponse.md @@ -0,0 +1,8 @@ +# AccountsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `Cursor` | [AccountsCursorResponseCursor](../../models/shared/accountscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursorresponsecursor.md b/docs/models/shared/accountscursorresponsecursor.md new file mode 100755 index 0000000..0e026a1 --- /dev/null +++ b/docs/models/shared/accountscursorresponsecursor.md @@ -0,0 +1,12 @@ +# AccountsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [][Account](../../models/shared/account.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/accountwithvolumesandbalances.md b/docs/models/shared/accountwithvolumesandbalances.md new file mode 100755 index 0000000..4ee3890 --- /dev/null +++ b/docs/models/shared/accountwithvolumesandbalances.md @@ -0,0 +1,12 @@ +# AccountWithVolumesAndBalances + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | +| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | +| `Metadata` | [*AccountWithVolumesAndBalancesMetadata](../../models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | | +| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | +| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | \ No newline at end of file diff --git a/docs/models/shared/accountwithvolumesandbalancesmetadata.md b/docs/models/shared/accountwithvolumesandbalancesmetadata.md new file mode 100755 index 0000000..4a39016 --- /dev/null +++ b/docs/models/shared/accountwithvolumesandbalancesmetadata.md @@ -0,0 +1,7 @@ +# AccountWithVolumesAndBalancesMetadata + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/aggregatebalancesresponse.md b/docs/models/shared/aggregatebalancesresponse.md new file mode 100755 index 0000000..82b9b94 --- /dev/null +++ b/docs/models/shared/aggregatebalancesresponse.md @@ -0,0 +1,8 @@ +# AggregateBalancesResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Data` | map[string]*int64* | :heavy_check_mark: | N/A | [object Object] | \ No newline at end of file diff --git a/docs/models/shared/assetholder.md b/docs/models/shared/assetholder.md new file mode 100755 index 0000000..db98bbd --- /dev/null +++ b/docs/models/shared/assetholder.md @@ -0,0 +1,8 @@ +# AssetHolder + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `Assets` | map[string]*float64* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/attempt.md b/docs/models/shared/attempt.md new file mode 100755 index 0000000..6ea7311 --- /dev/null +++ b/docs/models/shared/attempt.md @@ -0,0 +1,17 @@ +# Attempt + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Config` | [*WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_minus_sign: | N/A | | +| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `ID` | **string* | :heavy_minus_sign: | N/A | | +| `NextRetryAfter` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `Payload` | **string* | :heavy_minus_sign: | N/A | {"data":"test"} | +| `RetryAttempt` | **int64* | :heavy_minus_sign: | N/A | 1 | +| `Status` | **string* | :heavy_minus_sign: | N/A | success | +| `StatusCode` | **int64* | :heavy_minus_sign: | N/A | 200 | +| `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `WebhookID` | **string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/attemptresponse.md b/docs/models/shared/attemptresponse.md new file mode 100755 index 0000000..6d45062 --- /dev/null +++ b/docs/models/shared/attemptresponse.md @@ -0,0 +1,8 @@ +# AttemptResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Data` | [Attempt](../../models/shared/attempt.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balance.md b/docs/models/shared/balance.md new file mode 100755 index 0000000..b4b6b06 --- /dev/null +++ b/docs/models/shared/balance.md @@ -0,0 +1,8 @@ +# Balance + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balancescursorresponse.md b/docs/models/shared/balancescursorresponse.md new file mode 100755 index 0000000..ca5a06c --- /dev/null +++ b/docs/models/shared/balancescursorresponse.md @@ -0,0 +1,8 @@ +# BalancesCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `Cursor` | [BalancesCursorResponseCursor](../../models/shared/balancescursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balancescursorresponsecursor.md b/docs/models/shared/balancescursorresponsecursor.md new file mode 100755 index 0000000..2940a35 --- /dev/null +++ b/docs/models/shared/balancescursorresponsecursor.md @@ -0,0 +1,12 @@ +# BalancesCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | []map[string]map[string]*int64* | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/balancewithassets.md b/docs/models/shared/balancewithassets.md new file mode 100755 index 0000000..0160aca --- /dev/null +++ b/docs/models/shared/balancewithassets.md @@ -0,0 +1,9 @@ +# BalanceWithAssets + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `Assets` | map[string]*float64* | :heavy_check_mark: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/bankingcircleconfig.md b/docs/models/shared/bankingcircleconfig.md new file mode 100755 index 0000000..10a01c5 --- /dev/null +++ b/docs/models/shared/bankingcircleconfig.md @@ -0,0 +1,11 @@ +# BankingCircleConfig + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `AuthorizationEndpoint` | *string* | :heavy_check_mark: | N/A | XXX | +| `Endpoint` | *string* | :heavy_check_mark: | N/A | XXX | +| `Password` | *string* | :heavy_check_mark: | N/A | XXX | +| `Username` | *string* | :heavy_check_mark: | N/A | XXX | \ No newline at end of file diff --git a/docs/models/shared/client.md b/docs/models/shared/client.md new file mode 100755 index 0000000..56a6972 --- /dev/null +++ b/docs/models/shared/client.md @@ -0,0 +1,17 @@ +# Client + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Description` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `PostLogoutRedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Public` | **bool* | :heavy_minus_sign: | N/A | +| `RedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Scopes` | []*string* | :heavy_minus_sign: | N/A | +| `Secrets` | [][ClientSecret](../../models/shared/clientsecret.md) | :heavy_minus_sign: | N/A | +| `Trusted` | **bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/clientsecret.md b/docs/models/shared/clientsecret.md new file mode 100755 index 0000000..2ae9d20 --- /dev/null +++ b/docs/models/shared/clientsecret.md @@ -0,0 +1,11 @@ +# ClientSecret + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `LastDigits` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/config.md b/docs/models/shared/config.md new file mode 100755 index 0000000..12bb551 --- /dev/null +++ b/docs/models/shared/config.md @@ -0,0 +1,8 @@ +# Config + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Storage` | [LedgerStorage](../../models/shared/ledgerstorage.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configchangesecret.md b/docs/models/shared/configchangesecret.md new file mode 100755 index 0000000..e9df0bf --- /dev/null +++ b/docs/models/shared/configchangesecret.md @@ -0,0 +1,8 @@ +# ConfigChangeSecret + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `Secret` | **string* | :heavy_minus_sign: | N/A | V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 | \ No newline at end of file diff --git a/docs/models/shared/configinfo.md b/docs/models/shared/configinfo.md new file mode 100755 index 0000000..a62aa54 --- /dev/null +++ b/docs/models/shared/configinfo.md @@ -0,0 +1,10 @@ +# ConfigInfo + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `Config` | [Config](../../models/shared/config.md) | :heavy_check_mark: | N/A | +| `Server` | *string* | :heavy_check_mark: | N/A | +| `Version` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configinforesponse.md b/docs/models/shared/configinforesponse.md new file mode 100755 index 0000000..9a707e9 --- /dev/null +++ b/docs/models/shared/configinforesponse.md @@ -0,0 +1,8 @@ +# ConfigInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `Data` | [ConfigInfo](../../models/shared/configinfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configresponse.md b/docs/models/shared/configresponse.md new file mode 100755 index 0000000..b5922c9 --- /dev/null +++ b/docs/models/shared/configresponse.md @@ -0,0 +1,8 @@ +# ConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Data` | [WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configsresponse.md b/docs/models/shared/configsresponse.md new file mode 100755 index 0000000..1c7f68e --- /dev/null +++ b/docs/models/shared/configsresponse.md @@ -0,0 +1,8 @@ +# ConfigsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `Cursor` | [ConfigsResponseCursor](../../models/shared/configsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configsresponsecursor.md b/docs/models/shared/configsresponsecursor.md new file mode 100755 index 0000000..aaed2eb --- /dev/null +++ b/docs/models/shared/configsresponsecursor.md @@ -0,0 +1,12 @@ +# ConfigsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | [][WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/configuser.md b/docs/models/shared/configuser.md new file mode 100755 index 0000000..1bdef6f --- /dev/null +++ b/docs/models/shared/configuser.md @@ -0,0 +1,10 @@ +# ConfigUser + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `Endpoint` | *string* | :heavy_check_mark: | N/A | https://example.com | +| `EventTypes` | []*string* | :heavy_check_mark: | N/A | TYPE1,TYPE2 | +| `Secret` | **string* | :heavy_minus_sign: | N/A | V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 | \ No newline at end of file diff --git a/docs/models/shared/confirmholdrequest.md b/docs/models/shared/confirmholdrequest.md new file mode 100755 index 0000000..0ee2e5a --- /dev/null +++ b/docs/models/shared/confirmholdrequest.md @@ -0,0 +1,9 @@ +# ConfirmHoldRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `Amount` | **int64* | :heavy_minus_sign: | Define the amount to transfer. | 100 | +| `Final` | **bool* | :heavy_minus_sign: | Define a final confirmation. Remaining funds will be returned to the wallet. | true | \ No newline at end of file diff --git a/docs/models/shared/connector.md b/docs/models/shared/connector.md new file mode 100755 index 0000000..e15acd2 --- /dev/null +++ b/docs/models/shared/connector.md @@ -0,0 +1,13 @@ +# Connector + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `ConnectorStripe` | STRIPE | +| `ConnectorDummyPay` | DUMMY-PAY | +| `ConnectorWise` | WISE | +| `ConnectorModulr` | MODULR | +| `ConnectorCurrencyCloud` | CURRENCY-CLOUD | +| `ConnectorBankingCircle` | BANKING-CIRCLE | \ No newline at end of file diff --git a/docs/models/shared/connectorconfig.md b/docs/models/shared/connectorconfig.md new file mode 100755 index 0000000..19f6c96 --- /dev/null +++ b/docs/models/shared/connectorconfig.md @@ -0,0 +1,41 @@ +# ConnectorConfig + + +## Supported Types + +### StripeConfig + +```go +connectorConfig := shared.CreateConnectorConfigStripeConfig(shared.StripeConfig{/* values here */}) +``` + +### DummyPayConfig + +```go +connectorConfig := shared.CreateConnectorConfigDummyPayConfig(shared.DummyPayConfig{/* values here */}) +``` + +### WiseConfig + +```go +connectorConfig := shared.CreateConnectorConfigWiseConfig(shared.WiseConfig{/* values here */}) +``` + +### ModulrConfig + +```go +connectorConfig := shared.CreateConnectorConfigModulrConfig(shared.ModulrConfig{/* values here */}) +``` + +### CurrencyCloudConfig + +```go +connectorConfig := shared.CreateConnectorConfigCurrencyCloudConfig(shared.CurrencyCloudConfig{/* values here */}) +``` + +### BankingCircleConfig + +```go +connectorConfig := shared.CreateConnectorConfigBankingCircleConfig(shared.BankingCircleConfig{/* values here */}) +``` + diff --git a/docs/models/shared/connectorconfigresponse.md b/docs/models/shared/connectorconfigresponse.md new file mode 100755 index 0000000..c77d29e --- /dev/null +++ b/docs/models/shared/connectorconfigresponse.md @@ -0,0 +1,8 @@ +# ConnectorConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | [ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponse.md b/docs/models/shared/connectorsconfigsresponse.md new file mode 100755 index 0000000..dec57cc --- /dev/null +++ b/docs/models/shared/connectorsconfigsresponse.md @@ -0,0 +1,8 @@ +# ConnectorsConfigsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Data` | [ConnectorsConfigsResponseData](../../models/shared/connectorsconfigsresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponsedata.md b/docs/models/shared/connectorsconfigsresponsedata.md new file mode 100755 index 0000000..0adc62b --- /dev/null +++ b/docs/models/shared/connectorsconfigsresponsedata.md @@ -0,0 +1,8 @@ +# ConnectorsConfigsResponseData + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `Connector` | [ConnectorsConfigsResponseDataConnector](../../models/shared/connectorsconfigsresponsedataconnector.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponsedataconnector.md b/docs/models/shared/connectorsconfigsresponsedataconnector.md new file mode 100755 index 0000000..a31c7a6 --- /dev/null +++ b/docs/models/shared/connectorsconfigsresponsedataconnector.md @@ -0,0 +1,8 @@ +# ConnectorsConfigsResponseDataConnector + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `Key` | [ConnectorsConfigsResponseDataConnectorKey](../../models/shared/connectorsconfigsresponsedataconnectorkey.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponsedataconnectorkey.md b/docs/models/shared/connectorsconfigsresponsedataconnectorkey.md new file mode 100755 index 0000000..147c99c --- /dev/null +++ b/docs/models/shared/connectorsconfigsresponsedataconnectorkey.md @@ -0,0 +1,9 @@ +# ConnectorsConfigsResponseDataConnectorKey + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `DataType` | *string* | :heavy_check_mark: | N/A | +| `Required` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsresponse.md b/docs/models/shared/connectorsresponse.md new file mode 100755 index 0000000..6c40408 --- /dev/null +++ b/docs/models/shared/connectorsresponse.md @@ -0,0 +1,8 @@ +# ConnectorsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Data` | [][ConnectorsResponseData](../../models/shared/connectorsresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsresponsedata.md b/docs/models/shared/connectorsresponsedata.md new file mode 100755 index 0000000..cbef222 --- /dev/null +++ b/docs/models/shared/connectorsresponsedata.md @@ -0,0 +1,9 @@ +# ConnectorsResponseData + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `Enabled` | **bool* | :heavy_minus_sign: | N/A | true | +| `Provider` | [*Connector](../../models/shared/connector.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/contract.md b/docs/models/shared/contract.md new file mode 100755 index 0000000..1eb000c --- /dev/null +++ b/docs/models/shared/contract.md @@ -0,0 +1,9 @@ +# Contract + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `Account` | **string* | :heavy_minus_sign: | N/A | users:001 | +| `Expr` | [ContractExpr](../../models/shared/contractexpr.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/contractexpr.md b/docs/models/shared/contractexpr.md new file mode 100755 index 0000000..09a5a30 --- /dev/null +++ b/docs/models/shared/contractexpr.md @@ -0,0 +1,7 @@ +# ContractExpr + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/createbalancerequest.md b/docs/models/shared/createbalancerequest.md new file mode 100755 index 0000000..2472d7a --- /dev/null +++ b/docs/models/shared/createbalancerequest.md @@ -0,0 +1,8 @@ +# CreateBalanceRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createbalanceresponse.md b/docs/models/shared/createbalanceresponse.md new file mode 100755 index 0000000..b85aa5a --- /dev/null +++ b/docs/models/shared/createbalanceresponse.md @@ -0,0 +1,8 @@ +# CreateBalanceResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Data` | [Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createclientrequest.md b/docs/models/shared/createclientrequest.md new file mode 100755 index 0000000..0d0f716 --- /dev/null +++ b/docs/models/shared/createclientrequest.md @@ -0,0 +1,14 @@ +# CreateClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Description` | **string* | :heavy_minus_sign: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `PostLogoutRedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Public` | **bool* | :heavy_minus_sign: | N/A | +| `RedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Trusted` | **bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createclientresponse.md b/docs/models/shared/createclientresponse.md new file mode 100755 index 0000000..10c2816 --- /dev/null +++ b/docs/models/shared/createclientresponse.md @@ -0,0 +1,8 @@ +# CreateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `Data` | [*Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createscoperequest.md b/docs/models/shared/createscoperequest.md new file mode 100755 index 0000000..a165a96 --- /dev/null +++ b/docs/models/shared/createscoperequest.md @@ -0,0 +1,9 @@ +# CreateScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Label` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createscoperesponse.md b/docs/models/shared/createscoperesponse.md new file mode 100755 index 0000000..9f23804 --- /dev/null +++ b/docs/models/shared/createscoperesponse.md @@ -0,0 +1,8 @@ +# CreateScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `Data` | [*Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createsecretrequest.md b/docs/models/shared/createsecretrequest.md new file mode 100755 index 0000000..0764ceb --- /dev/null +++ b/docs/models/shared/createsecretrequest.md @@ -0,0 +1,9 @@ +# CreateSecretRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createsecretresponse.md b/docs/models/shared/createsecretresponse.md new file mode 100755 index 0000000..51482f9 --- /dev/null +++ b/docs/models/shared/createsecretresponse.md @@ -0,0 +1,8 @@ +# CreateSecretResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `Data` | [*Secret](../../models/shared/secret.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createwalletrequest.md b/docs/models/shared/createwalletrequest.md new file mode 100755 index 0000000..67a0e1d --- /dev/null +++ b/docs/models/shared/createwalletrequest.md @@ -0,0 +1,9 @@ +# CreateWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Custom metadata to attach to this wallet. | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createwalletresponse.md b/docs/models/shared/createwalletresponse.md new file mode 100755 index 0000000..5eb60a4 --- /dev/null +++ b/docs/models/shared/createwalletresponse.md @@ -0,0 +1,8 @@ +# CreateWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `Data` | [Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createworkflowrequest.md b/docs/models/shared/createworkflowrequest.md new file mode 100755 index 0000000..b514570 --- /dev/null +++ b/docs/models/shared/createworkflowrequest.md @@ -0,0 +1,8 @@ +# CreateWorkflowRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `Stages` | []map[string]*interface{}* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createworkflowresponse.md b/docs/models/shared/createworkflowresponse.md new file mode 100755 index 0000000..65db51a --- /dev/null +++ b/docs/models/shared/createworkflowresponse.md @@ -0,0 +1,8 @@ +# CreateWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `Data` | [Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/creditwalletrequest.md b/docs/models/shared/creditwalletrequest.md new file mode 100755 index 0000000..9d5887f --- /dev/null +++ b/docs/models/shared/creditwalletrequest.md @@ -0,0 +1,12 @@ +# CreditWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `Amount` | [Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | +| `Balance` | **string* | :heavy_minus_sign: | The balance to credit | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | +| `Reference` | **string* | :heavy_minus_sign: | N/A | +| `Sources` | [][Subject](../../models/shared/subject.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/currencycloudconfig.md b/docs/models/shared/currencycloudconfig.md new file mode 100755 index 0000000..ec6dad3 --- /dev/null +++ b/docs/models/shared/currencycloudconfig.md @@ -0,0 +1,11 @@ +# CurrencyCloudConfig + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `APIKey` | *string* | :heavy_check_mark: | N/A | XXX | +| `Endpoint` | **string* | :heavy_minus_sign: | The endpoint to use for the API. Defaults to https://devapi.currencycloud.com | XXX | +| `LoginID` | *string* | :heavy_check_mark: | Username of the API Key holder | XXX | +| `PollingPeriod` | **string* | :heavy_minus_sign: | The frequency at which the connector will fetch transactions | 60s | \ No newline at end of file diff --git a/docs/models/shared/debitwalletrequest.md b/docs/models/shared/debitwalletrequest.md new file mode 100755 index 0000000..a6c8f31 --- /dev/null +++ b/docs/models/shared/debitwalletrequest.md @@ -0,0 +1,13 @@ +# DebitWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `Amount` | [Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | +| `Balances` | []*string* | :heavy_minus_sign: | N/A | +| `Description` | **string* | :heavy_minus_sign: | N/A | +| `Destination` | [*Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | +| `Pending` | **bool* | :heavy_minus_sign: | Set to true to create a pending hold. If false, the wallet will be debited immediately. | \ No newline at end of file diff --git a/docs/models/shared/debitwalletresponse.md b/docs/models/shared/debitwalletresponse.md new file mode 100755 index 0000000..4b4073f --- /dev/null +++ b/docs/models/shared/debitwalletresponse.md @@ -0,0 +1,8 @@ +# DebitWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `Data` | [Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/dummypayconfig.md b/docs/models/shared/dummypayconfig.md new file mode 100755 index 0000000..a6b5b66 --- /dev/null +++ b/docs/models/shared/dummypayconfig.md @@ -0,0 +1,10 @@ +# DummyPayConfig + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `Directory` | *string* | :heavy_check_mark: | N/A | /tmp/dummypay | +| `FileGenerationPeriod` | **string* | :heavy_minus_sign: | The frequency at which the connector will create new payment objects in the directory | 60s | +| `FilePollingPeriod` | **string* | :heavy_minus_sign: | The frequency at which the connector will try to fetch new payment objects from the directory | 60s | \ No newline at end of file diff --git a/docs/models/shared/error.md b/docs/models/shared/error.md new file mode 100755 index 0000000..c152dac --- /dev/null +++ b/docs/models/shared/error.md @@ -0,0 +1,9 @@ +# Error + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ErrorCode` | [ErrorErrorCode](../../models/shared/errorerrorcode.md) | :heavy_check_mark: | N/A | +| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/errorerrorcode.md b/docs/models/shared/errorerrorcode.md new file mode 100755 index 0000000..d0e0c2e --- /dev/null +++ b/docs/models/shared/errorerrorcode.md @@ -0,0 +1,8 @@ +# ErrorErrorCode + + +## Values + +| Name | Value | +| -------------------------- | -------------------------- | +| `ErrorErrorCodeValidation` | VALIDATION | \ No newline at end of file diff --git a/docs/models/shared/errorresponse.md b/docs/models/shared/errorresponse.md new file mode 100755 index 0000000..e5c2360 --- /dev/null +++ b/docs/models/shared/errorresponse.md @@ -0,0 +1,10 @@ +# ErrorResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | +| `ErrorCode` | [*ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | +| `ErrorMessage` | **string* | :heavy_minus_sign: | N/A | [INSUFFICIENT_FUND] account had insufficient funds | \ No newline at end of file diff --git a/docs/models/shared/errorsenum.md b/docs/models/shared/errorsenum.md new file mode 100755 index 0000000..9bd7978 --- /dev/null +++ b/docs/models/shared/errorsenum.md @@ -0,0 +1,14 @@ +# ErrorsEnum + + +## Values + +| Name | Value | +| ----------------------------- | ----------------------------- | +| `ErrorsEnumInternal` | INTERNAL | +| `ErrorsEnumInsufficientFund` | INSUFFICIENT_FUND | +| `ErrorsEnumValidation` | VALIDATION | +| `ErrorsEnumConflict` | CONFLICT | +| `ErrorsEnumNoScript` | NO_SCRIPT | +| `ErrorsEnumCompilationFailed` | COMPILATION_FAILED | +| `ErrorsEnumMetadataOverride` | METADATA_OVERRIDE | \ No newline at end of file diff --git a/docs/models/shared/expandeddebithold.md b/docs/models/shared/expandeddebithold.md new file mode 100755 index 0000000..f707b67 --- /dev/null +++ b/docs/models/shared/expandeddebithold.md @@ -0,0 +1,14 @@ +# ExpandedDebitHold + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Description` | *string* | :heavy_check_mark: | N/A | | +| `Destination` | [*Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | | +| `OriginalAmount` | *int64* | :heavy_check_mark: | Original amount on hold | 100 | +| `Remaining` | *int64* | :heavy_check_mark: | Remaining amount on hold | 10 | +| `WalletID` | *string* | :heavy_check_mark: | The ID of the wallet the hold is associated with. | | \ No newline at end of file diff --git a/docs/models/shared/getbalanceresponse.md b/docs/models/shared/getbalanceresponse.md new file mode 100755 index 0000000..48e4695 --- /dev/null +++ b/docs/models/shared/getbalanceresponse.md @@ -0,0 +1,8 @@ +# GetBalanceResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `Data` | [BalanceWithAssets](../../models/shared/balancewithassets.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdresponse.md b/docs/models/shared/getholdresponse.md new file mode 100755 index 0000000..d559f57 --- /dev/null +++ b/docs/models/shared/getholdresponse.md @@ -0,0 +1,8 @@ +# GetHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `Data` | [ExpandedDebitHold](../../models/shared/expandeddebithold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdsresponse.md b/docs/models/shared/getholdsresponse.md new file mode 100755 index 0000000..8988694 --- /dev/null +++ b/docs/models/shared/getholdsresponse.md @@ -0,0 +1,8 @@ +# GetHoldsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `Cursor` | [GetHoldsResponseCursor](../../models/shared/getholdsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdsresponsecursor.md b/docs/models/shared/getholdsresponsecursor.md new file mode 100755 index 0000000..b1729f3 --- /dev/null +++ b/docs/models/shared/getholdsresponsecursor.md @@ -0,0 +1,12 @@ +# GetHoldsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [][Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/gettransactionsresponse.md b/docs/models/shared/gettransactionsresponse.md new file mode 100755 index 0000000..d297608 --- /dev/null +++ b/docs/models/shared/gettransactionsresponse.md @@ -0,0 +1,8 @@ +# GetTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Cursor` | [GetTransactionsResponseCursor](../../models/shared/gettransactionsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/gettransactionsresponsecursor.md b/docs/models/shared/gettransactionsresponsecursor.md new file mode 100755 index 0000000..4c19542 --- /dev/null +++ b/docs/models/shared/gettransactionsresponsecursor.md @@ -0,0 +1,12 @@ +# GetTransactionsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `Data` | [][WalletsTransaction](../../models/shared/walletstransaction.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/getwalletresponse.md b/docs/models/shared/getwalletresponse.md new file mode 100755 index 0000000..b00a1d2 --- /dev/null +++ b/docs/models/shared/getwalletresponse.md @@ -0,0 +1,8 @@ +# GetWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `Data` | [WalletWithBalances](../../models/shared/walletwithbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getworkflowoccurrenceresponse.md b/docs/models/shared/getworkflowoccurrenceresponse.md new file mode 100755 index 0000000..dbc0893 --- /dev/null +++ b/docs/models/shared/getworkflowoccurrenceresponse.md @@ -0,0 +1,8 @@ +# GetWorkflowOccurrenceResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `Data` | [WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getworkflowresponse.md b/docs/models/shared/getworkflowresponse.md new file mode 100755 index 0000000..1139677 --- /dev/null +++ b/docs/models/shared/getworkflowresponse.md @@ -0,0 +1,8 @@ +# GetWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `Data` | [Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/hold.md b/docs/models/shared/hold.md new file mode 100755 index 0000000..d6f3f32 --- /dev/null +++ b/docs/models/shared/hold.md @@ -0,0 +1,12 @@ +# Hold + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Description` | *string* | :heavy_check_mark: | N/A | +| `Destination` | [*Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | +| `WalletID` | *string* | :heavy_check_mark: | The ID of the wallet the hold is associated with. | \ No newline at end of file diff --git a/docs/models/shared/ledgeraccountsubject.md b/docs/models/shared/ledgeraccountsubject.md new file mode 100755 index 0000000..c6eec72 --- /dev/null +++ b/docs/models/shared/ledgeraccountsubject.md @@ -0,0 +1,9 @@ +# LedgerAccountSubject + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Identifier` | *string* | :heavy_check_mark: | N/A | +| `Type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ledgerinfo.md b/docs/models/shared/ledgerinfo.md new file mode 100755 index 0000000..137b63a --- /dev/null +++ b/docs/models/shared/ledgerinfo.md @@ -0,0 +1,9 @@ +# LedgerInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `Name` | **string* | :heavy_minus_sign: | N/A | ledger001 | +| `Storage` | [*LedgerInfoStorage](../../models/shared/ledgerinfostorage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/ledgerinforesponse.md b/docs/models/shared/ledgerinforesponse.md new file mode 100755 index 0000000..b2c4262 --- /dev/null +++ b/docs/models/shared/ledgerinforesponse.md @@ -0,0 +1,8 @@ +# LedgerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `Data` | [*LedgerInfo](../../models/shared/ledgerinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ledgerinfostorage.md b/docs/models/shared/ledgerinfostorage.md new file mode 100755 index 0000000..2d93d7e --- /dev/null +++ b/docs/models/shared/ledgerinfostorage.md @@ -0,0 +1,8 @@ +# LedgerInfoStorage + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Migrations` | [][MigrationInfo](../../models/shared/migrationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ledgerstorage.md b/docs/models/shared/ledgerstorage.md new file mode 100755 index 0000000..159532b --- /dev/null +++ b/docs/models/shared/ledgerstorage.md @@ -0,0 +1,9 @@ +# LedgerStorage + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Driver` | *string* | :heavy_check_mark: | N/A | +| `Ledgers` | []*string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listbalancesresponse.md b/docs/models/shared/listbalancesresponse.md new file mode 100755 index 0000000..6238acc --- /dev/null +++ b/docs/models/shared/listbalancesresponse.md @@ -0,0 +1,8 @@ +# ListBalancesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `Cursor` | [ListBalancesResponseCursor](../../models/shared/listbalancesresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listbalancesresponsecursor.md b/docs/models/shared/listbalancesresponsecursor.md new file mode 100755 index 0000000..6b71dd2 --- /dev/null +++ b/docs/models/shared/listbalancesresponsecursor.md @@ -0,0 +1,12 @@ +# ListBalancesResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [][Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listclientsresponse.md b/docs/models/shared/listclientsresponse.md new file mode 100755 index 0000000..ada6d7e --- /dev/null +++ b/docs/models/shared/listclientsresponse.md @@ -0,0 +1,8 @@ +# ListClientsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Data` | [][Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listrunsresponse.md b/docs/models/shared/listrunsresponse.md new file mode 100755 index 0000000..840e482 --- /dev/null +++ b/docs/models/shared/listrunsresponse.md @@ -0,0 +1,8 @@ +# ListRunsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `Cursor` | [ListRunsResponseCursor](../../models/shared/listrunsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listrunsresponsecursor.md b/docs/models/shared/listrunsresponsecursor.md new file mode 100755 index 0000000..cedb73b --- /dev/null +++ b/docs/models/shared/listrunsresponsecursor.md @@ -0,0 +1,12 @@ +# ListRunsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `Data` | [][WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listscopesresponse.md b/docs/models/shared/listscopesresponse.md new file mode 100755 index 0000000..e2e0f37 --- /dev/null +++ b/docs/models/shared/listscopesresponse.md @@ -0,0 +1,8 @@ +# ListScopesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `Data` | [][Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listusersresponse.md b/docs/models/shared/listusersresponse.md new file mode 100755 index 0000000..e4586af --- /dev/null +++ b/docs/models/shared/listusersresponse.md @@ -0,0 +1,8 @@ +# ListUsersResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `Data` | [][User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listwalletsresponse.md b/docs/models/shared/listwalletsresponse.md new file mode 100755 index 0000000..c28c056 --- /dev/null +++ b/docs/models/shared/listwalletsresponse.md @@ -0,0 +1,8 @@ +# ListWalletsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Cursor` | [ListWalletsResponseCursor](../../models/shared/listwalletsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listwalletsresponsecursor.md b/docs/models/shared/listwalletsresponsecursor.md new file mode 100755 index 0000000..63f0972 --- /dev/null +++ b/docs/models/shared/listwalletsresponsecursor.md @@ -0,0 +1,12 @@ +# ListWalletsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [][Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listworkflowsresponse.md b/docs/models/shared/listworkflowsresponse.md new file mode 100755 index 0000000..7986d2b --- /dev/null +++ b/docs/models/shared/listworkflowsresponse.md @@ -0,0 +1,8 @@ +# ListWorkflowsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Data` | [][Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/log.md b/docs/models/shared/log.md new file mode 100755 index 0000000..73b1e4e --- /dev/null +++ b/docs/models/shared/log.md @@ -0,0 +1,12 @@ +# Log + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `Data` | [LogData](../../models/shared/logdata.md) | :heavy_check_mark: | N/A | | +| `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Hash` | *string* | :heavy_check_mark: | N/A | 9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e | +| `ID` | *int64* | :heavy_check_mark: | N/A | 1234 | +| `Type` | [LogType](../../models/shared/logtype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/logdata.md b/docs/models/shared/logdata.md new file mode 100755 index 0000000..54cd59d --- /dev/null +++ b/docs/models/shared/logdata.md @@ -0,0 +1,7 @@ +# LogData + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/logscursorresponse.md b/docs/models/shared/logscursorresponse.md new file mode 100755 index 0000000..322cd96 --- /dev/null +++ b/docs/models/shared/logscursorresponse.md @@ -0,0 +1,8 @@ +# LogsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `Cursor` | [LogsCursorResponseCursor](../../models/shared/logscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/logscursorresponsecursor.md b/docs/models/shared/logscursorresponsecursor.md new file mode 100755 index 0000000..03fc795 --- /dev/null +++ b/docs/models/shared/logscursorresponsecursor.md @@ -0,0 +1,12 @@ +# LogsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [][Log](../../models/shared/log.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/logtype.md b/docs/models/shared/logtype.md new file mode 100755 index 0000000..400bcd3 --- /dev/null +++ b/docs/models/shared/logtype.md @@ -0,0 +1,9 @@ +# LogType + + +## Values + +| Name | Value | +| ----------------------- | ----------------------- | +| `LogTypeNewTransaction` | NEW_TRANSACTION | +| `LogTypeSetMetadata` | SET_METADATA | \ No newline at end of file diff --git a/docs/models/shared/mapping.md b/docs/models/shared/mapping.md new file mode 100755 index 0000000..64bfeb7 --- /dev/null +++ b/docs/models/shared/mapping.md @@ -0,0 +1,8 @@ +# Mapping + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Contracts` | [][Contract](../../models/shared/contract.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/mappingresponse.md b/docs/models/shared/mappingresponse.md new file mode 100755 index 0000000..fc23a2c --- /dev/null +++ b/docs/models/shared/mappingresponse.md @@ -0,0 +1,8 @@ +# MappingResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `Data` | [*Mapping](../../models/shared/mapping.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/migrationinfo.md b/docs/models/shared/migrationinfo.md new file mode 100755 index 0000000..25f2551 --- /dev/null +++ b/docs/models/shared/migrationinfo.md @@ -0,0 +1,11 @@ +# MigrationInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `Date` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `Name` | **string* | :heavy_minus_sign: | N/A | migrations:001 | +| `State` | [*MigrationInfoState](../../models/shared/migrationinfostate.md) | :heavy_minus_sign: | N/A | | +| `Version` | **int64* | :heavy_minus_sign: | N/A | 11 | \ No newline at end of file diff --git a/docs/models/shared/migrationinfostate.md b/docs/models/shared/migrationinfostate.md new file mode 100755 index 0000000..5193be7 --- /dev/null +++ b/docs/models/shared/migrationinfostate.md @@ -0,0 +1,9 @@ +# MigrationInfoState + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `MigrationInfoStateToDo` | to do | +| `MigrationInfoStateDone` | done | \ No newline at end of file diff --git a/docs/models/shared/modulrconfig.md b/docs/models/shared/modulrconfig.md new file mode 100755 index 0000000..25cb42c --- /dev/null +++ b/docs/models/shared/modulrconfig.md @@ -0,0 +1,10 @@ +# ModulrConfig + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `APIKey` | *string* | :heavy_check_mark: | N/A | XXX | +| `APISecret` | *string* | :heavy_check_mark: | N/A | XXX | +| `Endpoint` | **string* | :heavy_minus_sign: | N/A | XXX | \ No newline at end of file diff --git a/docs/models/shared/monetary.md b/docs/models/shared/monetary.md new file mode 100755 index 0000000..dbf1c0a --- /dev/null +++ b/docs/models/shared/monetary.md @@ -0,0 +1,9 @@ +# Monetary + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `Amount` | *int64* | :heavy_check_mark: | The amount of the monetary value. | +| `Asset` | *string* | :heavy_check_mark: | The asset of the monetary value. | \ No newline at end of file diff --git a/docs/models/shared/payment.md b/docs/models/shared/payment.md new file mode 100755 index 0000000..2d7c949 --- /dev/null +++ b/docs/models/shared/payment.md @@ -0,0 +1,20 @@ +# Payment + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `AccountID` | *string* | :heavy_check_mark: | N/A | | +| `Adjustments` | [][PaymentAdjustment](../../models/shared/paymentadjustment.md) | :heavy_check_mark: | N/A | | +| `Asset` | *string* | :heavy_check_mark: | N/A | USD | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `ID` | *string* | :heavy_check_mark: | N/A | XXX | +| `InitialAmount` | *int64* | :heavy_check_mark: | N/A | 100 | +| `Metadata` | [][PaymentMetadata](../../models/shared/paymentmetadata.md) | :heavy_check_mark: | N/A | | +| `Provider` | [Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | | +| `Raw` | [PaymentRaw](../../models/shared/paymentraw.md) | :heavy_check_mark: | N/A | | +| `Reference` | *string* | :heavy_check_mark: | N/A | | +| `Scheme` | [PaymentScheme](../../models/shared/paymentscheme.md) | :heavy_check_mark: | N/A | | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | +| `Type` | [PaymentType](../../models/shared/paymenttype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/paymentadjustment.md b/docs/models/shared/paymentadjustment.md new file mode 100755 index 0000000..c62c064 --- /dev/null +++ b/docs/models/shared/paymentadjustment.md @@ -0,0 +1,12 @@ +# PaymentAdjustment + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Absolute` | *bool* | :heavy_check_mark: | N/A | | +| `Amount` | *int64* | :heavy_check_mark: | N/A | 100 | +| `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Raw` | [PaymentAdjustmentRaw](../../models/shared/paymentadjustmentraw.md) | :heavy_check_mark: | N/A | | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/paymentadjustmentraw.md b/docs/models/shared/paymentadjustmentraw.md new file mode 100755 index 0000000..78f88ae --- /dev/null +++ b/docs/models/shared/paymentadjustmentraw.md @@ -0,0 +1,7 @@ +# PaymentAdjustmentRaw + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/paymentmetadata.md b/docs/models/shared/paymentmetadata.md new file mode 100755 index 0000000..90a1ef9 --- /dev/null +++ b/docs/models/shared/paymentmetadata.md @@ -0,0 +1,10 @@ +# PaymentMetadata + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `Changelog` | [*PaymentMetadataChangelog](../../models/shared/paymentmetadatachangelog.md) | :heavy_minus_sign: | N/A | +| `Key` | *string* | :heavy_check_mark: | N/A | +| `Value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentmetadatachangelog.md b/docs/models/shared/paymentmetadatachangelog.md new file mode 100755 index 0000000..2191419 --- /dev/null +++ b/docs/models/shared/paymentmetadatachangelog.md @@ -0,0 +1,9 @@ +# PaymentMetadataChangelog + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentraw.md b/docs/models/shared/paymentraw.md new file mode 100755 index 0000000..e884afe --- /dev/null +++ b/docs/models/shared/paymentraw.md @@ -0,0 +1,7 @@ +# PaymentRaw + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/paymentresponse.md b/docs/models/shared/paymentresponse.md new file mode 100755 index 0000000..ac9dc71 --- /dev/null +++ b/docs/models/shared/paymentresponse.md @@ -0,0 +1,8 @@ +# PaymentResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Data` | [Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentsaccount.md b/docs/models/shared/paymentsaccount.md new file mode 100755 index 0000000..092dc0c --- /dev/null +++ b/docs/models/shared/paymentsaccount.md @@ -0,0 +1,12 @@ +# PaymentsAccount + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Provider` | [Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | +| `Reference` | *string* | :heavy_check_mark: | N/A | +| `Type` | [PaymentsAccountType](../../models/shared/paymentsaccounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentsaccounttype.md b/docs/models/shared/paymentsaccounttype.md new file mode 100755 index 0000000..452bcc4 --- /dev/null +++ b/docs/models/shared/paymentsaccounttype.md @@ -0,0 +1,9 @@ +# PaymentsAccountType + + +## Values + +| Name | Value | +| --------------------------- | --------------------------- | +| `PaymentsAccountTypeTarget` | TARGET | +| `PaymentsAccountTypeSource` | SOURCE | \ No newline at end of file diff --git a/docs/models/shared/paymentscheme.md b/docs/models/shared/paymentscheme.md new file mode 100755 index 0000000..e88c62f --- /dev/null +++ b/docs/models/shared/paymentscheme.md @@ -0,0 +1,25 @@ +# PaymentScheme + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `PaymentSchemeVisa` | visa | +| `PaymentSchemeMastercard` | mastercard | +| `PaymentSchemeAmex` | amex | +| `PaymentSchemeDiners` | diners | +| `PaymentSchemeDiscover` | discover | +| `PaymentSchemeJcb` | jcb | +| `PaymentSchemeUnionpay` | unionpay | +| `PaymentSchemeSepaDebit` | sepa debit | +| `PaymentSchemeSepaCredit` | sepa credit | +| `PaymentSchemeSepa` | sepa | +| `PaymentSchemeApplePay` | apple pay | +| `PaymentSchemeGooglePay` | google pay | +| `PaymentSchemeA2a` | a2a | +| `PaymentSchemeAchDebit` | ach debit | +| `PaymentSchemeAch` | ach | +| `PaymentSchemeRtp` | rtp | +| `PaymentSchemeUnknown` | unknown | +| `PaymentSchemeOther` | other | \ No newline at end of file diff --git a/docs/models/shared/paymentscursor.md b/docs/models/shared/paymentscursor.md new file mode 100755 index 0000000..0e56d11 --- /dev/null +++ b/docs/models/shared/paymentscursor.md @@ -0,0 +1,8 @@ +# PaymentsCursor + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Cursor` | [PaymentsCursorCursor](../../models/shared/paymentscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentscursorcursor.md b/docs/models/shared/paymentscursorcursor.md new file mode 100755 index 0000000..9861aa3 --- /dev/null +++ b/docs/models/shared/paymentscursorcursor.md @@ -0,0 +1,12 @@ +# PaymentsCursorCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [][Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/paymentstatus.md b/docs/models/shared/paymentstatus.md new file mode 100755 index 0000000..f1d31ee --- /dev/null +++ b/docs/models/shared/paymentstatus.md @@ -0,0 +1,11 @@ +# PaymentStatus + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `PaymentStatusPending` | PENDING | +| `PaymentStatusActive` | ACTIVE | +| `PaymentStatusTerminated` | TERMINATED | +| `PaymentStatusFailed` | FAILED | \ No newline at end of file diff --git a/docs/models/shared/paymenttype.md b/docs/models/shared/paymenttype.md new file mode 100755 index 0000000..dfc9842 --- /dev/null +++ b/docs/models/shared/paymenttype.md @@ -0,0 +1,11 @@ +# PaymentType + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `PaymentTypePayIn` | PAY-IN | +| `PaymentTypePayout` | PAYOUT | +| `PaymentTypeTransfer` | TRANSFER | +| `PaymentTypeOther` | OTHER | \ No newline at end of file diff --git a/docs/models/shared/posting.md b/docs/models/shared/posting.md new file mode 100755 index 0000000..6607ee6 --- /dev/null +++ b/docs/models/shared/posting.md @@ -0,0 +1,11 @@ +# Posting + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Amount` | *int64* | :heavy_check_mark: | N/A | 100 | +| `Asset` | *string* | :heavy_check_mark: | N/A | COIN | +| `Destination` | *string* | :heavy_check_mark: | N/A | users:002 | +| `Source` | *string* | :heavy_check_mark: | N/A | users:001 | \ No newline at end of file diff --git a/docs/models/shared/posttransaction.md b/docs/models/shared/posttransaction.md new file mode 100755 index 0000000..e5bde6d --- /dev/null +++ b/docs/models/shared/posttransaction.md @@ -0,0 +1,12 @@ +# PostTransaction + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_minus_sign: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Script` | [*PostTransactionScript](../../models/shared/posttransactionscript.md) | :heavy_minus_sign: | N/A | | +| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/posttransactionscript.md b/docs/models/shared/posttransactionscript.md new file mode 100755 index 0000000..cf9465c --- /dev/null +++ b/docs/models/shared/posttransactionscript.md @@ -0,0 +1,9 @@ +# PostTransactionScript + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| +| `Vars` | [*PostTransactionScriptVars](../../models/shared/posttransactionscriptvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/posttransactionscriptvars.md b/docs/models/shared/posttransactionscriptvars.md new file mode 100755 index 0000000..ef1a0de --- /dev/null +++ b/docs/models/shared/posttransactionscriptvars.md @@ -0,0 +1,7 @@ +# PostTransactionScriptVars + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/query.md b/docs/models/shared/query.md new file mode 100755 index 0000000..bca8d31 --- /dev/null +++ b/docs/models/shared/query.md @@ -0,0 +1,15 @@ +# Query + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `After` | []*string* | :heavy_minus_sign: | N/A | users:002 | +| `Cursor` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | +| `Ledgers` | []*string* | :heavy_minus_sign: | N/A | quickstart | +| `PageSize` | **int64* | :heavy_minus_sign: | N/A | | +| `Policy` | **string* | :heavy_minus_sign: | N/A | OR | +| `Sort` | **string* | :heavy_minus_sign: | N/A | txid:asc | +| `Target` | **string* | :heavy_minus_sign: | N/A | | +| `Terms` | []*string* | :heavy_minus_sign: | N/A | destination=central_bank1 | \ No newline at end of file diff --git a/docs/models/shared/readclientresponse.md b/docs/models/shared/readclientresponse.md new file mode 100755 index 0000000..fb6d823 --- /dev/null +++ b/docs/models/shared/readclientresponse.md @@ -0,0 +1,8 @@ +# ReadClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `Data` | [*Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/readscoperesponse.md b/docs/models/shared/readscoperesponse.md new file mode 100755 index 0000000..49f970d --- /dev/null +++ b/docs/models/shared/readscoperesponse.md @@ -0,0 +1,8 @@ +# ReadScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `Data` | [*Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/readuserresponse.md b/docs/models/shared/readuserresponse.md new file mode 100755 index 0000000..2aef17f --- /dev/null +++ b/docs/models/shared/readuserresponse.md @@ -0,0 +1,8 @@ +# ReadUserResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `Data` | [*User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/response.md b/docs/models/shared/response.md new file mode 100755 index 0000000..cf74e35 --- /dev/null +++ b/docs/models/shared/response.md @@ -0,0 +1,9 @@ +# Response + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Cursor` | [*ResponseCursor](../../models/shared/responsecursor.md) | :heavy_minus_sign: | N/A | +| `Data` | [*ResponseData](../../models/shared/responsedata.md) | :heavy_minus_sign: | The payload | \ No newline at end of file diff --git a/docs/models/shared/responsecursor.md b/docs/models/shared/responsecursor.md new file mode 100755 index 0000000..cea1ced --- /dev/null +++ b/docs/models/shared/responsecursor.md @@ -0,0 +1,13 @@ +# ResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `Data` | [][ResponseCursorData](../../models/shared/responsecursordata.md) | :heavy_minus_sign: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | | +| `Next` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | +| `PageSize` | **int64* | :heavy_minus_sign: | N/A | | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | +| `Total` | [*ResponseCursorTotal](../../models/shared/responsecursortotal.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/responsecursordata.md b/docs/models/shared/responsecursordata.md new file mode 100755 index 0000000..f531979 --- /dev/null +++ b/docs/models/shared/responsecursordata.md @@ -0,0 +1,7 @@ +# ResponseCursorData + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/responsecursortotal.md b/docs/models/shared/responsecursortotal.md new file mode 100755 index 0000000..dfa5769 --- /dev/null +++ b/docs/models/shared/responsecursortotal.md @@ -0,0 +1,9 @@ +# ResponseCursorTotal + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Relation` | **string* | :heavy_minus_sign: | N/A | eq | +| `Value` | **int64* | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/models/shared/responsedata.md b/docs/models/shared/responsedata.md new file mode 100755 index 0000000..c3a85e7 --- /dev/null +++ b/docs/models/shared/responsedata.md @@ -0,0 +1,9 @@ +# ResponseData + +The payload + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/runworkflowresponse.md b/docs/models/shared/runworkflowresponse.md new file mode 100755 index 0000000..d643e81 --- /dev/null +++ b/docs/models/shared/runworkflowresponse.md @@ -0,0 +1,8 @@ +# RunWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `Data` | [WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/scope.md b/docs/models/shared/scope.md new file mode 100755 index 0000000..fbdae91 --- /dev/null +++ b/docs/models/shared/scope.md @@ -0,0 +1,11 @@ +# Scope + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Label` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Transient` | []*string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/script.md b/docs/models/shared/script.md new file mode 100755 index 0000000..f10c12a --- /dev/null +++ b/docs/models/shared/script.md @@ -0,0 +1,11 @@ +# Script + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| +| `Reference` | **string* | :heavy_minus_sign: | Reference to attach to the generated transaction | order_1234 | +| `Vars` | [*ScriptVars](../../models/shared/scriptvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/scriptresponse.md b/docs/models/shared/scriptresponse.md new file mode 100755 index 0000000..8f24996 --- /dev/null +++ b/docs/models/shared/scriptresponse.md @@ -0,0 +1,11 @@ +# ScriptResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | +| `ErrorCode` | [*ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | +| `ErrorMessage` | **string* | :heavy_minus_sign: | N/A | account had insufficient funds | +| `Transaction` | [*Transaction](../../models/shared/transaction.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/scriptvars.md b/docs/models/shared/scriptvars.md new file mode 100755 index 0000000..285f3df --- /dev/null +++ b/docs/models/shared/scriptvars.md @@ -0,0 +1,7 @@ +# ScriptVars + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/secret.md b/docs/models/shared/secret.md new file mode 100755 index 0000000..851b992 --- /dev/null +++ b/docs/models/shared/secret.md @@ -0,0 +1,12 @@ +# Secret + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Clear` | *string* | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `LastDigits` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/security.md b/docs/models/shared/security.md new file mode 100755 index 0000000..5d923fc --- /dev/null +++ b/docs/models/shared/security.md @@ -0,0 +1,8 @@ +# Security + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Authorization` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/serverinfo.md b/docs/models/shared/serverinfo.md new file mode 100755 index 0000000..bf626a0 --- /dev/null +++ b/docs/models/shared/serverinfo.md @@ -0,0 +1,8 @@ +# ServerInfo + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Version` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/stagestatus.md b/docs/models/shared/stagestatus.md new file mode 100755 index 0000000..2ff198a --- /dev/null +++ b/docs/models/shared/stagestatus.md @@ -0,0 +1,12 @@ +# StageStatus + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `OccurrenceID` | *string* | :heavy_check_mark: | N/A | +| `Stage` | *float64* | :heavy_check_mark: | N/A | +| `StartedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `TerminatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/stats.md b/docs/models/shared/stats.md new file mode 100755 index 0000000..c87615b --- /dev/null +++ b/docs/models/shared/stats.md @@ -0,0 +1,9 @@ +# Stats + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Accounts` | *int64* | :heavy_check_mark: | N/A | +| `Transactions` | *int64* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/statsresponse.md b/docs/models/shared/statsresponse.md new file mode 100755 index 0000000..fdc3811 --- /dev/null +++ b/docs/models/shared/statsresponse.md @@ -0,0 +1,8 @@ +# StatsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `Data` | [Stats](../../models/shared/stats.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/stripeconfig.md b/docs/models/shared/stripeconfig.md new file mode 100755 index 0000000..be8667e --- /dev/null +++ b/docs/models/shared/stripeconfig.md @@ -0,0 +1,10 @@ +# StripeConfig + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `APIKey` | *string* | :heavy_check_mark: | N/A | XXX | +| `PageSize` | **int64* | :heavy_minus_sign: | Number of BalanceTransaction to fetch at each polling interval.
| 50 | +| `PollingPeriod` | **string* | :heavy_minus_sign: | The frequency at which the connector will try to fetch new BalanceTransaction objects from Stripe API.
| 60s | \ No newline at end of file diff --git a/docs/models/shared/stripetransferrequest.md b/docs/models/shared/stripetransferrequest.md new file mode 100755 index 0000000..377c039 --- /dev/null +++ b/docs/models/shared/stripetransferrequest.md @@ -0,0 +1,11 @@ +# StripeTransferRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Amount` | **int64* | :heavy_minus_sign: | N/A | 100 | +| `Asset` | **string* | :heavy_minus_sign: | N/A | USD | +| `Destination` | **string* | :heavy_minus_sign: | N/A | acct_1Gqj58KZcSIg2N2q | +| `Metadata` | [*StripeTransferRequestMetadata](../../models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| | \ No newline at end of file diff --git a/docs/models/shared/stripetransferrequestmetadata.md b/docs/models/shared/stripetransferrequestmetadata.md new file mode 100755 index 0000000..d99b0e6 --- /dev/null +++ b/docs/models/shared/stripetransferrequestmetadata.md @@ -0,0 +1,11 @@ +# StripeTransferRequestMetadata + +A set of key/value pairs that you can attach to a transfer object. +It can be useful for storing additional information about the transfer in a structured format. + + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/stripetransferresponse.md b/docs/models/shared/stripetransferresponse.md new file mode 100755 index 0000000..7282c88 --- /dev/null +++ b/docs/models/shared/stripetransferresponse.md @@ -0,0 +1,7 @@ +# StripeTransferResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/subject.md b/docs/models/shared/subject.md new file mode 100755 index 0000000..8d398e2 --- /dev/null +++ b/docs/models/shared/subject.md @@ -0,0 +1,17 @@ +# Subject + + +## Supported Types + +### LedgerAccountSubject + +```go +subject := shared.CreateSubjectAccount(shared.LedgerAccountSubject{/* values here */}) +``` + +### WalletSubject + +```go +subject := shared.CreateSubjectWallet(shared.WalletSubject{/* values here */}) +``` + diff --git a/docs/models/shared/taskbankingcircle.md b/docs/models/shared/taskbankingcircle.md new file mode 100755 index 0000000..be73c0b --- /dev/null +++ b/docs/models/shared/taskbankingcircle.md @@ -0,0 +1,15 @@ +# TaskBankingCircle + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [TaskBankingCircleDescriptor](../../models/shared/taskbankingcircledescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [TaskBankingCircleState](../../models/shared/taskbankingcirclestate.md) | :heavy_check_mark: | N/A | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskbankingcircledescriptor.md b/docs/models/shared/taskbankingcircledescriptor.md new file mode 100755 index 0000000..1455551 --- /dev/null +++ b/docs/models/shared/taskbankingcircledescriptor.md @@ -0,0 +1,9 @@ +# TaskBankingCircleDescriptor + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Key` | **string* | :heavy_minus_sign: | N/A | +| `Name` | **string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskbankingcirclestate.md b/docs/models/shared/taskbankingcirclestate.md new file mode 100755 index 0000000..ab19f64 --- /dev/null +++ b/docs/models/shared/taskbankingcirclestate.md @@ -0,0 +1,7 @@ +# TaskBankingCircleState + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/taskcurrencycloud.md b/docs/models/shared/taskcurrencycloud.md new file mode 100755 index 0000000..bd9ab58 --- /dev/null +++ b/docs/models/shared/taskcurrencycloud.md @@ -0,0 +1,15 @@ +# TaskCurrencyCloud + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [TaskCurrencyCloudDescriptor](../../models/shared/taskcurrencyclouddescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [TaskCurrencyCloudState](../../models/shared/taskcurrencycloudstate.md) | :heavy_check_mark: | N/A | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskcurrencyclouddescriptor.md b/docs/models/shared/taskcurrencyclouddescriptor.md new file mode 100755 index 0000000..82a03ab --- /dev/null +++ b/docs/models/shared/taskcurrencyclouddescriptor.md @@ -0,0 +1,8 @@ +# TaskCurrencyCloudDescriptor + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Name` | **string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskcurrencycloudstate.md b/docs/models/shared/taskcurrencycloudstate.md new file mode 100755 index 0000000..dee02a3 --- /dev/null +++ b/docs/models/shared/taskcurrencycloudstate.md @@ -0,0 +1,7 @@ +# TaskCurrencyCloudState + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/taskdummypay.md b/docs/models/shared/taskdummypay.md new file mode 100755 index 0000000..c0ccfa8 --- /dev/null +++ b/docs/models/shared/taskdummypay.md @@ -0,0 +1,15 @@ +# TaskDummyPay + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [TaskDummyPayDescriptor](../../models/shared/taskdummypaydescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [TaskDummyPayState](../../models/shared/taskdummypaystate.md) | :heavy_check_mark: | N/A | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskdummypaydescriptor.md b/docs/models/shared/taskdummypaydescriptor.md new file mode 100755 index 0000000..a770929 --- /dev/null +++ b/docs/models/shared/taskdummypaydescriptor.md @@ -0,0 +1,10 @@ +# TaskDummyPayDescriptor + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `FileName` | **string* | :heavy_minus_sign: | N/A | +| `Key` | **string* | :heavy_minus_sign: | N/A | +| `Name` | **string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskdummypaystate.md b/docs/models/shared/taskdummypaystate.md new file mode 100755 index 0000000..c48e908 --- /dev/null +++ b/docs/models/shared/taskdummypaystate.md @@ -0,0 +1,7 @@ +# TaskDummyPayState + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/taskmodulr.md b/docs/models/shared/taskmodulr.md new file mode 100755 index 0000000..2e7e47d --- /dev/null +++ b/docs/models/shared/taskmodulr.md @@ -0,0 +1,15 @@ +# TaskModulr + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [TaskModulrDescriptor](../../models/shared/taskmodulrdescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [TaskModulrState](../../models/shared/taskmodulrstate.md) | :heavy_check_mark: | N/A | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskmodulrdescriptor.md b/docs/models/shared/taskmodulrdescriptor.md new file mode 100755 index 0000000..0261933 --- /dev/null +++ b/docs/models/shared/taskmodulrdescriptor.md @@ -0,0 +1,10 @@ +# TaskModulrDescriptor + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `AccountID` | **string* | :heavy_minus_sign: | N/A | +| `Key` | **string* | :heavy_minus_sign: | N/A | +| `Name` | **string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskmodulrstate.md b/docs/models/shared/taskmodulrstate.md new file mode 100755 index 0000000..291d63b --- /dev/null +++ b/docs/models/shared/taskmodulrstate.md @@ -0,0 +1,7 @@ +# TaskModulrState + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/taskresponse.md b/docs/models/shared/taskresponse.md new file mode 100755 index 0000000..4522661 --- /dev/null +++ b/docs/models/shared/taskresponse.md @@ -0,0 +1,8 @@ +# TaskResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Data` | [TaskResponseData](../../models/shared/taskresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskresponsedata.md b/docs/models/shared/taskresponsedata.md new file mode 100755 index 0000000..2f2534b --- /dev/null +++ b/docs/models/shared/taskresponsedata.md @@ -0,0 +1,41 @@ +# TaskResponseData + + +## Supported Types + +### TaskStripe + +```go +taskResponseData := shared.CreateTaskResponseDataTaskStripe(shared.TaskStripe{/* values here */}) +``` + +### TaskWise + +```go +taskResponseData := shared.CreateTaskResponseDataTaskWise(shared.TaskWise{/* values here */}) +``` + +### TaskCurrencyCloud + +```go +taskResponseData := shared.CreateTaskResponseDataTaskCurrencyCloud(shared.TaskCurrencyCloud{/* values here */}) +``` + +### TaskDummyPay + +```go +taskResponseData := shared.CreateTaskResponseDataTaskDummyPay(shared.TaskDummyPay{/* values here */}) +``` + +### TaskModulr + +```go +taskResponseData := shared.CreateTaskResponseDataTaskModulr(shared.TaskModulr{/* values here */}) +``` + +### TaskBankingCircle + +```go +taskResponseData := shared.CreateTaskResponseDataTaskBankingCircle(shared.TaskBankingCircle{/* values here */}) +``` + diff --git a/docs/models/shared/taskscursor.md b/docs/models/shared/taskscursor.md new file mode 100755 index 0000000..bcc40f1 --- /dev/null +++ b/docs/models/shared/taskscursor.md @@ -0,0 +1,8 @@ +# TasksCursor + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `Cursor` | [TasksCursorCursor](../../models/shared/taskscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskscursorcursor.md b/docs/models/shared/taskscursorcursor.md new file mode 100755 index 0000000..19bd016 --- /dev/null +++ b/docs/models/shared/taskscursorcursor.md @@ -0,0 +1,12 @@ +# TasksCursorCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `Data` | [][TasksCursorCursorData](../../models/shared/taskscursorcursordata.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/taskscursorcursordata.md b/docs/models/shared/taskscursorcursordata.md new file mode 100755 index 0000000..0445c5c --- /dev/null +++ b/docs/models/shared/taskscursorcursordata.md @@ -0,0 +1,41 @@ +# TasksCursorCursorData + + +## Supported Types + +### TaskStripe + +```go +tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskStripe(shared.TaskStripe{/* values here */}) +``` + +### TaskWise + +```go +tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskWise(shared.TaskWise{/* values here */}) +``` + +### TaskCurrencyCloud + +```go +tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskCurrencyCloud(shared.TaskCurrencyCloud{/* values here */}) +``` + +### TaskDummyPay + +```go +tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskDummyPay(shared.TaskDummyPay{/* values here */}) +``` + +### TaskModulr + +```go +tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskModulr(shared.TaskModulr{/* values here */}) +``` + +### TaskBankingCircle + +```go +tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskBankingCircle(shared.TaskBankingCircle{/* values here */}) +``` + diff --git a/docs/models/shared/taskstripe.md b/docs/models/shared/taskstripe.md new file mode 100755 index 0000000..2990b1e --- /dev/null +++ b/docs/models/shared/taskstripe.md @@ -0,0 +1,15 @@ +# TaskStripe + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [TaskStripeDescriptor](../../models/shared/taskstripedescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [TaskStripeState](../../models/shared/taskstripestate.md) | :heavy_check_mark: | N/A | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskstripedescriptor.md b/docs/models/shared/taskstripedescriptor.md new file mode 100755 index 0000000..7b44b60 --- /dev/null +++ b/docs/models/shared/taskstripedescriptor.md @@ -0,0 +1,10 @@ +# TaskStripeDescriptor + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Account` | *string* | :heavy_check_mark: | N/A | +| `Main` | **bool* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskstripestate.md b/docs/models/shared/taskstripestate.md new file mode 100755 index 0000000..9639b5c --- /dev/null +++ b/docs/models/shared/taskstripestate.md @@ -0,0 +1,7 @@ +# TaskStripeState + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/taskwise.md b/docs/models/shared/taskwise.md new file mode 100755 index 0000000..8c2362c --- /dev/null +++ b/docs/models/shared/taskwise.md @@ -0,0 +1,15 @@ +# TaskWise + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [TaskWiseDescriptor](../../models/shared/taskwisedescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [TaskWiseState](../../models/shared/taskwisestate.md) | :heavy_check_mark: | N/A | +| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskwisedescriptor.md b/docs/models/shared/taskwisedescriptor.md new file mode 100755 index 0000000..d1a0196 --- /dev/null +++ b/docs/models/shared/taskwisedescriptor.md @@ -0,0 +1,10 @@ +# TaskWiseDescriptor + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Key` | **string* | :heavy_minus_sign: | N/A | +| `Name` | **string* | :heavy_minus_sign: | N/A | +| `ProfileID` | **int64* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskwisestate.md b/docs/models/shared/taskwisestate.md new file mode 100755 index 0000000..fc76ce0 --- /dev/null +++ b/docs/models/shared/taskwisestate.md @@ -0,0 +1,7 @@ +# TaskWiseState + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/transaction.md b/docs/models/shared/transaction.md new file mode 100755 index 0000000..8bda4c4 --- /dev/null +++ b/docs/models/shared/transaction.md @@ -0,0 +1,14 @@ +# Transaction + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `PostCommitVolumes` | map[string]map[string][Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/transactiondata.md b/docs/models/shared/transactiondata.md new file mode 100755 index 0000000..1edc82f --- /dev/null +++ b/docs/models/shared/transactiondata.md @@ -0,0 +1,11 @@ +# TransactionData + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/transactionresponse.md b/docs/models/shared/transactionresponse.md new file mode 100755 index 0000000..9200d43 --- /dev/null +++ b/docs/models/shared/transactionresponse.md @@ -0,0 +1,8 @@ +# TransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Data` | [Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactions.md b/docs/models/shared/transactions.md new file mode 100755 index 0000000..c6c4b99 --- /dev/null +++ b/docs/models/shared/transactions.md @@ -0,0 +1,8 @@ +# Transactions + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Transactions` | [][TransactionData](../../models/shared/transactiondata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactionscursorresponse.md b/docs/models/shared/transactionscursorresponse.md new file mode 100755 index 0000000..1cb12dc --- /dev/null +++ b/docs/models/shared/transactionscursorresponse.md @@ -0,0 +1,8 @@ +# TransactionsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `Cursor` | [TransactionsCursorResponseCursor](../../models/shared/transactionscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactionscursorresponsecursor.md b/docs/models/shared/transactionscursorresponsecursor.md new file mode 100755 index 0000000..0a29700 --- /dev/null +++ b/docs/models/shared/transactionscursorresponsecursor.md @@ -0,0 +1,12 @@ +# TransactionsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `Data` | [][Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/transactionsresponse.md b/docs/models/shared/transactionsresponse.md new file mode 100755 index 0000000..3d9db87 --- /dev/null +++ b/docs/models/shared/transactionsresponse.md @@ -0,0 +1,8 @@ +# TransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `Data` | [][Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updateclientrequest.md b/docs/models/shared/updateclientrequest.md new file mode 100755 index 0000000..e40cc0a --- /dev/null +++ b/docs/models/shared/updateclientrequest.md @@ -0,0 +1,14 @@ +# UpdateClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Description` | **string* | :heavy_minus_sign: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `PostLogoutRedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Public` | **bool* | :heavy_minus_sign: | N/A | +| `RedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Trusted` | **bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updateclientresponse.md b/docs/models/shared/updateclientresponse.md new file mode 100755 index 0000000..d76a947 --- /dev/null +++ b/docs/models/shared/updateclientresponse.md @@ -0,0 +1,8 @@ +# UpdateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `Data` | [*Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updatescoperequest.md b/docs/models/shared/updatescoperequest.md new file mode 100755 index 0000000..8e37550 --- /dev/null +++ b/docs/models/shared/updatescoperequest.md @@ -0,0 +1,9 @@ +# UpdateScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Label` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updatescoperesponse.md b/docs/models/shared/updatescoperesponse.md new file mode 100755 index 0000000..d2c7146 --- /dev/null +++ b/docs/models/shared/updatescoperesponse.md @@ -0,0 +1,8 @@ +# UpdateScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `Data` | [*Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/user.md b/docs/models/shared/user.md new file mode 100755 index 0000000..b035373 --- /dev/null +++ b/docs/models/shared/user.md @@ -0,0 +1,10 @@ +# User + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `Email` | **string* | :heavy_minus_sign: | N/A | user1@orga1.com | +| `ID` | **string* | :heavy_minus_sign: | N/A | 3bb03708-312f-48a0-821a-e765837dc2c4 | +| `Subject` | **string* | :heavy_minus_sign: | N/A | Jane Doe | \ No newline at end of file diff --git a/docs/models/shared/volume.md b/docs/models/shared/volume.md new file mode 100755 index 0000000..8e48cd6 --- /dev/null +++ b/docs/models/shared/volume.md @@ -0,0 +1,10 @@ +# Volume + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Balance` | **int64* | :heavy_minus_sign: | N/A | +| `Input` | *int64* | :heavy_check_mark: | N/A | +| `Output` | *int64* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/wallet.md b/docs/models/shared/wallet.md new file mode 100755 index 0000000..95b7e6e --- /dev/null +++ b/docs/models/shared/wallet.md @@ -0,0 +1,12 @@ +# Wallet + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the wallet. | +| `Ledger` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the wallet. | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletserrorresponse.md b/docs/models/shared/walletserrorresponse.md new file mode 100755 index 0000000..3e8c815 --- /dev/null +++ b/docs/models/shared/walletserrorresponse.md @@ -0,0 +1,9 @@ +# WalletsErrorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `ErrorCode` | [WalletsErrorResponseErrorCode](../../models/shared/walletserrorresponseerrorcode.md) | :heavy_check_mark: | N/A | +| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletserrorresponseerrorcode.md b/docs/models/shared/walletserrorresponseerrorcode.md new file mode 100755 index 0000000..a241f6b --- /dev/null +++ b/docs/models/shared/walletserrorresponseerrorcode.md @@ -0,0 +1,8 @@ +# WalletsErrorResponseErrorCode + + +## Values + +| Name | Value | +| ----------------------------------------- | ----------------------------------------- | +| `WalletsErrorResponseErrorCodeValidation` | VALIDATION | \ No newline at end of file diff --git a/docs/models/shared/walletstransaction.md b/docs/models/shared/walletstransaction.md new file mode 100755 index 0000000..c51f4e5 --- /dev/null +++ b/docs/models/shared/walletstransaction.md @@ -0,0 +1,14 @@ +# WalletsTransaction + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | | +| `PostCommitVolumes` | map[string]map[string][WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | +| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/walletsubject.md b/docs/models/shared/walletsubject.md new file mode 100755 index 0000000..0cb03c8 --- /dev/null +++ b/docs/models/shared/walletsubject.md @@ -0,0 +1,10 @@ +# WalletSubject + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Balance` | **string* | :heavy_minus_sign: | N/A | +| `Identifier` | *string* | :heavy_check_mark: | N/A | +| `Type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletsvolume.md b/docs/models/shared/walletsvolume.md new file mode 100755 index 0000000..7941e4b --- /dev/null +++ b/docs/models/shared/walletsvolume.md @@ -0,0 +1,10 @@ +# WalletsVolume + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Balance` | *int64* | :heavy_check_mark: | N/A | +| `Input` | *int64* | :heavy_check_mark: | N/A | +| `Output` | *int64* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletwithbalances.md b/docs/models/shared/walletwithbalances.md new file mode 100755 index 0000000..12c57e0 --- /dev/null +++ b/docs/models/shared/walletwithbalances.md @@ -0,0 +1,13 @@ +# WalletWithBalances + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `Balances` | [WalletWithBalancesBalances](../../models/shared/walletwithbalancesbalances.md) | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the wallet. | +| `Ledger` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the wallet. | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletwithbalancesbalances.md b/docs/models/shared/walletwithbalancesbalances.md new file mode 100755 index 0000000..b3ceb39 --- /dev/null +++ b/docs/models/shared/walletwithbalancesbalances.md @@ -0,0 +1,8 @@ +# WalletWithBalancesBalances + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Main` | [AssetHolder](../../models/shared/assetholder.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/webhooksconfig.md b/docs/models/shared/webhooksconfig.md new file mode 100755 index 0000000..353a2cf --- /dev/null +++ b/docs/models/shared/webhooksconfig.md @@ -0,0 +1,14 @@ +# WebhooksConfig + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `Active` | **bool* | :heavy_minus_sign: | N/A | true | +| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `Endpoint` | **string* | :heavy_minus_sign: | N/A | https://example.com | +| `EventTypes` | []*string* | :heavy_minus_sign: | N/A | TYPE1,TYPE2 | +| `ID` | **string* | :heavy_minus_sign: | N/A | | +| `Secret` | **string* | :heavy_minus_sign: | N/A | V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 | +| `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/wiseconfig.md b/docs/models/shared/wiseconfig.md new file mode 100755 index 0000000..634a613 --- /dev/null +++ b/docs/models/shared/wiseconfig.md @@ -0,0 +1,8 @@ +# WiseConfig + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `APIKey` | *string* | :heavy_check_mark: | N/A | XXX | \ No newline at end of file diff --git a/docs/models/shared/workflow.md b/docs/models/shared/workflow.md new file mode 100755 index 0000000..f3b25d0 --- /dev/null +++ b/docs/models/shared/workflow.md @@ -0,0 +1,11 @@ +# Workflow + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Config` | [WorkflowConfig](../../models/shared/workflowconfig.md) | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workflowconfig.md b/docs/models/shared/workflowconfig.md new file mode 100755 index 0000000..f6255dc --- /dev/null +++ b/docs/models/shared/workflowconfig.md @@ -0,0 +1,8 @@ +# WorkflowConfig + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `Stages` | []map[string]*interface{}* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workflowoccurrence.md b/docs/models/shared/workflowoccurrence.md new file mode 100755 index 0000000..9170dce --- /dev/null +++ b/docs/models/shared/workflowoccurrence.md @@ -0,0 +1,12 @@ +# WorkflowOccurrence + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Statuses` | [][StageStatus](../../models/shared/stagestatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `WorkflowID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md new file mode 100755 index 0000000..21a7dd2 --- /dev/null +++ b/docs/sdks/accounts/README.md @@ -0,0 +1,236 @@ +# Accounts +(*Accounts*) + +## Overview + +Everything related to Accounts + +### Available Operations + +* [AddMetadataToAccount](#addmetadatatoaccount) - Add metadata to an account +* [CountAccounts](#countaccounts) - Count the accounts from a ledger +* [GetAccount](#getaccount) - Get account by its address +* [ListAccounts](#listaccounts) - List accounts from a ledger + +## AddMetadataToAccount + +Add metadata to an account + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + requestBody := map[string]interface{}{ + "admin": "string", + "a": "string", + } + + var address string = "users:001" + + var ledger string = "ledger001" + + ctx := context.Background() + res, err := s.Accounts.AddMetadataToAccount(ctx, requestBody, address, ledger) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `requestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | [object Object] | +| `address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | + + +### Response + +**[*operations.AddMetadataToAccountResponse](../../models/operations/addmetadatatoaccountresponse.md), error** + + +## CountAccounts + +Count the accounts from a ledger + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + var address *string = "users:.+" + + metadata := &operations.CountAccountsMetadata{} + + ctx := context.Background() + res, err := s.Accounts.CountAccounts(ctx, ledger, address, metadata) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | +| `metadata` | [*operations.CountAccountsMetadata](../../models/operations/countaccountsmetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | + + +### Response + +**[*operations.CountAccountsResponse](../../models/operations/countaccountsresponse.md), error** + + +## GetAccount + +Get account by its address + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var address string = "users:001" + + var ledger string = "ledger001" + + ctx := context.Background() + res, err := s.Accounts.GetAccount(ctx, address, ledger) + if err != nil { + log.Fatal(err) + } + + if res.AccountResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | + + +### Response + +**[*operations.GetAccountResponse](../../models/operations/getaccountresponse.md), error** + + +## ListAccounts + +List accounts from a ledger, sorted by address in descending order. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Accounts.ListAccounts(ctx, operations.ListAccountsRequest{ + Address: formancegosdk.String("users:.+"), + After: formancegosdk.String("users:003"), + Balance: formancegosdk.Int64(2400), + BalanceOperator: operations.ListAccountsBalanceOperatorGte.ToPointer(), + BalanceOperatorDeprecated: operations.ListAccountsBalanceOperatorGte.ToPointer(), + Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + Ledger: "ledger001", + Metadata: &operations.ListAccountsMetadata{}, + PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + }) + if err != nil { + log.Fatal(err) + } + + if res.AccountsCursorResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.ListAccountsRequest](../../models/operations/listaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.ListAccountsResponse](../../models/operations/listaccountsresponse.md), error** + diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md new file mode 100755 index 0000000..d1b9daf --- /dev/null +++ b/docs/sdks/balances/README.md @@ -0,0 +1,116 @@ +# Balances +(*Balances*) + +## Overview + +Everything related to Balances + +### Available Operations + +* [GetBalances](#getbalances) - Get the balances from a ledger's account +* [GetBalancesAggregated](#getbalancesaggregated) - Get the aggregated balances from selected accounts + +## GetBalances + +Get the balances from a ledger's account + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Balances.GetBalances(ctx, operations.GetBalancesRequest{ + Address: formancegosdk.String("users:001"), + After: formancegosdk.String("users:003"), + Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + Ledger: "ledger001", + PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + }) + if err != nil { + log.Fatal(err) + } + + if res.BalancesCursorResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.GetBalancesRequest](../../models/operations/getbalancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.GetBalancesResponse](../../models/operations/getbalancesresponse.md), error** + + +## GetBalancesAggregated + +Get the aggregated balances from selected accounts + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + var address *string = "users:001" + + ctx := context.Background() + res, err := s.Balances.GetBalancesAggregated(ctx, ledger, address) + if err != nil { + log.Fatal(err) + } + + if res.AggregateBalancesResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `address` | **string* | :heavy_minus_sign: | Filter balances involving given account, either as source or destination. | users:001 | + + +### Response + +**[*operations.GetBalancesAggregatedResponse](../../models/operations/getbalancesaggregatedresponse.md), error** + diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md new file mode 100755 index 0000000..9a01e1c --- /dev/null +++ b/docs/sdks/clients/README.md @@ -0,0 +1,494 @@ +# Clients +(*Clients*) + +## Overview + +Everything related to Clients + +### Available Operations + +* [AddScopeToClient](#addscopetoclient) - Add scope to client +* [CreateClient](#createclient) - Create client +* [CreateSecret](#createsecret) - Add a secret to a client +* [DeleteClient](#deleteclient) - Delete client +* [DeleteScopeFromClient](#deletescopefromclient) - Delete scope from client +* [DeleteSecret](#deletesecret) - Delete a secret from a client +* [ListClients](#listclients) - List clients +* [ReadClient](#readclient) - Read client +* [UpdateClient](#updateclient) - Update client + +## AddScopeToClient + +Add scope to client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var clientID string = "string" + + var scopeID string = "string" + + ctx := context.Background() + res, err := s.Clients.AddScopeToClient(ctx, clientID, scopeID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | + + +### Response + +**[*operations.AddScopeToClientResponse](../../models/operations/addscopetoclientresponse.md), error** + + +## CreateClient + +Create client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Clients.CreateClient(ctx, &shared.CreateClientRequest{ + Metadata: map[string]interface{}{ + "key": "string", + }, + Name: "string", + PostLogoutRedirectUris: []string{ + "string", + }, + RedirectUris: []string{ + "string", + }, + }) + if err != nil { + log.Fatal(err) + } + + if res.CreateClientResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateClientRequest](../../models/shared/createclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.CreateClientResponse](../../models/operations/createclientresponse.md), error** + + +## CreateSecret + +Add a secret to a client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var clientID string = "string" + + createSecretRequest := &shared.CreateSecretRequest{ + Metadata: map[string]interface{}{ + "key": "string", + }, + Name: "string", + } + + ctx := context.Background() + res, err := s.Clients.CreateSecret(ctx, clientID, createSecretRequest) + if err != nil { + log.Fatal(err) + } + + if res.CreateSecretResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `createSecretRequest` | [*shared.CreateSecretRequest](../../models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.CreateSecretResponse](../../models/operations/createsecretresponse.md), error** + + +## DeleteClient + +Delete client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var clientID string = "string" + + ctx := context.Background() + res, err := s.Clients.DeleteClient(ctx, clientID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | + + +### Response + +**[*operations.DeleteClientResponse](../../models/operations/deleteclientresponse.md), error** + + +## DeleteScopeFromClient + +Delete scope from client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var clientID string = "string" + + var scopeID string = "string" + + ctx := context.Background() + res, err := s.Clients.DeleteScopeFromClient(ctx, clientID, scopeID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | + + +### Response + +**[*operations.DeleteScopeFromClientResponse](../../models/operations/deletescopefromclientresponse.md), error** + + +## DeleteSecret + +Delete a secret from a client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var clientID string = "string" + + var secretID string = "string" + + ctx := context.Background() + res, err := s.Clients.DeleteSecret(ctx, clientID, secretID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `secretID` | *string* | :heavy_check_mark: | Secret ID | + + +### Response + +**[*operations.DeleteSecretResponse](../../models/operations/deletesecretresponse.md), error** + + +## ListClients + +List clients + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Clients.ListClients(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ListClientsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.ListClientsResponse](../../models/operations/listclientsresponse.md), error** + + +## ReadClient + +Read client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var clientID string = "string" + + ctx := context.Background() + res, err := s.Clients.ReadClient(ctx, clientID) + if err != nil { + log.Fatal(err) + } + + if res.ReadClientResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | + + +### Response + +**[*operations.ReadClientResponse](../../models/operations/readclientresponse.md), error** + + +## UpdateClient + +Update client + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var clientID string = "string" + + updateClientRequest := &shared.UpdateClientRequest{ + Metadata: map[string]interface{}{ + "key": "string", + }, + Name: "string", + PostLogoutRedirectUris: []string{ + "string", + }, + RedirectUris: []string{ + "string", + }, + } + + ctx := context.Background() + res, err := s.Clients.UpdateClient(ctx, clientID, updateClientRequest) + if err != nil { + log.Fatal(err) + } + + if res.UpdateClientResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `updateClientRequest` | [*shared.UpdateClientRequest](../../models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.UpdateClientResponse](../../models/operations/updateclientresponse.md), error** + diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md new file mode 100755 index 0000000..49281e8 --- /dev/null +++ b/docs/sdks/formance/README.md @@ -0,0 +1,158 @@ +# Formance SDK + + +## Overview + +Formance Stack API: Open, modular foundation for unique payments flows + +# Introduction +This API is documented in **OpenAPI format**. + +# Authentication +Formance Stack offers one forms of authentication: + - OAuth2 +OAuth2 - an open protocol to allow secure authorization in a simple +and standard method from web, mobile and desktop applications. + + + +### Available Operations + +* [GetServerInfo](#getserverinfo) - Get server info +* [PaymentsgetServerInfo](#paymentsgetserverinfo) - Get server info +* [SearchgetServerInfo](#searchgetserverinfo) - Get server info + +## GetServerInfo + +Get server info + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Formance.GetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.GetServerInfoResponse](../../models/operations/getserverinforesponse.md), error** + + +## PaymentsgetServerInfo + +Get server info + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Formance.PaymentsgetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.PaymentsgetServerInfoResponse](../../models/operations/paymentsgetserverinforesponse.md), error** + + +## SearchgetServerInfo + +Get server info + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Formance.SearchgetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.SearchgetServerInfoResponse](../../models/operations/searchgetserverinforesponse.md), error** + diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md new file mode 100755 index 0000000..4545a0b --- /dev/null +++ b/docs/sdks/ledger/README.md @@ -0,0 +1,59 @@ +# Ledger +(*Ledger*) + +## Overview + +Everything related to Ledger + +### Available Operations + +* [GetLedgerInfo](#getledgerinfo) - Get information about a ledger + +## GetLedgerInfo + +Get information about a ledger + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + ctx := context.Background() + res, err := s.Ledger.GetLedgerInfo(ctx, ledger) + if err != nil { + log.Fatal(err) + } + + if res.LedgerInfoResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | + + +### Response + +**[*operations.GetLedgerInfoResponse](../../models/operations/getledgerinforesponse.md), error** + diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md new file mode 100755 index 0000000..c395921 --- /dev/null +++ b/docs/sdks/logs/README.md @@ -0,0 +1,62 @@ +# Logs +(*Logs*) + +## Overview + +Everything related to Logs + +### Available Operations + +* [ListLogs](#listlogs) - List the logs from a ledger + +## ListLogs + +List the logs from a ledger, sorted by ID in descending order. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Logs.ListLogs(ctx, operations.ListLogsRequest{ + After: formancegosdk.String("1234"), + Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + Ledger: "ledger001", + PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + }) + if err != nil { + log.Fatal(err) + } + + if res.LogsCursorResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.ListLogsRequest](../../models/operations/listlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.ListLogsResponse](../../models/operations/listlogsresponse.md), error** + diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md new file mode 100755 index 0000000..acfda63 --- /dev/null +++ b/docs/sdks/mapping/README.md @@ -0,0 +1,119 @@ +# Mapping +(*Mapping*) + +## Overview + +Everything related to Mapping + +### Available Operations + +* [GetMapping](#getmapping) - Get the mapping of a ledger +* [UpdateMapping](#updatemapping) - Update the mapping of a ledger + +## GetMapping + +Get the mapping of a ledger + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + ctx := context.Background() + res, err := s.Mapping.GetMapping(ctx, ledger) + if err != nil { + log.Fatal(err) + } + + if res.MappingResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | + + +### Response + +**[*operations.GetMappingResponse](../../models/operations/getmappingresponse.md), error** + + +## UpdateMapping + +Update the mapping of a ledger + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + mapping := shared.Mapping{ + Contracts: []shared.Contract{ + shared.Contract{ + Account: formancegosdk.String("users:001"), + Expr: shared.ContractExpr{}, + }, + }, + } + + var ledger string = "ledger001" + + ctx := context.Background() + res, err := s.Mapping.UpdateMapping(ctx, mapping, ledger) + if err != nil { + log.Fatal(err) + } + + if res.MappingResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `mapping` | [shared.Mapping](../../models/shared/mapping.md) | :heavy_check_mark: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | + + +### Response + +**[*operations.UpdateMappingResponse](../../models/operations/updatemappingresponse.md), error** + diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md new file mode 100755 index 0000000..11b04ac --- /dev/null +++ b/docs/sdks/orchestration/README.md @@ -0,0 +1,365 @@ +# Orchestration +(*Orchestration*) + +## Overview + +Everything related to Orchestration + +### Available Operations + +* [CreateWorkflow](#createworkflow) - Create workflow +* [GetFlow](#getflow) - Get a flow by id +* [GetWorkflowOccurrence](#getworkflowoccurrence) - Get a workflow occurrence by id +* [ListFlows](#listflows) - List registered flows +* [ListRuns](#listruns) - List occurrences of a workflow +* [OrchestrationgetServerInfo](#orchestrationgetserverinfo) - Get server info +* [RunWorkflow](#runworkflow) - Run workflow + +## CreateWorkflow + +Create a workflow + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Orchestration.CreateWorkflow(ctx, &shared.CreateWorkflowRequest{ + Stages: []map[string]interface{}{ + map[string]interface{}{ + "key": "string", + }, + }, + }) + if err != nil { + log.Fatal(err) + } + + if res.CreateWorkflowResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateWorkflowRequest](../../models/shared/createworkflowrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.CreateWorkflowResponse](../../models/operations/createworkflowresponse.md), error** + + +## GetFlow + +Get a flow by id + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var flowID string = "string" + + ctx := context.Background() + res, err := s.Orchestration.GetFlow(ctx, flowID) + if err != nil { + log.Fatal(err) + } + + if res.GetWorkflowResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `flowID` | *string* | :heavy_check_mark: | The flow id | + + +### Response + +**[*operations.GetFlowResponse](../../models/operations/getflowresponse.md), error** + + +## GetWorkflowOccurrence + +Get a workflow occurrence by id + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var flowID string = "string" + + var runID string = "string" + + ctx := context.Background() + res, err := s.Orchestration.GetWorkflowOccurrence(ctx, flowID, runID) + if err != nil { + log.Fatal(err) + } + + if res.GetWorkflowOccurrenceResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `flowID` | *string* | :heavy_check_mark: | The flow id | +| `runID` | *string* | :heavy_check_mark: | The occurrence id | + + +### Response + +**[*operations.GetWorkflowOccurrenceResponse](../../models/operations/getworkflowoccurrenceresponse.md), error** + + +## ListFlows + +List registered flows + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Orchestration.ListFlows(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ListWorkflowsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.ListFlowsResponse](../../models/operations/listflowsresponse.md), error** + + +## ListRuns + +List occurrences of a workflow + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var flowID string = "string" + + ctx := context.Background() + res, err := s.Orchestration.ListRuns(ctx, flowID) + if err != nil { + log.Fatal(err) + } + + if res.ListRunsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `flowID` | *string* | :heavy_check_mark: | The flow id | + + +### Response + +**[*operations.ListRunsResponse](../../models/operations/listrunsresponse.md), error** + + +## OrchestrationgetServerInfo + +Get server info + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Orchestration.OrchestrationgetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.OrchestrationgetServerInfoResponse](../../models/operations/orchestrationgetserverinforesponse.md), error** + + +## RunWorkflow + +Run workflow + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var flowID string = "string" + + requestBody := map[string]string{ + "key": "string", + } + + var wait *bool = false + + ctx := context.Background() + res, err := s.Orchestration.RunWorkflow(ctx, flowID, requestBody, wait) + if err != nil { + log.Fatal(err) + } + + if res.RunWorkflowResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `flowID` | *string* | :heavy_check_mark: | The flow id | +| `requestBody` | map[string]*string* | :heavy_minus_sign: | N/A | +| `wait` | **bool* | :heavy_minus_sign: | Wait end of the workflow before return | + + +### Response + +**[*operations.RunWorkflowResponse](../../models/operations/runworkflowresponse.md), error** + diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md new file mode 100755 index 0000000..0afc12a --- /dev/null +++ b/docs/sdks/payments/README.md @@ -0,0 +1,639 @@ +# Payments +(*Payments*) + +## Overview + +Everything related to Payments + +### Available Operations + +* [ConnectorsStripeTransfer](#connectorsstripetransfer) - Transfer funds between Stripe accounts +* [GetConnectorTask](#getconnectortask) - Read a specific task of the connector +* [GetPayment](#getpayment) - Get a payment +* [InstallConnector](#installconnector) - Install a connector +* [ListAllConnectors](#listallconnectors) - List all installed connectors +* [ListConfigsAvailableConnectors](#listconfigsavailableconnectors) - List the configs of each available connector +* [ListConnectorTasks](#listconnectortasks) - List tasks from a connector +* [ListPayments](#listpayments) - List payments +* [PaymentslistAccounts](#paymentslistaccounts) - List accounts +* [ReadConnectorConfig](#readconnectorconfig) - Read the config of a connector +* [ResetConnector](#resetconnector) - Reset a connector +* [UninstallConnector](#uninstallconnector) - Uninstall a connector + +## ConnectorsStripeTransfer + +Execute a transfer between two Stripe accounts. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Payments.ConnectorsStripeTransfer(ctx, shared.StripeTransferRequest{ + Amount: formancegosdk.Int64(100), + Asset: formancegosdk.String("USD"), + Destination: formancegosdk.String("acct_1Gqj58KZcSIg2N2q"), + Metadata: &shared.StripeTransferRequestMetadata{}, + }) + if err != nil { + log.Fatal(err) + } + + if res.StripeTransferResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.StripeTransferRequest](../../models/shared/stripetransferrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.ConnectorsStripeTransferResponse](../../models/operations/connectorsstripetransferresponse.md), error** + + +## GetConnectorTask + +Get a specific task associated to the connector. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var connector shared.Connector = shared.ConnectorBankingCircle + + var taskID string = "string" + + ctx := context.Background() + res, err := s.Payments.GetConnectorTask(ctx, connector, taskID) + if err != nil { + log.Fatal(err) + } + + if res.TaskResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| `taskID` | *string* | :heavy_check_mark: | The task ID. | + + +### Response + +**[*operations.GetConnectorTaskResponse](../../models/operations/getconnectortaskresponse.md), error** + + +## GetPayment + +Get a payment + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var paymentID string = "string" + + ctx := context.Background() + res, err := s.Payments.GetPayment(ctx, paymentID) + if err != nil { + log.Fatal(err) + } + + if res.PaymentResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `paymentID` | *string* | :heavy_check_mark: | The payment ID. | + + +### Response + +**[*operations.GetPaymentResponse](../../models/operations/getpaymentresponse.md), error** + + +## InstallConnector + +Install a connector by its name and config. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var connectorConfig shared.ConnectorConfig = shared.CreateConnectorConfigDummyPayConfig( + shared.DummyPayConfig{ + Directory: "/tmp/dummypay", + FileGenerationPeriod: formancegosdk.String("60s"), + FilePollingPeriod: formancegosdk.String("60s"), + }, + ) + + var connector shared.Connector = shared.ConnectorBankingCircle + + ctx := context.Background() + res, err := s.Payments.InstallConnector(ctx, connectorConfig, connector) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connectorConfig` | [shared.ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | +| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | + + +### Response + +**[*operations.InstallConnectorResponse](../../models/operations/installconnectorresponse.md), error** + + +## ListAllConnectors + +List all installed connectors. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Payments.ListAllConnectors(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ConnectorsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.ListAllConnectorsResponse](../../models/operations/listallconnectorsresponse.md), error** + + +## ListConfigsAvailableConnectors + +List the configs of each available connector. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Payments.ListConfigsAvailableConnectors(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ConnectorsConfigsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.ListConfigsAvailableConnectorsResponse](../../models/operations/listconfigsavailableconnectorsresponse.md), error** + + +## ListConnectorTasks + +List all tasks associated with this connector. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var connector shared.Connector = shared.ConnectorDummyPay + + var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + + var pageSize *int64 = 501686 + + ctx := context.Background() + res, err := s.Payments.ListConnectorTasks(ctx, connector, cursor, pageSize) + if err != nil { + log.Fatal(err) + } + + if res.TasksCursor != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | +| `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | + + +### Response + +**[*operations.ListConnectorTasksResponse](../../models/operations/listconnectortasksresponse.md), error** + + +## ListPayments + +List payments + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + + var pageSize *int64 = 13778 + + sort := []string{ + "string", + } + + ctx := context.Background() + res, err := s.Payments.ListPayments(ctx, cursor, pageSize, sort) + if err != nil { + log.Fatal(err) + } + + if res.PaymentsCursor != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `sort` | []*string* | :heavy_minus_sign: | Fields used to sort payments (default is date:desc). | | + + +### Response + +**[*operations.ListPaymentsResponse](../../models/operations/listpaymentsresponse.md), error** + + +## PaymentslistAccounts + +List accounts + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + + var pageSize *int64 = 227071 + + sort := []string{ + "string", + } + + ctx := context.Background() + res, err := s.Payments.PaymentslistAccounts(ctx, cursor, pageSize, sort) + if err != nil { + log.Fatal(err) + } + + if res.AccountsCursor != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `sort` | []*string* | :heavy_minus_sign: | Fields used to sort payments (default is date:desc). | | + + +### Response + +**[*operations.PaymentslistAccountsResponse](../../models/operations/paymentslistaccountsresponse.md), error** + + +## ReadConnectorConfig + +Read connector config + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var connector shared.Connector = shared.ConnectorBankingCircle + + ctx := context.Background() + res, err := s.Payments.ReadConnectorConfig(ctx, connector) + if err != nil { + log.Fatal(err) + } + + if res.ConnectorConfigResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | + + +### Response + +**[*operations.ReadConnectorConfigResponse](../../models/operations/readconnectorconfigresponse.md), error** + + +## ResetConnector + +Reset a connector by its name. +It will remove the connector and ALL PAYMENTS generated with it. + + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var connector shared.Connector = shared.ConnectorCurrencyCloud + + ctx := context.Background() + res, err := s.Payments.ResetConnector(ctx, connector) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | + + +### Response + +**[*operations.ResetConnectorResponse](../../models/operations/resetconnectorresponse.md), error** + + +## UninstallConnector + +Uninstall a connector by its name. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var connector shared.Connector = shared.ConnectorDummyPay + + ctx := context.Background() + res, err := s.Payments.UninstallConnector(ctx, connector) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | + + +### Response + +**[*operations.UninstallConnectorResponse](../../models/operations/uninstallconnectorresponse.md), error** + diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md new file mode 100755 index 0000000..653223f --- /dev/null +++ b/docs/sdks/scopes/README.md @@ -0,0 +1,371 @@ +# Scopes +(*Scopes*) + +## Overview + +Everything related to Scopes + +### Available Operations + +* [AddTransientScope](#addtransientscope) - Add a transient scope to a scope +* [CreateScope](#createscope) - Create scope +* [DeleteScope](#deletescope) - Delete scope +* [DeleteTransientScope](#deletetransientscope) - Delete a transient scope from a scope +* [ListScopes](#listscopes) - List scopes +* [ReadScope](#readscope) - Read scope +* [UpdateScope](#updatescope) - Update scope + +## AddTransientScope + +Add a transient scope to a scope + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var scopeID string = "string" + + var transientScopeID string = "string" + + ctx := context.Background() + res, err := s.Scopes.AddTransientScope(ctx, scopeID, transientScopeID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | +| `transientScopeID` | *string* | :heavy_check_mark: | Transient scope ID | + + +### Response + +**[*operations.AddTransientScopeResponse](../../models/operations/addtransientscoperesponse.md), error** + + +## CreateScope + +Create scope + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Scopes.CreateScope(ctx, &shared.CreateScopeRequest{ + Label: "string", + Metadata: map[string]interface{}{ + "key": "string", + }, + }) + if err != nil { + log.Fatal(err) + } + + if res.CreateScopeResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateScopeRequest](../../models/shared/createscoperequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.CreateScopeResponse](../../models/operations/createscoperesponse.md), error** + + +## DeleteScope + +Delete scope + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var scopeID string = "string" + + ctx := context.Background() + res, err := s.Scopes.DeleteScope(ctx, scopeID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | + + +### Response + +**[*operations.DeleteScopeResponse](../../models/operations/deletescoperesponse.md), error** + + +## DeleteTransientScope + +Delete a transient scope from a scope + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var scopeID string = "string" + + var transientScopeID string = "string" + + ctx := context.Background() + res, err := s.Scopes.DeleteTransientScope(ctx, scopeID, transientScopeID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | +| `transientScopeID` | *string* | :heavy_check_mark: | Transient scope ID | + + +### Response + +**[*operations.DeleteTransientScopeResponse](../../models/operations/deletetransientscoperesponse.md), error** + + +## ListScopes + +List Scopes + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Scopes.ListScopes(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ListScopesResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.ListScopesResponse](../../models/operations/listscopesresponse.md), error** + + +## ReadScope + +Read scope + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var scopeID string = "string" + + ctx := context.Background() + res, err := s.Scopes.ReadScope(ctx, scopeID) + if err != nil { + log.Fatal(err) + } + + if res.ReadScopeResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | + + +### Response + +**[*operations.ReadScopeResponse](../../models/operations/readscoperesponse.md), error** + + +## UpdateScope + +Update scope + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var scopeID string = "string" + + updateScopeRequest := &shared.UpdateScopeRequest{ + Label: "string", + Metadata: map[string]interface{}{ + "key": "string", + }, + } + + ctx := context.Background() + res, err := s.Scopes.UpdateScope(ctx, scopeID, updateScopeRequest) + if err != nil { + log.Fatal(err) + } + + if res.UpdateScopeResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | +| `updateScopeRequest` | [*shared.UpdateScopeRequest](../../models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.UpdateScopeResponse](../../models/operations/updatescoperesponse.md), error** + diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md new file mode 100755 index 0000000..dedd895 --- /dev/null +++ b/docs/sdks/script/README.md @@ -0,0 +1,83 @@ +# Script +(*Script*) + +## Overview + +Everything related to Script + +### Available Operations + +* [~~RunScript~~](#runscript) - Execute a Numscript :warning: **Deprecated** + +## ~~RunScript~~ + +This route is deprecated, and has been merged into `POST /{ledger}/transactions`. + + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + script := shared.Script{ + Metadata: map[string]interface{}{ + "admin": "string", + "a": "string", + }, + Plain: "vars { + account $user + } + send [COIN 10] ( + source = @world + destination = $user + ) + ", + Reference: formancegosdk.String("order_1234"), + Vars: &shared.ScriptVars{}, + } + + var ledger string = "ledger001" + + var preview *bool = true + + ctx := context.Background() + res, err := s.Script.RunScript(ctx, script, ledger, preview) + if err != nil { + log.Fatal(err) + } + + if res.ScriptResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `script` | [shared.Script](../../models/shared/script.md) | :heavy_check_mark: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | + + +### Response + +**[*operations.RunScriptResponse](../../models/operations/runscriptresponse.md), error** + diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md new file mode 100755 index 0000000..1d28559 --- /dev/null +++ b/docs/sdks/search/README.md @@ -0,0 +1,110 @@ +# Search +(*Search*) + +## Overview + +Everything related to Search + +### Available Operations + +* [Search](#search) - Search + +## Search + +ElasticSearch query engine + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Search.Search(ctx, shared.Query{ + After: []string{ + "u", + "s", + "e", + "r", + "s", + ":", + "0", + "0", + "2", + }, + Cursor: formancegosdk.String("YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="), + Ledgers: []string{ + "q", + "u", + "i", + "c", + "k", + "s", + "t", + "a", + "r", + "t", + }, + Policy: formancegosdk.String("OR"), + Sort: formancegosdk.String("txid:asc"), + Terms: []string{ + "d", + "e", + "s", + "t", + "i", + "n", + "a", + "t", + "i", + "o", + "n", + "=", + "c", + "e", + "n", + "t", + "r", + "a", + "l", + "_", + "b", + "a", + "n", + "k", + "1", + }, + }) + if err != nil { + log.Fatal(err) + } + + if res.Response != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.Query](../../models/shared/query.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.SearchResponse](../../models/operations/searchresponse.md), error** + diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md new file mode 100755 index 0000000..6bc139d --- /dev/null +++ b/docs/sdks/server/README.md @@ -0,0 +1,55 @@ +# Server +(*Server*) + +## Overview + +Everything related to Server + +### Available Operations + +* [GetInfo](#getinfo) - Show server information + +## GetInfo + +Show server information + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Server.GetInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ConfigInfoResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.GetInfoResponse](../../models/operations/getinforesponse.md), error** + diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md new file mode 100755 index 0000000..7e305b8 --- /dev/null +++ b/docs/sdks/stats/README.md @@ -0,0 +1,60 @@ +# Stats +(*Stats*) + +## Overview + +Everything related to Stats + +### Available Operations + +* [ReadStats](#readstats) - Get statistics from a ledger + +## ReadStats + +Get statistics from a ledger. (aggregate metrics on accounts and transactions) + + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + ctx := context.Background() + res, err := s.Stats.ReadStats(ctx, ledger) + if err != nil { + log.Fatal(err) + } + + if res.StatsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | name of the ledger | ledger001 | + + +### Response + +**[*operations.ReadStatsResponse](../../models/operations/readstatsresponse.md), error** + diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md new file mode 100755 index 0000000..548cadf --- /dev/null +++ b/docs/sdks/transactions/README.md @@ -0,0 +1,439 @@ +# Transactions +(*Transactions*) + +## Overview + +Everything related to Transactions + +### Available Operations + +* [CreateTransactions](#createtransactions) - Create a new batch of transactions to a ledger +* [AddMetadataOnTransaction](#addmetadataontransaction) - Set the metadata of a transaction by its ID +* [CountTransactions](#counttransactions) - Count the transactions from a ledger +* [CreateTransaction](#createtransaction) - Create a new transaction to a ledger +* [GetTransaction](#gettransaction) - Get transaction from a ledger by its ID +* [ListTransactions](#listtransactions) - List transactions from a ledger +* [RevertTransaction](#reverttransaction) - Revert a ledger transaction by its ID + +## CreateTransactions + +Create a new batch of transactions to a ledger + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + transactions := shared.Transactions{ + Transactions: []shared.TransactionData{ + shared.TransactionData{ + Metadata: map[string]interface{}{ + "a": "string", + "admin": "string", + }, + Postings: []shared.Posting{ + shared.Posting{ + Amount: 100, + Asset: "COIN", + Destination: "users:002", + Source: "users:001", + }, + }, + Reference: formancegosdk.String("ref:001"), + }, + }, + } + + var ledger string = "ledger001" + + ctx := context.Background() + res, err := s.Transactions.CreateTransactions(ctx, transactions, ledger) + if err != nil { + log.Fatal(err) + } + + if res.TransactionsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `transactions` | [shared.Transactions](../../models/shared/transactions.md) | :heavy_check_mark: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | + + +### Response + +**[*operations.CreateTransactionsResponse](../../models/operations/createtransactionsresponse.md), error** + + +## AddMetadataOnTransaction + +Set the metadata of a transaction by its ID + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + var txid int64 = 1234 + + requestBody := map[string]interface{}{ + "admin": "string", + "a": "string", + } + + ctx := context.Background() + res, err := s.Transactions.AddMetadataOnTransaction(ctx, ledger, txid, requestBody) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | +| `requestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | [object Object] | + + +### Response + +**[*operations.AddMetadataOnTransactionResponse](../../models/operations/addmetadataontransactionresponse.md), error** + + +## CountTransactions + +Count the transactions from a ledger + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Transactions.CountTransactions(ctx, operations.CountTransactionsRequest{ + Account: formancegosdk.String("users:001"), + Destination: formancegosdk.String("users:001"), + Ledger: "ledger001", + Metadata: &operations.CountTransactionsMetadata{}, + Reference: formancegosdk.String("ref:001"), + Source: formancegosdk.String("users:001"), + }) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.CountTransactionsRequest](../../models/operations/counttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.CountTransactionsResponse](../../models/operations/counttransactionsresponse.md), error** + + +## CreateTransaction + +Create a new transaction to a ledger + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + postTransaction := shared.PostTransaction{ + Metadata: map[string]interface{}{ + "admin": "string", + "a": "string", + }, + Postings: []shared.Posting{ + shared.Posting{ + Amount: 100, + Asset: "COIN", + Destination: "users:002", + Source: "users:001", + }, + }, + Reference: formancegosdk.String("ref:001"), + Script: &shared.PostTransactionScript{ + Plain: "vars { + account $user + } + send [COIN 10] ( + source = @world + destination = $user + ) + ", + Vars: &shared.PostTransactionScriptVars{}, + }, + } + + var ledger string = "ledger001" + + var preview *bool = true + + ctx := context.Background() + res, err := s.Transactions.CreateTransaction(ctx, postTransaction, ledger, preview) + if err != nil { + log.Fatal(err) + } + + if res.TransactionsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `postTransaction` | [shared.PostTransaction](../../models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | + + +### Response + +**[*operations.CreateTransactionResponse](../../models/operations/createtransactionresponse.md), error** + + +## GetTransaction + +Get transaction from a ledger by its ID + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + var txid int64 = 1234 + + ctx := context.Background() + res, err := s.Transactions.GetTransaction(ctx, ledger, txid) + if err != nil { + log.Fatal(err) + } + + if res.TransactionResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | + + +### Response + +**[*operations.GetTransactionResponse](../../models/operations/gettransactionresponse.md), error** + + +## ListTransactions + +List transactions from a ledger, sorted by txid in descending order. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Transactions.ListTransactions(ctx, operations.ListTransactionsRequest{ + Account: formancegosdk.String("users:001"), + After: formancegosdk.String("1234"), + Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + Destination: formancegosdk.String("users:001"), + Ledger: "ledger001", + Metadata: &operations.ListTransactionsMetadata{}, + PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), + Reference: formancegosdk.String("ref:001"), + Source: formancegosdk.String("users:001"), + }) + if err != nil { + log.Fatal(err) + } + + if res.TransactionsCursorResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.ListTransactionsRequest](../../models/operations/listtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.ListTransactionsResponse](../../models/operations/listtransactionsresponse.md), error** + + +## RevertTransaction + +Revert a ledger transaction by its ID + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var ledger string = "ledger001" + + var txid int64 = 1234 + + ctx := context.Background() + res, err := s.Transactions.RevertTransaction(ctx, ledger, txid) + if err != nil { + log.Fatal(err) + } + + if res.TransactionResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | + + +### Response + +**[*operations.RevertTransactionResponse](../../models/operations/reverttransactionresponse.md), error** + diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md new file mode 100755 index 0000000..b270d29 --- /dev/null +++ b/docs/sdks/users/README.md @@ -0,0 +1,105 @@ +# Users +(*Users*) + +## Overview + +Everything related to Users + +### Available Operations + +* [ListUsers](#listusers) - List users +* [ReadUser](#readuser) - Read user + +## ListUsers + +List users + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Users.ListUsers(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ListUsersResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.ListUsersResponse](../../models/operations/listusersresponse.md), error** + + +## ReadUser + +Read user + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var userID string = "string" + + ctx := context.Background() + res, err := s.Users.ReadUser(ctx, userID) + if err != nil { + log.Fatal(err) + } + + if res.ReadUserResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `userID` | *string* | :heavy_check_mark: | User ID | + + +### Response + +**[*operations.ReadUserResponse](../../models/operations/readuserresponse.md), error** + diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md new file mode 100755 index 0000000..b92249a --- /dev/null +++ b/docs/sdks/wallets/README.md @@ -0,0 +1,842 @@ +# Wallets +(*Wallets*) + +## Overview + +Everything related to Wallets + +### Available Operations + +* [ConfirmHold](#confirmhold) - Confirm a hold +* [CreateBalance](#createbalance) - Create a balance +* [CreateWallet](#createwallet) - Create a new wallet +* [CreditWallet](#creditwallet) - Credit a wallet +* [DebitWallet](#debitwallet) - Debit a wallet +* [GetBalance](#getbalance) - Get detailed balance +* [GetHold](#gethold) - Get a hold +* [GetHolds](#getholds) - Get all holds for a wallet +* [GetTransactions](#gettransactions) +* [GetWallet](#getwallet) - Get a wallet +* [ListBalances](#listbalances) - List balances of a wallet +* [ListWallets](#listwallets) - List all wallets +* [UpdateWallet](#updatewallet) - Update a wallet +* [VoidHold](#voidhold) - Cancel a hold +* [WalletsgetServerInfo](#walletsgetserverinfo) - Get server info + +## ConfirmHold + +Confirm a hold + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var holdID string = "string" + + confirmHoldRequest := &shared.ConfirmHoldRequest{ + Amount: formancegosdk.Int64(100), + Final: formancegosdk.Bool(true), + } + + ctx := context.Background() + res, err := s.Wallets.ConfirmHold(ctx, holdID, confirmHoldRequest) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `holdID` | *string* | :heavy_check_mark: | N/A | +| `confirmHoldRequest` | [*shared.ConfirmHoldRequest](../../models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.ConfirmHoldResponse](../../models/operations/confirmholdresponse.md), error** + + +## CreateBalance + +Create a balance + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "string" + + createBalanceRequest := &shared.CreateBalanceRequest{ + Name: "string", + } + + ctx := context.Background() + res, err := s.Wallets.CreateBalance(ctx, id, createBalanceRequest) + if err != nil { + log.Fatal(err) + } + + if res.CreateBalanceResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `createBalanceRequest` | [*shared.CreateBalanceRequest](../../models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.CreateBalanceResponse](../../models/operations/createbalanceresponse.md), error** + + +## CreateWallet + +Create a new wallet + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Wallets.CreateWallet(ctx, &shared.CreateWalletRequest{ + Metadata: map[string]interface{}{ + "key": "string", + }, + Name: "string", + }) + if err != nil { + log.Fatal(err) + } + + if res.CreateWalletResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateWalletRequest](../../models/shared/createwalletrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.CreateWalletResponse](../../models/operations/createwalletresponse.md), error** + + +## CreditWallet + +Credit a wallet + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "string" + + creditWalletRequest := &shared.CreditWalletRequest{ + Amount: shared.Monetary{ + Amount: 201874, + Asset: "string", + }, + Metadata: map[string]interface{}{ + "key": "string", + }, + Sources: []shared.Subject{ + shared.CreateSubjectLedgerAccountSubject( + shared.LedgerAccountSubject{ + Identifier: "string", + Type: "string", + }, + ), + }, + } + + ctx := context.Background() + res, err := s.Wallets.CreditWallet(ctx, id, creditWalletRequest) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `creditWalletRequest` | [*shared.CreditWalletRequest](../../models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.CreditWalletResponse](../../models/operations/creditwalletresponse.md), error** + + +## DebitWallet + +Debit a wallet + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "string" + + debitWalletRequest := &shared.DebitWalletRequest{ + Amount: shared.Monetary{ + Amount: 245256, + Asset: "string", + }, + Balances: []string{ + "string", + }, + Destination: shared.CreateSubjectLedgerAccountSubject( + shared.LedgerAccountSubject{ + Identifier: "string", + Type: "string", + }, + ), + Metadata: map[string]interface{}{ + "key": "string", + }, + } + + ctx := context.Background() + res, err := s.Wallets.DebitWallet(ctx, id, debitWalletRequest) + if err != nil { + log.Fatal(err) + } + + if res.DebitWalletResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `debitWalletRequest` | [*shared.DebitWalletRequest](../../models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.DebitWalletResponse](../../models/operations/debitwalletresponse.md), error** + + +## GetBalance + +Get detailed balance + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var balanceName string = "string" + + var id string = "string" + + ctx := context.Background() + res, err := s.Wallets.GetBalance(ctx, balanceName, id) + if err != nil { + log.Fatal(err) + } + + if res.GetBalanceResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `balanceName` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | + + +### Response + +**[*operations.GetBalanceResponse](../../models/operations/getbalanceresponse.md), error** + + +## GetHold + +Get a hold + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var holdID string = "string" + + ctx := context.Background() + res, err := s.Wallets.GetHold(ctx, holdID) + if err != nil { + log.Fatal(err) + } + + if res.GetHoldResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `holdID` | *string* | :heavy_check_mark: | The hold ID | + + +### Response + +**[*operations.GetHoldResponse](../../models/operations/getholdresponse.md), error** + + +## GetHolds + +Get all holds for a wallet + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + + metadata := &operations.GetHoldsMetadata{} + + var pageSize *int64 = 692494 + + var walletID *string = "string" + + ctx := context.Background() + res, err := s.Wallets.GetHolds(ctx, cursor, metadata, pageSize, walletID) + if err != nil { + log.Fatal(err) + } + + if res.GetHoldsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `metadata` | [*operations.GetHoldsMetadata](../../models/operations/getholdsmetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | +| `walletID` | **string* | :heavy_minus_sign: | The wallet to filter on | | + + +### Response + +**[*operations.GetHoldsResponse](../../models/operations/getholdsresponse.md), error** + + +## GetTransactions + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + + var pageSize *int64 = 680555 + + var walletID *string = "string" + + ctx := context.Background() + res, err := s.Wallets.GetTransactions(ctx, cursor, pageSize, walletID) + if err != nil { + log.Fatal(err) + } + + if res.GetTransactionsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the cursor is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | +| `walletID` | **string* | :heavy_minus_sign: | A wallet ID to filter on | | + + +### Response + +**[*operations.GetTransactionsResponse](../../models/operations/gettransactionsresponse.md), error** + + +## GetWallet + +Get a wallet + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "string" + + ctx := context.Background() + res, err := s.Wallets.GetWallet(ctx, id) + if err != nil { + log.Fatal(err) + } + + if res.GetWalletResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | + + +### Response + +**[*operations.GetWalletResponse](../../models/operations/getwalletresponse.md), error** + + +## ListBalances + +List balances of a wallet + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "string" + + ctx := context.Background() + res, err := s.Wallets.ListBalances(ctx, id) + if err != nil { + log.Fatal(err) + } + + if res.ListBalancesResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | + + +### Response + +**[*operations.ListBalancesResponse](../../models/operations/listbalancesresponse.md), error** + + +## ListWallets + +List all wallets + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + + metadata := &operations.ListWalletsMetadata{} + + var name *string = "string" + + var pageSize *int64 = 412533 + + ctx := context.Background() + res, err := s.Wallets.ListWallets(ctx, cursor, metadata, name, pageSize) + if err != nil { + log.Fatal(err) + } + + if res.ListWalletsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `metadata` | [*operations.ListWalletsMetadata](../../models/operations/listwalletsmetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `name` | **string* | :heavy_minus_sign: | Filter on wallet name | | +| `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | + + +### Response + +**[*operations.ListWalletsResponse](../../models/operations/listwalletsresponse.md), error** + + +## UpdateWallet + +Update a wallet + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "string" + + requestBody := &operations.UpdateWalletRequestBody{ + Metadata: map[string]interface{}{ + "key": "string", + }, + } + + ctx := context.Background() + res, err := s.Wallets.UpdateWallet(ctx, id, requestBody) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [*operations.UpdateWalletRequestBody](../../models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | + + +### Response + +**[*operations.UpdateWalletResponse](../../models/operations/updatewalletresponse.md), error** + + +## VoidHold + +Cancel a hold + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var holdID string = "string" + + ctx := context.Background() + res, err := s.Wallets.VoidHold(ctx, holdID) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `holdID` | *string* | :heavy_check_mark: | N/A | + + +### Response + +**[*operations.VoidHoldResponse](../../models/operations/voidholdresponse.md), error** + + +## WalletsgetServerInfo + +Get server info + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Wallets.WalletsgetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | + + +### Response + +**[*operations.WalletsgetServerInfoResponse](../../models/operations/walletsgetserverinforesponse.md), error** + diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md new file mode 100755 index 0000000..2d15041 --- /dev/null +++ b/docs/sdks/webhooks/README.md @@ -0,0 +1,384 @@ +# Webhooks +(*Webhooks*) + +## Overview + +Everything related to Webhooks + +### Available Operations + +* [ActivateConfig](#activateconfig) - Activate one config +* [ChangeConfigSecret](#changeconfigsecret) - Change the signing secret of a config +* [DeactivateConfig](#deactivateconfig) - Deactivate one config +* [DeleteConfig](#deleteconfig) - Delete one config +* [GetManyConfigs](#getmanyconfigs) - Get many configs +* [InsertConfig](#insertconfig) - Insert a new config +* [TestConfig](#testconfig) - Test one config + +## ActivateConfig + +Activate a webhooks config by ID, to start receiving webhooks to its endpoint. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "4997257d-dfb6-445b-929c-cbe2ab182818" + + ctx := context.Background() + res, err := s.Webhooks.ActivateConfig(ctx, id) + if err != nil { + log.Fatal(err) + } + + if res.ConfigResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | + + +### Response + +**[*operations.ActivateConfigResponse](../../models/operations/activateconfigresponse.md), error** + + +## ChangeConfigSecret + +Change the signing secret of the endpoint of a webhooks config. + +If not passed or empty, a secret is automatically generated. +The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "4997257d-dfb6-445b-929c-cbe2ab182818" + + configChangeSecret := &shared.ConfigChangeSecret{ + Secret: formancegosdk.String("V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"), + } + + ctx := context.Background() + res, err := s.Webhooks.ChangeConfigSecret(ctx, id, configChangeSecret) + if err != nil { + log.Fatal(err) + } + + if res.ConfigResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | +| `configChangeSecret` | [*shared.ConfigChangeSecret](../../models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | + + +### Response + +**[*operations.ChangeConfigSecretResponse](../../models/operations/changeconfigsecretresponse.md), error** + + +## DeactivateConfig + +Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "4997257d-dfb6-445b-929c-cbe2ab182818" + + ctx := context.Background() + res, err := s.Webhooks.DeactivateConfig(ctx, id) + if err != nil { + log.Fatal(err) + } + + if res.ConfigResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | + + +### Response + +**[*operations.DeactivateConfigResponse](../../models/operations/deactivateconfigresponse.md), error** + + +## DeleteConfig + +Delete a webhooks config by ID. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "4997257d-dfb6-445b-929c-cbe2ab182818" + + ctx := context.Background() + res, err := s.Webhooks.DeleteConfig(ctx, id) + if err != nil { + log.Fatal(err) + } + + if res.StatusCode == http.StatusOK { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | + + +### Response + +**[*operations.DeleteConfigResponse](../../models/operations/deleteconfigresponse.md), error** + + +## GetManyConfigs + +Sorted by updated date descending + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var endpoint *string = "https://example.com" + + var id *string = "4997257d-dfb6-445b-929c-cbe2ab182818" + + ctx := context.Background() + res, err := s.Webhooks.GetManyConfigs(ctx, endpoint, id) + if err != nil { + log.Fatal(err) + } + + if res.ConfigsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `endpoint` | **string* | :heavy_minus_sign: | Optional filter by endpoint URL | https://example.com | +| `id` | **string* | :heavy_minus_sign: | Optional filter by Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | + + +### Response + +**[*operations.GetManyConfigsResponse](../../models/operations/getmanyconfigsresponse.md), error** + + +## InsertConfig + +Insert a new webhooks config. + +The endpoint should be a valid https URL and be unique. + +The secret is the endpoint's verification secret. +If not passed or empty, a secret is automatically generated. +The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + +All eventTypes are converted to lower-case when inserted. + + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.Webhooks.InsertConfig(ctx, shared.ConfigUser{ + Endpoint: "https://example.com", + EventTypes: []string{ + "TYPE1", + "TYPE2", + }, + Secret: formancegosdk.String("V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"), + }) + if err != nil { + log.Fatal(err) + } + + if res.ConfigResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.ConfigUser](../../models/shared/configuser.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[*operations.InsertConfigResponse](../../models/operations/insertconfigresponse.md), error** + + +## TestConfig + +Test a config by sending a webhook to its endpoint. + +### Example Usage + +```go +package main + +import( + "context" + "log" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + + var id string = "4997257d-dfb6-445b-929c-cbe2ab182818" + + ctx := context.Background() + res, err := s.Webhooks.TestConfig(ctx, id) + if err != nil { + log.Fatal(err) + } + + if res.AttemptResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | + + +### Response + +**[*operations.TestConfigResponse](../../models/operations/testconfigresponse.md), error** + diff --git a/files.gen b/files.gen index e443061..f89cdb0 100755 --- a/files.gen +++ b/files.gen @@ -18,16 +18,23 @@ webhooks.go formance.go go.mod go.sum +pkg/models/sdkerrors/sdkerror.go +pkg/types/bigint.go pkg/types/date.go +pkg/types/datetime.go +pkg/types/decimal.go +pkg/types/pointers.go pkg/utils/contenttype.go pkg/utils/form.go pkg/utils/headers.go +pkg/utils/json.go pkg/utils/pathparams.go pkg/utils/queryparams.go pkg/utils/requestbody.go pkg/utils/retries.go pkg/utils/security.go pkg/utils/utils.go +tests/helpers.go pkg/models/operations/addmetadatatoaccount.go pkg/models/operations/countaccounts.go pkg/models/operations/getaccount.go @@ -112,7 +119,7 @@ pkg/models/operations/getserverinfo.go pkg/models/operations/paymentsgetserverinfo.go pkg/models/operations/searchgetserverinfo.go pkg/models/shared/errorresponse.go -pkg/models/shared/errorsenumenum.go +pkg/models/shared/errorsenum.go pkg/models/shared/accountresponse.go pkg/models/shared/accountwithvolumesandbalances.go pkg/models/shared/accountscursorresponse.go @@ -130,6 +137,9 @@ pkg/models/shared/listclientsresponse.go pkg/models/shared/readclientresponse.go pkg/models/shared/updateclientresponse.go pkg/models/shared/updateclientrequest.go +pkg/models/shared/ledgerinforesponse.go +pkg/models/shared/ledgerinfo.go +pkg/models/shared/migrationinfo.go pkg/models/shared/logscursorresponse.go pkg/models/shared/log.go pkg/models/shared/mappingresponse.go @@ -145,23 +155,26 @@ pkg/models/shared/getworkflowoccurrenceresponse.go pkg/models/shared/workflowoccurrence.go pkg/models/shared/stagestatus.go pkg/models/shared/listworkflowsresponse.go +pkg/models/shared/listrunsresponse.go pkg/models/shared/serverinfo.go pkg/models/shared/runworkflowresponse.go +pkg/models/shared/stripetransferresponse.go pkg/models/shared/stripetransferrequest.go pkg/models/shared/taskresponse.go pkg/models/shared/taskstripe.go -pkg/models/shared/paymentstatusenum.go +pkg/models/shared/paymentstatus.go pkg/models/shared/taskwise.go pkg/models/shared/taskcurrencycloud.go pkg/models/shared/taskdummypay.go pkg/models/shared/taskmodulr.go pkg/models/shared/taskbankingcircle.go -pkg/models/shared/connectorenum.go +pkg/models/shared/connector.go pkg/models/shared/paymentresponse.go pkg/models/shared/payment.go pkg/models/shared/paymentmetadata.go pkg/models/shared/paymentmetadatachangelog.go pkg/models/shared/paymentadjustment.go +pkg/models/shared/connectorconfig.go pkg/models/shared/stripeconfig.go pkg/models/shared/dummypayconfig.go pkg/models/shared/wiseconfig.go @@ -213,6 +226,9 @@ pkg/models/shared/createwalletresponse.go pkg/models/shared/wallet.go pkg/models/shared/createwalletrequest.go pkg/models/shared/creditwalletrequest.go +pkg/models/shared/subject.go +pkg/models/shared/ledgeraccountsubject.go +pkg/models/shared/walletsubject.go pkg/models/shared/monetary.go pkg/models/shared/debitwalletresponse.go pkg/models/shared/hold.go @@ -231,9 +247,376 @@ pkg/models/shared/assetholder.go pkg/models/shared/listbalancesresponse.go pkg/models/shared/listwalletsresponse.go pkg/models/shared/configresponse.go +pkg/models/shared/webhooksconfig.go pkg/models/shared/configchangesecret.go pkg/models/shared/configsresponse.go pkg/models/shared/configuser.go pkg/models/shared/attemptresponse.go +pkg/models/shared/attempt.go pkg/models/shared/security.go -USAGE.md \ No newline at end of file +USAGE.md +docs/models/operations/addmetadatatoaccountrequest.md +docs/models/operations/addmetadatatoaccountresponse.md +docs/models/operations/countaccountsmetadata.md +docs/models/operations/countaccountsrequest.md +docs/models/operations/countaccountsresponse.md +docs/models/operations/getaccountrequest.md +docs/models/operations/getaccountresponse.md +docs/models/operations/listaccountsbalanceoperator.md +docs/models/operations/listaccountsmetadata.md +docs/models/operations/listaccountsrequest.md +docs/models/operations/listaccountsresponse.md +docs/models/operations/getbalancesrequest.md +docs/models/operations/getbalancesresponse.md +docs/models/operations/getbalancesaggregatedrequest.md +docs/models/operations/getbalancesaggregatedresponse.md +docs/models/operations/addscopetoclientrequest.md +docs/models/operations/addscopetoclientresponse.md +docs/models/operations/createclientresponse.md +docs/models/operations/createsecretrequest.md +docs/models/operations/createsecretresponse.md +docs/models/operations/deleteclientrequest.md +docs/models/operations/deleteclientresponse.md +docs/models/operations/deletescopefromclientrequest.md +docs/models/operations/deletescopefromclientresponse.md +docs/models/operations/deletesecretrequest.md +docs/models/operations/deletesecretresponse.md +docs/models/operations/listclientsresponse.md +docs/models/operations/readclientrequest.md +docs/models/operations/readclientresponse.md +docs/models/operations/updateclientrequest.md +docs/models/operations/updateclientresponse.md +docs/models/operations/getledgerinforequest.md +docs/models/operations/getledgerinforesponse.md +docs/models/operations/listlogsrequest.md +docs/models/operations/listlogsresponse.md +docs/models/operations/getmappingrequest.md +docs/models/operations/getmappingresponse.md +docs/models/operations/updatemappingrequest.md +docs/models/operations/updatemappingresponse.md +docs/models/operations/createworkflowresponse.md +docs/models/operations/getflowrequest.md +docs/models/operations/getflowresponse.md +docs/models/operations/getworkflowoccurrencerequest.md +docs/models/operations/getworkflowoccurrenceresponse.md +docs/models/operations/listflowsresponse.md +docs/models/operations/listrunsrequest.md +docs/models/operations/listrunsresponse.md +docs/models/operations/orchestrationgetserverinforesponse.md +docs/models/operations/runworkflowrequest.md +docs/models/operations/runworkflowresponse.md +docs/models/operations/connectorsstripetransferresponse.md +docs/models/operations/getconnectortaskrequest.md +docs/models/operations/getconnectortaskresponse.md +docs/models/operations/getpaymentrequest.md +docs/models/operations/getpaymentresponse.md +docs/models/operations/installconnectorrequest.md +docs/models/operations/installconnectorresponse.md +docs/models/operations/listallconnectorsresponse.md +docs/models/operations/listconfigsavailableconnectorsresponse.md +docs/models/operations/listconnectortasksrequest.md +docs/models/operations/listconnectortasksresponse.md +docs/models/operations/listpaymentsrequest.md +docs/models/operations/listpaymentsresponse.md +docs/models/operations/paymentslistaccountsrequest.md +docs/models/operations/paymentslistaccountsresponse.md +docs/models/operations/readconnectorconfigrequest.md +docs/models/operations/readconnectorconfigresponse.md +docs/models/operations/resetconnectorrequest.md +docs/models/operations/resetconnectorresponse.md +docs/models/operations/uninstallconnectorrequest.md +docs/models/operations/uninstallconnectorresponse.md +docs/models/operations/addtransientscoperequest.md +docs/models/operations/addtransientscoperesponse.md +docs/models/operations/createscoperesponse.md +docs/models/operations/deletescoperequest.md +docs/models/operations/deletescoperesponse.md +docs/models/operations/deletetransientscoperequest.md +docs/models/operations/deletetransientscoperesponse.md +docs/models/operations/listscopesresponse.md +docs/models/operations/readscoperequest.md +docs/models/operations/readscoperesponse.md +docs/models/operations/updatescoperequest.md +docs/models/operations/updatescoperesponse.md +docs/models/operations/runscriptrequest.md +docs/models/operations/runscriptresponse.md +docs/models/operations/searchresponse.md +docs/models/operations/getinforesponse.md +docs/models/operations/readstatsrequest.md +docs/models/operations/readstatsresponse.md +docs/models/operations/createtransactionsrequest.md +docs/models/operations/createtransactionsresponse.md +docs/models/operations/addmetadataontransactionrequest.md +docs/models/operations/addmetadataontransactionresponse.md +docs/models/operations/counttransactionsmetadata.md +docs/models/operations/counttransactionsrequest.md +docs/models/operations/counttransactionsresponse.md +docs/models/operations/createtransactionrequest.md +docs/models/operations/createtransactionresponse.md +docs/models/operations/gettransactionrequest.md +docs/models/operations/gettransactionresponse.md +docs/models/operations/listtransactionsmetadata.md +docs/models/operations/listtransactionsrequest.md +docs/models/operations/listtransactionsresponse.md +docs/models/operations/reverttransactionrequest.md +docs/models/operations/reverttransactionresponse.md +docs/models/operations/listusersresponse.md +docs/models/operations/readuserrequest.md +docs/models/operations/readuserresponse.md +docs/models/operations/confirmholdrequest.md +docs/models/operations/confirmholdresponse.md +docs/models/operations/createbalancerequest.md +docs/models/operations/createbalanceresponse.md +docs/models/operations/createwalletresponse.md +docs/models/operations/creditwalletrequest.md +docs/models/operations/creditwalletresponse.md +docs/models/operations/debitwalletrequest.md +docs/models/operations/debitwalletresponse.md +docs/models/operations/getbalancerequest.md +docs/models/operations/getbalanceresponse.md +docs/models/operations/getholdrequest.md +docs/models/operations/getholdresponse.md +docs/models/operations/getholdsmetadata.md +docs/models/operations/getholdsrequest.md +docs/models/operations/getholdsresponse.md +docs/models/operations/gettransactionsrequest.md +docs/models/operations/gettransactionsresponse.md +docs/models/operations/getwalletrequest.md +docs/models/operations/getwalletresponse.md +docs/models/operations/listbalancesrequest.md +docs/models/operations/listbalancesresponse.md +docs/models/operations/listwalletsmetadata.md +docs/models/operations/listwalletsrequest.md +docs/models/operations/listwalletsresponse.md +docs/models/operations/updatewalletrequestbody.md +docs/models/operations/updatewalletrequest.md +docs/models/operations/updatewalletresponse.md +docs/models/operations/voidholdrequest.md +docs/models/operations/voidholdresponse.md +docs/models/operations/walletsgetserverinforesponse.md +docs/models/operations/activateconfigrequest.md +docs/models/operations/activateconfigresponse.md +docs/models/operations/changeconfigsecretrequest.md +docs/models/operations/changeconfigsecretresponse.md +docs/models/operations/deactivateconfigrequest.md +docs/models/operations/deactivateconfigresponse.md +docs/models/operations/deleteconfigrequest.md +docs/models/operations/deleteconfigresponse.md +docs/models/operations/getmanyconfigsrequest.md +docs/models/operations/getmanyconfigsresponse.md +docs/models/operations/insertconfigresponse.md +docs/models/operations/testconfigrequest.md +docs/models/operations/testconfigresponse.md +docs/models/operations/getserverinforesponse.md +docs/models/operations/paymentsgetserverinforesponse.md +docs/models/operations/searchgetserverinforesponse.md +docs/models/shared/errorresponse.md +docs/models/shared/errorsenum.md +docs/models/shared/accountresponse.md +docs/models/shared/accountwithvolumesandbalancesmetadata.md +docs/models/shared/accountwithvolumesandbalances.md +docs/models/shared/accountscursorresponsecursor.md +docs/models/shared/accountscursorresponse.md +docs/models/shared/accountmetadata.md +docs/models/shared/account.md +docs/models/shared/balancescursorresponsecursor.md +docs/models/shared/balancescursorresponse.md +docs/models/shared/aggregatebalancesresponse.md +docs/models/shared/createclientresponse.md +docs/models/shared/client.md +docs/models/shared/clientsecret.md +docs/models/shared/createclientrequest.md +docs/models/shared/createsecretresponse.md +docs/models/shared/secret.md +docs/models/shared/createsecretrequest.md +docs/models/shared/listclientsresponse.md +docs/models/shared/readclientresponse.md +docs/models/shared/updateclientresponse.md +docs/models/shared/updateclientrequest.md +docs/models/shared/ledgerinforesponse.md +docs/models/shared/ledgerinfostorage.md +docs/models/shared/ledgerinfo.md +docs/models/shared/migrationinfostate.md +docs/models/shared/migrationinfo.md +docs/models/shared/logscursorresponsecursor.md +docs/models/shared/logscursorresponse.md +docs/models/shared/logdata.md +docs/models/shared/logtype.md +docs/models/shared/log.md +docs/models/shared/mappingresponse.md +docs/models/shared/mapping.md +docs/models/shared/contractexpr.md +docs/models/shared/contract.md +docs/models/shared/errorerrorcode.md +docs/models/shared/error.md +docs/models/shared/createworkflowresponse.md +docs/models/shared/workflow.md +docs/models/shared/workflowconfig.md +docs/models/shared/createworkflowrequest.md +docs/models/shared/getworkflowresponse.md +docs/models/shared/getworkflowoccurrenceresponse.md +docs/models/shared/workflowoccurrence.md +docs/models/shared/stagestatus.md +docs/models/shared/listworkflowsresponse.md +docs/models/shared/listrunsresponsecursor.md +docs/models/shared/listrunsresponse.md +docs/models/shared/serverinfo.md +docs/models/shared/runworkflowresponse.md +docs/models/shared/stripetransferresponse.md +docs/models/shared/stripetransferrequestmetadata.md +docs/models/shared/stripetransferrequest.md +docs/models/shared/taskresponsedata.md +docs/models/shared/taskresponse.md +docs/models/shared/taskstripedescriptor.md +docs/models/shared/taskstripestate.md +docs/models/shared/taskstripe.md +docs/models/shared/paymentstatus.md +docs/models/shared/taskwisedescriptor.md +docs/models/shared/taskwisestate.md +docs/models/shared/taskwise.md +docs/models/shared/taskcurrencyclouddescriptor.md +docs/models/shared/taskcurrencycloudstate.md +docs/models/shared/taskcurrencycloud.md +docs/models/shared/taskdummypaydescriptor.md +docs/models/shared/taskdummypaystate.md +docs/models/shared/taskdummypay.md +docs/models/shared/taskmodulrdescriptor.md +docs/models/shared/taskmodulrstate.md +docs/models/shared/taskmodulr.md +docs/models/shared/taskbankingcircledescriptor.md +docs/models/shared/taskbankingcirclestate.md +docs/models/shared/taskbankingcircle.md +docs/models/shared/connector.md +docs/models/shared/paymentresponse.md +docs/models/shared/paymentraw.md +docs/models/shared/paymentscheme.md +docs/models/shared/paymenttype.md +docs/models/shared/payment.md +docs/models/shared/paymentmetadata.md +docs/models/shared/paymentmetadatachangelog.md +docs/models/shared/paymentadjustmentraw.md +docs/models/shared/paymentadjustment.md +docs/models/shared/connectorconfig.md +docs/models/shared/stripeconfig.md +docs/models/shared/dummypayconfig.md +docs/models/shared/wiseconfig.md +docs/models/shared/modulrconfig.md +docs/models/shared/currencycloudconfig.md +docs/models/shared/bankingcircleconfig.md +docs/models/shared/connectorsresponsedata.md +docs/models/shared/connectorsresponse.md +docs/models/shared/connectorsconfigsresponsedataconnectorkey.md +docs/models/shared/connectorsconfigsresponsedataconnector.md +docs/models/shared/connectorsconfigsresponsedata.md +docs/models/shared/connectorsconfigsresponse.md +docs/models/shared/taskscursorcursordata.md +docs/models/shared/taskscursorcursor.md +docs/models/shared/taskscursor.md +docs/models/shared/paymentscursorcursor.md +docs/models/shared/paymentscursor.md +docs/models/shared/accountscursorcursor.md +docs/models/shared/accountscursor.md +docs/models/shared/paymentsaccounttype.md +docs/models/shared/paymentsaccount.md +docs/models/shared/connectorconfigresponse.md +docs/models/shared/createscoperesponse.md +docs/models/shared/scope.md +docs/models/shared/createscoperequest.md +docs/models/shared/listscopesresponse.md +docs/models/shared/readscoperesponse.md +docs/models/shared/updatescoperesponse.md +docs/models/shared/updatescoperequest.md +docs/models/shared/scriptresponse.md +docs/models/shared/transaction.md +docs/models/shared/volume.md +docs/models/shared/posting.md +docs/models/shared/scriptvars.md +docs/models/shared/script.md +docs/models/shared/responsecursordata.md +docs/models/shared/responsecursortotal.md +docs/models/shared/responsecursor.md +docs/models/shared/responsedata.md +docs/models/shared/response.md +docs/models/shared/query.md +docs/models/shared/configinforesponse.md +docs/models/shared/configinfo.md +docs/models/shared/config.md +docs/models/shared/ledgerstorage.md +docs/models/shared/statsresponse.md +docs/models/shared/stats.md +docs/models/shared/transactionsresponse.md +docs/models/shared/transactions.md +docs/models/shared/transactiondata.md +docs/models/shared/posttransactionscriptvars.md +docs/models/shared/posttransactionscript.md +docs/models/shared/posttransaction.md +docs/models/shared/transactionresponse.md +docs/models/shared/transactionscursorresponsecursor.md +docs/models/shared/transactionscursorresponse.md +docs/models/shared/listusersresponse.md +docs/models/shared/user.md +docs/models/shared/readuserresponse.md +docs/models/shared/walletserrorresponseerrorcode.md +docs/models/shared/walletserrorresponse.md +docs/models/shared/confirmholdrequest.md +docs/models/shared/createbalanceresponse.md +docs/models/shared/balance.md +docs/models/shared/createbalancerequest.md +docs/models/shared/createwalletresponse.md +docs/models/shared/wallet.md +docs/models/shared/createwalletrequest.md +docs/models/shared/creditwalletrequest.md +docs/models/shared/subject.md +docs/models/shared/ledgeraccountsubject.md +docs/models/shared/walletsubject.md +docs/models/shared/monetary.md +docs/models/shared/debitwalletresponse.md +docs/models/shared/hold.md +docs/models/shared/debitwalletrequest.md +docs/models/shared/getbalanceresponse.md +docs/models/shared/balancewithassets.md +docs/models/shared/getholdresponse.md +docs/models/shared/expandeddebithold.md +docs/models/shared/getholdsresponsecursor.md +docs/models/shared/getholdsresponse.md +docs/models/shared/gettransactionsresponsecursor.md +docs/models/shared/gettransactionsresponse.md +docs/models/shared/walletstransaction.md +docs/models/shared/walletsvolume.md +docs/models/shared/getwalletresponse.md +docs/models/shared/walletwithbalancesbalances.md +docs/models/shared/walletwithbalances.md +docs/models/shared/assetholder.md +docs/models/shared/listbalancesresponsecursor.md +docs/models/shared/listbalancesresponse.md +docs/models/shared/listwalletsresponsecursor.md +docs/models/shared/listwalletsresponse.md +docs/models/shared/configresponse.md +docs/models/shared/webhooksconfig.md +docs/models/shared/configchangesecret.md +docs/models/shared/configsresponsecursor.md +docs/models/shared/configsresponse.md +docs/models/shared/configuser.md +docs/models/shared/attemptresponse.md +docs/models/shared/attempt.md +docs/models/shared/security.md +docs/sdks/formance/README.md +docs/sdks/accounts/README.md +docs/sdks/balances/README.md +docs/sdks/clients/README.md +docs/sdks/ledger/README.md +docs/sdks/logs/README.md +docs/sdks/mapping/README.md +docs/sdks/orchestration/README.md +docs/sdks/payments/README.md +docs/sdks/scopes/README.md +docs/sdks/script/README.md +docs/sdks/search/README.md +docs/sdks/server/README.md +docs/sdks/stats/README.md +docs/sdks/transactions/README.md +docs/sdks/users/README.md +docs/sdks/wallets/README.md +docs/sdks/webhooks/README.md +pkg/models/operations/options.go +.gitattributes \ No newline at end of file diff --git a/formance.go b/formance.go index b7d30f1..12b34b1 100755 --- a/formance.go +++ b/formance.go @@ -1,21 +1,30 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" "time" ) +// ServerList contains the list of servers available to the SDK var ServerList = []string{ + // local server "http://localhost", + // sandbox server "https://{organization}.sandbox.formance.cloud", } +// HTTPClient provides an interface for suplying the SDK with a custom HTTP client type HTTPClient interface { Do(req *http.Request) (*http.Response, error) } @@ -23,7 +32,45 @@ type HTTPClient interface { // String provides a helper function to return a pointer to a string func String(s string) *string { return &s } -// SDK Documentation: Open, modular foundation for unique payments flows +// Bool provides a helper function to return a pointer to a bool +func Bool(b bool) *bool { return &b } + +// Int provides a helper function to return a pointer to an int +func Int(i int) *int { return &i } + +// Int64 provides a helper function to return a pointer to an int64 +func Int64(i int64) *int64 { return &i } + +// Float32 provides a helper function to return a pointer to a float32 +func Float32(f float32) *float32 { return &f } + +// Float64 provides a helper function to return a pointer to a float64 +func Float64(f float64) *float64 { return &f } + +type sdkConfiguration struct { + DefaultClient HTTPClient + SecurityClient HTTPClient + Security func(context.Context) (interface{}, error) + ServerURL string + ServerIndex int + ServerDefaults []map[string]string + Language string + OpenAPIDocVersion string + SDKVersion string + GenVersion string + UserAgent string + RetryConfig *utils.RetryConfig +} + +func (c *sdkConfiguration) GetServerDetails() (string, map[string]string) { + if c.ServerURL != "" { + return c.ServerURL, nil + } + + return ServerList[c.ServerIndex], c.ServerDefaults[c.ServerIndex] +} + +// Formance Stack API: Open, modular foundation for unique payments flows // // # Introduction // This API is documented in **OpenAPI format**. @@ -36,257 +83,199 @@ func String(s string) *string { return &s } // and standard method from web, mobile and desktop applications. // type Formance struct { - Accounts *accounts - Balances *balances - Clients *clients - Ledger *ledger - Logs *logs - Mapping *mapping + // Everything related to Accounts + Accounts *accounts + // Everything related to Balances + Balances *balances + // Everything related to Clients + Clients *clients + // Everything related to Ledger + Ledger *ledger + // Everything related to Logs + Logs *logs + // Everything related to Mapping + Mapping *mapping + // Everything related to Orchestration Orchestration *orchestration - Payments *payments - Scopes *scopes - Script *script - Search *search - Server *server - Stats *stats - Transactions *transactions - Users *users - Wallets *wallets - Webhooks *webhooks - - // Non-idiomatic field names below are to namespace fields from the fields names above to avoid name conflicts - _defaultClient HTTPClient - _securityClient HTTPClient - _security *shared.Security - _serverURL string - _language string - _sdkVersion string - _genVersion string + // Everything related to Payments + Payments *payments + // Everything related to Scopes + Scopes *scopes + // Everything related to Script + Script *script + // Everything related to Search + Search *search + // Everything related to Server + Server *server + // Everything related to Stats + Stats *stats + // Everything related to Transactions + Transactions *transactions + // Everything related to Users + Users *users + // Everything related to Wallets + Wallets *wallets + // Everything related to Webhooks + Webhooks *webhooks + + sdkConfiguration sdkConfiguration } type SDKOption func(*Formance) +// WithServerURL allows the overriding of the default server URL func WithServerURL(serverURL string) SDKOption { return func(sdk *Formance) { - sdk._serverURL = serverURL + sdk.sdkConfiguration.ServerURL = serverURL } } +// WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption { return func(sdk *Formance) { if params != nil { serverURL = utils.ReplaceParameters(serverURL, params) } - sdk._serverURL = serverURL + sdk.sdkConfiguration.ServerURL = serverURL } } +// WithServerIndex allows the overriding of the default server by index +func WithServerIndex(serverIndex int) SDKOption { + return func(sdk *Formance) { + if serverIndex < 0 || serverIndex >= len(ServerList) { + panic(fmt.Errorf("server index %d out of range", serverIndex)) + } + + sdk.sdkConfiguration.ServerIndex = serverIndex + } +} + +// WithOrganization allows setting the organization variable for url substitution +func WithOrganization(organization string) SDKOption { + return func(sdk *Formance) { + for idx := range sdk.sdkConfiguration.ServerDefaults { + if _, ok := sdk.sdkConfiguration.ServerDefaults[idx]["organization"]; !ok { + continue + } + + sdk.sdkConfiguration.ServerDefaults[idx]["organization"] = fmt.Sprintf("%v", organization) + } + } +} + +// WithClient allows the overriding of the default HTTP client used by the SDK func WithClient(client HTTPClient) SDKOption { return func(sdk *Formance) { - sdk._defaultClient = client + sdk.sdkConfiguration.DefaultClient = client } } -func WithSecurity(security shared.Security) SDKOption { +func withSecurity(security interface{}) func(context.Context) (interface{}, error) { + return func(context.Context) (interface{}, error) { + return &security, nil + } +} + +// WithSecurity configures the SDK to use the provided security details + +func WithSecurity(authorization string) SDKOption { return func(sdk *Formance) { - sdk._security = &security + security := shared.Security{Authorization: authorization} + sdk.sdkConfiguration.Security = withSecurity(&security) } } +func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption { + return func(sdk *Formance) { + sdk.sdkConfiguration.RetryConfig = &retryConfig + } +} + +// New creates a new instance of the SDK with the provided options func New(opts ...SDKOption) *Formance { sdk := &Formance{ - _language: "go", - _sdkVersion: "0.3.1", - _genVersion: "1.12.0", + sdkConfiguration: sdkConfiguration{ + Language: "go", + OpenAPIDocVersion: "v1.0.0-rc.5", + SDKVersion: "0.4.0", + GenVersion: "2.173.0", + UserAgent: "speakeasy-sdk/go 0.4.0 2.173.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + ServerDefaults: []map[string]string{ + {}, + { + "organization": "", + }, + }, + }, } for _, opt := range opts { opt(sdk) } // Use WithClient to override the default client if you would like to customize the timeout - if sdk._defaultClient == nil { - sdk._defaultClient = &http.Client{Timeout: 60 * time.Second} + if sdk.sdkConfiguration.DefaultClient == nil { + sdk.sdkConfiguration.DefaultClient = &http.Client{Timeout: 60 * time.Second} } - if sdk._securityClient == nil { - if sdk._security != nil { - sdk._securityClient = utils.ConfigureSecurityClient(sdk._defaultClient, sdk._security) + if sdk.sdkConfiguration.SecurityClient == nil { + if sdk.sdkConfiguration.Security != nil { + sdk.sdkConfiguration.SecurityClient = utils.ConfigureSecurityClient(sdk.sdkConfiguration.DefaultClient, sdk.sdkConfiguration.Security) } else { - sdk._securityClient = sdk._defaultClient + sdk.sdkConfiguration.SecurityClient = sdk.sdkConfiguration.DefaultClient } } - if sdk._serverURL == "" { - sdk._serverURL = ServerList[0] - } + sdk.Accounts = newAccounts(sdk.sdkConfiguration) + + sdk.Balances = newBalances(sdk.sdkConfiguration) + + sdk.Clients = newClients(sdk.sdkConfiguration) + + sdk.Ledger = newLedger(sdk.sdkConfiguration) + + sdk.Logs = newLogs(sdk.sdkConfiguration) + + sdk.Mapping = newMapping(sdk.sdkConfiguration) + + sdk.Orchestration = newOrchestration(sdk.sdkConfiguration) + + sdk.Payments = newPayments(sdk.sdkConfiguration) + + sdk.Scopes = newScopes(sdk.sdkConfiguration) + + sdk.Script = newScript(sdk.sdkConfiguration) + + sdk.Search = newSearch(sdk.sdkConfiguration) + + sdk.Server = newServer(sdk.sdkConfiguration) - sdk.Accounts = newAccounts( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Balances = newBalances( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Clients = newClients( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Ledger = newLedger( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Logs = newLogs( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Mapping = newMapping( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Orchestration = newOrchestration( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Payments = newPayments( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Scopes = newScopes( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Script = newScript( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Search = newSearch( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Server = newServer( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Stats = newStats( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Transactions = newTransactions( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Users = newUsers( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Wallets = newWallets( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) - - sdk.Webhooks = newWebhooks( - sdk._defaultClient, - sdk._securityClient, - sdk._serverURL, - sdk._language, - sdk._sdkVersion, - sdk._genVersion, - ) + sdk.Stats = newStats(sdk.sdkConfiguration) + + sdk.Transactions = newTransactions(sdk.sdkConfiguration) + + sdk.Users = newUsers(sdk.sdkConfiguration) + + sdk.Wallets = newWallets(sdk.sdkConfiguration) + + sdk.Webhooks = newWebhooks(sdk.sdkConfiguration) return sdk } // GetServerInfo - Get server info func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfoResponse, error) { - baseURL := s._serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/_info" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s._securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -295,7 +284,6 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -304,16 +292,25 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ServerInfo - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ServerInfo + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ServerInfo = out + res.ServerInfo = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -322,15 +319,17 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo // PaymentsgetServerInfo - Get server info func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.PaymentsgetServerInfoResponse, error) { - baseURL := s._serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/_info" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s._securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -339,7 +338,6 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -348,16 +346,25 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ServerInfo - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ServerInfo + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ServerInfo = out + res.ServerInfo = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -366,15 +373,17 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme // SearchgetServerInfo - Get server info func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.SearchgetServerInfoResponse, error) { - baseURL := s._serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/search/_info" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s._securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -383,7 +392,6 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -392,16 +400,25 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ServerInfo - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ServerInfo + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ServerInfo = out + res.ServerInfo = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/gen.yaml b/gen.yaml index 8386a3a..6ac8d54 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,11 +2,27 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.12.0 + speakeasyVersion: 1.112.1 + generationVersion: 2.173.0 generation: - telemetryEnabled: false + comments: {} sdkClassName: formance - sdkFlattening: true + repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git +features: + go: + constsAndDefaults: 0.1.1 + core: 2.94.0 + deprecations: 2.81.1 + flattening: 2.81.1 + globalSecurity: 2.82.2 + globalServerURLs: 2.82.0 + nameOverrides: 2.81.1 + unions: 2.84.1 go: - version: 0.3.1 + version: 0.4.0 + flattenGlobalSecurity: true + installationURL: https://github.com/speakeasy-sdks/formance-go-sdk + maxMethodParams: 4 packageName: github.com/speakeasy-sdks/formance-go-sdk + published: true + repoSubDirectory: . diff --git a/go.mod b/go.mod index 0d306de..13fed1e 100755 --- a/go.mod +++ b/go.mod @@ -4,4 +4,7 @@ go 1.14 require ( github.com/cenkalti/backoff/v4 v4.2.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/mitchellh/mapstructure v1.5.0 + github.com/spyzhov/ajson v0.8.0 ) diff --git a/go.sum b/go.sum index 2307997..ae03a47 100755 --- a/go.sum +++ b/go.sum @@ -1,2 +1,8 @@ github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/spyzhov/ajson v0.8.0 h1:sFXyMbi4Y/BKjrsfkUZHSjA2JM1184enheSjjoT/zCc= +github.com/spyzhov/ajson v0.8.0/go.mod h1:63V+CGM6f1Bu/p4nLIN8885ojBdt88TbLoSFzyqMuVA= diff --git a/ledger.go b/ledger.go index c275343..33e4e6f 100755 --- a/ledger.go +++ b/ledger.go @@ -1,45 +1,50 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// ledger - Everything related to Ledger type ledger struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newLedger(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *ledger { +func newLedger(sdkConfig sdkConfiguration) *ledger { return &ledger{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // GetLedgerInfo - Get information about a ledger -func (s *ledger) GetLedgerInfo(ctx context.Context, request operations.GetLedgerInfoRequest) (*operations.GetLedgerInfoResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/_info", request, nil) +func (s *ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations.GetLedgerInfoResponse, error) { + request := operations.GetLedgerInfoRequest{ + Ledger: ledger, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/_info", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -48,7 +53,6 @@ func (s *ledger) GetLedgerInfo(ctx context.Context, request operations.GetLedger if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -57,26 +61,37 @@ func (s *ledger) GetLedgerInfo(ctx context.Context, request operations.GetLedger ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out interface{} - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.LedgerInfoResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.LedgerInfoResponse = out + res.LedgerInfoResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/logs.go b/logs.go index 6920f47..584efad 100755 --- a/logs.go +++ b/logs.go @@ -1,50 +1,51 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// logs - Everything related to Logs type logs struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newLogs(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *logs { +func newLogs(sdkConfig sdkConfiguration) *logs { return &logs{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // ListLogs - List the logs from a ledger // List the logs from a ledger, sorted by ID in descending order. func (s *logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) (*operations.ListLogsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/log", request, nil) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/log", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -53,7 +54,6 @@ func (s *logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -62,26 +62,37 @@ func (s *logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.LogsCursorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.LogsCursorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.LogsCursorResponse = out + res.LogsCursorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/mapping.go b/mapping.go index 9fbd9ae..7befe3b 100755 --- a/mapping.go +++ b/mapping.go @@ -1,45 +1,50 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// mapping - Everything related to Mapping type mapping struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newMapping(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *mapping { +func newMapping(sdkConfig sdkConfiguration) *mapping { return &mapping{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // GetMapping - Get the mapping of a ledger -func (s *mapping) GetMapping(ctx context.Context, request operations.GetMappingRequest) (*operations.GetMappingResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) +func (s *mapping) GetMapping(ctx context.Context, ledger string) (*operations.GetMappingResponse, error) { + request := operations.GetMappingRequest{ + Ledger: ledger, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -48,7 +53,6 @@ func (s *mapping) GetMapping(ctx context.Context, request operations.GetMappingR if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -57,26 +61,37 @@ func (s *mapping) GetMapping(ctx context.Context, request operations.GetMappingR ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.MappingResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.MappingResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.MappingResponse = out + res.MappingResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -84,11 +99,19 @@ func (s *mapping) GetMapping(ctx context.Context, request operations.GetMappingR } // UpdateMapping - Update the mapping of a ledger -func (s *mapping) UpdateMapping(ctx context.Context, request operations.UpdateMappingRequest) (*operations.UpdateMappingResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) +func (s *mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, ledger string) (*operations.UpdateMappingResponse, error) { + request := operations.UpdateMappingRequest{ + Mapping: mapping, + Ledger: ledger, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Mapping", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, true, false, "Mapping", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -100,10 +123,12 @@ func (s *mapping) UpdateMapping(ctx context.Context, request operations.UpdateMa if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -112,7 +137,6 @@ func (s *mapping) UpdateMapping(ctx context.Context, request operations.UpdateMa if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -121,26 +145,37 @@ func (s *mapping) UpdateMapping(ctx context.Context, request operations.UpdateMa ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.MappingResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.MappingResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.MappingResponse = out + res.MappingResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/orchestration.go b/orchestration.go index d1dce38..07e79b3 100755 --- a/orchestration.go +++ b/orchestration.go @@ -1,42 +1,38 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// orchestration - Everything related to Orchestration type orchestration struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newOrchestration(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *orchestration { +func newOrchestration(sdkConfig sdkConfiguration) *orchestration { return &orchestration{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // CreateWorkflow - Create workflow // Create a workflow -func (s *orchestration) CreateWorkflow(ctx context.Context, request shared.CreateWorkflowRequest) (*operations.CreateWorkflowResponse, error) { - baseURL := s.serverURL +func (s *orchestration) CreateWorkflow(ctx context.Context, request *shared.CreateWorkflowRequest) (*operations.CreateWorkflowResponse, error) { + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/flows" - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Request", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -45,10 +41,12 @@ func (s *orchestration) CreateWorkflow(ctx context.Context, request shared.Creat if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -57,7 +55,6 @@ func (s *orchestration) CreateWorkflow(ctx context.Context, request shared.Creat if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -66,26 +63,37 @@ func (s *orchestration) CreateWorkflow(ctx context.Context, request shared.Creat ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 201: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.CreateWorkflowResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.CreateWorkflowResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.CreateWorkflowResponse = out + res.CreateWorkflowResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Error - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Error + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Error = out + res.Error = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -94,16 +102,25 @@ func (s *orchestration) CreateWorkflow(ctx context.Context, request shared.Creat // GetFlow - Get a flow by id // Get a flow by id -func (s *orchestration) GetFlow(ctx context.Context, request operations.GetFlowRequest) (*operations.GetFlowResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}", request, nil) +func (s *orchestration) GetFlow(ctx context.Context, flowID string) (*operations.GetFlowResponse, error) { + request := operations.GetFlowRequest{ + FlowID: flowID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -112,7 +129,6 @@ func (s *orchestration) GetFlow(ctx context.Context, request operations.GetFlowR if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -121,26 +137,37 @@ func (s *orchestration) GetFlow(ctx context.Context, request operations.GetFlowR ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.GetWorkflowResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.GetWorkflowResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.GetWorkflowResponse = out + res.GetWorkflowResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Error - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Error + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Error = out + res.Error = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -149,16 +176,26 @@ func (s *orchestration) GetFlow(ctx context.Context, request operations.GetFlowR // GetWorkflowOccurrence - Get a workflow occurrence by id // Get a workflow occurrence by id -func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, request operations.GetWorkflowOccurrenceRequest) (*operations.GetWorkflowOccurrenceResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs/{runId}", request, nil) +func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string, runID string) (*operations.GetWorkflowOccurrenceResponse, error) { + request := operations.GetWorkflowOccurrenceRequest{ + FlowID: flowID, + RunID: runID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs/{runId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -167,7 +204,6 @@ func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, request opera if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -176,26 +212,37 @@ func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, request opera ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.GetWorkflowOccurrenceResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.GetWorkflowOccurrenceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.GetWorkflowOccurrenceResponse = out + res.GetWorkflowOccurrenceResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Error - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Error + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Error = out + res.Error = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -205,15 +252,17 @@ func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, request opera // ListFlows - List registered flows // List registered flows func (s *orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/flows" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -222,7 +271,6 @@ func (s *orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -231,26 +279,37 @@ func (s *orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ListWorkflowsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ListWorkflowsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ListWorkflowsResponse = out + res.ListWorkflowsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Error - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Error + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Error = out + res.Error = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -259,16 +318,25 @@ func (s *orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes // ListRuns - List occurrences of a workflow // List occurrences of a workflow -func (s *orchestration) ListRuns(ctx context.Context, request operations.ListRunsRequest) (*operations.ListRunsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) +func (s *orchestration) ListRuns(ctx context.Context, flowID string) (*operations.ListRunsResponse, error) { + request := operations.ListRunsRequest{ + FlowID: flowID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -277,7 +345,6 @@ func (s *orchestration) ListRuns(ctx context.Context, request operations.ListRun if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -286,26 +353,37 @@ func (s *orchestration) ListRuns(ctx context.Context, request operations.ListRun ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out interface{} - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ListRunsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ListRunsResponse = out + res.ListRunsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Error - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Error + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Error = out + res.Error = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -314,15 +392,17 @@ func (s *orchestration) ListRuns(ctx context.Context, request operations.ListRun // OrchestrationgetServerInfo - Get server info func (s *orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operations.OrchestrationgetServerInfoResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/_info" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -331,7 +411,6 @@ func (s *orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -340,26 +419,37 @@ func (s *orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ServerInfo - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ServerInfo + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ServerInfo = out + res.ServerInfo = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Error - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Error + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Error = out + res.Error = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -368,11 +458,20 @@ func (s *orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat // RunWorkflow - Run workflow // Run workflow -func (s *orchestration) RunWorkflow(ctx context.Context, request operations.RunWorkflowRequest) (*operations.RunWorkflowResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) +func (s *orchestration) RunWorkflow(ctx context.Context, flowID string, requestBody map[string]string, wait *bool) (*operations.RunWorkflowResponse, error) { + request := operations.RunWorkflowRequest{ + FlowID: flowID, + RequestBody: requestBody, + Wait: wait, + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "RequestBody", "json") + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -381,6 +480,8 @@ func (s *orchestration) RunWorkflow(ctx context.Context, request operations.RunW if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) @@ -388,7 +489,7 @@ func (s *orchestration) RunWorkflow(ctx context.Context, request operations.RunW return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -397,7 +498,6 @@ func (s *orchestration) RunWorkflow(ctx context.Context, request operations.RunW if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -406,26 +506,37 @@ func (s *orchestration) RunWorkflow(ctx context.Context, request operations.RunW ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 201: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.RunWorkflowResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.RunWorkflowResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.RunWorkflowResponse = out + res.RunWorkflowResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Error - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Error + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Error = out + res.Error = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/payments.go b/payments.go index 3ea006d..47e44cd 100755 --- a/payments.go +++ b/payments.go @@ -1,42 +1,38 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// payments - Everything related to Payments type payments struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newPayments(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *payments { +func newPayments(sdkConfig sdkConfiguration) *payments { return &payments{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // ConnectorsStripeTransfer - Transfer funds between Stripe accounts // Execute a transfer between two Stripe accounts. func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared.StripeTransferRequest) (*operations.ConnectorsStripeTransferResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors/stripe/transfer" - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Request", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -48,10 +44,12 @@ func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared. if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -60,7 +58,6 @@ func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared. if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -69,16 +66,25 @@ func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared. ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out map[string]interface{} - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.StripeTransferResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.StripeTransferResponse = out + res.StripeTransferResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -87,16 +93,26 @@ func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared. // GetConnectorTask - Read a specific task of the connector // Get a specific task associated to the connector. -func (s *payments) GetConnectorTask(ctx context.Context, request operations.GetConnectorTaskRequest) (*operations.GetConnectorTaskResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks/{taskId}", request, nil) +func (s *payments) GetConnectorTask(ctx context.Context, connector shared.Connector, taskID string) (*operations.GetConnectorTaskResponse, error) { + request := operations.GetConnectorTaskRequest{ + Connector: connector, + TaskID: taskID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks/{taskId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -105,7 +121,6 @@ func (s *payments) GetConnectorTask(ctx context.Context, request operations.GetC if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -114,16 +129,25 @@ func (s *payments) GetConnectorTask(ctx context.Context, request operations.GetC ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.TaskResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.TaskResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.TaskResponse = out + res.TaskResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -131,16 +155,25 @@ func (s *payments) GetConnectorTask(ctx context.Context, request operations.GetC } // GetPayment - Get a payment -func (s *payments) GetPayment(ctx context.Context, request operations.GetPaymentRequest) (*operations.GetPaymentResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/payments/payments/{paymentId}", request, nil) +func (s *payments) GetPayment(ctx context.Context, paymentID string) (*operations.GetPaymentResponse, error) { + request := operations.GetPaymentRequest{ + PaymentID: paymentID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/payments/{paymentId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -149,7 +182,6 @@ func (s *payments) GetPayment(ctx context.Context, request operations.GetPayment if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -158,16 +190,25 @@ func (s *payments) GetPayment(ctx context.Context, request operations.GetPayment ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.PaymentResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.PaymentResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.PaymentResponse = out + res.PaymentResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -176,11 +217,19 @@ func (s *payments) GetPayment(ctx context.Context, request operations.GetPayment // InstallConnector - Install a connector // Install a connector by its name and config. -func (s *payments) InstallConnector(ctx context.Context, request operations.InstallConnectorRequest) (*operations.InstallConnectorResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) +func (s *payments) InstallConnector(ctx context.Context, connectorConfig shared.ConnectorConfig, connector shared.Connector) (*operations.InstallConnectorResponse, error) { + request := operations.InstallConnectorRequest{ + ConnectorConfig: connectorConfig, + Connector: connector, + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "RequestBody", "json") + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "ConnectorConfig", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -192,10 +241,12 @@ func (s *payments) InstallConnector(ctx context.Context, request operations.Inst if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -204,7 +255,6 @@ func (s *payments) InstallConnector(ctx context.Context, request operations.Inst if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -213,6 +263,13 @@ func (s *payments) InstallConnector(ctx context.Context, request operations.Inst ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -223,15 +280,17 @@ func (s *payments) InstallConnector(ctx context.Context, request operations.Inst // ListAllConnectors - List all installed connectors // List all installed connectors. func (s *payments) ListAllConnectors(ctx context.Context) (*operations.ListAllConnectorsResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -240,7 +299,6 @@ func (s *payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -249,16 +307,25 @@ func (s *payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConnectorsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConnectorsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConnectorsResponse = out + res.ConnectorsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -268,15 +335,17 @@ func (s *payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo // ListConfigsAvailableConnectors - List the configs of each available connector // List the configs of each available connector. func (s *payments) ListConfigsAvailableConnectors(ctx context.Context) (*operations.ListConfigsAvailableConnectorsResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors/configs" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -285,7 +354,6 @@ func (s *payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -294,16 +362,25 @@ func (s *payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConnectorsConfigsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConnectorsConfigsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConnectorsConfigsResponse = out + res.ConnectorsConfigsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -312,20 +389,31 @@ func (s *payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati // ListConnectorTasks - List tasks from a connector // List all tasks associated with this connector. -func (s *payments) ListConnectorTasks(ctx context.Context, request operations.ListConnectorTasksRequest) (*operations.ListConnectorTasksResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks", request, nil) +func (s *payments) ListConnectorTasks(ctx context.Context, connector shared.Connector, cursor *string, pageSize *int64) (*operations.ListConnectorTasksResponse, error) { + request := operations.ListConnectorTasksRequest{ + Connector: connector, + Cursor: cursor, + PageSize: pageSize, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -334,7 +422,6 @@ func (s *payments) ListConnectorTasks(ctx context.Context, request operations.Li if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -343,16 +430,25 @@ func (s *payments) ListConnectorTasks(ctx context.Context, request operations.Li ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.TasksCursor - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.TasksCursor + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.TasksCursor = out + res.TasksCursor = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -360,20 +456,28 @@ func (s *payments) ListConnectorTasks(ctx context.Context, request operations.Li } // ListPayments - List payments -func (s *payments) ListPayments(ctx context.Context, request operations.ListPaymentsRequest) (*operations.ListPaymentsResponse, error) { - baseURL := s.serverURL +func (s *payments) ListPayments(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.ListPaymentsResponse, error) { + request := operations.ListPaymentsRequest{ + Cursor: cursor, + PageSize: pageSize, + Sort: sort, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/payments" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -382,7 +486,6 @@ func (s *payments) ListPayments(ctx context.Context, request operations.ListPaym if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -391,16 +494,25 @@ func (s *payments) ListPayments(ctx context.Context, request operations.ListPaym ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.PaymentsCursor - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.PaymentsCursor + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.PaymentsCursor = out + res.PaymentsCursor = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -408,20 +520,28 @@ func (s *payments) ListPayments(ctx context.Context, request operations.ListPaym } // PaymentslistAccounts - List accounts -func (s *payments) PaymentslistAccounts(ctx context.Context, request operations.PaymentslistAccountsRequest) (*operations.PaymentslistAccountsResponse, error) { - baseURL := s.serverURL +func (s *payments) PaymentslistAccounts(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.PaymentslistAccountsResponse, error) { + request := operations.PaymentslistAccountsRequest{ + Cursor: cursor, + PageSize: pageSize, + Sort: sort, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/accounts" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -430,7 +550,6 @@ func (s *payments) PaymentslistAccounts(ctx context.Context, request operations. if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -439,16 +558,25 @@ func (s *payments) PaymentslistAccounts(ctx context.Context, request operations. ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.AccountsCursor - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.AccountsCursor + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.AccountsCursor = out + res.AccountsCursor = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -457,16 +585,25 @@ func (s *payments) PaymentslistAccounts(ctx context.Context, request operations. // ReadConnectorConfig - Read the config of a connector // Read connector config -func (s *payments) ReadConnectorConfig(ctx context.Context, request operations.ReadConnectorConfigRequest) (*operations.ReadConnectorConfigResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/config", request, nil) +func (s *payments) ReadConnectorConfig(ctx context.Context, connector shared.Connector) (*operations.ReadConnectorConfigResponse, error) { + request := operations.ReadConnectorConfigRequest{ + Connector: connector, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/config", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -475,7 +612,6 @@ func (s *payments) ReadConnectorConfig(ctx context.Context, request operations.R if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -484,16 +620,25 @@ func (s *payments) ReadConnectorConfig(ctx context.Context, request operations.R ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConnectorConfigResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConnectorConfigResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConnectorConfigResponse = out + res.ConnectorConfigResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -503,16 +648,25 @@ func (s *payments) ReadConnectorConfig(ctx context.Context, request operations.R // ResetConnector - Reset a connector // Reset a connector by its name. // It will remove the connector and ALL PAYMENTS generated with it. -func (s *payments) ResetConnector(ctx context.Context, request operations.ResetConnectorRequest) (*operations.ResetConnectorResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/reset", request, nil) +func (s *payments) ResetConnector(ctx context.Context, connector shared.Connector) (*operations.ResetConnectorResponse, error) { + request := operations.ResetConnectorRequest{ + Connector: connector, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/reset", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "POST", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -521,7 +675,6 @@ func (s *payments) ResetConnector(ctx context.Context, request operations.ResetC if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -530,6 +683,13 @@ func (s *payments) ResetConnector(ctx context.Context, request operations.ResetC ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -539,16 +699,25 @@ func (s *payments) ResetConnector(ctx context.Context, request operations.ResetC // UninstallConnector - Uninstall a connector // Uninstall a connector by its name. -func (s *payments) UninstallConnector(ctx context.Context, request operations.UninstallConnectorRequest) (*operations.UninstallConnectorResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) +func (s *payments) UninstallConnector(ctx context.Context, connector shared.Connector) (*operations.UninstallConnectorResponse, error) { + request := operations.UninstallConnectorRequest{ + Connector: connector, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -557,7 +726,6 @@ func (s *payments) UninstallConnector(ctx context.Context, request operations.Un if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -566,6 +734,13 @@ func (s *payments) UninstallConnector(ctx context.Context, request operations.Un ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } diff --git a/pkg/models/operations/activateconfig.go b/pkg/models/operations/activateconfig.go index 223e355..e0adb58 100755 --- a/pkg/models/operations/activateconfig.go +++ b/pkg/models/operations/activateconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type ActivateConfigRequest struct { + // Config ID ID string `pathParam:"style=simple,explode=false,name=id"` } +func (o *ActivateConfigRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type ActivateConfigResponse struct { + // Config successfully activated. ConfigResponse *shared.ConfigResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ActivateConfigResponse) GetConfigResponse() *shared.ConfigResponse { + if o == nil { + return nil + } + return o.ConfigResponse +} + +func (o *ActivateConfigResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ActivateConfigResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ActivateConfigResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/addmetadataontransaction.go b/pkg/models/operations/addmetadataontransaction.go index 865627a..e8fdcb8 100755 --- a/pkg/models/operations/addmetadataontransaction.go +++ b/pkg/models/operations/addmetadataontransaction.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,70 @@ import ( ) type AddMetadataOnTransactionRequest struct { + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Transaction ID. + Txid int64 `pathParam:"style=simple,explode=false,name=txid"` + // metadata RequestBody map[string]interface{} `request:"mediaType=application/json"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Txid int64 `pathParam:"style=simple,explode=false,name=txid"` +} + +func (o *AddMetadataOnTransactionRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *AddMetadataOnTransactionRequest) GetTxid() int64 { + if o == nil { + return 0 + } + return o.Txid +} + +func (o *AddMetadataOnTransactionRequest) GetRequestBody() map[string]interface{} { + if o == nil { + return nil + } + return o.RequestBody } type AddMetadataOnTransactionResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Error ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *AddMetadataOnTransactionResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *AddMetadataOnTransactionResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *AddMetadataOnTransactionResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *AddMetadataOnTransactionResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/addmetadatatoaccount.go b/pkg/models/operations/addmetadatatoaccount.go index 88a9abc..865b5bb 100755 --- a/pkg/models/operations/addmetadatatoaccount.go +++ b/pkg/models/operations/addmetadatatoaccount.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,74 @@ import ( ) type AddMetadataToAccountRequest struct { + // metadata RequestBody map[string]interface{} `request:"mediaType=application/json"` - Address string `pathParam:"style=simple,explode=false,name=address"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Exact address of the account. It must match the following regular expressions pattern: + // ``` + // ^\w+(:\w+)*$ + // ``` + // + Address string `pathParam:"style=simple,explode=false,name=address"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` +} + +func (o *AddMetadataToAccountRequest) GetRequestBody() map[string]interface{} { + if o == nil { + return nil + } + return o.RequestBody +} + +func (o *AddMetadataToAccountRequest) GetAddress() string { + if o == nil { + return "" + } + return o.Address +} + +func (o *AddMetadataToAccountRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger } type AddMetadataToAccountResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Error ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *AddMetadataToAccountResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *AddMetadataToAccountResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *AddMetadataToAccountResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *AddMetadataToAccountResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/addscopetoclient.go b/pkg/models/operations/addscopetoclient.go index 2d74b07..d706ed6 100755 --- a/pkg/models/operations/addscopetoclient.go +++ b/pkg/models/operations/addscopetoclient.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,12 +7,52 @@ import ( ) type AddScopeToClientRequest struct { + // Client ID ClientID string `pathParam:"style=simple,explode=false,name=clientId"` - ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` + // Scope ID + ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` +} + +func (o *AddScopeToClientRequest) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *AddScopeToClientRequest) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID } type AddScopeToClientResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *AddScopeToClientResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *AddScopeToClientResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *AddScopeToClientResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/addtransientscope.go b/pkg/models/operations/addtransientscope.go index c55c64e..131a477 100755 --- a/pkg/models/operations/addtransientscope.go +++ b/pkg/models/operations/addtransientscope.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,12 +7,52 @@ import ( ) type AddTransientScopeRequest struct { - ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` + // Scope ID + ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` + // Transient scope ID TransientScopeID string `pathParam:"style=simple,explode=false,name=transientScopeId"` } +func (o *AddTransientScopeRequest) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +func (o *AddTransientScopeRequest) GetTransientScopeID() string { + if o == nil { + return "" + } + return o.TransientScopeID +} + type AddTransientScopeResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *AddTransientScopeResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *AddTransientScopeResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *AddTransientScopeResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/changeconfigsecret.go b/pkg/models/operations/changeconfigsecret.go index 95ff8e3..02ea71b 100755 --- a/pkg/models/operations/changeconfigsecret.go +++ b/pkg/models/operations/changeconfigsecret.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,60 @@ import ( ) type ChangeConfigSecretRequest struct { - ConfigChangeSecret *shared.ConfigChangeSecret `request:"mediaType=application/json"` + // Config ID ID string `pathParam:"style=simple,explode=false,name=id"` + ConfigChangeSecret *shared.ConfigChangeSecret `request:"mediaType=application/json"` +} + +func (o *ChangeConfigSecretRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ChangeConfigSecretRequest) GetConfigChangeSecret() *shared.ConfigChangeSecret { + if o == nil { + return nil + } + return o.ConfigChangeSecret } type ChangeConfigSecretResponse struct { + // Secret successfully changed. ConfigResponse *shared.ConfigResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ChangeConfigSecretResponse) GetConfigResponse() *shared.ConfigResponse { + if o == nil { + return nil + } + return o.ConfigResponse +} + +func (o *ChangeConfigSecretResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ChangeConfigSecretResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ChangeConfigSecretResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/confirmhold.go b/pkg/models/operations/confirmhold.go index ecd9b3e..99f6739 100755 --- a/pkg/models/operations/confirmhold.go +++ b/pkg/models/operations/confirmhold.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,59 @@ import ( ) type ConfirmHoldRequest struct { - ConfirmHoldRequest *shared.ConfirmHoldRequest `request:"mediaType=application/json"` HoldID string `pathParam:"style=simple,explode=false,name=hold_id"` + ConfirmHoldRequest *shared.ConfirmHoldRequest `request:"mediaType=application/json"` +} + +func (o *ConfirmHoldRequest) GetHoldID() string { + if o == nil { + return "" + } + return o.HoldID +} + +func (o *ConfirmHoldRequest) GetConfirmHoldRequest() *shared.ConfirmHoldRequest { + if o == nil { + return nil + } + return o.ConfirmHoldRequest } type ConfirmHoldResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *ConfirmHoldResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ConfirmHoldResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ConfirmHoldResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *ConfirmHoldResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/connectorsstripetransfer.go b/pkg/models/operations/connectorsstripetransfer.go index 42d5667..0eeeb8f 100755 --- a/pkg/models/operations/connectorsstripetransfer.go +++ b/pkg/models/operations/connectorsstripetransfer.go @@ -1,12 +1,47 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "net/http" ) type ConnectorsStripeTransferResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response - StripeTransferResponse map[string]interface{} + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // OK + StripeTransferResponse *shared.StripeTransferResponse +} + +func (o *ConnectorsStripeTransferResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ConnectorsStripeTransferResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ConnectorsStripeTransferResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *ConnectorsStripeTransferResponse) GetStripeTransferResponse() *shared.StripeTransferResponse { + if o == nil { + return nil + } + return o.StripeTransferResponse } diff --git a/pkg/models/operations/countaccounts.go b/pkg/models/operations/countaccounts.go index 17f1962..35cde07 100755 --- a/pkg/models/operations/countaccounts.go +++ b/pkg/models/operations/countaccounts.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,16 +7,83 @@ import ( "net/http" ) +// CountAccountsMetadata - Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. +type CountAccountsMetadata struct { +} + type CountAccountsRequest struct { - Address *string `queryParam:"style=form,explode=true,name=address"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Metadata map[string]interface{} `queryParam:"style=deepObject,explode=true,name=metadata"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Filter accounts by address pattern (regular expression placed between ^ and $). + Address *string `queryParam:"style=form,explode=true,name=address"` + // Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. + Metadata *CountAccountsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` +} + +func (o *CountAccountsRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *CountAccountsRequest) GetAddress() *string { + if o == nil { + return nil + } + return o.Address +} + +func (o *CountAccountsRequest) GetMetadata() *CountAccountsMetadata { + if o == nil { + return nil + } + return o.Metadata } type CountAccountsResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Error ErrorResponse *shared.ErrorResponse Headers map[string][]string - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *CountAccountsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CountAccountsResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *CountAccountsResponse) GetHeaders() map[string][]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *CountAccountsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CountAccountsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/counttransactions.go b/pkg/models/operations/counttransactions.go index 6e74b61..edf879c 100755 --- a/pkg/models/operations/counttransactions.go +++ b/pkg/models/operations/counttransactions.go @@ -1,28 +1,179 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" "time" ) +// CountTransactionsMetadata - Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. +type CountTransactionsMetadata struct { +} + type CountTransactionsRequest struct { - Account *string `queryParam:"style=form,explode=true,name=account"` - Destination *string `queryParam:"style=form,explode=true,name=destination"` - EndTime *time.Time `queryParam:"style=form,explode=true,name=endTime"` - EndTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=end_time"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Metadata map[string]interface{} `queryParam:"style=deepObject,explode=true,name=metadata"` - Reference *string `queryParam:"style=form,explode=true,name=reference"` - Source *string `queryParam:"style=form,explode=true,name=source"` - StartTime *time.Time `queryParam:"style=form,explode=true,name=startTime"` - StartTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=start_time"` + // Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). + Account *string `queryParam:"style=form,explode=true,name=account"` + // Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). + Destination *string `queryParam:"style=form,explode=true,name=destination"` + // Filter transactions that occurred before this timestamp. + // The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + // + EndTime *time.Time `queryParam:"style=form,explode=true,name=endTime"` + // Filter transactions that occurred before this timestamp. + // The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + // Deprecated, please use `endTime` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + EndTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=end_time"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. + Metadata *CountTransactionsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + // Filter transactions by reference field. + Reference *string `queryParam:"style=form,explode=true,name=reference"` + // Filter transactions with postings involving given account at source (regular expression placed between ^ and $). + Source *string `queryParam:"style=form,explode=true,name=source"` + // Filter transactions that occurred after this timestamp. + // The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + // + StartTime *time.Time `queryParam:"style=form,explode=true,name=startTime"` + // Filter transactions that occurred after this timestamp. + // The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + // Deprecated, please use `startTime` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + StartTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=start_time"` +} + +func (c CountTransactionsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CountTransactionsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *CountTransactionsRequest) GetAccount() *string { + if o == nil { + return nil + } + return o.Account +} + +func (o *CountTransactionsRequest) GetDestination() *string { + if o == nil { + return nil + } + return o.Destination +} + +func (o *CountTransactionsRequest) GetEndTime() *time.Time { + if o == nil { + return nil + } + return o.EndTime +} + +func (o *CountTransactionsRequest) GetEndTimeDeprecated() *time.Time { + if o == nil { + return nil + } + return o.EndTimeDeprecated +} + +func (o *CountTransactionsRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *CountTransactionsRequest) GetMetadata() *CountTransactionsMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *CountTransactionsRequest) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *CountTransactionsRequest) GetSource() *string { + if o == nil { + return nil + } + return o.Source +} + +func (o *CountTransactionsRequest) GetStartTime() *time.Time { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *CountTransactionsRequest) GetStartTimeDeprecated() *time.Time { + if o == nil { + return nil + } + return o.StartTimeDeprecated } type CountTransactionsResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Error ErrorResponse *shared.ErrorResponse Headers map[string][]string - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *CountTransactionsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CountTransactionsResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *CountTransactionsResponse) GetHeaders() map[string][]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *CountTransactionsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CountTransactionsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/createbalance.go b/pkg/models/operations/createbalance.go index dfccf31..ef72447 100755 --- a/pkg/models/operations/createbalance.go +++ b/pkg/models/operations/createbalance.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,68 @@ import ( ) type CreateBalanceRequest struct { - CreateBalanceRequest *shared.CreateBalanceRequest `request:"mediaType=application/json"` ID string `pathParam:"style=simple,explode=false,name=id"` + CreateBalanceRequest *shared.CreateBalanceRequest `request:"mediaType=application/json"` +} + +func (o *CreateBalanceRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateBalanceRequest) GetCreateBalanceRequest() *shared.CreateBalanceRequest { + if o == nil { + return nil + } + return o.CreateBalanceRequest } type CreateBalanceResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Created balance CreateBalanceResponse *shared.CreateBalanceResponse - StatusCode int - RawResponse *http.Response - WalletsErrorResponse *shared.WalletsErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error + WalletsErrorResponse *shared.WalletsErrorResponse +} + +func (o *CreateBalanceResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateBalanceResponse) GetCreateBalanceResponse() *shared.CreateBalanceResponse { + if o == nil { + return nil + } + return o.CreateBalanceResponse +} + +func (o *CreateBalanceResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateBalanceResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *CreateBalanceResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse } diff --git a/pkg/models/operations/createclient.go b/pkg/models/operations/createclient.go index 4f03d62..5208f85 100755 --- a/pkg/models/operations/createclient.go +++ b/pkg/models/operations/createclient.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type CreateClientResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Client created CreateClientResponse *shared.CreateClientResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *CreateClientResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateClientResponse) GetCreateClientResponse() *shared.CreateClientResponse { + if o == nil { + return nil + } + return o.CreateClientResponse +} + +func (o *CreateClientResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateClientResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/createscope.go b/pkg/models/operations/createscope.go index 938931f..153bbd2 100755 --- a/pkg/models/operations/createscope.go +++ b/pkg/models/operations/createscope.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type CreateScopeResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Created scope CreateScopeResponse *shared.CreateScopeResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *CreateScopeResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateScopeResponse) GetCreateScopeResponse() *shared.CreateScopeResponse { + if o == nil { + return nil + } + return o.CreateScopeResponse +} + +func (o *CreateScopeResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateScopeResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/createsecret.go b/pkg/models/operations/createsecret.go index 6abca63..5d521eb 100755 --- a/pkg/models/operations/createsecret.go +++ b/pkg/models/operations/createsecret.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,60 @@ import ( ) type CreateSecretRequest struct { - CreateSecretRequest *shared.CreateSecretRequest `request:"mediaType=application/json"` + // Client ID ClientID string `pathParam:"style=simple,explode=false,name=clientId"` + CreateSecretRequest *shared.CreateSecretRequest `request:"mediaType=application/json"` +} + +func (o *CreateSecretRequest) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *CreateSecretRequest) GetCreateSecretRequest() *shared.CreateSecretRequest { + if o == nil { + return nil + } + return o.CreateSecretRequest } type CreateSecretResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Created secret CreateSecretResponse *shared.CreateSecretResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *CreateSecretResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateSecretResponse) GetCreateSecretResponse() *shared.CreateSecretResponse { + if o == nil { + return nil + } + return o.CreateSecretResponse +} + +func (o *CreateSecretResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateSecretResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/createtransaction.go b/pkg/models/operations/createtransaction.go index cb02142..6df6e78 100755 --- a/pkg/models/operations/createtransaction.go +++ b/pkg/models/operations/createtransaction.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,15 +8,82 @@ import ( ) type CreateTransactionRequest struct { + // The request body must contain at least one of the following objects: + // - `postings`: suitable for simple transactions + // - `script`: enabling more complex transactions with Numscript + // PostTransaction shared.PostTransaction `request:"mediaType=application/json"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Preview *bool `queryParam:"style=form,explode=true,name=preview"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. + Preview *bool `queryParam:"style=form,explode=true,name=preview"` +} + +func (o *CreateTransactionRequest) GetPostTransaction() shared.PostTransaction { + if o == nil { + return shared.PostTransaction{} + } + return o.PostTransaction +} + +func (o *CreateTransactionRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *CreateTransactionRequest) GetPreview() *bool { + if o == nil { + return nil + } + return o.Preview } type CreateTransactionResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // OK TransactionsResponse *shared.TransactionsResponse } + +func (o *CreateTransactionResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateTransactionResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *CreateTransactionResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateTransactionResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *CreateTransactionResponse) GetTransactionsResponse() *shared.TransactionsResponse { + if o == nil { + return nil + } + return o.TransactionsResponse +} diff --git a/pkg/models/operations/createtransactions.go b/pkg/models/operations/createtransactions.go index b851121..109c02c 100755 --- a/pkg/models/operations/createtransactions.go +++ b/pkg/models/operations/createtransactions.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -7,13 +9,68 @@ import ( type CreateTransactionsRequest struct { Transactions shared.Transactions `request:"mediaType=application/json"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` +} + +func (o *CreateTransactionsRequest) GetTransactions() shared.Transactions { + if o == nil { + return shared.Transactions{} + } + return o.Transactions +} + +func (o *CreateTransactionsRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger } type CreateTransactionsResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // OK TransactionsResponse *shared.TransactionsResponse } + +func (o *CreateTransactionsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateTransactionsResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *CreateTransactionsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateTransactionsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *CreateTransactionsResponse) GetTransactionsResponse() *shared.TransactionsResponse { + if o == nil { + return nil + } + return o.TransactionsResponse +} diff --git a/pkg/models/operations/createwallet.go b/pkg/models/operations/createwallet.go index 033bde9..b01bd88 100755 --- a/pkg/models/operations/createwallet.go +++ b/pkg/models/operations/createwallet.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,9 +8,49 @@ import ( ) type CreateWalletResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Wallet created CreateWalletResponse *shared.CreateWalletResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *CreateWalletResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateWalletResponse) GetCreateWalletResponse() *shared.CreateWalletResponse { + if o == nil { + return nil + } + return o.CreateWalletResponse +} + +func (o *CreateWalletResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateWalletResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *CreateWalletResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/createworkflow.go b/pkg/models/operations/createworkflow.go index 908fbbf..a5495ed 100755 --- a/pkg/models/operations/createworkflow.go +++ b/pkg/models/operations/createworkflow.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,9 +8,49 @@ import ( ) type CreateWorkflowResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Created workflow CreateWorkflowResponse *shared.CreateWorkflowResponse - Error *shared.Error - StatusCode int - RawResponse *http.Response + // General error + Error *shared.Error + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *CreateWorkflowResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreateWorkflowResponse) GetCreateWorkflowResponse() *shared.CreateWorkflowResponse { + if o == nil { + return nil + } + return o.CreateWorkflowResponse +} + +func (o *CreateWorkflowResponse) GetError() *shared.Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *CreateWorkflowResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreateWorkflowResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/creditwallet.go b/pkg/models/operations/creditwallet.go index 3368a7d..096a480 100755 --- a/pkg/models/operations/creditwallet.go +++ b/pkg/models/operations/creditwallet.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,59 @@ import ( ) type CreditWalletRequest struct { - CreditWalletRequest *shared.CreditWalletRequest `request:"mediaType=application/json"` ID string `pathParam:"style=simple,explode=false,name=id"` + CreditWalletRequest *shared.CreditWalletRequest `request:"mediaType=application/json"` +} + +func (o *CreditWalletRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreditWalletRequest) GetCreditWalletRequest() *shared.CreditWalletRequest { + if o == nil { + return nil + } + return o.CreditWalletRequest } type CreditWalletResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *CreditWalletResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *CreditWalletResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *CreditWalletResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *CreditWalletResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/deactivateconfig.go b/pkg/models/operations/deactivateconfig.go index c1959dd..b3b1ee1 100755 --- a/pkg/models/operations/deactivateconfig.go +++ b/pkg/models/operations/deactivateconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type DeactivateConfigRequest struct { + // Config ID ID string `pathParam:"style=simple,explode=false,name=id"` } +func (o *DeactivateConfigRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type DeactivateConfigResponse struct { + // Config successfully deactivated. ConfigResponse *shared.ConfigResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *DeactivateConfigResponse) GetConfigResponse() *shared.ConfigResponse { + if o == nil { + return nil + } + return o.ConfigResponse +} + +func (o *DeactivateConfigResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DeactivateConfigResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DeactivateConfigResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/debitwallet.go b/pkg/models/operations/debitwallet.go index f62176f..4308f3a 100755 --- a/pkg/models/operations/debitwallet.go +++ b/pkg/models/operations/debitwallet.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,68 @@ import ( ) type DebitWalletRequest struct { - DebitWalletRequest *shared.DebitWalletRequest `request:"mediaType=application/json"` ID string `pathParam:"style=simple,explode=false,name=id"` + DebitWalletRequest *shared.DebitWalletRequest `request:"mediaType=application/json"` +} + +func (o *DebitWalletRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DebitWalletRequest) GetDebitWalletRequest() *shared.DebitWalletRequest { + if o == nil { + return nil + } + return o.DebitWalletRequest } type DebitWalletResponse struct { - ContentType string - DebitWalletResponse *shared.DebitWalletResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Wallet successfully debited as a pending hold + DebitWalletResponse *shared.DebitWalletResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *DebitWalletResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DebitWalletResponse) GetDebitWalletResponse() *shared.DebitWalletResponse { + if o == nil { + return nil + } + return o.DebitWalletResponse +} + +func (o *DebitWalletResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DebitWalletResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *DebitWalletResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/deleteclient.go b/pkg/models/operations/deleteclient.go index ba8f1e3..116c645 100755 --- a/pkg/models/operations/deleteclient.go +++ b/pkg/models/operations/deleteclient.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,11 +7,43 @@ import ( ) type DeleteClientRequest struct { + // Client ID ClientID string `pathParam:"style=simple,explode=false,name=clientId"` } +func (o *DeleteClientRequest) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + type DeleteClientResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *DeleteClientResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DeleteClientResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DeleteClientResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/deleteconfig.go b/pkg/models/operations/deleteconfig.go index 267bf61..68737d9 100755 --- a/pkg/models/operations/deleteconfig.go +++ b/pkg/models/operations/deleteconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,11 +7,43 @@ import ( ) type DeleteConfigRequest struct { + // Config ID ID string `pathParam:"style=simple,explode=false,name=id"` } +func (o *DeleteConfigRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type DeleteConfigResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *DeleteConfigResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DeleteConfigResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DeleteConfigResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/deletescope.go b/pkg/models/operations/deletescope.go index b3ee6b6..46802a5 100755 --- a/pkg/models/operations/deletescope.go +++ b/pkg/models/operations/deletescope.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,11 +7,43 @@ import ( ) type DeleteScopeRequest struct { + // Scope ID ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` } +func (o *DeleteScopeRequest) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + type DeleteScopeResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *DeleteScopeResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DeleteScopeResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DeleteScopeResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/deletescopefromclient.go b/pkg/models/operations/deletescopefromclient.go index dcbce27..48c845f 100755 --- a/pkg/models/operations/deletescopefromclient.go +++ b/pkg/models/operations/deletescopefromclient.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,12 +7,52 @@ import ( ) type DeleteScopeFromClientRequest struct { + // Client ID ClientID string `pathParam:"style=simple,explode=false,name=clientId"` - ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` + // Scope ID + ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` +} + +func (o *DeleteScopeFromClientRequest) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *DeleteScopeFromClientRequest) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID } type DeleteScopeFromClientResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *DeleteScopeFromClientResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DeleteScopeFromClientResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DeleteScopeFromClientResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/deletesecret.go b/pkg/models/operations/deletesecret.go index ed6a73c..1e0e1e4 100755 --- a/pkg/models/operations/deletesecret.go +++ b/pkg/models/operations/deletesecret.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,12 +7,52 @@ import ( ) type DeleteSecretRequest struct { + // Client ID ClientID string `pathParam:"style=simple,explode=false,name=clientId"` + // Secret ID SecretID string `pathParam:"style=simple,explode=false,name=secretId"` } +func (o *DeleteSecretRequest) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *DeleteSecretRequest) GetSecretID() string { + if o == nil { + return "" + } + return o.SecretID +} + type DeleteSecretResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *DeleteSecretResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DeleteSecretResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DeleteSecretResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/deletetransientscope.go b/pkg/models/operations/deletetransientscope.go index 7dc7ad9..4a163af 100755 --- a/pkg/models/operations/deletetransientscope.go +++ b/pkg/models/operations/deletetransientscope.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -5,12 +7,52 @@ import ( ) type DeleteTransientScopeRequest struct { - ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` + // Scope ID + ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` + // Transient scope ID TransientScopeID string `pathParam:"style=simple,explode=false,name=transientScopeId"` } +func (o *DeleteTransientScopeRequest) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +func (o *DeleteTransientScopeRequest) GetTransientScopeID() string { + if o == nil { + return "" + } + return o.TransientScopeID +} + type DeleteTransientScopeResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *DeleteTransientScopeResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *DeleteTransientScopeResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *DeleteTransientScopeResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/getaccount.go b/pkg/models/operations/getaccount.go index 81bd994..5a234fc 100755 --- a/pkg/models/operations/getaccount.go +++ b/pkg/models/operations/getaccount.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,74 @@ import ( ) type GetAccountRequest struct { + // Exact address of the account. It must match the following regular expressions pattern: + // ``` + // ^\w+(:\w+)*$ + // ``` + // Address string `pathParam:"style=simple,explode=false,name=address"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` +} + +func (o *GetAccountRequest) GetAddress() string { + if o == nil { + return "" + } + return o.Address +} + +func (o *GetAccountRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger } type GetAccountResponse struct { + // OK AccountResponse *shared.AccountResponse - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetAccountResponse) GetAccountResponse() *shared.AccountResponse { + if o == nil { + return nil + } + return o.AccountResponse +} + +func (o *GetAccountResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetAccountResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *GetAccountResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetAccountResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getbalance.go b/pkg/models/operations/getbalance.go index ebe5546..26053c1 100755 --- a/pkg/models/operations/getbalance.go +++ b/pkg/models/operations/getbalance.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -10,10 +12,64 @@ type GetBalanceRequest struct { ID string `pathParam:"style=simple,explode=false,name=id"` } +func (o *GetBalanceRequest) GetBalanceName() string { + if o == nil { + return "" + } + return o.BalanceName +} + +func (o *GetBalanceRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type GetBalanceResponse struct { - ContentType string - GetBalanceResponse *shared.GetBalanceResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Balance summary + GetBalanceResponse *shared.GetBalanceResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *GetBalanceResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetBalanceResponse) GetGetBalanceResponse() *shared.GetBalanceResponse { + if o == nil { + return nil + } + return o.GetBalanceResponse +} + +func (o *GetBalanceResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetBalanceResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetBalanceResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/getbalances.go b/pkg/models/operations/getbalances.go index 7b1ed05..ce6988f 100755 --- a/pkg/models/operations/getbalances.go +++ b/pkg/models/operations/getbalances.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,17 +8,106 @@ import ( ) type GetBalancesRequest struct { - Address *string `queryParam:"style=form,explode=true,name=address"` - After *string `queryParam:"style=form,explode=true,name=after"` - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Filter balances involving given account, either as source or destination. + Address *string `queryParam:"style=form,explode=true,name=address"` + // Pagination cursor, will return accounts after given address, in descending order. + After *string `queryParam:"style=form,explode=true,name=after"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Parameter used in pagination requests. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // Deprecated, please use `cursor` instead. + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"` } +func (o *GetBalancesRequest) GetAddress() *string { + if o == nil { + return nil + } + return o.Address +} + +func (o *GetBalancesRequest) GetAfter() *string { + if o == nil { + return nil + } + return o.After +} + +func (o *GetBalancesRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *GetBalancesRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *GetBalancesRequest) GetPaginationToken() *string { + if o == nil { + return nil + } + return o.PaginationToken +} + type GetBalancesResponse struct { + // OK BalancesCursorResponse *shared.BalancesCursorResponse - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetBalancesResponse) GetBalancesCursorResponse() *shared.BalancesCursorResponse { + if o == nil { + return nil + } + return o.BalancesCursorResponse +} + +func (o *GetBalancesResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetBalancesResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *GetBalancesResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetBalancesResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getbalancesaggregated.go b/pkg/models/operations/getbalancesaggregated.go index 40b1582..da67745 100755 --- a/pkg/models/operations/getbalancesaggregated.go +++ b/pkg/models/operations/getbalancesaggregated.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,70 @@ import ( ) type GetBalancesAggregatedRequest struct { + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Filter balances involving given account, either as source or destination. Address *string `queryParam:"style=form,explode=true,name=address"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` +} + +func (o *GetBalancesAggregatedRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *GetBalancesAggregatedRequest) GetAddress() *string { + if o == nil { + return nil + } + return o.Address } type GetBalancesAggregatedResponse struct { + // OK AggregateBalancesResponse *shared.AggregateBalancesResponse - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetBalancesAggregatedResponse) GetAggregateBalancesResponse() *shared.AggregateBalancesResponse { + if o == nil { + return nil + } + return o.AggregateBalancesResponse +} + +func (o *GetBalancesAggregatedResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetBalancesAggregatedResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *GetBalancesAggregatedResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetBalancesAggregatedResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getconnectortask.go b/pkg/models/operations/getconnectortask.go index def9d60..36d1227 100755 --- a/pkg/models/operations/getconnectortask.go +++ b/pkg/models/operations/getconnectortask.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type GetConnectorTaskRequest struct { - Connector shared.ConnectorEnum `pathParam:"style=simple,explode=false,name=connector"` - TaskID string `pathParam:"style=simple,explode=false,name=taskId"` + // The name of the connector. + Connector shared.Connector `pathParam:"style=simple,explode=false,name=connector"` + // The task ID. + TaskID string `pathParam:"style=simple,explode=false,name=taskId"` +} + +func (o *GetConnectorTaskRequest) GetConnector() shared.Connector { + if o == nil { + return shared.Connector("") + } + return o.Connector +} + +func (o *GetConnectorTaskRequest) GetTaskID() string { + if o == nil { + return "" + } + return o.TaskID } type GetConnectorTaskResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // OK TaskResponse *shared.TaskResponse } + +func (o *GetConnectorTaskResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetConnectorTaskResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetConnectorTaskResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetConnectorTaskResponse) GetTaskResponse() *shared.TaskResponse { + if o == nil { + return nil + } + return o.TaskResponse +} diff --git a/pkg/models/operations/getflow.go b/pkg/models/operations/getflow.go index 3199e26..b5f03b4 100755 --- a/pkg/models/operations/getflow.go +++ b/pkg/models/operations/getflow.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type GetFlowRequest struct { + // The flow id FlowID string `pathParam:"style=simple,explode=false,name=flowId"` } +func (o *GetFlowRequest) GetFlowID() string { + if o == nil { + return "" + } + return o.FlowID +} + type GetFlowResponse struct { - ContentType string - Error *shared.Error + // HTTP response content type for this operation + ContentType string + // General error + Error *shared.Error + // The workflow GetWorkflowResponse *shared.GetWorkflowResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetFlowResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetFlowResponse) GetError() *shared.Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *GetFlowResponse) GetGetWorkflowResponse() *shared.GetWorkflowResponse { + if o == nil { + return nil + } + return o.GetWorkflowResponse +} + +func (o *GetFlowResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetFlowResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/gethold.go b/pkg/models/operations/gethold.go index 06485d1..2077772 100755 --- a/pkg/models/operations/gethold.go +++ b/pkg/models/operations/gethold.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type GetHoldRequest struct { + // The hold ID HoldID string `pathParam:"style=simple,explode=false,name=holdID"` } +func (o *GetHoldRequest) GetHoldID() string { + if o == nil { + return "" + } + return o.HoldID +} + type GetHoldResponse struct { - ContentType string - GetHoldResponse *shared.GetHoldResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Holds + GetHoldResponse *shared.GetHoldResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *GetHoldResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetHoldResponse) GetGetHoldResponse() *shared.GetHoldResponse { + if o == nil { + return nil + } + return o.GetHoldResponse +} + +func (o *GetHoldResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetHoldResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetHoldResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/getholds.go b/pkg/models/operations/getholds.go index 3d58e3f..87a926e 100755 --- a/pkg/models/operations/getholds.go +++ b/pkg/models/operations/getholds.go @@ -1,21 +1,115 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" ) +// GetHoldsMetadata - Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. +type GetHoldsMetadata struct { +} + type GetHoldsRequest struct { - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - Metadata map[string]interface{} `queryParam:"style=deepObject,explode=true,name=metadata"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` - WalletID *string `queryParam:"style=form,explode=true,name=walletID"` + // Parameter used in pagination requests. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when the pagination token is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. + Metadata *GetHoldsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + // The maximum number of results to return per page + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` + // The wallet to filter on + WalletID *string `queryParam:"style=form,explode=true,name=walletID"` +} + +func (g GetHoldsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetHoldsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetHoldsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *GetHoldsRequest) GetMetadata() *GetHoldsMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *GetHoldsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *GetHoldsRequest) GetWalletID() *string { + if o == nil { + return nil + } + return o.WalletID } type GetHoldsResponse struct { - ContentType string - GetHoldsResponse *shared.GetHoldsResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Holds + GetHoldsResponse *shared.GetHoldsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *GetHoldsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetHoldsResponse) GetGetHoldsResponse() *shared.GetHoldsResponse { + if o == nil { + return nil + } + return o.GetHoldsResponse +} + +func (o *GetHoldsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetHoldsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetHoldsResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/getinfo.go b/pkg/models/operations/getinfo.go index 1d1e212..f9af8ea 100755 --- a/pkg/models/operations/getinfo.go +++ b/pkg/models/operations/getinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,9 +8,49 @@ import ( ) type GetInfoResponse struct { + // OK ConfigInfoResponse *shared.ConfigInfoResponse - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetInfoResponse) GetConfigInfoResponse() *shared.ConfigInfoResponse { + if o == nil { + return nil + } + return o.ConfigInfoResponse +} + +func (o *GetInfoResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetInfoResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *GetInfoResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetInfoResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getledgerinfo.go b/pkg/models/operations/getledgerinfo.go index 3a3be1f..4315101 100755 --- a/pkg/models/operations/getledgerinfo.go +++ b/pkg/models/operations/getledgerinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type GetLedgerInfoRequest struct { + // Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` } +func (o *GetLedgerInfoRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + type GetLedgerInfoResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse - LedgerInfoResponse interface{} - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // OK + LedgerInfoResponse *shared.LedgerInfoResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetLedgerInfoResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetLedgerInfoResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *GetLedgerInfoResponse) GetLedgerInfoResponse() *shared.LedgerInfoResponse { + if o == nil { + return nil + } + return o.LedgerInfoResponse +} + +func (o *GetLedgerInfoResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetLedgerInfoResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getmanyconfigs.go b/pkg/models/operations/getmanyconfigs.go index ed2e938..1adea02 100755 --- a/pkg/models/operations/getmanyconfigs.go +++ b/pkg/models/operations/getmanyconfigs.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type GetManyConfigsRequest struct { + // Optional filter by endpoint URL Endpoint *string `queryParam:"style=form,explode=true,name=endpoint"` - ID *string `queryParam:"style=form,explode=true,name=id"` + // Optional filter by Config ID + ID *string `queryParam:"style=form,explode=true,name=id"` +} + +func (o *GetManyConfigsRequest) GetEndpoint() *string { + if o == nil { + return nil + } + return o.Endpoint +} + +func (o *GetManyConfigsRequest) GetID() *string { + if o == nil { + return nil + } + return o.ID } type GetManyConfigsResponse struct { + // OK ConfigsResponse *shared.ConfigsResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetManyConfigsResponse) GetConfigsResponse() *shared.ConfigsResponse { + if o == nil { + return nil + } + return o.ConfigsResponse +} + +func (o *GetManyConfigsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetManyConfigsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetManyConfigsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getmapping.go b/pkg/models/operations/getmapping.go index 4705bca..ca16520 100755 --- a/pkg/models/operations/getmapping.go +++ b/pkg/models/operations/getmapping.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type GetMappingRequest struct { + // Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` } +func (o *GetMappingRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + type GetMappingResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // OK MappingResponse *shared.MappingResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetMappingResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetMappingResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *GetMappingResponse) GetMappingResponse() *shared.MappingResponse { + if o == nil { + return nil + } + return o.MappingResponse +} + +func (o *GetMappingResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetMappingResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getpayment.go b/pkg/models/operations/getpayment.go index cd1d07e..bbb2c65 100755 --- a/pkg/models/operations/getpayment.go +++ b/pkg/models/operations/getpayment.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type GetPaymentRequest struct { + // The payment ID. PaymentID string `pathParam:"style=simple,explode=false,name=paymentId"` } +func (o *GetPaymentRequest) GetPaymentID() string { + if o == nil { + return "" + } + return o.PaymentID +} + type GetPaymentResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // OK PaymentResponse *shared.PaymentResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetPaymentResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetPaymentResponse) GetPaymentResponse() *shared.PaymentResponse { + if o == nil { + return nil + } + return o.PaymentResponse +} + +func (o *GetPaymentResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetPaymentResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/getserverinfo.go b/pkg/models/operations/getserverinfo.go index f797500..e441736 100755 --- a/pkg/models/operations/getserverinfo.go +++ b/pkg/models/operations/getserverinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type GetServerInfoResponse struct { + // HTTP response content type for this operation ContentType string - ServerInfo *shared.ServerInfo - StatusCode int + // Server information + ServerInfo *shared.ServerInfo + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *GetServerInfoResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetServerInfoResponse) GetServerInfo() *shared.ServerInfo { + if o == nil { + return nil + } + return o.ServerInfo +} + +func (o *GetServerInfoResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetServerInfoResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/gettransaction.go b/pkg/models/operations/gettransaction.go index 104817d..25478db 100755 --- a/pkg/models/operations/gettransaction.go +++ b/pkg/models/operations/gettransaction.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,70 @@ import ( ) type GetTransactionRequest struct { + // Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Txid int64 `pathParam:"style=simple,explode=false,name=txid"` + // Transaction ID. + Txid int64 `pathParam:"style=simple,explode=false,name=txid"` +} + +func (o *GetTransactionRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *GetTransactionRequest) GetTxid() int64 { + if o == nil { + return 0 + } + return o.Txid } type GetTransactionResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // OK TransactionResponse *shared.TransactionResponse } + +func (o *GetTransactionResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetTransactionResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *GetTransactionResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetTransactionResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetTransactionResponse) GetTransactionResponse() *shared.TransactionResponse { + if o == nil { + return nil + } + return o.TransactionResponse +} diff --git a/pkg/models/operations/gettransactions.go b/pkg/models/operations/gettransactions.go index 12a7369..a9837a0 100755 --- a/pkg/models/operations/gettransactions.go +++ b/pkg/models/operations/gettransactions.go @@ -1,20 +1,102 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" ) type GetTransactionsRequest struct { - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` + // Parameter used in pagination requests. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when the cursor is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // The maximum number of results to return per page + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` + // A wallet ID to filter on WalletID *string `queryParam:"style=form,explode=true,name=wallet_id"` } +func (g GetTransactionsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetTransactionsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetTransactionsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *GetTransactionsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *GetTransactionsRequest) GetWalletID() *string { + if o == nil { + return nil + } + return o.WalletID +} + type GetTransactionsResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // OK GetTransactionsResponse *shared.GetTransactionsResponse - StatusCode int - RawResponse *http.Response - WalletsErrorResponse *shared.WalletsErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error + WalletsErrorResponse *shared.WalletsErrorResponse +} + +func (o *GetTransactionsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetTransactionsResponse) GetGetTransactionsResponse() *shared.GetTransactionsResponse { + if o == nil { + return nil + } + return o.GetTransactionsResponse +} + +func (o *GetTransactionsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetTransactionsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetTransactionsResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse } diff --git a/pkg/models/operations/getwallet.go b/pkg/models/operations/getwallet.go index f3533ab..b72727b 100755 --- a/pkg/models/operations/getwallet.go +++ b/pkg/models/operations/getwallet.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -9,10 +11,57 @@ type GetWalletRequest struct { ID string `pathParam:"style=simple,explode=false,name=id"` } +func (o *GetWalletRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type GetWalletResponse struct { - ContentType string - GetWalletResponse *shared.GetWalletResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Wallet + GetWalletResponse *shared.GetWalletResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *GetWalletResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetWalletResponse) GetGetWalletResponse() *shared.GetWalletResponse { + if o == nil { + return nil + } + return o.GetWalletResponse +} + +func (o *GetWalletResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetWalletResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetWalletResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/getworkflowoccurrence.go b/pkg/models/operations/getworkflowoccurrence.go index 05d5f98..8dc4041 100755 --- a/pkg/models/operations/getworkflowoccurrence.go +++ b/pkg/models/operations/getworkflowoccurrence.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,70 @@ import ( ) type GetWorkflowOccurrenceRequest struct { + // The flow id FlowID string `pathParam:"style=simple,explode=false,name=flowId"` - RunID string `pathParam:"style=simple,explode=false,name=runId"` + // The occurrence id + RunID string `pathParam:"style=simple,explode=false,name=runId"` +} + +func (o *GetWorkflowOccurrenceRequest) GetFlowID() string { + if o == nil { + return "" + } + return o.FlowID +} + +func (o *GetWorkflowOccurrenceRequest) GetRunID() string { + if o == nil { + return "" + } + return o.RunID } type GetWorkflowOccurrenceResponse struct { - ContentType string - Error *shared.Error + // HTTP response content type for this operation + ContentType string + // General error + Error *shared.Error + // The workflow occurrence GetWorkflowOccurrenceResponse *shared.GetWorkflowOccurrenceResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetWorkflowOccurrenceResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetWorkflowOccurrenceResponse) GetError() *shared.Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *GetWorkflowOccurrenceResponse) GetGetWorkflowOccurrenceResponse() *shared.GetWorkflowOccurrenceResponse { + if o == nil { + return nil + } + return o.GetWorkflowOccurrenceResponse +} + +func (o *GetWorkflowOccurrenceResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetWorkflowOccurrenceResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/insertconfig.go b/pkg/models/operations/insertconfig.go index 20647ee..f5361c8 100755 --- a/pkg/models/operations/insertconfig.go +++ b/pkg/models/operations/insertconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,9 +8,49 @@ import ( ) type InsertConfigResponse struct { - ConfigResponse *shared.ConfigResponse - ContentType string - StatusCode int - RawResponse *http.Response + // Config created successfully. + ConfigResponse *shared.ConfigResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Bad Request InsertConfig400TextPlainString *string } + +func (o *InsertConfigResponse) GetConfigResponse() *shared.ConfigResponse { + if o == nil { + return nil + } + return o.ConfigResponse +} + +func (o *InsertConfigResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *InsertConfigResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *InsertConfigResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *InsertConfigResponse) GetInsertConfig400TextPlainString() *string { + if o == nil { + return nil + } + return o.InsertConfig400TextPlainString +} diff --git a/pkg/models/operations/installconnector.go b/pkg/models/operations/installconnector.go index dd88116..c4d4530 100755 --- a/pkg/models/operations/installconnector.go +++ b/pkg/models/operations/installconnector.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,51 @@ import ( ) type InstallConnectorRequest struct { - RequestBody interface{} `request:"mediaType=application/json"` - Connector shared.ConnectorEnum `pathParam:"style=simple,explode=false,name=connector"` + ConnectorConfig shared.ConnectorConfig `request:"mediaType=application/json"` + // The name of the connector. + Connector shared.Connector `pathParam:"style=simple,explode=false,name=connector"` +} + +func (o *InstallConnectorRequest) GetConnectorConfig() shared.ConnectorConfig { + if o == nil { + return shared.ConnectorConfig{} + } + return o.ConnectorConfig +} + +func (o *InstallConnectorRequest) GetConnector() shared.Connector { + if o == nil { + return shared.Connector("") + } + return o.Connector } type InstallConnectorResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *InstallConnectorResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *InstallConnectorResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *InstallConnectorResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/listaccounts.go b/pkg/models/operations/listaccounts.go index a7a5112..87e55fa 100755 --- a/pkg/models/operations/listaccounts.go +++ b/pkg/models/operations/listaccounts.go @@ -1,39 +1,237 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( + "encoding/json" + "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" ) -type ListAccountsBalanceOperatorEnum string +// ListAccountsBalanceOperator - Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. +type ListAccountsBalanceOperator string const ( - ListAccountsBalanceOperatorEnumGte ListAccountsBalanceOperatorEnum = "gte" - ListAccountsBalanceOperatorEnumLte ListAccountsBalanceOperatorEnum = "lte" - ListAccountsBalanceOperatorEnumGt ListAccountsBalanceOperatorEnum = "gt" - ListAccountsBalanceOperatorEnumLt ListAccountsBalanceOperatorEnum = "lt" - ListAccountsBalanceOperatorEnumE ListAccountsBalanceOperatorEnum = "e" - ListAccountsBalanceOperatorEnumNe ListAccountsBalanceOperatorEnum = "ne" + ListAccountsBalanceOperatorGte ListAccountsBalanceOperator = "gte" + ListAccountsBalanceOperatorLte ListAccountsBalanceOperator = "lte" + ListAccountsBalanceOperatorGt ListAccountsBalanceOperator = "gt" + ListAccountsBalanceOperatorLt ListAccountsBalanceOperator = "lt" + ListAccountsBalanceOperatorE ListAccountsBalanceOperator = "e" + ListAccountsBalanceOperatorNe ListAccountsBalanceOperator = "ne" ) +func (e ListAccountsBalanceOperator) ToPointer() *ListAccountsBalanceOperator { + return &e +} + +func (e *ListAccountsBalanceOperator) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gte": + fallthrough + case "lte": + fallthrough + case "gt": + fallthrough + case "lt": + fallthrough + case "e": + fallthrough + case "ne": + *e = ListAccountsBalanceOperator(v) + return nil + default: + return fmt.Errorf("invalid value for ListAccountsBalanceOperator: %v", v) + } +} + +// ListAccountsMetadata - Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. +type ListAccountsMetadata struct { +} + type ListAccountsRequest struct { - Address *string `queryParam:"style=form,explode=true,name=address"` - After *string `queryParam:"style=form,explode=true,name=after"` - Balance *int64 `queryParam:"style=form,explode=true,name=balance"` - BalanceOperator *ListAccountsBalanceOperatorEnum `queryParam:"style=form,explode=true,name=balanceOperator"` - BalanceOperatorDeprecated *ListAccountsBalanceOperatorEnum `queryParam:"style=form,explode=true,name=balance_operator"` - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Metadata map[string]interface{} `queryParam:"style=deepObject,explode=true,name=metadata"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` - PageSizeDeprecated *int64 `queryParam:"style=form,explode=true,name=page_size"` - PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"` + // Filter accounts by address pattern (regular expression placed between ^ and $). + Address *string `queryParam:"style=form,explode=true,name=address"` + // Pagination cursor, will return accounts after given address, in descending order. + After *string `queryParam:"style=form,explode=true,name=after"` + // Filter accounts by their balance (default operator is gte) + Balance *int64 `queryParam:"style=form,explode=true,name=balance"` + // Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. + // + BalanceOperator *ListAccountsBalanceOperator `queryParam:"style=form,explode=true,name=balanceOperator"` + // Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. + // Deprecated, please use `balanceOperator` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + BalanceOperatorDeprecated *ListAccountsBalanceOperator `queryParam:"style=form,explode=true,name=balance_operator"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. + Metadata *ListAccountsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + // The maximum number of results to return per page. + // + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` + // The maximum number of results to return per page. + // Deprecated, please use `pageSize` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + PageSizeDeprecated *int64 `default:"15" queryParam:"style=form,explode=true,name=page_size"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // Deprecated, please use `cursor` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"` +} + +func (l ListAccountsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListAccountsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListAccountsRequest) GetAddress() *string { + if o == nil { + return nil + } + return o.Address +} + +func (o *ListAccountsRequest) GetAfter() *string { + if o == nil { + return nil + } + return o.After +} + +func (o *ListAccountsRequest) GetBalance() *int64 { + if o == nil { + return nil + } + return o.Balance +} + +func (o *ListAccountsRequest) GetBalanceOperator() *ListAccountsBalanceOperator { + if o == nil { + return nil + } + return o.BalanceOperator +} + +func (o *ListAccountsRequest) GetBalanceOperatorDeprecated() *ListAccountsBalanceOperator { + if o == nil { + return nil + } + return o.BalanceOperatorDeprecated +} + +func (o *ListAccountsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListAccountsRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *ListAccountsRequest) GetMetadata() *ListAccountsMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *ListAccountsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *ListAccountsRequest) GetPageSizeDeprecated() *int64 { + if o == nil { + return nil + } + return o.PageSizeDeprecated +} + +func (o *ListAccountsRequest) GetPaginationToken() *string { + if o == nil { + return nil + } + return o.PaginationToken } type ListAccountsResponse struct { + // OK AccountsCursorResponse *shared.AccountsCursorResponse - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListAccountsResponse) GetAccountsCursorResponse() *shared.AccountsCursorResponse { + if o == nil { + return nil + } + return o.AccountsCursorResponse +} + +func (o *ListAccountsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListAccountsResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *ListAccountsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListAccountsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listallconnectors.go b/pkg/models/operations/listallconnectors.go index 2c9620d..b4d9cdf 100755 --- a/pkg/models/operations/listallconnectors.go +++ b/pkg/models/operations/listallconnectors.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type ListAllConnectorsResponse struct { + // OK ConnectorsResponse *shared.ConnectorsResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListAllConnectorsResponse) GetConnectorsResponse() *shared.ConnectorsResponse { + if o == nil { + return nil + } + return o.ConnectorsResponse +} + +func (o *ListAllConnectorsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListAllConnectorsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListAllConnectorsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listbalances.go b/pkg/models/operations/listbalances.go index 769ce0b..4e489d8 100755 --- a/pkg/models/operations/listbalances.go +++ b/pkg/models/operations/listbalances.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -9,9 +11,48 @@ type ListBalancesRequest struct { ID string `pathParam:"style=simple,explode=false,name=id"` } +func (o *ListBalancesRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type ListBalancesResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Balances list ListBalancesResponse *shared.ListBalancesResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListBalancesResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListBalancesResponse) GetListBalancesResponse() *shared.ListBalancesResponse { + if o == nil { + return nil + } + return o.ListBalancesResponse +} + +func (o *ListBalancesResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListBalancesResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listclients.go b/pkg/models/operations/listclients.go index d03b605..119b9cb 100755 --- a/pkg/models/operations/listclients.go +++ b/pkg/models/operations/listclients.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type ListClientsResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // List of clients ListClientsResponse *shared.ListClientsResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListClientsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListClientsResponse) GetListClientsResponse() *shared.ListClientsResponse { + if o == nil { + return nil + } + return o.ListClientsResponse +} + +func (o *ListClientsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListClientsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listconfigsavailableconnectors.go b/pkg/models/operations/listconfigsavailableconnectors.go index 97df0a9..32325c1 100755 --- a/pkg/models/operations/listconfigsavailableconnectors.go +++ b/pkg/models/operations/listconfigsavailableconnectors.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type ListConfigsAvailableConnectorsResponse struct { + // OK ConnectorsConfigsResponse *shared.ConnectorsConfigsResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListConfigsAvailableConnectorsResponse) GetConnectorsConfigsResponse() *shared.ConnectorsConfigsResponse { + if o == nil { + return nil + } + return o.ConnectorsConfigsResponse +} + +func (o *ListConfigsAvailableConnectorsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListConfigsAvailableConnectorsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListConfigsAvailableConnectorsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listconnectortasks.go b/pkg/models/operations/listconnectortasks.go index 4e93344..b3c51e5 100755 --- a/pkg/models/operations/listconnectortasks.go +++ b/pkg/models/operations/listconnectortasks.go @@ -1,19 +1,94 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" ) type ListConnectorTasksRequest struct { - Connector shared.ConnectorEnum `pathParam:"style=simple,explode=false,name=connector"` - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` + // The name of the connector. + Connector shared.Connector `pathParam:"style=simple,explode=false,name=connector"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // The maximum number of results to return per page. + // + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` +} + +func (l ListConnectorTasksRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListConnectorTasksRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListConnectorTasksRequest) GetConnector() shared.Connector { + if o == nil { + return shared.Connector("") + } + return o.Connector +} + +func (o *ListConnectorTasksRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListConnectorTasksRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize } type ListConnectorTasksResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response + // OK TasksCursor *shared.TasksCursor } + +func (o *ListConnectorTasksResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListConnectorTasksResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListConnectorTasksResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *ListConnectorTasksResponse) GetTasksCursor() *shared.TasksCursor { + if o == nil { + return nil + } + return o.TasksCursor +} diff --git a/pkg/models/operations/listflows.go b/pkg/models/operations/listflows.go index 60f2052..069591a 100755 --- a/pkg/models/operations/listflows.go +++ b/pkg/models/operations/listflows.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,9 +8,49 @@ import ( ) type ListFlowsResponse struct { - ContentType string - Error *shared.Error + // HTTP response content type for this operation + ContentType string + // General error + Error *shared.Error + // List of workflows ListWorkflowsResponse *shared.ListWorkflowsResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListFlowsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListFlowsResponse) GetError() *shared.Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *ListFlowsResponse) GetListWorkflowsResponse() *shared.ListWorkflowsResponse { + if o == nil { + return nil + } + return o.ListWorkflowsResponse +} + +func (o *ListFlowsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListFlowsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listlogs.go b/pkg/models/operations/listlogs.go index 5d04365..f3bd3c5 100755 --- a/pkg/models/operations/listlogs.go +++ b/pkg/models/operations/listlogs.go @@ -1,28 +1,192 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" "time" ) type ListLogsRequest struct { - After *string `queryParam:"style=form,explode=true,name=after"` - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - EndTime *time.Time `queryParam:"style=form,explode=true,name=endTime"` - EndTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=end_time"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` - PageSizeDeprecated *int64 `queryParam:"style=form,explode=true,name=page_size"` - PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"` - StartTime *time.Time `queryParam:"style=form,explode=true,name=startTime"` + // Pagination cursor, will return the logs after a given ID. (in descending order). + After *string `queryParam:"style=form,explode=true,name=after"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // Filter transactions that occurred before this timestamp. + // The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + // + EndTime *time.Time `queryParam:"style=form,explode=true,name=endTime"` + // Filter transactions that occurred before this timestamp. + // The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + // Deprecated, please use `endTime` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + EndTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=end_time"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // The maximum number of results to return per page. + // + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` + // The maximum number of results to return per page. + // Deprecated, please use `pageSize` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + PageSizeDeprecated *int64 `default:"15" queryParam:"style=form,explode=true,name=page_size"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // Deprecated, please use `cursor` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"` + // Filter transactions that occurred after this timestamp. + // The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + // + StartTime *time.Time `queryParam:"style=form,explode=true,name=startTime"` + // Filter transactions that occurred after this timestamp. + // The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + // Deprecated, please use `startTime` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. StartTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=start_time"` } +func (l ListLogsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListLogsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListLogsRequest) GetAfter() *string { + if o == nil { + return nil + } + return o.After +} + +func (o *ListLogsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListLogsRequest) GetEndTime() *time.Time { + if o == nil { + return nil + } + return o.EndTime +} + +func (o *ListLogsRequest) GetEndTimeDeprecated() *time.Time { + if o == nil { + return nil + } + return o.EndTimeDeprecated +} + +func (o *ListLogsRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *ListLogsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *ListLogsRequest) GetPageSizeDeprecated() *int64 { + if o == nil { + return nil + } + return o.PageSizeDeprecated +} + +func (o *ListLogsRequest) GetPaginationToken() *string { + if o == nil { + return nil + } + return o.PaginationToken +} + +func (o *ListLogsRequest) GetStartTime() *time.Time { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *ListLogsRequest) GetStartTimeDeprecated() *time.Time { + if o == nil { + return nil + } + return o.StartTimeDeprecated +} + type ListLogsResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // OK LogsCursorResponse *shared.LogsCursorResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListLogsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListLogsResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *ListLogsResponse) GetLogsCursorResponse() *shared.LogsCursorResponse { + if o == nil { + return nil + } + return o.LogsCursorResponse +} + +func (o *ListLogsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListLogsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listpayments.go b/pkg/models/operations/listpayments.go index f4d5176..cc5ba19 100755 --- a/pkg/models/operations/listpayments.go +++ b/pkg/models/operations/listpayments.go @@ -1,19 +1,94 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" ) type ListPaymentsRequest struct { - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` - Sort []string `queryParam:"style=form,explode=true,name=sort"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // The maximum number of results to return per page. + // + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` + // Fields used to sort payments (default is date:desc). + Sort []string `queryParam:"style=form,explode=true,name=sort"` +} + +func (l ListPaymentsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListPaymentsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListPaymentsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListPaymentsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *ListPaymentsRequest) GetSort() []string { + if o == nil { + return nil + } + return o.Sort } type ListPaymentsResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // OK PaymentsCursor *shared.PaymentsCursor - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListPaymentsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListPaymentsResponse) GetPaymentsCursor() *shared.PaymentsCursor { + if o == nil { + return nil + } + return o.PaymentsCursor +} + +func (o *ListPaymentsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListPaymentsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listruns.go b/pkg/models/operations/listruns.go index d9a74e9..14112aa 100755 --- a/pkg/models/operations/listruns.go +++ b/pkg/models/operations/listruns.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type ListRunsRequest struct { + // The flow id FlowID string `pathParam:"style=simple,explode=false,name=flowId"` } +func (o *ListRunsRequest) GetFlowID() string { + if o == nil { + return "" + } + return o.FlowID +} + type ListRunsResponse struct { - ContentType string - Error *shared.Error - ListRunsResponse interface{} - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // General error + Error *shared.Error + // List of workflow occurrences + ListRunsResponse *shared.ListRunsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListRunsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListRunsResponse) GetError() *shared.Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *ListRunsResponse) GetListRunsResponse() *shared.ListRunsResponse { + if o == nil { + return nil + } + return o.ListRunsResponse +} + +func (o *ListRunsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListRunsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listscopes.go b/pkg/models/operations/listscopes.go index 3b567c0..f0bd2a1 100755 --- a/pkg/models/operations/listscopes.go +++ b/pkg/models/operations/listscopes.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type ListScopesResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // List of scopes ListScopesResponse *shared.ListScopesResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListScopesResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListScopesResponse) GetListScopesResponse() *shared.ListScopesResponse { + if o == nil { + return nil + } + return o.ListScopesResponse +} + +func (o *ListScopesResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListScopesResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listtransactions.go b/pkg/models/operations/listtransactions.go index cd9afe9..192ec13 100755 --- a/pkg/models/operations/listtransactions.go +++ b/pkg/models/operations/listtransactions.go @@ -1,33 +1,241 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" "time" ) +// ListTransactionsMetadata - Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. +type ListTransactionsMetadata struct { +} + type ListTransactionsRequest struct { - Account *string `queryParam:"style=form,explode=true,name=account"` - After *string `queryParam:"style=form,explode=true,name=after"` - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - Destination *string `queryParam:"style=form,explode=true,name=destination"` - EndTime *time.Time `queryParam:"style=form,explode=true,name=endTime"` - EndTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=end_time"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Metadata map[string]interface{} `queryParam:"style=deepObject,explode=true,name=metadata"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` - PageSizeDeprecated *int64 `queryParam:"style=form,explode=true,name=page_size"` - PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"` - Reference *string `queryParam:"style=form,explode=true,name=reference"` - Source *string `queryParam:"style=form,explode=true,name=source"` - StartTime *time.Time `queryParam:"style=form,explode=true,name=startTime"` - StartTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=start_time"` + // Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). + Account *string `queryParam:"style=form,explode=true,name=account"` + // Pagination cursor, will return transactions after given txid (in descending order). + After *string `queryParam:"style=form,explode=true,name=after"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). + Destination *string `queryParam:"style=form,explode=true,name=destination"` + // Filter transactions that occurred before this timestamp. + // The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + // + EndTime *time.Time `queryParam:"style=form,explode=true,name=endTime"` + // Filter transactions that occurred before this timestamp. + // The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + // Deprecated, please use `endTime` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + EndTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=end_time"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. + Metadata *ListTransactionsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + // The maximum number of results to return per page. + // + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` + // The maximum number of results to return per page. + // Deprecated, please use `pageSize` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + PageSizeDeprecated *int64 `default:"15" queryParam:"style=form,explode=true,name=page_size"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // Deprecated, please use `cursor` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"` + // Find transactions by reference field. + Reference *string `queryParam:"style=form,explode=true,name=reference"` + // Filter transactions with postings involving given account at source (regular expression placed between ^ and $). + Source *string `queryParam:"style=form,explode=true,name=source"` + // Filter transactions that occurred after this timestamp. + // The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + // + StartTime *time.Time `queryParam:"style=form,explode=true,name=startTime"` + // Filter transactions that occurred after this timestamp. + // The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + // Deprecated, please use `startTime` instead. + // + // + // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + StartTimeDeprecated *time.Time `queryParam:"style=form,explode=true,name=start_time"` +} + +func (l ListTransactionsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListTransactionsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListTransactionsRequest) GetAccount() *string { + if o == nil { + return nil + } + return o.Account +} + +func (o *ListTransactionsRequest) GetAfter() *string { + if o == nil { + return nil + } + return o.After +} + +func (o *ListTransactionsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListTransactionsRequest) GetDestination() *string { + if o == nil { + return nil + } + return o.Destination +} + +func (o *ListTransactionsRequest) GetEndTime() *time.Time { + if o == nil { + return nil + } + return o.EndTime +} + +func (o *ListTransactionsRequest) GetEndTimeDeprecated() *time.Time { + if o == nil { + return nil + } + return o.EndTimeDeprecated +} + +func (o *ListTransactionsRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *ListTransactionsRequest) GetMetadata() *ListTransactionsMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *ListTransactionsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *ListTransactionsRequest) GetPageSizeDeprecated() *int64 { + if o == nil { + return nil + } + return o.PageSizeDeprecated +} + +func (o *ListTransactionsRequest) GetPaginationToken() *string { + if o == nil { + return nil + } + return o.PaginationToken +} + +func (o *ListTransactionsRequest) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *ListTransactionsRequest) GetSource() *string { + if o == nil { + return nil + } + return o.Source +} + +func (o *ListTransactionsRequest) GetStartTime() *time.Time { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *ListTransactionsRequest) GetStartTimeDeprecated() *time.Time { + if o == nil { + return nil + } + return o.StartTimeDeprecated } type ListTransactionsResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // OK TransactionsCursorResponse *shared.TransactionsCursorResponse } + +func (o *ListTransactionsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListTransactionsResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *ListTransactionsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListTransactionsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *ListTransactionsResponse) GetTransactionsCursorResponse() *shared.TransactionsCursorResponse { + if o == nil { + return nil + } + return o.TransactionsCursorResponse +} diff --git a/pkg/models/operations/listusers.go b/pkg/models/operations/listusers.go index b970961..2ca6af5 100755 --- a/pkg/models/operations/listusers.go +++ b/pkg/models/operations/listusers.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type ListUsersResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // List of users ListUsersResponse *shared.ListUsersResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListUsersResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListUsersResponse) GetListUsersResponse() *shared.ListUsersResponse { + if o == nil { + return nil + } + return o.ListUsersResponse +} + +func (o *ListUsersResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListUsersResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/listwallets.go b/pkg/models/operations/listwallets.go index c770006..a3b3630 100755 --- a/pkg/models/operations/listwallets.go +++ b/pkg/models/operations/listwallets.go @@ -1,20 +1,106 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" ) +// ListWalletsMetadata - Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. +type ListWalletsMetadata struct { +} + type ListWalletsRequest struct { - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - Metadata map[string]interface{} `queryParam:"style=deepObject,explode=true,name=metadata"` - Name *string `queryParam:"style=form,explode=true,name=name"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` + // Parameter used in pagination requests. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when the pagination token is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. + Metadata *ListWalletsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + // Filter on wallet name + Name *string `queryParam:"style=form,explode=true,name=name"` + // The maximum number of results to return per page + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` +} + +func (l ListWalletsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListWalletsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListWalletsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListWalletsRequest) GetMetadata() *ListWalletsMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *ListWalletsRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ListWalletsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize } type ListWalletsResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // OK ListWalletsResponse *shared.ListWalletsResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ListWalletsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ListWalletsResponse) GetListWalletsResponse() *shared.ListWalletsResponse { + if o == nil { + return nil + } + return o.ListWalletsResponse +} + +func (o *ListWalletsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ListWalletsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/options.go b/pkg/models/operations/options.go new file mode 100755 index 0000000..aa398ab --- /dev/null +++ b/pkg/models/operations/options.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package operations + +import ( + "errors" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" +) + +var ErrUnsupportedOption = errors.New("unsupported option") + +const ( + SupportedOptionServerURL = "serverURL" + SupportedOptionRetries = "retries" + SupportedOptionAcceptHeaderOverride = "acceptHeaderOverride" +) + +type AcceptHeaderEnum string + +const ( + AcceptHeaderEnumApplicationJson AcceptHeaderEnum = "application/json" + AcceptHeaderEnumWildcardWildcard AcceptHeaderEnum = "*/*" + AcceptHeaderEnumTextPlain AcceptHeaderEnum = "text/plain" +) + +func (e AcceptHeaderEnum) ToPointer() *AcceptHeaderEnum { + return &e +} + +type Options struct { + ServerURL *string + Retries *utils.RetryConfig + AcceptHeaderOverride *AcceptHeaderEnum +} + +type Option func(*Options, ...string) error + +// WithServerURL allows providing an alternative server URL. +func WithServerURL(serverURL string) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionServerURL) { + return ErrUnsupportedOption + } + + opts.ServerURL = &serverURL + return nil + } +} + +// WithTemplatedServerURL allows providing an alternative server URL with templated parameters. +func WithTemplatedServerURL(serverURL string, params map[string]string) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionServerURL) { + return ErrUnsupportedOption + } + + if params != nil { + serverURL = utils.ReplaceParameters(serverURL, params) + } + + opts.ServerURL = &serverURL + return nil + } +} + +// WithRetries allows customizing the default retry configuration. +func WithRetries(config utils.RetryConfig) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionRetries) { + return ErrUnsupportedOption + } + + opts.Retries = &config + return nil + } +} + +func WithAcceptHeaderOverride(acceptHeaderOverride AcceptHeaderEnum) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionAcceptHeaderOverride) { + return ErrUnsupportedOption + } + + opts.AcceptHeaderOverride = &acceptHeaderOverride + return nil + } +} diff --git a/pkg/models/operations/orchestrationgetserverinfo.go b/pkg/models/operations/orchestrationgetserverinfo.go index a4d3d0a..fd85187 100755 --- a/pkg/models/operations/orchestrationgetserverinfo.go +++ b/pkg/models/operations/orchestrationgetserverinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,9 +8,49 @@ import ( ) type OrchestrationgetServerInfoResponse struct { + // HTTP response content type for this operation ContentType string - Error *shared.Error - ServerInfo *shared.ServerInfo - StatusCode int + // General error + Error *shared.Error + // Server information + ServerInfo *shared.ServerInfo + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *OrchestrationgetServerInfoResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *OrchestrationgetServerInfoResponse) GetError() *shared.Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *OrchestrationgetServerInfoResponse) GetServerInfo() *shared.ServerInfo { + if o == nil { + return nil + } + return o.ServerInfo +} + +func (o *OrchestrationgetServerInfoResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *OrchestrationgetServerInfoResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/paymentsgetserverinfo.go b/pkg/models/operations/paymentsgetserverinfo.go index b8127a6..9679444 100755 --- a/pkg/models/operations/paymentsgetserverinfo.go +++ b/pkg/models/operations/paymentsgetserverinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type PaymentsgetServerInfoResponse struct { + // HTTP response content type for this operation ContentType string - ServerInfo *shared.ServerInfo - StatusCode int + // Server information + ServerInfo *shared.ServerInfo + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *PaymentsgetServerInfoResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *PaymentsgetServerInfoResponse) GetServerInfo() *shared.ServerInfo { + if o == nil { + return nil + } + return o.ServerInfo +} + +func (o *PaymentsgetServerInfoResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *PaymentsgetServerInfoResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/paymentslistaccounts.go b/pkg/models/operations/paymentslistaccounts.go index e1325be..13c34e5 100755 --- a/pkg/models/operations/paymentslistaccounts.go +++ b/pkg/models/operations/paymentslistaccounts.go @@ -1,19 +1,94 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "net/http" ) type PaymentslistAccountsRequest struct { - Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"` - Sort []string `queryParam:"style=form,explode=true,name=sort"` + // Parameter used in pagination requests. Maximum page size is set to 15. + // Set to the value of next for the next page of results. + // Set to the value of previous for the previous page of results. + // No other parameters can be set when this parameter is set. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` + // The maximum number of results to return per page. + // + PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` + // Fields used to sort payments (default is date:desc). + Sort []string `queryParam:"style=form,explode=true,name=sort"` +} + +func (p PaymentslistAccountsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaymentslistAccountsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PaymentslistAccountsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *PaymentslistAccountsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PaymentslistAccountsRequest) GetSort() []string { + if o == nil { + return nil + } + return o.Sort } type PaymentslistAccountsResponse struct { + // OK AccountsCursor *shared.AccountsCursor - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *PaymentslistAccountsResponse) GetAccountsCursor() *shared.AccountsCursor { + if o == nil { + return nil + } + return o.AccountsCursor +} + +func (o *PaymentslistAccountsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *PaymentslistAccountsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *PaymentslistAccountsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/readclient.go b/pkg/models/operations/readclient.go index 27b7cde..18535c7 100755 --- a/pkg/models/operations/readclient.go +++ b/pkg/models/operations/readclient.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type ReadClientRequest struct { + // Client ID ClientID string `pathParam:"style=simple,explode=false,name=clientId"` } +func (o *ReadClientRequest) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + type ReadClientResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Retrieved client ReadClientResponse *shared.ReadClientResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ReadClientResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ReadClientResponse) GetReadClientResponse() *shared.ReadClientResponse { + if o == nil { + return nil + } + return o.ReadClientResponse +} + +func (o *ReadClientResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ReadClientResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/readconnectorconfig.go b/pkg/models/operations/readconnectorconfig.go index 9704ec8..37da315 100755 --- a/pkg/models/operations/readconnectorconfig.go +++ b/pkg/models/operations/readconnectorconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type ReadConnectorConfigRequest struct { - Connector shared.ConnectorEnum `pathParam:"style=simple,explode=false,name=connector"` + // The name of the connector. + Connector shared.Connector `pathParam:"style=simple,explode=false,name=connector"` +} + +func (o *ReadConnectorConfigRequest) GetConnector() shared.Connector { + if o == nil { + return shared.Connector("") + } + return o.Connector } type ReadConnectorConfigResponse struct { + // OK ConnectorConfigResponse *shared.ConnectorConfigResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ReadConnectorConfigResponse) GetConnectorConfigResponse() *shared.ConnectorConfigResponse { + if o == nil { + return nil + } + return o.ConnectorConfigResponse +} + +func (o *ReadConnectorConfigResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ReadConnectorConfigResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ReadConnectorConfigResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/readscope.go b/pkg/models/operations/readscope.go index 8ab6a9e..ea149cd 100755 --- a/pkg/models/operations/readscope.go +++ b/pkg/models/operations/readscope.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type ReadScopeRequest struct { + // Scope ID ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` } +func (o *ReadScopeRequest) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + type ReadScopeResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Retrieved scope ReadScopeResponse *shared.ReadScopeResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ReadScopeResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ReadScopeResponse) GetReadScopeResponse() *shared.ReadScopeResponse { + if o == nil { + return nil + } + return o.ReadScopeResponse +} + +func (o *ReadScopeResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ReadScopeResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/readstats.go b/pkg/models/operations/readstats.go index f0ce2f6..1b72222 100755 --- a/pkg/models/operations/readstats.go +++ b/pkg/models/operations/readstats.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,61 @@ import ( ) type ReadStatsRequest struct { + // name of the ledger Ledger string `pathParam:"style=simple,explode=false,name=ledger"` } +func (o *ReadStatsRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + type ReadStatsResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Error ErrorResponse *shared.ErrorResponse + // OK StatsResponse *shared.StatsResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ReadStatsResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ReadStatsResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *ReadStatsResponse) GetStatsResponse() *shared.StatsResponse { + if o == nil { + return nil + } + return o.StatsResponse +} + +func (o *ReadStatsResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ReadStatsResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/readuser.go b/pkg/models/operations/readuser.go index 9ec2814..a16668a 100755 --- a/pkg/models/operations/readuser.go +++ b/pkg/models/operations/readuser.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type ReadUserRequest struct { + // User ID UserID string `pathParam:"style=simple,explode=false,name=userId"` } +func (o *ReadUserRequest) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + type ReadUserResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // Retrieved user ReadUserResponse *shared.ReadUserResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *ReadUserResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ReadUserResponse) GetReadUserResponse() *shared.ReadUserResponse { + if o == nil { + return nil + } + return o.ReadUserResponse +} + +func (o *ReadUserResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ReadUserResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/resetconnector.go b/pkg/models/operations/resetconnector.go index 30709ba..a80d2ad 100755 --- a/pkg/models/operations/resetconnector.go +++ b/pkg/models/operations/resetconnector.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,11 +8,43 @@ import ( ) type ResetConnectorRequest struct { - Connector shared.ConnectorEnum `pathParam:"style=simple,explode=false,name=connector"` + // The name of the connector. + Connector shared.Connector `pathParam:"style=simple,explode=false,name=connector"` +} + +func (o *ResetConnectorRequest) GetConnector() shared.Connector { + if o == nil { + return shared.Connector("") + } + return o.Connector } type ResetConnectorResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *ResetConnectorResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *ResetConnectorResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *ResetConnectorResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/reverttransaction.go b/pkg/models/operations/reverttransaction.go index 268f16a..ee2bb96 100755 --- a/pkg/models/operations/reverttransaction.go +++ b/pkg/models/operations/reverttransaction.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,70 @@ import ( ) type RevertTransactionRequest struct { + // Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Txid int64 `pathParam:"style=simple,explode=false,name=txid"` + // Transaction ID. + Txid int64 `pathParam:"style=simple,explode=false,name=txid"` +} + +func (o *RevertTransactionRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *RevertTransactionRequest) GetTxid() int64 { + if o == nil { + return 0 + } + return o.Txid } type RevertTransactionResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // OK TransactionResponse *shared.TransactionResponse } + +func (o *RevertTransactionResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *RevertTransactionResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *RevertTransactionResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *RevertTransactionResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *RevertTransactionResponse) GetTransactionResponse() *shared.TransactionResponse { + if o == nil { + return nil + } + return o.TransactionResponse +} diff --git a/pkg/models/operations/runscript.go b/pkg/models/operations/runscript.go index 0a0eebc..6eceab0 100755 --- a/pkg/models/operations/runscript.go +++ b/pkg/models/operations/runscript.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,75 @@ import ( ) type RunScriptRequest struct { - Script shared.Script `request:"mediaType=application/json"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` - Preview *bool `queryParam:"style=form,explode=true,name=preview"` + Script shared.Script `request:"mediaType=application/json"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + // Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. + Preview *bool `queryParam:"style=form,explode=true,name=preview"` +} + +func (o *RunScriptRequest) GetScript() shared.Script { + if o == nil { + return shared.Script{} + } + return o.Script +} + +func (o *RunScriptRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *RunScriptRequest) GetPreview() *bool { + if o == nil { + return nil + } + return o.Preview } type RunScriptResponse struct { - ContentType string + // HTTP response content type for this operation + ContentType string + // On success, it will return a 200 status code, and the resulting transaction under the `transaction` field. + // + // On failure, it will also return a 200 status code, and the following fields: + // - `details`: contains a URL. When there is an error parsing Numscript, the result can be difficult to read—the provided URL will render the error in an easy-to-read format. + // - `errorCode` and `error_code` (deprecated): contains the string code of the error + // - `errorMessage` and `error_message` (deprecated): contains a human-readable indication of what went wrong, for example that an account had insufficient funds, or that there was an error in the provided Numscript. + // ScriptResponse *shared.ScriptResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *RunScriptResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *RunScriptResponse) GetScriptResponse() *shared.ScriptResponse { + if o == nil { + return nil + } + return o.ScriptResponse +} + +func (o *RunScriptResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *RunScriptResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/runworkflow.go b/pkg/models/operations/runworkflow.go index c4e6e03..c7aa7ce 100755 --- a/pkg/models/operations/runworkflow.go +++ b/pkg/models/operations/runworkflow.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,15 +8,78 @@ import ( ) type RunWorkflowRequest struct { - RequestBody map[string]string `request:"mediaType=application/json"` + // The flow id FlowID string `pathParam:"style=simple,explode=false,name=flowId"` - Wait *bool `queryParam:"style=form,explode=true,name=wait"` + RequestBody map[string]string `request:"mediaType=application/json"` + // Wait end of the workflow before return + Wait *bool `queryParam:"style=form,explode=true,name=wait"` +} + +func (o *RunWorkflowRequest) GetFlowID() string { + if o == nil { + return "" + } + return o.FlowID +} + +func (o *RunWorkflowRequest) GetRequestBody() map[string]string { + if o == nil { + return nil + } + return o.RequestBody +} + +func (o *RunWorkflowRequest) GetWait() *bool { + if o == nil { + return nil + } + return o.Wait } type RunWorkflowResponse struct { - ContentType string - Error *shared.Error + // HTTP response content type for this operation + ContentType string + // General error + Error *shared.Error + // The workflow occurrence RunWorkflowResponse *shared.RunWorkflowResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *RunWorkflowResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *RunWorkflowResponse) GetError() *shared.Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *RunWorkflowResponse) GetRunWorkflowResponse() *shared.RunWorkflowResponse { + if o == nil { + return nil + } + return o.RunWorkflowResponse +} + +func (o *RunWorkflowResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *RunWorkflowResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/search.go b/pkg/models/operations/search.go index b322e08..cd05e1f 100755 --- a/pkg/models/operations/search.go +++ b/pkg/models/operations/search.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type SearchResponse struct { + // HTTP response content type for this operation ContentType string - Response *shared.Response - StatusCode int + // Success + Response *shared.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *SearchResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *SearchResponse) GetResponse() *shared.Response { + if o == nil { + return nil + } + return o.Response +} + +func (o *SearchResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *SearchResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/searchgetserverinfo.go b/pkg/models/operations/searchgetserverinfo.go index e0a7cb5..036e9af 100755 --- a/pkg/models/operations/searchgetserverinfo.go +++ b/pkg/models/operations/searchgetserverinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,8 +8,40 @@ import ( ) type SearchgetServerInfoResponse struct { + // HTTP response content type for this operation ContentType string - ServerInfo *shared.ServerInfo - StatusCode int + // Server information + ServerInfo *shared.ServerInfo + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *SearchgetServerInfoResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *SearchgetServerInfoResponse) GetServerInfo() *shared.ServerInfo { + if o == nil { + return nil + } + return o.ServerInfo +} + +func (o *SearchgetServerInfoResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *SearchgetServerInfoResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/testconfig.go b/pkg/models/operations/testconfig.go index 06a91e0..8083356 100755 --- a/pkg/models/operations/testconfig.go +++ b/pkg/models/operations/testconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,12 +8,52 @@ import ( ) type TestConfigRequest struct { + // Config ID ID string `pathParam:"style=simple,explode=false,name=id"` } +func (o *TestConfigRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type TestConfigResponse struct { + // OK AttemptResponse *shared.AttemptResponse - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *TestConfigResponse) GetAttemptResponse() *shared.AttemptResponse { + if o == nil { + return nil + } + return o.AttemptResponse +} + +func (o *TestConfigResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *TestConfigResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *TestConfigResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/uninstallconnector.go b/pkg/models/operations/uninstallconnector.go index 829f909..4c2b41d 100755 --- a/pkg/models/operations/uninstallconnector.go +++ b/pkg/models/operations/uninstallconnector.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,11 +8,43 @@ import ( ) type UninstallConnectorRequest struct { - Connector shared.ConnectorEnum `pathParam:"style=simple,explode=false,name=connector"` + // The name of the connector. + Connector shared.Connector `pathParam:"style=simple,explode=false,name=connector"` +} + +func (o *UninstallConnectorRequest) GetConnector() shared.Connector { + if o == nil { + return shared.Connector("") + } + return o.Connector } type UninstallConnectorResponse struct { + // HTTP response content type for this operation ContentType string - StatusCode int + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } + +func (o *UninstallConnectorResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *UninstallConnectorResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *UninstallConnectorResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/pkg/models/operations/updateclient.go b/pkg/models/operations/updateclient.go index a18e46d..263b93e 100755 --- a/pkg/models/operations/updateclient.go +++ b/pkg/models/operations/updateclient.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,60 @@ import ( ) type UpdateClientRequest struct { - UpdateClientRequest *shared.UpdateClientRequest `request:"mediaType=application/json"` + // Client ID ClientID string `pathParam:"style=simple,explode=false,name=clientId"` + UpdateClientRequest *shared.UpdateClientRequest `request:"mediaType=application/json"` +} + +func (o *UpdateClientRequest) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *UpdateClientRequest) GetUpdateClientRequest() *shared.UpdateClientRequest { + if o == nil { + return nil + } + return o.UpdateClientRequest } type UpdateClientResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Updated client UpdateClientResponse *shared.UpdateClientResponse } + +func (o *UpdateClientResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *UpdateClientResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *UpdateClientResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *UpdateClientResponse) GetUpdateClientResponse() *shared.UpdateClientResponse { + if o == nil { + return nil + } + return o.UpdateClientResponse +} diff --git a/pkg/models/operations/updatemapping.go b/pkg/models/operations/updatemapping.go index 1c490ed..8c865eb 100755 --- a/pkg/models/operations/updatemapping.go +++ b/pkg/models/operations/updatemapping.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,14 +8,69 @@ import ( ) type UpdateMappingRequest struct { - Mapping shared.Mapping `request:"mediaType=application/json"` - Ledger string `pathParam:"style=simple,explode=false,name=ledger"` + Mapping *shared.Mapping `request:"mediaType=application/json"` + // Name of the ledger. + Ledger string `pathParam:"style=simple,explode=false,name=ledger"` +} + +func (o *UpdateMappingRequest) GetMapping() *shared.Mapping { + if o == nil { + return nil + } + return o.Mapping +} + +func (o *UpdateMappingRequest) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger } type UpdateMappingResponse struct { - ContentType string - ErrorResponse *shared.ErrorResponse + // HTTP response content type for this operation + ContentType string + // Error + ErrorResponse *shared.ErrorResponse + // OK MappingResponse *shared.MappingResponse - StatusCode int - RawResponse *http.Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *UpdateMappingResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *UpdateMappingResponse) GetErrorResponse() *shared.ErrorResponse { + if o == nil { + return nil + } + return o.ErrorResponse +} + +func (o *UpdateMappingResponse) GetMappingResponse() *shared.MappingResponse { + if o == nil { + return nil + } + return o.MappingResponse +} + +func (o *UpdateMappingResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *UpdateMappingResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse } diff --git a/pkg/models/operations/updatescope.go b/pkg/models/operations/updatescope.go index 2676366..07773e4 100755 --- a/pkg/models/operations/updatescope.go +++ b/pkg/models/operations/updatescope.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,13 +8,60 @@ import ( ) type UpdateScopeRequest struct { - UpdateScopeRequest *shared.UpdateScopeRequest `request:"mediaType=application/json"` + // Scope ID ScopeID string `pathParam:"style=simple,explode=false,name=scopeId"` + UpdateScopeRequest *shared.UpdateScopeRequest `request:"mediaType=application/json"` +} + +func (o *UpdateScopeRequest) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +func (o *UpdateScopeRequest) GetUpdateScopeRequest() *shared.UpdateScopeRequest { + if o == nil { + return nil + } + return o.UpdateScopeRequest } type UpdateScopeResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Updated scope UpdateScopeResponse *shared.UpdateScopeResponse } + +func (o *UpdateScopeResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *UpdateScopeResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *UpdateScopeResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *UpdateScopeResponse) GetUpdateScopeResponse() *shared.UpdateScopeResponse { + if o == nil { + return nil + } + return o.UpdateScopeResponse +} diff --git a/pkg/models/operations/updatewallet.go b/pkg/models/operations/updatewallet.go index 12ba43b..39f2f31 100755 --- a/pkg/models/operations/updatewallet.go +++ b/pkg/models/operations/updatewallet.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,17 +8,71 @@ import ( ) type UpdateWalletRequestBody struct { + // Custom metadata to attach to this wallet. Metadata map[string]interface{} `json:"metadata,omitempty"` } +func (o *UpdateWalletRequestBody) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + type UpdateWalletRequest struct { - RequestBody *UpdateWalletRequestBody `request:"mediaType=application/json"` ID string `pathParam:"style=simple,explode=false,name=id"` + RequestBody *UpdateWalletRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateWalletRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateWalletRequest) GetRequestBody() *UpdateWalletRequestBody { + if o == nil { + return nil + } + return o.RequestBody } type UpdateWalletResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *UpdateWalletResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *UpdateWalletResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *UpdateWalletResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *UpdateWalletResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/voidhold.go b/pkg/models/operations/voidhold.go index 872c6e1..c3727f6 100755 --- a/pkg/models/operations/voidhold.go +++ b/pkg/models/operations/voidhold.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -9,9 +11,48 @@ type VoidHoldRequest struct { HoldID string `pathParam:"style=simple,explode=false,name=hold_id"` } +func (o *VoidHoldRequest) GetHoldID() string { + if o == nil { + return "" + } + return o.HoldID +} + type VoidHoldResponse struct { - ContentType string - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *VoidHoldResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *VoidHoldResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *VoidHoldResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *VoidHoldResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/operations/walletsgetserverinfo.go b/pkg/models/operations/walletsgetserverinfo.go index 613dcc9..ac2b226 100755 --- a/pkg/models/operations/walletsgetserverinfo.go +++ b/pkg/models/operations/walletsgetserverinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package operations import ( @@ -6,9 +8,49 @@ import ( ) type WalletsgetServerInfoResponse struct { - ContentType string - ServerInfo *shared.ServerInfo - StatusCode int - RawResponse *http.Response + // HTTP response content type for this operation + ContentType string + // Server information + ServerInfo *shared.ServerInfo + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Error WalletsErrorResponse *shared.WalletsErrorResponse } + +func (o *WalletsgetServerInfoResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *WalletsgetServerInfoResponse) GetServerInfo() *shared.ServerInfo { + if o == nil { + return nil + } + return o.ServerInfo +} + +func (o *WalletsgetServerInfoResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *WalletsgetServerInfoResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *WalletsgetServerInfoResponse) GetWalletsErrorResponse() *shared.WalletsErrorResponse { + if o == nil { + return nil + } + return o.WalletsErrorResponse +} diff --git a/pkg/models/sdkerrors/sdkerror.go b/pkg/models/sdkerrors/sdkerror.go new file mode 100755 index 0000000..5c1affd --- /dev/null +++ b/pkg/models/sdkerrors/sdkerror.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package sdkerrors + +import ( + "fmt" + "net/http" +) + +type SDKError struct { + Message string + StatusCode int + Body string + RawResponse *http.Response +} + +var _ error = &SDKError{} + +func NewSDKError(message string, statusCode int, body string, httpRes *http.Response) *SDKError { + return &SDKError{ + Message: message, + StatusCode: statusCode, + Body: body, + RawResponse: httpRes, + } +} + +func (e *SDKError) Error() string { + body := "" + if len(e.Body) > 0 { + body = fmt.Sprintf("\n%s", e.Body) + } + + return fmt.Sprintf("%s: Status %d%s", e.Message, e.StatusCode, body) +} diff --git a/pkg/models/shared/account.go b/pkg/models/shared/account.go index 05d6a7d..c9ab67b 100755 --- a/pkg/models/shared/account.go +++ b/pkg/models/shared/account.go @@ -1,7 +1,33 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +type AccountMetadata struct { +} + type Account struct { - Address string `json:"address"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Type *string `json:"type,omitempty"` + Address string `json:"address"` + Metadata *AccountMetadata `json:"metadata,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (o *Account) GetAddress() string { + if o == nil { + return "" + } + return o.Address +} + +func (o *Account) GetMetadata() *AccountMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Account) GetType() *string { + if o == nil { + return nil + } + return o.Type } diff --git a/pkg/models/shared/accountresponse.go b/pkg/models/shared/accountresponse.go index 202a9ee..f49384a 100755 --- a/pkg/models/shared/accountresponse.go +++ b/pkg/models/shared/accountresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type AccountResponse struct { Data AccountWithVolumesAndBalances `json:"data"` } + +func (o *AccountResponse) GetData() AccountWithVolumesAndBalances { + if o == nil { + return AccountWithVolumesAndBalances{} + } + return o.Data +} diff --git a/pkg/models/shared/accountscursor.go b/pkg/models/shared/accountscursor.go index 89f52e9..3a585a4 100755 --- a/pkg/models/shared/accountscursor.go +++ b/pkg/models/shared/accountscursor.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type AccountsCursorCursor struct { @@ -8,6 +10,48 @@ type AccountsCursorCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *AccountsCursorCursor) GetData() []PaymentsAccount { + if o == nil { + return []PaymentsAccount{} + } + return o.Data +} + +func (o *AccountsCursorCursor) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *AccountsCursorCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *AccountsCursorCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *AccountsCursorCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type AccountsCursor struct { Cursor AccountsCursorCursor `json:"cursor"` } + +func (o *AccountsCursor) GetCursor() AccountsCursorCursor { + if o == nil { + return AccountsCursorCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/accountscursorresponse.go b/pkg/models/shared/accountscursorresponse.go index d9ba80d..4e748b9 100755 --- a/pkg/models/shared/accountscursorresponse.go +++ b/pkg/models/shared/accountscursorresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type AccountsCursorResponseCursor struct { @@ -8,6 +10,48 @@ type AccountsCursorResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *AccountsCursorResponseCursor) GetData() []Account { + if o == nil { + return []Account{} + } + return o.Data +} + +func (o *AccountsCursorResponseCursor) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *AccountsCursorResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *AccountsCursorResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *AccountsCursorResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type AccountsCursorResponse struct { Cursor AccountsCursorResponseCursor `json:"cursor"` } + +func (o *AccountsCursorResponse) GetCursor() AccountsCursorResponseCursor { + if o == nil { + return AccountsCursorResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/accountwithvolumesandbalances.go b/pkg/models/shared/accountwithvolumesandbalances.go index 5e1adc4..16361bb 100755 --- a/pkg/models/shared/accountwithvolumesandbalances.go +++ b/pkg/models/shared/accountwithvolumesandbalances.go @@ -1,9 +1,49 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +type AccountWithVolumesAndBalancesMetadata struct { +} + type AccountWithVolumesAndBalances struct { - Address string `json:"address"` - Balances map[string]int64 `json:"balances,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Type *string `json:"type,omitempty"` - Volumes map[string]map[string]int64 `json:"volumes,omitempty"` + Address string `json:"address"` + Balances map[string]int64 `json:"balances,omitempty"` + Metadata *AccountWithVolumesAndBalancesMetadata `json:"metadata,omitempty"` + Type *string `json:"type,omitempty"` + Volumes map[string]map[string]int64 `json:"volumes,omitempty"` +} + +func (o *AccountWithVolumesAndBalances) GetAddress() string { + if o == nil { + return "" + } + return o.Address +} + +func (o *AccountWithVolumesAndBalances) GetBalances() map[string]int64 { + if o == nil { + return nil + } + return o.Balances +} + +func (o *AccountWithVolumesAndBalances) GetMetadata() *AccountWithVolumesAndBalancesMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *AccountWithVolumesAndBalances) GetType() *string { + if o == nil { + return nil + } + return o.Type +} + +func (o *AccountWithVolumesAndBalances) GetVolumes() map[string]map[string]int64 { + if o == nil { + return nil + } + return o.Volumes } diff --git a/pkg/models/shared/aggregatebalancesresponse.go b/pkg/models/shared/aggregatebalancesresponse.go index 6ead227..bddd515 100755 --- a/pkg/models/shared/aggregatebalancesresponse.go +++ b/pkg/models/shared/aggregatebalancesresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type AggregateBalancesResponse struct { Data map[string]int64 `json:"data"` } + +func (o *AggregateBalancesResponse) GetData() map[string]int64 { + if o == nil { + return map[string]int64{} + } + return o.Data +} diff --git a/pkg/models/shared/assetholder.go b/pkg/models/shared/assetholder.go index 5f4f953..5457422 100755 --- a/pkg/models/shared/assetholder.go +++ b/pkg/models/shared/assetholder.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type AssetHolder struct { Assets map[string]float64 `json:"assets"` } + +func (o *AssetHolder) GetAssets() map[string]float64 { + if o == nil { + return map[string]float64{} + } + return o.Assets +} diff --git a/pkg/models/shared/attempt.go b/pkg/models/shared/attempt.go new file mode 100755 index 0000000..9f939f9 --- /dev/null +++ b/pkg/models/shared/attempt.go @@ -0,0 +1,102 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "time" +) + +type Attempt struct { + Config *WebhooksConfig `json:"config,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + ID *string `json:"id,omitempty"` + NextRetryAfter *time.Time `json:"nextRetryAfter,omitempty"` + Payload *string `json:"payload,omitempty"` + RetryAttempt *int64 `json:"retryAttempt,omitempty"` + Status *string `json:"status,omitempty"` + StatusCode *int64 `json:"statusCode,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + WebhookID *string `json:"webhookID,omitempty"` +} + +func (a Attempt) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *Attempt) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Attempt) GetConfig() *WebhooksConfig { + if o == nil { + return nil + } + return o.Config +} + +func (o *Attempt) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Attempt) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Attempt) GetNextRetryAfter() *time.Time { + if o == nil { + return nil + } + return o.NextRetryAfter +} + +func (o *Attempt) GetPayload() *string { + if o == nil { + return nil + } + return o.Payload +} + +func (o *Attempt) GetRetryAttempt() *int64 { + if o == nil { + return nil + } + return o.RetryAttempt +} + +func (o *Attempt) GetStatus() *string { + if o == nil { + return nil + } + return o.Status +} + +func (o *Attempt) GetStatusCode() *int64 { + if o == nil { + return nil + } + return o.StatusCode +} + +func (o *Attempt) GetUpdatedAt() *time.Time { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Attempt) GetWebhookID() *string { + if o == nil { + return nil + } + return o.WebhookID +} diff --git a/pkg/models/shared/attemptresponse.go b/pkg/models/shared/attemptresponse.go index 9ae7acd..3d1c8ee 100755 --- a/pkg/models/shared/attemptresponse.go +++ b/pkg/models/shared/attemptresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type AttemptResponse struct { - Data interface{} `json:"data"` + Data Attempt `json:"data"` +} + +func (o *AttemptResponse) GetData() Attempt { + if o == nil { + return Attempt{} + } + return o.Data } diff --git a/pkg/models/shared/balance.go b/pkg/models/shared/balance.go index e8c92db..9772d28 100755 --- a/pkg/models/shared/balance.go +++ b/pkg/models/shared/balance.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Balance struct { Name string `json:"name"` } + +func (o *Balance) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/pkg/models/shared/balancescursorresponse.go b/pkg/models/shared/balancescursorresponse.go index 1510be0..f88267a 100755 --- a/pkg/models/shared/balancescursorresponse.go +++ b/pkg/models/shared/balancescursorresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type BalancesCursorResponseCursor struct { @@ -8,6 +10,48 @@ type BalancesCursorResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *BalancesCursorResponseCursor) GetData() []map[string]map[string]int64 { + if o == nil { + return []map[string]map[string]int64{} + } + return o.Data +} + +func (o *BalancesCursorResponseCursor) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *BalancesCursorResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *BalancesCursorResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *BalancesCursorResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type BalancesCursorResponse struct { Cursor BalancesCursorResponseCursor `json:"cursor"` } + +func (o *BalancesCursorResponse) GetCursor() BalancesCursorResponseCursor { + if o == nil { + return BalancesCursorResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/balancewithassets.go b/pkg/models/shared/balancewithassets.go index 66912b6..5666248 100755 --- a/pkg/models/shared/balancewithassets.go +++ b/pkg/models/shared/balancewithassets.go @@ -1,6 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type BalanceWithAssets struct { Assets map[string]float64 `json:"assets"` Name string `json:"name"` } + +func (o *BalanceWithAssets) GetAssets() map[string]float64 { + if o == nil { + return map[string]float64{} + } + return o.Assets +} + +func (o *BalanceWithAssets) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/pkg/models/shared/bankingcircleconfig.go b/pkg/models/shared/bankingcircleconfig.go index f1dd43a..a034022 100755 --- a/pkg/models/shared/bankingcircleconfig.go +++ b/pkg/models/shared/bankingcircleconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type BankingCircleConfig struct { @@ -6,3 +8,31 @@ type BankingCircleConfig struct { Password string `json:"password"` Username string `json:"username"` } + +func (o *BankingCircleConfig) GetAuthorizationEndpoint() string { + if o == nil { + return "" + } + return o.AuthorizationEndpoint +} + +func (o *BankingCircleConfig) GetEndpoint() string { + if o == nil { + return "" + } + return o.Endpoint +} + +func (o *BankingCircleConfig) GetPassword() string { + if o == nil { + return "" + } + return o.Password +} + +func (o *BankingCircleConfig) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} diff --git a/pkg/models/shared/client.go b/pkg/models/shared/client.go index a1d609c..54ddd37 100755 --- a/pkg/models/shared/client.go +++ b/pkg/models/shared/client.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Client struct { @@ -12,3 +14,73 @@ type Client struct { Secrets []ClientSecret `json:"secrets,omitempty"` Trusted *bool `json:"trusted,omitempty"` } + +func (o *Client) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *Client) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Client) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Client) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Client) GetPostLogoutRedirectUris() []string { + if o == nil { + return nil + } + return o.PostLogoutRedirectUris +} + +func (o *Client) GetPublic() *bool { + if o == nil { + return nil + } + return o.Public +} + +func (o *Client) GetRedirectUris() []string { + if o == nil { + return nil + } + return o.RedirectUris +} + +func (o *Client) GetScopes() []string { + if o == nil { + return nil + } + return o.Scopes +} + +func (o *Client) GetSecrets() []ClientSecret { + if o == nil { + return nil + } + return o.Secrets +} + +func (o *Client) GetTrusted() *bool { + if o == nil { + return nil + } + return o.Trusted +} diff --git a/pkg/models/shared/clientsecret.go b/pkg/models/shared/clientsecret.go index 34ee23e..1d602c2 100755 --- a/pkg/models/shared/clientsecret.go +++ b/pkg/models/shared/clientsecret.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ClientSecret struct { @@ -6,3 +8,31 @@ type ClientSecret struct { Metadata map[string]interface{} `json:"metadata,omitempty"` Name string `json:"name"` } + +func (o *ClientSecret) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ClientSecret) GetLastDigits() string { + if o == nil { + return "" + } + return o.LastDigits +} + +func (o *ClientSecret) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *ClientSecret) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/pkg/models/shared/config.go b/pkg/models/shared/config.go index 6a65acd..ee902b8 100755 --- a/pkg/models/shared/config.go +++ b/pkg/models/shared/config.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Config struct { Storage LedgerStorage `json:"storage"` } + +func (o *Config) GetStorage() LedgerStorage { + if o == nil { + return LedgerStorage{} + } + return o.Storage +} diff --git a/pkg/models/shared/configchangesecret.go b/pkg/models/shared/configchangesecret.go index 4c6b316..5abc1f7 100755 --- a/pkg/models/shared/configchangesecret.go +++ b/pkg/models/shared/configchangesecret.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConfigChangeSecret struct { Secret *string `json:"secret,omitempty"` } + +func (o *ConfigChangeSecret) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} diff --git a/pkg/models/shared/configinfo.go b/pkg/models/shared/configinfo.go index b616460..3ea9452 100755 --- a/pkg/models/shared/configinfo.go +++ b/pkg/models/shared/configinfo.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConfigInfo struct { @@ -5,3 +7,24 @@ type ConfigInfo struct { Server string `json:"server"` Version string `json:"version"` } + +func (o *ConfigInfo) GetConfig() Config { + if o == nil { + return Config{} + } + return o.Config +} + +func (o *ConfigInfo) GetServer() string { + if o == nil { + return "" + } + return o.Server +} + +func (o *ConfigInfo) GetVersion() string { + if o == nil { + return "" + } + return o.Version +} diff --git a/pkg/models/shared/configinforesponse.go b/pkg/models/shared/configinforesponse.go index 733fe2f..1ffc24a 100755 --- a/pkg/models/shared/configinforesponse.go +++ b/pkg/models/shared/configinforesponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConfigInfoResponse struct { Data ConfigInfo `json:"data"` } + +func (o *ConfigInfoResponse) GetData() ConfigInfo { + if o == nil { + return ConfigInfo{} + } + return o.Data +} diff --git a/pkg/models/shared/configresponse.go b/pkg/models/shared/configresponse.go index 218a332..3be0a42 100755 --- a/pkg/models/shared/configresponse.go +++ b/pkg/models/shared/configresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConfigResponse struct { - Data interface{} `json:"data"` + Data WebhooksConfig `json:"data"` +} + +func (o *ConfigResponse) GetData() WebhooksConfig { + if o == nil { + return WebhooksConfig{} + } + return o.Data } diff --git a/pkg/models/shared/configsresponse.go b/pkg/models/shared/configsresponse.go index 8d0985d..30d8ed1 100755 --- a/pkg/models/shared/configsresponse.go +++ b/pkg/models/shared/configsresponse.go @@ -1,13 +1,57 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConfigsResponseCursor struct { - Data []interface{} `json:"data"` - HasMore *bool `json:"hasMore,omitempty"` - Next *string `json:"next,omitempty"` - PageSize int64 `json:"pageSize"` - Previous *string `json:"previous,omitempty"` + Data []WebhooksConfig `json:"data"` + HasMore *bool `json:"hasMore,omitempty"` + Next *string `json:"next,omitempty"` + PageSize int64 `json:"pageSize"` + Previous *string `json:"previous,omitempty"` +} + +func (o *ConfigsResponseCursor) GetData() []WebhooksConfig { + if o == nil { + return []WebhooksConfig{} + } + return o.Data +} + +func (o *ConfigsResponseCursor) GetHasMore() *bool { + if o == nil { + return nil + } + return o.HasMore +} + +func (o *ConfigsResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ConfigsResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *ConfigsResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous } type ConfigsResponse struct { Cursor ConfigsResponseCursor `json:"cursor"` } + +func (o *ConfigsResponse) GetCursor() ConfigsResponseCursor { + if o == nil { + return ConfigsResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/configuser.go b/pkg/models/shared/configuser.go index 533e6d9..8f37fd3 100755 --- a/pkg/models/shared/configuser.go +++ b/pkg/models/shared/configuser.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConfigUser struct { @@ -5,3 +7,24 @@ type ConfigUser struct { EventTypes []string `json:"eventTypes"` Secret *string `json:"secret,omitempty"` } + +func (o *ConfigUser) GetEndpoint() string { + if o == nil { + return "" + } + return o.Endpoint +} + +func (o *ConfigUser) GetEventTypes() []string { + if o == nil { + return []string{} + } + return o.EventTypes +} + +func (o *ConfigUser) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} diff --git a/pkg/models/shared/confirmholdrequest.go b/pkg/models/shared/confirmholdrequest.go index 0133bcb..ffefdf6 100755 --- a/pkg/models/shared/confirmholdrequest.go +++ b/pkg/models/shared/confirmholdrequest.go @@ -1,6 +1,24 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConfirmHoldRequest struct { + // Define the amount to transfer. Amount *int64 `json:"amount,omitempty"` - Final *bool `json:"final,omitempty"` + // Define a final confirmation. Remaining funds will be returned to the wallet. + Final *bool `json:"final,omitempty"` +} + +func (o *ConfirmHoldRequest) GetAmount() *int64 { + if o == nil { + return nil + } + return o.Amount +} + +func (o *ConfirmHoldRequest) GetFinal() *bool { + if o == nil { + return nil + } + return o.Final } diff --git a/pkg/models/shared/connector.go b/pkg/models/shared/connector.go new file mode 100755 index 0000000..d4ddc38 --- /dev/null +++ b/pkg/models/shared/connector.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +type Connector string + +const ( + ConnectorStripe Connector = "STRIPE" + ConnectorDummyPay Connector = "DUMMY-PAY" + ConnectorWise Connector = "WISE" + ConnectorModulr Connector = "MODULR" + ConnectorCurrencyCloud Connector = "CURRENCY-CLOUD" + ConnectorBankingCircle Connector = "BANKING-CIRCLE" +) + +func (e Connector) ToPointer() *Connector { + return &e +} + +func (e *Connector) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STRIPE": + fallthrough + case "DUMMY-PAY": + fallthrough + case "WISE": + fallthrough + case "MODULR": + fallthrough + case "CURRENCY-CLOUD": + fallthrough + case "BANKING-CIRCLE": + *e = Connector(v) + return nil + default: + return fmt.Errorf("invalid value for Connector: %v", v) + } +} diff --git a/pkg/models/shared/connectorconfig.go b/pkg/models/shared/connectorconfig.go new file mode 100755 index 0000000..4ae32fe --- /dev/null +++ b/pkg/models/shared/connectorconfig.go @@ -0,0 +1,159 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "errors" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" +) + +type ConnectorConfigType string + +const ( + ConnectorConfigTypeStripeConfig ConnectorConfigType = "StripeConfig" + ConnectorConfigTypeDummyPayConfig ConnectorConfigType = "DummyPayConfig" + ConnectorConfigTypeWiseConfig ConnectorConfigType = "WiseConfig" + ConnectorConfigTypeModulrConfig ConnectorConfigType = "ModulrConfig" + ConnectorConfigTypeCurrencyCloudConfig ConnectorConfigType = "CurrencyCloudConfig" + ConnectorConfigTypeBankingCircleConfig ConnectorConfigType = "BankingCircleConfig" +) + +type ConnectorConfig struct { + StripeConfig *StripeConfig + DummyPayConfig *DummyPayConfig + WiseConfig *WiseConfig + ModulrConfig *ModulrConfig + CurrencyCloudConfig *CurrencyCloudConfig + BankingCircleConfig *BankingCircleConfig + + Type ConnectorConfigType +} + +func CreateConnectorConfigStripeConfig(stripeConfig StripeConfig) ConnectorConfig { + typ := ConnectorConfigTypeStripeConfig + + return ConnectorConfig{ + StripeConfig: &stripeConfig, + Type: typ, + } +} + +func CreateConnectorConfigDummyPayConfig(dummyPayConfig DummyPayConfig) ConnectorConfig { + typ := ConnectorConfigTypeDummyPayConfig + + return ConnectorConfig{ + DummyPayConfig: &dummyPayConfig, + Type: typ, + } +} + +func CreateConnectorConfigWiseConfig(wiseConfig WiseConfig) ConnectorConfig { + typ := ConnectorConfigTypeWiseConfig + + return ConnectorConfig{ + WiseConfig: &wiseConfig, + Type: typ, + } +} + +func CreateConnectorConfigModulrConfig(modulrConfig ModulrConfig) ConnectorConfig { + typ := ConnectorConfigTypeModulrConfig + + return ConnectorConfig{ + ModulrConfig: &modulrConfig, + Type: typ, + } +} + +func CreateConnectorConfigCurrencyCloudConfig(currencyCloudConfig CurrencyCloudConfig) ConnectorConfig { + typ := ConnectorConfigTypeCurrencyCloudConfig + + return ConnectorConfig{ + CurrencyCloudConfig: ¤cyCloudConfig, + Type: typ, + } +} + +func CreateConnectorConfigBankingCircleConfig(bankingCircleConfig BankingCircleConfig) ConnectorConfig { + typ := ConnectorConfigTypeBankingCircleConfig + + return ConnectorConfig{ + BankingCircleConfig: &bankingCircleConfig, + Type: typ, + } +} + +func (u *ConnectorConfig) UnmarshalJSON(data []byte) error { + + wiseConfig := WiseConfig{} + if err := utils.UnmarshalJSON(data, &wiseConfig, "", true, true); err == nil { + u.WiseConfig = &wiseConfig + u.Type = ConnectorConfigTypeWiseConfig + return nil + } + + stripeConfig := StripeConfig{} + if err := utils.UnmarshalJSON(data, &stripeConfig, "", true, true); err == nil { + u.StripeConfig = &stripeConfig + u.Type = ConnectorConfigTypeStripeConfig + return nil + } + + dummyPayConfig := DummyPayConfig{} + if err := utils.UnmarshalJSON(data, &dummyPayConfig, "", true, true); err == nil { + u.DummyPayConfig = &dummyPayConfig + u.Type = ConnectorConfigTypeDummyPayConfig + return nil + } + + modulrConfig := ModulrConfig{} + if err := utils.UnmarshalJSON(data, &modulrConfig, "", true, true); err == nil { + u.ModulrConfig = &modulrConfig + u.Type = ConnectorConfigTypeModulrConfig + return nil + } + + currencyCloudConfig := CurrencyCloudConfig{} + if err := utils.UnmarshalJSON(data, ¤cyCloudConfig, "", true, true); err == nil { + u.CurrencyCloudConfig = ¤cyCloudConfig + u.Type = ConnectorConfigTypeCurrencyCloudConfig + return nil + } + + bankingCircleConfig := BankingCircleConfig{} + if err := utils.UnmarshalJSON(data, &bankingCircleConfig, "", true, true); err == nil { + u.BankingCircleConfig = &bankingCircleConfig + u.Type = ConnectorConfigTypeBankingCircleConfig + return nil + } + + return errors.New("could not unmarshal into supported union types") +} + +func (u ConnectorConfig) MarshalJSON() ([]byte, error) { + if u.StripeConfig != nil { + return utils.MarshalJSON(u.StripeConfig, "", true) + } + + if u.DummyPayConfig != nil { + return utils.MarshalJSON(u.DummyPayConfig, "", true) + } + + if u.WiseConfig != nil { + return utils.MarshalJSON(u.WiseConfig, "", true) + } + + if u.ModulrConfig != nil { + return utils.MarshalJSON(u.ModulrConfig, "", true) + } + + if u.CurrencyCloudConfig != nil { + return utils.MarshalJSON(u.CurrencyCloudConfig, "", true) + } + + if u.BankingCircleConfig != nil { + return utils.MarshalJSON(u.BankingCircleConfig, "", true) + } + + return nil, errors.New("could not marshal union type: all fields are null") +} diff --git a/pkg/models/shared/connectorconfigresponse.go b/pkg/models/shared/connectorconfigresponse.go index 59084b4..be78fc0 100755 --- a/pkg/models/shared/connectorconfigresponse.go +++ b/pkg/models/shared/connectorconfigresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConnectorConfigResponse struct { - Data interface{} `json:"data"` + Data ConnectorConfig `json:"data"` +} + +func (o *ConnectorConfigResponse) GetData() ConnectorConfig { + if o == nil { + return ConnectorConfig{} + } + return o.Data } diff --git a/pkg/models/shared/connectorenum.go b/pkg/models/shared/connectorenum.go deleted file mode 100755 index 492076f..0000000 --- a/pkg/models/shared/connectorenum.go +++ /dev/null @@ -1,12 +0,0 @@ -package shared - -type ConnectorEnum string - -const ( - ConnectorEnumStripe ConnectorEnum = "STRIPE" - ConnectorEnumDummyPay ConnectorEnum = "DUMMY-PAY" - ConnectorEnumWise ConnectorEnum = "WISE" - ConnectorEnumModulr ConnectorEnum = "MODULR" - ConnectorEnumCurrencyCloud ConnectorEnum = "CURRENCY-CLOUD" - ConnectorEnumBankingCircle ConnectorEnum = "BANKING-CIRCLE" -) diff --git a/pkg/models/shared/connectorsconfigsresponse.go b/pkg/models/shared/connectorsconfigsresponse.go index 78313d2..e62e868 100755 --- a/pkg/models/shared/connectorsconfigsresponse.go +++ b/pkg/models/shared/connectorsconfigsresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConnectorsConfigsResponseDataConnectorKey struct { @@ -5,14 +7,49 @@ type ConnectorsConfigsResponseDataConnectorKey struct { Required bool `json:"required"` } +func (o *ConnectorsConfigsResponseDataConnectorKey) GetDataType() string { + if o == nil { + return "" + } + return o.DataType +} + +func (o *ConnectorsConfigsResponseDataConnectorKey) GetRequired() bool { + if o == nil { + return false + } + return o.Required +} + type ConnectorsConfigsResponseDataConnector struct { Key ConnectorsConfigsResponseDataConnectorKey `json:"key"` } +func (o *ConnectorsConfigsResponseDataConnector) GetKey() ConnectorsConfigsResponseDataConnectorKey { + if o == nil { + return ConnectorsConfigsResponseDataConnectorKey{} + } + return o.Key +} + type ConnectorsConfigsResponseData struct { Connector ConnectorsConfigsResponseDataConnector `json:"connector"` } +func (o *ConnectorsConfigsResponseData) GetConnector() ConnectorsConfigsResponseDataConnector { + if o == nil { + return ConnectorsConfigsResponseDataConnector{} + } + return o.Connector +} + type ConnectorsConfigsResponse struct { Data ConnectorsConfigsResponseData `json:"data"` } + +func (o *ConnectorsConfigsResponse) GetData() ConnectorsConfigsResponseData { + if o == nil { + return ConnectorsConfigsResponseData{} + } + return o.Data +} diff --git a/pkg/models/shared/connectorsresponse.go b/pkg/models/shared/connectorsresponse.go index e53f4f6..2a801db 100755 --- a/pkg/models/shared/connectorsresponse.go +++ b/pkg/models/shared/connectorsresponse.go @@ -1,10 +1,33 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ConnectorsResponseData struct { - Enabled *bool `json:"enabled,omitempty"` - Provider *ConnectorEnum `json:"provider,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Provider *Connector `json:"provider,omitempty"` +} + +func (o *ConnectorsResponseData) GetEnabled() *bool { + if o == nil { + return nil + } + return o.Enabled +} + +func (o *ConnectorsResponseData) GetProvider() *Connector { + if o == nil { + return nil + } + return o.Provider } type ConnectorsResponse struct { Data []ConnectorsResponseData `json:"data"` } + +func (o *ConnectorsResponse) GetData() []ConnectorsResponseData { + if o == nil { + return []ConnectorsResponseData{} + } + return o.Data +} diff --git a/pkg/models/shared/contract.go b/pkg/models/shared/contract.go index 349a1f6..1166b48 100755 --- a/pkg/models/shared/contract.go +++ b/pkg/models/shared/contract.go @@ -1,6 +1,25 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +type ContractExpr struct { +} + type Contract struct { - Account *string `json:"account,omitempty"` - Expr map[string]interface{} `json:"expr"` + Account *string `json:"account,omitempty"` + Expr ContractExpr `json:"expr"` +} + +func (o *Contract) GetAccount() *string { + if o == nil { + return nil + } + return o.Account +} + +func (o *Contract) GetExpr() ContractExpr { + if o == nil { + return ContractExpr{} + } + return o.Expr } diff --git a/pkg/models/shared/createbalancerequest.go b/pkg/models/shared/createbalancerequest.go index c2cb41c..bdbe410 100755 --- a/pkg/models/shared/createbalancerequest.go +++ b/pkg/models/shared/createbalancerequest.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateBalanceRequest struct { Name string `json:"name"` } + +func (o *CreateBalanceRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/pkg/models/shared/createbalanceresponse.go b/pkg/models/shared/createbalanceresponse.go index fe16b2b..197672b 100755 --- a/pkg/models/shared/createbalanceresponse.go +++ b/pkg/models/shared/createbalanceresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateBalanceResponse struct { Data Balance `json:"data"` } + +func (o *CreateBalanceResponse) GetData() Balance { + if o == nil { + return Balance{} + } + return o.Data +} diff --git a/pkg/models/shared/createclientrequest.go b/pkg/models/shared/createclientrequest.go index 3de1e52..9bf5269 100755 --- a/pkg/models/shared/createclientrequest.go +++ b/pkg/models/shared/createclientrequest.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateClientRequest struct { @@ -9,3 +11,52 @@ type CreateClientRequest struct { RedirectUris []string `json:"redirectUris,omitempty"` Trusted *bool `json:"trusted,omitempty"` } + +func (o *CreateClientRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *CreateClientRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *CreateClientRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateClientRequest) GetPostLogoutRedirectUris() []string { + if o == nil { + return nil + } + return o.PostLogoutRedirectUris +} + +func (o *CreateClientRequest) GetPublic() *bool { + if o == nil { + return nil + } + return o.Public +} + +func (o *CreateClientRequest) GetRedirectUris() []string { + if o == nil { + return nil + } + return o.RedirectUris +} + +func (o *CreateClientRequest) GetTrusted() *bool { + if o == nil { + return nil + } + return o.Trusted +} diff --git a/pkg/models/shared/createclientresponse.go b/pkg/models/shared/createclientresponse.go index f7c468b..9b2ead4 100755 --- a/pkg/models/shared/createclientresponse.go +++ b/pkg/models/shared/createclientresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateClientResponse struct { Data *Client `json:"data,omitempty"` } + +func (o *CreateClientResponse) GetData() *Client { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/createscoperequest.go b/pkg/models/shared/createscoperequest.go index 471b78c..2320425 100755 --- a/pkg/models/shared/createscoperequest.go +++ b/pkg/models/shared/createscoperequest.go @@ -1,6 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateScopeRequest struct { Label string `json:"label"` Metadata map[string]interface{} `json:"metadata,omitempty"` } + +func (o *CreateScopeRequest) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *CreateScopeRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} diff --git a/pkg/models/shared/createscoperesponse.go b/pkg/models/shared/createscoperesponse.go index 0813c5b..9acadef 100755 --- a/pkg/models/shared/createscoperesponse.go +++ b/pkg/models/shared/createscoperesponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateScopeResponse struct { Data *Scope `json:"data,omitempty"` } + +func (o *CreateScopeResponse) GetData() *Scope { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/createsecretrequest.go b/pkg/models/shared/createsecretrequest.go index 2447140..bb92766 100755 --- a/pkg/models/shared/createsecretrequest.go +++ b/pkg/models/shared/createsecretrequest.go @@ -1,6 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateSecretRequest struct { Metadata map[string]interface{} `json:"metadata,omitempty"` Name string `json:"name"` } + +func (o *CreateSecretRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *CreateSecretRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/pkg/models/shared/createsecretresponse.go b/pkg/models/shared/createsecretresponse.go index 362c957..b663b5a 100755 --- a/pkg/models/shared/createsecretresponse.go +++ b/pkg/models/shared/createsecretresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateSecretResponse struct { Data *Secret `json:"data,omitempty"` } + +func (o *CreateSecretResponse) GetData() *Secret { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/createwalletrequest.go b/pkg/models/shared/createwalletrequest.go index e75abc4..695f1b9 100755 --- a/pkg/models/shared/createwalletrequest.go +++ b/pkg/models/shared/createwalletrequest.go @@ -1,6 +1,23 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateWalletRequest struct { + // Custom metadata to attach to this wallet. Metadata map[string]interface{} `json:"metadata,omitempty"` Name string `json:"name"` } + +func (o *CreateWalletRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *CreateWalletRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/pkg/models/shared/createwalletresponse.go b/pkg/models/shared/createwalletresponse.go index 2ba46a4..e7ac9d5 100755 --- a/pkg/models/shared/createwalletresponse.go +++ b/pkg/models/shared/createwalletresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateWalletResponse struct { Data Wallet `json:"data"` } + +func (o *CreateWalletResponse) GetData() Wallet { + if o == nil { + return Wallet{} + } + return o.Data +} diff --git a/pkg/models/shared/createworkflowrequest.go b/pkg/models/shared/createworkflowrequest.go index ab190f8..e5c4e49 100755 --- a/pkg/models/shared/createworkflowrequest.go +++ b/pkg/models/shared/createworkflowrequest.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateWorkflowRequest struct { Stages []map[string]interface{} `json:"stages"` } + +func (o *CreateWorkflowRequest) GetStages() []map[string]interface{} { + if o == nil { + return []map[string]interface{}{} + } + return o.Stages +} diff --git a/pkg/models/shared/createworkflowresponse.go b/pkg/models/shared/createworkflowresponse.go index cd6336f..6a075a6 100755 --- a/pkg/models/shared/createworkflowresponse.go +++ b/pkg/models/shared/createworkflowresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreateWorkflowResponse struct { Data Workflow `json:"data"` } + +func (o *CreateWorkflowResponse) GetData() Workflow { + if o == nil { + return Workflow{} + } + return o.Data +} diff --git a/pkg/models/shared/creditwalletrequest.go b/pkg/models/shared/creditwalletrequest.go index 65e62fe..c95b9d7 100755 --- a/pkg/models/shared/creditwalletrequest.go +++ b/pkg/models/shared/creditwalletrequest.go @@ -1,9 +1,48 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CreditWalletRequest struct { - Amount Monetary `json:"amount"` - Balance *string `json:"balance,omitempty"` + Amount Monetary `json:"amount"` + // The balance to credit + Balance *string `json:"balance,omitempty"` + // Metadata associated with the wallet. Metadata map[string]interface{} `json:"metadata,omitempty"` Reference *string `json:"reference,omitempty"` - Sources []interface{} `json:"sources"` + Sources []Subject `json:"sources"` +} + +func (o *CreditWalletRequest) GetAmount() Monetary { + if o == nil { + return Monetary{} + } + return o.Amount +} + +func (o *CreditWalletRequest) GetBalance() *string { + if o == nil { + return nil + } + return o.Balance +} + +func (o *CreditWalletRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *CreditWalletRequest) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *CreditWalletRequest) GetSources() []Subject { + if o == nil { + return []Subject{} + } + return o.Sources } diff --git a/pkg/models/shared/currencycloudconfig.go b/pkg/models/shared/currencycloudconfig.go index 6ef2a45..efd31a6 100755 --- a/pkg/models/shared/currencycloudconfig.go +++ b/pkg/models/shared/currencycloudconfig.go @@ -1,8 +1,41 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type CurrencyCloudConfig struct { - APIKey string `json:"apiKey"` - Endpoint *string `json:"endpoint,omitempty"` - LoginID string `json:"loginID"` + APIKey string `json:"apiKey"` + // The endpoint to use for the API. Defaults to https://devapi.currencycloud.com + Endpoint *string `json:"endpoint,omitempty"` + // Username of the API Key holder + LoginID string `json:"loginID"` + // The frequency at which the connector will fetch transactions PollingPeriod *string `json:"pollingPeriod,omitempty"` } + +func (o *CurrencyCloudConfig) GetAPIKey() string { + if o == nil { + return "" + } + return o.APIKey +} + +func (o *CurrencyCloudConfig) GetEndpoint() *string { + if o == nil { + return nil + } + return o.Endpoint +} + +func (o *CurrencyCloudConfig) GetLoginID() string { + if o == nil { + return "" + } + return o.LoginID +} + +func (o *CurrencyCloudConfig) GetPollingPeriod() *string { + if o == nil { + return nil + } + return o.PollingPeriod +} diff --git a/pkg/models/shared/debitwalletrequest.go b/pkg/models/shared/debitwalletrequest.go index 528eccd..a203202 100755 --- a/pkg/models/shared/debitwalletrequest.go +++ b/pkg/models/shared/debitwalletrequest.go @@ -1,10 +1,70 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type DebitWalletRequest struct { - Amount Monetary `json:"amount"` - Balances []string `json:"balances,omitempty"` - Description *string `json:"description,omitempty"` - Destination interface{} `json:"destination,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Pending *bool `json:"pending,omitempty"` + Amount Monetary `json:"amount"` + Balances []string `json:"balances,omitempty"` + Description *string `json:"description,omitempty"` + Destination *Subject `json:"destination,omitempty"` + // Metadata associated with the wallet. + Metadata map[string]interface{} `json:"metadata,omitempty"` + // Set to true to create a pending hold. If false, the wallet will be debited immediately. + Pending *bool `json:"pending,omitempty"` +} + +func (o *DebitWalletRequest) GetAmount() Monetary { + if o == nil { + return Monetary{} + } + return o.Amount +} + +func (o *DebitWalletRequest) GetBalances() []string { + if o == nil { + return nil + } + return o.Balances +} + +func (o *DebitWalletRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *DebitWalletRequest) GetDestination() *Subject { + if o == nil { + return nil + } + return o.Destination +} + +func (o *DebitWalletRequest) GetDestinationAccount() *LedgerAccountSubject { + if v := o.GetDestination(); v != nil { + return v.LedgerAccountSubject + } + return nil +} + +func (o *DebitWalletRequest) GetDestinationWallet() *WalletSubject { + if v := o.GetDestination(); v != nil { + return v.WalletSubject + } + return nil +} + +func (o *DebitWalletRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *DebitWalletRequest) GetPending() *bool { + if o == nil { + return nil + } + return o.Pending } diff --git a/pkg/models/shared/debitwalletresponse.go b/pkg/models/shared/debitwalletresponse.go index c75764b..1b9a8a5 100755 --- a/pkg/models/shared/debitwalletresponse.go +++ b/pkg/models/shared/debitwalletresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type DebitWalletResponse struct { Data Hold `json:"data"` } + +func (o *DebitWalletResponse) GetData() Hold { + if o == nil { + return Hold{} + } + return o.Data +} diff --git a/pkg/models/shared/dummypayconfig.go b/pkg/models/shared/dummypayconfig.go index 5aa1a51..1f0ce5c 100755 --- a/pkg/models/shared/dummypayconfig.go +++ b/pkg/models/shared/dummypayconfig.go @@ -1,7 +1,47 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" +) + type DummyPayConfig struct { - Directory string `json:"directory"` - FileGenerationPeriod *string `json:"fileGenerationPeriod,omitempty"` - FilePollingPeriod *string `json:"filePollingPeriod,omitempty"` + Directory string `json:"directory"` + // The frequency at which the connector will create new payment objects in the directory + FileGenerationPeriod *string `default:"10s" json:"fileGenerationPeriod"` + // The frequency at which the connector will try to fetch new payment objects from the directory + FilePollingPeriod *string `default:"10s" json:"filePollingPeriod"` +} + +func (d DummyPayConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(d, "", false) +} + +func (d *DummyPayConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { + return err + } + return nil +} + +func (o *DummyPayConfig) GetDirectory() string { + if o == nil { + return "" + } + return o.Directory +} + +func (o *DummyPayConfig) GetFileGenerationPeriod() *string { + if o == nil { + return nil + } + return o.FileGenerationPeriod +} + +func (o *DummyPayConfig) GetFilePollingPeriod() *string { + if o == nil { + return nil + } + return o.FilePollingPeriod } diff --git a/pkg/models/shared/error.go b/pkg/models/shared/error.go index 84c6b82..bcf4644 100755 --- a/pkg/models/shared/error.go +++ b/pkg/models/shared/error.go @@ -1,12 +1,51 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared -type ErrorErrorCodeEnum string +import ( + "encoding/json" + "fmt" +) + +type ErrorErrorCode string const ( - ErrorErrorCodeEnumValidation ErrorErrorCodeEnum = "VALIDATION" + ErrorErrorCodeValidation ErrorErrorCode = "VALIDATION" ) +func (e ErrorErrorCode) ToPointer() *ErrorErrorCode { + return &e +} + +func (e *ErrorErrorCode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "VALIDATION": + *e = ErrorErrorCode(v) + return nil + default: + return fmt.Errorf("invalid value for ErrorErrorCode: %v", v) + } +} + type Error struct { - ErrorCode ErrorErrorCodeEnum `json:"errorCode"` - ErrorMessage string `json:"errorMessage"` + ErrorCode ErrorErrorCode `json:"errorCode"` + ErrorMessage string `json:"errorMessage"` +} + +func (o *Error) GetErrorCode() ErrorErrorCode { + if o == nil { + return ErrorErrorCode("") + } + return o.ErrorCode +} + +func (o *Error) GetErrorMessage() string { + if o == nil { + return "" + } + return o.ErrorMessage } diff --git a/pkg/models/shared/errorresponse.go b/pkg/models/shared/errorresponse.go index 34244fc..05e0743 100755 --- a/pkg/models/shared/errorresponse.go +++ b/pkg/models/shared/errorresponse.go @@ -1,7 +1,30 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ErrorResponse struct { - Details *string `json:"details,omitempty"` - ErrorCode *ErrorsEnumEnum `json:"errorCode,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` + Details *string `json:"details,omitempty"` + ErrorCode *ErrorsEnum `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` +} + +func (o *ErrorResponse) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *ErrorResponse) GetErrorCode() *ErrorsEnum { + if o == nil { + return nil + } + return o.ErrorCode +} + +func (o *ErrorResponse) GetErrorMessage() *string { + if o == nil { + return nil + } + return o.ErrorMessage } diff --git a/pkg/models/shared/errorsenum.go b/pkg/models/shared/errorsenum.go new file mode 100755 index 0000000..f930c85 --- /dev/null +++ b/pkg/models/shared/errorsenum.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +type ErrorsEnum string + +const ( + ErrorsEnumInternal ErrorsEnum = "INTERNAL" + ErrorsEnumInsufficientFund ErrorsEnum = "INSUFFICIENT_FUND" + ErrorsEnumValidation ErrorsEnum = "VALIDATION" + ErrorsEnumConflict ErrorsEnum = "CONFLICT" + ErrorsEnumNoScript ErrorsEnum = "NO_SCRIPT" + ErrorsEnumCompilationFailed ErrorsEnum = "COMPILATION_FAILED" + ErrorsEnumMetadataOverride ErrorsEnum = "METADATA_OVERRIDE" +) + +func (e ErrorsEnum) ToPointer() *ErrorsEnum { + return &e +} + +func (e *ErrorsEnum) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "INTERNAL": + fallthrough + case "INSUFFICIENT_FUND": + fallthrough + case "VALIDATION": + fallthrough + case "CONFLICT": + fallthrough + case "NO_SCRIPT": + fallthrough + case "COMPILATION_FAILED": + fallthrough + case "METADATA_OVERRIDE": + *e = ErrorsEnum(v) + return nil + default: + return fmt.Errorf("invalid value for ErrorsEnum: %v", v) + } +} diff --git a/pkg/models/shared/errorsenumenum.go b/pkg/models/shared/errorsenumenum.go deleted file mode 100755 index 5df135b..0000000 --- a/pkg/models/shared/errorsenumenum.go +++ /dev/null @@ -1,13 +0,0 @@ -package shared - -type ErrorsEnumEnum string - -const ( - ErrorsEnumEnumInternal ErrorsEnumEnum = "INTERNAL" - ErrorsEnumEnumInsufficientFund ErrorsEnumEnum = "INSUFFICIENT_FUND" - ErrorsEnumEnumValidation ErrorsEnumEnum = "VALIDATION" - ErrorsEnumEnumConflict ErrorsEnumEnum = "CONFLICT" - ErrorsEnumEnumNoScript ErrorsEnumEnum = "NO_SCRIPT" - ErrorsEnumEnumCompilationFailed ErrorsEnumEnum = "COMPILATION_FAILED" - ErrorsEnumEnumMetadataOverride ErrorsEnumEnum = "METADATA_OVERRIDE" -) diff --git a/pkg/models/shared/expandeddebithold.go b/pkg/models/shared/expandeddebithold.go index 277993d..8e03eec 100755 --- a/pkg/models/shared/expandeddebithold.go +++ b/pkg/models/shared/expandeddebithold.go @@ -1,11 +1,81 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ExpandedDebitHold struct { - Description string `json:"description"` - Destination interface{} `json:"destination,omitempty"` - ID string `json:"id"` - Metadata map[string]interface{} `json:"metadata"` - OriginalAmount int64 `json:"originalAmount"` - Remaining int64 `json:"remaining"` - WalletID string `json:"walletID"` + Description string `json:"description"` + Destination *Subject `json:"destination,omitempty"` + // The unique ID of the hold. + ID string `json:"id"` + // Metadata associated with the hold. + Metadata map[string]interface{} `json:"metadata"` + // Original amount on hold + OriginalAmount int64 `json:"originalAmount"` + // Remaining amount on hold + Remaining int64 `json:"remaining"` + // The ID of the wallet the hold is associated with. + WalletID string `json:"walletID"` +} + +func (o *ExpandedDebitHold) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *ExpandedDebitHold) GetDestination() *Subject { + if o == nil { + return nil + } + return o.Destination +} + +func (o *ExpandedDebitHold) GetDestinationAccount() *LedgerAccountSubject { + if v := o.GetDestination(); v != nil { + return v.LedgerAccountSubject + } + return nil +} + +func (o *ExpandedDebitHold) GetDestinationWallet() *WalletSubject { + if v := o.GetDestination(); v != nil { + return v.WalletSubject + } + return nil +} + +func (o *ExpandedDebitHold) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ExpandedDebitHold) GetMetadata() map[string]interface{} { + if o == nil { + return map[string]interface{}{} + } + return o.Metadata +} + +func (o *ExpandedDebitHold) GetOriginalAmount() int64 { + if o == nil { + return 0 + } + return o.OriginalAmount +} + +func (o *ExpandedDebitHold) GetRemaining() int64 { + if o == nil { + return 0 + } + return o.Remaining +} + +func (o *ExpandedDebitHold) GetWalletID() string { + if o == nil { + return "" + } + return o.WalletID } diff --git a/pkg/models/shared/getbalanceresponse.go b/pkg/models/shared/getbalanceresponse.go index 70e7445..18ed0b0 100755 --- a/pkg/models/shared/getbalanceresponse.go +++ b/pkg/models/shared/getbalanceresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type GetBalanceResponse struct { Data BalanceWithAssets `json:"data"` } + +func (o *GetBalanceResponse) GetData() BalanceWithAssets { + if o == nil { + return BalanceWithAssets{} + } + return o.Data +} diff --git a/pkg/models/shared/getholdresponse.go b/pkg/models/shared/getholdresponse.go index 4eb67e5..1d486eb 100755 --- a/pkg/models/shared/getholdresponse.go +++ b/pkg/models/shared/getholdresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type GetHoldResponse struct { Data ExpandedDebitHold `json:"data"` } + +func (o *GetHoldResponse) GetData() ExpandedDebitHold { + if o == nil { + return ExpandedDebitHold{} + } + return o.Data +} diff --git a/pkg/models/shared/getholdsresponse.go b/pkg/models/shared/getholdsresponse.go index 8d39009..ba11291 100755 --- a/pkg/models/shared/getholdsresponse.go +++ b/pkg/models/shared/getholdsresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type GetHoldsResponseCursor struct { @@ -8,6 +10,48 @@ type GetHoldsResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *GetHoldsResponseCursor) GetData() []Hold { + if o == nil { + return []Hold{} + } + return o.Data +} + +func (o *GetHoldsResponseCursor) GetHasMore() *bool { + if o == nil { + return nil + } + return o.HasMore +} + +func (o *GetHoldsResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *GetHoldsResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *GetHoldsResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type GetHoldsResponse struct { Cursor GetHoldsResponseCursor `json:"cursor"` } + +func (o *GetHoldsResponse) GetCursor() GetHoldsResponseCursor { + if o == nil { + return GetHoldsResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/gettransactionsresponse.go b/pkg/models/shared/gettransactionsresponse.go index ebcfd55..68a06ed 100755 --- a/pkg/models/shared/gettransactionsresponse.go +++ b/pkg/models/shared/gettransactionsresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type GetTransactionsResponseCursor struct { @@ -8,6 +10,48 @@ type GetTransactionsResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *GetTransactionsResponseCursor) GetData() []WalletsTransaction { + if o == nil { + return []WalletsTransaction{} + } + return o.Data +} + +func (o *GetTransactionsResponseCursor) GetHasMore() *bool { + if o == nil { + return nil + } + return o.HasMore +} + +func (o *GetTransactionsResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *GetTransactionsResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *GetTransactionsResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type GetTransactionsResponse struct { Cursor GetTransactionsResponseCursor `json:"cursor"` } + +func (o *GetTransactionsResponse) GetCursor() GetTransactionsResponseCursor { + if o == nil { + return GetTransactionsResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/getwalletresponse.go b/pkg/models/shared/getwalletresponse.go index 315e154..9af9f25 100755 --- a/pkg/models/shared/getwalletresponse.go +++ b/pkg/models/shared/getwalletresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type GetWalletResponse struct { Data WalletWithBalances `json:"data"` } + +func (o *GetWalletResponse) GetData() WalletWithBalances { + if o == nil { + return WalletWithBalances{} + } + return o.Data +} diff --git a/pkg/models/shared/getworkflowoccurrenceresponse.go b/pkg/models/shared/getworkflowoccurrenceresponse.go index 9685224..ad8658f 100755 --- a/pkg/models/shared/getworkflowoccurrenceresponse.go +++ b/pkg/models/shared/getworkflowoccurrenceresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type GetWorkflowOccurrenceResponse struct { Data WorkflowOccurrence `json:"data"` } + +func (o *GetWorkflowOccurrenceResponse) GetData() WorkflowOccurrence { + if o == nil { + return WorkflowOccurrence{} + } + return o.Data +} diff --git a/pkg/models/shared/getworkflowresponse.go b/pkg/models/shared/getworkflowresponse.go index 1f66e3f..8ac80bd 100755 --- a/pkg/models/shared/getworkflowresponse.go +++ b/pkg/models/shared/getworkflowresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type GetWorkflowResponse struct { Data Workflow `json:"data"` } + +func (o *GetWorkflowResponse) GetData() Workflow { + if o == nil { + return Workflow{} + } + return o.Data +} diff --git a/pkg/models/shared/hold.go b/pkg/models/shared/hold.go index 57ad34a..bbf9f59 100755 --- a/pkg/models/shared/hold.go +++ b/pkg/models/shared/hold.go @@ -1,9 +1,63 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Hold struct { - Description string `json:"description"` - Destination interface{} `json:"destination,omitempty"` - ID string `json:"id"` - Metadata map[string]interface{} `json:"metadata"` - WalletID string `json:"walletID"` + Description string `json:"description"` + Destination *Subject `json:"destination,omitempty"` + // The unique ID of the hold. + ID string `json:"id"` + // Metadata associated with the hold. + Metadata map[string]interface{} `json:"metadata"` + // The ID of the wallet the hold is associated with. + WalletID string `json:"walletID"` +} + +func (o *Hold) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *Hold) GetDestination() *Subject { + if o == nil { + return nil + } + return o.Destination +} + +func (o *Hold) GetDestinationAccount() *LedgerAccountSubject { + if v := o.GetDestination(); v != nil { + return v.LedgerAccountSubject + } + return nil +} + +func (o *Hold) GetDestinationWallet() *WalletSubject { + if v := o.GetDestination(); v != nil { + return v.WalletSubject + } + return nil +} + +func (o *Hold) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Hold) GetMetadata() map[string]interface{} { + if o == nil { + return map[string]interface{}{} + } + return o.Metadata +} + +func (o *Hold) GetWalletID() string { + if o == nil { + return "" + } + return o.WalletID } diff --git a/pkg/models/shared/ledgeraccountsubject.go b/pkg/models/shared/ledgeraccountsubject.go new file mode 100755 index 0000000..cb2b6b1 --- /dev/null +++ b/pkg/models/shared/ledgeraccountsubject.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type LedgerAccountSubject struct { + Identifier string `json:"identifier"` + Type string `json:"type"` +} + +func (o *LedgerAccountSubject) GetIdentifier() string { + if o == nil { + return "" + } + return o.Identifier +} + +func (o *LedgerAccountSubject) GetType() string { + if o == nil { + return "" + } + return o.Type +} diff --git a/pkg/models/shared/ledgerinfo.go b/pkg/models/shared/ledgerinfo.go new file mode 100755 index 0000000..8b4958d --- /dev/null +++ b/pkg/models/shared/ledgerinfo.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type LedgerInfoStorage struct { + Migrations []MigrationInfo `json:"migrations,omitempty"` +} + +func (o *LedgerInfoStorage) GetMigrations() []MigrationInfo { + if o == nil { + return nil + } + return o.Migrations +} + +type LedgerInfo struct { + Name *string `json:"name,omitempty"` + Storage *LedgerInfoStorage `json:"storage,omitempty"` +} + +func (o *LedgerInfo) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *LedgerInfo) GetStorage() *LedgerInfoStorage { + if o == nil { + return nil + } + return o.Storage +} diff --git a/pkg/models/shared/ledgerinforesponse.go b/pkg/models/shared/ledgerinforesponse.go new file mode 100755 index 0000000..d78039b --- /dev/null +++ b/pkg/models/shared/ledgerinforesponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type LedgerInfoResponse struct { + Data *LedgerInfo `json:"data,omitempty"` +} + +func (o *LedgerInfoResponse) GetData() *LedgerInfo { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/ledgerstorage.go b/pkg/models/shared/ledgerstorage.go index 549a806..fbe1048 100755 --- a/pkg/models/shared/ledgerstorage.go +++ b/pkg/models/shared/ledgerstorage.go @@ -1,6 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type LedgerStorage struct { Driver string `json:"driver"` Ledgers []string `json:"ledgers"` } + +func (o *LedgerStorage) GetDriver() string { + if o == nil { + return "" + } + return o.Driver +} + +func (o *LedgerStorage) GetLedgers() []string { + if o == nil { + return []string{} + } + return o.Ledgers +} diff --git a/pkg/models/shared/listbalancesresponse.go b/pkg/models/shared/listbalancesresponse.go index 0d44c73..000e506 100755 --- a/pkg/models/shared/listbalancesresponse.go +++ b/pkg/models/shared/listbalancesresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ListBalancesResponseCursor struct { @@ -8,6 +10,48 @@ type ListBalancesResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *ListBalancesResponseCursor) GetData() []Balance { + if o == nil { + return []Balance{} + } + return o.Data +} + +func (o *ListBalancesResponseCursor) GetHasMore() *bool { + if o == nil { + return nil + } + return o.HasMore +} + +func (o *ListBalancesResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ListBalancesResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *ListBalancesResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type ListBalancesResponse struct { Cursor ListBalancesResponseCursor `json:"cursor"` } + +func (o *ListBalancesResponse) GetCursor() ListBalancesResponseCursor { + if o == nil { + return ListBalancesResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/listclientsresponse.go b/pkg/models/shared/listclientsresponse.go index fcee65d..fb770bd 100755 --- a/pkg/models/shared/listclientsresponse.go +++ b/pkg/models/shared/listclientsresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ListClientsResponse struct { Data []Client `json:"data,omitempty"` } + +func (o *ListClientsResponse) GetData() []Client { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/listrunsresponse.go b/pkg/models/shared/listrunsresponse.go new file mode 100755 index 0000000..de07dd1 --- /dev/null +++ b/pkg/models/shared/listrunsresponse.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type ListRunsResponseCursor struct { + Data []WorkflowOccurrence `json:"data"` + HasMore *bool `json:"hasMore,omitempty"` + Next *string `json:"next,omitempty"` + PageSize int64 `json:"pageSize"` + Previous *string `json:"previous,omitempty"` +} + +func (o *ListRunsResponseCursor) GetData() []WorkflowOccurrence { + if o == nil { + return []WorkflowOccurrence{} + } + return o.Data +} + +func (o *ListRunsResponseCursor) GetHasMore() *bool { + if o == nil { + return nil + } + return o.HasMore +} + +func (o *ListRunsResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ListRunsResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *ListRunsResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + +type ListRunsResponse struct { + Cursor ListRunsResponseCursor `json:"cursor"` +} + +func (o *ListRunsResponse) GetCursor() ListRunsResponseCursor { + if o == nil { + return ListRunsResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/listscopesresponse.go b/pkg/models/shared/listscopesresponse.go index 15cacf7..b38cfee 100755 --- a/pkg/models/shared/listscopesresponse.go +++ b/pkg/models/shared/listscopesresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ListScopesResponse struct { Data []Scope `json:"data,omitempty"` } + +func (o *ListScopesResponse) GetData() []Scope { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/listusersresponse.go b/pkg/models/shared/listusersresponse.go index 770448a..39f5dfa 100755 --- a/pkg/models/shared/listusersresponse.go +++ b/pkg/models/shared/listusersresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ListUsersResponse struct { Data []User `json:"data,omitempty"` } + +func (o *ListUsersResponse) GetData() []User { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/listwalletsresponse.go b/pkg/models/shared/listwalletsresponse.go index 383d451..e2dfb3d 100755 --- a/pkg/models/shared/listwalletsresponse.go +++ b/pkg/models/shared/listwalletsresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ListWalletsResponseCursor struct { @@ -8,6 +10,48 @@ type ListWalletsResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *ListWalletsResponseCursor) GetData() []Wallet { + if o == nil { + return []Wallet{} + } + return o.Data +} + +func (o *ListWalletsResponseCursor) GetHasMore() *bool { + if o == nil { + return nil + } + return o.HasMore +} + +func (o *ListWalletsResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ListWalletsResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *ListWalletsResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type ListWalletsResponse struct { Cursor ListWalletsResponseCursor `json:"cursor"` } + +func (o *ListWalletsResponse) GetCursor() ListWalletsResponseCursor { + if o == nil { + return ListWalletsResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/listworkflowsresponse.go b/pkg/models/shared/listworkflowsresponse.go index 06c5f2b..fb3642d 100755 --- a/pkg/models/shared/listworkflowsresponse.go +++ b/pkg/models/shared/listworkflowsresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ListWorkflowsResponse struct { Data []Workflow `json:"data"` } + +func (o *ListWorkflowsResponse) GetData() []Workflow { + if o == nil { + return []Workflow{} + } + return o.Data +} diff --git a/pkg/models/shared/log.go b/pkg/models/shared/log.go index a0732c7..3dc72b4 100755 --- a/pkg/models/shared/log.go +++ b/pkg/models/shared/log.go @@ -1,20 +1,94 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "encoding/json" + "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) -type LogTypeEnum string +type LogData struct { +} + +type LogType string const ( - LogTypeEnumNewTransaction LogTypeEnum = "NEW_TRANSACTION" - LogTypeEnumSetMetadata LogTypeEnum = "SET_METADATA" + LogTypeNewTransaction LogType = "NEW_TRANSACTION" + LogTypeSetMetadata LogType = "SET_METADATA" ) +func (e LogType) ToPointer() *LogType { + return &e +} + +func (e *LogType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NEW_TRANSACTION": + fallthrough + case "SET_METADATA": + *e = LogType(v) + return nil + default: + return fmt.Errorf("invalid value for LogType: %v", v) + } +} + type Log struct { - Data map[string]interface{} `json:"data"` - Date time.Time `json:"date"` - Hash string `json:"hash"` - ID int64 `json:"id"` - Type LogTypeEnum `json:"type"` + Data LogData `json:"data"` + Date time.Time `json:"date"` + Hash string `json:"hash"` + ID int64 `json:"id"` + Type LogType `json:"type"` +} + +func (l Log) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *Log) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Log) GetData() LogData { + if o == nil { + return LogData{} + } + return o.Data +} + +func (o *Log) GetDate() time.Time { + if o == nil { + return time.Time{} + } + return o.Date +} + +func (o *Log) GetHash() string { + if o == nil { + return "" + } + return o.Hash +} + +func (o *Log) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *Log) GetType() LogType { + if o == nil { + return LogType("") + } + return o.Type } diff --git a/pkg/models/shared/logscursorresponse.go b/pkg/models/shared/logscursorresponse.go index ac4dfa6..af9a122 100755 --- a/pkg/models/shared/logscursorresponse.go +++ b/pkg/models/shared/logscursorresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type LogsCursorResponseCursor struct { @@ -8,6 +10,48 @@ type LogsCursorResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *LogsCursorResponseCursor) GetData() []Log { + if o == nil { + return []Log{} + } + return o.Data +} + +func (o *LogsCursorResponseCursor) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *LogsCursorResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *LogsCursorResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *LogsCursorResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type LogsCursorResponse struct { Cursor LogsCursorResponseCursor `json:"cursor"` } + +func (o *LogsCursorResponse) GetCursor() LogsCursorResponseCursor { + if o == nil { + return LogsCursorResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/mapping.go b/pkg/models/shared/mapping.go index e8ab0b2..75dfd6f 100755 --- a/pkg/models/shared/mapping.go +++ b/pkg/models/shared/mapping.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Mapping struct { Contracts []Contract `json:"contracts"` } + +func (o *Mapping) GetContracts() []Contract { + if o == nil { + return []Contract{} + } + return o.Contracts +} diff --git a/pkg/models/shared/mappingresponse.go b/pkg/models/shared/mappingresponse.go index fbb787d..3809391 100755 --- a/pkg/models/shared/mappingresponse.go +++ b/pkg/models/shared/mappingresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type MappingResponse struct { Data *Mapping `json:"data,omitempty"` } + +func (o *MappingResponse) GetData() *Mapping { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/migrationinfo.go b/pkg/models/shared/migrationinfo.go new file mode 100755 index 0000000..5941769 --- /dev/null +++ b/pkg/models/shared/migrationinfo.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "time" +) + +type MigrationInfoState string + +const ( + MigrationInfoStateToDo MigrationInfoState = "to do" + MigrationInfoStateDone MigrationInfoState = "done" +) + +func (e MigrationInfoState) ToPointer() *MigrationInfoState { + return &e +} + +func (e *MigrationInfoState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "to do": + fallthrough + case "done": + *e = MigrationInfoState(v) + return nil + default: + return fmt.Errorf("invalid value for MigrationInfoState: %v", v) + } +} + +type MigrationInfo struct { + Date *time.Time `json:"date,omitempty"` + Name *string `json:"name,omitempty"` + State *MigrationInfoState `json:"state,omitempty"` + Version *int64 `json:"version,omitempty"` +} + +func (m MigrationInfo) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(m, "", false) +} + +func (m *MigrationInfo) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &m, "", false, false); err != nil { + return err + } + return nil +} + +func (o *MigrationInfo) GetDate() *time.Time { + if o == nil { + return nil + } + return o.Date +} + +func (o *MigrationInfo) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *MigrationInfo) GetState() *MigrationInfoState { + if o == nil { + return nil + } + return o.State +} + +func (o *MigrationInfo) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} diff --git a/pkg/models/shared/modulrconfig.go b/pkg/models/shared/modulrconfig.go index e5646f1..0c0b194 100755 --- a/pkg/models/shared/modulrconfig.go +++ b/pkg/models/shared/modulrconfig.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ModulrConfig struct { @@ -5,3 +7,24 @@ type ModulrConfig struct { APISecret string `json:"apiSecret"` Endpoint *string `json:"endpoint,omitempty"` } + +func (o *ModulrConfig) GetAPIKey() string { + if o == nil { + return "" + } + return o.APIKey +} + +func (o *ModulrConfig) GetAPISecret() string { + if o == nil { + return "" + } + return o.APISecret +} + +func (o *ModulrConfig) GetEndpoint() *string { + if o == nil { + return nil + } + return o.Endpoint +} diff --git a/pkg/models/shared/monetary.go b/pkg/models/shared/monetary.go index b767da9..1681b7c 100755 --- a/pkg/models/shared/monetary.go +++ b/pkg/models/shared/monetary.go @@ -1,6 +1,24 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Monetary struct { - Amount int64 `json:"amount"` - Asset string `json:"asset"` + // The amount of the monetary value. + Amount int64 `json:"amount"` + // The asset of the monetary value. + Asset string `json:"asset"` +} + +func (o *Monetary) GetAmount() int64 { + if o == nil { + return 0 + } + return o.Amount +} + +func (o *Monetary) GetAsset() string { + if o == nil { + return "" + } + return o.Asset } diff --git a/pkg/models/shared/payment.go b/pkg/models/shared/payment.go index 2bc545d..28e0f57 100755 --- a/pkg/models/shared/payment.go +++ b/pkg/models/shared/payment.go @@ -1,53 +1,239 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "encoding/json" + "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) -type PaymentSchemeEnum string +type PaymentRaw struct { +} + +type PaymentScheme string const ( - PaymentSchemeEnumVisa PaymentSchemeEnum = "visa" - PaymentSchemeEnumMastercard PaymentSchemeEnum = "mastercard" - PaymentSchemeEnumAmex PaymentSchemeEnum = "amex" - PaymentSchemeEnumDiners PaymentSchemeEnum = "diners" - PaymentSchemeEnumDiscover PaymentSchemeEnum = "discover" - PaymentSchemeEnumJcb PaymentSchemeEnum = "jcb" - PaymentSchemeEnumUnionpay PaymentSchemeEnum = "unionpay" - PaymentSchemeEnumSepaDebit PaymentSchemeEnum = "sepa debit" - PaymentSchemeEnumSepaCredit PaymentSchemeEnum = "sepa credit" - PaymentSchemeEnumSepa PaymentSchemeEnum = "sepa" - PaymentSchemeEnumApplePay PaymentSchemeEnum = "apple pay" - PaymentSchemeEnumGooglePay PaymentSchemeEnum = "google pay" - PaymentSchemeEnumA2a PaymentSchemeEnum = "a2a" - PaymentSchemeEnumAchDebit PaymentSchemeEnum = "ach debit" - PaymentSchemeEnumAch PaymentSchemeEnum = "ach" - PaymentSchemeEnumRtp PaymentSchemeEnum = "rtp" - PaymentSchemeEnumUnknown PaymentSchemeEnum = "unknown" - PaymentSchemeEnumOther PaymentSchemeEnum = "other" + PaymentSchemeVisa PaymentScheme = "visa" + PaymentSchemeMastercard PaymentScheme = "mastercard" + PaymentSchemeAmex PaymentScheme = "amex" + PaymentSchemeDiners PaymentScheme = "diners" + PaymentSchemeDiscover PaymentScheme = "discover" + PaymentSchemeJcb PaymentScheme = "jcb" + PaymentSchemeUnionpay PaymentScheme = "unionpay" + PaymentSchemeSepaDebit PaymentScheme = "sepa debit" + PaymentSchemeSepaCredit PaymentScheme = "sepa credit" + PaymentSchemeSepa PaymentScheme = "sepa" + PaymentSchemeApplePay PaymentScheme = "apple pay" + PaymentSchemeGooglePay PaymentScheme = "google pay" + PaymentSchemeA2a PaymentScheme = "a2a" + PaymentSchemeAchDebit PaymentScheme = "ach debit" + PaymentSchemeAch PaymentScheme = "ach" + PaymentSchemeRtp PaymentScheme = "rtp" + PaymentSchemeUnknown PaymentScheme = "unknown" + PaymentSchemeOther PaymentScheme = "other" ) -type PaymentTypeEnum string +func (e PaymentScheme) ToPointer() *PaymentScheme { + return &e +} + +func (e *PaymentScheme) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "visa": + fallthrough + case "mastercard": + fallthrough + case "amex": + fallthrough + case "diners": + fallthrough + case "discover": + fallthrough + case "jcb": + fallthrough + case "unionpay": + fallthrough + case "sepa debit": + fallthrough + case "sepa credit": + fallthrough + case "sepa": + fallthrough + case "apple pay": + fallthrough + case "google pay": + fallthrough + case "a2a": + fallthrough + case "ach debit": + fallthrough + case "ach": + fallthrough + case "rtp": + fallthrough + case "unknown": + fallthrough + case "other": + *e = PaymentScheme(v) + return nil + default: + return fmt.Errorf("invalid value for PaymentScheme: %v", v) + } +} + +type PaymentType string const ( - PaymentTypeEnumPayIn PaymentTypeEnum = "PAY-IN" - PaymentTypeEnumPayout PaymentTypeEnum = "PAYOUT" - PaymentTypeEnumTransfer PaymentTypeEnum = "TRANSFER" - PaymentTypeEnumOther PaymentTypeEnum = "OTHER" + PaymentTypePayIn PaymentType = "PAY-IN" + PaymentTypePayout PaymentType = "PAYOUT" + PaymentTypeTransfer PaymentType = "TRANSFER" + PaymentTypeOther PaymentType = "OTHER" ) +func (e PaymentType) ToPointer() *PaymentType { + return &e +} + +func (e *PaymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PAY-IN": + fallthrough + case "PAYOUT": + fallthrough + case "TRANSFER": + fallthrough + case "OTHER": + *e = PaymentType(v) + return nil + default: + return fmt.Errorf("invalid value for PaymentType: %v", v) + } +} + type Payment struct { - AccountID string `json:"accountID"` - Adjustments []PaymentAdjustment `json:"adjustments"` - Asset string `json:"asset"` - CreatedAt time.Time `json:"createdAt"` - ID string `json:"id"` - InitialAmount int64 `json:"initialAmount"` - Metadata []PaymentMetadata `json:"metadata"` - Provider ConnectorEnum `json:"provider"` - Raw map[string]interface{} `json:"raw"` - Reference string `json:"reference"` - Scheme PaymentSchemeEnum `json:"scheme"` - Status PaymentStatusEnum `json:"status"` - Type PaymentTypeEnum `json:"type"` + AccountID string `json:"accountID"` + Adjustments []PaymentAdjustment `json:"adjustments"` + Asset string `json:"asset"` + CreatedAt time.Time `json:"createdAt"` + ID string `json:"id"` + InitialAmount int64 `json:"initialAmount"` + Metadata []PaymentMetadata `json:"metadata"` + Provider Connector `json:"provider"` + Raw PaymentRaw `json:"raw"` + Reference string `json:"reference"` + Scheme PaymentScheme `json:"scheme"` + Status PaymentStatus `json:"status"` + Type PaymentType `json:"type"` +} + +func (p Payment) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *Payment) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Payment) GetAccountID() string { + if o == nil { + return "" + } + return o.AccountID +} + +func (o *Payment) GetAdjustments() []PaymentAdjustment { + if o == nil { + return []PaymentAdjustment{} + } + return o.Adjustments +} + +func (o *Payment) GetAsset() string { + if o == nil { + return "" + } + return o.Asset +} + +func (o *Payment) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *Payment) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Payment) GetInitialAmount() int64 { + if o == nil { + return 0 + } + return o.InitialAmount +} + +func (o *Payment) GetMetadata() []PaymentMetadata { + if o == nil { + return []PaymentMetadata{} + } + return o.Metadata +} + +func (o *Payment) GetProvider() Connector { + if o == nil { + return Connector("") + } + return o.Provider +} + +func (o *Payment) GetRaw() PaymentRaw { + if o == nil { + return PaymentRaw{} + } + return o.Raw +} + +func (o *Payment) GetReference() string { + if o == nil { + return "" + } + return o.Reference +} + +func (o *Payment) GetScheme() PaymentScheme { + if o == nil { + return PaymentScheme("") + } + return o.Scheme +} + +func (o *Payment) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status +} + +func (o *Payment) GetType() PaymentType { + if o == nil { + return PaymentType("") + } + return o.Type } diff --git a/pkg/models/shared/paymentadjustment.go b/pkg/models/shared/paymentadjustment.go index 44366ad..2179ecf 100755 --- a/pkg/models/shared/paymentadjustment.go +++ b/pkg/models/shared/paymentadjustment.go @@ -1,13 +1,65 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) +type PaymentAdjustmentRaw struct { +} + type PaymentAdjustment struct { - Absolute bool `json:"absolute"` - Amount int64 `json:"amount"` - Date time.Time `json:"date"` - Raw map[string]interface{} `json:"raw"` - Status PaymentStatusEnum `json:"status"` + Absolute bool `json:"absolute"` + Amount int64 `json:"amount"` + Date time.Time `json:"date"` + Raw PaymentAdjustmentRaw `json:"raw"` + Status PaymentStatus `json:"status"` +} + +func (p PaymentAdjustment) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaymentAdjustment) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PaymentAdjustment) GetAbsolute() bool { + if o == nil { + return false + } + return o.Absolute +} + +func (o *PaymentAdjustment) GetAmount() int64 { + if o == nil { + return 0 + } + return o.Amount +} + +func (o *PaymentAdjustment) GetDate() time.Time { + if o == nil { + return time.Time{} + } + return o.Date +} + +func (o *PaymentAdjustment) GetRaw() PaymentAdjustmentRaw { + if o == nil { + return PaymentAdjustmentRaw{} + } + return o.Raw +} + +func (o *PaymentAdjustment) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status } diff --git a/pkg/models/shared/paymentmetadata.go b/pkg/models/shared/paymentmetadata.go index fb31155..1df2432 100755 --- a/pkg/models/shared/paymentmetadata.go +++ b/pkg/models/shared/paymentmetadata.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type PaymentMetadata struct { @@ -5,3 +7,24 @@ type PaymentMetadata struct { Key string `json:"key"` Value string `json:"value"` } + +func (o *PaymentMetadata) GetChangelog() *PaymentMetadataChangelog { + if o == nil { + return nil + } + return o.Changelog +} + +func (o *PaymentMetadata) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *PaymentMetadata) GetValue() string { + if o == nil { + return "" + } + return o.Value +} diff --git a/pkg/models/shared/paymentmetadatachangelog.go b/pkg/models/shared/paymentmetadatachangelog.go index e4f6ade..6225cf3 100755 --- a/pkg/models/shared/paymentmetadatachangelog.go +++ b/pkg/models/shared/paymentmetadatachangelog.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -8,3 +11,28 @@ type PaymentMetadataChangelog struct { Timestamp time.Time `json:"timestamp"` Value string `json:"value"` } + +func (p PaymentMetadataChangelog) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaymentMetadataChangelog) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PaymentMetadataChangelog) GetTimestamp() time.Time { + if o == nil { + return time.Time{} + } + return o.Timestamp +} + +func (o *PaymentMetadataChangelog) GetValue() string { + if o == nil { + return "" + } + return o.Value +} diff --git a/pkg/models/shared/paymentresponse.go b/pkg/models/shared/paymentresponse.go index 0675a2f..c796db9 100755 --- a/pkg/models/shared/paymentresponse.go +++ b/pkg/models/shared/paymentresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type PaymentResponse struct { Data Payment `json:"data"` } + +func (o *PaymentResponse) GetData() Payment { + if o == nil { + return Payment{} + } + return o.Data +} diff --git a/pkg/models/shared/paymentsaccount.go b/pkg/models/shared/paymentsaccount.go index 529e15a..f4a9818 100755 --- a/pkg/models/shared/paymentsaccount.go +++ b/pkg/models/shared/paymentsaccount.go @@ -1,20 +1,91 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "encoding/json" + "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) -type PaymentsAccountTypeEnum string +type PaymentsAccountType string const ( - PaymentsAccountTypeEnumTarget PaymentsAccountTypeEnum = "TARGET" - PaymentsAccountTypeEnumSource PaymentsAccountTypeEnum = "SOURCE" + PaymentsAccountTypeTarget PaymentsAccountType = "TARGET" + PaymentsAccountTypeSource PaymentsAccountType = "SOURCE" ) +func (e PaymentsAccountType) ToPointer() *PaymentsAccountType { + return &e +} + +func (e *PaymentsAccountType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TARGET": + fallthrough + case "SOURCE": + *e = PaymentsAccountType(v) + return nil + default: + return fmt.Errorf("invalid value for PaymentsAccountType: %v", v) + } +} + type PaymentsAccount struct { - CreatedAt time.Time `json:"createdAt"` - ID string `json:"id"` - Provider ConnectorEnum `json:"provider"` - Reference string `json:"reference"` - Type PaymentsAccountTypeEnum `json:"type"` + CreatedAt time.Time `json:"createdAt"` + ID string `json:"id"` + Provider Connector `json:"provider"` + Reference string `json:"reference"` + Type PaymentsAccountType `json:"type"` +} + +func (p PaymentsAccount) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaymentsAccount) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PaymentsAccount) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *PaymentsAccount) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *PaymentsAccount) GetProvider() Connector { + if o == nil { + return Connector("") + } + return o.Provider +} + +func (o *PaymentsAccount) GetReference() string { + if o == nil { + return "" + } + return o.Reference +} + +func (o *PaymentsAccount) GetType() PaymentsAccountType { + if o == nil { + return PaymentsAccountType("") + } + return o.Type } diff --git a/pkg/models/shared/paymentscursor.go b/pkg/models/shared/paymentscursor.go index bbaffa1..673cb36 100755 --- a/pkg/models/shared/paymentscursor.go +++ b/pkg/models/shared/paymentscursor.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type PaymentsCursorCursor struct { @@ -8,6 +10,48 @@ type PaymentsCursorCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *PaymentsCursorCursor) GetData() []Payment { + if o == nil { + return []Payment{} + } + return o.Data +} + +func (o *PaymentsCursorCursor) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PaymentsCursorCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *PaymentsCursorCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *PaymentsCursorCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type PaymentsCursor struct { Cursor PaymentsCursorCursor `json:"cursor"` } + +func (o *PaymentsCursor) GetCursor() PaymentsCursorCursor { + if o == nil { + return PaymentsCursorCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/paymentstatus.go b/pkg/models/shared/paymentstatus.go new file mode 100755 index 0000000..3100059 --- /dev/null +++ b/pkg/models/shared/paymentstatus.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +type PaymentStatus string + +const ( + PaymentStatusPending PaymentStatus = "PENDING" + PaymentStatusActive PaymentStatus = "ACTIVE" + PaymentStatusTerminated PaymentStatus = "TERMINATED" + PaymentStatusFailed PaymentStatus = "FAILED" +) + +func (e PaymentStatus) ToPointer() *PaymentStatus { + return &e +} + +func (e *PaymentStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PENDING": + fallthrough + case "ACTIVE": + fallthrough + case "TERMINATED": + fallthrough + case "FAILED": + *e = PaymentStatus(v) + return nil + default: + return fmt.Errorf("invalid value for PaymentStatus: %v", v) + } +} diff --git a/pkg/models/shared/paymentstatusenum.go b/pkg/models/shared/paymentstatusenum.go deleted file mode 100755 index bfdec87..0000000 --- a/pkg/models/shared/paymentstatusenum.go +++ /dev/null @@ -1,10 +0,0 @@ -package shared - -type PaymentStatusEnum string - -const ( - PaymentStatusEnumPending PaymentStatusEnum = "PENDING" - PaymentStatusEnumActive PaymentStatusEnum = "ACTIVE" - PaymentStatusEnumTerminated PaymentStatusEnum = "TERMINATED" - PaymentStatusEnumFailed PaymentStatusEnum = "FAILED" -) diff --git a/pkg/models/shared/posting.go b/pkg/models/shared/posting.go index 61205a3..2b93821 100755 --- a/pkg/models/shared/posting.go +++ b/pkg/models/shared/posting.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Posting struct { @@ -6,3 +8,31 @@ type Posting struct { Destination string `json:"destination"` Source string `json:"source"` } + +func (o *Posting) GetAmount() int64 { + if o == nil { + return 0 + } + return o.Amount +} + +func (o *Posting) GetAsset() string { + if o == nil { + return "" + } + return o.Asset +} + +func (o *Posting) GetDestination() string { + if o == nil { + return "" + } + return o.Destination +} + +func (o *Posting) GetSource() string { + if o == nil { + return "" + } + return o.Source +} diff --git a/pkg/models/shared/posttransaction.go b/pkg/models/shared/posttransaction.go index 5aef826..6fde5b5 100755 --- a/pkg/models/shared/posttransaction.go +++ b/pkg/models/shared/posttransaction.go @@ -1,12 +1,32 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) +type PostTransactionScriptVars struct { +} + type PostTransactionScript struct { - Plain string `json:"plain"` - Vars map[string]interface{} `json:"vars,omitempty"` + Plain string `json:"plain"` + Vars *PostTransactionScriptVars `json:"vars,omitempty"` +} + +func (o *PostTransactionScript) GetPlain() string { + if o == nil { + return "" + } + return o.Plain +} + +func (o *PostTransactionScript) GetVars() *PostTransactionScriptVars { + if o == nil { + return nil + } + return o.Vars } type PostTransaction struct { @@ -16,3 +36,49 @@ type PostTransaction struct { Script *PostTransactionScript `json:"script,omitempty"` Timestamp *time.Time `json:"timestamp,omitempty"` } + +func (p PostTransaction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PostTransaction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PostTransaction) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *PostTransaction) GetPostings() []Posting { + if o == nil { + return nil + } + return o.Postings +} + +func (o *PostTransaction) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *PostTransaction) GetScript() *PostTransactionScript { + if o == nil { + return nil + } + return o.Script +} + +func (o *PostTransaction) GetTimestamp() *time.Time { + if o == nil { + return nil + } + return o.Timestamp +} diff --git a/pkg/models/shared/query.go b/pkg/models/shared/query.go index c2c9bae..1fab22b 100755 --- a/pkg/models/shared/query.go +++ b/pkg/models/shared/query.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Query struct { @@ -10,3 +12,59 @@ type Query struct { Target *string `json:"target,omitempty"` Terms []string `json:"terms,omitempty"` } + +func (o *Query) GetAfter() []string { + if o == nil { + return nil + } + return o.After +} + +func (o *Query) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *Query) GetLedgers() []string { + if o == nil { + return nil + } + return o.Ledgers +} + +func (o *Query) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *Query) GetPolicy() *string { + if o == nil { + return nil + } + return o.Policy +} + +func (o *Query) GetSort() *string { + if o == nil { + return nil + } + return o.Sort +} + +func (o *Query) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *Query) GetTerms() []string { + if o == nil { + return nil + } + return o.Terms +} diff --git a/pkg/models/shared/readclientresponse.go b/pkg/models/shared/readclientresponse.go index e21341e..78e7ca6 100755 --- a/pkg/models/shared/readclientresponse.go +++ b/pkg/models/shared/readclientresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ReadClientResponse struct { Data *Client `json:"data,omitempty"` } + +func (o *ReadClientResponse) GetData() *Client { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/readscoperesponse.go b/pkg/models/shared/readscoperesponse.go index f7eeb4f..4949a88 100755 --- a/pkg/models/shared/readscoperesponse.go +++ b/pkg/models/shared/readscoperesponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ReadScopeResponse struct { Data *Scope `json:"data,omitempty"` } + +func (o *ReadScopeResponse) GetData() *Scope { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/readuserresponse.go b/pkg/models/shared/readuserresponse.go index a8944fb..fb511a2 100755 --- a/pkg/models/shared/readuserresponse.go +++ b/pkg/models/shared/readuserresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ReadUserResponse struct { Data *User `json:"data,omitempty"` } + +func (o *ReadUserResponse) GetData() *User { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/response.go b/pkg/models/shared/response.go index 77a8329..e53ef9d 100755 --- a/pkg/models/shared/response.go +++ b/pkg/models/shared/response.go @@ -1,20 +1,100 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +type ResponseCursorData struct { +} + type ResponseCursorTotal struct { Relation *string `json:"relation,omitempty"` Value *int64 `json:"value,omitempty"` } +func (o *ResponseCursorTotal) GetRelation() *string { + if o == nil { + return nil + } + return o.Relation +} + +func (o *ResponseCursorTotal) GetValue() *int64 { + if o == nil { + return nil + } + return o.Value +} + type ResponseCursor struct { - Data []map[string]interface{} `json:"data,omitempty"` - HasMore *bool `json:"hasMore,omitempty"` - Next *string `json:"next,omitempty"` - PageSize *int64 `json:"pageSize,omitempty"` - Previous *string `json:"previous,omitempty"` - Total *ResponseCursorTotal `json:"total,omitempty"` + Data []ResponseCursorData `json:"data,omitempty"` + HasMore *bool `json:"hasMore,omitempty"` + Next *string `json:"next,omitempty"` + PageSize *int64 `json:"pageSize,omitempty"` + Previous *string `json:"previous,omitempty"` + Total *ResponseCursorTotal `json:"total,omitempty"` +} + +func (o *ResponseCursor) GetData() []ResponseCursorData { + if o == nil { + return nil + } + return o.Data +} + +func (o *ResponseCursor) GetHasMore() *bool { + if o == nil { + return nil + } + return o.HasMore +} + +func (o *ResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ResponseCursor) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *ResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + +func (o *ResponseCursor) GetTotal() *ResponseCursorTotal { + if o == nil { + return nil + } + return o.Total +} + +// ResponseData - The payload +type ResponseData struct { } type Response struct { - Cursor *ResponseCursor `json:"cursor,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` + Cursor *ResponseCursor `json:"cursor,omitempty"` + // The payload + Data *ResponseData `json:"data,omitempty"` +} + +func (o *Response) GetCursor() *ResponseCursor { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *Response) GetData() *ResponseData { + if o == nil { + return nil + } + return o.Data } diff --git a/pkg/models/shared/runworkflowresponse.go b/pkg/models/shared/runworkflowresponse.go index f650660..788cfa5 100755 --- a/pkg/models/shared/runworkflowresponse.go +++ b/pkg/models/shared/runworkflowresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type RunWorkflowResponse struct { Data WorkflowOccurrence `json:"data"` } + +func (o *RunWorkflowResponse) GetData() WorkflowOccurrence { + if o == nil { + return WorkflowOccurrence{} + } + return o.Data +} diff --git a/pkg/models/shared/scope.go b/pkg/models/shared/scope.go index e1df4b7..5e0e45b 100755 --- a/pkg/models/shared/scope.go +++ b/pkg/models/shared/scope.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Scope struct { @@ -6,3 +8,31 @@ type Scope struct { Metadata map[string]interface{} `json:"metadata,omitempty"` Transient []string `json:"transient,omitempty"` } + +func (o *Scope) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Scope) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *Scope) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Scope) GetTransient() []string { + if o == nil { + return nil + } + return o.Transient +} diff --git a/pkg/models/shared/script.go b/pkg/models/shared/script.go index b31b83f..ec4481c 100755 --- a/pkg/models/shared/script.go +++ b/pkg/models/shared/script.go @@ -1,8 +1,42 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +type ScriptVars struct { +} + type Script struct { - Metadata map[string]interface{} `json:"metadata,omitempty"` - Plain string `json:"plain"` - Reference *string `json:"reference,omitempty"` - Vars map[string]interface{} `json:"vars,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Plain string `json:"plain"` + // Reference to attach to the generated transaction + Reference *string `json:"reference,omitempty"` + Vars *ScriptVars `json:"vars,omitempty"` +} + +func (o *Script) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Script) GetPlain() string { + if o == nil { + return "" + } + return o.Plain +} + +func (o *Script) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *Script) GetVars() *ScriptVars { + if o == nil { + return nil + } + return o.Vars } diff --git a/pkg/models/shared/scriptresponse.go b/pkg/models/shared/scriptresponse.go index bdc344a..caa8c82 100755 --- a/pkg/models/shared/scriptresponse.go +++ b/pkg/models/shared/scriptresponse.go @@ -1,8 +1,38 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ScriptResponse struct { - Details *string `json:"details,omitempty"` - ErrorCode *ErrorsEnumEnum `json:"errorCode,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - Transaction *Transaction `json:"transaction,omitempty"` + Details *string `json:"details,omitempty"` + ErrorCode *ErrorsEnum `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + Transaction *Transaction `json:"transaction,omitempty"` +} + +func (o *ScriptResponse) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *ScriptResponse) GetErrorCode() *ErrorsEnum { + if o == nil { + return nil + } + return o.ErrorCode +} + +func (o *ScriptResponse) GetErrorMessage() *string { + if o == nil { + return nil + } + return o.ErrorMessage +} + +func (o *ScriptResponse) GetTransaction() *Transaction { + if o == nil { + return nil + } + return o.Transaction } diff --git a/pkg/models/shared/secret.go b/pkg/models/shared/secret.go index 09486e8..ed84caf 100755 --- a/pkg/models/shared/secret.go +++ b/pkg/models/shared/secret.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Secret struct { @@ -7,3 +9,38 @@ type Secret struct { Metadata map[string]interface{} `json:"metadata,omitempty"` Name string `json:"name"` } + +func (o *Secret) GetClear() string { + if o == nil { + return "" + } + return o.Clear +} + +func (o *Secret) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Secret) GetLastDigits() string { + if o == nil { + return "" + } + return o.LastDigits +} + +func (o *Secret) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Secret) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/pkg/models/shared/security.go b/pkg/models/shared/security.go index 831cc4c..c7f8f6d 100755 --- a/pkg/models/shared/security.go +++ b/pkg/models/shared/security.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Security struct { Authorization string `security:"scheme,type=oauth2,name=Authorization"` } + +func (o *Security) GetAuthorization() string { + if o == nil { + return "" + } + return o.Authorization +} diff --git a/pkg/models/shared/serverinfo.go b/pkg/models/shared/serverinfo.go index 5aa829f..2ce1c10 100755 --- a/pkg/models/shared/serverinfo.go +++ b/pkg/models/shared/serverinfo.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type ServerInfo struct { Version string `json:"version"` } + +func (o *ServerInfo) GetVersion() string { + if o == nil { + return "" + } + return o.Version +} diff --git a/pkg/models/shared/stagestatus.go b/pkg/models/shared/stagestatus.go index fb961fb..ae232c5 100755 --- a/pkg/models/shared/stagestatus.go +++ b/pkg/models/shared/stagestatus.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -11,3 +14,49 @@ type StageStatus struct { StartedAt time.Time `json:"startedAt"` TerminatedAt *time.Time `json:"terminatedAt,omitempty"` } + +func (s StageStatus) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *StageStatus) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *StageStatus) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +func (o *StageStatus) GetOccurrenceID() string { + if o == nil { + return "" + } + return o.OccurrenceID +} + +func (o *StageStatus) GetStage() float64 { + if o == nil { + return 0.0 + } + return o.Stage +} + +func (o *StageStatus) GetStartedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.StartedAt +} + +func (o *StageStatus) GetTerminatedAt() *time.Time { + if o == nil { + return nil + } + return o.TerminatedAt +} diff --git a/pkg/models/shared/stats.go b/pkg/models/shared/stats.go index 3159d11..700e240 100755 --- a/pkg/models/shared/stats.go +++ b/pkg/models/shared/stats.go @@ -1,6 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Stats struct { Accounts int64 `json:"accounts"` Transactions int64 `json:"transactions"` } + +func (o *Stats) GetAccounts() int64 { + if o == nil { + return 0 + } + return o.Accounts +} + +func (o *Stats) GetTransactions() int64 { + if o == nil { + return 0 + } + return o.Transactions +} diff --git a/pkg/models/shared/statsresponse.go b/pkg/models/shared/statsresponse.go index 22beb4b..55a24a6 100755 --- a/pkg/models/shared/statsresponse.go +++ b/pkg/models/shared/statsresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type StatsResponse struct { Data Stats `json:"data"` } + +func (o *StatsResponse) GetData() Stats { + if o == nil { + return Stats{} + } + return o.Data +} diff --git a/pkg/models/shared/stripeconfig.go b/pkg/models/shared/stripeconfig.go index 3d2d738..60e0315 100755 --- a/pkg/models/shared/stripeconfig.go +++ b/pkg/models/shared/stripeconfig.go @@ -1,7 +1,49 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" +) + type StripeConfig struct { - APIKey string `json:"apiKey"` - PageSize *int64 `json:"pageSize,omitempty"` - PollingPeriod *string `json:"pollingPeriod,omitempty"` + APIKey string `json:"apiKey"` + // Number of BalanceTransaction to fetch at each polling interval. + // + PageSize *int64 `default:"10" json:"pageSize"` + // The frequency at which the connector will try to fetch new BalanceTransaction objects from Stripe API. + // + PollingPeriod *string `default:"120s" json:"pollingPeriod"` +} + +func (s StripeConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *StripeConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { + return err + } + return nil +} + +func (o *StripeConfig) GetAPIKey() string { + if o == nil { + return "" + } + return o.APIKey +} + +func (o *StripeConfig) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *StripeConfig) GetPollingPeriod() *string { + if o == nil { + return nil + } + return o.PollingPeriod } diff --git a/pkg/models/shared/stripetransferrequest.go b/pkg/models/shared/stripetransferrequest.go index c0ed5e6..7a11a20 100755 --- a/pkg/models/shared/stripetransferrequest.go +++ b/pkg/models/shared/stripetransferrequest.go @@ -1,8 +1,46 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +// StripeTransferRequestMetadata - A set of key/value pairs that you can attach to a transfer object. +// It can be useful for storing additional information about the transfer in a structured format. +type StripeTransferRequestMetadata struct { +} + type StripeTransferRequest struct { - Amount *int64 `json:"amount,omitempty"` - Asset *string `json:"asset,omitempty"` - Destination *string `json:"destination,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` + Amount *int64 `json:"amount,omitempty"` + Asset *string `json:"asset,omitempty"` + Destination *string `json:"destination,omitempty"` + // A set of key/value pairs that you can attach to a transfer object. + // It can be useful for storing additional information about the transfer in a structured format. + // + Metadata *StripeTransferRequestMetadata `json:"metadata,omitempty"` +} + +func (o *StripeTransferRequest) GetAmount() *int64 { + if o == nil { + return nil + } + return o.Amount +} + +func (o *StripeTransferRequest) GetAsset() *string { + if o == nil { + return nil + } + return o.Asset +} + +func (o *StripeTransferRequest) GetDestination() *string { + if o == nil { + return nil + } + return o.Destination +} + +func (o *StripeTransferRequest) GetMetadata() *StripeTransferRequestMetadata { + if o == nil { + return nil + } + return o.Metadata } diff --git a/pkg/models/shared/stripetransferresponse.go b/pkg/models/shared/stripetransferresponse.go new file mode 100755 index 0000000..814ee25 --- /dev/null +++ b/pkg/models/shared/stripetransferresponse.go @@ -0,0 +1,6 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type StripeTransferResponse struct { +} diff --git a/pkg/models/shared/subject.go b/pkg/models/shared/subject.go new file mode 100755 index 0000000..64f172e --- /dev/null +++ b/pkg/models/shared/subject.go @@ -0,0 +1,93 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "errors" + "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" +) + +type SubjectType string + +const ( + SubjectTypeAccount SubjectType = "ACCOUNT" + SubjectTypeWallet SubjectType = "WALLET" +) + +type Subject struct { + LedgerAccountSubject *LedgerAccountSubject + WalletSubject *WalletSubject + + Type SubjectType +} + +func CreateSubjectAccount(account LedgerAccountSubject) Subject { + typ := SubjectTypeAccount + typStr := string(typ) + account.Type = typStr + + return Subject{ + LedgerAccountSubject: &account, + Type: typ, + } +} + +func CreateSubjectWallet(wallet WalletSubject) Subject { + typ := SubjectTypeWallet + typStr := string(typ) + wallet.Type = typStr + + return Subject{ + WalletSubject: &wallet, + Type: typ, + } +} + +func (u *Subject) UnmarshalJSON(data []byte) error { + + type discriminator struct { + Type string + } + + dis := new(discriminator) + if err := json.Unmarshal(data, &dis); err != nil { + return fmt.Errorf("could not unmarshal discriminator: %w", err) + } + + switch dis.Type { + case "ACCOUNT": + ledgerAccountSubject := new(LedgerAccountSubject) + if err := utils.UnmarshalJSON(data, &ledgerAccountSubject, "", true, true); err != nil { + return fmt.Errorf("could not unmarshal expected type: %w", err) + } + + u.LedgerAccountSubject = ledgerAccountSubject + u.Type = SubjectTypeAccount + return nil + case "WALLET": + walletSubject := new(WalletSubject) + if err := utils.UnmarshalJSON(data, &walletSubject, "", true, true); err != nil { + return fmt.Errorf("could not unmarshal expected type: %w", err) + } + + u.WalletSubject = walletSubject + u.Type = SubjectTypeWallet + return nil + } + + return errors.New("could not unmarshal into supported union types") +} + +func (u Subject) MarshalJSON() ([]byte, error) { + if u.LedgerAccountSubject != nil { + return utils.MarshalJSON(u.LedgerAccountSubject, "", true) + } + + if u.WalletSubject != nil { + return utils.MarshalJSON(u.WalletSubject, "", true) + } + + return nil, errors.New("could not marshal union type: all fields are null") +} diff --git a/pkg/models/shared/taskbankingcircle.go b/pkg/models/shared/taskbankingcircle.go index 8216dbb..b016531 100755 --- a/pkg/models/shared/taskbankingcircle.go +++ b/pkg/models/shared/taskbankingcircle.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -9,13 +12,97 @@ type TaskBankingCircleDescriptor struct { Name *string `json:"name,omitempty"` } +func (o *TaskBankingCircleDescriptor) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *TaskBankingCircleDescriptor) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +type TaskBankingCircleState struct { +} + type TaskBankingCircle struct { ConnectorID string `json:"connectorId"` CreatedAt time.Time `json:"createdAt"` Descriptor TaskBankingCircleDescriptor `json:"descriptor"` Error *string `json:"error,omitempty"` ID string `json:"id"` - State map[string]interface{} `json:"state"` - Status PaymentStatusEnum `json:"status"` + State TaskBankingCircleState `json:"state"` + Status PaymentStatus `json:"status"` UpdatedAt time.Time `json:"updatedAt"` } + +func (t TaskBankingCircle) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskBankingCircle) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, true); err != nil { + return err + } + return nil +} + +func (o *TaskBankingCircle) GetConnectorID() string { + if o == nil { + return "" + } + return o.ConnectorID +} + +func (o *TaskBankingCircle) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *TaskBankingCircle) GetDescriptor() TaskBankingCircleDescriptor { + if o == nil { + return TaskBankingCircleDescriptor{} + } + return o.Descriptor +} + +func (o *TaskBankingCircle) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +func (o *TaskBankingCircle) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TaskBankingCircle) GetState() TaskBankingCircleState { + if o == nil { + return TaskBankingCircleState{} + } + return o.State +} + +func (o *TaskBankingCircle) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status +} + +func (o *TaskBankingCircle) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} diff --git a/pkg/models/shared/taskcurrencycloud.go b/pkg/models/shared/taskcurrencycloud.go index ac36e75..4701a11 100755 --- a/pkg/models/shared/taskcurrencycloud.go +++ b/pkg/models/shared/taskcurrencycloud.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -8,13 +11,90 @@ type TaskCurrencyCloudDescriptor struct { Name *string `json:"name,omitempty"` } +func (o *TaskCurrencyCloudDescriptor) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +type TaskCurrencyCloudState struct { +} + type TaskCurrencyCloud struct { ConnectorID string `json:"connectorId"` CreatedAt time.Time `json:"createdAt"` Descriptor TaskCurrencyCloudDescriptor `json:"descriptor"` Error *string `json:"error,omitempty"` ID string `json:"id"` - State map[string]interface{} `json:"state"` - Status PaymentStatusEnum `json:"status"` + State TaskCurrencyCloudState `json:"state"` + Status PaymentStatus `json:"status"` UpdatedAt time.Time `json:"updatedAt"` } + +func (t TaskCurrencyCloud) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskCurrencyCloud) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, true); err != nil { + return err + } + return nil +} + +func (o *TaskCurrencyCloud) GetConnectorID() string { + if o == nil { + return "" + } + return o.ConnectorID +} + +func (o *TaskCurrencyCloud) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *TaskCurrencyCloud) GetDescriptor() TaskCurrencyCloudDescriptor { + if o == nil { + return TaskCurrencyCloudDescriptor{} + } + return o.Descriptor +} + +func (o *TaskCurrencyCloud) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +func (o *TaskCurrencyCloud) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TaskCurrencyCloud) GetState() TaskCurrencyCloudState { + if o == nil { + return TaskCurrencyCloudState{} + } + return o.State +} + +func (o *TaskCurrencyCloud) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status +} + +func (o *TaskCurrencyCloud) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} diff --git a/pkg/models/shared/taskdummypay.go b/pkg/models/shared/taskdummypay.go index 5d4f283..441e57c 100755 --- a/pkg/models/shared/taskdummypay.go +++ b/pkg/models/shared/taskdummypay.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -10,13 +13,104 @@ type TaskDummyPayDescriptor struct { Name *string `json:"name,omitempty"` } +func (o *TaskDummyPayDescriptor) GetFileName() *string { + if o == nil { + return nil + } + return o.FileName +} + +func (o *TaskDummyPayDescriptor) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *TaskDummyPayDescriptor) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +type TaskDummyPayState struct { +} + type TaskDummyPay struct { ConnectorID string `json:"connectorId"` CreatedAt time.Time `json:"createdAt"` Descriptor TaskDummyPayDescriptor `json:"descriptor"` Error *string `json:"error,omitempty"` ID string `json:"id"` - State map[string]interface{} `json:"state"` - Status PaymentStatusEnum `json:"status"` + State TaskDummyPayState `json:"state"` + Status PaymentStatus `json:"status"` UpdatedAt time.Time `json:"updatedAt"` } + +func (t TaskDummyPay) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskDummyPay) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, true); err != nil { + return err + } + return nil +} + +func (o *TaskDummyPay) GetConnectorID() string { + if o == nil { + return "" + } + return o.ConnectorID +} + +func (o *TaskDummyPay) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *TaskDummyPay) GetDescriptor() TaskDummyPayDescriptor { + if o == nil { + return TaskDummyPayDescriptor{} + } + return o.Descriptor +} + +func (o *TaskDummyPay) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +func (o *TaskDummyPay) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TaskDummyPay) GetState() TaskDummyPayState { + if o == nil { + return TaskDummyPayState{} + } + return o.State +} + +func (o *TaskDummyPay) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status +} + +func (o *TaskDummyPay) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} diff --git a/pkg/models/shared/taskmodulr.go b/pkg/models/shared/taskmodulr.go index 3d2bfc4..a5af3db 100755 --- a/pkg/models/shared/taskmodulr.go +++ b/pkg/models/shared/taskmodulr.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -10,13 +13,104 @@ type TaskModulrDescriptor struct { Name *string `json:"name,omitempty"` } +func (o *TaskModulrDescriptor) GetAccountID() *string { + if o == nil { + return nil + } + return o.AccountID +} + +func (o *TaskModulrDescriptor) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *TaskModulrDescriptor) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +type TaskModulrState struct { +} + type TaskModulr struct { - ConnectorID string `json:"connectorId"` - CreatedAt time.Time `json:"createdAt"` - Descriptor TaskModulrDescriptor `json:"descriptor"` - Error *string `json:"error,omitempty"` - ID string `json:"id"` - State map[string]interface{} `json:"state"` - Status PaymentStatusEnum `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` + ConnectorID string `json:"connectorId"` + CreatedAt time.Time `json:"createdAt"` + Descriptor TaskModulrDescriptor `json:"descriptor"` + Error *string `json:"error,omitempty"` + ID string `json:"id"` + State TaskModulrState `json:"state"` + Status PaymentStatus `json:"status"` + UpdatedAt time.Time `json:"updatedAt"` +} + +func (t TaskModulr) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskModulr) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, true); err != nil { + return err + } + return nil +} + +func (o *TaskModulr) GetConnectorID() string { + if o == nil { + return "" + } + return o.ConnectorID +} + +func (o *TaskModulr) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *TaskModulr) GetDescriptor() TaskModulrDescriptor { + if o == nil { + return TaskModulrDescriptor{} + } + return o.Descriptor +} + +func (o *TaskModulr) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +func (o *TaskModulr) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TaskModulr) GetState() TaskModulrState { + if o == nil { + return TaskModulrState{} + } + return o.State +} + +func (o *TaskModulr) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status +} + +func (o *TaskModulr) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt } diff --git a/pkg/models/shared/taskresponse.go b/pkg/models/shared/taskresponse.go index 743a2e0..d11912e 100755 --- a/pkg/models/shared/taskresponse.go +++ b/pkg/models/shared/taskresponse.go @@ -1,5 +1,170 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +import ( + "errors" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" +) + +type TaskResponseDataType string + +const ( + TaskResponseDataTypeTaskStripe TaskResponseDataType = "TaskStripe" + TaskResponseDataTypeTaskWise TaskResponseDataType = "TaskWise" + TaskResponseDataTypeTaskCurrencyCloud TaskResponseDataType = "TaskCurrencyCloud" + TaskResponseDataTypeTaskDummyPay TaskResponseDataType = "TaskDummyPay" + TaskResponseDataTypeTaskModulr TaskResponseDataType = "TaskModulr" + TaskResponseDataTypeTaskBankingCircle TaskResponseDataType = "TaskBankingCircle" +) + +type TaskResponseData struct { + TaskStripe *TaskStripe + TaskWise *TaskWise + TaskCurrencyCloud *TaskCurrencyCloud + TaskDummyPay *TaskDummyPay + TaskModulr *TaskModulr + TaskBankingCircle *TaskBankingCircle + + Type TaskResponseDataType +} + +func CreateTaskResponseDataTaskStripe(taskStripe TaskStripe) TaskResponseData { + typ := TaskResponseDataTypeTaskStripe + + return TaskResponseData{ + TaskStripe: &taskStripe, + Type: typ, + } +} + +func CreateTaskResponseDataTaskWise(taskWise TaskWise) TaskResponseData { + typ := TaskResponseDataTypeTaskWise + + return TaskResponseData{ + TaskWise: &taskWise, + Type: typ, + } +} + +func CreateTaskResponseDataTaskCurrencyCloud(taskCurrencyCloud TaskCurrencyCloud) TaskResponseData { + typ := TaskResponseDataTypeTaskCurrencyCloud + + return TaskResponseData{ + TaskCurrencyCloud: &taskCurrencyCloud, + Type: typ, + } +} + +func CreateTaskResponseDataTaskDummyPay(taskDummyPay TaskDummyPay) TaskResponseData { + typ := TaskResponseDataTypeTaskDummyPay + + return TaskResponseData{ + TaskDummyPay: &taskDummyPay, + Type: typ, + } +} + +func CreateTaskResponseDataTaskModulr(taskModulr TaskModulr) TaskResponseData { + typ := TaskResponseDataTypeTaskModulr + + return TaskResponseData{ + TaskModulr: &taskModulr, + Type: typ, + } +} + +func CreateTaskResponseDataTaskBankingCircle(taskBankingCircle TaskBankingCircle) TaskResponseData { + typ := TaskResponseDataTypeTaskBankingCircle + + return TaskResponseData{ + TaskBankingCircle: &taskBankingCircle, + Type: typ, + } +} + +func (u *TaskResponseData) UnmarshalJSON(data []byte) error { + + taskStripe := TaskStripe{} + if err := utils.UnmarshalJSON(data, &taskStripe, "", true, true); err == nil { + u.TaskStripe = &taskStripe + u.Type = TaskResponseDataTypeTaskStripe + return nil + } + + taskWise := TaskWise{} + if err := utils.UnmarshalJSON(data, &taskWise, "", true, true); err == nil { + u.TaskWise = &taskWise + u.Type = TaskResponseDataTypeTaskWise + return nil + } + + taskCurrencyCloud := TaskCurrencyCloud{} + if err := utils.UnmarshalJSON(data, &taskCurrencyCloud, "", true, true); err == nil { + u.TaskCurrencyCloud = &taskCurrencyCloud + u.Type = TaskResponseDataTypeTaskCurrencyCloud + return nil + } + + taskDummyPay := TaskDummyPay{} + if err := utils.UnmarshalJSON(data, &taskDummyPay, "", true, true); err == nil { + u.TaskDummyPay = &taskDummyPay + u.Type = TaskResponseDataTypeTaskDummyPay + return nil + } + + taskModulr := TaskModulr{} + if err := utils.UnmarshalJSON(data, &taskModulr, "", true, true); err == nil { + u.TaskModulr = &taskModulr + u.Type = TaskResponseDataTypeTaskModulr + return nil + } + + taskBankingCircle := TaskBankingCircle{} + if err := utils.UnmarshalJSON(data, &taskBankingCircle, "", true, true); err == nil { + u.TaskBankingCircle = &taskBankingCircle + u.Type = TaskResponseDataTypeTaskBankingCircle + return nil + } + + return errors.New("could not unmarshal into supported union types") +} + +func (u TaskResponseData) MarshalJSON() ([]byte, error) { + if u.TaskStripe != nil { + return utils.MarshalJSON(u.TaskStripe, "", true) + } + + if u.TaskWise != nil { + return utils.MarshalJSON(u.TaskWise, "", true) + } + + if u.TaskCurrencyCloud != nil { + return utils.MarshalJSON(u.TaskCurrencyCloud, "", true) + } + + if u.TaskDummyPay != nil { + return utils.MarshalJSON(u.TaskDummyPay, "", true) + } + + if u.TaskModulr != nil { + return utils.MarshalJSON(u.TaskModulr, "", true) + } + + if u.TaskBankingCircle != nil { + return utils.MarshalJSON(u.TaskBankingCircle, "", true) + } + + return nil, errors.New("could not marshal union type: all fields are null") +} + type TaskResponse struct { - Data interface{} `json:"data"` + Data TaskResponseData `json:"data"` +} + +func (o *TaskResponse) GetData() TaskResponseData { + if o == nil { + return TaskResponseData{} + } + return o.Data } diff --git a/pkg/models/shared/taskscursor.go b/pkg/models/shared/taskscursor.go index f7b66df..ab85946 100755 --- a/pkg/models/shared/taskscursor.go +++ b/pkg/models/shared/taskscursor.go @@ -1,13 +1,213 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared +import ( + "errors" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" +) + +type TasksCursorCursorDataType string + +const ( + TasksCursorCursorDataTypeTaskStripe TasksCursorCursorDataType = "TaskStripe" + TasksCursorCursorDataTypeTaskWise TasksCursorCursorDataType = "TaskWise" + TasksCursorCursorDataTypeTaskCurrencyCloud TasksCursorCursorDataType = "TaskCurrencyCloud" + TasksCursorCursorDataTypeTaskDummyPay TasksCursorCursorDataType = "TaskDummyPay" + TasksCursorCursorDataTypeTaskModulr TasksCursorCursorDataType = "TaskModulr" + TasksCursorCursorDataTypeTaskBankingCircle TasksCursorCursorDataType = "TaskBankingCircle" +) + +type TasksCursorCursorData struct { + TaskStripe *TaskStripe + TaskWise *TaskWise + TaskCurrencyCloud *TaskCurrencyCloud + TaskDummyPay *TaskDummyPay + TaskModulr *TaskModulr + TaskBankingCircle *TaskBankingCircle + + Type TasksCursorCursorDataType +} + +func CreateTasksCursorCursorDataTaskStripe(taskStripe TaskStripe) TasksCursorCursorData { + typ := TasksCursorCursorDataTypeTaskStripe + + return TasksCursorCursorData{ + TaskStripe: &taskStripe, + Type: typ, + } +} + +func CreateTasksCursorCursorDataTaskWise(taskWise TaskWise) TasksCursorCursorData { + typ := TasksCursorCursorDataTypeTaskWise + + return TasksCursorCursorData{ + TaskWise: &taskWise, + Type: typ, + } +} + +func CreateTasksCursorCursorDataTaskCurrencyCloud(taskCurrencyCloud TaskCurrencyCloud) TasksCursorCursorData { + typ := TasksCursorCursorDataTypeTaskCurrencyCloud + + return TasksCursorCursorData{ + TaskCurrencyCloud: &taskCurrencyCloud, + Type: typ, + } +} + +func CreateTasksCursorCursorDataTaskDummyPay(taskDummyPay TaskDummyPay) TasksCursorCursorData { + typ := TasksCursorCursorDataTypeTaskDummyPay + + return TasksCursorCursorData{ + TaskDummyPay: &taskDummyPay, + Type: typ, + } +} + +func CreateTasksCursorCursorDataTaskModulr(taskModulr TaskModulr) TasksCursorCursorData { + typ := TasksCursorCursorDataTypeTaskModulr + + return TasksCursorCursorData{ + TaskModulr: &taskModulr, + Type: typ, + } +} + +func CreateTasksCursorCursorDataTaskBankingCircle(taskBankingCircle TaskBankingCircle) TasksCursorCursorData { + typ := TasksCursorCursorDataTypeTaskBankingCircle + + return TasksCursorCursorData{ + TaskBankingCircle: &taskBankingCircle, + Type: typ, + } +} + +func (u *TasksCursorCursorData) UnmarshalJSON(data []byte) error { + + taskStripe := TaskStripe{} + if err := utils.UnmarshalJSON(data, &taskStripe, "", true, true); err == nil { + u.TaskStripe = &taskStripe + u.Type = TasksCursorCursorDataTypeTaskStripe + return nil + } + + taskWise := TaskWise{} + if err := utils.UnmarshalJSON(data, &taskWise, "", true, true); err == nil { + u.TaskWise = &taskWise + u.Type = TasksCursorCursorDataTypeTaskWise + return nil + } + + taskCurrencyCloud := TaskCurrencyCloud{} + if err := utils.UnmarshalJSON(data, &taskCurrencyCloud, "", true, true); err == nil { + u.TaskCurrencyCloud = &taskCurrencyCloud + u.Type = TasksCursorCursorDataTypeTaskCurrencyCloud + return nil + } + + taskDummyPay := TaskDummyPay{} + if err := utils.UnmarshalJSON(data, &taskDummyPay, "", true, true); err == nil { + u.TaskDummyPay = &taskDummyPay + u.Type = TasksCursorCursorDataTypeTaskDummyPay + return nil + } + + taskModulr := TaskModulr{} + if err := utils.UnmarshalJSON(data, &taskModulr, "", true, true); err == nil { + u.TaskModulr = &taskModulr + u.Type = TasksCursorCursorDataTypeTaskModulr + return nil + } + + taskBankingCircle := TaskBankingCircle{} + if err := utils.UnmarshalJSON(data, &taskBankingCircle, "", true, true); err == nil { + u.TaskBankingCircle = &taskBankingCircle + u.Type = TasksCursorCursorDataTypeTaskBankingCircle + return nil + } + + return errors.New("could not unmarshal into supported union types") +} + +func (u TasksCursorCursorData) MarshalJSON() ([]byte, error) { + if u.TaskStripe != nil { + return utils.MarshalJSON(u.TaskStripe, "", true) + } + + if u.TaskWise != nil { + return utils.MarshalJSON(u.TaskWise, "", true) + } + + if u.TaskCurrencyCloud != nil { + return utils.MarshalJSON(u.TaskCurrencyCloud, "", true) + } + + if u.TaskDummyPay != nil { + return utils.MarshalJSON(u.TaskDummyPay, "", true) + } + + if u.TaskModulr != nil { + return utils.MarshalJSON(u.TaskModulr, "", true) + } + + if u.TaskBankingCircle != nil { + return utils.MarshalJSON(u.TaskBankingCircle, "", true) + } + + return nil, errors.New("could not marshal union type: all fields are null") +} + type TasksCursorCursor struct { - Data []interface{} `json:"data"` - HasMore bool `json:"hasMore"` - Next *string `json:"next,omitempty"` - PageSize int64 `json:"pageSize"` - Previous *string `json:"previous,omitempty"` + Data []TasksCursorCursorData `json:"data"` + HasMore bool `json:"hasMore"` + Next *string `json:"next,omitempty"` + PageSize int64 `json:"pageSize"` + Previous *string `json:"previous,omitempty"` +} + +func (o *TasksCursorCursor) GetData() []TasksCursorCursorData { + if o == nil { + return []TasksCursorCursorData{} + } + return o.Data +} + +func (o *TasksCursorCursor) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *TasksCursorCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *TasksCursorCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *TasksCursorCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous } type TasksCursor struct { Cursor TasksCursorCursor `json:"cursor"` } + +func (o *TasksCursor) GetCursor() TasksCursorCursor { + if o == nil { + return TasksCursorCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/taskstripe.go b/pkg/models/shared/taskstripe.go index 56b9034..b6bf77b 100755 --- a/pkg/models/shared/taskstripe.go +++ b/pkg/models/shared/taskstripe.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -10,13 +13,104 @@ type TaskStripeDescriptor struct { Name string `json:"name"` } +func (o *TaskStripeDescriptor) GetAccount() string { + if o == nil { + return "" + } + return o.Account +} + +func (o *TaskStripeDescriptor) GetMain() *bool { + if o == nil { + return nil + } + return o.Main +} + +func (o *TaskStripeDescriptor) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +type TaskStripeState struct { +} + type TaskStripe struct { - ConnectorID string `json:"connectorId"` - CreatedAt time.Time `json:"createdAt"` - Descriptor TaskStripeDescriptor `json:"descriptor"` - Error *string `json:"error,omitempty"` - ID string `json:"id"` - State map[string]interface{} `json:"state"` - Status PaymentStatusEnum `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` + ConnectorID string `json:"connectorId"` + CreatedAt time.Time `json:"createdAt"` + Descriptor TaskStripeDescriptor `json:"descriptor"` + Error *string `json:"error,omitempty"` + ID string `json:"id"` + State TaskStripeState `json:"state"` + Status PaymentStatus `json:"status"` + UpdatedAt time.Time `json:"updatedAt"` +} + +func (t TaskStripe) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskStripe) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, true); err != nil { + return err + } + return nil +} + +func (o *TaskStripe) GetConnectorID() string { + if o == nil { + return "" + } + return o.ConnectorID +} + +func (o *TaskStripe) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *TaskStripe) GetDescriptor() TaskStripeDescriptor { + if o == nil { + return TaskStripeDescriptor{} + } + return o.Descriptor +} + +func (o *TaskStripe) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +func (o *TaskStripe) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TaskStripe) GetState() TaskStripeState { + if o == nil { + return TaskStripeState{} + } + return o.State +} + +func (o *TaskStripe) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status +} + +func (o *TaskStripe) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt } diff --git a/pkg/models/shared/taskwise.go b/pkg/models/shared/taskwise.go index c19da74..bf00a1c 100755 --- a/pkg/models/shared/taskwise.go +++ b/pkg/models/shared/taskwise.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -10,13 +13,104 @@ type TaskWiseDescriptor struct { ProfileID *int64 `json:"profileID,omitempty"` } +func (o *TaskWiseDescriptor) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *TaskWiseDescriptor) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *TaskWiseDescriptor) GetProfileID() *int64 { + if o == nil { + return nil + } + return o.ProfileID +} + +type TaskWiseState struct { +} + type TaskWise struct { - ConnectorID string `json:"connectorId"` - CreatedAt time.Time `json:"createdAt"` - Descriptor TaskWiseDescriptor `json:"descriptor"` - Error *string `json:"error,omitempty"` - ID string `json:"id"` - State map[string]interface{} `json:"state"` - Status PaymentStatusEnum `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` + ConnectorID string `json:"connectorId"` + CreatedAt time.Time `json:"createdAt"` + Descriptor TaskWiseDescriptor `json:"descriptor"` + Error *string `json:"error,omitempty"` + ID string `json:"id"` + State TaskWiseState `json:"state"` + Status PaymentStatus `json:"status"` + UpdatedAt time.Time `json:"updatedAt"` +} + +func (t TaskWise) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskWise) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, true); err != nil { + return err + } + return nil +} + +func (o *TaskWise) GetConnectorID() string { + if o == nil { + return "" + } + return o.ConnectorID +} + +func (o *TaskWise) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *TaskWise) GetDescriptor() TaskWiseDescriptor { + if o == nil { + return TaskWiseDescriptor{} + } + return o.Descriptor +} + +func (o *TaskWise) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +func (o *TaskWise) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TaskWise) GetState() TaskWiseState { + if o == nil { + return TaskWiseState{} + } + return o.State +} + +func (o *TaskWise) GetStatus() PaymentStatus { + if o == nil { + return PaymentStatus("") + } + return o.Status +} + +func (o *TaskWise) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt } diff --git a/pkg/models/shared/transaction.go b/pkg/models/shared/transaction.go index 5633228..3fa8289 100755 --- a/pkg/models/shared/transaction.go +++ b/pkg/models/shared/transaction.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -13,3 +16,63 @@ type Transaction struct { Timestamp time.Time `json:"timestamp"` Txid int64 `json:"txid"` } + +func (t Transaction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *Transaction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Transaction) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Transaction) GetPostCommitVolumes() map[string]map[string]Volume { + if o == nil { + return nil + } + return o.PostCommitVolumes +} + +func (o *Transaction) GetPostings() []Posting { + if o == nil { + return []Posting{} + } + return o.Postings +} + +func (o *Transaction) GetPreCommitVolumes() map[string]map[string]Volume { + if o == nil { + return nil + } + return o.PreCommitVolumes +} + +func (o *Transaction) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *Transaction) GetTimestamp() time.Time { + if o == nil { + return time.Time{} + } + return o.Timestamp +} + +func (o *Transaction) GetTxid() int64 { + if o == nil { + return 0 + } + return o.Txid +} diff --git a/pkg/models/shared/transactiondata.go b/pkg/models/shared/transactiondata.go index 75b1605..9e730a5 100755 --- a/pkg/models/shared/transactiondata.go +++ b/pkg/models/shared/transactiondata.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -10,3 +13,42 @@ type TransactionData struct { Reference *string `json:"reference,omitempty"` Timestamp *time.Time `json:"timestamp,omitempty"` } + +func (t TransactionData) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TransactionData) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + +func (o *TransactionData) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *TransactionData) GetPostings() []Posting { + if o == nil { + return []Posting{} + } + return o.Postings +} + +func (o *TransactionData) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *TransactionData) GetTimestamp() *time.Time { + if o == nil { + return nil + } + return o.Timestamp +} diff --git a/pkg/models/shared/transactionresponse.go b/pkg/models/shared/transactionresponse.go index 11da333..9d2ab66 100755 --- a/pkg/models/shared/transactionresponse.go +++ b/pkg/models/shared/transactionresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type TransactionResponse struct { Data Transaction `json:"data"` } + +func (o *TransactionResponse) GetData() Transaction { + if o == nil { + return Transaction{} + } + return o.Data +} diff --git a/pkg/models/shared/transactions.go b/pkg/models/shared/transactions.go index 294d061..4fe48e4 100755 --- a/pkg/models/shared/transactions.go +++ b/pkg/models/shared/transactions.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Transactions struct { Transactions []TransactionData `json:"transactions"` } + +func (o *Transactions) GetTransactions() []TransactionData { + if o == nil { + return []TransactionData{} + } + return o.Transactions +} diff --git a/pkg/models/shared/transactionscursorresponse.go b/pkg/models/shared/transactionscursorresponse.go index 6ae0195..e9256bd 100755 --- a/pkg/models/shared/transactionscursorresponse.go +++ b/pkg/models/shared/transactionscursorresponse.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type TransactionsCursorResponseCursor struct { @@ -8,6 +10,48 @@ type TransactionsCursorResponseCursor struct { Previous *string `json:"previous,omitempty"` } +func (o *TransactionsCursorResponseCursor) GetData() []Transaction { + if o == nil { + return []Transaction{} + } + return o.Data +} + +func (o *TransactionsCursorResponseCursor) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *TransactionsCursorResponseCursor) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *TransactionsCursorResponseCursor) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *TransactionsCursorResponseCursor) GetPrevious() *string { + if o == nil { + return nil + } + return o.Previous +} + type TransactionsCursorResponse struct { Cursor TransactionsCursorResponseCursor `json:"cursor"` } + +func (o *TransactionsCursorResponse) GetCursor() TransactionsCursorResponseCursor { + if o == nil { + return TransactionsCursorResponseCursor{} + } + return o.Cursor +} diff --git a/pkg/models/shared/transactionsresponse.go b/pkg/models/shared/transactionsresponse.go index 4a17e4d..8fc288d 100755 --- a/pkg/models/shared/transactionsresponse.go +++ b/pkg/models/shared/transactionsresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type TransactionsResponse struct { Data []Transaction `json:"data"` } + +func (o *TransactionsResponse) GetData() []Transaction { + if o == nil { + return []Transaction{} + } + return o.Data +} diff --git a/pkg/models/shared/updateclientrequest.go b/pkg/models/shared/updateclientrequest.go index 3a571ad..8b0771e 100755 --- a/pkg/models/shared/updateclientrequest.go +++ b/pkg/models/shared/updateclientrequest.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type UpdateClientRequest struct { @@ -9,3 +11,52 @@ type UpdateClientRequest struct { RedirectUris []string `json:"redirectUris,omitempty"` Trusted *bool `json:"trusted,omitempty"` } + +func (o *UpdateClientRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *UpdateClientRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *UpdateClientRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateClientRequest) GetPostLogoutRedirectUris() []string { + if o == nil { + return nil + } + return o.PostLogoutRedirectUris +} + +func (o *UpdateClientRequest) GetPublic() *bool { + if o == nil { + return nil + } + return o.Public +} + +func (o *UpdateClientRequest) GetRedirectUris() []string { + if o == nil { + return nil + } + return o.RedirectUris +} + +func (o *UpdateClientRequest) GetTrusted() *bool { + if o == nil { + return nil + } + return o.Trusted +} diff --git a/pkg/models/shared/updateclientresponse.go b/pkg/models/shared/updateclientresponse.go index 80d25d4..b7c449c 100755 --- a/pkg/models/shared/updateclientresponse.go +++ b/pkg/models/shared/updateclientresponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type UpdateClientResponse struct { Data *Client `json:"data,omitempty"` } + +func (o *UpdateClientResponse) GetData() *Client { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/updatescoperequest.go b/pkg/models/shared/updatescoperequest.go index 4b28255..b299259 100755 --- a/pkg/models/shared/updatescoperequest.go +++ b/pkg/models/shared/updatescoperequest.go @@ -1,6 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type UpdateScopeRequest struct { Label string `json:"label"` Metadata map[string]interface{} `json:"metadata,omitempty"` } + +func (o *UpdateScopeRequest) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *UpdateScopeRequest) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} diff --git a/pkg/models/shared/updatescoperesponse.go b/pkg/models/shared/updatescoperesponse.go index 7c8a7f2..766faea 100755 --- a/pkg/models/shared/updatescoperesponse.go +++ b/pkg/models/shared/updatescoperesponse.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type UpdateScopeResponse struct { Data *Scope `json:"data,omitempty"` } + +func (o *UpdateScopeResponse) GetData() *Scope { + if o == nil { + return nil + } + return o.Data +} diff --git a/pkg/models/shared/user.go b/pkg/models/shared/user.go index b938207..d09b227 100755 --- a/pkg/models/shared/user.go +++ b/pkg/models/shared/user.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type User struct { @@ -5,3 +7,24 @@ type User struct { ID *string `json:"id,omitempty"` Subject *string `json:"subject,omitempty"` } + +func (o *User) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *User) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *User) GetSubject() *string { + if o == nil { + return nil + } + return o.Subject +} diff --git a/pkg/models/shared/volume.go b/pkg/models/shared/volume.go index 55dff3d..8307f51 100755 --- a/pkg/models/shared/volume.go +++ b/pkg/models/shared/volume.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type Volume struct { @@ -5,3 +7,24 @@ type Volume struct { Input int64 `json:"input"` Output int64 `json:"output"` } + +func (o *Volume) GetBalance() *int64 { + if o == nil { + return nil + } + return o.Balance +} + +func (o *Volume) GetInput() int64 { + if o == nil { + return 0 + } + return o.Input +} + +func (o *Volume) GetOutput() int64 { + if o == nil { + return 0 + } + return o.Output +} diff --git a/pkg/models/shared/wallet.go b/pkg/models/shared/wallet.go index c521632..d45f3ad 100755 --- a/pkg/models/shared/wallet.go +++ b/pkg/models/shared/wallet.go @@ -1,13 +1,64 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) type Wallet struct { - CreatedAt time.Time `json:"createdAt"` - ID string `json:"id"` - Ledger string `json:"ledger"` - Metadata map[string]interface{} `json:"metadata"` - Name string `json:"name"` + CreatedAt time.Time `json:"createdAt"` + // The unique ID of the wallet. + ID string `json:"id"` + Ledger string `json:"ledger"` + // Metadata associated with the wallet. + Metadata map[string]interface{} `json:"metadata"` + Name string `json:"name"` +} + +func (w Wallet) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *Wallet) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Wallet) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *Wallet) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Wallet) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *Wallet) GetMetadata() map[string]interface{} { + if o == nil { + return map[string]interface{}{} + } + return o.Metadata +} + +func (o *Wallet) GetName() string { + if o == nil { + return "" + } + return o.Name } diff --git a/pkg/models/shared/walletserrorresponse.go b/pkg/models/shared/walletserrorresponse.go index 5c9d268..eca6bd7 100755 --- a/pkg/models/shared/walletserrorresponse.go +++ b/pkg/models/shared/walletserrorresponse.go @@ -1,12 +1,51 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared -type WalletsErrorResponseErrorCodeEnum string +import ( + "encoding/json" + "fmt" +) + +type WalletsErrorResponseErrorCode string const ( - WalletsErrorResponseErrorCodeEnumValidation WalletsErrorResponseErrorCodeEnum = "VALIDATION" + WalletsErrorResponseErrorCodeValidation WalletsErrorResponseErrorCode = "VALIDATION" ) +func (e WalletsErrorResponseErrorCode) ToPointer() *WalletsErrorResponseErrorCode { + return &e +} + +func (e *WalletsErrorResponseErrorCode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "VALIDATION": + *e = WalletsErrorResponseErrorCode(v) + return nil + default: + return fmt.Errorf("invalid value for WalletsErrorResponseErrorCode: %v", v) + } +} + type WalletsErrorResponse struct { - ErrorCode WalletsErrorResponseErrorCodeEnum `json:"errorCode"` - ErrorMessage string `json:"errorMessage"` + ErrorCode WalletsErrorResponseErrorCode `json:"errorCode"` + ErrorMessage string `json:"errorMessage"` +} + +func (o *WalletsErrorResponse) GetErrorCode() WalletsErrorResponseErrorCode { + if o == nil { + return WalletsErrorResponseErrorCode("") + } + return o.ErrorCode +} + +func (o *WalletsErrorResponse) GetErrorMessage() string { + if o == nil { + return "" + } + return o.ErrorMessage } diff --git a/pkg/models/shared/walletstransaction.go b/pkg/models/shared/walletstransaction.go index e3bbe13..48f7664 100755 --- a/pkg/models/shared/walletstransaction.go +++ b/pkg/models/shared/walletstransaction.go @@ -1,10 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) type WalletsTransaction struct { + // Metadata associated with the wallet. Metadata map[string]interface{} `json:"metadata,omitempty"` PostCommitVolumes map[string]map[string]WalletsVolume `json:"postCommitVolumes,omitempty"` Postings []Posting `json:"postings"` @@ -13,3 +17,63 @@ type WalletsTransaction struct { Timestamp time.Time `json:"timestamp"` Txid int64 `json:"txid"` } + +func (w WalletsTransaction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WalletsTransaction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, false); err != nil { + return err + } + return nil +} + +func (o *WalletsTransaction) GetMetadata() map[string]interface{} { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *WalletsTransaction) GetPostCommitVolumes() map[string]map[string]WalletsVolume { + if o == nil { + return nil + } + return o.PostCommitVolumes +} + +func (o *WalletsTransaction) GetPostings() []Posting { + if o == nil { + return []Posting{} + } + return o.Postings +} + +func (o *WalletsTransaction) GetPreCommitVolumes() map[string]map[string]WalletsVolume { + if o == nil { + return nil + } + return o.PreCommitVolumes +} + +func (o *WalletsTransaction) GetReference() *string { + if o == nil { + return nil + } + return o.Reference +} + +func (o *WalletsTransaction) GetTimestamp() time.Time { + if o == nil { + return time.Time{} + } + return o.Timestamp +} + +func (o *WalletsTransaction) GetTxid() int64 { + if o == nil { + return 0 + } + return o.Txid +} diff --git a/pkg/models/shared/walletsubject.go b/pkg/models/shared/walletsubject.go new file mode 100755 index 0000000..b06b40b --- /dev/null +++ b/pkg/models/shared/walletsubject.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type WalletSubject struct { + Balance *string `json:"balance,omitempty"` + Identifier string `json:"identifier"` + Type string `json:"type"` +} + +func (o *WalletSubject) GetBalance() *string { + if o == nil { + return nil + } + return o.Balance +} + +func (o *WalletSubject) GetIdentifier() string { + if o == nil { + return "" + } + return o.Identifier +} + +func (o *WalletSubject) GetType() string { + if o == nil { + return "" + } + return o.Type +} diff --git a/pkg/models/shared/walletsvolume.go b/pkg/models/shared/walletsvolume.go index fa3966a..3e041ab 100755 --- a/pkg/models/shared/walletsvolume.go +++ b/pkg/models/shared/walletsvolume.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type WalletsVolume struct { @@ -5,3 +7,24 @@ type WalletsVolume struct { Input int64 `json:"input"` Output int64 `json:"output"` } + +func (o *WalletsVolume) GetBalance() int64 { + if o == nil { + return 0 + } + return o.Balance +} + +func (o *WalletsVolume) GetInput() int64 { + if o == nil { + return 0 + } + return o.Input +} + +func (o *WalletsVolume) GetOutput() int64 { + if o == nil { + return 0 + } + return o.Output +} diff --git a/pkg/models/shared/walletwithbalances.go b/pkg/models/shared/walletwithbalances.go index ace09b1..4dea9ce 100755 --- a/pkg/models/shared/walletwithbalances.go +++ b/pkg/models/shared/walletwithbalances.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -8,11 +11,73 @@ type WalletWithBalancesBalances struct { Main AssetHolder `json:"main"` } +func (o *WalletWithBalancesBalances) GetMain() AssetHolder { + if o == nil { + return AssetHolder{} + } + return o.Main +} + type WalletWithBalances struct { Balances WalletWithBalancesBalances `json:"balances"` CreatedAt time.Time `json:"createdAt"` - ID string `json:"id"` - Ledger string `json:"ledger"` - Metadata map[string]interface{} `json:"metadata"` - Name string `json:"name"` + // The unique ID of the wallet. + ID string `json:"id"` + Ledger string `json:"ledger"` + // Metadata associated with the wallet. + Metadata map[string]interface{} `json:"metadata"` + Name string `json:"name"` +} + +func (w WalletWithBalances) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WalletWithBalances) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, false); err != nil { + return err + } + return nil +} + +func (o *WalletWithBalances) GetBalances() WalletWithBalancesBalances { + if o == nil { + return WalletWithBalancesBalances{} + } + return o.Balances +} + +func (o *WalletWithBalances) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *WalletWithBalances) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *WalletWithBalances) GetLedger() string { + if o == nil { + return "" + } + return o.Ledger +} + +func (o *WalletWithBalances) GetMetadata() map[string]interface{} { + if o == nil { + return map[string]interface{}{} + } + return o.Metadata +} + +func (o *WalletWithBalances) GetName() string { + if o == nil { + return "" + } + return o.Name } diff --git a/pkg/models/shared/webhooksconfig.go b/pkg/models/shared/webhooksconfig.go new file mode 100755 index 0000000..705bee0 --- /dev/null +++ b/pkg/models/shared/webhooksconfig.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "time" +) + +type WebhooksConfig struct { + Active *bool `json:"active,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + EventTypes []string `json:"eventTypes,omitempty"` + ID *string `json:"id,omitempty"` + Secret *string `json:"secret,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (w WebhooksConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WebhooksConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, false); err != nil { + return err + } + return nil +} + +func (o *WebhooksConfig) GetActive() *bool { + if o == nil { + return nil + } + return o.Active +} + +func (o *WebhooksConfig) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *WebhooksConfig) GetEndpoint() *string { + if o == nil { + return nil + } + return o.Endpoint +} + +func (o *WebhooksConfig) GetEventTypes() []string { + if o == nil { + return nil + } + return o.EventTypes +} + +func (o *WebhooksConfig) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *WebhooksConfig) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} + +func (o *WebhooksConfig) GetUpdatedAt() *time.Time { + if o == nil { + return nil + } + return o.UpdatedAt +} diff --git a/pkg/models/shared/wiseconfig.go b/pkg/models/shared/wiseconfig.go index 38bed27..e2cc5d1 100755 --- a/pkg/models/shared/wiseconfig.go +++ b/pkg/models/shared/wiseconfig.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type WiseConfig struct { APIKey string `json:"apiKey"` } + +func (o *WiseConfig) GetAPIKey() string { + if o == nil { + return "" + } + return o.APIKey +} diff --git a/pkg/models/shared/workflow.go b/pkg/models/shared/workflow.go index 5a659b8..ac38268 100755 --- a/pkg/models/shared/workflow.go +++ b/pkg/models/shared/workflow.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -10,3 +13,42 @@ type Workflow struct { ID string `json:"id"` UpdatedAt time.Time `json:"updatedAt"` } + +func (w Workflow) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *Workflow) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Workflow) GetConfig() WorkflowConfig { + if o == nil { + return WorkflowConfig{} + } + return o.Config +} + +func (o *Workflow) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *Workflow) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Workflow) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} diff --git a/pkg/models/shared/workflowconfig.go b/pkg/models/shared/workflowconfig.go index 41a746d..5fb8883 100755 --- a/pkg/models/shared/workflowconfig.go +++ b/pkg/models/shared/workflowconfig.go @@ -1,5 +1,14 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared type WorkflowConfig struct { Stages []map[string]interface{} `json:"stages"` } + +func (o *WorkflowConfig) GetStages() []map[string]interface{} { + if o == nil { + return []map[string]interface{}{} + } + return o.Stages +} diff --git a/pkg/models/shared/workflowoccurrence.go b/pkg/models/shared/workflowoccurrence.go index 434238a..9b1dc34 100755 --- a/pkg/models/shared/workflowoccurrence.go +++ b/pkg/models/shared/workflowoccurrence.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package shared import ( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "time" ) @@ -11,3 +14,49 @@ type WorkflowOccurrence struct { UpdatedAt time.Time `json:"updatedAt"` WorkflowID string `json:"workflowID"` } + +func (w WorkflowOccurrence) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WorkflowOccurrence) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, false); err != nil { + return err + } + return nil +} + +func (o *WorkflowOccurrence) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *WorkflowOccurrence) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *WorkflowOccurrence) GetStatuses() []StageStatus { + if o == nil { + return []StageStatus{} + } + return o.Statuses +} + +func (o *WorkflowOccurrence) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} + +func (o *WorkflowOccurrence) GetWorkflowID() string { + if o == nil { + return "" + } + return o.WorkflowID +} diff --git a/pkg/types/bigint.go b/pkg/types/bigint.go new file mode 100755 index 0000000..afd0cd2 --- /dev/null +++ b/pkg/types/bigint.go @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import ( + "fmt" + "math/big" +) + +// MustNewBigIntFromString returns an instance of big.Int from a string +// The string is assumed to be base 10 and if it is not a valid big.Int +// then the function panics. +// Avoid using this function in production code. +func MustNewBigIntFromString(s string) *big.Int { + i, ok := new(big.Int).SetString(s, 10) + if !ok { + panic(fmt.Errorf("failed to parse string as big.Int")) + } + + return i +} diff --git a/pkg/types/date.go b/pkg/types/date.go index 7f3f43b..c4648fa 100755 --- a/pkg/types/date.go +++ b/pkg/types/date.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package types import ( @@ -7,6 +9,7 @@ import ( "time" ) +// Date is a wrapper around time.Time that allows for JSON marshaling a date string formatted as "2006-01-02". type Date struct { time.Time } @@ -17,6 +20,57 @@ var ( _ fmt.Stringer = &Date{} ) +// NewDate returns an instance of Date from a time.Time. +func NewDate(t time.Time) *Date { + d := DateFromTime(t) + return &d +} + +// DateFromTime returns a Date from a time.Time. +func DateFromTime(t time.Time) Date { + return Date{t} +} + +// NewDateFromString returns an instance of Date from a string formatted as "2006-01-02". +func NewDateFromString(str string) (*Date, error) { + d, err := DateFromString(str) + if err != nil { + return nil, err + } + + return &d, nil +} + +// DateFromString returns a Date from a string formatted as "2006-01-02". +func DateFromString(str string) (Date, error) { + var d Date + var err error + + d.Time, err = time.Parse("2006-01-02", str) + return d, err +} + +// MustNewDateFromString returns an instance of Date from a string formatted as "2006-01-02" or panics. +// Avoid using this function in production code. +func MustNewDateFromString(str string) *Date { + d := MustDateFromString(str) + return &d +} + +// MustDateFromString returns a Date from a string formatted as "2006-01-02" or panics. +// Avoid using this function in production code. +func MustDateFromString(str string) Date { + d, err := DateFromString(str) + if err != nil { + panic(err) + } + return d +} + +func (d Date) GetTime() time.Time { + return d.Time +} + func (d Date) MarshalJSON() ([]byte, error) { return []byte(fmt.Sprintf(`"%s"`, d.Time.Format("2006-01-02"))), nil } diff --git a/pkg/types/datetime.go b/pkg/types/datetime.go new file mode 100755 index 0000000..0529b25 --- /dev/null +++ b/pkg/types/datetime.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import "time" + +// MustTimeFromString returns a time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. +// Avoid using this function in production code. +func MustTimeFromString(str string) time.Time { + t, err := time.Parse(time.RFC3339, str) + if err != nil { + panic(err) + } + + return t +} + +// MustNewTimeFromString returns an instance of time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. +// Avoid using this function in production code. +func MustNewTimeFromString(str string) *time.Time { + t := MustTimeFromString(str) + return &t +} diff --git a/pkg/types/decimal.go b/pkg/types/decimal.go new file mode 100755 index 0000000..a42284b --- /dev/null +++ b/pkg/types/decimal.go @@ -0,0 +1,20 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import ( + "fmt" + + "github.com/ericlagergren/decimal" +) + +// MustNewDecimalFromString returns an instance of Decimal from a string +// Avoid using this function in production code. +func MustNewDecimalFromString(s string) *decimal.Big { + d, ok := new(decimal.Big).SetString(s) + if !ok { + panic(fmt.Errorf("failed to parse string as decimal.Big")) + } + + return d +} diff --git a/pkg/types/pointers.go b/pkg/types/pointers.go new file mode 100755 index 0000000..4f15e99 --- /dev/null +++ b/pkg/types/pointers.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +func String(s string) *string { return &s } +func Bool(b bool) *bool { return &b } +func Int(i int) *int { return &i } +func Int64(i int64) *int64 { return &i } +func Float32(f float32) *float32 { return &f } +func Float64(f float64) *float64 { return &f } diff --git a/pkg/utils/contenttype.go b/pkg/utils/contenttype.go index 41e0abd..8ed13e2 100755 --- a/pkg/utils/contenttype.go +++ b/pkg/utils/contenttype.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( diff --git a/pkg/utils/form.go b/pkg/utils/form.go index 0c118e8..40dd55c 100755 --- a/pkg/utils/form.go +++ b/pkg/utils/form.go @@ -1,22 +1,29 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( "fmt" + "math/big" "net/url" "reflect" "strings" "time" + "github.com/ericlagergren/decimal" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/types" ) -func populateForm(paramName string, explode bool, objType reflect.Type, objValue reflect.Value, getFieldName func(reflect.StructField) string) url.Values { +func populateForm(paramName string, explode bool, objType reflect.Type, objValue reflect.Value, delimiter string, getFieldName func(reflect.StructField) string) url.Values { + formValues := url.Values{} + if isNil(objType, objValue) { + return formValues + } + if objType.Kind() == reflect.Pointer { - if objValue.IsNil() { - return formValues - } objType = objType.Elem() objValue = objValue.Elem() } @@ -28,6 +35,10 @@ func populateForm(paramName string, explode bool, objType reflect.Type, objValue formValues.Add(paramName, valToString(objValue.Interface())) case types.Date: formValues.Add(paramName, valToString(objValue.Interface())) + case big.Int: + formValues.Add(paramName, valToString(objValue.Interface())) + case decimal.Big: + formValues.Add(paramName, valToString(objValue.Interface())) default: var items []string @@ -35,11 +46,11 @@ func populateForm(paramName string, explode bool, objType reflect.Type, objValue fieldType := objType.Field(i) valType := objValue.Field(i) - if valType.Kind() == reflect.Pointer { - if valType.IsNil() { - continue - } + if isNil(fieldType.Type, valType) { + continue + } + if valType.Kind() == reflect.Pointer { valType = valType.Elem() } @@ -51,12 +62,12 @@ func populateForm(paramName string, explode bool, objType reflect.Type, objValue if explode { formValues.Add(fieldName, valToString(valType.Interface())) } else { - items = append(items, fmt.Sprintf("%s,%s", fieldName, valToString(valType.Interface()))) + items = append(items, fmt.Sprintf("%s%s%s", fieldName, delimiter, valToString(valType.Interface()))) } } if len(items) > 0 { - formValues.Add(paramName, strings.Join(items, ",")) + formValues.Add(paramName, strings.Join(items, delimiter)) } } case reflect.Map: @@ -67,15 +78,15 @@ func populateForm(paramName string, explode bool, objType reflect.Type, objValue if explode { formValues.Add(iter.Key().String(), valToString(iter.Value().Interface())) } else { - items = append(items, fmt.Sprintf("%s,%s", iter.Key().String(), valToString(iter.Value().Interface()))) + items = append(items, fmt.Sprintf("%s%s%s", iter.Key().String(), delimiter, valToString(iter.Value().Interface()))) } } if len(items) > 0 { - formValues.Add(paramName, strings.Join(items, ",")) + formValues.Add(paramName, strings.Join(items, delimiter)) } case reflect.Slice, reflect.Array: - values := parseFormStyleArray(explode, objValue) + values := parseDelimitedArray(explode, objValue, delimiter) for _, v := range values { formValues.Add(paramName, v) } @@ -86,7 +97,7 @@ func populateForm(paramName string, explode bool, objType reflect.Type, objValue return formValues } -func parseFormStyleArray(explode bool, objValue reflect.Value) []string { +func parseDelimitedArray(explode bool, objValue reflect.Value, delimiter string) []string { values := []string{} items := []string{} @@ -99,7 +110,7 @@ func parseFormStyleArray(explode bool, objValue reflect.Value) []string { } if len(items) > 0 { - values = append(values, strings.Join(items, ",")) + values = append(values, strings.Join(items, delimiter)) } return values diff --git a/pkg/utils/headers.go b/pkg/utils/headers.go index 4aa5ba0..0837022 100755 --- a/pkg/utils/headers.go +++ b/pkg/utils/headers.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( @@ -29,10 +31,11 @@ func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{} } func serializeHeader(objType reflect.Type, objValue reflect.Value, explode bool) string { + if isNil(objType, objValue) { + return "" + } + if objType.Kind() == reflect.Pointer { - if objValue.IsNil() { - return "" - } objType = objType.Elem() objValue = objValue.Elem() } @@ -45,10 +48,11 @@ func serializeHeader(objType reflect.Type, objValue reflect.Value, explode bool) fieldType := objType.Field(i) valType := objValue.Field(i) + if isNil(fieldType.Type, valType) { + continue + } + if fieldType.Type.Kind() == reflect.Pointer { - if valType.IsNil() { - continue - } valType = valType.Elem() } diff --git a/pkg/utils/json.go b/pkg/utils/json.go new file mode 100755 index 0000000..dd057d5 --- /dev/null +++ b/pkg/utils/json.go @@ -0,0 +1,579 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package utils + +import ( + "bytes" + "encoding/json" + "fmt" + "math/big" + "reflect" + "strings" + "time" + "unsafe" + + "github.com/speakeasy-sdks/formance-go-sdk/pkg/types" + + "github.com/ericlagergren/decimal" +) + +func MarshalJSON(v interface{}, tag reflect.StructTag, topLevel bool) ([]byte, error) { + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + + switch { + case isModelType(typ): + if topLevel { + return json.Marshal(v) + } + + if isNil(typ, val) { + return []byte("null"), nil + } + + out := map[string]json.RawMessage{} + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + fieldVal := val.Field(i) + + fieldName := field.Name + + omitEmpty := false + jsonTag := field.Tag.Get("json") + if jsonTag != "" { + for _, tag := range strings.Split(jsonTag, ",") { + if tag == "omitempty" { + omitEmpty = true + } else { + fieldName = tag + } + } + } + + if isNil(field.Type, fieldVal) { + if omitEmpty { + continue + } + } + + if !field.IsExported() && field.Tag.Get("const") == "" { + continue + } + + additionalProperties := field.Tag.Get("additionalProperties") + if fieldName == "-" && additionalProperties == "" { + continue + } + + if additionalProperties == "true" { + if field.Type.Kind() != reflect.Map { + return nil, fmt.Errorf("additionalProperties must be a map") + } + + for _, key := range fieldVal.MapKeys() { + r, err := marshalValue(fieldVal.MapIndex(key).Interface(), field.Tag) + if err != nil { + return nil, err + } + + out[key.String()] = r + } + + continue + } + + var fv interface{} + + if field.IsExported() { + fv = fieldVal.Interface() + } else { + pt := reflect.New(typ).Elem() + pt.Set(val) + + pf := pt.Field(i) + + fv = reflect.NewAt(pf.Type(), unsafe.Pointer(pf.UnsafeAddr())).Elem().Interface() + } + + r, err := marshalValue(fv, field.Tag) + if err != nil { + return nil, err + } + + out[fieldName] = r + } + + return json.Marshal(out) + default: + return marshalValue(v, tag) + } +} + +func UnmarshalJSON(b []byte, v interface{}, tag reflect.StructTag, topLevel bool, disallowUnknownFields bool) error { + if reflect.TypeOf(v).Kind() != reflect.Ptr { + return fmt.Errorf("v must be a pointer") + } + + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + + switch { + case isModelType(typ): + if topLevel || bytes.Equal(b, []byte("null")) { + d := json.NewDecoder(bytes.NewReader(b)) + if disallowUnknownFields { + d.DisallowUnknownFields() + } + return d.Decode(v) + } + + var unmarhsaled map[string]json.RawMessage + + if err := json.Unmarshal(b, &unmarhsaled); err != nil { + return err + } + + var additionalPropertiesField *reflect.StructField + var additionalPropertiesValue *reflect.Value + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + fieldVal := val.Field(i) + + fieldName := field.Name + + jsonTag := field.Tag.Get("json") + if jsonTag != "" { + for _, tag := range strings.Split(jsonTag, ",") { + if tag != "omitempty" { + fieldName = tag + } + } + } + + if field.Tag.Get("additionalProperties") == "true" { + additionalPropertiesField = &field + additionalPropertiesValue = &fieldVal + continue + } + + // If we receive a value for a const field ignore it but mark it as unmarshaled + if field.Tag.Get("const") != "" { + if r, ok := unmarhsaled[fieldName]; ok { + val := string(r) + if strings.HasPrefix(val, `"`) && strings.HasSuffix(val, `"`) { + val = val[1 : len(val)-1] + } + if val != field.Tag.Get("const") { + return fmt.Errorf("const field %s does not match expected value %s", fieldName, field.Tag.Get("const")) + } + + delete(unmarhsaled, fieldName) + } + } else if !field.IsExported() { + continue + } + + value, ok := unmarhsaled[fieldName] + if !ok { + defaultTag := field.Tag.Get("default") + if defaultTag != "" { + value = handleDefaultConstValue(defaultTag, fieldVal.Interface(), field.Tag) + ok = true + } + } else { + delete(unmarhsaled, fieldName) + } + + if ok { + if err := unmarshalValue(value, fieldVal, field.Tag, disallowUnknownFields); err != nil { + return err + } + } + } + + keys := make([]string, 0, len(unmarhsaled)) + for k := range unmarhsaled { + keys = append(keys, k) + } + + if len(keys) > 0 { + if disallowUnknownFields && (additionalPropertiesField == nil || additionalPropertiesValue == nil) { + return fmt.Errorf("unknown fields: %v", keys) + } + + if additionalPropertiesField != nil && additionalPropertiesValue != nil { + if additionalPropertiesValue.Kind() != reflect.Map { + return fmt.Errorf("additionalProperties must be a map") + } + + additionalPropertiesValue.Set(reflect.MakeMap(additionalPropertiesField.Type)) + + for key, value := range unmarhsaled { + val := reflect.New(additionalPropertiesField.Type.Elem()) + + if err := unmarshalValue(value, val, additionalPropertiesField.Tag, disallowUnknownFields); err != nil { + return err + } + + additionalPropertiesValue.SetMapIndex(reflect.ValueOf(key), val.Elem()) + } + } + } + default: + return unmarshalValue(b, reflect.ValueOf(v), tag, disallowUnknownFields) + } + + return nil +} + +func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error) { + constTag := tag.Get("const") + if constTag != "" { + return handleDefaultConstValue(constTag, v, tag), nil + } + + if isNil(reflect.TypeOf(v), reflect.ValueOf(v)) { + defaultTag := tag.Get("default") + if defaultTag != "" { + return handleDefaultConstValue(defaultTag, v, tag), nil + } + + return []byte("null"), nil + } + + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + switch typ.Kind() { + case reflect.Map: + if isNil(typ, val) { + return []byte("null"), nil + } + + out := map[string]json.RawMessage{} + + for _, key := range val.MapKeys() { + itemVal := val.MapIndex(key) + + if isNil(itemVal.Type(), itemVal) { + out[key.String()] = []byte("null") + continue + } + + r, err := marshalValue(itemVal.Interface(), tag) + if err != nil { + return nil, err + } + + out[key.String()] = r + } + + return json.Marshal(out) + case reflect.Slice, reflect.Array: + if isNil(typ, val) { + return []byte("null"), nil + } + + out := []json.RawMessage{} + + for i := 0; i < val.Len(); i++ { + itemVal := val.Index(i) + + if isNil(itemVal.Type(), itemVal) { + out = append(out, []byte("null")) + continue + } + + r, err := marshalValue(itemVal.Interface(), tag) + if err != nil { + return nil, err + } + + out = append(out, r) + } + + return json.Marshal(out) + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + return []byte(fmt.Sprintf(`"%s"`, val.Interface().(time.Time).Format(time.RFC3339Nano))), nil + case reflect.TypeOf(big.Int{}): + format := tag.Get("bigint") + if format == "string" { + b := val.Interface().(big.Int) + return []byte(fmt.Sprintf(`"%s"`, (&b).String())), nil + } + case reflect.TypeOf(decimal.Big{}): + format := tag.Get("decimal") + if format == "number" { + b := val.Interface().(decimal.Big) + f, ok := (&b).Float64() + if ok { + return []byte(b.String()), nil + } + + return []byte(fmt.Sprintf(`%f`, f)), nil + } + } + } + + return json.Marshal(v) +} + +func handleDefaultConstValue(tagValue string, val interface{}, tag reflect.StructTag) json.RawMessage { + if tagValue == "null" { + return []byte("null") + } + + typ := dereferenceTypePointer(reflect.TypeOf(val)) + switch typ { + case reflect.TypeOf(time.Time{}): + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + case reflect.TypeOf(big.Int{}): + bigIntTag := tag.Get("bigint") + if bigIntTag == "string" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(decimal.Big{}): + decimalTag := tag.Get("decimal") + if decimalTag != "number" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(types.Date{}): + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + default: + if typ.Kind() == reflect.String { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + } + + return []byte(tagValue) +} + +func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTag, disallowUnknownFields bool) error { + if bytes.Equal(value, []byte("null")) { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } else { + return json.Unmarshal(value, v.Interface()) + } + } + + typ := dereferenceTypePointer(v.Type()) + + switch typ.Kind() { + case reflect.Map: + if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } else { + return json.Unmarshal(value, v.Interface()) + } + } + + var unmarhsaled map[string]json.RawMessage + + if err := json.Unmarshal(value, &unmarhsaled); err != nil { + return err + } + + m := reflect.MakeMap(typ) + + for k, value := range unmarhsaled { + itemVal := reflect.New(typ.Elem()) + + if err := unmarshalValue(value, itemVal, tag, disallowUnknownFields); err != nil { + return err + } + + m.SetMapIndex(reflect.ValueOf(k), itemVal.Elem()) + } + + v.Set(m) + return nil + case reflect.Slice, reflect.Array: + if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } else { + return json.Unmarshal(value, v.Interface()) + } + } + + var unmarhsaled []json.RawMessage + + if err := json.Unmarshal(value, &unmarhsaled); err != nil { + return err + } + + arrVal := v + + for _, value := range unmarhsaled { + itemVal := reflect.New(typ.Elem()) + + if err := unmarshalValue(value, itemVal, tag, disallowUnknownFields); err != nil { + return err + } + + arrVal = reflect.Append(arrVal, itemVal.Elem()) + } + + v.Set(arrVal) + return nil + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + t, err := time.Parse(time.RFC3339Nano, s) + if err != nil { + return fmt.Errorf("failed to parse string as time.Time: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(t)) + return nil + case reflect.TypeOf(big.Int{}): + var b *big.Int + + format := tag.Get("bigint") + if format == "string" { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + var ok bool + b, ok = new(big.Int).SetString(s, 10) + if !ok { + return fmt.Errorf("failed to parse string as big.Int") + } + } else { + if err := json.Unmarshal(value, &b); err != nil { + return err + } + } + + if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Ptr { + v = v.Elem() + } + + v.Set(reflect.ValueOf(b)) + return nil + case reflect.TypeOf(decimal.Big{}): + var d *decimal.Big + format := tag.Get("decimal") + if format == "number" { + var ok bool + d, ok = new(decimal.Big).SetString(string(value)) + if !ok { + return fmt.Errorf("failed to parse number as decimal.Big") + } + } else { + if err := json.Unmarshal(value, &d); err != nil { + return err + } + } + + if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Ptr { + v = v.Elem() + } + + v.Set(reflect.ValueOf(d)) + return nil + case reflect.TypeOf(types.Date{}): + var s string + + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + d, err := types.DateFromString(s) + if err != nil { + return fmt.Errorf("failed to parse string as types.Date: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(d)) + return nil + } + } + + var val interface{} + + if v.CanAddr() { + val = v.Addr().Interface() + } else { + val = v.Interface() + } + + d := json.NewDecoder(bytes.NewReader(value)) + if disallowUnknownFields { + d.DisallowUnknownFields() + } + return d.Decode(val) +} + +func dereferencePointers(typ reflect.Type, val reflect.Value) (reflect.Type, reflect.Value) { + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + val = val.Elem() + } else { + return typ, val + } + + return dereferencePointers(typ, val) +} + +func dereferenceTypePointer(typ reflect.Type) reflect.Type { + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } else { + return typ + } + + return dereferenceTypePointer(typ) +} + +func isComplexValueType(typ reflect.Type) bool { + switch typ.Kind() { + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + fallthrough + case reflect.TypeOf(big.Int{}): + fallthrough + case reflect.TypeOf(decimal.Big{}): + fallthrough + case reflect.TypeOf(types.Date{}): + return true + } + } + + return false +} + +func isModelType(typ reflect.Type) bool { + if isComplexValueType(typ) { + return false + } + + if typ.Kind() == reflect.Struct { + return true + } + + return false +} diff --git a/pkg/utils/pathparams.go b/pkg/utils/pathparams.go index dd79c88..d7202e7 100755 --- a/pkg/utils/pathparams.go +++ b/pkg/utils/pathparams.go @@ -1,14 +1,23 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( "context" "fmt" + "math/big" + "net/url" "reflect" "strings" + "time" + + "github.com/ericlagergren/decimal" + + "github.com/speakeasy-sdks/formance-go-sdk/pkg/types" ) -func GenerateURL(ctx context.Context, serverURL, path string, pathParams interface{}, globals map[string]map[string]map[string]interface{}) string { - url := strings.TrimSuffix(serverURL, "/") + path +func GenerateURL(ctx context.Context, serverURL, path string, pathParams interface{}, globals map[string]map[string]map[string]interface{}) (string, error) { + uri := strings.TrimSuffix(serverURL, "/") + path pathParamsStructType := reflect.TypeOf(pathParams) pathParamsValType := reflect.ValueOf(pathParams) @@ -31,27 +40,38 @@ func GenerateURL(ctx context.Context, serverURL, path string, pathParams interfa valType = populateFromGlobals(fieldType, valType, "pathParam", globals) - // TODO: support other styles - switch ppTag.Style { - case "simple": - simpleParams := getSimplePathParams(ctx, ppTag.ParamName, fieldType.Type, valType, ppTag.Explode) - for k, v := range simpleParams { - parsedParameters[k] = v + if ppTag.Serialization != "" { + vals, err := populateSerializedParams(ppTag, fieldType.Type, valType) + if err != nil { + return "", err + } + for k, v := range vals { + parsedParameters[k] = url.PathEscape(v) + } + } else { + // TODO: support other styles + switch ppTag.Style { + case "simple": + simpleParams := getSimplePathParams(ctx, ppTag.ParamName, fieldType.Type, valType, ppTag.Explode) + for k, v := range simpleParams { + parsedParameters[k] = v + } } } } // TODO should we handle the case where there are no matching path params? - return ReplaceParameters(url, parsedParameters) + return ReplaceParameters(uri, parsedParameters), nil } func getSimplePathParams(ctx context.Context, parentName string, objType reflect.Type, objValue reflect.Value, explode bool) map[string]string { pathParams := make(map[string]string) + if isNil(objType, objValue) { + return nil + } + if objType.Kind() == reflect.Ptr { - if objValue.IsNil() { - return nil - } objType = objType.Elem() objValue = objValue.Elem() } @@ -81,30 +101,42 @@ func getSimplePathParams(ctx context.Context, parentName string, objType reflect } pathParams[parentName] = strings.Join(ppVals, ",") case reflect.Struct: - var ppVals []string - for i := 0; i < objType.NumField(); i++ { - fieldType := objType.Field(i) - valType := objValue.Field(i) - - ppTag := parseParamTag(pathParamTagKey, fieldType, "simple", explode) - if ppTag == nil { - continue - } + switch objValue.Interface().(type) { + case time.Time: + pathParams[parentName] = valToString(objValue.Interface()) + case types.Date: + pathParams[parentName] = valToString(objValue.Interface()) + case big.Int: + pathParams[parentName] = valToString(objValue.Interface()) + case decimal.Big: + pathParams[parentName] = valToString(objValue.Interface()) + default: + var ppVals []string + for i := 0; i < objType.NumField(); i++ { + fieldType := objType.Field(i) + valType := objValue.Field(i) + + ppTag := parseParamTag(pathParamTagKey, fieldType, "simple", explode) + if ppTag == nil { + continue + } - if fieldType.Type.Kind() == reflect.Pointer { - if valType.IsNil() { + if isNil(fieldType.Type, valType) { continue } - valType = valType.Elem() - } - if explode { - ppVals = append(ppVals, fmt.Sprintf("%s=%s", ppTag.ParamName, valToString(valType.Interface()))) - } else { - ppVals = append(ppVals, fmt.Sprintf("%s,%s", ppTag.ParamName, valToString(valType.Interface()))) + if fieldType.Type.Kind() == reflect.Pointer { + valType = valType.Elem() + } + + if explode { + ppVals = append(ppVals, fmt.Sprintf("%s=%s", ppTag.ParamName, valToString(valType.Interface()))) + } else { + ppVals = append(ppVals, fmt.Sprintf("%s,%s", ppTag.ParamName, valToString(valType.Interface()))) + } } + pathParams[parentName] = strings.Join(ppVals, ",") } - pathParams[parentName] = strings.Join(ppVals, ",") default: pathParams[parentName] = valToString(objValue.Interface()) } diff --git a/pkg/utils/queryparams.go b/pkg/utils/queryparams.go index 11f3322..0e94bce 100755 --- a/pkg/utils/queryparams.go +++ b/pkg/utils/queryparams.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( @@ -32,14 +34,12 @@ func PopulateQueryParams(ctx context.Context, req *http.Request, queryParams int valType = populateFromGlobals(fieldType, valType, "queryParam", globals) if qpTag.Serialization != "" { - vals, err := populateSerializedParams(req, qpTag, fieldType.Type, valType) + vals, err := populateSerializedParams(qpTag, fieldType.Type, valType) if err != nil { return err } for k, v := range vals { - for _, vv := range v { - values.Add(k, vv) - } + values.Add(k, v) } } else { switch qpTag.Style { @@ -51,7 +51,14 @@ func PopulateQueryParams(ctx context.Context, req *http.Request, queryParams int } } case "form": - vals := populateFormParams(req, qpTag, fieldType.Type, valType) + vals := populateFormParams(req, qpTag, fieldType.Type, valType, ",") + for k, v := range vals { + for _, vv := range v { + values.Add(k, vv) + } + } + case "pipeDelimited": + vals := populateFormParams(req, qpTag, fieldType.Type, valType, "|") for k, v := range vals { for _, vv := range v { values.Add(k, vv) @@ -68,18 +75,16 @@ func PopulateQueryParams(ctx context.Context, req *http.Request, queryParams int return nil } -func populateSerializedParams(req *http.Request, tag *paramTag, objType reflect.Type, objValue reflect.Value) (url.Values, error) { - values := url.Values{} +func populateSerializedParams(tag *paramTag, objType reflect.Type, objValue reflect.Value) (map[string]string, error) { + if isNil(objType, objValue) { + return nil, nil + } if objType.Kind() == reflect.Pointer { - if objValue.IsNil() { - return values, nil - } objValue = objValue.Elem() } - if objValue.Interface() == nil { - return values, nil - } + + values := map[string]string{} switch tag.Serialization { case "json": @@ -87,7 +92,7 @@ func populateSerializedParams(req *http.Request, tag *paramTag, objType reflect. if err != nil { return nil, fmt.Errorf("error marshaling json: %v", err) } - values.Add(tag.ParamName, string(data)) + values[tag.ParamName] = string(data) } return values, nil @@ -96,10 +101,11 @@ func populateSerializedParams(req *http.Request, tag *paramTag, objType reflect. func populateDeepObjectParams(req *http.Request, tag *paramTag, objType reflect.Type, objValue reflect.Value) url.Values { values := url.Values{} + if isNil(objType, objValue) { + return values + } + if objType.Kind() == reflect.Pointer { - if objValue.IsNil() { - return values - } objType = objType.Elem() objValue = objValue.Elem() } @@ -110,10 +116,11 @@ func populateDeepObjectParams(req *http.Request, tag *paramTag, objType reflect. fieldType := objType.Field(i) valType := objValue.Field(i) + if isNil(fieldType.Type, valType) { + continue + } + if fieldType.Type.Kind() == reflect.Pointer { - if valType.IsNil() { - continue - } valType = valType.Elem() } @@ -148,8 +155,8 @@ func populateDeepObjectParams(req *http.Request, tag *paramTag, objType reflect. return values } -func populateFormParams(req *http.Request, tag *paramTag, objType reflect.Type, objValue reflect.Value) url.Values { - return populateForm(tag.ParamName, tag.Explode, objType, objValue, func(fieldType reflect.StructField) string { +func populateFormParams(req *http.Request, tag *paramTag, objType reflect.Type, objValue reflect.Value, delimiter string) url.Values { + return populateForm(tag.ParamName, tag.Explode, objType, objValue, delimiter, func(fieldType reflect.StructField) string { qpTag := parseQueryParamTag(fieldType) if qpTag == nil { return "" diff --git a/pkg/utils/requestbody.go b/pkg/utils/requestbody.go index c308e2f..950f39a 100755 --- a/pkg/utils/requestbody.go +++ b/pkg/utils/requestbody.go @@ -1,9 +1,10 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( "bytes" "context" - "encoding/json" "fmt" "io" "mime/multipart" @@ -24,21 +25,25 @@ var ( urlEncodedEncodingRegex = regexp.MustCompile(`application\/x-www-form-urlencoded.*`) ) -func SerializeRequestBody(ctx context.Context, request interface{}, requestFieldName string, serializationMethod string) (*bytes.Buffer, string, error) { +func SerializeRequestBody(ctx context.Context, request interface{}, nullable, optional bool, requestFieldName, serializationMethod, tag string) (io.Reader, string, error) { requestStructType := reflect.TypeOf(request) requestValType := reflect.ValueOf(request) - if requestStructType.Kind() == reflect.Pointer { - if requestValType.IsNil() { + if isNil(requestStructType, requestValType) { + if !nullable && optional { return nil, "", nil } + return serializeContentType(requestFieldName, SerializationMethodToContentType[serializationMethod], requestValType, tag) + } + + if requestStructType.Kind() == reflect.Pointer { requestStructType = requestStructType.Elem() requestValType = requestValType.Elem() } if requestStructType.Kind() != reflect.Struct { - return serializeContentType(requestFieldName, SerializationMethodToContentType[serializationMethod], requestValType) + return serializeContentType(requestFieldName, SerializationMethodToContentType[serializationMethod], requestValType, tag) } requestField, ok := requestStructType.FieldByName(requestFieldName) @@ -48,24 +53,44 @@ func SerializeRequestBody(ctx context.Context, request interface{}, requestField if tag != nil { // request object (non-flattened) requestVal := requestValType.FieldByName(requestFieldName) - if requestField.Type.Kind() == reflect.Pointer && requestVal.IsNil() { - return nil, "", nil + if isNil(requestField.Type, requestVal) { + if !nullable && optional { + return nil, "", nil + } + + return serializeContentType(requestFieldName, tag.MediaType, requestVal, string(requestField.Tag)) } - return serializeContentType(requestFieldName, tag.MediaType, requestVal) + return serializeContentType(requestFieldName, tag.MediaType, requestVal, string(requestField.Tag)) } } // flattened request object - return serializeContentType(requestFieldName, SerializationMethodToContentType[serializationMethod], requestValType) + return serializeContentType(requestFieldName, SerializationMethodToContentType[serializationMethod], reflect.ValueOf(request), tag) } -func serializeContentType(fieldName string, mediaType string, val reflect.Value) (*bytes.Buffer, string, error) { +func serializeContentType(fieldName string, mediaType string, val reflect.Value, tag string) (*bytes.Buffer, string, error) { buf := &bytes.Buffer{} + if isNil(val.Type(), val) { + // TODO: what does a null mean for other content types? Just returning an empty buffer for now + if jsonEncodingRegex.MatchString(mediaType) { + if _, err := buf.Write([]byte("null")); err != nil { + return nil, "", err + } + } + + return buf, mediaType, nil + } + switch { case jsonEncodingRegex.MatchString(mediaType): - if err := json.NewEncoder(buf).Encode(val.Interface()); err != nil { + data, err := MarshalJSON(val.Interface(), reflect.StructTag(tag), true) + if err != nil { + return nil, "", err + } + + if _, err := buf.Write(data); err != nil { return nil, "", err } case multipartEncodingRegex.MatchString(mediaType): @@ -114,11 +139,11 @@ func encodeMultipartFormData(w io.Writer, data interface{}) (string, error) { fieldType := field.Type valType := requestValType.Field(i) - if fieldType.Kind() == reflect.Pointer { - if valType.IsNil() { - continue - } + if isNil(fieldType, valType) { + continue + } + if fieldType.Kind() == reflect.Pointer { fieldType = fieldType.Elem() valType = valType.Elem() } @@ -135,7 +160,7 @@ func encodeMultipartFormData(w io.Writer, data interface{}) (string, error) { writer.Close() return "", err } - d, err := json.Marshal(valType.Interface()) + d, err := MarshalJSON(valType.Interface(), field.Tag, true) if err != nil { writer.Close() return "", err @@ -147,7 +172,7 @@ func encodeMultipartFormData(w io.Writer, data interface{}) (string, error) { } else { switch fieldType.Kind() { case reflect.Slice, reflect.Array: - values := parseFormStyleArray(true, valType) + values := parseDelimitedArray(true, valType, ",") for _, v := range values { if err := writer.WriteField(tag.Name+"[]", v); err != nil { writer.Close() @@ -229,18 +254,18 @@ func encodeFormData(fieldName string, w io.Writer, data interface{}) error { fieldType := field.Type valType := requestValType.Field(i) - if fieldType.Kind() == reflect.Pointer { - if valType.IsNil() { - continue - } + if isNil(fieldType, valType) { + continue + } + if fieldType.Kind() == reflect.Pointer { fieldType = fieldType.Elem() valType = valType.Elem() } tag := parseFormTag(field) if tag.JSON { - data, err := json.Marshal(valType.Interface()) + data, err := MarshalJSON(valType.Interface(), field.Tag, true) if err != nil { return err } @@ -249,7 +274,7 @@ func encodeFormData(fieldName string, w io.Writer, data interface{}) error { switch tag.Style { // TODO: support other styles case "form": - values := populateForm(tag.Name, tag.Explode, fieldType, valType, func(sf reflect.StructField) string { + values := populateForm(tag.Name, tag.Explode, fieldType, valType, ",", func(sf reflect.StructField) string { tag := parseFormTag(field) if tag == nil { return "" diff --git a/pkg/utils/retries.go b/pkg/utils/retries.go index 09f13a2..ff39d0d 100755 --- a/pkg/utils/retries.go +++ b/pkg/utils/retries.go @@ -1,3 +1,5 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( diff --git a/pkg/utils/security.go b/pkg/utils/security.go index da2b90a..fa5eff7 100755 --- a/pkg/utils/security.go +++ b/pkg/utils/security.go @@ -1,6 +1,9 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( + "context" "encoding/base64" "fmt" "net/http" @@ -24,137 +27,142 @@ type securityTag struct { SubType string } -type SecurityClient struct { - client HTTPClient +type securityConfig struct { headers map[string]string queryParams map[string]string } -func newSecurityClient(client HTTPClient) *SecurityClient { +type SecurityClient struct { + HTTPClient + security func(ctx context.Context) (interface{}, error) +} + +func newSecurityClient(client HTTPClient, security func(ctx context.Context) (interface{}, error)) *SecurityClient { return &SecurityClient{ - client: client, - headers: make(map[string]string), - queryParams: make(map[string]string), + HTTPClient: client, + security: security, } } func (c *SecurityClient) Do(req *http.Request) (*http.Response, error) { - for k, v := range c.headers { + securityCtx, err := c.security(req.Context()) + if err != nil { + return nil, err + } + + ctx := securityConfig{ + headers: make(map[string]string), + queryParams: make(map[string]string), + } + parseSecurityStruct(&ctx, securityCtx) + + for k, v := range ctx.headers { req.Header.Set(k, v) } queryParams := req.URL.Query() - for k, v := range c.queryParams { - queryParams.Set(k, v) + for k, v := range ctx.queryParams { + queryParams.Add(k, v) } req.URL.RawQuery = queryParams.Encode() - return c.client.Do(req) + return c.HTTPClient.Do(req) } -func ConfigureSecurityClient(c HTTPClient, security interface{}) *SecurityClient { - client := parseSecurityStruct(c, security) - if client != nil { - return client - } +func ConfigureSecurityClient(c HTTPClient, security func(ctx context.Context) (interface{}, error)) *SecurityClient { + return newSecurityClient(c, security) +} - return newSecurityClient(c) +func trueReflectValue(val reflect.Value) reflect.Value { + kind := val.Type().Kind() + for kind == reflect.Interface || kind == reflect.Ptr { + innerVal := val.Elem() + if !innerVal.IsValid() { + break + } + val = innerVal + kind = val.Type().Kind() + } + return val } -func parseSecurityStruct(c HTTPClient, security interface{}) *SecurityClient { - securityStructType := reflect.TypeOf(security) - securityValType := reflect.ValueOf(security) +func parseSecurityStruct(c *securityConfig, security interface{}) { + securityValType := trueReflectValue(reflect.ValueOf(security)) + securityStructType := securityValType.Type() - if securityStructType.Kind() == reflect.Ptr { - if securityValType.IsNil() { - return nil - } + if isNil(securityStructType, securityValType) { + return + } + if securityStructType.Kind() == reflect.Ptr { securityStructType = securityStructType.Elem() securityValType = securityValType.Elem() } - client := newSecurityClient(c) - for i := 0; i < securityStructType.NumField(); i++ { fieldType := securityStructType.Field(i) valType := securityValType.Field(i) kind := valType.Kind() - if fieldType.Type.Kind() == reflect.Pointer { - if valType.IsNil() { - continue - } + if isNil(fieldType.Type, valType) { + continue + } + if fieldType.Type.Kind() == reflect.Pointer { kind = valType.Elem().Kind() } secTag := parseSecurityTag(fieldType) if secTag != nil { if secTag.Option { - return parseSecurityOption(c, valType.Interface()) + handleSecurityOption(c, valType.Interface()) } else if secTag.Scheme { // Special case for basic auth which could be a flattened struct if secTag.SubType == "basic" && kind != reflect.Struct { - parseSecurityScheme(client, secTag, security) - return client + parseSecurityScheme(c, secTag, security) } else { - parseSecurityScheme(client, secTag, valType.Interface()) + parseSecurityScheme(c, secTag, valType.Interface()) } } } } - - return client } -func parseSecurityOption(c HTTPClient, option interface{}) *SecurityClient { - optionStructType := reflect.TypeOf(option) - optionValType := reflect.ValueOf(option) +func handleSecurityOption(c *securityConfig, option interface{}) error { + optionValType := trueReflectValue(reflect.ValueOf(option)) + optionStructType := optionValType.Type() - if optionStructType.Kind() == reflect.Ptr { - if optionValType.IsNil() { - return nil - } - - optionStructType = optionStructType.Elem() - optionValType = optionValType.Elem() + if isNil(optionStructType, optionValType) { + return nil } - client := newSecurityClient(c) - for i := 0; i < optionStructType.NumField(); i++ { fieldType := optionStructType.Field(i) valType := optionValType.Field(i) secTag := parseSecurityTag(fieldType) if secTag != nil && secTag.Scheme { - parseSecurityScheme(client, secTag, valType.Interface()) + parseSecurityScheme(c, secTag, valType.Interface()) } } - return client + return nil } -func parseSecurityScheme(client *SecurityClient, schemeTag *securityTag, scheme interface{}) { - schemeType := reflect.TypeOf(scheme) - schemeVal := reflect.ValueOf(scheme) +func parseSecurityScheme(client *securityConfig, schemeTag *securityTag, scheme interface{}) { + schemeVal := trueReflectValue(reflect.ValueOf(scheme)) + schemeType := schemeVal.Type() - if schemeType.Kind() == reflect.Ptr { - if schemeVal.IsNil() { - return - } - - schemeType = schemeType.Elem() - schemeVal = schemeVal.Elem() + if isNil(schemeType, schemeVal) { + return } if schemeType.Kind() == reflect.Struct { if schemeTag.Type == "http" && schemeTag.SubType == "basic" { - parseBasicAuthScheme(client, schemeVal.Interface()) + handleBasicAuthScheme(client, schemeVal.Interface()) return } @@ -162,11 +170,11 @@ func parseSecurityScheme(client *SecurityClient, schemeTag *securityTag, scheme fieldType := schemeType.Field(i) valType := schemeVal.Field(i) - if fieldType.Type.Kind() == reflect.Ptr { - if valType.IsNil() { - continue - } + if isNil(fieldType.Type, valType) { + continue + } + if fieldType.Type.Kind() == reflect.Ptr { valType = valType.Elem() } @@ -182,7 +190,7 @@ func parseSecurityScheme(client *SecurityClient, schemeTag *securityTag, scheme } } -func parseSecuritySchemeValue(client *SecurityClient, schemeTag *securityTag, secTag *securityTag, val interface{}) { +func parseSecuritySchemeValue(client *securityConfig, schemeTag *securityTag, secTag *securityTag, val interface{}) { switch schemeTag.Type { case "apiKey": switch schemeTag.SubType { @@ -202,7 +210,7 @@ func parseSecuritySchemeValue(client *SecurityClient, schemeTag *securityTag, se case "http": switch schemeTag.SubType { case "bearer": - client.headers[secTag.Name] = valToString(val) + client.headers[secTag.Name] = prefixBearer(valToString(val)) default: panic("not supported") } @@ -211,7 +219,15 @@ func parseSecuritySchemeValue(client *SecurityClient, schemeTag *securityTag, se } } -func parseBasicAuthScheme(client *SecurityClient, scheme interface{}) { +func prefixBearer(authHeaderValue string) string { + if strings.HasPrefix(strings.ToLower(authHeaderValue), "bearer ") { + return authHeaderValue + } + + return fmt.Sprintf("Bearer %s", authHeaderValue) +} + +func handleBasicAuthScheme(client *securityConfig, scheme interface{}) { schemeStructType := reflect.TypeOf(scheme) schemeValType := reflect.ValueOf(scheme) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index b5b93d5..4ef632a 100755 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,13 +1,17 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + package utils import ( - "encoding/json" "fmt" "io" + "math/big" "reflect" "regexp" "strings" "time" + + "github.com/ericlagergren/decimal" ) const ( @@ -27,12 +31,12 @@ var ( } ) -func UnmarshalJsonFromResponseBody(body io.Reader, out interface{}) error { +func UnmarshalJsonFromResponseBody(body io.Reader, out interface{}, tag string) error { data, err := io.ReadAll(body) if err != nil { return fmt.Errorf("error reading response body: %w", err) } - if err := json.Unmarshal(data, &out); err != nil { + if err := UnmarshalJSON(data, out, reflect.StructTag(tag), true, false); err != nil { return fmt.Errorf("error unmarshalling json response body: %w", err) } @@ -40,6 +44,10 @@ func UnmarshalJsonFromResponseBody(body io.Reader, out interface{}) error { } func ReplaceParameters(stringWithParams string, params map[string]string) string { + if len(params) == 0 { + return stringWithParams + } + return paramRegex.ReplaceAllStringFunc(stringWithParams, func(match string) string { match = match[1 : len(match)-1] return params[match] @@ -88,6 +96,9 @@ func parseStructTag(tagKey string, field reflect.StructField) map[string]string func parseParamTag(tagKey string, field reflect.StructField, defaultStyle string, defaultExplode bool) *paramTag { // example `{tagKey}:"style=simple,explode=false,name=apiID"` values := parseStructTag(tagKey, field) + if values == nil { + return nil + } tag := ¶mTag{ Style: defaultStyle, @@ -115,6 +126,10 @@ func valToString(val interface{}) string { switch v := val.(type) { case time.Time: return v.Format(time.RFC3339Nano) + case big.Int: + return v.String() + case decimal.Big: + return v.String() default: return fmt.Sprintf("%v", v) } @@ -138,3 +153,19 @@ func populateFromGlobals(fieldType reflect.StructField, valType reflect.Value, p return valType } + +func isNil(typ reflect.Type, val reflect.Value) bool { + // `reflect.TypeOf(nil) == nil` so calling typ.Kind() will cause a nil pointer + // dereference panic. Catch it and return early. + // https://github.com/golang/go/issues/51649 + // https://github.com/golang/go/issues/54208 + if typ == nil { + return true + } + + if typ.Kind() == reflect.Ptr || typ.Kind() == reflect.Map || typ.Kind() == reflect.Slice || typ.Kind() == reflect.Interface { + return val.IsNil() + } + + return false +} diff --git a/scopes.go b/scopes.go index c5f65c9..8a9cd34 100755 --- a/scopes.go +++ b/scopes.go @@ -1,47 +1,53 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// scopes - Everything related to Scopes type scopes struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newScopes(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *scopes { +func newScopes(sdkConfig sdkConfiguration) *scopes { return &scopes{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // AddTransientScope - Add a transient scope to a scope // Add a transient scope to a scope -func (s *scopes) AddTransientScope(ctx context.Context, request operations.AddTransientScopeRequest) (*operations.AddTransientScopeResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) +func (s *scopes) AddTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.AddTransientScopeResponse, error) { + request := operations.AddTransientScopeRequest{ + ScopeID: scopeID, + TransientScopeID: transientScopeID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -50,7 +56,6 @@ func (s *scopes) AddTransientScope(ctx context.Context, request operations.AddTr if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -59,6 +64,13 @@ func (s *scopes) AddTransientScope(ctx context.Context, request operations.AddTr ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -68,11 +80,11 @@ func (s *scopes) AddTransientScope(ctx context.Context, request operations.AddTr // CreateScope - Create scope // Create scope -func (s *scopes) CreateScope(ctx context.Context, request shared.CreateScopeRequest) (*operations.CreateScopeResponse, error) { - baseURL := s.serverURL +func (s *scopes) CreateScope(ctx context.Context, request *shared.CreateScopeRequest) (*operations.CreateScopeResponse, error) { + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/scopes" - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Request", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -81,10 +93,12 @@ func (s *scopes) CreateScope(ctx context.Context, request shared.CreateScopeRequ if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -93,7 +107,6 @@ func (s *scopes) CreateScope(ctx context.Context, request shared.CreateScopeRequ if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -102,16 +115,25 @@ func (s *scopes) CreateScope(ctx context.Context, request shared.CreateScopeRequ ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 201: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.CreateScopeResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.CreateScopeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.CreateScopeResponse = out + res.CreateScopeResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -120,16 +142,25 @@ func (s *scopes) CreateScope(ctx context.Context, request shared.CreateScopeRequ // DeleteScope - Delete scope // Delete scope -func (s *scopes) DeleteScope(ctx context.Context, request operations.DeleteScopeRequest) (*operations.DeleteScopeResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) +func (s *scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.DeleteScopeResponse, error) { + request := operations.DeleteScopeRequest{ + ScopeID: scopeID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -138,7 +169,6 @@ func (s *scopes) DeleteScope(ctx context.Context, request operations.DeleteScope if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -147,6 +177,13 @@ func (s *scopes) DeleteScope(ctx context.Context, request operations.DeleteScope ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -156,16 +193,26 @@ func (s *scopes) DeleteScope(ctx context.Context, request operations.DeleteScope // DeleteTransientScope - Delete a transient scope from a scope // Delete a transient scope from a scope -func (s *scopes) DeleteTransientScope(ctx context.Context, request operations.DeleteTransientScopeRequest) (*operations.DeleteTransientScopeResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) +func (s *scopes) DeleteTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.DeleteTransientScopeResponse, error) { + request := operations.DeleteTransientScopeRequest{ + ScopeID: scopeID, + TransientScopeID: transientScopeID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -174,7 +221,6 @@ func (s *scopes) DeleteTransientScope(ctx context.Context, request operations.De if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -183,6 +229,13 @@ func (s *scopes) DeleteTransientScope(ctx context.Context, request operations.De ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: } @@ -193,15 +246,17 @@ func (s *scopes) DeleteTransientScope(ctx context.Context, request operations.De // ListScopes - List scopes // List Scopes func (s *scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/scopes" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -210,7 +265,6 @@ func (s *scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -219,16 +273,25 @@ func (s *scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ListScopesResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ListScopesResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ListScopesResponse = out + res.ListScopesResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -237,16 +300,25 @@ func (s *scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse // ReadScope - Read scope // Read scope -func (s *scopes) ReadScope(ctx context.Context, request operations.ReadScopeRequest) (*operations.ReadScopeResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) +func (s *scopes) ReadScope(ctx context.Context, scopeID string) (*operations.ReadScopeResponse, error) { + request := operations.ReadScopeRequest{ + ScopeID: scopeID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -255,7 +327,6 @@ func (s *scopes) ReadScope(ctx context.Context, request operations.ReadScopeRequ if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -264,16 +335,25 @@ func (s *scopes) ReadScope(ctx context.Context, request operations.ReadScopeRequ ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ReadScopeResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ReadScopeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ReadScopeResponse = out + res.ReadScopeResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -282,11 +362,19 @@ func (s *scopes) ReadScope(ctx context.Context, request operations.ReadScopeRequ // UpdateScope - Update scope // Update scope -func (s *scopes) UpdateScope(ctx context.Context, request operations.UpdateScopeRequest) (*operations.UpdateScopeResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) +func (s *scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeRequest *shared.UpdateScopeRequest) (*operations.UpdateScopeResponse, error) { + request := operations.UpdateScopeRequest{ + ScopeID: scopeID, + UpdateScopeRequest: updateScopeRequest, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "UpdateScopeRequest", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateScopeRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -295,10 +383,12 @@ func (s *scopes) UpdateScope(ctx context.Context, request operations.UpdateScope if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -307,7 +397,6 @@ func (s *scopes) UpdateScope(ctx context.Context, request operations.UpdateScope if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -316,16 +405,25 @@ func (s *scopes) UpdateScope(ctx context.Context, request operations.UpdateScope ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.UpdateScopeResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.UpdateScopeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.UpdateScopeResponse = out + res.UpdateScopeResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/script.go b/script.go index b306b55..1a11841 100755 --- a/script.go +++ b/script.go @@ -1,41 +1,48 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// script - Everything related to Script type script struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newScript(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *script { +func newScript(sdkConfig sdkConfiguration) *script { return &script{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // RunScript - Execute a Numscript // This route is deprecated, and has been merged into `POST /{ledger}/transactions`. -func (s *script) RunScript(ctx context.Context, request operations.RunScriptRequest) (*operations.RunScriptResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/script", request, nil) +// +// Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. +func (s *script) RunScript(ctx context.Context, script shared.Script, ledger string, preview *bool) (*operations.RunScriptResponse, error) { + request := operations.RunScriptRequest{ + Script: script, + Ledger: ledger, + Preview: preview, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/script", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Script", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Script", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -47,6 +54,8 @@ func (s *script) RunScript(ctx context.Context, request operations.RunScriptRequ if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) @@ -54,7 +63,7 @@ func (s *script) RunScript(ctx context.Context, request operations.RunScriptRequ return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -63,7 +72,6 @@ func (s *script) RunScript(ctx context.Context, request operations.RunScriptRequ if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -72,16 +80,25 @@ func (s *script) RunScript(ctx context.Context, request operations.RunScriptRequ ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ScriptResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ScriptResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ScriptResponse = out + res.ScriptResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/search.go b/search.go index 8e26400..15c5d33 100755 --- a/search.go +++ b/search.go @@ -1,42 +1,38 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// search - Everything related to Search type search struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newSearch(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *search { +func newSearch(sdkConfig sdkConfiguration) *search { return &search{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } -// Search - Search +// Search // ElasticSearch query engine func (s *search) Search(ctx context.Context, request shared.Query) (*operations.SearchResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/search/" - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Request", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -48,10 +44,12 @@ func (s *search) Search(ctx context.Context, request shared.Query) (*operations. if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -60,7 +58,6 @@ func (s *search) Search(ctx context.Context, request shared.Query) (*operations. if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -69,16 +66,25 @@ func (s *search) Search(ctx context.Context, request shared.Query) (*operations. ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.Response - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.Response + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.Response = out + res.Response = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: } diff --git a/server.go b/server.go index ec60839..428a8e6 100755 --- a/server.go +++ b/server.go @@ -1,46 +1,44 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// server - Everything related to Server type server struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newServer(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *server { +func newServer(sdkConfig sdkConfiguration) *server { return &server{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // GetInfo - Show server information func (s *server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/ledger/_info" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -49,7 +47,6 @@ func (s *server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -58,26 +55,37 @@ func (s *server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConfigInfoResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConfigInfoResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConfigInfoResponse = out + res.ConfigInfoResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/stats.go b/stats.go index c465df4..ede43d2 100755 --- a/stats.go +++ b/stats.go @@ -1,46 +1,51 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// stats - Everything related to Stats type stats struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newStats(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *stats { +func newStats(sdkConfig sdkConfiguration) *stats { return &stats{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // ReadStats - Get statistics from a ledger // Get statistics from a ledger. (aggregate metrics on accounts and transactions) -func (s *stats) ReadStats(ctx context.Context, request operations.ReadStatsRequest) (*operations.ReadStatsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/stats", request, nil) +func (s *stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadStatsResponse, error) { + request := operations.ReadStatsRequest{ + Ledger: ledger, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/stats", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -49,7 +54,6 @@ func (s *stats) ReadStats(ctx context.Context, request operations.ReadStatsReque if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -58,26 +62,37 @@ func (s *stats) ReadStats(ctx context.Context, request operations.ReadStatsReque ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.StatsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.StatsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.StatsResponse = out + res.StatsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/transactions.go b/transactions.go index f3fefc0..2468646 100755 --- a/transactions.go +++ b/transactions.go @@ -1,40 +1,44 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" ) +// transactions - Everything related to Transactions type transactions struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newTransactions(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *transactions { +func newTransactions(sdkConfig sdkConfiguration) *transactions { return &transactions{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // CreateTransactions - Create a new batch of transactions to a ledger -func (s *transactions) CreateTransactions(ctx context.Context, request operations.CreateTransactionsRequest) (*operations.CreateTransactionsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/batch", request, nil) +func (s *transactions) CreateTransactions(ctx context.Context, transactions shared.Transactions, ledger string) (*operations.CreateTransactionsResponse, error) { + request := operations.CreateTransactionsRequest{ + Transactions: transactions, + Ledger: ledger, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/batch", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Transactions", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Transactions", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -46,10 +50,12 @@ func (s *transactions) CreateTransactions(ctx context.Context, request operation if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -58,7 +64,6 @@ func (s *transactions) CreateTransactions(ctx context.Context, request operation if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -67,26 +72,37 @@ func (s *transactions) CreateTransactions(ctx context.Context, request operation ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.TransactionsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.TransactionsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.TransactionsResponse = out + res.TransactionsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -94,11 +110,20 @@ func (s *transactions) CreateTransactions(ctx context.Context, request operation } // AddMetadataOnTransaction - Set the metadata of a transaction by its ID -func (s *transactions) AddMetadataOnTransaction(ctx context.Context, request operations.AddMetadataOnTransactionRequest) (*operations.AddMetadataOnTransactionResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/metadata", request, nil) +func (s *transactions) AddMetadataOnTransaction(ctx context.Context, ledger string, txid int64, requestBody map[string]interface{}) (*operations.AddMetadataOnTransactionResponse, error) { + request := operations.AddMetadataOnTransactionRequest{ + Ledger: ledger, + Txid: txid, + RequestBody: requestBody, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/metadata", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "RequestBody", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, true, true, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -107,10 +132,12 @@ func (s *transactions) AddMetadataOnTransaction(ctx context.Context, request ope if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -119,7 +146,6 @@ func (s *transactions) AddMetadataOnTransaction(ctx context.Context, request ope if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -128,17 +154,26 @@ func (s *transactions) AddMetadataOnTransaction(ctx context.Context, request ope ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -147,19 +182,24 @@ func (s *transactions) AddMetadataOnTransaction(ctx context.Context, request ope // CountTransactions - Count the transactions from a ledger func (s *transactions) CountTransactions(ctx context.Context, request operations.CountTransactionsRequest) (*operations.CountTransactionsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "HEAD", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -168,7 +208,6 @@ func (s *transactions) CountTransactions(ctx context.Context, request operations if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -177,6 +216,13 @@ func (s *transactions) CountTransactions(ctx context.Context, request operations ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: res.Headers = httpRes.Header @@ -184,12 +230,14 @@ func (s *transactions) CountTransactions(ctx context.Context, request operations default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -197,11 +245,20 @@ func (s *transactions) CountTransactions(ctx context.Context, request operations } // CreateTransaction - Create a new transaction to a ledger -func (s *transactions) CreateTransaction(ctx context.Context, request operations.CreateTransactionRequest) (*operations.CreateTransactionResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) +func (s *transactions) CreateTransaction(ctx context.Context, postTransaction shared.PostTransaction, ledger string, preview *bool) (*operations.CreateTransactionResponse, error) { + request := operations.CreateTransactionRequest{ + PostTransaction: postTransaction, + Ledger: ledger, + Preview: preview, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "PostTransaction", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "PostTransaction", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -213,6 +270,8 @@ func (s *transactions) CreateTransaction(ctx context.Context, request operations if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) @@ -220,7 +279,7 @@ func (s *transactions) CreateTransaction(ctx context.Context, request operations return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -229,7 +288,6 @@ func (s *transactions) CreateTransaction(ctx context.Context, request operations if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -238,26 +296,37 @@ func (s *transactions) CreateTransaction(ctx context.Context, request operations ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.TransactionsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.TransactionsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.TransactionsResponse = out + res.TransactionsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -265,16 +334,26 @@ func (s *transactions) CreateTransaction(ctx context.Context, request operations } // GetTransaction - Get transaction from a ledger by its ID -func (s *transactions) GetTransaction(ctx context.Context, request operations.GetTransactionRequest) (*operations.GetTransactionResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}", request, nil) +func (s *transactions) GetTransaction(ctx context.Context, ledger string, txid int64) (*operations.GetTransactionResponse, error) { + request := operations.GetTransactionRequest{ + Ledger: ledger, + Txid: txid, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -283,7 +362,6 @@ func (s *transactions) GetTransaction(ctx context.Context, request operations.Ge if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -292,26 +370,37 @@ func (s *transactions) GetTransaction(ctx context.Context, request operations.Ge ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.TransactionResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.TransactionResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.TransactionResponse = out + res.TransactionResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -321,19 +410,24 @@ func (s *transactions) GetTransaction(ctx context.Context, request operations.Ge // ListTransactions - List transactions from a ledger // List transactions from a ledger, sorted by txid in descending order. func (s *transactions) ListTransactions(ctx context.Context, request operations.ListTransactionsRequest) (*operations.ListTransactionsResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -342,7 +436,6 @@ func (s *transactions) ListTransactions(ctx context.Context, request operations. if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -351,26 +444,37 @@ func (s *transactions) ListTransactions(ctx context.Context, request operations. ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.TransactionsCursorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.TransactionsCursorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.TransactionsCursorResponse = out + res.TransactionsCursorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -378,16 +482,26 @@ func (s *transactions) ListTransactions(ctx context.Context, request operations. } // RevertTransaction - Revert a ledger transaction by its ID -func (s *transactions) RevertTransaction(ctx context.Context, request operations.RevertTransactionRequest) (*operations.RevertTransactionResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/revert", request, nil) +func (s *transactions) RevertTransaction(ctx context.Context, ledger string, txid int64) (*operations.RevertTransactionResponse, error) { + request := operations.RevertTransactionRequest{ + Ledger: ledger, + Txid: txid, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/revert", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "POST", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -396,7 +510,6 @@ func (s *transactions) RevertTransaction(ctx context.Context, request operations if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -405,26 +518,37 @@ func (s *transactions) RevertTransaction(ctx context.Context, request operations ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.TransactionResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.TransactionResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.TransactionResponse = out + res.TransactionResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ErrorResponse = out + res.ErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/users.go b/users.go index c3c291b..8504619 100755 --- a/users.go +++ b/users.go @@ -1,47 +1,45 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// users - Everything related to Users type users struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newUsers(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *users { +func newUsers(sdkConfig sdkConfiguration) *users { return &users{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // ListUsers - List users // List users func (s *users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/users" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -50,7 +48,6 @@ func (s *users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -59,16 +56,25 @@ func (s *users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ListUsersResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ListUsersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ListUsersResponse = out + res.ListUsersResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -77,16 +83,25 @@ func (s *users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e // ReadUser - Read user // Read user -func (s *users) ReadUser(ctx context.Context, request operations.ReadUserRequest) (*operations.ReadUserResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/auth/users/{userId}", request, nil) +func (s *users) ReadUser(ctx context.Context, userID string) (*operations.ReadUserResponse, error) { + request := operations.ReadUserRequest{ + UserID: userID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/users/{userId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -95,7 +110,6 @@ func (s *users) ReadUser(ctx context.Context, request operations.ReadUserRequest if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -104,16 +118,25 @@ func (s *users) ReadUser(ctx context.Context, request operations.ReadUserRequest ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ReadUserResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ReadUserResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ReadUserResponse = out + res.ReadUserResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/wallets.go b/wallets.go index a40ee2e..000d694 100755 --- a/wallets.go +++ b/wallets.go @@ -1,41 +1,45 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" + "io" "net/http" "strings" ) +// wallets - Everything related to Wallets type wallets struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newWallets(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *wallets { +func newWallets(sdkConfig sdkConfiguration) *wallets { return &wallets{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // ConfirmHold - Confirm a hold -func (s *wallets) ConfirmHold(ctx context.Context, request operations.ConfirmHoldRequest) (*operations.ConfirmHoldResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/confirm", request, nil) +func (s *wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldRequest *shared.ConfirmHoldRequest) (*operations.ConfirmHoldResponse, error) { + request := operations.ConfirmHoldRequest{ + HoldID: holdID, + ConfirmHoldRequest: confirmHoldRequest, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/confirm", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "ConfirmHoldRequest", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ConfirmHoldRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -44,10 +48,12 @@ func (s *wallets) ConfirmHold(ctx context.Context, request operations.ConfirmHol if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -56,7 +62,6 @@ func (s *wallets) ConfirmHold(ctx context.Context, request operations.ConfirmHol if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -65,17 +70,26 @@ func (s *wallets) ConfirmHold(ctx context.Context, request operations.ConfirmHol ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -83,11 +97,19 @@ func (s *wallets) ConfirmHold(ctx context.Context, request operations.ConfirmHol } // CreateBalance - Create a balance -func (s *wallets) CreateBalance(ctx context.Context, request operations.CreateBalanceRequest) (*operations.CreateBalanceResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) +func (s *wallets) CreateBalance(ctx context.Context, id string, createBalanceRequest *shared.CreateBalanceRequest) (*operations.CreateBalanceResponse, error) { + request := operations.CreateBalanceRequest{ + ID: id, + CreateBalanceRequest: createBalanceRequest, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "CreateBalanceRequest", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreateBalanceRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -96,10 +118,12 @@ func (s *wallets) CreateBalance(ctx context.Context, request operations.CreateBa if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -108,7 +132,6 @@ func (s *wallets) CreateBalance(ctx context.Context, request operations.CreateBa if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -117,26 +140,37 @@ func (s *wallets) CreateBalance(ctx context.Context, request operations.CreateBa ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 201: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.CreateBalanceResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.CreateBalanceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.CreateBalanceResponse = out + res.CreateBalanceResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -144,11 +178,11 @@ func (s *wallets) CreateBalance(ctx context.Context, request operations.CreateBa } // CreateWallet - Create a new wallet -func (s *wallets) CreateWallet(ctx context.Context, request shared.CreateWalletRequest) (*operations.CreateWalletResponse, error) { - baseURL := s.serverURL +func (s *wallets) CreateWallet(ctx context.Context, request *shared.CreateWalletRequest) (*operations.CreateWalletResponse, error) { + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/wallets" - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Request", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -157,10 +191,12 @@ func (s *wallets) CreateWallet(ctx context.Context, request shared.CreateWalletR if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -169,7 +205,6 @@ func (s *wallets) CreateWallet(ctx context.Context, request shared.CreateWalletR if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -178,26 +213,37 @@ func (s *wallets) CreateWallet(ctx context.Context, request shared.CreateWalletR ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 201: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.CreateWalletResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.CreateWalletResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.CreateWalletResponse = out + res.CreateWalletResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -205,11 +251,19 @@ func (s *wallets) CreateWallet(ctx context.Context, request shared.CreateWalletR } // CreditWallet - Credit a wallet -func (s *wallets) CreditWallet(ctx context.Context, request operations.CreditWalletRequest) (*operations.CreditWalletResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/credit", request, nil) +func (s *wallets) CreditWallet(ctx context.Context, id string, creditWalletRequest *shared.CreditWalletRequest) (*operations.CreditWalletResponse, error) { + request := operations.CreditWalletRequest{ + ID: id, + CreditWalletRequest: creditWalletRequest, + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "CreditWalletRequest", "json") + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/credit", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreditWalletRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -218,10 +272,12 @@ func (s *wallets) CreditWallet(ctx context.Context, request operations.CreditWal if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -230,7 +286,6 @@ func (s *wallets) CreditWallet(ctx context.Context, request operations.CreditWal if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -239,17 +294,26 @@ func (s *wallets) CreditWallet(ctx context.Context, request operations.CreditWal ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -257,11 +321,19 @@ func (s *wallets) CreditWallet(ctx context.Context, request operations.CreditWal } // DebitWallet - Debit a wallet -func (s *wallets) DebitWallet(ctx context.Context, request operations.DebitWalletRequest) (*operations.DebitWalletResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/debit", request, nil) +func (s *wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest *shared.DebitWalletRequest) (*operations.DebitWalletResponse, error) { + request := operations.DebitWalletRequest{ + ID: id, + DebitWalletRequest: debitWalletRequest, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/debit", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "DebitWalletRequest", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DebitWalletRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -270,10 +342,12 @@ func (s *wallets) DebitWallet(ctx context.Context, request operations.DebitWalle if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -282,7 +356,6 @@ func (s *wallets) DebitWallet(ctx context.Context, request operations.DebitWalle if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -291,27 +364,38 @@ func (s *wallets) DebitWallet(ctx context.Context, request operations.DebitWalle ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.DebitWalletResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.DebitWalletResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.DebitWalletResponse = out + res.DebitWalletResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 204: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -319,16 +403,26 @@ func (s *wallets) DebitWallet(ctx context.Context, request operations.DebitWalle } // GetBalance - Get detailed balance -func (s *wallets) GetBalance(ctx context.Context, request operations.GetBalanceRequest) (*operations.GetBalanceResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances/{balanceName}", request, nil) +func (s *wallets) GetBalance(ctx context.Context, balanceName string, id string) (*operations.GetBalanceResponse, error) { + request := operations.GetBalanceRequest{ + BalanceName: balanceName, + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances/{balanceName}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -337,7 +431,6 @@ func (s *wallets) GetBalance(ctx context.Context, request operations.GetBalanceR if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -346,26 +439,37 @@ func (s *wallets) GetBalance(ctx context.Context, request operations.GetBalanceR ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.GetBalanceResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.GetBalanceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.GetBalanceResponse = out + res.GetBalanceResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -373,16 +477,25 @@ func (s *wallets) GetBalance(ctx context.Context, request operations.GetBalanceR } // GetHold - Get a hold -func (s *wallets) GetHold(ctx context.Context, request operations.GetHoldRequest) (*operations.GetHoldResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{holdID}", request, nil) +func (s *wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHoldResponse, error) { + request := operations.GetHoldRequest{ + HoldID: holdID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{holdID}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -391,7 +504,6 @@ func (s *wallets) GetHold(ctx context.Context, request operations.GetHoldRequest if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -400,26 +512,37 @@ func (s *wallets) GetHold(ctx context.Context, request operations.GetHoldRequest ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.GetHoldResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.GetHoldResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.GetHoldResponse = out + res.GetHoldResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -427,20 +550,29 @@ func (s *wallets) GetHold(ctx context.Context, request operations.GetHoldRequest } // GetHolds - Get all holds for a wallet -func (s *wallets) GetHolds(ctx context.Context, request operations.GetHoldsRequest) (*operations.GetHoldsResponse, error) { - baseURL := s.serverURL +func (s *wallets) GetHolds(ctx context.Context, cursor *string, metadata *operations.GetHoldsMetadata, pageSize *int64, walletID *string) (*operations.GetHoldsResponse, error) { + request := operations.GetHoldsRequest{ + Cursor: cursor, + Metadata: metadata, + PageSize: pageSize, + WalletID: walletID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/holds" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -449,7 +581,6 @@ func (s *wallets) GetHolds(ctx context.Context, request operations.GetHoldsReque if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -458,46 +589,65 @@ func (s *wallets) GetHolds(ctx context.Context, request operations.GetHoldsReque ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.GetHoldsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.GetHoldsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.GetHoldsResponse = out + res.GetHoldsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } return res, nil } -func (s *wallets) GetTransactions(ctx context.Context, request operations.GetTransactionsRequest) (*operations.GetTransactionsResponse, error) { - baseURL := s.serverURL +func (s *wallets) GetTransactions(ctx context.Context, cursor *string, pageSize *int64, walletID *string) (*operations.GetTransactionsResponse, error) { + request := operations.GetTransactionsRequest{ + Cursor: cursor, + PageSize: pageSize, + WalletID: walletID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/transactions" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -506,7 +656,6 @@ func (s *wallets) GetTransactions(ctx context.Context, request operations.GetTra if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -515,26 +664,37 @@ func (s *wallets) GetTransactions(ctx context.Context, request operations.GetTra ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.GetTransactionsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.GetTransactionsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.GetTransactionsResponse = out + res.GetTransactionsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -542,16 +702,25 @@ func (s *wallets) GetTransactions(ctx context.Context, request operations.GetTra } // GetWallet - Get a wallet -func (s *wallets) GetWallet(ctx context.Context, request operations.GetWalletRequest) (*operations.GetWalletResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) +func (s *wallets) GetWallet(ctx context.Context, id string) (*operations.GetWalletResponse, error) { + request := operations.GetWalletRequest{ + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -560,7 +729,6 @@ func (s *wallets) GetWallet(ctx context.Context, request operations.GetWalletReq if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -569,27 +737,38 @@ func (s *wallets) GetWallet(ctx context.Context, request operations.GetWalletReq ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.GetWalletResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.GetWalletResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.GetWalletResponse = out + res.GetWalletResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 404: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -597,16 +776,25 @@ func (s *wallets) GetWallet(ctx context.Context, request operations.GetWalletReq } // ListBalances - List balances of a wallet -func (s *wallets) ListBalances(ctx context.Context, request operations.ListBalancesRequest) (*operations.ListBalancesResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) +func (s *wallets) ListBalances(ctx context.Context, id string) (*operations.ListBalancesResponse, error) { + request := operations.ListBalancesRequest{ + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -615,7 +803,6 @@ func (s *wallets) ListBalances(ctx context.Context, request operations.ListBalan if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -624,16 +811,25 @@ func (s *wallets) ListBalances(ctx context.Context, request operations.ListBalan ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ListBalancesResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ListBalancesResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ListBalancesResponse = out + res.ListBalancesResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -641,20 +837,29 @@ func (s *wallets) ListBalances(ctx context.Context, request operations.ListBalan } // ListWallets - List all wallets -func (s *wallets) ListWallets(ctx context.Context, request operations.ListWalletsRequest) (*operations.ListWalletsResponse, error) { - baseURL := s.serverURL +func (s *wallets) ListWallets(ctx context.Context, cursor *string, metadata *operations.ListWalletsMetadata, name *string, pageSize *int64) (*operations.ListWalletsResponse, error) { + request := operations.ListWalletsRequest{ + Cursor: cursor, + Metadata: metadata, + Name: name, + PageSize: pageSize, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/wallets" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -663,7 +868,6 @@ func (s *wallets) ListWallets(ctx context.Context, request operations.ListWallet if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -672,16 +876,25 @@ func (s *wallets) ListWallets(ctx context.Context, request operations.ListWallet ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ListWalletsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ListWalletsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ListWalletsResponse = out + res.ListWalletsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -689,11 +902,19 @@ func (s *wallets) ListWallets(ctx context.Context, request operations.ListWallet } // UpdateWallet - Update a wallet -func (s *wallets) UpdateWallet(ctx context.Context, request operations.UpdateWalletRequest) (*operations.UpdateWalletResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) +func (s *wallets) UpdateWallet(ctx context.Context, id string, requestBody *operations.UpdateWalletRequestBody) (*operations.UpdateWalletResponse, error) { + request := operations.UpdateWalletRequest{ + ID: id, + RequestBody: requestBody, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "RequestBody", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -702,10 +923,12 @@ func (s *wallets) UpdateWallet(ctx context.Context, request operations.UpdateWal if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -714,7 +937,6 @@ func (s *wallets) UpdateWallet(ctx context.Context, request operations.UpdateWal if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -723,17 +945,26 @@ func (s *wallets) UpdateWallet(ctx context.Context, request operations.UpdateWal ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -741,16 +972,25 @@ func (s *wallets) UpdateWallet(ctx context.Context, request operations.UpdateWal } // VoidHold - Cancel a hold -func (s *wallets) VoidHold(ctx context.Context, request operations.VoidHoldRequest) (*operations.VoidHoldResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/void", request, nil) +func (s *wallets) VoidHold(ctx context.Context, holdID string) (*operations.VoidHoldResponse, error) { + request := operations.VoidHoldRequest{ + HoldID: holdID, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/void", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "POST", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -759,7 +999,6 @@ func (s *wallets) VoidHold(ctx context.Context, request operations.VoidHoldReque if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -768,17 +1007,26 @@ func (s *wallets) VoidHold(ctx context.Context, request operations.VoidHoldReque ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -787,15 +1035,17 @@ func (s *wallets) VoidHold(ctx context.Context, request operations.VoidHoldReque // WalletsgetServerInfo - Get server info func (s *wallets) WalletsgetServerInfo(ctx context.Context) (*operations.WalletsgetServerInfoResponse, error) { - baseURL := s.serverURL + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/_info" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -804,7 +1054,6 @@ func (s *wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -813,26 +1062,37 @@ func (s *wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ServerInfo - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ServerInfo + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ServerInfo = out + res.ServerInfo = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } default: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.WalletsErrorResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.WalletsErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.WalletsErrorResponse = out + res.WalletsErrorResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/webhooks.go b/webhooks.go index e4a3f4f..52ca75e 100755 --- a/webhooks.go +++ b/webhooks.go @@ -1,9 +1,13 @@ -package formance +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package formancegosdk import ( + "bytes" "context" "fmt" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" @@ -11,38 +15,38 @@ import ( "strings" ) +// webhooks - Everything related to Webhooks type webhooks struct { - defaultClient HTTPClient - securityClient HTTPClient - serverURL string - language string - sdkVersion string - genVersion string + sdkConfiguration sdkConfiguration } -func newWebhooks(defaultClient, securityClient HTTPClient, serverURL, language, sdkVersion, genVersion string) *webhooks { +func newWebhooks(sdkConfig sdkConfiguration) *webhooks { return &webhooks{ - defaultClient: defaultClient, - securityClient: securityClient, - serverURL: serverURL, - language: language, - sdkVersion: sdkVersion, - genVersion: genVersion, + sdkConfiguration: sdkConfig, } } // ActivateConfig - Activate one config // Activate a webhooks config by ID, to start receiving webhooks to its endpoint. -func (s *webhooks) ActivateConfig(ctx context.Context, request operations.ActivateConfigRequest) (*operations.ActivateConfigResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/activate", request, nil) +func (s *webhooks) ActivateConfig(ctx context.Context, id string) (*operations.ActivateConfigResponse, error) { + request := operations.ActivateConfigRequest{ + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/activate", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -51,7 +55,6 @@ func (s *webhooks) ActivateConfig(ctx context.Context, request operations.Activa if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -60,16 +63,25 @@ func (s *webhooks) ActivateConfig(ctx context.Context, request operations.Activa ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConfigResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConfigResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConfigResponse = out + res.ConfigResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 304: } @@ -82,11 +94,19 @@ func (s *webhooks) ActivateConfig(ctx context.Context, request operations.Activa // // If not passed or empty, a secret is automatically generated. // The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) -func (s *webhooks) ChangeConfigSecret(ctx context.Context, request operations.ChangeConfigSecretRequest) (*operations.ChangeConfigSecretResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/secret/change", request, nil) +func (s *webhooks) ChangeConfigSecret(ctx context.Context, id string, configChangeSecret *shared.ConfigChangeSecret) (*operations.ChangeConfigSecretResponse, error) { + request := operations.ChangeConfigSecretRequest{ + ID: id, + ConfigChangeSecret: configChangeSecret, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/secret/change", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "ConfigChangeSecret", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ConfigChangeSecret", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -95,10 +115,12 @@ func (s *webhooks) ChangeConfigSecret(ctx context.Context, request operations.Ch if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -107,7 +129,6 @@ func (s *webhooks) ChangeConfigSecret(ctx context.Context, request operations.Ch if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -116,16 +137,25 @@ func (s *webhooks) ChangeConfigSecret(ctx context.Context, request operations.Ch ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConfigResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConfigResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConfigResponse = out + res.ConfigResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -134,16 +164,25 @@ func (s *webhooks) ChangeConfigSecret(ctx context.Context, request operations.Ch // DeactivateConfig - Deactivate one config // Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. -func (s *webhooks) DeactivateConfig(ctx context.Context, request operations.DeactivateConfigRequest) (*operations.DeactivateConfigResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/deactivate", request, nil) +func (s *webhooks) DeactivateConfig(ctx context.Context, id string) (*operations.DeactivateConfigResponse, error) { + request := operations.DeactivateConfigRequest{ + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/deactivate", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -152,7 +191,6 @@ func (s *webhooks) DeactivateConfig(ctx context.Context, request operations.Deac if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -161,16 +199,25 @@ func (s *webhooks) DeactivateConfig(ctx context.Context, request operations.Deac ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConfigResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConfigResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConfigResponse = out + res.ConfigResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 304: } @@ -180,16 +227,25 @@ func (s *webhooks) DeactivateConfig(ctx context.Context, request operations.Deac // DeleteConfig - Delete one config // Delete a webhooks config by ID. -func (s *webhooks) DeleteConfig(ctx context.Context, request operations.DeleteConfigRequest) (*operations.DeleteConfigResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}", request, nil) +func (s *webhooks) DeleteConfig(ctx context.Context, id string) (*operations.DeleteConfigResponse, error) { + request := operations.DeleteConfigRequest{ + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "*/*") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -198,7 +254,6 @@ func (s *webhooks) DeleteConfig(ctx context.Context, request operations.DeleteCo if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -207,6 +262,13 @@ func (s *webhooks) DeleteConfig(ctx context.Context, request operations.DeleteCo ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: } @@ -216,20 +278,27 @@ func (s *webhooks) DeleteConfig(ctx context.Context, request operations.DeleteCo // GetManyConfigs - Get many configs // Sorted by updated date descending -func (s *webhooks) GetManyConfigs(ctx context.Context, request operations.GetManyConfigsRequest) (*operations.GetManyConfigsResponse, error) { - baseURL := s.serverURL +func (s *webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *string) (*operations.GetManyConfigsResponse, error) { + request := operations.GetManyConfigsRequest{ + Endpoint: endpoint, + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/webhooks/configs" req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -238,7 +307,6 @@ func (s *webhooks) GetManyConfigs(ctx context.Context, request operations.GetMan if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -247,16 +315,25 @@ func (s *webhooks) GetManyConfigs(ctx context.Context, request operations.GetMan ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConfigsResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConfigsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConfigsResponse = out + res.ConfigsResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -273,11 +350,21 @@ func (s *webhooks) GetManyConfigs(ctx context.Context, request operations.GetMan // The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) // // All eventTypes are converted to lower-case when inserted. -func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) (*operations.InsertConfigResponse, error) { - baseURL := s.serverURL +func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser, opts ...operations.Option) (*operations.InsertConfigResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionAcceptHeaderOverride, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/webhooks/configs" - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, "Request", "json") + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } @@ -289,10 +376,17 @@ func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + if o.AcceptHeaderOverride != nil { + req.Header.Set("Accept", string(*o.AcceptHeaderOverride)) + } else { + req.Header.Set("Accept", "application/json;q=1, text/plain;q=0") + } + + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -301,7 +395,6 @@ func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -310,27 +403,33 @@ func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.ConfigResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.ConfigResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.ConfigResponse = out + res.ConfigResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 400: switch { case utils.MatchContentType(contentType, `text/plain`): - data, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - - out := string(data) + out := string(rawBody) res.InsertConfig400TextPlainString = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -339,16 +438,25 @@ func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) // TestConfig - Test one config // Test a config by sending a webhook to its endpoint. -func (s *webhooks) TestConfig(ctx context.Context, request operations.TestConfigRequest) (*operations.TestConfigResponse, error) { - baseURL := s.serverURL - url := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/test", request, nil) +func (s *webhooks) TestConfig(ctx context.Context, id string) (*operations.TestConfigResponse, error) { + request := operations.TestConfigRequest{ + ID: id, + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/test", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } + req.Header.Set("Accept", "application/json") + req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - client := s.securityClient + client := s.sdkConfiguration.SecurityClient httpRes, err := client.Do(req) if err != nil { @@ -357,7 +465,6 @@ func (s *webhooks) TestConfig(ctx context.Context, request operations.TestConfig if httpRes == nil { return nil, fmt.Errorf("error sending request: no response") } - defer httpRes.Body.Close() contentType := httpRes.Header.Get("Content-Type") @@ -366,16 +473,25 @@ func (s *webhooks) TestConfig(ctx context.Context, request operations.TestConfig ContentType: contentType, RawResponse: httpRes, } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: switch { case utils.MatchContentType(contentType, `application/json`): - var out *shared.AttemptResponse - if err := utils.UnmarshalJsonFromResponseBody(httpRes.Body, &out); err != nil { + var out shared.AttemptResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.AttemptResponse = out + res.AttemptResponse = &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } } From 7dff00bcf176b0a98525031bff6a709e9d89cf63 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 7 Nov 2023 00:39:35 +0000 Subject: [PATCH 02/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.114.1 --- README.md | 177 +++-- RELEASES.md | 12 +- USAGE.md | 2 +- accounts.go | 32 +- balances.go | 20 +- clients.go | 62 +- docs/models/operations/balanceoperator.md | 16 + .../models/operations/countaccountsrequest.md | 2 +- ...=> counttransactionsqueryparammetadata.md} | 2 +- .../operations/counttransactionsrequest.md | 2 +- ...adata.md => getholdsqueryparammetadata.md} | 2 +- docs/models/operations/getholdsrequest.md | 2 +- .../models/operations/insertconfigresponse.md | 3 +- .../operations/listaccountsbalanceoperator.md | 16 - docs/models/operations/listaccountsrequest.md | 6 +- ... => listtransactionsqueryparammetadata.md} | 2 +- .../operations/listtransactionsrequest.md | 2 +- ...ta.md => listwalletsqueryparammetadata.md} | 2 +- docs/models/operations/listwalletsrequest.md | 2 +- .../{listaccountsmetadata.md => metadata.md} | 2 +- .../operations/queryparambalanceoperator.md | 17 + ...ountsmetadata.md => queryparammetadata.md} | 2 +- docs/models/operations/updatewalletrequest.md | 8 +- docs/models/shared/account.md | 10 +- docs/models/shared/accountresponse.md | 6 +- docs/models/shared/accountscursor.md | 6 +- docs/models/shared/accountscursorcursor.md | 12 - docs/models/shared/accountscursorresponse.md | 6 +- .../shared/accountscursorresponsecursor.md | 14 +- .../shared/accountwithvolumesandbalances.md | 14 +- docs/models/shared/attempt.md | 24 +- docs/models/shared/attemptresponse.md | 6 +- docs/models/shared/balances.md | 8 + docs/models/shared/balancescursorresponse.md | 6 +- docs/models/shared/client.md | 24 +- docs/models/shared/config.md | 6 +- docs/models/shared/configinfo.md | 10 +- docs/models/shared/configinforesponse.md | 6 +- docs/models/shared/configresponse.md | 6 +- docs/models/shared/configsresponse.md | 6 +- docs/models/shared/configsresponsecursor.md | 14 +- docs/models/shared/connectorconfigresponse.md | 6 +- .../shared/connectorsconfigsresponse.md | 6 +- .../connectorsconfigsresponseconnector.md | 8 + .../shared/connectorsconfigsresponsedata.md | 8 - .../connectorsconfigsresponsedataconnector.md | 8 - docs/models/shared/connectorsresponse.md | 6 +- docs/models/shared/connectorsresponsedata.md | 8 +- docs/models/shared/contract.md | 8 +- docs/models/shared/createbalanceresponse.md | 6 +- docs/models/shared/createclientresponse.md | 6 +- docs/models/shared/createscoperesponse.md | 6 +- docs/models/shared/createsecretresponse.md | 6 +- docs/models/shared/createwalletresponse.md | 6 +- docs/models/shared/createworkflowresponse.md | 6 +- docs/models/shared/creditwalletrequest.md | 14 +- docs/models/shared/cursor.md | 12 + docs/models/shared/data.md | 8 + docs/models/shared/debitwalletrequest.md | 4 +- docs/models/shared/debitwalletresponse.md | 6 +- ...nkingcircledescriptor.md => descriptor.md} | 2 +- docs/models/shared/error.md | 8 +- docs/models/shared/errorcode.md | 8 + docs/models/shared/errorerrorcode.md | 8 - docs/models/shared/errorresponse.md | 2 +- docs/models/shared/expandeddebithold.md | 2 +- docs/models/shared/{paymentraw.md => expr.md} | 2 +- docs/models/shared/getbalanceresponse.md | 6 +- docs/models/shared/getholdresponse.md | 6 +- docs/models/shared/getholdsresponse.md | 6 +- docs/models/shared/getholdsresponsecursor.md | 2 +- docs/models/shared/gettransactionsresponse.md | 6 +- .../shared/gettransactionsresponsecursor.md | 14 +- docs/models/shared/getwalletresponse.md | 6 +- .../shared/getworkflowoccurrenceresponse.md | 6 +- docs/models/shared/getworkflowresponse.md | 6 +- docs/models/shared/hold.md | 2 +- ...figsresponsedataconnectorkey.md => key.md} | 2 +- docs/models/shared/ledgerinfo.md | 8 +- docs/models/shared/ledgerinforesponse.md | 6 +- docs/models/shared/ledgerinfostorage.md | 8 - docs/models/shared/listbalancesresponse.md | 6 +- .../shared/listbalancesresponsecursor.md | 14 +- docs/models/shared/listclientsresponse.md | 6 +- docs/models/shared/listrunsresponse.md | 6 +- docs/models/shared/listrunsresponsecursor.md | 14 +- docs/models/shared/listscopesresponse.md | 6 +- docs/models/shared/listusersresponse.md | 6 +- docs/models/shared/listwalletsresponse.md | 6 +- .../shared/listwalletsresponsecursor.md | 14 +- docs/models/shared/listworkflowsresponse.md | 6 +- docs/models/shared/log.md | 4 +- docs/models/shared/logscursorresponse.md | 6 +- .../models/shared/logscursorresponsecursor.md | 2 +- docs/models/shared/logtype.md | 9 - docs/models/shared/mapping.md | 6 +- docs/models/shared/mappingresponse.md | 6 +- .../shared/{scriptvars.md => metadata.md} | 2 +- docs/models/shared/migrationinfo.md | 12 +- docs/models/shared/migrationinfostate.md | 9 - docs/models/shared/payment.md | 30 +- docs/models/shared/paymentadjustment.md | 14 +- docs/models/shared/paymentmetadata.md | 10 +- docs/models/shared/paymentresponse.md | 6 +- docs/models/shared/paymentsaccount.md | 14 +- docs/models/shared/paymentscheme.md | 25 - docs/models/shared/paymentscursor.md | 6 +- docs/models/shared/paymentscursorcursor.md | 14 +- docs/models/shared/posttransaction.md | 14 +- docs/models/shared/posttransactionscript.md | 2 +- .../shared/posttransactionscriptvars.md | 7 - ...secursordata.md => posttransactionvars.md} | 2 +- .../models/shared/{contractexpr.md => raw.md} | 2 +- docs/models/shared/readclientresponse.md | 6 +- docs/models/shared/readscoperesponse.md | 6 +- docs/models/shared/readuserresponse.md | 6 +- docs/models/shared/response.md | 8 +- docs/models/shared/responsecursor.md | 16 +- docs/models/shared/responseschemasdata.md | 7 + docs/models/shared/runworkflowresponse.md | 6 +- docs/models/shared/scheme.md | 25 + docs/models/shared/script.md | 2 +- docs/models/shared/scriptresponse.md | 4 +- docs/models/shared/state.md | 9 + docs/models/shared/statsresponse.md | 6 +- docs/models/shared/storage.md | 8 + docs/models/shared/stripetransferrequest.md | 2 +- docs/models/shared/taskbankingcircle.md | 20 +- docs/models/shared/taskcurrencycloud.md | 20 +- docs/models/shared/taskdummypay.md | 20 +- docs/models/shared/taskmodulr.md | 20 +- docs/models/shared/taskresponse.md | 6 +- docs/models/shared/taskscursor.md | 6 +- docs/models/shared/taskscursorcursor.md | 14 +- docs/models/shared/taskscursorcursordata.md | 41 - docs/models/shared/taskscursordata.md | 41 + docs/models/shared/taskstripe.md | 20 +- docs/models/shared/taskwise.md | 20 +- .../{responsecursortotal.md => total.md} | 2 +- docs/models/shared/transaction.md | 18 +- docs/models/shared/transactiondata.md | 12 +- docs/models/shared/transactionresponse.md | 6 +- docs/models/shared/transactions.md | 6 +- .../shared/transactionscursorresponse.md | 6 +- .../transactionscursorresponsecursor.md | 14 +- docs/models/shared/transactionsresponse.md | 6 +- docs/models/shared/type.md | 9 + docs/models/shared/updateclientresponse.md | 6 +- docs/models/shared/updatescoperesponse.md | 6 +- .../shared/{accountmetadata.md => vars.md} | 2 +- docs/models/shared/walletserrorresponse.md | 8 +- docs/models/shared/walletstransaction.md | 18 +- docs/models/shared/walletwithbalances.md | 16 +- .../shared/walletwithbalancesbalances.md | 8 - docs/models/shared/workflow.md | 12 +- docs/models/shared/workflowoccurrence.md | 14 +- docs/sdks/accounts/README.md | 12 +- docs/sdks/balances/README.md | 2 +- docs/sdks/clients/README.md | 2 +- docs/sdks/formance/README.md | 6 +- docs/sdks/ledger/README.md | 2 +- docs/sdks/logs/README.md | 2 +- docs/sdks/mapping/README.md | 4 +- docs/sdks/orchestration/README.md | 2 +- docs/sdks/payments/README.md | 2 +- docs/sdks/scopes/README.md | 2 +- docs/sdks/script/README.md | 4 +- docs/sdks/search/README.md | 2 +- docs/sdks/server/README.md | 2 +- docs/sdks/stats/README.md | 2 +- docs/sdks/transactions/README.md | 10 +- docs/sdks/users/README.md | 2 +- docs/sdks/wallets/README.md | 10 +- docs/sdks/webhooks/README.md | 2 +- files.gen | 698 +++++++++--------- formance.go | 96 +-- gen.yaml | 19 +- ledger.go | 14 +- logs.go | 14 +- mapping.go | 20 +- orchestration.go | 50 +- payments.go | 80 +- pkg/models/operations/countaccounts.go | 8 +- pkg/models/operations/counttransactions.go | 8 +- pkg/models/operations/getholds.go | 8 +- pkg/models/operations/insertconfig.go | 9 - pkg/models/operations/listaccounts.go | 81 +- pkg/models/operations/listtransactions.go | 8 +- pkg/models/operations/listwallets.go | 8 +- pkg/models/operations/options.go | 87 --- pkg/models/shared/account.go | 10 +- pkg/models/shared/accountscursor.go | 18 +- .../shared/connectorsconfigsresponse.go | 28 +- pkg/models/shared/contract.go | 10 +- pkg/models/shared/error.go | 20 +- pkg/models/shared/ledgerinfo.go | 10 +- pkg/models/shared/log.go | 20 +- pkg/models/shared/migrationinfo.go | 24 +- pkg/models/shared/payment.go | 60 +- pkg/models/shared/posttransaction.go | 8 +- pkg/models/shared/response.go | 24 +- pkg/models/shared/script.go | 8 +- pkg/models/shared/taskbankingcircle.go | 26 +- pkg/models/shared/taskscursor.go | 84 +-- pkg/models/shared/walletwithbalances.go | 12 +- scopes.go | 50 +- script.go | 14 +- search.go | 14 +- server.go | 14 +- stats.go | 14 +- transactions.go | 50 +- users.go | 20 +- wallets.go | 99 ++- webhooks.go | 75 +- 214 files changed, 1973 insertions(+), 1642 deletions(-) create mode 100755 docs/models/operations/balanceoperator.md rename docs/models/operations/{counttransactionsmetadata.md => counttransactionsqueryparammetadata.md} (86%) rename docs/models/operations/{getholdsmetadata.md => getholdsqueryparammetadata.md} (88%) delete mode 100755 docs/models/operations/listaccountsbalanceoperator.md rename docs/models/operations/{listtransactionsmetadata.md => listtransactionsqueryparammetadata.md} (86%) rename docs/models/operations/{listwalletsmetadata.md => listwalletsqueryparammetadata.md} (87%) rename docs/models/operations/{listaccountsmetadata.md => metadata.md} (90%) create mode 100755 docs/models/operations/queryparambalanceoperator.md rename docs/models/operations/{countaccountsmetadata.md => queryparammetadata.md} (90%) delete mode 100755 docs/models/shared/accountscursorcursor.md create mode 100755 docs/models/shared/balances.md create mode 100755 docs/models/shared/connectorsconfigsresponseconnector.md delete mode 100755 docs/models/shared/connectorsconfigsresponsedata.md delete mode 100755 docs/models/shared/connectorsconfigsresponsedataconnector.md create mode 100755 docs/models/shared/cursor.md create mode 100755 docs/models/shared/data.md rename docs/models/shared/{taskbankingcircledescriptor.md => descriptor.md} (92%) create mode 100755 docs/models/shared/errorcode.md delete mode 100755 docs/models/shared/errorerrorcode.md rename docs/models/shared/{paymentraw.md => expr.md} (90%) rename docs/models/shared/{connectorsconfigsresponsedataconnectorkey.md => key.md} (89%) delete mode 100755 docs/models/shared/ledgerinfostorage.md delete mode 100755 docs/models/shared/logtype.md rename docs/models/shared/{scriptvars.md => metadata.md} (90%) delete mode 100755 docs/models/shared/migrationinfostate.md delete mode 100755 docs/models/shared/paymentscheme.md delete mode 100755 docs/models/shared/posttransactionscriptvars.md rename docs/models/shared/{responsecursordata.md => posttransactionvars.md} (85%) rename docs/models/shared/{contractexpr.md => raw.md} (89%) create mode 100755 docs/models/shared/responseschemasdata.md create mode 100755 docs/models/shared/scheme.md create mode 100755 docs/models/shared/state.md create mode 100755 docs/models/shared/storage.md delete mode 100755 docs/models/shared/taskscursorcursordata.md create mode 100755 docs/models/shared/taskscursordata.md rename docs/models/shared/{responsecursortotal.md => total.md} (95%) create mode 100755 docs/models/shared/type.md rename docs/models/shared/{accountmetadata.md => vars.md} (87%) delete mode 100755 docs/models/shared/walletwithbalancesbalances.md delete mode 100755 pkg/models/operations/options.go diff --git a/README.md b/README.md index b82fe8f..89cbe83 100755 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ func main() { ) ctx := context.Background() - res, err := s.Formance.GetServerInfo(ctx) + res, err := s.GetServerInfo(ctx) if err != nil { log.Fatal(err) } @@ -60,19 +60,7 @@ func main() { * [PaymentsgetServerInfo](docs/sdks/formance/README.md#paymentsgetserverinfo) - Get server info * [SearchgetServerInfo](docs/sdks/formance/README.md#searchgetserverinfo) - Get server info -### [Accounts](docs/sdks/accounts/README.md) - -* [AddMetadataToAccount](docs/sdks/accounts/README.md#addmetadatatoaccount) - Add metadata to an account -* [CountAccounts](docs/sdks/accounts/README.md#countaccounts) - Count the accounts from a ledger -* [GetAccount](docs/sdks/accounts/README.md#getaccount) - Get account by its address -* [ListAccounts](docs/sdks/accounts/README.md#listaccounts) - List accounts from a ledger - -### [Balances](docs/sdks/balances/README.md) - -* [GetBalances](docs/sdks/balances/README.md#getbalances) - Get the balances from a ledger's account -* [GetBalancesAggregated](docs/sdks/balances/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts - -### [Clients](docs/sdks/clients/README.md) +### [.Clients](docs/sdks/clients/README.md) * [AddScopeToClient](docs/sdks/clients/README.md#addscopetoclient) - Add scope to client * [CreateClient](docs/sdks/clients/README.md#createclient) - Create client @@ -84,20 +72,69 @@ func main() { * [ReadClient](docs/sdks/clients/README.md#readclient) - Read client * [UpdateClient](docs/sdks/clients/README.md#updateclient) - Update client -### [Ledger](docs/sdks/ledger/README.md) +### [.Scopes](docs/sdks/scopes/README.md) + +* [AddTransientScope](docs/sdks/scopes/README.md#addtransientscope) - Add a transient scope to a scope +* [CreateScope](docs/sdks/scopes/README.md#createscope) - Create scope +* [DeleteScope](docs/sdks/scopes/README.md#deletescope) - Delete scope +* [DeleteTransientScope](docs/sdks/scopes/README.md#deletetransientscope) - Delete a transient scope from a scope +* [ListScopes](docs/sdks/scopes/README.md#listscopes) - List scopes +* [ReadScope](docs/sdks/scopes/README.md#readscope) - Read scope +* [UpdateScope](docs/sdks/scopes/README.md#updatescope) - Update scope + +### [.Users](docs/sdks/users/README.md) + +* [ListUsers](docs/sdks/users/README.md#listusers) - List users +* [ReadUser](docs/sdks/users/README.md#readuser) - Read user + +### [.Server](docs/sdks/server/README.md) + +* [GetInfo](docs/sdks/server/README.md#getinfo) - Show server information + +### [.Ledger](docs/sdks/ledger/README.md) * [GetLedgerInfo](docs/sdks/ledger/README.md#getledgerinfo) - Get information about a ledger -### [Logs](docs/sdks/logs/README.md) +### [.Accounts](docs/sdks/accounts/README.md) + +* [AddMetadataToAccount](docs/sdks/accounts/README.md#addmetadatatoaccount) - Add metadata to an account +* [CountAccounts](docs/sdks/accounts/README.md#countaccounts) - Count the accounts from a ledger +* [GetAccount](docs/sdks/accounts/README.md#getaccount) - Get account by its address +* [ListAccounts](docs/sdks/accounts/README.md#listaccounts) - List accounts from a ledger + +### [.Balances](docs/sdks/balances/README.md) + +* [GetBalances](docs/sdks/balances/README.md#getbalances) - Get the balances from a ledger's account +* [GetBalancesAggregated](docs/sdks/balances/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts + +### [.Logs](docs/sdks/logs/README.md) * [ListLogs](docs/sdks/logs/README.md#listlogs) - List the logs from a ledger -### [Mapping](docs/sdks/mapping/README.md) +### [.Mapping](docs/sdks/mapping/README.md) * [GetMapping](docs/sdks/mapping/README.md#getmapping) - Get the mapping of a ledger * [UpdateMapping](docs/sdks/mapping/README.md#updatemapping) - Update the mapping of a ledger -### [Orchestration](docs/sdks/orchestration/README.md) +### [.Script](docs/sdks/script/README.md) + +* [~~RunScript~~](docs/sdks/script/README.md#runscript) - Execute a Numscript :warning: **Deprecated** + +### [.Stats](docs/sdks/stats/README.md) + +* [ReadStats](docs/sdks/stats/README.md#readstats) - Get statistics from a ledger + +### [.Transactions](docs/sdks/transactions/README.md) + +* [CreateTransactions](docs/sdks/transactions/README.md#createtransactions) - Create a new batch of transactions to a ledger +* [AddMetadataOnTransaction](docs/sdks/transactions/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID +* [CountTransactions](docs/sdks/transactions/README.md#counttransactions) - Count the transactions from a ledger +* [CreateTransaction](docs/sdks/transactions/README.md#createtransaction) - Create a new transaction to a ledger +* [GetTransaction](docs/sdks/transactions/README.md#gettransaction) - Get transaction from a ledger by its ID +* [ListTransactions](docs/sdks/transactions/README.md#listtransactions) - List transactions from a ledger +* [RevertTransaction](docs/sdks/transactions/README.md#reverttransaction) - Revert a ledger transaction by its ID + +### [.Orchestration](docs/sdks/orchestration/README.md) * [CreateWorkflow](docs/sdks/orchestration/README.md#createworkflow) - Create workflow * [GetFlow](docs/sdks/orchestration/README.md#getflow) - Get a flow by id @@ -107,7 +144,7 @@ func main() { * [OrchestrationgetServerInfo](docs/sdks/orchestration/README.md#orchestrationgetserverinfo) - Get server info * [RunWorkflow](docs/sdks/orchestration/README.md#runworkflow) - Run workflow -### [Payments](docs/sdks/payments/README.md) +### [.Payments](docs/sdks/payments/README.md) * [ConnectorsStripeTransfer](docs/sdks/payments/README.md#connectorsstripetransfer) - Transfer funds between Stripe accounts * [GetConnectorTask](docs/sdks/payments/README.md#getconnectortask) - Read a specific task of the connector @@ -122,48 +159,11 @@ func main() { * [ResetConnector](docs/sdks/payments/README.md#resetconnector) - Reset a connector * [UninstallConnector](docs/sdks/payments/README.md#uninstallconnector) - Uninstall a connector -### [Scopes](docs/sdks/scopes/README.md) - -* [AddTransientScope](docs/sdks/scopes/README.md#addtransientscope) - Add a transient scope to a scope -* [CreateScope](docs/sdks/scopes/README.md#createscope) - Create scope -* [DeleteScope](docs/sdks/scopes/README.md#deletescope) - Delete scope -* [DeleteTransientScope](docs/sdks/scopes/README.md#deletetransientscope) - Delete a transient scope from a scope -* [ListScopes](docs/sdks/scopes/README.md#listscopes) - List scopes -* [ReadScope](docs/sdks/scopes/README.md#readscope) - Read scope -* [UpdateScope](docs/sdks/scopes/README.md#updatescope) - Update scope - -### [Script](docs/sdks/script/README.md) - -* [~~RunScript~~](docs/sdks/script/README.md#runscript) - Execute a Numscript :warning: **Deprecated** - -### [Search](docs/sdks/search/README.md) +### [.Search](docs/sdks/search/README.md) * [Search](docs/sdks/search/README.md#search) - Search -### [Server](docs/sdks/server/README.md) - -* [GetInfo](docs/sdks/server/README.md#getinfo) - Show server information - -### [Stats](docs/sdks/stats/README.md) - -* [ReadStats](docs/sdks/stats/README.md#readstats) - Get statistics from a ledger - -### [Transactions](docs/sdks/transactions/README.md) - -* [CreateTransactions](docs/sdks/transactions/README.md#createtransactions) - Create a new batch of transactions to a ledger -* [AddMetadataOnTransaction](docs/sdks/transactions/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID -* [CountTransactions](docs/sdks/transactions/README.md#counttransactions) - Count the transactions from a ledger -* [CreateTransaction](docs/sdks/transactions/README.md#createtransaction) - Create a new transaction to a ledger -* [GetTransaction](docs/sdks/transactions/README.md#gettransaction) - Get transaction from a ledger by its ID -* [ListTransactions](docs/sdks/transactions/README.md#listtransactions) - List transactions from a ledger -* [RevertTransaction](docs/sdks/transactions/README.md#reverttransaction) - Revert a ledger transaction by its ID - -### [Users](docs/sdks/users/README.md) - -* [ListUsers](docs/sdks/users/README.md#listusers) - List users -* [ReadUser](docs/sdks/users/README.md#readuser) - Read user - -### [Wallets](docs/sdks/wallets/README.md) +### [.Wallets](docs/sdks/wallets/README.md) * [ConfirmHold](docs/sdks/wallets/README.md#confirmhold) - Confirm a hold * [CreateBalance](docs/sdks/wallets/README.md#createbalance) - Create a balance @@ -181,7 +181,7 @@ func main() { * [VoidHold](docs/sdks/wallets/README.md#voidhold) - Cancel a hold * [WalletsgetServerInfo](docs/sdks/wallets/README.md#walletsgetserverinfo) - Get server info -### [Webhooks](docs/sdks/webhooks/README.md) +### [.Webhooks](docs/sdks/webhooks/README.md) * [ActivateConfig](docs/sdks/webhooks/README.md#activateconfig) - Activate one config * [ChangeConfigSecret](docs/sdks/webhooks/README.md#changeconfigsecret) - Change the signing secret of a config @@ -196,8 +196,6 @@ func main() { - - @@ -206,8 +204,6 @@ func main() { # Error Handling Handling errors in your SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass. - - @@ -230,7 +226,6 @@ Some of the server options above contain variables. If you want to set the value For example: - ```go package main @@ -243,12 +238,12 @@ import ( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), formancegosdk.WithServerIndex(1), + formancegosdk.WithSecurity(""), ) ctx := context.Background() - res, err := s.Formance.GetServerInfo(ctx) + res, err := s.GetServerInfo(ctx) if err != nil { log.Fatal(err) } @@ -265,7 +260,6 @@ func main() { The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example: - ```go package main @@ -278,12 +272,12 @@ import ( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), formancegosdk.WithServerURL("http://localhost"), + formancegosdk.WithSecurity(""), ) ctx := context.Background() - res, err := s.Formance.GetServerInfo(ctx) + res, err := s.GetServerInfo(ctx) if err != nil { log.Fatal(err) } @@ -333,6 +327,51 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea + + + + +# Authentication + +## Per-Client Security Schemes + +Your SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| --------------- | --------------- | --------------- | +| `Authorization` | oauth2 | OAuth2 token | + +You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example: + +```go +package main + +import ( + "context" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "log" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.GetServerInfo(ctx) + if err != nil { + log.Fatal(err) + } + + if res.ServerInfo != nil { + // handle response + } +} + +``` + + diff --git a/RELEASES.md b/RELEASES.md index a3dc250..f84e3e0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -120,4 +120,14 @@ Based on: ### Generated - [go v0.4.0] . ### Releases -- [Go v0.4.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.4.0 - . \ No newline at end of file +- [Go v0.4.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.4.0 - . + +## 2023-11-07 00:39:17 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.114.1 (2.181.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.5.0] . +### Releases +- [Go v0.5.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 797b372..d328943 100755 --- a/USAGE.md +++ b/USAGE.md @@ -17,7 +17,7 @@ func main() { ) ctx := context.Background() - res, err := s.Formance.GetServerInfo(ctx) + res, err := s.GetServerInfo(ctx) if err != nil { log.Fatal(err) } diff --git a/accounts.go b/accounts.go index b29c58a..c9ee00d 100755 --- a/accounts.go +++ b/accounts.go @@ -14,19 +14,19 @@ import ( "net/http" ) -// accounts - Everything related to Accounts -type accounts struct { +// Accounts - Everything related to Accounts +type Accounts struct { sdkConfiguration sdkConfiguration } -func newAccounts(sdkConfig sdkConfiguration) *accounts { - return &accounts{ +func newAccounts(sdkConfig sdkConfiguration) *Accounts { + return &Accounts{ sdkConfiguration: sdkConfig, } } // AddMetadataToAccount - Add metadata to an account -func (s *accounts) AddMetadataToAccount(ctx context.Context, requestBody map[string]interface{}, address string, ledger string) (*operations.AddMetadataToAccountResponse, error) { +func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[string]interface{}, address string, ledger string) (*operations.AddMetadataToAccountResponse, error) { request := operations.AddMetadataToAccountRequest{ RequestBody: requestBody, Address: address, @@ -82,6 +82,10 @@ func (s *accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -100,7 +104,7 @@ func (s *accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str } // CountAccounts - Count the accounts from a ledger -func (s *accounts) CountAccounts(ctx context.Context, ledger string, address *string, metadata *operations.CountAccountsMetadata) (*operations.CountAccountsResponse, error) { +func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *string, metadata *operations.Metadata) (*operations.CountAccountsResponse, error) { request := operations.CountAccountsRequest{ Ledger: ledger, Address: address, @@ -152,6 +156,10 @@ func (s *accounts) CountAccounts(ctx context.Context, ledger string, address *st case httpRes.StatusCode == 200: res.Headers = httpRes.Header + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -170,7 +178,7 @@ func (s *accounts) CountAccounts(ctx context.Context, ledger string, address *st } // GetAccount - Get account by its address -func (s *accounts) GetAccount(ctx context.Context, address string, ledger string) (*operations.GetAccountResponse, error) { +func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string) (*operations.GetAccountResponse, error) { request := operations.GetAccountRequest{ Address: address, Ledger: ledger, @@ -226,6 +234,10 @@ func (s *accounts) GetAccount(ctx context.Context, address string, ledger string default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -245,7 +257,7 @@ func (s *accounts) GetAccount(ctx context.Context, address string, ledger string // ListAccounts - List accounts from a ledger // List accounts from a ledger, sorted by address in descending order. -func (s *accounts) ListAccounts(ctx context.Context, request operations.ListAccountsRequest) (*operations.ListAccountsResponse, error) { +func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAccountsRequest) (*operations.ListAccountsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) if err != nil { @@ -300,6 +312,10 @@ func (s *accounts) ListAccounts(ctx context.Context, request operations.ListAcco default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/balances.go b/balances.go index 9ed378c..30790b4 100755 --- a/balances.go +++ b/balances.go @@ -14,19 +14,19 @@ import ( "net/http" ) -// balances - Everything related to Balances -type balances struct { +// Balances - Everything related to Balances +type Balances struct { sdkConfiguration sdkConfiguration } -func newBalances(sdkConfig sdkConfiguration) *balances { - return &balances{ +func newBalances(sdkConfig sdkConfiguration) *Balances { + return &Balances{ sdkConfiguration: sdkConfig, } } // GetBalances - Get the balances from a ledger's account -func (s *balances) GetBalances(ctx context.Context, request operations.GetBalancesRequest) (*operations.GetBalancesResponse, error) { +func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalancesRequest) (*operations.GetBalancesResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/balances", request, nil) if err != nil { @@ -81,6 +81,10 @@ func (s *balances) GetBalances(ctx context.Context, request operations.GetBalanc default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -99,7 +103,7 @@ func (s *balances) GetBalances(ctx context.Context, request operations.GetBalanc } // GetBalancesAggregated - Get the aggregated balances from selected accounts -func (s *balances) GetBalancesAggregated(ctx context.Context, ledger string, address *string) (*operations.GetBalancesAggregatedResponse, error) { +func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, address *string) (*operations.GetBalancesAggregatedResponse, error) { request := operations.GetBalancesAggregatedRequest{ Ledger: ledger, Address: address, @@ -159,6 +163,10 @@ func (s *balances) GetBalancesAggregated(ctx context.Context, ledger string, add default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/clients.go b/clients.go index 2c44822..0c0e9f9 100755 --- a/clients.go +++ b/clients.go @@ -15,19 +15,19 @@ import ( "strings" ) -// clients - Everything related to Clients -type clients struct { +// Clients - Everything related to Clients +type Clients struct { sdkConfiguration sdkConfiguration } -func newClients(sdkConfig sdkConfiguration) *clients { - return &clients{ +func newClients(sdkConfig sdkConfiguration) *Clients { + return &Clients{ sdkConfiguration: sdkConfig, } } // AddScopeToClient - Add scope to client -func (s *clients) AddScopeToClient(ctx context.Context, clientID string, scopeID string) (*operations.AddScopeToClientResponse, error) { +func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID string) (*operations.AddScopeToClientResponse, error) { request := operations.AddScopeToClientRequest{ ClientID: clientID, ScopeID: scopeID, @@ -72,13 +72,17 @@ func (s *clients) AddScopeToClient(ctx context.Context, clientID string, scopeID httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // CreateClient - Create client -func (s *clients) CreateClient(ctx context.Context, request *shared.CreateClientRequest) (*operations.CreateClientResponse, error) { +func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClientRequest) (*operations.CreateClientResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/clients" @@ -133,13 +137,17 @@ func (s *clients) CreateClient(ctx context.Context, request *shared.CreateClient default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // CreateSecret - Add a secret to a client -func (s *clients) CreateSecret(ctx context.Context, clientID string, createSecretRequest *shared.CreateSecretRequest) (*operations.CreateSecretResponse, error) { +func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecretRequest *shared.CreateSecretRequest) (*operations.CreateSecretResponse, error) { request := operations.CreateSecretRequest{ ClientID: clientID, CreateSecretRequest: createSecretRequest, @@ -202,13 +210,17 @@ func (s *clients) CreateSecret(ctx context.Context, clientID string, createSecre default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // DeleteClient - Delete client -func (s *clients) DeleteClient(ctx context.Context, clientID string) (*operations.DeleteClientResponse, error) { +func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operations.DeleteClientResponse, error) { request := operations.DeleteClientRequest{ ClientID: clientID, } @@ -252,13 +264,17 @@ func (s *clients) DeleteClient(ctx context.Context, clientID string) (*operation httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // DeleteScopeFromClient - Delete scope from client -func (s *clients) DeleteScopeFromClient(ctx context.Context, clientID string, scopeID string) (*operations.DeleteScopeFromClientResponse, error) { +func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, scopeID string) (*operations.DeleteScopeFromClientResponse, error) { request := operations.DeleteScopeFromClientRequest{ ClientID: clientID, ScopeID: scopeID, @@ -303,13 +319,17 @@ func (s *clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // DeleteSecret - Delete a secret from a client -func (s *clients) DeleteSecret(ctx context.Context, clientID string, secretID string) (*operations.DeleteSecretResponse, error) { +func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID string) (*operations.DeleteSecretResponse, error) { request := operations.DeleteSecretRequest{ ClientID: clientID, SecretID: secretID, @@ -354,13 +374,17 @@ func (s *clients) DeleteSecret(ctx context.Context, clientID string, secretID st httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // ListClients - List clients -func (s *clients) ListClients(ctx context.Context) (*operations.ListClientsResponse, error) { +func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/clients" @@ -408,13 +432,17 @@ func (s *clients) ListClients(ctx context.Context) (*operations.ListClientsRespo default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // ReadClient - Read client -func (s *clients) ReadClient(ctx context.Context, clientID string) (*operations.ReadClientResponse, error) { +func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations.ReadClientResponse, error) { request := operations.ReadClientRequest{ ClientID: clientID, } @@ -469,13 +497,17 @@ func (s *clients) ReadClient(ctx context.Context, clientID string) (*operations. default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // UpdateClient - Update client -func (s *clients) UpdateClient(ctx context.Context, clientID string, updateClientRequest *shared.UpdateClientRequest) (*operations.UpdateClientResponse, error) { +func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClientRequest *shared.UpdateClientRequest) (*operations.UpdateClientResponse, error) { request := operations.UpdateClientRequest{ ClientID: clientID, UpdateClientRequest: updateClientRequest, @@ -538,6 +570,10 @@ func (s *clients) UpdateClient(ctx context.Context, clientID string, updateClien default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/docs/models/operations/balanceoperator.md b/docs/models/operations/balanceoperator.md new file mode 100755 index 0000000..4097677 --- /dev/null +++ b/docs/models/operations/balanceoperator.md @@ -0,0 +1,16 @@ +# BalanceOperator + +Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. + + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `BalanceOperatorGte` | gte | +| `BalanceOperatorLte` | lte | +| `BalanceOperatorGt` | gt | +| `BalanceOperatorLt` | lt | +| `BalanceOperatorE` | e | +| `BalanceOperatorNe` | ne | \ No newline at end of file diff --git a/docs/models/operations/countaccountsrequest.md b/docs/models/operations/countaccountsrequest.md index e17b8d3..f91ce63 100755 --- a/docs/models/operations/countaccountsrequest.md +++ b/docs/models/operations/countaccountsrequest.md @@ -7,4 +7,4 @@ | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `Address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | -| `Metadata` | [*CountAccountsMetadata](../../models/operations/countaccountsmetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | \ No newline at end of file +| `Metadata` | [*operations.Metadata](../../models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | \ No newline at end of file diff --git a/docs/models/operations/counttransactionsmetadata.md b/docs/models/operations/counttransactionsqueryparammetadata.md similarity index 86% rename from docs/models/operations/counttransactionsmetadata.md rename to docs/models/operations/counttransactionsqueryparammetadata.md index bd9fe8c..91d5719 100755 --- a/docs/models/operations/counttransactionsmetadata.md +++ b/docs/models/operations/counttransactionsqueryparammetadata.md @@ -1,4 +1,4 @@ -# CountTransactionsMetadata +# CountTransactionsQueryParamMetadata Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. diff --git a/docs/models/operations/counttransactionsrequest.md b/docs/models/operations/counttransactionsrequest.md index 02fd870..72f8055 100755 --- a/docs/models/operations/counttransactionsrequest.md +++ b/docs/models/operations/counttransactionsrequest.md @@ -10,7 +10,7 @@ | `EndTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
| | | ~~`EndTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use `endTime` instead.
| | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Metadata` | [*CountTransactionsMetadata](../../models/operations/counttransactionsmetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.CountTransactionsQueryParamMetadata](../../models/operations/counttransactionsqueryparammetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `Reference` | **string* | :heavy_minus_sign: | Filter transactions by reference field. | ref:001 | | `Source` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account at source (regular expression placed between ^ and $). | users:001 | | `StartTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
| | diff --git a/docs/models/operations/getholdsmetadata.md b/docs/models/operations/getholdsqueryparammetadata.md similarity index 88% rename from docs/models/operations/getholdsmetadata.md rename to docs/models/operations/getholdsqueryparammetadata.md index 03207d0..ff0358f 100755 --- a/docs/models/operations/getholdsmetadata.md +++ b/docs/models/operations/getholdsqueryparammetadata.md @@ -1,4 +1,4 @@ -# GetHoldsMetadata +# GetHoldsQueryParamMetadata Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. diff --git a/docs/models/operations/getholdsrequest.md b/docs/models/operations/getholdsrequest.md index 0c14942..68dee67 100755 --- a/docs/models/operations/getholdsrequest.md +++ b/docs/models/operations/getholdsrequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `Metadata` | [*GetHoldsMetadata](../../models/operations/getholdsmetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.GetHoldsQueryParamMetadata](../../models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | | `WalletID` | **string* | :heavy_minus_sign: | The wallet to filter on | | \ No newline at end of file diff --git a/docs/models/operations/insertconfigresponse.md b/docs/models/operations/insertconfigresponse.md index 48b6313..0a04c5b 100755 --- a/docs/models/operations/insertconfigresponse.md +++ b/docs/models/operations/insertconfigresponse.md @@ -8,5 +8,4 @@ | `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Config created successfully. | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `InsertConfig400TextPlainString` | **string* | :heavy_minus_sign: | Bad Request | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listaccountsbalanceoperator.md b/docs/models/operations/listaccountsbalanceoperator.md deleted file mode 100755 index 3fde0e9..0000000 --- a/docs/models/operations/listaccountsbalanceoperator.md +++ /dev/null @@ -1,16 +0,0 @@ -# ListAccountsBalanceOperator - -Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. - - - -## Values - -| Name | Value | -| -------------------------------- | -------------------------------- | -| `ListAccountsBalanceOperatorGte` | gte | -| `ListAccountsBalanceOperatorLte` | lte | -| `ListAccountsBalanceOperatorGt` | gt | -| `ListAccountsBalanceOperatorLt` | lt | -| `ListAccountsBalanceOperatorE` | e | -| `ListAccountsBalanceOperatorNe` | ne | \ No newline at end of file diff --git a/docs/models/operations/listaccountsrequest.md b/docs/models/operations/listaccountsrequest.md index 69d701a..fd85753 100755 --- a/docs/models/operations/listaccountsrequest.md +++ b/docs/models/operations/listaccountsrequest.md @@ -8,11 +8,11 @@ | `Address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | | `After` | **string* | :heavy_minus_sign: | Pagination cursor, will return accounts after given address, in descending order. | users:003 | | `Balance` | **int64* | :heavy_minus_sign: | Filter accounts by their balance (default operator is gte) | 2400 | -| `BalanceOperator` | [*ListAccountsBalanceOperator](../../models/operations/listaccountsbalanceoperator.md) | :heavy_minus_sign: | Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
| gte | -| ~~`BalanceOperatorDeprecated`~~ | [*ListAccountsBalanceOperator](../../models/operations/listaccountsbalanceoperator.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
Deprecated, please use `balanceOperator` instead.
| gte | +| `BalanceOperator` | [*operations.BalanceOperator](../../models/operations/balanceoperator.md) | :heavy_minus_sign: | Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
| gte | +| ~~`BalanceOperatorDeprecated`~~ | [*operations.QueryParamBalanceOperator](../../models/operations/queryparambalanceoperator.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
Deprecated, please use `balanceOperator` instead.
| gte | | `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Metadata` | [*ListAccountsMetadata](../../models/operations/listaccountsmetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.QueryParamMetadata](../../models/operations/queryparammetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | | ~~`PageSizeDeprecated`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The maximum number of results to return per page.
Deprecated, please use `pageSize` instead.
| | | ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use `cursor` instead.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | \ No newline at end of file diff --git a/docs/models/operations/listtransactionsmetadata.md b/docs/models/operations/listtransactionsqueryparammetadata.md similarity index 86% rename from docs/models/operations/listtransactionsmetadata.md rename to docs/models/operations/listtransactionsqueryparammetadata.md index 05efc52..4eddb2c 100755 --- a/docs/models/operations/listtransactionsmetadata.md +++ b/docs/models/operations/listtransactionsqueryparammetadata.md @@ -1,4 +1,4 @@ -# ListTransactionsMetadata +# ListTransactionsQueryParamMetadata Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. diff --git a/docs/models/operations/listtransactionsrequest.md b/docs/models/operations/listtransactionsrequest.md index ffa8abf..611422d 100755 --- a/docs/models/operations/listtransactionsrequest.md +++ b/docs/models/operations/listtransactionsrequest.md @@ -12,7 +12,7 @@ | `EndTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
| | | ~~`EndTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use `endTime` instead.
| | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Metadata` | [*ListTransactionsMetadata](../../models/operations/listtransactionsmetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.ListTransactionsQueryParamMetadata](../../models/operations/listtransactionsqueryparammetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | | ~~`PageSizeDeprecated`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The maximum number of results to return per page.
Deprecated, please use `pageSize` instead.
| | | ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use `cursor` instead.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | diff --git a/docs/models/operations/listwalletsmetadata.md b/docs/models/operations/listwalletsqueryparammetadata.md similarity index 87% rename from docs/models/operations/listwalletsmetadata.md rename to docs/models/operations/listwalletsqueryparammetadata.md index 87c27b5..8344d3b 100755 --- a/docs/models/operations/listwalletsmetadata.md +++ b/docs/models/operations/listwalletsqueryparammetadata.md @@ -1,4 +1,4 @@ -# ListWalletsMetadata +# ListWalletsQueryParamMetadata Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. diff --git a/docs/models/operations/listwalletsrequest.md b/docs/models/operations/listwalletsrequest.md index 370355b..f6e21b4 100755 --- a/docs/models/operations/listwalletsrequest.md +++ b/docs/models/operations/listwalletsrequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `Metadata` | [*ListWalletsMetadata](../../models/operations/listwalletsmetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.ListWalletsQueryParamMetadata](../../models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `Name` | **string* | :heavy_minus_sign: | Filter on wallet name | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | \ No newline at end of file diff --git a/docs/models/operations/listaccountsmetadata.md b/docs/models/operations/metadata.md similarity index 90% rename from docs/models/operations/listaccountsmetadata.md rename to docs/models/operations/metadata.md index 6136598..61d5d5c 100755 --- a/docs/models/operations/listaccountsmetadata.md +++ b/docs/models/operations/metadata.md @@ -1,4 +1,4 @@ -# ListAccountsMetadata +# Metadata Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. diff --git a/docs/models/operations/queryparambalanceoperator.md b/docs/models/operations/queryparambalanceoperator.md new file mode 100755 index 0000000..96dd59e --- /dev/null +++ b/docs/models/operations/queryparambalanceoperator.md @@ -0,0 +1,17 @@ +# QueryParamBalanceOperator + +Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. +Deprecated, please use `balanceOperator` instead. + + + +## Values + +| Name | Value | +| ------------------------------ | ------------------------------ | +| `QueryParamBalanceOperatorGte` | gte | +| `QueryParamBalanceOperatorLte` | lte | +| `QueryParamBalanceOperatorGt` | gt | +| `QueryParamBalanceOperatorLt` | lt | +| `QueryParamBalanceOperatorE` | e | +| `QueryParamBalanceOperatorNe` | ne | \ No newline at end of file diff --git a/docs/models/operations/countaccountsmetadata.md b/docs/models/operations/queryparammetadata.md similarity index 90% rename from docs/models/operations/countaccountsmetadata.md rename to docs/models/operations/queryparammetadata.md index aa8a196..ccdbb1b 100755 --- a/docs/models/operations/countaccountsmetadata.md +++ b/docs/models/operations/queryparammetadata.md @@ -1,4 +1,4 @@ -# CountAccountsMetadata +# QueryParamMetadata Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. diff --git a/docs/models/operations/updatewalletrequest.md b/docs/models/operations/updatewalletrequest.md index 17fbf65..2d398d3 100755 --- a/docs/models/operations/updatewalletrequest.md +++ b/docs/models/operations/updatewalletrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `RequestBody` | [*UpdateWalletRequestBody](../../models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `RequestBody` | [*operations.UpdateWalletRequestBody](../../models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/account.md b/docs/models/shared/account.md index a1833cb..f811fd9 100755 --- a/docs/models/shared/account.md +++ b/docs/models/shared/account.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Metadata` | [*AccountMetadata](../../models/shared/accountmetadata.md) | :heavy_minus_sign: | N/A | | -| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | +| `Metadata` | [*shared.Metadata](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | \ No newline at end of file diff --git a/docs/models/shared/accountresponse.md b/docs/models/shared/accountresponse.md index b4f1f6e..5ed40dc 100755 --- a/docs/models/shared/accountresponse.md +++ b/docs/models/shared/accountresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Data` | [AccountWithVolumesAndBalances](../../models/shared/accountwithvolumesandbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `Data` | [shared.AccountWithVolumesAndBalances](../../models/shared/accountwithvolumesandbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursor.md b/docs/models/shared/accountscursor.md index d0cca6e..3c7b9a5 100755 --- a/docs/models/shared/accountscursor.md +++ b/docs/models/shared/accountscursor.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Cursor` | [AccountsCursorCursor](../../models/shared/accountscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `Cursor` | [shared.Cursor](../../models/shared/cursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursorcursor.md b/docs/models/shared/accountscursorcursor.md deleted file mode 100755 index 1996d8c..0000000 --- a/docs/models/shared/accountscursorcursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountsCursorCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Data` | [][PaymentsAccount](../../models/shared/paymentsaccount.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/accountscursorresponse.md b/docs/models/shared/accountscursorresponse.md index 9aca72f..b219113 100755 --- a/docs/models/shared/accountscursorresponse.md +++ b/docs/models/shared/accountscursorresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `Cursor` | [AccountsCursorResponseCursor](../../models/shared/accountscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `Cursor` | [shared.AccountsCursorResponseCursor](../../models/shared/accountscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursorresponsecursor.md b/docs/models/shared/accountscursorresponsecursor.md index 0e026a1..398c5aa 100755 --- a/docs/models/shared/accountscursorresponsecursor.md +++ b/docs/models/shared/accountscursorresponsecursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][Account](../../models/shared/account.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Data` | [][shared.Account](../../models/shared/account.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/accountwithvolumesandbalances.md b/docs/models/shared/accountwithvolumesandbalances.md index 4ee3890..135d8e3 100755 --- a/docs/models/shared/accountwithvolumesandbalances.md +++ b/docs/models/shared/accountwithvolumesandbalances.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | -| `Metadata` | [*AccountWithVolumesAndBalancesMetadata](../../models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | | -| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | -| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | +| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | +| `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | | +| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | +| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | \ No newline at end of file diff --git a/docs/models/shared/attempt.md b/docs/models/shared/attempt.md index 6ea7311..71bcccc 100755 --- a/docs/models/shared/attempt.md +++ b/docs/models/shared/attempt.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `Config` | [*WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_minus_sign: | N/A | | -| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `ID` | **string* | :heavy_minus_sign: | N/A | | -| `NextRetryAfter` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `Payload` | **string* | :heavy_minus_sign: | N/A | {"data":"test"} | -| `RetryAttempt` | **int64* | :heavy_minus_sign: | N/A | 1 | -| `Status` | **string* | :heavy_minus_sign: | N/A | success | -| `StatusCode` | **int64* | :heavy_minus_sign: | N/A | 200 | -| `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `WebhookID` | **string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `Config` | [*shared.WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_minus_sign: | N/A | | +| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `ID` | **string* | :heavy_minus_sign: | N/A | | +| `NextRetryAfter` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `Payload` | **string* | :heavy_minus_sign: | N/A | {"data":"test"} | +| `RetryAttempt` | **int64* | :heavy_minus_sign: | N/A | 1 | +| `Status` | **string* | :heavy_minus_sign: | N/A | success | +| `StatusCode` | **int64* | :heavy_minus_sign: | N/A | 200 | +| `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `WebhookID` | **string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/attemptresponse.md b/docs/models/shared/attemptresponse.md index 6d45062..9beee6d 100755 --- a/docs/models/shared/attemptresponse.md +++ b/docs/models/shared/attemptresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `Data` | [Attempt](../../models/shared/attempt.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `Data` | [shared.Attempt](../../models/shared/attempt.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balances.md b/docs/models/shared/balances.md new file mode 100755 index 0000000..aefe689 --- /dev/null +++ b/docs/models/shared/balances.md @@ -0,0 +1,8 @@ +# Balances + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Main` | [shared.AssetHolder](../../models/shared/assetholder.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balancescursorresponse.md b/docs/models/shared/balancescursorresponse.md index ca5a06c..aefd374 100755 --- a/docs/models/shared/balancescursorresponse.md +++ b/docs/models/shared/balancescursorresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `Cursor` | [BalancesCursorResponseCursor](../../models/shared/balancescursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `Cursor` | [shared.BalancesCursorResponseCursor](../../models/shared/balancescursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/client.md b/docs/models/shared/client.md index 56a6972..5dbeeb2 100755 --- a/docs/models/shared/client.md +++ b/docs/models/shared/client.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `Description` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | -| `Name` | *string* | :heavy_check_mark: | N/A | -| `PostLogoutRedirectUris` | []*string* | :heavy_minus_sign: | N/A | -| `Public` | **bool* | :heavy_minus_sign: | N/A | -| `RedirectUris` | []*string* | :heavy_minus_sign: | N/A | -| `Scopes` | []*string* | :heavy_minus_sign: | N/A | -| `Secrets` | [][ClientSecret](../../models/shared/clientsecret.md) | :heavy_minus_sign: | N/A | -| `Trusted` | **bool* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `Description` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `PostLogoutRedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Public` | **bool* | :heavy_minus_sign: | N/A | +| `RedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Scopes` | []*string* | :heavy_minus_sign: | N/A | +| `Secrets` | [][shared.ClientSecret](../../models/shared/clientsecret.md) | :heavy_minus_sign: | N/A | +| `Trusted` | **bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/config.md b/docs/models/shared/config.md index 12bb551..c094fba 100755 --- a/docs/models/shared/config.md +++ b/docs/models/shared/config.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `Storage` | [LedgerStorage](../../models/shared/ledgerstorage.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `Storage` | [shared.LedgerStorage](../../models/shared/ledgerstorage.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configinfo.md b/docs/models/shared/configinfo.md index a62aa54..2ff2756 100755 --- a/docs/models/shared/configinfo.md +++ b/docs/models/shared/configinfo.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `Config` | [Config](../../models/shared/config.md) | :heavy_check_mark: | N/A | -| `Server` | *string* | :heavy_check_mark: | N/A | -| `Version` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `Config` | [shared.Config](../../models/shared/config.md) | :heavy_check_mark: | N/A | +| `Server` | *string* | :heavy_check_mark: | N/A | +| `Version` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configinforesponse.md b/docs/models/shared/configinforesponse.md index 9a707e9..be67d97 100755 --- a/docs/models/shared/configinforesponse.md +++ b/docs/models/shared/configinforesponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `Data` | [ConfigInfo](../../models/shared/configinfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `Data` | [shared.ConfigInfo](../../models/shared/configinfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configresponse.md b/docs/models/shared/configresponse.md index b5922c9..a65f1fe 100755 --- a/docs/models/shared/configresponse.md +++ b/docs/models/shared/configresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `Data` | [WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `Data` | [shared.WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configsresponse.md b/docs/models/shared/configsresponse.md index 1c7f68e..126ba3f 100755 --- a/docs/models/shared/configsresponse.md +++ b/docs/models/shared/configsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `Cursor` | [ConfigsResponseCursor](../../models/shared/configsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `Cursor` | [shared.ConfigsResponseCursor](../../models/shared/configsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configsresponsecursor.md b/docs/models/shared/configsresponsecursor.md index aaed2eb..fbb63ae 100755 --- a/docs/models/shared/configsresponsecursor.md +++ b/docs/models/shared/configsresponsecursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `Data` | [][WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `Data` | [][shared.WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/connectorconfigresponse.md b/docs/models/shared/connectorconfigresponse.md index c77d29e..c12f1c9 100755 --- a/docs/models/shared/connectorconfigresponse.md +++ b/docs/models/shared/connectorconfigresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `Data` | [ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `Data` | [shared.ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponse.md b/docs/models/shared/connectorsconfigsresponse.md index dec57cc..333e065 100755 --- a/docs/models/shared/connectorsconfigsresponse.md +++ b/docs/models/shared/connectorsconfigsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Data` | [ConnectorsConfigsResponseData](../../models/shared/connectorsconfigsresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `Data` | [shared.Data](../../models/shared/data.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponseconnector.md b/docs/models/shared/connectorsconfigsresponseconnector.md new file mode 100755 index 0000000..bf37053 --- /dev/null +++ b/docs/models/shared/connectorsconfigsresponseconnector.md @@ -0,0 +1,8 @@ +# ConnectorsConfigsResponseConnector + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `Key` | [shared.Key](../../models/shared/key.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponsedata.md b/docs/models/shared/connectorsconfigsresponsedata.md deleted file mode 100755 index 0adc62b..0000000 --- a/docs/models/shared/connectorsconfigsresponsedata.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConnectorsConfigsResponseData - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `Connector` | [ConnectorsConfigsResponseDataConnector](../../models/shared/connectorsconfigsresponsedataconnector.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponsedataconnector.md b/docs/models/shared/connectorsconfigsresponsedataconnector.md deleted file mode 100755 index a31c7a6..0000000 --- a/docs/models/shared/connectorsconfigsresponsedataconnector.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConnectorsConfigsResponseDataConnector - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `Key` | [ConnectorsConfigsResponseDataConnectorKey](../../models/shared/connectorsconfigsresponsedataconnectorkey.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsresponse.md b/docs/models/shared/connectorsresponse.md index 6c40408..04d8b8d 100755 --- a/docs/models/shared/connectorsresponse.md +++ b/docs/models/shared/connectorsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Data` | [][ConnectorsResponseData](../../models/shared/connectorsresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `Data` | [][shared.ConnectorsResponseData](../../models/shared/connectorsresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsresponsedata.md b/docs/models/shared/connectorsresponsedata.md index cbef222..48f5789 100755 --- a/docs/models/shared/connectorsresponsedata.md +++ b/docs/models/shared/connectorsresponsedata.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `Enabled` | **bool* | :heavy_minus_sign: | N/A | true | -| `Provider` | [*Connector](../../models/shared/connector.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Enabled` | **bool* | :heavy_minus_sign: | N/A | true | +| `Provider` | [*shared.Connector](../../models/shared/connector.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/contract.md b/docs/models/shared/contract.md index 1eb000c..4d86582 100755 --- a/docs/models/shared/contract.md +++ b/docs/models/shared/contract.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `Account` | **string* | :heavy_minus_sign: | N/A | users:001 | -| `Expr` | [ContractExpr](../../models/shared/contractexpr.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `Account` | **string* | :heavy_minus_sign: | N/A | users:001 | +| `Expr` | [shared.Expr](../../models/shared/expr.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/createbalanceresponse.md b/docs/models/shared/createbalanceresponse.md index b85aa5a..b69c01a 100755 --- a/docs/models/shared/createbalanceresponse.md +++ b/docs/models/shared/createbalanceresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `Data` | [Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `Data` | [shared.Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createclientresponse.md b/docs/models/shared/createclientresponse.md index 10c2816..c4d36ba 100755 --- a/docs/models/shared/createclientresponse.md +++ b/docs/models/shared/createclientresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `Data` | [*Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `Data` | [*shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createscoperesponse.md b/docs/models/shared/createscoperesponse.md index 9f23804..9688352 100755 --- a/docs/models/shared/createscoperesponse.md +++ b/docs/models/shared/createscoperesponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `Data` | [*Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Data` | [*shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createsecretresponse.md b/docs/models/shared/createsecretresponse.md index 51482f9..3e1febe 100755 --- a/docs/models/shared/createsecretresponse.md +++ b/docs/models/shared/createsecretresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `Data` | [*Secret](../../models/shared/secret.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `Data` | [*shared.Secret](../../models/shared/secret.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createwalletresponse.md b/docs/models/shared/createwalletresponse.md index 5eb60a4..9df0309 100755 --- a/docs/models/shared/createwalletresponse.md +++ b/docs/models/shared/createwalletresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `Data` | [Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `Data` | [shared.Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createworkflowresponse.md b/docs/models/shared/createworkflowresponse.md index 65db51a..4be2b1a 100755 --- a/docs/models/shared/createworkflowresponse.md +++ b/docs/models/shared/createworkflowresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `Data` | [Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Data` | [shared.Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/creditwalletrequest.md b/docs/models/shared/creditwalletrequest.md index 9d5887f..90d9824 100755 --- a/docs/models/shared/creditwalletrequest.md +++ b/docs/models/shared/creditwalletrequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `Amount` | [Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | -| `Balance` | **string* | :heavy_minus_sign: | The balance to credit | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | -| `Reference` | **string* | :heavy_minus_sign: | N/A | -| `Sources` | [][Subject](../../models/shared/subject.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Amount` | [shared.Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | +| `Balance` | **string* | :heavy_minus_sign: | The balance to credit | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | +| `Reference` | **string* | :heavy_minus_sign: | N/A | +| `Sources` | [][shared.Subject](../../models/shared/subject.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/cursor.md b/docs/models/shared/cursor.md new file mode 100755 index 0000000..28ad745 --- /dev/null +++ b/docs/models/shared/cursor.md @@ -0,0 +1,12 @@ +# Cursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `Data` | [][shared.PaymentsAccount](../../models/shared/paymentsaccount.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/data.md b/docs/models/shared/data.md new file mode 100755 index 0000000..ba73421 --- /dev/null +++ b/docs/models/shared/data.md @@ -0,0 +1,8 @@ +# Data + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `Connector` | [shared.ConnectorsConfigsResponseConnector](../../models/shared/connectorsconfigsresponseconnector.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/debitwalletrequest.md b/docs/models/shared/debitwalletrequest.md index a6c8f31..b338ef6 100755 --- a/docs/models/shared/debitwalletrequest.md +++ b/docs/models/shared/debitwalletrequest.md @@ -5,9 +5,9 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `Amount` | [Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | +| `Amount` | [shared.Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | | `Balances` | []*string* | :heavy_minus_sign: | N/A | | `Description` | **string* | :heavy_minus_sign: | N/A | -| `Destination` | [*Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | +| `Destination` | [*shared.Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | | `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | | `Pending` | **bool* | :heavy_minus_sign: | Set to true to create a pending hold. If false, the wallet will be debited immediately. | \ No newline at end of file diff --git a/docs/models/shared/debitwalletresponse.md b/docs/models/shared/debitwalletresponse.md index 4b4073f..3daf662 100755 --- a/docs/models/shared/debitwalletresponse.md +++ b/docs/models/shared/debitwalletresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `Data` | [Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `Data` | [shared.Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskbankingcircledescriptor.md b/docs/models/shared/descriptor.md similarity index 92% rename from docs/models/shared/taskbankingcircledescriptor.md rename to docs/models/shared/descriptor.md index 1455551..519ad63 100755 --- a/docs/models/shared/taskbankingcircledescriptor.md +++ b/docs/models/shared/descriptor.md @@ -1,4 +1,4 @@ -# TaskBankingCircleDescriptor +# Descriptor ## Fields diff --git a/docs/models/shared/error.md b/docs/models/shared/error.md index c152dac..a02a088 100755 --- a/docs/models/shared/error.md +++ b/docs/models/shared/error.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `ErrorCode` | [ErrorErrorCode](../../models/shared/errorerrorcode.md) | :heavy_check_mark: | N/A | -| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `ErrorCode` | [shared.ErrorCode](../../models/shared/errorcode.md) | :heavy_check_mark: | N/A | +| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/errorcode.md b/docs/models/shared/errorcode.md new file mode 100755 index 0000000..e429932 --- /dev/null +++ b/docs/models/shared/errorcode.md @@ -0,0 +1,8 @@ +# ErrorCode + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `ErrorCodeValidation` | VALIDATION | \ No newline at end of file diff --git a/docs/models/shared/errorerrorcode.md b/docs/models/shared/errorerrorcode.md deleted file mode 100755 index d0e0c2e..0000000 --- a/docs/models/shared/errorerrorcode.md +++ /dev/null @@ -1,8 +0,0 @@ -# ErrorErrorCode - - -## Values - -| Name | Value | -| -------------------------- | -------------------------- | -| `ErrorErrorCodeValidation` | VALIDATION | \ No newline at end of file diff --git a/docs/models/shared/errorresponse.md b/docs/models/shared/errorresponse.md index e5c2360..a9ca124 100755 --- a/docs/models/shared/errorresponse.md +++ b/docs/models/shared/errorresponse.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | -| `ErrorCode` | [*ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | +| `ErrorCode` | [*shared.ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | | `ErrorMessage` | **string* | :heavy_minus_sign: | N/A | [INSUFFICIENT_FUND] account had insufficient funds | \ No newline at end of file diff --git a/docs/models/shared/expandeddebithold.md b/docs/models/shared/expandeddebithold.md index f707b67..176c61d 100755 --- a/docs/models/shared/expandeddebithold.md +++ b/docs/models/shared/expandeddebithold.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `Description` | *string* | :heavy_check_mark: | N/A | | -| `Destination` | [*Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | | +| `Destination` | [*shared.Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | | | `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | | | `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | | | `OriginalAmount` | *int64* | :heavy_check_mark: | Original amount on hold | 100 | diff --git a/docs/models/shared/paymentraw.md b/docs/models/shared/expr.md similarity index 90% rename from docs/models/shared/paymentraw.md rename to docs/models/shared/expr.md index e884afe..4cd8556 100755 --- a/docs/models/shared/paymentraw.md +++ b/docs/models/shared/expr.md @@ -1,4 +1,4 @@ -# PaymentRaw +# Expr ## Fields diff --git a/docs/models/shared/getbalanceresponse.md b/docs/models/shared/getbalanceresponse.md index 48e4695..3c5184a 100755 --- a/docs/models/shared/getbalanceresponse.md +++ b/docs/models/shared/getbalanceresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `Data` | [BalanceWithAssets](../../models/shared/balancewithassets.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `Data` | [shared.BalanceWithAssets](../../models/shared/balancewithassets.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdresponse.md b/docs/models/shared/getholdresponse.md index d559f57..adfac8c 100755 --- a/docs/models/shared/getholdresponse.md +++ b/docs/models/shared/getholdresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `Data` | [ExpandedDebitHold](../../models/shared/expandeddebithold.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `Data` | [shared.ExpandedDebitHold](../../models/shared/expandeddebithold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdsresponse.md b/docs/models/shared/getholdsresponse.md index 8988694..e640434 100755 --- a/docs/models/shared/getholdsresponse.md +++ b/docs/models/shared/getholdsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Cursor` | [GetHoldsResponseCursor](../../models/shared/getholdsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `Cursor` | [shared.GetHoldsResponseCursor](../../models/shared/getholdsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdsresponsecursor.md b/docs/models/shared/getholdsresponsecursor.md index b1729f3..bc54666 100755 --- a/docs/models/shared/getholdsresponsecursor.md +++ b/docs/models/shared/getholdsresponsecursor.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | | +| `Data` | [][shared.Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | | | `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | | `Next` | **string* | :heavy_minus_sign: | N/A | | | `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | diff --git a/docs/models/shared/gettransactionsresponse.md b/docs/models/shared/gettransactionsresponse.md index d297608..5e6de4d 100755 --- a/docs/models/shared/gettransactionsresponse.md +++ b/docs/models/shared/gettransactionsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Cursor` | [GetTransactionsResponseCursor](../../models/shared/gettransactionsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.GetTransactionsResponseCursor](../../models/shared/gettransactionsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/gettransactionsresponsecursor.md b/docs/models/shared/gettransactionsresponsecursor.md index 4c19542..57fbb6c 100755 --- a/docs/models/shared/gettransactionsresponsecursor.md +++ b/docs/models/shared/gettransactionsresponsecursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `Data` | [][WalletsTransaction](../../models/shared/walletstransaction.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `Data` | [][shared.WalletsTransaction](../../models/shared/walletstransaction.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/getwalletresponse.md b/docs/models/shared/getwalletresponse.md index b00a1d2..37305d6 100755 --- a/docs/models/shared/getwalletresponse.md +++ b/docs/models/shared/getwalletresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Data` | [WalletWithBalances](../../models/shared/walletwithbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `Data` | [shared.WalletWithBalances](../../models/shared/walletwithbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getworkflowoccurrenceresponse.md b/docs/models/shared/getworkflowoccurrenceresponse.md index dbc0893..691f3ea 100755 --- a/docs/models/shared/getworkflowoccurrenceresponse.md +++ b/docs/models/shared/getworkflowoccurrenceresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Data` | [WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `Data` | [shared.WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getworkflowresponse.md b/docs/models/shared/getworkflowresponse.md index 1139677..b9cc161 100755 --- a/docs/models/shared/getworkflowresponse.md +++ b/docs/models/shared/getworkflowresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `Data` | [Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Data` | [shared.Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/hold.md b/docs/models/shared/hold.md index d6f3f32..56b4f50 100755 --- a/docs/models/shared/hold.md +++ b/docs/models/shared/hold.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `Description` | *string* | :heavy_check_mark: | N/A | -| `Destination` | [*Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | +| `Destination` | [*shared.Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | | `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | | `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | | `WalletID` | *string* | :heavy_check_mark: | The ID of the wallet the hold is associated with. | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponsedataconnectorkey.md b/docs/models/shared/key.md similarity index 89% rename from docs/models/shared/connectorsconfigsresponsedataconnectorkey.md rename to docs/models/shared/key.md index 147c99c..6c9c13e 100755 --- a/docs/models/shared/connectorsconfigsresponsedataconnectorkey.md +++ b/docs/models/shared/key.md @@ -1,4 +1,4 @@ -# ConnectorsConfigsResponseDataConnectorKey +# Key ## Fields diff --git a/docs/models/shared/ledgerinfo.md b/docs/models/shared/ledgerinfo.md index 137b63a..8d428d7 100755 --- a/docs/models/shared/ledgerinfo.md +++ b/docs/models/shared/ledgerinfo.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `Name` | **string* | :heavy_minus_sign: | N/A | ledger001 | -| `Storage` | [*LedgerInfoStorage](../../models/shared/ledgerinfostorage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Name` | **string* | :heavy_minus_sign: | N/A | ledger001 | +| `Storage` | [*shared.Storage](../../models/shared/storage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/ledgerinforesponse.md b/docs/models/shared/ledgerinforesponse.md index b2c4262..36ab229 100755 --- a/docs/models/shared/ledgerinforesponse.md +++ b/docs/models/shared/ledgerinforesponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Data` | [*LedgerInfo](../../models/shared/ledgerinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Data` | [*shared.LedgerInfo](../../models/shared/ledgerinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ledgerinfostorage.md b/docs/models/shared/ledgerinfostorage.md deleted file mode 100755 index 2d93d7e..0000000 --- a/docs/models/shared/ledgerinfostorage.md +++ /dev/null @@ -1,8 +0,0 @@ -# LedgerInfoStorage - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `Migrations` | [][MigrationInfo](../../models/shared/migrationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listbalancesresponse.md b/docs/models/shared/listbalancesresponse.md index 6238acc..3710e46 100755 --- a/docs/models/shared/listbalancesresponse.md +++ b/docs/models/shared/listbalancesresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `Cursor` | [ListBalancesResponseCursor](../../models/shared/listbalancesresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `Cursor` | [shared.ListBalancesResponseCursor](../../models/shared/listbalancesresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listbalancesresponsecursor.md b/docs/models/shared/listbalancesresponsecursor.md index 6b71dd2..6bd4986 100755 --- a/docs/models/shared/listbalancesresponsecursor.md +++ b/docs/models/shared/listbalancesresponsecursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Data` | [][shared.Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listclientsresponse.md b/docs/models/shared/listclientsresponse.md index ada6d7e..cc5c46b 100755 --- a/docs/models/shared/listclientsresponse.md +++ b/docs/models/shared/listclientsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `Data` | [][Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `Data` | [][shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listrunsresponse.md b/docs/models/shared/listrunsresponse.md index 840e482..2c7df0b 100755 --- a/docs/models/shared/listrunsresponse.md +++ b/docs/models/shared/listrunsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Cursor` | [ListRunsResponseCursor](../../models/shared/listrunsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `Cursor` | [shared.ListRunsResponseCursor](../../models/shared/listrunsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listrunsresponsecursor.md b/docs/models/shared/listrunsresponsecursor.md index cedb73b..9dee1e9 100755 --- a/docs/models/shared/listrunsresponsecursor.md +++ b/docs/models/shared/listrunsresponsecursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `Data` | [][WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `Data` | [][shared.WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listscopesresponse.md b/docs/models/shared/listscopesresponse.md index e2e0f37..21d767c 100755 --- a/docs/models/shared/listscopesresponse.md +++ b/docs/models/shared/listscopesresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `Data` | [][Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `Data` | [][shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listusersresponse.md b/docs/models/shared/listusersresponse.md index e4586af..7f4b2ac 100755 --- a/docs/models/shared/listusersresponse.md +++ b/docs/models/shared/listusersresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `Data` | [][User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [][shared.User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listwalletsresponse.md b/docs/models/shared/listwalletsresponse.md index c28c056..6d562b5 100755 --- a/docs/models/shared/listwalletsresponse.md +++ b/docs/models/shared/listwalletsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `Cursor` | [ListWalletsResponseCursor](../../models/shared/listwalletsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `Cursor` | [shared.ListWalletsResponseCursor](../../models/shared/listwalletsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listwalletsresponsecursor.md b/docs/models/shared/listwalletsresponsecursor.md index 63f0972..3baa1cb 100755 --- a/docs/models/shared/listwalletsresponsecursor.md +++ b/docs/models/shared/listwalletsresponsecursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `Data` | [][shared.Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listworkflowsresponse.md b/docs/models/shared/listworkflowsresponse.md index 7986d2b..4461bec 100755 --- a/docs/models/shared/listworkflowsresponse.md +++ b/docs/models/shared/listworkflowsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `Data` | [][Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Data` | [][shared.Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/log.md b/docs/models/shared/log.md index 73b1e4e..8ff13c4 100755 --- a/docs/models/shared/log.md +++ b/docs/models/shared/log.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `Data` | [LogData](../../models/shared/logdata.md) | :heavy_check_mark: | N/A | | +| `Data` | [shared.LogData](../../models/shared/logdata.md) | :heavy_check_mark: | N/A | | | `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | | `Hash` | *string* | :heavy_check_mark: | N/A | 9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e | | `ID` | *int64* | :heavy_check_mark: | N/A | 1234 | -| `Type` | [LogType](../../models/shared/logtype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `Type` | [shared.Type](../../models/shared/type.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/logscursorresponse.md b/docs/models/shared/logscursorresponse.md index 322cd96..5010936 100755 --- a/docs/models/shared/logscursorresponse.md +++ b/docs/models/shared/logscursorresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Cursor` | [LogsCursorResponseCursor](../../models/shared/logscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `Cursor` | [shared.LogsCursorResponseCursor](../../models/shared/logscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/logscursorresponsecursor.md b/docs/models/shared/logscursorresponsecursor.md index 03fc795..75c947f 100755 --- a/docs/models/shared/logscursorresponsecursor.md +++ b/docs/models/shared/logscursorresponsecursor.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][Log](../../models/shared/log.md) | :heavy_check_mark: | N/A | | +| `Data` | [][shared.Log](../../models/shared/log.md) | :heavy_check_mark: | N/A | | | `HasMore` | *bool* | :heavy_check_mark: | N/A | false | | `Next` | **string* | :heavy_minus_sign: | N/A | | | `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | diff --git a/docs/models/shared/logtype.md b/docs/models/shared/logtype.md deleted file mode 100755 index 400bcd3..0000000 --- a/docs/models/shared/logtype.md +++ /dev/null @@ -1,9 +0,0 @@ -# LogType - - -## Values - -| Name | Value | -| ----------------------- | ----------------------- | -| `LogTypeNewTransaction` | NEW_TRANSACTION | -| `LogTypeSetMetadata` | SET_METADATA | \ No newline at end of file diff --git a/docs/models/shared/mapping.md b/docs/models/shared/mapping.md index 64bfeb7..7133093 100755 --- a/docs/models/shared/mapping.md +++ b/docs/models/shared/mapping.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `Contracts` | [][Contract](../../models/shared/contract.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Contracts` | [][shared.Contract](../../models/shared/contract.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/mappingresponse.md b/docs/models/shared/mappingresponse.md index fc23a2c..7ccb321 100755 --- a/docs/models/shared/mappingresponse.md +++ b/docs/models/shared/mappingresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `Data` | [*Mapping](../../models/shared/mapping.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Data` | [*shared.Mapping](../../models/shared/mapping.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/scriptvars.md b/docs/models/shared/metadata.md similarity index 90% rename from docs/models/shared/scriptvars.md rename to docs/models/shared/metadata.md index 285f3df..e655f58 100755 --- a/docs/models/shared/scriptvars.md +++ b/docs/models/shared/metadata.md @@ -1,4 +1,4 @@ -# ScriptVars +# Metadata ## Fields diff --git a/docs/models/shared/migrationinfo.md b/docs/models/shared/migrationinfo.md index 25f2551..e13f964 100755 --- a/docs/models/shared/migrationinfo.md +++ b/docs/models/shared/migrationinfo.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `Date` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `Name` | **string* | :heavy_minus_sign: | N/A | migrations:001 | -| `State` | [*MigrationInfoState](../../models/shared/migrationinfostate.md) | :heavy_minus_sign: | N/A | | -| `Version` | **int64* | :heavy_minus_sign: | N/A | 11 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Date` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `Name` | **string* | :heavy_minus_sign: | N/A | migrations:001 | +| `State` | [*shared.State](../../models/shared/state.md) | :heavy_minus_sign: | N/A | | +| `Version` | **int64* | :heavy_minus_sign: | N/A | 11 | \ No newline at end of file diff --git a/docs/models/shared/migrationinfostate.md b/docs/models/shared/migrationinfostate.md deleted file mode 100755 index 5193be7..0000000 --- a/docs/models/shared/migrationinfostate.md +++ /dev/null @@ -1,9 +0,0 @@ -# MigrationInfoState - - -## Values - -| Name | Value | -| ------------------------ | ------------------------ | -| `MigrationInfoStateToDo` | to do | -| `MigrationInfoStateDone` | done | \ No newline at end of file diff --git a/docs/models/shared/payment.md b/docs/models/shared/payment.md index 2d7c949..3ab7094 100755 --- a/docs/models/shared/payment.md +++ b/docs/models/shared/payment.md @@ -3,18 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `AccountID` | *string* | :heavy_check_mark: | N/A | | -| `Adjustments` | [][PaymentAdjustment](../../models/shared/paymentadjustment.md) | :heavy_check_mark: | N/A | | -| `Asset` | *string* | :heavy_check_mark: | N/A | USD | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `ID` | *string* | :heavy_check_mark: | N/A | XXX | -| `InitialAmount` | *int64* | :heavy_check_mark: | N/A | 100 | -| `Metadata` | [][PaymentMetadata](../../models/shared/paymentmetadata.md) | :heavy_check_mark: | N/A | | -| `Provider` | [Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | | -| `Raw` | [PaymentRaw](../../models/shared/paymentraw.md) | :heavy_check_mark: | N/A | | -| `Reference` | *string* | :heavy_check_mark: | N/A | | -| `Scheme` | [PaymentScheme](../../models/shared/paymentscheme.md) | :heavy_check_mark: | N/A | | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | -| `Type` | [PaymentType](../../models/shared/paymenttype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `AccountID` | *string* | :heavy_check_mark: | N/A | | +| `Adjustments` | [][shared.PaymentAdjustment](../../models/shared/paymentadjustment.md) | :heavy_check_mark: | N/A | | +| `Asset` | *string* | :heavy_check_mark: | N/A | USD | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `ID` | *string* | :heavy_check_mark: | N/A | XXX | +| `InitialAmount` | *int64* | :heavy_check_mark: | N/A | 100 | +| `Metadata` | [][shared.PaymentMetadata](../../models/shared/paymentmetadata.md) | :heavy_check_mark: | N/A | | +| `Provider` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | | +| `Raw` | [shared.Raw](../../models/shared/raw.md) | :heavy_check_mark: | N/A | | +| `Reference` | *string* | :heavy_check_mark: | N/A | | +| `Scheme` | [shared.Scheme](../../models/shared/scheme.md) | :heavy_check_mark: | N/A | | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | +| `Type` | [shared.PaymentType](../../models/shared/paymenttype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/paymentadjustment.md b/docs/models/shared/paymentadjustment.md index c62c064..828ffff 100755 --- a/docs/models/shared/paymentadjustment.md +++ b/docs/models/shared/paymentadjustment.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Absolute` | *bool* | :heavy_check_mark: | N/A | | -| `Amount` | *int64* | :heavy_check_mark: | N/A | 100 | -| `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Raw` | [PaymentAdjustmentRaw](../../models/shared/paymentadjustmentraw.md) | :heavy_check_mark: | N/A | | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `Absolute` | *bool* | :heavy_check_mark: | N/A | | +| `Amount` | *int64* | :heavy_check_mark: | N/A | 100 | +| `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Raw` | [shared.PaymentAdjustmentRaw](../../models/shared/paymentadjustmentraw.md) | :heavy_check_mark: | N/A | | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/paymentmetadata.md b/docs/models/shared/paymentmetadata.md index 90a1ef9..6a620be 100755 --- a/docs/models/shared/paymentmetadata.md +++ b/docs/models/shared/paymentmetadata.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `Changelog` | [*PaymentMetadataChangelog](../../models/shared/paymentmetadatachangelog.md) | :heavy_minus_sign: | N/A | -| `Key` | *string* | :heavy_check_mark: | N/A | -| `Value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `Changelog` | [*shared.PaymentMetadataChangelog](../../models/shared/paymentmetadatachangelog.md) | :heavy_minus_sign: | N/A | +| `Key` | *string* | :heavy_check_mark: | N/A | +| `Value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentresponse.md b/docs/models/shared/paymentresponse.md index ac9dc71..478476a 100755 --- a/docs/models/shared/paymentresponse.md +++ b/docs/models/shared/paymentresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `Data` | [Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `Data` | [shared.Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentsaccount.md b/docs/models/shared/paymentsaccount.md index 092dc0c..57af277 100755 --- a/docs/models/shared/paymentsaccount.md +++ b/docs/models/shared/paymentsaccount.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `Provider` | [Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | -| `Reference` | *string* | :heavy_check_mark: | N/A | -| `Type` | [PaymentsAccountType](../../models/shared/paymentsaccounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Provider` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | +| `Reference` | *string* | :heavy_check_mark: | N/A | +| `Type` | [shared.PaymentsAccountType](../../models/shared/paymentsaccounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentscheme.md b/docs/models/shared/paymentscheme.md deleted file mode 100755 index e88c62f..0000000 --- a/docs/models/shared/paymentscheme.md +++ /dev/null @@ -1,25 +0,0 @@ -# PaymentScheme - - -## Values - -| Name | Value | -| ------------------------- | ------------------------- | -| `PaymentSchemeVisa` | visa | -| `PaymentSchemeMastercard` | mastercard | -| `PaymentSchemeAmex` | amex | -| `PaymentSchemeDiners` | diners | -| `PaymentSchemeDiscover` | discover | -| `PaymentSchemeJcb` | jcb | -| `PaymentSchemeUnionpay` | unionpay | -| `PaymentSchemeSepaDebit` | sepa debit | -| `PaymentSchemeSepaCredit` | sepa credit | -| `PaymentSchemeSepa` | sepa | -| `PaymentSchemeApplePay` | apple pay | -| `PaymentSchemeGooglePay` | google pay | -| `PaymentSchemeA2a` | a2a | -| `PaymentSchemeAchDebit` | ach debit | -| `PaymentSchemeAch` | ach | -| `PaymentSchemeRtp` | rtp | -| `PaymentSchemeUnknown` | unknown | -| `PaymentSchemeOther` | other | \ No newline at end of file diff --git a/docs/models/shared/paymentscursor.md b/docs/models/shared/paymentscursor.md index 0e56d11..b414be6 100755 --- a/docs/models/shared/paymentscursor.md +++ b/docs/models/shared/paymentscursor.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Cursor` | [PaymentsCursorCursor](../../models/shared/paymentscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `Cursor` | [shared.PaymentsCursorCursor](../../models/shared/paymentscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentscursorcursor.md b/docs/models/shared/paymentscursorcursor.md index 9861aa3..1457bbc 100755 --- a/docs/models/shared/paymentscursorcursor.md +++ b/docs/models/shared/paymentscursorcursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Data` | [][shared.Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/posttransaction.md b/docs/models/shared/posttransaction.md index e5bde6d..d5d6063 100755 --- a/docs/models/shared/posttransaction.md +++ b/docs/models/shared/posttransaction.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | -| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_minus_sign: | N/A | | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Script` | [*PostTransactionScript](../../models/shared/posttransactionscript.md) | :heavy_minus_sign: | N/A | | -| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_minus_sign: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Script` | [*shared.PostTransactionScript](../../models/shared/posttransactionscript.md) | :heavy_minus_sign: | N/A | | +| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/posttransactionscript.md b/docs/models/shared/posttransactionscript.md index cf9465c..c3f03c8 100755 --- a/docs/models/shared/posttransactionscript.md +++ b/docs/models/shared/posttransactionscript.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| -| `Vars` | [*PostTransactionScriptVars](../../models/shared/posttransactionscriptvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Vars` | [*shared.PostTransactionVars](../../models/shared/posttransactionvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/posttransactionscriptvars.md b/docs/models/shared/posttransactionscriptvars.md deleted file mode 100755 index ef1a0de..0000000 --- a/docs/models/shared/posttransactionscriptvars.md +++ /dev/null @@ -1,7 +0,0 @@ -# PostTransactionScriptVars - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/responsecursordata.md b/docs/models/shared/posttransactionvars.md similarity index 85% rename from docs/models/shared/responsecursordata.md rename to docs/models/shared/posttransactionvars.md index f531979..60a90b1 100755 --- a/docs/models/shared/responsecursordata.md +++ b/docs/models/shared/posttransactionvars.md @@ -1,4 +1,4 @@ -# ResponseCursorData +# PostTransactionVars ## Fields diff --git a/docs/models/shared/contractexpr.md b/docs/models/shared/raw.md similarity index 89% rename from docs/models/shared/contractexpr.md rename to docs/models/shared/raw.md index 09a5a30..4d7c1a0 100755 --- a/docs/models/shared/contractexpr.md +++ b/docs/models/shared/raw.md @@ -1,4 +1,4 @@ -# ContractExpr +# Raw ## Fields diff --git a/docs/models/shared/readclientresponse.md b/docs/models/shared/readclientresponse.md index fb6d823..62959f6 100755 --- a/docs/models/shared/readclientresponse.md +++ b/docs/models/shared/readclientresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `Data` | [*Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `Data` | [*shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/readscoperesponse.md b/docs/models/shared/readscoperesponse.md index 49f970d..06b5123 100755 --- a/docs/models/shared/readscoperesponse.md +++ b/docs/models/shared/readscoperesponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `Data` | [*Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Data` | [*shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/readuserresponse.md b/docs/models/shared/readuserresponse.md index 2aef17f..2ece6e2 100755 --- a/docs/models/shared/readuserresponse.md +++ b/docs/models/shared/readuserresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `Data` | [*User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `Data` | [*shared.User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/response.md b/docs/models/shared/response.md index cf74e35..09df12c 100755 --- a/docs/models/shared/response.md +++ b/docs/models/shared/response.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `Cursor` | [*ResponseCursor](../../models/shared/responsecursor.md) | :heavy_minus_sign: | N/A | -| `Data` | [*ResponseData](../../models/shared/responsedata.md) | :heavy_minus_sign: | The payload | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `Cursor` | [*shared.ResponseCursor](../../models/shared/responsecursor.md) | :heavy_minus_sign: | N/A | +| `Data` | [*shared.ResponseData](../../models/shared/responsedata.md) | :heavy_minus_sign: | The payload | \ No newline at end of file diff --git a/docs/models/shared/responsecursor.md b/docs/models/shared/responsecursor.md index cea1ced..6c34e6a 100755 --- a/docs/models/shared/responsecursor.md +++ b/docs/models/shared/responsecursor.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `Data` | [][ResponseCursorData](../../models/shared/responsecursordata.md) | :heavy_minus_sign: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | | -| `Next` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | -| `PageSize` | **int64* | :heavy_minus_sign: | N/A | | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | -| `Total` | [*ResponseCursorTotal](../../models/shared/responsecursortotal.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `Data` | [][shared.ResponseSchemasData](../../models/shared/responseschemasdata.md) | :heavy_minus_sign: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | | +| `Next` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | +| `PageSize` | **int64* | :heavy_minus_sign: | N/A | | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | +| `Total` | [*shared.Total](../../models/shared/total.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/responseschemasdata.md b/docs/models/shared/responseschemasdata.md new file mode 100755 index 0000000..237b9fc --- /dev/null +++ b/docs/models/shared/responseschemasdata.md @@ -0,0 +1,7 @@ +# ResponseSchemasData + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/runworkflowresponse.md b/docs/models/shared/runworkflowresponse.md index d643e81..2e5eacb 100755 --- a/docs/models/shared/runworkflowresponse.md +++ b/docs/models/shared/runworkflowresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Data` | [WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `Data` | [shared.WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/scheme.md b/docs/models/shared/scheme.md new file mode 100755 index 0000000..7f066dc --- /dev/null +++ b/docs/models/shared/scheme.md @@ -0,0 +1,25 @@ +# Scheme + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `SchemeVisa` | visa | +| `SchemeMastercard` | mastercard | +| `SchemeAmex` | amex | +| `SchemeDiners` | diners | +| `SchemeDiscover` | discover | +| `SchemeJcb` | jcb | +| `SchemeUnionpay` | unionpay | +| `SchemeSepaDebit` | sepa debit | +| `SchemeSepaCredit` | sepa credit | +| `SchemeSepa` | sepa | +| `SchemeApplePay` | apple pay | +| `SchemeGooglePay` | google pay | +| `SchemeA2a` | a2a | +| `SchemeAchDebit` | ach debit | +| `SchemeAch` | ach | +| `SchemeRtp` | rtp | +| `SchemeUnknown` | unknown | +| `SchemeOther` | other | \ No newline at end of file diff --git a/docs/models/shared/script.md b/docs/models/shared/script.md index f10c12a..7162a57 100755 --- a/docs/models/shared/script.md +++ b/docs/models/shared/script.md @@ -8,4 +8,4 @@ | `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| | `Reference` | **string* | :heavy_minus_sign: | Reference to attach to the generated transaction | order_1234 | -| `Vars` | [*ScriptVars](../../models/shared/scriptvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Vars` | [*shared.Vars](../../models/shared/vars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/scriptresponse.md b/docs/models/shared/scriptresponse.md index 8f24996..67f1970 100755 --- a/docs/models/shared/scriptresponse.md +++ b/docs/models/shared/scriptresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | -| `ErrorCode` | [*ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | +| `ErrorCode` | [*shared.ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | | `ErrorMessage` | **string* | :heavy_minus_sign: | N/A | account had insufficient funds | -| `Transaction` | [*Transaction](../../models/shared/transaction.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Transaction` | [*shared.Transaction](../../models/shared/transaction.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/state.md b/docs/models/shared/state.md new file mode 100755 index 0000000..c65c8f4 --- /dev/null +++ b/docs/models/shared/state.md @@ -0,0 +1,9 @@ +# State + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `StateToDo` | to do | +| `StateDone` | done | \ No newline at end of file diff --git a/docs/models/shared/statsresponse.md b/docs/models/shared/statsresponse.md index fdc3811..c414d3e 100755 --- a/docs/models/shared/statsresponse.md +++ b/docs/models/shared/statsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `Data` | [Stats](../../models/shared/stats.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Data` | [shared.Stats](../../models/shared/stats.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/storage.md b/docs/models/shared/storage.md new file mode 100755 index 0000000..bb77542 --- /dev/null +++ b/docs/models/shared/storage.md @@ -0,0 +1,8 @@ +# Storage + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `Migrations` | [][shared.MigrationInfo](../../models/shared/migrationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/stripetransferrequest.md b/docs/models/shared/stripetransferrequest.md index 377c039..fa7553d 100755 --- a/docs/models/shared/stripetransferrequest.md +++ b/docs/models/shared/stripetransferrequest.md @@ -8,4 +8,4 @@ | `Amount` | **int64* | :heavy_minus_sign: | N/A | 100 | | `Asset` | **string* | :heavy_minus_sign: | N/A | USD | | `Destination` | **string* | :heavy_minus_sign: | N/A | acct_1Gqj58KZcSIg2N2q | -| `Metadata` | [*StripeTransferRequestMetadata](../../models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| | \ No newline at end of file +| `Metadata` | [*shared.StripeTransferRequestMetadata](../../models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| | \ No newline at end of file diff --git a/docs/models/shared/taskbankingcircle.md b/docs/models/shared/taskbankingcircle.md index be73c0b..145f35d 100755 --- a/docs/models/shared/taskbankingcircle.md +++ b/docs/models/shared/taskbankingcircle.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [TaskBankingCircleDescriptor](../../models/shared/taskbankingcircledescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [TaskBankingCircleState](../../models/shared/taskbankingcirclestate.md) | :heavy_check_mark: | N/A | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.Descriptor](../../models/shared/descriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskBankingCircleState](../../models/shared/taskbankingcirclestate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskcurrencycloud.md b/docs/models/shared/taskcurrencycloud.md index bd9ab58..0d3a091 100755 --- a/docs/models/shared/taskcurrencycloud.md +++ b/docs/models/shared/taskcurrencycloud.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [TaskCurrencyCloudDescriptor](../../models/shared/taskcurrencyclouddescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [TaskCurrencyCloudState](../../models/shared/taskcurrencycloudstate.md) | :heavy_check_mark: | N/A | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskCurrencyCloudDescriptor](../../models/shared/taskcurrencyclouddescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskCurrencyCloudState](../../models/shared/taskcurrencycloudstate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskdummypay.md b/docs/models/shared/taskdummypay.md index c0ccfa8..a9479db 100755 --- a/docs/models/shared/taskdummypay.md +++ b/docs/models/shared/taskdummypay.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [TaskDummyPayDescriptor](../../models/shared/taskdummypaydescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [TaskDummyPayState](../../models/shared/taskdummypaystate.md) | :heavy_check_mark: | N/A | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskDummyPayDescriptor](../../models/shared/taskdummypaydescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskDummyPayState](../../models/shared/taskdummypaystate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskmodulr.md b/docs/models/shared/taskmodulr.md index 2e7e47d..9496008 100755 --- a/docs/models/shared/taskmodulr.md +++ b/docs/models/shared/taskmodulr.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [TaskModulrDescriptor](../../models/shared/taskmodulrdescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [TaskModulrState](../../models/shared/taskmodulrstate.md) | :heavy_check_mark: | N/A | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskModulrDescriptor](../../models/shared/taskmodulrdescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskModulrState](../../models/shared/taskmodulrstate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskresponse.md b/docs/models/shared/taskresponse.md index 4522661..7920b92 100755 --- a/docs/models/shared/taskresponse.md +++ b/docs/models/shared/taskresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Data` | [TaskResponseData](../../models/shared/taskresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `Data` | [shared.TaskResponseData](../../models/shared/taskresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskscursor.md b/docs/models/shared/taskscursor.md index bcc40f1..407415d 100755 --- a/docs/models/shared/taskscursor.md +++ b/docs/models/shared/taskscursor.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `Cursor` | [TasksCursorCursor](../../models/shared/taskscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `Cursor` | [shared.TasksCursorCursor](../../models/shared/taskscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskscursorcursor.md b/docs/models/shared/taskscursorcursor.md index 19bd016..cf89c4b 100755 --- a/docs/models/shared/taskscursorcursor.md +++ b/docs/models/shared/taskscursorcursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Data` | [][TasksCursorCursorData](../../models/shared/taskscursorcursordata.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `Data` | [][shared.TasksCursorData](../../models/shared/taskscursordata.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/taskscursorcursordata.md b/docs/models/shared/taskscursorcursordata.md deleted file mode 100755 index 0445c5c..0000000 --- a/docs/models/shared/taskscursorcursordata.md +++ /dev/null @@ -1,41 +0,0 @@ -# TasksCursorCursorData - - -## Supported Types - -### TaskStripe - -```go -tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskStripe(shared.TaskStripe{/* values here */}) -``` - -### TaskWise - -```go -tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskWise(shared.TaskWise{/* values here */}) -``` - -### TaskCurrencyCloud - -```go -tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskCurrencyCloud(shared.TaskCurrencyCloud{/* values here */}) -``` - -### TaskDummyPay - -```go -tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskDummyPay(shared.TaskDummyPay{/* values here */}) -``` - -### TaskModulr - -```go -tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskModulr(shared.TaskModulr{/* values here */}) -``` - -### TaskBankingCircle - -```go -tasksCursorCursorData := shared.CreateTasksCursorCursorDataTaskBankingCircle(shared.TaskBankingCircle{/* values here */}) -``` - diff --git a/docs/models/shared/taskscursordata.md b/docs/models/shared/taskscursordata.md new file mode 100755 index 0000000..7e6b55c --- /dev/null +++ b/docs/models/shared/taskscursordata.md @@ -0,0 +1,41 @@ +# TasksCursorData + + +## Supported Types + +### TaskStripe + +```go +tasksCursorData := shared.CreateTasksCursorDataTaskStripe(shared.TaskStripe{/* values here */}) +``` + +### TaskWise + +```go +tasksCursorData := shared.CreateTasksCursorDataTaskWise(shared.TaskWise{/* values here */}) +``` + +### TaskCurrencyCloud + +```go +tasksCursorData := shared.CreateTasksCursorDataTaskCurrencyCloud(shared.TaskCurrencyCloud{/* values here */}) +``` + +### TaskDummyPay + +```go +tasksCursorData := shared.CreateTasksCursorDataTaskDummyPay(shared.TaskDummyPay{/* values here */}) +``` + +### TaskModulr + +```go +tasksCursorData := shared.CreateTasksCursorDataTaskModulr(shared.TaskModulr{/* values here */}) +``` + +### TaskBankingCircle + +```go +tasksCursorData := shared.CreateTasksCursorDataTaskBankingCircle(shared.TaskBankingCircle{/* values here */}) +``` + diff --git a/docs/models/shared/taskstripe.md b/docs/models/shared/taskstripe.md index 2990b1e..e49de59 100755 --- a/docs/models/shared/taskstripe.md +++ b/docs/models/shared/taskstripe.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [TaskStripeDescriptor](../../models/shared/taskstripedescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [TaskStripeState](../../models/shared/taskstripestate.md) | :heavy_check_mark: | N/A | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskStripeDescriptor](../../models/shared/taskstripedescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskStripeState](../../models/shared/taskstripestate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskwise.md b/docs/models/shared/taskwise.md index 8c2362c..54ffe1e 100755 --- a/docs/models/shared/taskwise.md +++ b/docs/models/shared/taskwise.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [TaskWiseDescriptor](../../models/shared/taskwisedescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [TaskWiseState](../../models/shared/taskwisestate.md) | :heavy_check_mark: | N/A | -| `Status` | [PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskWiseDescriptor](../../models/shared/taskwisedescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskWiseState](../../models/shared/taskwisestate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/responsecursortotal.md b/docs/models/shared/total.md similarity index 95% rename from docs/models/shared/responsecursortotal.md rename to docs/models/shared/total.md index dfa5769..2c080f0 100755 --- a/docs/models/shared/responsecursortotal.md +++ b/docs/models/shared/total.md @@ -1,4 +1,4 @@ -# ResponseCursorTotal +# Total ## Fields diff --git a/docs/models/shared/transaction.md b/docs/models/shared/transaction.md index 8bda4c4..e838272 100755 --- a/docs/models/shared/transaction.md +++ b/docs/models/shared/transaction.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | -| `PostCommitVolumes` | map[string]map[string][Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | -| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `PreCommitVolumes` | map[string]map[string][Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `PostCommitVolumes` | map[string]map[string][shared.Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][shared.Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/transactiondata.md b/docs/models/shared/transactiondata.md index 1edc82f..47e37fd 100755 --- a/docs/models/shared/transactiondata.md +++ b/docs/models/shared/transactiondata.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | -| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/transactionresponse.md b/docs/models/shared/transactionresponse.md index 9200d43..5bb316c 100755 --- a/docs/models/shared/transactionresponse.md +++ b/docs/models/shared/transactionresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Data` | [Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Data` | [shared.Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactions.md b/docs/models/shared/transactions.md index c6c4b99..fde15d7 100755 --- a/docs/models/shared/transactions.md +++ b/docs/models/shared/transactions.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Transactions` | [][TransactionData](../../models/shared/transactiondata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `Transactions` | [][shared.TransactionData](../../models/shared/transactiondata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactionscursorresponse.md b/docs/models/shared/transactionscursorresponse.md index 1cb12dc..6091f66 100755 --- a/docs/models/shared/transactionscursorresponse.md +++ b/docs/models/shared/transactionscursorresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `Cursor` | [TransactionsCursorResponseCursor](../../models/shared/transactionscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.TransactionsCursorResponseCursor](../../models/shared/transactionscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactionscursorresponsecursor.md b/docs/models/shared/transactionscursorresponsecursor.md index 0a29700..3e91b91 100755 --- a/docs/models/shared/transactionscursorresponsecursor.md +++ b/docs/models/shared/transactionscursorresponsecursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `Data` | [][Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `Data` | [][shared.Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/transactionsresponse.md b/docs/models/shared/transactionsresponse.md index 3d9db87..5184138 100755 --- a/docs/models/shared/transactionsresponse.md +++ b/docs/models/shared/transactionsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `Data` | [][Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `Data` | [][shared.Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/type.md b/docs/models/shared/type.md new file mode 100755 index 0000000..6630c64 --- /dev/null +++ b/docs/models/shared/type.md @@ -0,0 +1,9 @@ +# Type + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `TypeNewTransaction` | NEW_TRANSACTION | +| `TypeSetMetadata` | SET_METADATA | \ No newline at end of file diff --git a/docs/models/shared/updateclientresponse.md b/docs/models/shared/updateclientresponse.md index d76a947..1c11a10 100755 --- a/docs/models/shared/updateclientresponse.md +++ b/docs/models/shared/updateclientresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `Data` | [*Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `Data` | [*shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updatescoperesponse.md b/docs/models/shared/updatescoperesponse.md index d2c7146..74f1ed2 100755 --- a/docs/models/shared/updatescoperesponse.md +++ b/docs/models/shared/updatescoperesponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `Data` | [*Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Data` | [*shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountmetadata.md b/docs/models/shared/vars.md similarity index 87% rename from docs/models/shared/accountmetadata.md rename to docs/models/shared/vars.md index f41637b..9ed6f4e 100755 --- a/docs/models/shared/accountmetadata.md +++ b/docs/models/shared/vars.md @@ -1,4 +1,4 @@ -# AccountMetadata +# Vars ## Fields diff --git a/docs/models/shared/walletserrorresponse.md b/docs/models/shared/walletserrorresponse.md index 3e8c815..e3fb663 100755 --- a/docs/models/shared/walletserrorresponse.md +++ b/docs/models/shared/walletserrorresponse.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `ErrorCode` | [WalletsErrorResponseErrorCode](../../models/shared/walletserrorresponseerrorcode.md) | :heavy_check_mark: | N/A | -| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `ErrorCode` | [shared.WalletsErrorResponseErrorCode](../../models/shared/walletserrorresponseerrorcode.md) | :heavy_check_mark: | N/A | +| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletstransaction.md b/docs/models/shared/walletstransaction.md index c51f4e5..9c4adb3 100755 --- a/docs/models/shared/walletstransaction.md +++ b/docs/models/shared/walletstransaction.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | | -| `PostCommitVolumes` | map[string]map[string][WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | -| `Postings` | [][Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `PreCommitVolumes` | map[string]map[string][WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | | +| `PostCommitVolumes` | map[string]map[string][shared.WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | +| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][shared.WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/walletwithbalances.md b/docs/models/shared/walletwithbalances.md index 12c57e0..aa163be 100755 --- a/docs/models/shared/walletwithbalances.md +++ b/docs/models/shared/walletwithbalances.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `Balances` | [WalletWithBalancesBalances](../../models/shared/walletwithbalancesbalances.md) | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | The unique ID of the wallet. | -| `Ledger` | *string* | :heavy_check_mark: | N/A | -| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the wallet. | -| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `Balances` | [shared.Balances](../../models/shared/balances.md) | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the wallet. | +| `Ledger` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the wallet. | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletwithbalancesbalances.md b/docs/models/shared/walletwithbalancesbalances.md deleted file mode 100755 index b3ceb39..0000000 --- a/docs/models/shared/walletwithbalancesbalances.md +++ /dev/null @@ -1,8 +0,0 @@ -# WalletWithBalancesBalances - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Main` | [AssetHolder](../../models/shared/assetholder.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workflow.md b/docs/models/shared/workflow.md index f3b25d0..25ecf54 100755 --- a/docs/models/shared/workflow.md +++ b/docs/models/shared/workflow.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `Config` | [WorkflowConfig](../../models/shared/workflowconfig.md) | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `Config` | [shared.WorkflowConfig](../../models/shared/workflowconfig.md) | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workflowoccurrence.md b/docs/models/shared/workflowoccurrence.md index 9170dce..32707d2 100755 --- a/docs/models/shared/workflowoccurrence.md +++ b/docs/models/shared/workflowoccurrence.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `Statuses` | [][StageStatus](../../models/shared/stagestatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `WorkflowID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Statuses` | [][shared.StageStatus](../../models/shared/stagestatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `WorkflowID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 21a7dd2..4690f3f 100755 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -1,5 +1,5 @@ # Accounts -(*Accounts*) +(*.Accounts*) ## Overview @@ -97,7 +97,7 @@ func main() { var address *string = "users:.+" - metadata := &operations.CountAccountsMetadata{} + metadata := &operations.Metadata{} ctx := context.Background() res, err := s.Accounts.CountAccounts(ctx, ledger, address, metadata) @@ -118,7 +118,7 @@ func main() { | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | -| `metadata` | [*operations.CountAccountsMetadata](../../models/operations/countaccountsmetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.Metadata](../../models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | ### Response @@ -205,11 +205,11 @@ func main() { Address: formancegosdk.String("users:.+"), After: formancegosdk.String("users:003"), Balance: formancegosdk.Int64(2400), - BalanceOperator: operations.ListAccountsBalanceOperatorGte.ToPointer(), - BalanceOperatorDeprecated: operations.ListAccountsBalanceOperatorGte.ToPointer(), + BalanceOperator: operations.BalanceOperatorGte.ToPointer(), + BalanceOperatorDeprecated: operations.QueryParamBalanceOperatorGte.ToPointer(), Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), Ledger: "ledger001", - Metadata: &operations.ListAccountsMetadata{}, + Metadata: &operations.QueryParamMetadata{}, PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), }) if err != nil { diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index d1b9daf..027c48a 100755 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -1,5 +1,5 @@ # Balances -(*Balances*) +(*.Balances*) ## Overview diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 9a01e1c..2147fd0 100755 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -1,5 +1,5 @@ # Clients -(*Clients*) +(*.Clients*) ## Overview diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md index 49281e8..014d023 100755 --- a/docs/sdks/formance/README.md +++ b/docs/sdks/formance/README.md @@ -44,7 +44,7 @@ func main() { ) ctx := context.Background() - res, err := s.Formance.GetServerInfo(ctx) + res, err := s.GetServerInfo(ctx) if err != nil { log.Fatal(err) } @@ -89,7 +89,7 @@ func main() { ) ctx := context.Background() - res, err := s.Formance.PaymentsgetServerInfo(ctx) + res, err := s.PaymentsgetServerInfo(ctx) if err != nil { log.Fatal(err) } @@ -134,7 +134,7 @@ func main() { ) ctx := context.Background() - res, err := s.Formance.SearchgetServerInfo(ctx) + res, err := s.SearchgetServerInfo(ctx) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index 4545a0b..de5db01 100755 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -1,5 +1,5 @@ # Ledger -(*Ledger*) +(*.Ledger*) ## Overview diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md index c395921..669dd60 100755 --- a/docs/sdks/logs/README.md +++ b/docs/sdks/logs/README.md @@ -1,5 +1,5 @@ # Logs -(*Logs*) +(*.Logs*) ## Overview diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md index acfda63..7af367b 100755 --- a/docs/sdks/mapping/README.md +++ b/docs/sdks/mapping/README.md @@ -1,5 +1,5 @@ # Mapping -(*Mapping*) +(*.Mapping*) ## Overview @@ -85,7 +85,7 @@ func main() { Contracts: []shared.Contract{ shared.Contract{ Account: formancegosdk.String("users:001"), - Expr: shared.ContractExpr{}, + Expr: shared.Expr{}, }, }, } diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 11b04ac..847fab3 100755 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -1,5 +1,5 @@ # Orchestration -(*Orchestration*) +(*.Orchestration*) ## Overview diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 0afc12a..87c610a 100755 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -1,5 +1,5 @@ # Payments -(*Payments*) +(*.Payments*) ## Overview diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index 653223f..ea12e70 100755 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -1,5 +1,5 @@ # Scopes -(*Scopes*) +(*.Scopes*) ## Overview diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index dedd895..7429ba0 100755 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -1,5 +1,5 @@ # Script -(*Script*) +(*.Script*) ## Overview @@ -48,7 +48,7 @@ func main() { ) ", Reference: formancegosdk.String("order_1234"), - Vars: &shared.ScriptVars{}, + Vars: &shared.Vars{}, } var ledger string = "ledger001" diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 1d28559..ca5769e 100755 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -1,5 +1,5 @@ # Search -(*Search*) +(*.Search*) ## Overview diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 6bc139d..8747c46 100755 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -1,5 +1,5 @@ # Server -(*Server*) +(*.Server*) ## Overview diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index 7e305b8..5a75d28 100755 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -1,5 +1,5 @@ # Stats -(*Stats*) +(*.Stats*) ## Overview diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 548cadf..b838f7f 100755 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -1,5 +1,5 @@ # Transactions -(*Transactions*) +(*.Transactions*) ## Overview @@ -170,7 +170,7 @@ func main() { Account: formancegosdk.String("users:001"), Destination: formancegosdk.String("users:001"), Ledger: "ledger001", - Metadata: &operations.CountTransactionsMetadata{}, + Metadata: &operations.CountTransactionsQueryParamMetadata{}, Reference: formancegosdk.String("ref:001"), Source: formancegosdk.String("users:001"), }) @@ -221,8 +221,8 @@ func main() { postTransaction := shared.PostTransaction{ Metadata: map[string]interface{}{ - "admin": "string", "a": "string", + "admin": "string", }, Postings: []shared.Posting{ shared.Posting{ @@ -242,7 +242,7 @@ func main() { destination = $user ) ", - Vars: &shared.PostTransactionScriptVars{}, + Vars: &shared.PostTransactionVars{}, }, } @@ -358,7 +358,7 @@ func main() { Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), Destination: formancegosdk.String("users:001"), Ledger: "ledger001", - Metadata: &operations.ListTransactionsMetadata{}, + Metadata: &operations.ListTransactionsQueryParamMetadata{}, PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), Reference: formancegosdk.String("ref:001"), Source: formancegosdk.String("users:001"), diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index b270d29..5a77b0a 100755 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -1,5 +1,5 @@ # Users -(*Users*) +(*.Users*) ## Overview diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index b92249a..cf0c586 100755 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -1,5 +1,5 @@ # Wallets -(*Wallets*) +(*.Wallets*) ## Overview @@ -446,7 +446,7 @@ func main() { var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" - metadata := &operations.GetHoldsMetadata{} + metadata := &operations.GetHoldsQueryParamMetadata{} var pageSize *int64 = 692494 @@ -470,7 +470,7 @@ func main() { | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `metadata` | [*operations.GetHoldsMetadata](../../models/operations/getholdsmetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.GetHoldsQueryParamMetadata](../../models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | | `walletID` | **string* | :heavy_minus_sign: | The wallet to filter on | | @@ -656,7 +656,7 @@ func main() { var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" - metadata := &operations.ListWalletsMetadata{} + metadata := &operations.ListWalletsQueryParamMetadata{} var name *string = "string" @@ -680,7 +680,7 @@ func main() { | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `metadata` | [*operations.ListWalletsMetadata](../../models/operations/listwalletsmetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.ListWalletsQueryParamMetadata](../../models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `name` | **string* | :heavy_minus_sign: | Filter on wallet name | | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 2d15041..ea1e024 100755 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -1,5 +1,5 @@ # Webhooks -(*Webhooks*) +(*.Webhooks*) ## Overview diff --git a/files.gen b/files.gen index f89cdb0..4a59f49 100755 --- a/files.gen +++ b/files.gen @@ -1,23 +1,24 @@ -accounts.go -balances.go clients.go +scopes.go +users.go +server.go ledger.go +accounts.go +balances.go logs.go mapping.go -orchestration.go -payments.go -scopes.go script.go -search.go -server.go stats.go transactions.go -users.go +orchestration.go +payments.go +search.go wallets.go webhooks.go formance.go go.mod go.sum +tests/helpers.go pkg/models/sdkerrors/sdkerror.go pkg/types/bigint.go pkg/types/date.go @@ -34,242 +35,226 @@ pkg/utils/requestbody.go pkg/utils/retries.go pkg/utils/security.go pkg/utils/utils.go -tests/helpers.go -pkg/models/operations/addmetadatatoaccount.go -pkg/models/operations/countaccounts.go -pkg/models/operations/getaccount.go -pkg/models/operations/listaccounts.go -pkg/models/operations/getbalances.go -pkg/models/operations/getbalancesaggregated.go -pkg/models/operations/addscopetoclient.go -pkg/models/operations/createclient.go -pkg/models/operations/createsecret.go -pkg/models/operations/deleteclient.go -pkg/models/operations/deletescopefromclient.go -pkg/models/operations/deletesecret.go -pkg/models/operations/listclients.go -pkg/models/operations/readclient.go -pkg/models/operations/updateclient.go -pkg/models/operations/getledgerinfo.go -pkg/models/operations/listlogs.go -pkg/models/operations/getmapping.go -pkg/models/operations/updatemapping.go -pkg/models/operations/createworkflow.go -pkg/models/operations/getflow.go -pkg/models/operations/getworkflowoccurrence.go -pkg/models/operations/listflows.go -pkg/models/operations/listruns.go -pkg/models/operations/orchestrationgetserverinfo.go -pkg/models/operations/runworkflow.go -pkg/models/operations/connectorsstripetransfer.go -pkg/models/operations/getconnectortask.go -pkg/models/operations/getpayment.go -pkg/models/operations/installconnector.go -pkg/models/operations/listallconnectors.go -pkg/models/operations/listconfigsavailableconnectors.go -pkg/models/operations/listconnectortasks.go -pkg/models/operations/listpayments.go -pkg/models/operations/paymentslistaccounts.go -pkg/models/operations/readconnectorconfig.go -pkg/models/operations/resetconnector.go -pkg/models/operations/uninstallconnector.go -pkg/models/operations/addtransientscope.go -pkg/models/operations/createscope.go -pkg/models/operations/deletescope.go -pkg/models/operations/deletetransientscope.go -pkg/models/operations/listscopes.go -pkg/models/operations/readscope.go -pkg/models/operations/updatescope.go -pkg/models/operations/runscript.go -pkg/models/operations/search.go -pkg/models/operations/getinfo.go -pkg/models/operations/readstats.go -pkg/models/operations/createtransactions.go -pkg/models/operations/addmetadataontransaction.go -pkg/models/operations/counttransactions.go -pkg/models/operations/createtransaction.go -pkg/models/operations/gettransaction.go -pkg/models/operations/listtransactions.go -pkg/models/operations/reverttransaction.go -pkg/models/operations/listusers.go -pkg/models/operations/readuser.go -pkg/models/operations/confirmhold.go -pkg/models/operations/createbalance.go -pkg/models/operations/createwallet.go -pkg/models/operations/creditwallet.go -pkg/models/operations/debitwallet.go -pkg/models/operations/getbalance.go -pkg/models/operations/gethold.go -pkg/models/operations/getholds.go -pkg/models/operations/gettransactions.go -pkg/models/operations/getwallet.go -pkg/models/operations/listbalances.go -pkg/models/operations/listwallets.go -pkg/models/operations/updatewallet.go -pkg/models/operations/voidhold.go -pkg/models/operations/walletsgetserverinfo.go -pkg/models/operations/activateconfig.go -pkg/models/operations/changeconfigsecret.go -pkg/models/operations/deactivateconfig.go -pkg/models/operations/deleteconfig.go -pkg/models/operations/getmanyconfigs.go -pkg/models/operations/insertconfig.go -pkg/models/operations/testconfig.go -pkg/models/operations/getserverinfo.go -pkg/models/operations/paymentsgetserverinfo.go -pkg/models/operations/searchgetserverinfo.go -pkg/models/shared/errorresponse.go -pkg/models/shared/errorsenum.go -pkg/models/shared/accountresponse.go -pkg/models/shared/accountwithvolumesandbalances.go -pkg/models/shared/accountscursorresponse.go -pkg/models/shared/account.go -pkg/models/shared/balancescursorresponse.go -pkg/models/shared/aggregatebalancesresponse.go -pkg/models/shared/createclientresponse.go -pkg/models/shared/client.go -pkg/models/shared/clientsecret.go -pkg/models/shared/createclientrequest.go -pkg/models/shared/createsecretresponse.go -pkg/models/shared/secret.go -pkg/models/shared/createsecretrequest.go -pkg/models/shared/listclientsresponse.go -pkg/models/shared/readclientresponse.go -pkg/models/shared/updateclientresponse.go -pkg/models/shared/updateclientrequest.go -pkg/models/shared/ledgerinforesponse.go -pkg/models/shared/ledgerinfo.go -pkg/models/shared/migrationinfo.go -pkg/models/shared/logscursorresponse.go -pkg/models/shared/log.go -pkg/models/shared/mappingresponse.go -pkg/models/shared/mapping.go -pkg/models/shared/contract.go -pkg/models/shared/error.go -pkg/models/shared/createworkflowresponse.go -pkg/models/shared/workflow.go -pkg/models/shared/workflowconfig.go -pkg/models/shared/createworkflowrequest.go -pkg/models/shared/getworkflowresponse.go -pkg/models/shared/getworkflowoccurrenceresponse.go -pkg/models/shared/workflowoccurrence.go -pkg/models/shared/stagestatus.go -pkg/models/shared/listworkflowsresponse.go -pkg/models/shared/listrunsresponse.go -pkg/models/shared/serverinfo.go -pkg/models/shared/runworkflowresponse.go -pkg/models/shared/stripetransferresponse.go -pkg/models/shared/stripetransferrequest.go -pkg/models/shared/taskresponse.go -pkg/models/shared/taskstripe.go -pkg/models/shared/paymentstatus.go -pkg/models/shared/taskwise.go -pkg/models/shared/taskcurrencycloud.go -pkg/models/shared/taskdummypay.go -pkg/models/shared/taskmodulr.go -pkg/models/shared/taskbankingcircle.go -pkg/models/shared/connector.go -pkg/models/shared/paymentresponse.go -pkg/models/shared/payment.go -pkg/models/shared/paymentmetadata.go -pkg/models/shared/paymentmetadatachangelog.go -pkg/models/shared/paymentadjustment.go -pkg/models/shared/connectorconfig.go -pkg/models/shared/stripeconfig.go -pkg/models/shared/dummypayconfig.go -pkg/models/shared/wiseconfig.go -pkg/models/shared/modulrconfig.go -pkg/models/shared/currencycloudconfig.go -pkg/models/shared/bankingcircleconfig.go -pkg/models/shared/connectorsresponse.go -pkg/models/shared/connectorsconfigsresponse.go -pkg/models/shared/taskscursor.go -pkg/models/shared/paymentscursor.go -pkg/models/shared/accountscursor.go -pkg/models/shared/paymentsaccount.go -pkg/models/shared/connectorconfigresponse.go -pkg/models/shared/createscoperesponse.go -pkg/models/shared/scope.go -pkg/models/shared/createscoperequest.go -pkg/models/shared/listscopesresponse.go -pkg/models/shared/readscoperesponse.go -pkg/models/shared/updatescoperesponse.go -pkg/models/shared/updatescoperequest.go -pkg/models/shared/scriptresponse.go -pkg/models/shared/transaction.go -pkg/models/shared/volume.go -pkg/models/shared/posting.go -pkg/models/shared/script.go -pkg/models/shared/response.go -pkg/models/shared/query.go -pkg/models/shared/configinforesponse.go -pkg/models/shared/configinfo.go -pkg/models/shared/config.go -pkg/models/shared/ledgerstorage.go -pkg/models/shared/statsresponse.go -pkg/models/shared/stats.go -pkg/models/shared/transactionsresponse.go -pkg/models/shared/transactions.go -pkg/models/shared/transactiondata.go -pkg/models/shared/posttransaction.go -pkg/models/shared/transactionresponse.go -pkg/models/shared/transactionscursorresponse.go -pkg/models/shared/listusersresponse.go -pkg/models/shared/user.go -pkg/models/shared/readuserresponse.go -pkg/models/shared/walletserrorresponse.go -pkg/models/shared/confirmholdrequest.go -pkg/models/shared/createbalanceresponse.go -pkg/models/shared/balance.go -pkg/models/shared/createbalancerequest.go -pkg/models/shared/createwalletresponse.go -pkg/models/shared/wallet.go -pkg/models/shared/createwalletrequest.go -pkg/models/shared/creditwalletrequest.go -pkg/models/shared/subject.go -pkg/models/shared/ledgeraccountsubject.go -pkg/models/shared/walletsubject.go -pkg/models/shared/monetary.go -pkg/models/shared/debitwalletresponse.go -pkg/models/shared/hold.go -pkg/models/shared/debitwalletrequest.go -pkg/models/shared/getbalanceresponse.go -pkg/models/shared/balancewithassets.go -pkg/models/shared/getholdresponse.go -pkg/models/shared/expandeddebithold.go -pkg/models/shared/getholdsresponse.go -pkg/models/shared/gettransactionsresponse.go -pkg/models/shared/walletstransaction.go -pkg/models/shared/walletsvolume.go -pkg/models/shared/getwalletresponse.go -pkg/models/shared/walletwithbalances.go -pkg/models/shared/assetholder.go -pkg/models/shared/listbalancesresponse.go -pkg/models/shared/listwalletsresponse.go -pkg/models/shared/configresponse.go -pkg/models/shared/webhooksconfig.go -pkg/models/shared/configchangesecret.go -pkg/models/shared/configsresponse.go -pkg/models/shared/configuser.go -pkg/models/shared/attemptresponse.go -pkg/models/shared/attempt.go -pkg/models/shared/security.go +/pkg/models/operations/addscopetoclient.go +/pkg/models/operations/createclient.go +/pkg/models/operations/createsecret.go +/pkg/models/operations/deleteclient.go +/pkg/models/operations/deletescopefromclient.go +/pkg/models/operations/deletesecret.go +/pkg/models/operations/listclients.go +/pkg/models/operations/readclient.go +/pkg/models/operations/updateclient.go +/pkg/models/operations/addtransientscope.go +/pkg/models/operations/createscope.go +/pkg/models/operations/deletescope.go +/pkg/models/operations/deletetransientscope.go +/pkg/models/operations/listscopes.go +/pkg/models/operations/readscope.go +/pkg/models/operations/updatescope.go +/pkg/models/operations/listusers.go +/pkg/models/operations/readuser.go +/pkg/models/operations/getinfo.go +/pkg/models/operations/getledgerinfo.go +/pkg/models/operations/addmetadatatoaccount.go +/pkg/models/operations/countaccounts.go +/pkg/models/operations/getaccount.go +/pkg/models/operations/listaccounts.go +/pkg/models/operations/getbalances.go +/pkg/models/operations/getbalancesaggregated.go +/pkg/models/operations/listlogs.go +/pkg/models/operations/getmapping.go +/pkg/models/operations/updatemapping.go +/pkg/models/operations/runscript.go +/pkg/models/operations/readstats.go +/pkg/models/operations/createtransactions.go +/pkg/models/operations/addmetadataontransaction.go +/pkg/models/operations/counttransactions.go +/pkg/models/operations/createtransaction.go +/pkg/models/operations/gettransaction.go +/pkg/models/operations/listtransactions.go +/pkg/models/operations/reverttransaction.go +/pkg/models/operations/createworkflow.go +/pkg/models/operations/getflow.go +/pkg/models/operations/getworkflowoccurrence.go +/pkg/models/operations/listflows.go +/pkg/models/operations/listruns.go +/pkg/models/operations/orchestrationgetserverinfo.go +/pkg/models/operations/runworkflow.go +/pkg/models/operations/connectorsstripetransfer.go +/pkg/models/operations/getconnectortask.go +/pkg/models/operations/getpayment.go +/pkg/models/operations/installconnector.go +/pkg/models/operations/listallconnectors.go +/pkg/models/operations/listconfigsavailableconnectors.go +/pkg/models/operations/listconnectortasks.go +/pkg/models/operations/listpayments.go +/pkg/models/operations/paymentslistaccounts.go +/pkg/models/operations/readconnectorconfig.go +/pkg/models/operations/resetconnector.go +/pkg/models/operations/uninstallconnector.go +/pkg/models/operations/search.go +/pkg/models/operations/confirmhold.go +/pkg/models/operations/createbalance.go +/pkg/models/operations/createwallet.go +/pkg/models/operations/creditwallet.go +/pkg/models/operations/debitwallet.go +/pkg/models/operations/getbalance.go +/pkg/models/operations/gethold.go +/pkg/models/operations/getholds.go +/pkg/models/operations/gettransactions.go +/pkg/models/operations/getwallet.go +/pkg/models/operations/listbalances.go +/pkg/models/operations/listwallets.go +/pkg/models/operations/updatewallet.go +/pkg/models/operations/voidhold.go +/pkg/models/operations/walletsgetserverinfo.go +/pkg/models/operations/activateconfig.go +/pkg/models/operations/changeconfigsecret.go +/pkg/models/operations/deactivateconfig.go +/pkg/models/operations/deleteconfig.go +/pkg/models/operations/getmanyconfigs.go +/pkg/models/operations/insertconfig.go +/pkg/models/operations/testconfig.go +/pkg/models/operations/getserverinfo.go +/pkg/models/operations/paymentsgetserverinfo.go +/pkg/models/operations/searchgetserverinfo.go +/pkg/models/shared/createclientresponse.go +/pkg/models/shared/client.go +/pkg/models/shared/clientsecret.go +/pkg/models/shared/createclientrequest.go +/pkg/models/shared/createsecretresponse.go +/pkg/models/shared/secret.go +/pkg/models/shared/createsecretrequest.go +/pkg/models/shared/listclientsresponse.go +/pkg/models/shared/readclientresponse.go +/pkg/models/shared/updateclientresponse.go +/pkg/models/shared/updateclientrequest.go +/pkg/models/shared/createscoperesponse.go +/pkg/models/shared/scope.go +/pkg/models/shared/createscoperequest.go +/pkg/models/shared/listscopesresponse.go +/pkg/models/shared/readscoperesponse.go +/pkg/models/shared/updatescoperesponse.go +/pkg/models/shared/updatescoperequest.go +/pkg/models/shared/listusersresponse.go +/pkg/models/shared/user.go +/pkg/models/shared/readuserresponse.go +/pkg/models/shared/errorresponse.go +/pkg/models/shared/errorsenum.go +/pkg/models/shared/configinforesponse.go +/pkg/models/shared/configinfo.go +/pkg/models/shared/config.go +/pkg/models/shared/ledgerstorage.go +/pkg/models/shared/ledgerinforesponse.go +/pkg/models/shared/ledgerinfo.go +/pkg/models/shared/migrationinfo.go +/pkg/models/shared/accountresponse.go +/pkg/models/shared/accountwithvolumesandbalances.go +/pkg/models/shared/accountscursorresponse.go +/pkg/models/shared/account.go +/pkg/models/shared/balancescursorresponse.go +/pkg/models/shared/aggregatebalancesresponse.go +/pkg/models/shared/logscursorresponse.go +/pkg/models/shared/log.go +/pkg/models/shared/mappingresponse.go +/pkg/models/shared/mapping.go +/pkg/models/shared/contract.go +/pkg/models/shared/scriptresponse.go +/pkg/models/shared/transaction.go +/pkg/models/shared/volume.go +/pkg/models/shared/posting.go +/pkg/models/shared/script.go +/pkg/models/shared/statsresponse.go +/pkg/models/shared/stats.go +/pkg/models/shared/transactionsresponse.go +/pkg/models/shared/transactions.go +/pkg/models/shared/transactiondata.go +/pkg/models/shared/posttransaction.go +/pkg/models/shared/transactionresponse.go +/pkg/models/shared/transactionscursorresponse.go +/pkg/models/shared/error.go +/pkg/models/shared/createworkflowresponse.go +/pkg/models/shared/workflow.go +/pkg/models/shared/workflowconfig.go +/pkg/models/shared/createworkflowrequest.go +/pkg/models/shared/getworkflowresponse.go +/pkg/models/shared/getworkflowoccurrenceresponse.go +/pkg/models/shared/workflowoccurrence.go +/pkg/models/shared/stagestatus.go +/pkg/models/shared/listworkflowsresponse.go +/pkg/models/shared/listrunsresponse.go +/pkg/models/shared/serverinfo.go +/pkg/models/shared/runworkflowresponse.go +/pkg/models/shared/stripetransferresponse.go +/pkg/models/shared/stripetransferrequest.go +/pkg/models/shared/taskresponse.go +/pkg/models/shared/taskstripe.go +/pkg/models/shared/paymentstatus.go +/pkg/models/shared/taskwise.go +/pkg/models/shared/taskcurrencycloud.go +/pkg/models/shared/taskdummypay.go +/pkg/models/shared/taskmodulr.go +/pkg/models/shared/taskbankingcircle.go +/pkg/models/shared/connector.go +/pkg/models/shared/paymentresponse.go +/pkg/models/shared/payment.go +/pkg/models/shared/paymentmetadata.go +/pkg/models/shared/paymentmetadatachangelog.go +/pkg/models/shared/paymentadjustment.go +/pkg/models/shared/connectorconfig.go +/pkg/models/shared/stripeconfig.go +/pkg/models/shared/dummypayconfig.go +/pkg/models/shared/wiseconfig.go +/pkg/models/shared/modulrconfig.go +/pkg/models/shared/currencycloudconfig.go +/pkg/models/shared/bankingcircleconfig.go +/pkg/models/shared/connectorsresponse.go +/pkg/models/shared/connectorsconfigsresponse.go +/pkg/models/shared/taskscursor.go +/pkg/models/shared/paymentscursor.go +/pkg/models/shared/accountscursor.go +/pkg/models/shared/paymentsaccount.go +/pkg/models/shared/connectorconfigresponse.go +/pkg/models/shared/response.go +/pkg/models/shared/query.go +/pkg/models/shared/walletserrorresponse.go +/pkg/models/shared/confirmholdrequest.go +/pkg/models/shared/createbalanceresponse.go +/pkg/models/shared/balance.go +/pkg/models/shared/createbalancerequest.go +/pkg/models/shared/createwalletresponse.go +/pkg/models/shared/wallet.go +/pkg/models/shared/createwalletrequest.go +/pkg/models/shared/creditwalletrequest.go +/pkg/models/shared/subject.go +/pkg/models/shared/ledgeraccountsubject.go +/pkg/models/shared/walletsubject.go +/pkg/models/shared/monetary.go +/pkg/models/shared/debitwalletresponse.go +/pkg/models/shared/hold.go +/pkg/models/shared/debitwalletrequest.go +/pkg/models/shared/getbalanceresponse.go +/pkg/models/shared/balancewithassets.go +/pkg/models/shared/getholdresponse.go +/pkg/models/shared/expandeddebithold.go +/pkg/models/shared/getholdsresponse.go +/pkg/models/shared/gettransactionsresponse.go +/pkg/models/shared/walletstransaction.go +/pkg/models/shared/walletsvolume.go +/pkg/models/shared/getwalletresponse.go +/pkg/models/shared/walletwithbalances.go +/pkg/models/shared/assetholder.go +/pkg/models/shared/listbalancesresponse.go +/pkg/models/shared/listwalletsresponse.go +/pkg/models/shared/configresponse.go +/pkg/models/shared/webhooksconfig.go +/pkg/models/shared/configchangesecret.go +/pkg/models/shared/configsresponse.go +/pkg/models/shared/configuser.go +/pkg/models/shared/attemptresponse.go +/pkg/models/shared/attempt.go +/pkg/models/shared/security.go USAGE.md -docs/models/operations/addmetadatatoaccountrequest.md -docs/models/operations/addmetadatatoaccountresponse.md -docs/models/operations/countaccountsmetadata.md -docs/models/operations/countaccountsrequest.md -docs/models/operations/countaccountsresponse.md -docs/models/operations/getaccountrequest.md -docs/models/operations/getaccountresponse.md -docs/models/operations/listaccountsbalanceoperator.md -docs/models/operations/listaccountsmetadata.md -docs/models/operations/listaccountsrequest.md -docs/models/operations/listaccountsresponse.md -docs/models/operations/getbalancesrequest.md -docs/models/operations/getbalancesresponse.md -docs/models/operations/getbalancesaggregatedrequest.md -docs/models/operations/getbalancesaggregatedresponse.md docs/models/operations/addscopetoclientrequest.md docs/models/operations/addscopetoclientresponse.md docs/models/operations/createclientresponse.md @@ -286,14 +271,66 @@ docs/models/operations/readclientrequest.md docs/models/operations/readclientresponse.md docs/models/operations/updateclientrequest.md docs/models/operations/updateclientresponse.md +docs/models/operations/addtransientscoperequest.md +docs/models/operations/addtransientscoperesponse.md +docs/models/operations/createscoperesponse.md +docs/models/operations/deletescoperequest.md +docs/models/operations/deletescoperesponse.md +docs/models/operations/deletetransientscoperequest.md +docs/models/operations/deletetransientscoperesponse.md +docs/models/operations/listscopesresponse.md +docs/models/operations/readscoperequest.md +docs/models/operations/readscoperesponse.md +docs/models/operations/updatescoperequest.md +docs/models/operations/updatescoperesponse.md +docs/models/operations/listusersresponse.md +docs/models/operations/readuserrequest.md +docs/models/operations/readuserresponse.md +docs/models/operations/getinforesponse.md docs/models/operations/getledgerinforequest.md docs/models/operations/getledgerinforesponse.md +docs/models/operations/addmetadatatoaccountrequest.md +docs/models/operations/addmetadatatoaccountresponse.md +docs/models/operations/metadata.md +docs/models/operations/countaccountsrequest.md +docs/models/operations/countaccountsresponse.md +docs/models/operations/getaccountrequest.md +docs/models/operations/getaccountresponse.md +docs/models/operations/balanceoperator.md +docs/models/operations/queryparambalanceoperator.md +docs/models/operations/queryparammetadata.md +docs/models/operations/listaccountsrequest.md +docs/models/operations/listaccountsresponse.md +docs/models/operations/getbalancesrequest.md +docs/models/operations/getbalancesresponse.md +docs/models/operations/getbalancesaggregatedrequest.md +docs/models/operations/getbalancesaggregatedresponse.md docs/models/operations/listlogsrequest.md docs/models/operations/listlogsresponse.md docs/models/operations/getmappingrequest.md docs/models/operations/getmappingresponse.md docs/models/operations/updatemappingrequest.md docs/models/operations/updatemappingresponse.md +docs/models/operations/runscriptrequest.md +docs/models/operations/runscriptresponse.md +docs/models/operations/readstatsrequest.md +docs/models/operations/readstatsresponse.md +docs/models/operations/createtransactionsrequest.md +docs/models/operations/createtransactionsresponse.md +docs/models/operations/addmetadataontransactionrequest.md +docs/models/operations/addmetadataontransactionresponse.md +docs/models/operations/counttransactionsqueryparammetadata.md +docs/models/operations/counttransactionsrequest.md +docs/models/operations/counttransactionsresponse.md +docs/models/operations/createtransactionrequest.md +docs/models/operations/createtransactionresponse.md +docs/models/operations/gettransactionrequest.md +docs/models/operations/gettransactionresponse.md +docs/models/operations/listtransactionsqueryparammetadata.md +docs/models/operations/listtransactionsrequest.md +docs/models/operations/listtransactionsresponse.md +docs/models/operations/reverttransactionrequest.md +docs/models/operations/reverttransactionresponse.md docs/models/operations/createworkflowresponse.md docs/models/operations/getflowrequest.md docs/models/operations/getflowresponse.md @@ -326,43 +363,7 @@ docs/models/operations/resetconnectorrequest.md docs/models/operations/resetconnectorresponse.md docs/models/operations/uninstallconnectorrequest.md docs/models/operations/uninstallconnectorresponse.md -docs/models/operations/addtransientscoperequest.md -docs/models/operations/addtransientscoperesponse.md -docs/models/operations/createscoperesponse.md -docs/models/operations/deletescoperequest.md -docs/models/operations/deletescoperesponse.md -docs/models/operations/deletetransientscoperequest.md -docs/models/operations/deletetransientscoperesponse.md -docs/models/operations/listscopesresponse.md -docs/models/operations/readscoperequest.md -docs/models/operations/readscoperesponse.md -docs/models/operations/updatescoperequest.md -docs/models/operations/updatescoperesponse.md -docs/models/operations/runscriptrequest.md -docs/models/operations/runscriptresponse.md docs/models/operations/searchresponse.md -docs/models/operations/getinforesponse.md -docs/models/operations/readstatsrequest.md -docs/models/operations/readstatsresponse.md -docs/models/operations/createtransactionsrequest.md -docs/models/operations/createtransactionsresponse.md -docs/models/operations/addmetadataontransactionrequest.md -docs/models/operations/addmetadataontransactionresponse.md -docs/models/operations/counttransactionsmetadata.md -docs/models/operations/counttransactionsrequest.md -docs/models/operations/counttransactionsresponse.md -docs/models/operations/createtransactionrequest.md -docs/models/operations/createtransactionresponse.md -docs/models/operations/gettransactionrequest.md -docs/models/operations/gettransactionresponse.md -docs/models/operations/listtransactionsmetadata.md -docs/models/operations/listtransactionsrequest.md -docs/models/operations/listtransactionsresponse.md -docs/models/operations/reverttransactionrequest.md -docs/models/operations/reverttransactionresponse.md -docs/models/operations/listusersresponse.md -docs/models/operations/readuserrequest.md -docs/models/operations/readuserresponse.md docs/models/operations/confirmholdrequest.md docs/models/operations/confirmholdresponse.md docs/models/operations/createbalancerequest.md @@ -376,7 +377,7 @@ docs/models/operations/getbalancerequest.md docs/models/operations/getbalanceresponse.md docs/models/operations/getholdrequest.md docs/models/operations/getholdresponse.md -docs/models/operations/getholdsmetadata.md +docs/models/operations/getholdsqueryparammetadata.md docs/models/operations/getholdsrequest.md docs/models/operations/getholdsresponse.md docs/models/operations/gettransactionsrequest.md @@ -385,7 +386,7 @@ docs/models/operations/getwalletrequest.md docs/models/operations/getwalletresponse.md docs/models/operations/listbalancesrequest.md docs/models/operations/listbalancesresponse.md -docs/models/operations/listwalletsmetadata.md +docs/models/operations/listwalletsqueryparammetadata.md docs/models/operations/listwalletsrequest.md docs/models/operations/listwalletsresponse.md docs/models/operations/updatewalletrequestbody.md @@ -410,18 +411,6 @@ docs/models/operations/testconfigresponse.md docs/models/operations/getserverinforesponse.md docs/models/operations/paymentsgetserverinforesponse.md docs/models/operations/searchgetserverinforesponse.md -docs/models/shared/errorresponse.md -docs/models/shared/errorsenum.md -docs/models/shared/accountresponse.md -docs/models/shared/accountwithvolumesandbalancesmetadata.md -docs/models/shared/accountwithvolumesandbalances.md -docs/models/shared/accountscursorresponsecursor.md -docs/models/shared/accountscursorresponse.md -docs/models/shared/accountmetadata.md -docs/models/shared/account.md -docs/models/shared/balancescursorresponsecursor.md -docs/models/shared/balancescursorresponse.md -docs/models/shared/aggregatebalancesresponse.md docs/models/shared/createclientresponse.md docs/models/shared/client.md docs/models/shared/clientsecret.md @@ -433,21 +422,64 @@ docs/models/shared/listclientsresponse.md docs/models/shared/readclientresponse.md docs/models/shared/updateclientresponse.md docs/models/shared/updateclientrequest.md +docs/models/shared/createscoperesponse.md +docs/models/shared/scope.md +docs/models/shared/createscoperequest.md +docs/models/shared/listscopesresponse.md +docs/models/shared/readscoperesponse.md +docs/models/shared/updatescoperesponse.md +docs/models/shared/updatescoperequest.md +docs/models/shared/listusersresponse.md +docs/models/shared/user.md +docs/models/shared/readuserresponse.md +docs/models/shared/errorresponse.md +docs/models/shared/errorsenum.md +docs/models/shared/configinforesponse.md +docs/models/shared/configinfo.md +docs/models/shared/config.md +docs/models/shared/ledgerstorage.md docs/models/shared/ledgerinforesponse.md -docs/models/shared/ledgerinfostorage.md +docs/models/shared/storage.md docs/models/shared/ledgerinfo.md -docs/models/shared/migrationinfostate.md +docs/models/shared/state.md docs/models/shared/migrationinfo.md +docs/models/shared/accountresponse.md +docs/models/shared/accountwithvolumesandbalancesmetadata.md +docs/models/shared/accountwithvolumesandbalances.md +docs/models/shared/accountscursorresponsecursor.md +docs/models/shared/accountscursorresponse.md +docs/models/shared/metadata.md +docs/models/shared/account.md +docs/models/shared/balancescursorresponsecursor.md +docs/models/shared/balancescursorresponse.md +docs/models/shared/aggregatebalancesresponse.md docs/models/shared/logscursorresponsecursor.md docs/models/shared/logscursorresponse.md docs/models/shared/logdata.md -docs/models/shared/logtype.md +docs/models/shared/type.md docs/models/shared/log.md docs/models/shared/mappingresponse.md docs/models/shared/mapping.md -docs/models/shared/contractexpr.md +docs/models/shared/expr.md docs/models/shared/contract.md -docs/models/shared/errorerrorcode.md +docs/models/shared/scriptresponse.md +docs/models/shared/transaction.md +docs/models/shared/volume.md +docs/models/shared/posting.md +docs/models/shared/vars.md +docs/models/shared/script.md +docs/models/shared/statsresponse.md +docs/models/shared/stats.md +docs/models/shared/transactionsresponse.md +docs/models/shared/transactions.md +docs/models/shared/transactiondata.md +docs/models/shared/posttransactionvars.md +docs/models/shared/posttransactionscript.md +docs/models/shared/posttransaction.md +docs/models/shared/transactionresponse.md +docs/models/shared/transactionscursorresponsecursor.md +docs/models/shared/transactionscursorresponse.md +docs/models/shared/errorcode.md docs/models/shared/error.md docs/models/shared/createworkflowresponse.md docs/models/shared/workflow.md @@ -483,13 +515,13 @@ docs/models/shared/taskdummypay.md docs/models/shared/taskmodulrdescriptor.md docs/models/shared/taskmodulrstate.md docs/models/shared/taskmodulr.md -docs/models/shared/taskbankingcircledescriptor.md +docs/models/shared/descriptor.md docs/models/shared/taskbankingcirclestate.md docs/models/shared/taskbankingcircle.md docs/models/shared/connector.md docs/models/shared/paymentresponse.md -docs/models/shared/paymentraw.md -docs/models/shared/paymentscheme.md +docs/models/shared/raw.md +docs/models/shared/scheme.md docs/models/shared/paymenttype.md docs/models/shared/payment.md docs/models/shared/paymentmetadata.md @@ -505,57 +537,26 @@ docs/models/shared/currencycloudconfig.md docs/models/shared/bankingcircleconfig.md docs/models/shared/connectorsresponsedata.md docs/models/shared/connectorsresponse.md -docs/models/shared/connectorsconfigsresponsedataconnectorkey.md -docs/models/shared/connectorsconfigsresponsedataconnector.md -docs/models/shared/connectorsconfigsresponsedata.md +docs/models/shared/key.md +docs/models/shared/connectorsconfigsresponseconnector.md +docs/models/shared/data.md docs/models/shared/connectorsconfigsresponse.md -docs/models/shared/taskscursorcursordata.md +docs/models/shared/taskscursordata.md docs/models/shared/taskscursorcursor.md docs/models/shared/taskscursor.md docs/models/shared/paymentscursorcursor.md docs/models/shared/paymentscursor.md -docs/models/shared/accountscursorcursor.md +docs/models/shared/cursor.md docs/models/shared/accountscursor.md docs/models/shared/paymentsaccounttype.md docs/models/shared/paymentsaccount.md docs/models/shared/connectorconfigresponse.md -docs/models/shared/createscoperesponse.md -docs/models/shared/scope.md -docs/models/shared/createscoperequest.md -docs/models/shared/listscopesresponse.md -docs/models/shared/readscoperesponse.md -docs/models/shared/updatescoperesponse.md -docs/models/shared/updatescoperequest.md -docs/models/shared/scriptresponse.md -docs/models/shared/transaction.md -docs/models/shared/volume.md -docs/models/shared/posting.md -docs/models/shared/scriptvars.md -docs/models/shared/script.md -docs/models/shared/responsecursordata.md -docs/models/shared/responsecursortotal.md +docs/models/shared/responseschemasdata.md +docs/models/shared/total.md docs/models/shared/responsecursor.md docs/models/shared/responsedata.md docs/models/shared/response.md docs/models/shared/query.md -docs/models/shared/configinforesponse.md -docs/models/shared/configinfo.md -docs/models/shared/config.md -docs/models/shared/ledgerstorage.md -docs/models/shared/statsresponse.md -docs/models/shared/stats.md -docs/models/shared/transactionsresponse.md -docs/models/shared/transactions.md -docs/models/shared/transactiondata.md -docs/models/shared/posttransactionscriptvars.md -docs/models/shared/posttransactionscript.md -docs/models/shared/posttransaction.md -docs/models/shared/transactionresponse.md -docs/models/shared/transactionscursorresponsecursor.md -docs/models/shared/transactionscursorresponse.md -docs/models/shared/listusersresponse.md -docs/models/shared/user.md -docs/models/shared/readuserresponse.md docs/models/shared/walletserrorresponseerrorcode.md docs/models/shared/walletserrorresponse.md docs/models/shared/confirmholdrequest.md @@ -584,7 +585,7 @@ docs/models/shared/gettransactionsresponse.md docs/models/shared/walletstransaction.md docs/models/shared/walletsvolume.md docs/models/shared/getwalletresponse.md -docs/models/shared/walletwithbalancesbalances.md +docs/models/shared/balances.md docs/models/shared/walletwithbalances.md docs/models/shared/assetholder.md docs/models/shared/listbalancesresponsecursor.md @@ -601,22 +602,21 @@ docs/models/shared/attemptresponse.md docs/models/shared/attempt.md docs/models/shared/security.md docs/sdks/formance/README.md -docs/sdks/accounts/README.md -docs/sdks/balances/README.md docs/sdks/clients/README.md +docs/sdks/scopes/README.md +docs/sdks/users/README.md +docs/sdks/server/README.md docs/sdks/ledger/README.md +docs/sdks/accounts/README.md +docs/sdks/balances/README.md docs/sdks/logs/README.md docs/sdks/mapping/README.md -docs/sdks/orchestration/README.md -docs/sdks/payments/README.md -docs/sdks/scopes/README.md docs/sdks/script/README.md -docs/sdks/search/README.md -docs/sdks/server/README.md docs/sdks/stats/README.md docs/sdks/transactions/README.md -docs/sdks/users/README.md +docs/sdks/orchestration/README.md +docs/sdks/payments/README.md +docs/sdks/search/README.md docs/sdks/wallets/README.md docs/sdks/webhooks/README.md -pkg/models/operations/options.go .gitattributes \ No newline at end of file diff --git a/formance.go b/formance.go index 12b34b1..15e73a4 100755 --- a/formance.go +++ b/formance.go @@ -83,40 +83,40 @@ func (c *sdkConfiguration) GetServerDetails() (string, map[string]string) { // and standard method from web, mobile and desktop applications. // type Formance struct { - // Everything related to Accounts - Accounts *accounts - // Everything related to Balances - Balances *balances // Everything related to Clients - Clients *clients + Clients *Clients + // Everything related to Scopes + Scopes *Scopes + // Everything related to Users + Users *Users + // Everything related to Server + Server *Server // Everything related to Ledger - Ledger *ledger + Ledger *Ledger + // Everything related to Accounts + Accounts *Accounts + // Everything related to Balances + Balances *Balances // Everything related to Logs - Logs *logs + Logs *Logs // Everything related to Mapping - Mapping *mapping - // Everything related to Orchestration - Orchestration *orchestration - // Everything related to Payments - Payments *payments - // Everything related to Scopes - Scopes *scopes + Mapping *Mapping // Everything related to Script - Script *script - // Everything related to Search - Search *search - // Everything related to Server - Server *server + Script *Script // Everything related to Stats - Stats *stats + Stats *Stats // Everything related to Transactions - Transactions *transactions - // Everything related to Users - Users *users + Transactions *Transactions + // Everything related to Orchestration + Orchestration *Orchestration + // Everything related to Payments + Payments *Payments + // Everything related to Search + Search *Search // Everything related to Wallets - Wallets *wallets + Wallets *Wallets // Everything related to Webhooks - Webhooks *webhooks + Webhooks *Webhooks sdkConfiguration sdkConfiguration } @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.4.0", - GenVersion: "2.173.0", - UserAgent: "speakeasy-sdk/go 0.4.0 2.173.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.5.0", + GenVersion: "2.181.1", + UserAgent: "speakeasy-sdk/go 0.5.0 2.181.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { @@ -226,35 +226,35 @@ func New(opts ...SDKOption) *Formance { } } - sdk.Accounts = newAccounts(sdk.sdkConfiguration) - - sdk.Balances = newBalances(sdk.sdkConfiguration) - sdk.Clients = newClients(sdk.sdkConfiguration) - sdk.Ledger = newLedger(sdk.sdkConfiguration) + sdk.Scopes = newScopes(sdk.sdkConfiguration) - sdk.Logs = newLogs(sdk.sdkConfiguration) + sdk.Users = newUsers(sdk.sdkConfiguration) - sdk.Mapping = newMapping(sdk.sdkConfiguration) + sdk.Server = newServer(sdk.sdkConfiguration) - sdk.Orchestration = newOrchestration(sdk.sdkConfiguration) + sdk.Ledger = newLedger(sdk.sdkConfiguration) - sdk.Payments = newPayments(sdk.sdkConfiguration) + sdk.Accounts = newAccounts(sdk.sdkConfiguration) - sdk.Scopes = newScopes(sdk.sdkConfiguration) + sdk.Balances = newBalances(sdk.sdkConfiguration) - sdk.Script = newScript(sdk.sdkConfiguration) + sdk.Logs = newLogs(sdk.sdkConfiguration) - sdk.Search = newSearch(sdk.sdkConfiguration) + sdk.Mapping = newMapping(sdk.sdkConfiguration) - sdk.Server = newServer(sdk.sdkConfiguration) + sdk.Script = newScript(sdk.sdkConfiguration) sdk.Stats = newStats(sdk.sdkConfiguration) sdk.Transactions = newTransactions(sdk.sdkConfiguration) - sdk.Users = newUsers(sdk.sdkConfiguration) + sdk.Orchestration = newOrchestration(sdk.sdkConfiguration) + + sdk.Payments = newPayments(sdk.sdkConfiguration) + + sdk.Search = newSearch(sdk.sdkConfiguration) sdk.Wallets = newWallets(sdk.sdkConfiguration) @@ -312,6 +312,10 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -366,6 +370,10 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -420,6 +428,10 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/gen.yaml b/gen.yaml index 6ac8d54..d966037 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,8 +2,8 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.112.1 - generationVersion: 2.173.0 + speakeasyVersion: 1.114.1 + generationVersion: 2.181.1 generation: comments: {} sdkClassName: formance @@ -11,16 +11,25 @@ generation: features: go: constsAndDefaults: 0.1.1 - core: 2.94.0 + core: 3.1.0 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.2 globalServerURLs: 2.82.0 nameOverrides: 2.81.1 - unions: 2.84.1 + unions: 2.85.0 go: - version: 0.4.0 + version: 0.5.0 + clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true + imports: + option: openapi + paths: + callbacks: pkg/models/callbacks + errors: pkg/models/sdkerrors + operations: pkg/models/operations + shared: pkg/models/shared + webhooks: pkg/models/webhooks installationURL: https://github.com/speakeasy-sdks/formance-go-sdk maxMethodParams: 4 packageName: github.com/speakeasy-sdks/formance-go-sdk diff --git a/ledger.go b/ledger.go index 33e4e6f..f4641a2 100755 --- a/ledger.go +++ b/ledger.go @@ -14,19 +14,19 @@ import ( "net/http" ) -// ledger - Everything related to Ledger -type ledger struct { +// Ledger - Everything related to Ledger +type Ledger struct { sdkConfiguration sdkConfiguration } -func newLedger(sdkConfig sdkConfiguration) *ledger { - return &ledger{ +func newLedger(sdkConfig sdkConfiguration) *Ledger { + return &Ledger{ sdkConfiguration: sdkConfig, } } // GetLedgerInfo - Get information about a ledger -func (s *ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations.GetLedgerInfoResponse, error) { +func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations.GetLedgerInfoResponse, error) { request := operations.GetLedgerInfoRequest{ Ledger: ledger, } @@ -81,6 +81,10 @@ func (s *ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/logs.go b/logs.go index 584efad..6c8b68d 100755 --- a/logs.go +++ b/logs.go @@ -14,20 +14,20 @@ import ( "net/http" ) -// logs - Everything related to Logs -type logs struct { +// Logs - Everything related to Logs +type Logs struct { sdkConfiguration sdkConfiguration } -func newLogs(sdkConfig sdkConfiguration) *logs { - return &logs{ +func newLogs(sdkConfig sdkConfiguration) *Logs { + return &Logs{ sdkConfiguration: sdkConfig, } } // ListLogs - List the logs from a ledger // List the logs from a ledger, sorted by ID in descending order. -func (s *logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) (*operations.ListLogsResponse, error) { +func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) (*operations.ListLogsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/log", request, nil) if err != nil { @@ -82,6 +82,10 @@ func (s *logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/mapping.go b/mapping.go index 7befe3b..cb1e36e 100755 --- a/mapping.go +++ b/mapping.go @@ -14,19 +14,19 @@ import ( "net/http" ) -// mapping - Everything related to Mapping -type mapping struct { +// Mapping - Everything related to Mapping +type Mapping struct { sdkConfiguration sdkConfiguration } -func newMapping(sdkConfig sdkConfiguration) *mapping { - return &mapping{ +func newMapping(sdkConfig sdkConfiguration) *Mapping { + return &Mapping{ sdkConfiguration: sdkConfig, } } // GetMapping - Get the mapping of a ledger -func (s *mapping) GetMapping(ctx context.Context, ledger string) (*operations.GetMappingResponse, error) { +func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.GetMappingResponse, error) { request := operations.GetMappingRequest{ Ledger: ledger, } @@ -81,6 +81,10 @@ func (s *mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -99,7 +103,7 @@ func (s *mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge } // UpdateMapping - Update the mapping of a ledger -func (s *mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, ledger string) (*operations.UpdateMappingResponse, error) { +func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, ledger string) (*operations.UpdateMappingResponse, error) { request := operations.UpdateMappingRequest{ Mapping: mapping, Ledger: ledger, @@ -165,6 +169,10 @@ func (s *mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/orchestration.go b/orchestration.go index 07e79b3..1fbac38 100755 --- a/orchestration.go +++ b/orchestration.go @@ -15,20 +15,20 @@ import ( "strings" ) -// orchestration - Everything related to Orchestration -type orchestration struct { +// Orchestration - Everything related to Orchestration +type Orchestration struct { sdkConfiguration sdkConfiguration } -func newOrchestration(sdkConfig sdkConfiguration) *orchestration { - return &orchestration{ +func newOrchestration(sdkConfig sdkConfiguration) *Orchestration { + return &Orchestration{ sdkConfiguration: sdkConfig, } } // CreateWorkflow - Create workflow // Create a workflow -func (s *orchestration) CreateWorkflow(ctx context.Context, request *shared.CreateWorkflowRequest) (*operations.CreateWorkflowResponse, error) { +func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.CreateWorkflowRequest) (*operations.CreateWorkflowResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/flows" @@ -83,6 +83,10 @@ func (s *orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -102,7 +106,7 @@ func (s *orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea // GetFlow - Get a flow by id // Get a flow by id -func (s *orchestration) GetFlow(ctx context.Context, flowID string) (*operations.GetFlowResponse, error) { +func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations.GetFlowResponse, error) { request := operations.GetFlowRequest{ FlowID: flowID, } @@ -157,6 +161,10 @@ func (s *orchestration) GetFlow(ctx context.Context, flowID string) (*operations default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -176,7 +184,7 @@ func (s *orchestration) GetFlow(ctx context.Context, flowID string) (*operations // GetWorkflowOccurrence - Get a workflow occurrence by id // Get a workflow occurrence by id -func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string, runID string) (*operations.GetWorkflowOccurrenceResponse, error) { +func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string, runID string) (*operations.GetWorkflowOccurrenceResponse, error) { request := operations.GetWorkflowOccurrenceRequest{ FlowID: flowID, RunID: runID, @@ -232,6 +240,10 @@ func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -251,7 +263,7 @@ func (s *orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string // ListFlows - List registered flows // List registered flows -func (s *orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsResponse, error) { +func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/flows" @@ -299,6 +311,10 @@ func (s *orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -318,7 +334,7 @@ func (s *orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes // ListRuns - List occurrences of a workflow // List occurrences of a workflow -func (s *orchestration) ListRuns(ctx context.Context, flowID string) (*operations.ListRunsResponse, error) { +func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operations.ListRunsResponse, error) { request := operations.ListRunsRequest{ FlowID: flowID, } @@ -373,6 +389,10 @@ func (s *orchestration) ListRuns(ctx context.Context, flowID string) (*operation default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -391,7 +411,7 @@ func (s *orchestration) ListRuns(ctx context.Context, flowID string) (*operation } // OrchestrationgetServerInfo - Get server info -func (s *orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operations.OrchestrationgetServerInfoResponse, error) { +func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operations.OrchestrationgetServerInfoResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/_info" @@ -439,6 +459,10 @@ func (s *orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -458,7 +482,7 @@ func (s *orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat // RunWorkflow - Run workflow // Run workflow -func (s *orchestration) RunWorkflow(ctx context.Context, flowID string, requestBody map[string]string, wait *bool) (*operations.RunWorkflowResponse, error) { +func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestBody map[string]string, wait *bool) (*operations.RunWorkflowResponse, error) { request := operations.RunWorkflowRequest{ FlowID: flowID, RequestBody: requestBody, @@ -526,6 +550,10 @@ func (s *orchestration) RunWorkflow(ctx context.Context, flowID string, requestB default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/payments.go b/payments.go index 47e44cd..c4913c0 100755 --- a/payments.go +++ b/payments.go @@ -15,20 +15,20 @@ import ( "strings" ) -// payments - Everything related to Payments -type payments struct { +// Payments - Everything related to Payments +type Payments struct { sdkConfiguration sdkConfiguration } -func newPayments(sdkConfig sdkConfiguration) *payments { - return &payments{ +func newPayments(sdkConfig sdkConfiguration) *Payments { + return &Payments{ sdkConfiguration: sdkConfig, } } // ConnectorsStripeTransfer - Transfer funds between Stripe accounts // Execute a transfer between two Stripe accounts. -func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared.StripeTransferRequest) (*operations.ConnectorsStripeTransferResponse, error) { +func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared.StripeTransferRequest) (*operations.ConnectorsStripeTransferResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors/stripe/transfer" @@ -86,6 +86,10 @@ func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared. default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -93,7 +97,7 @@ func (s *payments) ConnectorsStripeTransfer(ctx context.Context, request shared. // GetConnectorTask - Read a specific task of the connector // Get a specific task associated to the connector. -func (s *payments) GetConnectorTask(ctx context.Context, connector shared.Connector, taskID string) (*operations.GetConnectorTaskResponse, error) { +func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connector, taskID string) (*operations.GetConnectorTaskResponse, error) { request := operations.GetConnectorTaskRequest{ Connector: connector, TaskID: taskID, @@ -149,13 +153,17 @@ func (s *payments) GetConnectorTask(ctx context.Context, connector shared.Connec default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // GetPayment - Get a payment -func (s *payments) GetPayment(ctx context.Context, paymentID string) (*operations.GetPaymentResponse, error) { +func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operations.GetPaymentResponse, error) { request := operations.GetPaymentRequest{ PaymentID: paymentID, } @@ -210,6 +218,10 @@ func (s *payments) GetPayment(ctx context.Context, paymentID string) (*operation default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -217,7 +229,7 @@ func (s *payments) GetPayment(ctx context.Context, paymentID string) (*operation // InstallConnector - Install a connector // Install a connector by its name and config. -func (s *payments) InstallConnector(ctx context.Context, connectorConfig shared.ConnectorConfig, connector shared.Connector) (*operations.InstallConnectorResponse, error) { +func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared.ConnectorConfig, connector shared.Connector) (*operations.InstallConnectorResponse, error) { request := operations.InstallConnectorRequest{ ConnectorConfig: connectorConfig, Connector: connector, @@ -272,6 +284,10 @@ func (s *payments) InstallConnector(ctx context.Context, connectorConfig shared. httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -279,7 +295,7 @@ func (s *payments) InstallConnector(ctx context.Context, connectorConfig shared. // ListAllConnectors - List all installed connectors // List all installed connectors. -func (s *payments) ListAllConnectors(ctx context.Context) (*operations.ListAllConnectorsResponse, error) { +func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllConnectorsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors" @@ -327,6 +343,10 @@ func (s *payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -334,7 +354,7 @@ func (s *payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo // ListConfigsAvailableConnectors - List the configs of each available connector // List the configs of each available connector. -func (s *payments) ListConfigsAvailableConnectors(ctx context.Context) (*operations.ListConfigsAvailableConnectorsResponse, error) { +func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operations.ListConfigsAvailableConnectorsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors/configs" @@ -382,6 +402,10 @@ func (s *payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -389,7 +413,7 @@ func (s *payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati // ListConnectorTasks - List tasks from a connector // List all tasks associated with this connector. -func (s *payments) ListConnectorTasks(ctx context.Context, connector shared.Connector, cursor *string, pageSize *int64) (*operations.ListConnectorTasksResponse, error) { +func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Connector, cursor *string, pageSize *int64) (*operations.ListConnectorTasksResponse, error) { request := operations.ListConnectorTasksRequest{ Connector: connector, Cursor: cursor, @@ -450,13 +474,17 @@ func (s *payments) ListConnectorTasks(ctx context.Context, connector shared.Conn default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // ListPayments - List payments -func (s *payments) ListPayments(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.ListPaymentsResponse, error) { +func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.ListPaymentsResponse, error) { request := operations.ListPaymentsRequest{ Cursor: cursor, PageSize: pageSize, @@ -514,13 +542,17 @@ func (s *payments) ListPayments(ctx context.Context, cursor *string, pageSize *i default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // PaymentslistAccounts - List accounts -func (s *payments) PaymentslistAccounts(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.PaymentslistAccountsResponse, error) { +func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.PaymentslistAccountsResponse, error) { request := operations.PaymentslistAccountsRequest{ Cursor: cursor, PageSize: pageSize, @@ -578,6 +610,10 @@ func (s *payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -585,7 +621,7 @@ func (s *payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag // ReadConnectorConfig - Read the config of a connector // Read connector config -func (s *payments) ReadConnectorConfig(ctx context.Context, connector shared.Connector) (*operations.ReadConnectorConfigResponse, error) { +func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Connector) (*operations.ReadConnectorConfigResponse, error) { request := operations.ReadConnectorConfigRequest{ Connector: connector, } @@ -640,6 +676,10 @@ func (s *payments) ReadConnectorConfig(ctx context.Context, connector shared.Con default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -648,7 +688,7 @@ func (s *payments) ReadConnectorConfig(ctx context.Context, connector shared.Con // ResetConnector - Reset a connector // Reset a connector by its name. // It will remove the connector and ALL PAYMENTS generated with it. -func (s *payments) ResetConnector(ctx context.Context, connector shared.Connector) (*operations.ResetConnectorResponse, error) { +func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connector) (*operations.ResetConnectorResponse, error) { request := operations.ResetConnectorRequest{ Connector: connector, } @@ -692,6 +732,10 @@ func (s *payments) ResetConnector(ctx context.Context, connector shared.Connecto httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -699,7 +743,7 @@ func (s *payments) ResetConnector(ctx context.Context, connector shared.Connecto // UninstallConnector - Uninstall a connector // Uninstall a connector by its name. -func (s *payments) UninstallConnector(ctx context.Context, connector shared.Connector) (*operations.UninstallConnectorResponse, error) { +func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Connector) (*operations.UninstallConnectorResponse, error) { request := operations.UninstallConnectorRequest{ Connector: connector, } @@ -743,6 +787,10 @@ func (s *payments) UninstallConnector(ctx context.Context, connector shared.Conn httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/pkg/models/operations/countaccounts.go b/pkg/models/operations/countaccounts.go index 35cde07..165a909 100755 --- a/pkg/models/operations/countaccounts.go +++ b/pkg/models/operations/countaccounts.go @@ -7,8 +7,8 @@ import ( "net/http" ) -// CountAccountsMetadata - Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. -type CountAccountsMetadata struct { +// Metadata - Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. +type Metadata struct { } type CountAccountsRequest struct { @@ -17,7 +17,7 @@ type CountAccountsRequest struct { // Filter accounts by address pattern (regular expression placed between ^ and $). Address *string `queryParam:"style=form,explode=true,name=address"` // Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. - Metadata *CountAccountsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + Metadata *Metadata `queryParam:"style=deepObject,explode=true,name=metadata"` } func (o *CountAccountsRequest) GetLedger() string { @@ -34,7 +34,7 @@ func (o *CountAccountsRequest) GetAddress() *string { return o.Address } -func (o *CountAccountsRequest) GetMetadata() *CountAccountsMetadata { +func (o *CountAccountsRequest) GetMetadata() *Metadata { if o == nil { return nil } diff --git a/pkg/models/operations/counttransactions.go b/pkg/models/operations/counttransactions.go index edf879c..86021a9 100755 --- a/pkg/models/operations/counttransactions.go +++ b/pkg/models/operations/counttransactions.go @@ -9,8 +9,8 @@ import ( "time" ) -// CountTransactionsMetadata - Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. -type CountTransactionsMetadata struct { +// CountTransactionsQueryParamMetadata - Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. +type CountTransactionsQueryParamMetadata struct { } type CountTransactionsRequest struct { @@ -32,7 +32,7 @@ type CountTransactionsRequest struct { // Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` // Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. - Metadata *CountTransactionsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + Metadata *CountTransactionsQueryParamMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` // Filter transactions by reference field. Reference *string `queryParam:"style=form,explode=true,name=reference"` // Filter transactions with postings involving given account at source (regular expression placed between ^ and $). @@ -96,7 +96,7 @@ func (o *CountTransactionsRequest) GetLedger() string { return o.Ledger } -func (o *CountTransactionsRequest) GetMetadata() *CountTransactionsMetadata { +func (o *CountTransactionsRequest) GetMetadata() *CountTransactionsQueryParamMetadata { if o == nil { return nil } diff --git a/pkg/models/operations/getholds.go b/pkg/models/operations/getholds.go index 87a926e..571fb42 100755 --- a/pkg/models/operations/getholds.go +++ b/pkg/models/operations/getholds.go @@ -8,8 +8,8 @@ import ( "net/http" ) -// GetHoldsMetadata - Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. -type GetHoldsMetadata struct { +// GetHoldsQueryParamMetadata - Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. +type GetHoldsQueryParamMetadata struct { } type GetHoldsRequest struct { @@ -20,7 +20,7 @@ type GetHoldsRequest struct { // Cursor *string `queryParam:"style=form,explode=true,name=cursor"` // Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. - Metadata *GetHoldsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + Metadata *GetHoldsQueryParamMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` // The maximum number of results to return per page PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` // The wallet to filter on @@ -45,7 +45,7 @@ func (o *GetHoldsRequest) GetCursor() *string { return o.Cursor } -func (o *GetHoldsRequest) GetMetadata() *GetHoldsMetadata { +func (o *GetHoldsRequest) GetMetadata() *GetHoldsQueryParamMetadata { if o == nil { return nil } diff --git a/pkg/models/operations/insertconfig.go b/pkg/models/operations/insertconfig.go index f5361c8..36de833 100755 --- a/pkg/models/operations/insertconfig.go +++ b/pkg/models/operations/insertconfig.go @@ -16,8 +16,6 @@ type InsertConfigResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Bad Request - InsertConfig400TextPlainString *string } func (o *InsertConfigResponse) GetConfigResponse() *shared.ConfigResponse { @@ -47,10 +45,3 @@ func (o *InsertConfigResponse) GetRawResponse() *http.Response { } return o.RawResponse } - -func (o *InsertConfigResponse) GetInsertConfig400TextPlainString() *string { - if o == nil { - return nil - } - return o.InsertConfig400TextPlainString -} diff --git a/pkg/models/operations/listaccounts.go b/pkg/models/operations/listaccounts.go index 87e55fa..5c1cdfb 100755 --- a/pkg/models/operations/listaccounts.go +++ b/pkg/models/operations/listaccounts.go @@ -10,23 +10,23 @@ import ( "net/http" ) -// ListAccountsBalanceOperator - Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. -type ListAccountsBalanceOperator string +// BalanceOperator - Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. +type BalanceOperator string const ( - ListAccountsBalanceOperatorGte ListAccountsBalanceOperator = "gte" - ListAccountsBalanceOperatorLte ListAccountsBalanceOperator = "lte" - ListAccountsBalanceOperatorGt ListAccountsBalanceOperator = "gt" - ListAccountsBalanceOperatorLt ListAccountsBalanceOperator = "lt" - ListAccountsBalanceOperatorE ListAccountsBalanceOperator = "e" - ListAccountsBalanceOperatorNe ListAccountsBalanceOperator = "ne" + BalanceOperatorGte BalanceOperator = "gte" + BalanceOperatorLte BalanceOperator = "lte" + BalanceOperatorGt BalanceOperator = "gt" + BalanceOperatorLt BalanceOperator = "lt" + BalanceOperatorE BalanceOperator = "e" + BalanceOperatorNe BalanceOperator = "ne" ) -func (e ListAccountsBalanceOperator) ToPointer() *ListAccountsBalanceOperator { +func (e BalanceOperator) ToPointer() *BalanceOperator { return &e } -func (e *ListAccountsBalanceOperator) UnmarshalJSON(data []byte) error { +func (e *BalanceOperator) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -43,15 +43,56 @@ func (e *ListAccountsBalanceOperator) UnmarshalJSON(data []byte) error { case "e": fallthrough case "ne": - *e = ListAccountsBalanceOperator(v) + *e = BalanceOperator(v) return nil default: - return fmt.Errorf("invalid value for ListAccountsBalanceOperator: %v", v) + return fmt.Errorf("invalid value for BalanceOperator: %v", v) } } -// ListAccountsMetadata - Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. -type ListAccountsMetadata struct { +// QueryParamBalanceOperator - Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. +// Deprecated, please use `balanceOperator` instead. +type QueryParamBalanceOperator string + +const ( + QueryParamBalanceOperatorGte QueryParamBalanceOperator = "gte" + QueryParamBalanceOperatorLte QueryParamBalanceOperator = "lte" + QueryParamBalanceOperatorGt QueryParamBalanceOperator = "gt" + QueryParamBalanceOperatorLt QueryParamBalanceOperator = "lt" + QueryParamBalanceOperatorE QueryParamBalanceOperator = "e" + QueryParamBalanceOperatorNe QueryParamBalanceOperator = "ne" +) + +func (e QueryParamBalanceOperator) ToPointer() *QueryParamBalanceOperator { + return &e +} + +func (e *QueryParamBalanceOperator) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gte": + fallthrough + case "lte": + fallthrough + case "gt": + fallthrough + case "lt": + fallthrough + case "e": + fallthrough + case "ne": + *e = QueryParamBalanceOperator(v) + return nil + default: + return fmt.Errorf("invalid value for QueryParamBalanceOperator: %v", v) + } +} + +// QueryParamMetadata - Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. +type QueryParamMetadata struct { } type ListAccountsRequest struct { @@ -63,13 +104,13 @@ type ListAccountsRequest struct { Balance *int64 `queryParam:"style=form,explode=true,name=balance"` // Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. // - BalanceOperator *ListAccountsBalanceOperator `queryParam:"style=form,explode=true,name=balanceOperator"` + BalanceOperator *BalanceOperator `queryParam:"style=form,explode=true,name=balanceOperator"` // Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. // Deprecated, please use `balanceOperator` instead. // // // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - BalanceOperatorDeprecated *ListAccountsBalanceOperator `queryParam:"style=form,explode=true,name=balance_operator"` + BalanceOperatorDeprecated *QueryParamBalanceOperator `queryParam:"style=form,explode=true,name=balance_operator"` // Parameter used in pagination requests. Maximum page size is set to 15. // Set to the value of next for the next page of results. // Set to the value of previous for the previous page of results. @@ -79,7 +120,7 @@ type ListAccountsRequest struct { // Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` // Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. - Metadata *ListAccountsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + Metadata *QueryParamMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` // The maximum number of results to return per page. // PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` @@ -132,14 +173,14 @@ func (o *ListAccountsRequest) GetBalance() *int64 { return o.Balance } -func (o *ListAccountsRequest) GetBalanceOperator() *ListAccountsBalanceOperator { +func (o *ListAccountsRequest) GetBalanceOperator() *BalanceOperator { if o == nil { return nil } return o.BalanceOperator } -func (o *ListAccountsRequest) GetBalanceOperatorDeprecated() *ListAccountsBalanceOperator { +func (o *ListAccountsRequest) GetBalanceOperatorDeprecated() *QueryParamBalanceOperator { if o == nil { return nil } @@ -160,7 +201,7 @@ func (o *ListAccountsRequest) GetLedger() string { return o.Ledger } -func (o *ListAccountsRequest) GetMetadata() *ListAccountsMetadata { +func (o *ListAccountsRequest) GetMetadata() *QueryParamMetadata { if o == nil { return nil } diff --git a/pkg/models/operations/listtransactions.go b/pkg/models/operations/listtransactions.go index 192ec13..100786d 100755 --- a/pkg/models/operations/listtransactions.go +++ b/pkg/models/operations/listtransactions.go @@ -9,8 +9,8 @@ import ( "time" ) -// ListTransactionsMetadata - Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. -type ListTransactionsMetadata struct { +// ListTransactionsQueryParamMetadata - Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. +type ListTransactionsQueryParamMetadata struct { } type ListTransactionsRequest struct { @@ -40,7 +40,7 @@ type ListTransactionsRequest struct { // Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` // Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. - Metadata *ListTransactionsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + Metadata *ListTransactionsQueryParamMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` // The maximum number of results to return per page. // PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"` @@ -136,7 +136,7 @@ func (o *ListTransactionsRequest) GetLedger() string { return o.Ledger } -func (o *ListTransactionsRequest) GetMetadata() *ListTransactionsMetadata { +func (o *ListTransactionsRequest) GetMetadata() *ListTransactionsQueryParamMetadata { if o == nil { return nil } diff --git a/pkg/models/operations/listwallets.go b/pkg/models/operations/listwallets.go index a3b3630..c92c2bf 100755 --- a/pkg/models/operations/listwallets.go +++ b/pkg/models/operations/listwallets.go @@ -8,8 +8,8 @@ import ( "net/http" ) -// ListWalletsMetadata - Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. -type ListWalletsMetadata struct { +// ListWalletsQueryParamMetadata - Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. +type ListWalletsQueryParamMetadata struct { } type ListWalletsRequest struct { @@ -20,7 +20,7 @@ type ListWalletsRequest struct { // Cursor *string `queryParam:"style=form,explode=true,name=cursor"` // Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. - Metadata *ListWalletsMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` + Metadata *ListWalletsQueryParamMetadata `queryParam:"style=deepObject,explode=true,name=metadata"` // Filter on wallet name Name *string `queryParam:"style=form,explode=true,name=name"` // The maximum number of results to return per page @@ -45,7 +45,7 @@ func (o *ListWalletsRequest) GetCursor() *string { return o.Cursor } -func (o *ListWalletsRequest) GetMetadata() *ListWalletsMetadata { +func (o *ListWalletsRequest) GetMetadata() *ListWalletsQueryParamMetadata { if o == nil { return nil } diff --git a/pkg/models/operations/options.go b/pkg/models/operations/options.go deleted file mode 100755 index aa398ab..0000000 --- a/pkg/models/operations/options.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package operations - -import ( - "errors" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" -) - -var ErrUnsupportedOption = errors.New("unsupported option") - -const ( - SupportedOptionServerURL = "serverURL" - SupportedOptionRetries = "retries" - SupportedOptionAcceptHeaderOverride = "acceptHeaderOverride" -) - -type AcceptHeaderEnum string - -const ( - AcceptHeaderEnumApplicationJson AcceptHeaderEnum = "application/json" - AcceptHeaderEnumWildcardWildcard AcceptHeaderEnum = "*/*" - AcceptHeaderEnumTextPlain AcceptHeaderEnum = "text/plain" -) - -func (e AcceptHeaderEnum) ToPointer() *AcceptHeaderEnum { - return &e -} - -type Options struct { - ServerURL *string - Retries *utils.RetryConfig - AcceptHeaderOverride *AcceptHeaderEnum -} - -type Option func(*Options, ...string) error - -// WithServerURL allows providing an alternative server URL. -func WithServerURL(serverURL string) Option { - return func(opts *Options, supportedOptions ...string) error { - if !utils.Contains(supportedOptions, SupportedOptionServerURL) { - return ErrUnsupportedOption - } - - opts.ServerURL = &serverURL - return nil - } -} - -// WithTemplatedServerURL allows providing an alternative server URL with templated parameters. -func WithTemplatedServerURL(serverURL string, params map[string]string) Option { - return func(opts *Options, supportedOptions ...string) error { - if !utils.Contains(supportedOptions, SupportedOptionServerURL) { - return ErrUnsupportedOption - } - - if params != nil { - serverURL = utils.ReplaceParameters(serverURL, params) - } - - opts.ServerURL = &serverURL - return nil - } -} - -// WithRetries allows customizing the default retry configuration. -func WithRetries(config utils.RetryConfig) Option { - return func(opts *Options, supportedOptions ...string) error { - if !utils.Contains(supportedOptions, SupportedOptionRetries) { - return ErrUnsupportedOption - } - - opts.Retries = &config - return nil - } -} - -func WithAcceptHeaderOverride(acceptHeaderOverride AcceptHeaderEnum) Option { - return func(opts *Options, supportedOptions ...string) error { - if !utils.Contains(supportedOptions, SupportedOptionAcceptHeaderOverride) { - return ErrUnsupportedOption - } - - opts.AcceptHeaderOverride = &acceptHeaderOverride - return nil - } -} diff --git a/pkg/models/shared/account.go b/pkg/models/shared/account.go index c9ab67b..40b7dfa 100755 --- a/pkg/models/shared/account.go +++ b/pkg/models/shared/account.go @@ -2,13 +2,13 @@ package shared -type AccountMetadata struct { +type Metadata struct { } type Account struct { - Address string `json:"address"` - Metadata *AccountMetadata `json:"metadata,omitempty"` - Type *string `json:"type,omitempty"` + Address string `json:"address"` + Metadata *Metadata `json:"metadata,omitempty"` + Type *string `json:"type,omitempty"` } func (o *Account) GetAddress() string { @@ -18,7 +18,7 @@ func (o *Account) GetAddress() string { return o.Address } -func (o *Account) GetMetadata() *AccountMetadata { +func (o *Account) GetMetadata() *Metadata { if o == nil { return nil } diff --git a/pkg/models/shared/accountscursor.go b/pkg/models/shared/accountscursor.go index 3a585a4..031c23c 100755 --- a/pkg/models/shared/accountscursor.go +++ b/pkg/models/shared/accountscursor.go @@ -2,7 +2,7 @@ package shared -type AccountsCursorCursor struct { +type Cursor struct { Data []PaymentsAccount `json:"data"` HasMore bool `json:"hasMore"` Next *string `json:"next,omitempty"` @@ -10,35 +10,35 @@ type AccountsCursorCursor struct { Previous *string `json:"previous,omitempty"` } -func (o *AccountsCursorCursor) GetData() []PaymentsAccount { +func (o *Cursor) GetData() []PaymentsAccount { if o == nil { return []PaymentsAccount{} } return o.Data } -func (o *AccountsCursorCursor) GetHasMore() bool { +func (o *Cursor) GetHasMore() bool { if o == nil { return false } return o.HasMore } -func (o *AccountsCursorCursor) GetNext() *string { +func (o *Cursor) GetNext() *string { if o == nil { return nil } return o.Next } -func (o *AccountsCursorCursor) GetPageSize() int64 { +func (o *Cursor) GetPageSize() int64 { if o == nil { return 0 } return o.PageSize } -func (o *AccountsCursorCursor) GetPrevious() *string { +func (o *Cursor) GetPrevious() *string { if o == nil { return nil } @@ -46,12 +46,12 @@ func (o *AccountsCursorCursor) GetPrevious() *string { } type AccountsCursor struct { - Cursor AccountsCursorCursor `json:"cursor"` + Cursor Cursor `json:"cursor"` } -func (o *AccountsCursor) GetCursor() AccountsCursorCursor { +func (o *AccountsCursor) GetCursor() Cursor { if o == nil { - return AccountsCursorCursor{} + return Cursor{} } return o.Cursor } diff --git a/pkg/models/shared/connectorsconfigsresponse.go b/pkg/models/shared/connectorsconfigsresponse.go index e62e868..273f1fe 100755 --- a/pkg/models/shared/connectorsconfigsresponse.go +++ b/pkg/models/shared/connectorsconfigsresponse.go @@ -2,54 +2,54 @@ package shared -type ConnectorsConfigsResponseDataConnectorKey struct { +type Key struct { DataType string `json:"dataType"` Required bool `json:"required"` } -func (o *ConnectorsConfigsResponseDataConnectorKey) GetDataType() string { +func (o *Key) GetDataType() string { if o == nil { return "" } return o.DataType } -func (o *ConnectorsConfigsResponseDataConnectorKey) GetRequired() bool { +func (o *Key) GetRequired() bool { if o == nil { return false } return o.Required } -type ConnectorsConfigsResponseDataConnector struct { - Key ConnectorsConfigsResponseDataConnectorKey `json:"key"` +type ConnectorsConfigsResponseConnector struct { + Key Key `json:"key"` } -func (o *ConnectorsConfigsResponseDataConnector) GetKey() ConnectorsConfigsResponseDataConnectorKey { +func (o *ConnectorsConfigsResponseConnector) GetKey() Key { if o == nil { - return ConnectorsConfigsResponseDataConnectorKey{} + return Key{} } return o.Key } -type ConnectorsConfigsResponseData struct { - Connector ConnectorsConfigsResponseDataConnector `json:"connector"` +type Data struct { + Connector ConnectorsConfigsResponseConnector `json:"connector"` } -func (o *ConnectorsConfigsResponseData) GetConnector() ConnectorsConfigsResponseDataConnector { +func (o *Data) GetConnector() ConnectorsConfigsResponseConnector { if o == nil { - return ConnectorsConfigsResponseDataConnector{} + return ConnectorsConfigsResponseConnector{} } return o.Connector } type ConnectorsConfigsResponse struct { - Data ConnectorsConfigsResponseData `json:"data"` + Data Data `json:"data"` } -func (o *ConnectorsConfigsResponse) GetData() ConnectorsConfigsResponseData { +func (o *ConnectorsConfigsResponse) GetData() Data { if o == nil { - return ConnectorsConfigsResponseData{} + return Data{} } return o.Data } diff --git a/pkg/models/shared/contract.go b/pkg/models/shared/contract.go index 1166b48..546c6f1 100755 --- a/pkg/models/shared/contract.go +++ b/pkg/models/shared/contract.go @@ -2,12 +2,12 @@ package shared -type ContractExpr struct { +type Expr struct { } type Contract struct { - Account *string `json:"account,omitempty"` - Expr ContractExpr `json:"expr"` + Account *string `json:"account,omitempty"` + Expr Expr `json:"expr"` } func (o *Contract) GetAccount() *string { @@ -17,9 +17,9 @@ func (o *Contract) GetAccount() *string { return o.Account } -func (o *Contract) GetExpr() ContractExpr { +func (o *Contract) GetExpr() Expr { if o == nil { - return ContractExpr{} + return Expr{} } return o.Expr } diff --git a/pkg/models/shared/error.go b/pkg/models/shared/error.go index bcf4644..9b7820a 100755 --- a/pkg/models/shared/error.go +++ b/pkg/models/shared/error.go @@ -7,38 +7,38 @@ import ( "fmt" ) -type ErrorErrorCode string +type ErrorCode string const ( - ErrorErrorCodeValidation ErrorErrorCode = "VALIDATION" + ErrorCodeValidation ErrorCode = "VALIDATION" ) -func (e ErrorErrorCode) ToPointer() *ErrorErrorCode { +func (e ErrorCode) ToPointer() *ErrorCode { return &e } -func (e *ErrorErrorCode) UnmarshalJSON(data []byte) error { +func (e *ErrorCode) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "VALIDATION": - *e = ErrorErrorCode(v) + *e = ErrorCode(v) return nil default: - return fmt.Errorf("invalid value for ErrorErrorCode: %v", v) + return fmt.Errorf("invalid value for ErrorCode: %v", v) } } type Error struct { - ErrorCode ErrorErrorCode `json:"errorCode"` - ErrorMessage string `json:"errorMessage"` + ErrorCode ErrorCode `json:"errorCode"` + ErrorMessage string `json:"errorMessage"` } -func (o *Error) GetErrorCode() ErrorErrorCode { +func (o *Error) GetErrorCode() ErrorCode { if o == nil { - return ErrorErrorCode("") + return ErrorCode("") } return o.ErrorCode } diff --git a/pkg/models/shared/ledgerinfo.go b/pkg/models/shared/ledgerinfo.go index 8b4958d..e157393 100755 --- a/pkg/models/shared/ledgerinfo.go +++ b/pkg/models/shared/ledgerinfo.go @@ -2,11 +2,11 @@ package shared -type LedgerInfoStorage struct { +type Storage struct { Migrations []MigrationInfo `json:"migrations,omitempty"` } -func (o *LedgerInfoStorage) GetMigrations() []MigrationInfo { +func (o *Storage) GetMigrations() []MigrationInfo { if o == nil { return nil } @@ -14,8 +14,8 @@ func (o *LedgerInfoStorage) GetMigrations() []MigrationInfo { } type LedgerInfo struct { - Name *string `json:"name,omitempty"` - Storage *LedgerInfoStorage `json:"storage,omitempty"` + Name *string `json:"name,omitempty"` + Storage *Storage `json:"storage,omitempty"` } func (o *LedgerInfo) GetName() *string { @@ -25,7 +25,7 @@ func (o *LedgerInfo) GetName() *string { return o.Name } -func (o *LedgerInfo) GetStorage() *LedgerInfoStorage { +func (o *LedgerInfo) GetStorage() *Storage { if o == nil { return nil } diff --git a/pkg/models/shared/log.go b/pkg/models/shared/log.go index 3dc72b4..c4a45ed 100755 --- a/pkg/models/shared/log.go +++ b/pkg/models/shared/log.go @@ -12,18 +12,18 @@ import ( type LogData struct { } -type LogType string +type Type string const ( - LogTypeNewTransaction LogType = "NEW_TRANSACTION" - LogTypeSetMetadata LogType = "SET_METADATA" + TypeNewTransaction Type = "NEW_TRANSACTION" + TypeSetMetadata Type = "SET_METADATA" ) -func (e LogType) ToPointer() *LogType { +func (e Type) ToPointer() *Type { return &e } -func (e *LogType) UnmarshalJSON(data []byte) error { +func (e *Type) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -32,10 +32,10 @@ func (e *LogType) UnmarshalJSON(data []byte) error { case "NEW_TRANSACTION": fallthrough case "SET_METADATA": - *e = LogType(v) + *e = Type(v) return nil default: - return fmt.Errorf("invalid value for LogType: %v", v) + return fmt.Errorf("invalid value for Type: %v", v) } } @@ -44,7 +44,7 @@ type Log struct { Date time.Time `json:"date"` Hash string `json:"hash"` ID int64 `json:"id"` - Type LogType `json:"type"` + Type Type `json:"type"` } func (l Log) MarshalJSON() ([]byte, error) { @@ -86,9 +86,9 @@ func (o *Log) GetID() int64 { return o.ID } -func (o *Log) GetType() LogType { +func (o *Log) GetType() Type { if o == nil { - return LogType("") + return Type("") } return o.Type } diff --git a/pkg/models/shared/migrationinfo.go b/pkg/models/shared/migrationinfo.go index 5941769..f4c2f55 100755 --- a/pkg/models/shared/migrationinfo.go +++ b/pkg/models/shared/migrationinfo.go @@ -9,18 +9,18 @@ import ( "time" ) -type MigrationInfoState string +type State string const ( - MigrationInfoStateToDo MigrationInfoState = "to do" - MigrationInfoStateDone MigrationInfoState = "done" + StateToDo State = "to do" + StateDone State = "done" ) -func (e MigrationInfoState) ToPointer() *MigrationInfoState { +func (e State) ToPointer() *State { return &e } -func (e *MigrationInfoState) UnmarshalJSON(data []byte) error { +func (e *State) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -29,18 +29,18 @@ func (e *MigrationInfoState) UnmarshalJSON(data []byte) error { case "to do": fallthrough case "done": - *e = MigrationInfoState(v) + *e = State(v) return nil default: - return fmt.Errorf("invalid value for MigrationInfoState: %v", v) + return fmt.Errorf("invalid value for State: %v", v) } } type MigrationInfo struct { - Date *time.Time `json:"date,omitempty"` - Name *string `json:"name,omitempty"` - State *MigrationInfoState `json:"state,omitempty"` - Version *int64 `json:"version,omitempty"` + Date *time.Time `json:"date,omitempty"` + Name *string `json:"name,omitempty"` + State *State `json:"state,omitempty"` + Version *int64 `json:"version,omitempty"` } func (m MigrationInfo) MarshalJSON() ([]byte, error) { @@ -68,7 +68,7 @@ func (o *MigrationInfo) GetName() *string { return o.Name } -func (o *MigrationInfo) GetState() *MigrationInfoState { +func (o *MigrationInfo) GetState() *State { if o == nil { return nil } diff --git a/pkg/models/shared/payment.go b/pkg/models/shared/payment.go index 28e0f57..ba29fb7 100755 --- a/pkg/models/shared/payment.go +++ b/pkg/models/shared/payment.go @@ -9,37 +9,37 @@ import ( "time" ) -type PaymentRaw struct { +type Raw struct { } -type PaymentScheme string +type Scheme string const ( - PaymentSchemeVisa PaymentScheme = "visa" - PaymentSchemeMastercard PaymentScheme = "mastercard" - PaymentSchemeAmex PaymentScheme = "amex" - PaymentSchemeDiners PaymentScheme = "diners" - PaymentSchemeDiscover PaymentScheme = "discover" - PaymentSchemeJcb PaymentScheme = "jcb" - PaymentSchemeUnionpay PaymentScheme = "unionpay" - PaymentSchemeSepaDebit PaymentScheme = "sepa debit" - PaymentSchemeSepaCredit PaymentScheme = "sepa credit" - PaymentSchemeSepa PaymentScheme = "sepa" - PaymentSchemeApplePay PaymentScheme = "apple pay" - PaymentSchemeGooglePay PaymentScheme = "google pay" - PaymentSchemeA2a PaymentScheme = "a2a" - PaymentSchemeAchDebit PaymentScheme = "ach debit" - PaymentSchemeAch PaymentScheme = "ach" - PaymentSchemeRtp PaymentScheme = "rtp" - PaymentSchemeUnknown PaymentScheme = "unknown" - PaymentSchemeOther PaymentScheme = "other" + SchemeVisa Scheme = "visa" + SchemeMastercard Scheme = "mastercard" + SchemeAmex Scheme = "amex" + SchemeDiners Scheme = "diners" + SchemeDiscover Scheme = "discover" + SchemeJcb Scheme = "jcb" + SchemeUnionpay Scheme = "unionpay" + SchemeSepaDebit Scheme = "sepa debit" + SchemeSepaCredit Scheme = "sepa credit" + SchemeSepa Scheme = "sepa" + SchemeApplePay Scheme = "apple pay" + SchemeGooglePay Scheme = "google pay" + SchemeA2a Scheme = "a2a" + SchemeAchDebit Scheme = "ach debit" + SchemeAch Scheme = "ach" + SchemeRtp Scheme = "rtp" + SchemeUnknown Scheme = "unknown" + SchemeOther Scheme = "other" ) -func (e PaymentScheme) ToPointer() *PaymentScheme { +func (e Scheme) ToPointer() *Scheme { return &e } -func (e *PaymentScheme) UnmarshalJSON(data []byte) error { +func (e *Scheme) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -80,10 +80,10 @@ func (e *PaymentScheme) UnmarshalJSON(data []byte) error { case "unknown": fallthrough case "other": - *e = PaymentScheme(v) + *e = Scheme(v) return nil default: - return fmt.Errorf("invalid value for PaymentScheme: %v", v) + return fmt.Errorf("invalid value for Scheme: %v", v) } } @@ -129,9 +129,9 @@ type Payment struct { InitialAmount int64 `json:"initialAmount"` Metadata []PaymentMetadata `json:"metadata"` Provider Connector `json:"provider"` - Raw PaymentRaw `json:"raw"` + Raw Raw `json:"raw"` Reference string `json:"reference"` - Scheme PaymentScheme `json:"scheme"` + Scheme Scheme `json:"scheme"` Status PaymentStatus `json:"status"` Type PaymentType `json:"type"` } @@ -203,9 +203,9 @@ func (o *Payment) GetProvider() Connector { return o.Provider } -func (o *Payment) GetRaw() PaymentRaw { +func (o *Payment) GetRaw() Raw { if o == nil { - return PaymentRaw{} + return Raw{} } return o.Raw } @@ -217,9 +217,9 @@ func (o *Payment) GetReference() string { return o.Reference } -func (o *Payment) GetScheme() PaymentScheme { +func (o *Payment) GetScheme() Scheme { if o == nil { - return PaymentScheme("") + return Scheme("") } return o.Scheme } diff --git a/pkg/models/shared/posttransaction.go b/pkg/models/shared/posttransaction.go index 6fde5b5..263258c 100755 --- a/pkg/models/shared/posttransaction.go +++ b/pkg/models/shared/posttransaction.go @@ -7,12 +7,12 @@ import ( "time" ) -type PostTransactionScriptVars struct { +type PostTransactionVars struct { } type PostTransactionScript struct { - Plain string `json:"plain"` - Vars *PostTransactionScriptVars `json:"vars,omitempty"` + Plain string `json:"plain"` + Vars *PostTransactionVars `json:"vars,omitempty"` } func (o *PostTransactionScript) GetPlain() string { @@ -22,7 +22,7 @@ func (o *PostTransactionScript) GetPlain() string { return o.Plain } -func (o *PostTransactionScript) GetVars() *PostTransactionScriptVars { +func (o *PostTransactionScript) GetVars() *PostTransactionVars { if o == nil { return nil } diff --git a/pkg/models/shared/response.go b/pkg/models/shared/response.go index e53ef9d..b12a110 100755 --- a/pkg/models/shared/response.go +++ b/pkg/models/shared/response.go @@ -2,22 +2,22 @@ package shared -type ResponseCursorData struct { +type ResponseSchemasData struct { } -type ResponseCursorTotal struct { +type Total struct { Relation *string `json:"relation,omitempty"` Value *int64 `json:"value,omitempty"` } -func (o *ResponseCursorTotal) GetRelation() *string { +func (o *Total) GetRelation() *string { if o == nil { return nil } return o.Relation } -func (o *ResponseCursorTotal) GetValue() *int64 { +func (o *Total) GetValue() *int64 { if o == nil { return nil } @@ -25,15 +25,15 @@ func (o *ResponseCursorTotal) GetValue() *int64 { } type ResponseCursor struct { - Data []ResponseCursorData `json:"data,omitempty"` - HasMore *bool `json:"hasMore,omitempty"` - Next *string `json:"next,omitempty"` - PageSize *int64 `json:"pageSize,omitempty"` - Previous *string `json:"previous,omitempty"` - Total *ResponseCursorTotal `json:"total,omitempty"` + Data []ResponseSchemasData `json:"data,omitempty"` + HasMore *bool `json:"hasMore,omitempty"` + Next *string `json:"next,omitempty"` + PageSize *int64 `json:"pageSize,omitempty"` + Previous *string `json:"previous,omitempty"` + Total *Total `json:"total,omitempty"` } -func (o *ResponseCursor) GetData() []ResponseCursorData { +func (o *ResponseCursor) GetData() []ResponseSchemasData { if o == nil { return nil } @@ -68,7 +68,7 @@ func (o *ResponseCursor) GetPrevious() *string { return o.Previous } -func (o *ResponseCursor) GetTotal() *ResponseCursorTotal { +func (o *ResponseCursor) GetTotal() *Total { if o == nil { return nil } diff --git a/pkg/models/shared/script.go b/pkg/models/shared/script.go index ec4481c..58ba9fe 100755 --- a/pkg/models/shared/script.go +++ b/pkg/models/shared/script.go @@ -2,15 +2,15 @@ package shared -type ScriptVars struct { +type Vars struct { } type Script struct { Metadata map[string]interface{} `json:"metadata,omitempty"` Plain string `json:"plain"` // Reference to attach to the generated transaction - Reference *string `json:"reference,omitempty"` - Vars *ScriptVars `json:"vars,omitempty"` + Reference *string `json:"reference,omitempty"` + Vars *Vars `json:"vars,omitempty"` } func (o *Script) GetMetadata() map[string]interface{} { @@ -34,7 +34,7 @@ func (o *Script) GetReference() *string { return o.Reference } -func (o *Script) GetVars() *ScriptVars { +func (o *Script) GetVars() *Vars { if o == nil { return nil } diff --git a/pkg/models/shared/taskbankingcircle.go b/pkg/models/shared/taskbankingcircle.go index b016531..6923f02 100755 --- a/pkg/models/shared/taskbankingcircle.go +++ b/pkg/models/shared/taskbankingcircle.go @@ -7,19 +7,19 @@ import ( "time" ) -type TaskBankingCircleDescriptor struct { +type Descriptor struct { Key *string `json:"key,omitempty"` Name *string `json:"name,omitempty"` } -func (o *TaskBankingCircleDescriptor) GetKey() *string { +func (o *Descriptor) GetKey() *string { if o == nil { return nil } return o.Key } -func (o *TaskBankingCircleDescriptor) GetName() *string { +func (o *Descriptor) GetName() *string { if o == nil { return nil } @@ -30,14 +30,14 @@ type TaskBankingCircleState struct { } type TaskBankingCircle struct { - ConnectorID string `json:"connectorId"` - CreatedAt time.Time `json:"createdAt"` - Descriptor TaskBankingCircleDescriptor `json:"descriptor"` - Error *string `json:"error,omitempty"` - ID string `json:"id"` - State TaskBankingCircleState `json:"state"` - Status PaymentStatus `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` + ConnectorID string `json:"connectorId"` + CreatedAt time.Time `json:"createdAt"` + Descriptor Descriptor `json:"descriptor"` + Error *string `json:"error,omitempty"` + ID string `json:"id"` + State TaskBankingCircleState `json:"state"` + Status PaymentStatus `json:"status"` + UpdatedAt time.Time `json:"updatedAt"` } func (t TaskBankingCircle) MarshalJSON() ([]byte, error) { @@ -65,9 +65,9 @@ func (o *TaskBankingCircle) GetCreatedAt() time.Time { return o.CreatedAt } -func (o *TaskBankingCircle) GetDescriptor() TaskBankingCircleDescriptor { +func (o *TaskBankingCircle) GetDescriptor() Descriptor { if o == nil { - return TaskBankingCircleDescriptor{} + return Descriptor{} } return o.Descriptor } diff --git a/pkg/models/shared/taskscursor.go b/pkg/models/shared/taskscursor.go index ab85946..de22537 100755 --- a/pkg/models/shared/taskscursor.go +++ b/pkg/models/shared/taskscursor.go @@ -7,18 +7,18 @@ import ( "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" ) -type TasksCursorCursorDataType string +type TasksCursorDataType string const ( - TasksCursorCursorDataTypeTaskStripe TasksCursorCursorDataType = "TaskStripe" - TasksCursorCursorDataTypeTaskWise TasksCursorCursorDataType = "TaskWise" - TasksCursorCursorDataTypeTaskCurrencyCloud TasksCursorCursorDataType = "TaskCurrencyCloud" - TasksCursorCursorDataTypeTaskDummyPay TasksCursorCursorDataType = "TaskDummyPay" - TasksCursorCursorDataTypeTaskModulr TasksCursorCursorDataType = "TaskModulr" - TasksCursorCursorDataTypeTaskBankingCircle TasksCursorCursorDataType = "TaskBankingCircle" + TasksCursorDataTypeTaskStripe TasksCursorDataType = "TaskStripe" + TasksCursorDataTypeTaskWise TasksCursorDataType = "TaskWise" + TasksCursorDataTypeTaskCurrencyCloud TasksCursorDataType = "TaskCurrencyCloud" + TasksCursorDataTypeTaskDummyPay TasksCursorDataType = "TaskDummyPay" + TasksCursorDataTypeTaskModulr TasksCursorDataType = "TaskModulr" + TasksCursorDataTypeTaskBankingCircle TasksCursorDataType = "TaskBankingCircle" ) -type TasksCursorCursorData struct { +type TasksCursorData struct { TaskStripe *TaskStripe TaskWise *TaskWise TaskCurrencyCloud *TaskCurrencyCloud @@ -26,111 +26,111 @@ type TasksCursorCursorData struct { TaskModulr *TaskModulr TaskBankingCircle *TaskBankingCircle - Type TasksCursorCursorDataType + Type TasksCursorDataType } -func CreateTasksCursorCursorDataTaskStripe(taskStripe TaskStripe) TasksCursorCursorData { - typ := TasksCursorCursorDataTypeTaskStripe +func CreateTasksCursorDataTaskStripe(taskStripe TaskStripe) TasksCursorData { + typ := TasksCursorDataTypeTaskStripe - return TasksCursorCursorData{ + return TasksCursorData{ TaskStripe: &taskStripe, Type: typ, } } -func CreateTasksCursorCursorDataTaskWise(taskWise TaskWise) TasksCursorCursorData { - typ := TasksCursorCursorDataTypeTaskWise +func CreateTasksCursorDataTaskWise(taskWise TaskWise) TasksCursorData { + typ := TasksCursorDataTypeTaskWise - return TasksCursorCursorData{ + return TasksCursorData{ TaskWise: &taskWise, Type: typ, } } -func CreateTasksCursorCursorDataTaskCurrencyCloud(taskCurrencyCloud TaskCurrencyCloud) TasksCursorCursorData { - typ := TasksCursorCursorDataTypeTaskCurrencyCloud +func CreateTasksCursorDataTaskCurrencyCloud(taskCurrencyCloud TaskCurrencyCloud) TasksCursorData { + typ := TasksCursorDataTypeTaskCurrencyCloud - return TasksCursorCursorData{ + return TasksCursorData{ TaskCurrencyCloud: &taskCurrencyCloud, Type: typ, } } -func CreateTasksCursorCursorDataTaskDummyPay(taskDummyPay TaskDummyPay) TasksCursorCursorData { - typ := TasksCursorCursorDataTypeTaskDummyPay +func CreateTasksCursorDataTaskDummyPay(taskDummyPay TaskDummyPay) TasksCursorData { + typ := TasksCursorDataTypeTaskDummyPay - return TasksCursorCursorData{ + return TasksCursorData{ TaskDummyPay: &taskDummyPay, Type: typ, } } -func CreateTasksCursorCursorDataTaskModulr(taskModulr TaskModulr) TasksCursorCursorData { - typ := TasksCursorCursorDataTypeTaskModulr +func CreateTasksCursorDataTaskModulr(taskModulr TaskModulr) TasksCursorData { + typ := TasksCursorDataTypeTaskModulr - return TasksCursorCursorData{ + return TasksCursorData{ TaskModulr: &taskModulr, Type: typ, } } -func CreateTasksCursorCursorDataTaskBankingCircle(taskBankingCircle TaskBankingCircle) TasksCursorCursorData { - typ := TasksCursorCursorDataTypeTaskBankingCircle +func CreateTasksCursorDataTaskBankingCircle(taskBankingCircle TaskBankingCircle) TasksCursorData { + typ := TasksCursorDataTypeTaskBankingCircle - return TasksCursorCursorData{ + return TasksCursorData{ TaskBankingCircle: &taskBankingCircle, Type: typ, } } -func (u *TasksCursorCursorData) UnmarshalJSON(data []byte) error { +func (u *TasksCursorData) UnmarshalJSON(data []byte) error { taskStripe := TaskStripe{} if err := utils.UnmarshalJSON(data, &taskStripe, "", true, true); err == nil { u.TaskStripe = &taskStripe - u.Type = TasksCursorCursorDataTypeTaskStripe + u.Type = TasksCursorDataTypeTaskStripe return nil } taskWise := TaskWise{} if err := utils.UnmarshalJSON(data, &taskWise, "", true, true); err == nil { u.TaskWise = &taskWise - u.Type = TasksCursorCursorDataTypeTaskWise + u.Type = TasksCursorDataTypeTaskWise return nil } taskCurrencyCloud := TaskCurrencyCloud{} if err := utils.UnmarshalJSON(data, &taskCurrencyCloud, "", true, true); err == nil { u.TaskCurrencyCloud = &taskCurrencyCloud - u.Type = TasksCursorCursorDataTypeTaskCurrencyCloud + u.Type = TasksCursorDataTypeTaskCurrencyCloud return nil } taskDummyPay := TaskDummyPay{} if err := utils.UnmarshalJSON(data, &taskDummyPay, "", true, true); err == nil { u.TaskDummyPay = &taskDummyPay - u.Type = TasksCursorCursorDataTypeTaskDummyPay + u.Type = TasksCursorDataTypeTaskDummyPay return nil } taskModulr := TaskModulr{} if err := utils.UnmarshalJSON(data, &taskModulr, "", true, true); err == nil { u.TaskModulr = &taskModulr - u.Type = TasksCursorCursorDataTypeTaskModulr + u.Type = TasksCursorDataTypeTaskModulr return nil } taskBankingCircle := TaskBankingCircle{} if err := utils.UnmarshalJSON(data, &taskBankingCircle, "", true, true); err == nil { u.TaskBankingCircle = &taskBankingCircle - u.Type = TasksCursorCursorDataTypeTaskBankingCircle + u.Type = TasksCursorDataTypeTaskBankingCircle return nil } return errors.New("could not unmarshal into supported union types") } -func (u TasksCursorCursorData) MarshalJSON() ([]byte, error) { +func (u TasksCursorData) MarshalJSON() ([]byte, error) { if u.TaskStripe != nil { return utils.MarshalJSON(u.TaskStripe, "", true) } @@ -159,16 +159,16 @@ func (u TasksCursorCursorData) MarshalJSON() ([]byte, error) { } type TasksCursorCursor struct { - Data []TasksCursorCursorData `json:"data"` - HasMore bool `json:"hasMore"` - Next *string `json:"next,omitempty"` - PageSize int64 `json:"pageSize"` - Previous *string `json:"previous,omitempty"` + Data []TasksCursorData `json:"data"` + HasMore bool `json:"hasMore"` + Next *string `json:"next,omitempty"` + PageSize int64 `json:"pageSize"` + Previous *string `json:"previous,omitempty"` } -func (o *TasksCursorCursor) GetData() []TasksCursorCursorData { +func (o *TasksCursorCursor) GetData() []TasksCursorData { if o == nil { - return []TasksCursorCursorData{} + return []TasksCursorData{} } return o.Data } diff --git a/pkg/models/shared/walletwithbalances.go b/pkg/models/shared/walletwithbalances.go index 4dea9ce..bbad580 100755 --- a/pkg/models/shared/walletwithbalances.go +++ b/pkg/models/shared/walletwithbalances.go @@ -7,11 +7,11 @@ import ( "time" ) -type WalletWithBalancesBalances struct { +type Balances struct { Main AssetHolder `json:"main"` } -func (o *WalletWithBalancesBalances) GetMain() AssetHolder { +func (o *Balances) GetMain() AssetHolder { if o == nil { return AssetHolder{} } @@ -19,8 +19,8 @@ func (o *WalletWithBalancesBalances) GetMain() AssetHolder { } type WalletWithBalances struct { - Balances WalletWithBalancesBalances `json:"balances"` - CreatedAt time.Time `json:"createdAt"` + Balances Balances `json:"balances"` + CreatedAt time.Time `json:"createdAt"` // The unique ID of the wallet. ID string `json:"id"` Ledger string `json:"ledger"` @@ -40,9 +40,9 @@ func (w *WalletWithBalances) UnmarshalJSON(data []byte) error { return nil } -func (o *WalletWithBalances) GetBalances() WalletWithBalancesBalances { +func (o *WalletWithBalances) GetBalances() Balances { if o == nil { - return WalletWithBalancesBalances{} + return Balances{} } return o.Balances } diff --git a/scopes.go b/scopes.go index 8a9cd34..eaac810 100755 --- a/scopes.go +++ b/scopes.go @@ -15,20 +15,20 @@ import ( "strings" ) -// scopes - Everything related to Scopes -type scopes struct { +// Scopes - Everything related to Scopes +type Scopes struct { sdkConfiguration sdkConfiguration } -func newScopes(sdkConfig sdkConfiguration) *scopes { - return &scopes{ +func newScopes(sdkConfig sdkConfiguration) *Scopes { + return &Scopes{ sdkConfiguration: sdkConfig, } } // AddTransientScope - Add a transient scope to a scope // Add a transient scope to a scope -func (s *scopes) AddTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.AddTransientScopeResponse, error) { +func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.AddTransientScopeResponse, error) { request := operations.AddTransientScopeRequest{ ScopeID: scopeID, TransientScopeID: transientScopeID, @@ -73,6 +73,10 @@ func (s *scopes) AddTransientScope(ctx context.Context, scopeID string, transien httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -80,7 +84,7 @@ func (s *scopes) AddTransientScope(ctx context.Context, scopeID string, transien // CreateScope - Create scope // Create scope -func (s *scopes) CreateScope(ctx context.Context, request *shared.CreateScopeRequest) (*operations.CreateScopeResponse, error) { +func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeRequest) (*operations.CreateScopeResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/scopes" @@ -135,6 +139,10 @@ func (s *scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -142,7 +150,7 @@ func (s *scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq // DeleteScope - Delete scope // Delete scope -func (s *scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.DeleteScopeResponse, error) { +func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.DeleteScopeResponse, error) { request := operations.DeleteScopeRequest{ ScopeID: scopeID, } @@ -186,6 +194,10 @@ func (s *scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -193,7 +205,7 @@ func (s *scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D // DeleteTransientScope - Delete a transient scope from a scope // Delete a transient scope from a scope -func (s *scopes) DeleteTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.DeleteTransientScopeResponse, error) { +func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.DeleteTransientScopeResponse, error) { request := operations.DeleteTransientScopeRequest{ ScopeID: scopeID, TransientScopeID: transientScopeID, @@ -238,6 +250,10 @@ func (s *scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -245,7 +261,7 @@ func (s *scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans // ListScopes - List scopes // List Scopes -func (s *scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse, error) { +func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/scopes" @@ -293,6 +309,10 @@ func (s *scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -300,7 +320,7 @@ func (s *scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse // ReadScope - Read scope // Read scope -func (s *scopes) ReadScope(ctx context.Context, scopeID string) (*operations.ReadScopeResponse, error) { +func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.ReadScopeResponse, error) { request := operations.ReadScopeRequest{ ScopeID: scopeID, } @@ -355,6 +375,10 @@ func (s *scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -362,7 +386,7 @@ func (s *scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea // UpdateScope - Update scope // Update scope -func (s *scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeRequest *shared.UpdateScopeRequest) (*operations.UpdateScopeResponse, error) { +func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeRequest *shared.UpdateScopeRequest) (*operations.UpdateScopeResponse, error) { request := operations.UpdateScopeRequest{ ScopeID: scopeID, UpdateScopeRequest: updateScopeRequest, @@ -425,6 +449,10 @@ func (s *scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/script.go b/script.go index 1a11841..286d481 100755 --- a/script.go +++ b/script.go @@ -14,13 +14,13 @@ import ( "net/http" ) -// script - Everything related to Script -type script struct { +// Script - Everything related to Script +type Script struct { sdkConfiguration sdkConfiguration } -func newScript(sdkConfig sdkConfiguration) *script { - return &script{ +func newScript(sdkConfig sdkConfiguration) *Script { + return &Script{ sdkConfiguration: sdkConfig, } } @@ -29,7 +29,7 @@ func newScript(sdkConfig sdkConfiguration) *script { // This route is deprecated, and has been merged into `POST /{ledger}/transactions`. // // Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. -func (s *script) RunScript(ctx context.Context, script shared.Script, ledger string, preview *bool) (*operations.RunScriptResponse, error) { +func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger string, preview *bool) (*operations.RunScriptResponse, error) { request := operations.RunScriptRequest{ Script: script, Ledger: ledger, @@ -100,6 +100,10 @@ func (s *script) RunScript(ctx context.Context, script shared.Script, ledger str default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/search.go b/search.go index 15c5d33..e2bc6a3 100755 --- a/search.go +++ b/search.go @@ -15,20 +15,20 @@ import ( "strings" ) -// search - Everything related to Search -type search struct { +// Search - Everything related to Search +type Search struct { sdkConfiguration sdkConfiguration } -func newSearch(sdkConfig sdkConfiguration) *search { - return &search{ +func newSearch(sdkConfig sdkConfiguration) *Search { + return &Search{ sdkConfiguration: sdkConfig, } } // Search // ElasticSearch query engine -func (s *search) Search(ctx context.Context, request shared.Query) (*operations.SearchResponse, error) { +func (s *Search) Search(ctx context.Context, request shared.Query) (*operations.SearchResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/search/" @@ -86,6 +86,10 @@ func (s *search) Search(ctx context.Context, request shared.Query) (*operations. default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: } diff --git a/server.go b/server.go index 428a8e6..823168f 100755 --- a/server.go +++ b/server.go @@ -15,19 +15,19 @@ import ( "strings" ) -// server - Everything related to Server -type server struct { +// Server - Everything related to Server +type Server struct { sdkConfiguration sdkConfiguration } -func newServer(sdkConfig sdkConfiguration) *server { - return &server{ +func newServer(sdkConfig sdkConfiguration) *Server { + return &Server{ sdkConfiguration: sdkConfig, } } // GetInfo - Show server information -func (s *server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, error) { +func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/ledger/_info" @@ -75,6 +75,10 @@ func (s *server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/stats.go b/stats.go index ede43d2..795521e 100755 --- a/stats.go +++ b/stats.go @@ -14,20 +14,20 @@ import ( "net/http" ) -// stats - Everything related to Stats -type stats struct { +// Stats - Everything related to Stats +type Stats struct { sdkConfiguration sdkConfiguration } -func newStats(sdkConfig sdkConfiguration) *stats { - return &stats{ +func newStats(sdkConfig sdkConfiguration) *Stats { + return &Stats{ sdkConfiguration: sdkConfig, } } // ReadStats - Get statistics from a ledger // Get statistics from a ledger. (aggregate metrics on accounts and transactions) -func (s *stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadStatsResponse, error) { +func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadStatsResponse, error) { request := operations.ReadStatsRequest{ Ledger: ledger, } @@ -82,6 +82,10 @@ func (s *stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/transactions.go b/transactions.go index 2468646..c9b4297 100755 --- a/transactions.go +++ b/transactions.go @@ -14,19 +14,19 @@ import ( "net/http" ) -// transactions - Everything related to Transactions -type transactions struct { +// Transactions - Everything related to Transactions +type Transactions struct { sdkConfiguration sdkConfiguration } -func newTransactions(sdkConfig sdkConfiguration) *transactions { - return &transactions{ +func newTransactions(sdkConfig sdkConfiguration) *Transactions { + return &Transactions{ sdkConfiguration: sdkConfig, } } // CreateTransactions - Create a new batch of transactions to a ledger -func (s *transactions) CreateTransactions(ctx context.Context, transactions shared.Transactions, ledger string) (*operations.CreateTransactionsResponse, error) { +func (s *Transactions) CreateTransactions(ctx context.Context, transactions shared.Transactions, ledger string) (*operations.CreateTransactionsResponse, error) { request := operations.CreateTransactionsRequest{ Transactions: transactions, Ledger: ledger, @@ -92,6 +92,10 @@ func (s *transactions) CreateTransactions(ctx context.Context, transactions shar default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -110,7 +114,7 @@ func (s *transactions) CreateTransactions(ctx context.Context, transactions shar } // AddMetadataOnTransaction - Set the metadata of a transaction by its ID -func (s *transactions) AddMetadataOnTransaction(ctx context.Context, ledger string, txid int64, requestBody map[string]interface{}) (*operations.AddMetadataOnTransactionResponse, error) { +func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger string, txid int64, requestBody map[string]interface{}) (*operations.AddMetadataOnTransactionResponse, error) { request := operations.AddMetadataOnTransactionRequest{ Ledger: ledger, Txid: txid, @@ -163,6 +167,10 @@ func (s *transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -181,7 +189,7 @@ func (s *transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri } // CountTransactions - Count the transactions from a ledger -func (s *transactions) CountTransactions(ctx context.Context, request operations.CountTransactionsRequest) (*operations.CountTransactionsResponse, error) { +func (s *Transactions) CountTransactions(ctx context.Context, request operations.CountTransactionsRequest) (*operations.CountTransactionsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) if err != nil { @@ -227,6 +235,10 @@ func (s *transactions) CountTransactions(ctx context.Context, request operations case httpRes.StatusCode == 200: res.Headers = httpRes.Header + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -245,7 +257,7 @@ func (s *transactions) CountTransactions(ctx context.Context, request operations } // CreateTransaction - Create a new transaction to a ledger -func (s *transactions) CreateTransaction(ctx context.Context, postTransaction shared.PostTransaction, ledger string, preview *bool) (*operations.CreateTransactionResponse, error) { +func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction shared.PostTransaction, ledger string, preview *bool) (*operations.CreateTransactionResponse, error) { request := operations.CreateTransactionRequest{ PostTransaction: postTransaction, Ledger: ledger, @@ -316,6 +328,10 @@ func (s *transactions) CreateTransaction(ctx context.Context, postTransaction sh default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -334,7 +350,7 @@ func (s *transactions) CreateTransaction(ctx context.Context, postTransaction sh } // GetTransaction - Get transaction from a ledger by its ID -func (s *transactions) GetTransaction(ctx context.Context, ledger string, txid int64) (*operations.GetTransactionResponse, error) { +func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid int64) (*operations.GetTransactionResponse, error) { request := operations.GetTransactionRequest{ Ledger: ledger, Txid: txid, @@ -390,6 +406,10 @@ func (s *transactions) GetTransaction(ctx context.Context, ledger string, txid i default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -409,7 +429,7 @@ func (s *transactions) GetTransaction(ctx context.Context, ledger string, txid i // ListTransactions - List transactions from a ledger // List transactions from a ledger, sorted by txid in descending order. -func (s *transactions) ListTransactions(ctx context.Context, request operations.ListTransactionsRequest) (*operations.ListTransactionsResponse, error) { +func (s *Transactions) ListTransactions(ctx context.Context, request operations.ListTransactionsRequest) (*operations.ListTransactionsResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) if err != nil { @@ -464,6 +484,10 @@ func (s *transactions) ListTransactions(ctx context.Context, request operations. default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -482,7 +506,7 @@ func (s *transactions) ListTransactions(ctx context.Context, request operations. } // RevertTransaction - Revert a ledger transaction by its ID -func (s *transactions) RevertTransaction(ctx context.Context, ledger string, txid int64) (*operations.RevertTransactionResponse, error) { +func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txid int64) (*operations.RevertTransactionResponse, error) { request := operations.RevertTransactionRequest{ Ledger: ledger, Txid: txid, @@ -538,6 +562,10 @@ func (s *transactions) RevertTransaction(ctx context.Context, ledger string, txi default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/users.go b/users.go index 8504619..2ea5772 100755 --- a/users.go +++ b/users.go @@ -15,20 +15,20 @@ import ( "strings" ) -// users - Everything related to Users -type users struct { +// Users - Everything related to Users +type Users struct { sdkConfiguration sdkConfiguration } -func newUsers(sdkConfig sdkConfiguration) *users { - return &users{ +func newUsers(sdkConfig sdkConfiguration) *Users { + return &Users{ sdkConfiguration: sdkConfig, } } // ListUsers - List users // List users -func (s *users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, error) { +func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/auth/users" @@ -76,6 +76,10 @@ func (s *users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -83,7 +87,7 @@ func (s *users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e // ReadUser - Read user // Read user -func (s *users) ReadUser(ctx context.Context, userID string) (*operations.ReadUserResponse, error) { +func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUserResponse, error) { request := operations.ReadUserRequest{ UserID: userID, } @@ -138,6 +142,10 @@ func (s *users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/wallets.go b/wallets.go index 000d694..b394644 100755 --- a/wallets.go +++ b/wallets.go @@ -15,19 +15,19 @@ import ( "strings" ) -// wallets - Everything related to Wallets -type wallets struct { +// Wallets - Everything related to Wallets +type Wallets struct { sdkConfiguration sdkConfiguration } -func newWallets(sdkConfig sdkConfiguration) *wallets { - return &wallets{ +func newWallets(sdkConfig sdkConfiguration) *Wallets { + return &Wallets{ sdkConfiguration: sdkConfig, } } // ConfirmHold - Confirm a hold -func (s *wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldRequest *shared.ConfirmHoldRequest) (*operations.ConfirmHoldResponse, error) { +func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldRequest *shared.ConfirmHoldRequest) (*operations.ConfirmHoldResponse, error) { request := operations.ConfirmHoldRequest{ HoldID: holdID, ConfirmHoldRequest: confirmHoldRequest, @@ -79,6 +79,10 @@ func (s *wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -97,7 +101,7 @@ func (s *wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq } // CreateBalance - Create a balance -func (s *wallets) CreateBalance(ctx context.Context, id string, createBalanceRequest *shared.CreateBalanceRequest) (*operations.CreateBalanceResponse, error) { +func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceRequest *shared.CreateBalanceRequest) (*operations.CreateBalanceResponse, error) { request := operations.CreateBalanceRequest{ ID: id, CreateBalanceRequest: createBalanceRequest, @@ -160,6 +164,10 @@ func (s *wallets) CreateBalance(ctx context.Context, id string, createBalanceReq default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -178,7 +186,7 @@ func (s *wallets) CreateBalance(ctx context.Context, id string, createBalanceReq } // CreateWallet - Create a new wallet -func (s *wallets) CreateWallet(ctx context.Context, request *shared.CreateWalletRequest) (*operations.CreateWalletResponse, error) { +func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWalletRequest) (*operations.CreateWalletResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/wallets" @@ -233,6 +241,10 @@ func (s *wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -251,7 +263,7 @@ func (s *wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet } // CreditWallet - Credit a wallet -func (s *wallets) CreditWallet(ctx context.Context, id string, creditWalletRequest *shared.CreditWalletRequest) (*operations.CreditWalletResponse, error) { +func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletRequest *shared.CreditWalletRequest) (*operations.CreditWalletResponse, error) { request := operations.CreditWalletRequest{ ID: id, CreditWalletRequest: creditWalletRequest, @@ -303,6 +315,10 @@ func (s *wallets) CreditWallet(ctx context.Context, id string, creditWalletReque httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -321,7 +337,7 @@ func (s *wallets) CreditWallet(ctx context.Context, id string, creditWalletReque } // DebitWallet - Debit a wallet -func (s *wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest *shared.DebitWalletRequest) (*operations.DebitWalletResponse, error) { +func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest *shared.DebitWalletRequest) (*operations.DebitWalletResponse, error) { request := operations.DebitWalletRequest{ ID: id, DebitWalletRequest: debitWalletRequest, @@ -385,6 +401,10 @@ func (s *wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -403,7 +423,7 @@ func (s *wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest } // GetBalance - Get detailed balance -func (s *wallets) GetBalance(ctx context.Context, balanceName string, id string) (*operations.GetBalanceResponse, error) { +func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) (*operations.GetBalanceResponse, error) { request := operations.GetBalanceRequest{ BalanceName: balanceName, ID: id, @@ -459,6 +479,10 @@ func (s *wallets) GetBalance(ctx context.Context, balanceName string, id string) default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -477,7 +501,7 @@ func (s *wallets) GetBalance(ctx context.Context, balanceName string, id string) } // GetHold - Get a hold -func (s *wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHoldResponse, error) { +func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHoldResponse, error) { request := operations.GetHoldRequest{ HoldID: holdID, } @@ -532,6 +556,10 @@ func (s *wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -550,7 +578,7 @@ func (s *wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo } // GetHolds - Get all holds for a wallet -func (s *wallets) GetHolds(ctx context.Context, cursor *string, metadata *operations.GetHoldsMetadata, pageSize *int64, walletID *string) (*operations.GetHoldsResponse, error) { +func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operations.GetHoldsQueryParamMetadata, pageSize *int64, walletID *string) (*operations.GetHoldsResponse, error) { request := operations.GetHoldsRequest{ Cursor: cursor, Metadata: metadata, @@ -609,6 +637,10 @@ func (s *wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -626,7 +658,7 @@ func (s *wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat return res, nil } -func (s *wallets) GetTransactions(ctx context.Context, cursor *string, pageSize *int64, walletID *string) (*operations.GetTransactionsResponse, error) { +func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize *int64, walletID *string) (*operations.GetTransactionsResponse, error) { request := operations.GetTransactionsRequest{ Cursor: cursor, PageSize: pageSize, @@ -684,6 +716,10 @@ func (s *wallets) GetTransactions(ctx context.Context, cursor *string, pageSize default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -702,7 +738,7 @@ func (s *wallets) GetTransactions(ctx context.Context, cursor *string, pageSize } // GetWallet - Get a wallet -func (s *wallets) GetWallet(ctx context.Context, id string) (*operations.GetWalletResponse, error) { +func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWalletResponse, error) { request := operations.GetWalletRequest{ ID: id, } @@ -758,6 +794,11 @@ func (s *wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 404: + fallthrough + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -776,7 +817,7 @@ func (s *wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall } // ListBalances - List balances of a wallet -func (s *wallets) ListBalances(ctx context.Context, id string) (*operations.ListBalancesResponse, error) { +func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.ListBalancesResponse, error) { request := operations.ListBalancesRequest{ ID: id, } @@ -831,13 +872,17 @@ func (s *wallets) ListBalances(ctx context.Context, id string) (*operations.List default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // ListWallets - List all wallets -func (s *wallets) ListWallets(ctx context.Context, cursor *string, metadata *operations.ListWalletsMetadata, name *string, pageSize *int64) (*operations.ListWalletsResponse, error) { +func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *operations.ListWalletsQueryParamMetadata, name *string, pageSize *int64) (*operations.ListWalletsResponse, error) { request := operations.ListWalletsRequest{ Cursor: cursor, Metadata: metadata, @@ -896,13 +941,17 @@ func (s *wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil } // UpdateWallet - Update a wallet -func (s *wallets) UpdateWallet(ctx context.Context, id string, requestBody *operations.UpdateWalletRequestBody) (*operations.UpdateWalletResponse, error) { +func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *operations.UpdateWalletRequestBody) (*operations.UpdateWalletResponse, error) { request := operations.UpdateWalletRequest{ ID: id, RequestBody: requestBody, @@ -954,6 +1003,10 @@ func (s *wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -972,7 +1025,7 @@ func (s *wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper } // VoidHold - Cancel a hold -func (s *wallets) VoidHold(ctx context.Context, holdID string) (*operations.VoidHoldResponse, error) { +func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.VoidHoldResponse, error) { request := operations.VoidHoldRequest{ HoldID: holdID, } @@ -1016,6 +1069,10 @@ func (s *wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 204: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): @@ -1034,7 +1091,7 @@ func (s *wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void } // WalletsgetServerInfo - Get server info -func (s *wallets) WalletsgetServerInfo(ctx context.Context) (*operations.WalletsgetServerInfoResponse, error) { +func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.WalletsgetServerInfoResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/_info" @@ -1082,6 +1139,10 @@ func (s *wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { case utils.MatchContentType(contentType, `application/json`): diff --git a/webhooks.go b/webhooks.go index 52ca75e..69af6e0 100755 --- a/webhooks.go +++ b/webhooks.go @@ -15,20 +15,20 @@ import ( "strings" ) -// webhooks - Everything related to Webhooks -type webhooks struct { +// Webhooks - Everything related to Webhooks +type Webhooks struct { sdkConfiguration sdkConfiguration } -func newWebhooks(sdkConfig sdkConfiguration) *webhooks { - return &webhooks{ +func newWebhooks(sdkConfig sdkConfiguration) *Webhooks { + return &Webhooks{ sdkConfiguration: sdkConfig, } } // ActivateConfig - Activate one config // Activate a webhooks config by ID, to start receiving webhooks to its endpoint. -func (s *webhooks) ActivateConfig(ctx context.Context, id string) (*operations.ActivateConfigResponse, error) { +func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.ActivateConfigResponse, error) { request := operations.ActivateConfigRequest{ ID: id, } @@ -84,6 +84,10 @@ func (s *webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 304: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -94,7 +98,7 @@ func (s *webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A // // If not passed or empty, a secret is automatically generated. // The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) -func (s *webhooks) ChangeConfigSecret(ctx context.Context, id string, configChangeSecret *shared.ConfigChangeSecret) (*operations.ChangeConfigSecretResponse, error) { +func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChangeSecret *shared.ConfigChangeSecret) (*operations.ChangeConfigSecretResponse, error) { request := operations.ChangeConfigSecretRequest{ ID: id, ConfigChangeSecret: configChangeSecret, @@ -157,6 +161,10 @@ func (s *webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -164,7 +172,7 @@ func (s *webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan // DeactivateConfig - Deactivate one config // Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. -func (s *webhooks) DeactivateConfig(ctx context.Context, id string) (*operations.DeactivateConfigResponse, error) { +func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations.DeactivateConfigResponse, error) { request := operations.DeactivateConfigRequest{ ID: id, } @@ -220,6 +228,10 @@ func (s *webhooks) DeactivateConfig(ctx context.Context, id string) (*operations return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 304: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -227,7 +239,7 @@ func (s *webhooks) DeactivateConfig(ctx context.Context, id string) (*operations // DeleteConfig - Delete one config // Delete a webhooks config by ID. -func (s *webhooks) DeleteConfig(ctx context.Context, id string) (*operations.DeleteConfigResponse, error) { +func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.DeleteConfigResponse, error) { request := operations.DeleteConfigRequest{ ID: id, } @@ -271,6 +283,10 @@ func (s *webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { case httpRes.StatusCode == 200: + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -278,7 +294,7 @@ func (s *webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del // GetManyConfigs - Get many configs // Sorted by updated date descending -func (s *webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *string) (*operations.GetManyConfigsResponse, error) { +func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *string) (*operations.GetManyConfigsResponse, error) { request := operations.GetManyConfigsRequest{ Endpoint: endpoint, ID: id, @@ -335,6 +351,10 @@ func (s *webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -350,17 +370,7 @@ func (s *webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str // The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) // // All eventTypes are converted to lower-case when inserted. -func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser, opts ...operations.Option) (*operations.InsertConfigResponse, error) { - o := operations.Options{} - supportedOptions := []string{ - operations.SupportedOptionAcceptHeaderOverride, - } - - for _, opt := range opts { - if err := opt(&o, supportedOptions...); err != nil { - return nil, fmt.Errorf("error applying option: %w", err) - } - } +func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) (*operations.InsertConfigResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/api/webhooks/configs" @@ -376,12 +386,7 @@ func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser, if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - if o.AcceptHeaderOverride != nil { - req.Header.Set("Accept", string(*o.AcceptHeaderOverride)) - } else { - req.Header.Set("Accept", "application/json;q=1, text/plain;q=0") - } - + req.Header.Set("Accept", "application/json") req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) @@ -424,13 +429,11 @@ func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser, return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 400: - switch { - case utils.MatchContentType(contentType, `text/plain`): - out := string(rawBody) - res.InsertConfig400TextPlainString = &out - default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) - } + fallthrough + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -438,7 +441,7 @@ func (s *webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser, // TestConfig - Test one config // Test a config by sending a webhook to its endpoint. -func (s *webhooks) TestConfig(ctx context.Context, id string) (*operations.TestConfigResponse, error) { +func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestConfigResponse, error) { request := operations.TestConfigRequest{ ID: id, } @@ -493,6 +496,10 @@ func (s *webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC default: return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil From 7604ea7b0909f3c46265ed9bcaed8641e39ebb37 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 9 Nov 2023 00:38:58 +0000 Subject: [PATCH 03/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.116.0 --- README.md | 75 +- RELEASES.md | 12 +- .../operations/activateconfigresponse.md | 11 - .../addmetadataontransactionresponse.md | 11 - .../addmetadatatoaccountresponse.md | 11 - .../operations/changeconfigsecretrequest.md | 9 - .../operations/changeconfigsecretresponse.md | 11 - docs/models/operations/confirmholdrequest.md | 9 - docs/models/operations/confirmholdresponse.md | 11 - .../connectorsstripetransferresponse.md | 11 - .../operations/countaccountsresponse.md | 12 - .../operations/counttransactionsresponse.md | 12 - .../operations/createbalanceresponse.md | 12 - .../models/operations/createclientresponse.md | 11 - docs/models/operations/createscoperesponse.md | 11 - docs/models/operations/createsecretrequest.md | 9 - .../models/operations/createsecretresponse.md | 11 - .../operations/createtransactionresponse.md | 12 - .../operations/createtransactionsresponse.md | 12 - .../models/operations/createwalletresponse.md | 12 - .../operations/createworkflowresponse.md | 12 - .../models/operations/creditwalletresponse.md | 11 - .../operations/deactivateconfigresponse.md | 11 - docs/models/operations/debitwalletresponse.md | 12 - docs/models/operations/getaccountresponse.md | 12 - docs/models/operations/getbalanceresponse.md | 12 - .../getbalancesaggregatedresponse.md | 12 - docs/models/operations/getbalancesresponse.md | 12 - .../operations/getconnectortaskrequest.md | 9 - .../operations/getconnectortaskresponse.md | 11 - docs/models/operations/getflowresponse.md | 12 - docs/models/operations/getholdresponse.md | 12 - docs/models/operations/getholdsresponse.md | 12 - docs/models/operations/getinforesponse.md | 12 - .../operations/getledgerinforesponse.md | 12 - .../operations/getmanyconfigsresponse.md | 11 - docs/models/operations/getmappingresponse.md | 12 - docs/models/operations/getpaymentresponse.md | 11 - .../operations/getserverinforesponse.md | 11 - .../operations/gettransactionresponse.md | 12 - .../operations/gettransactionsresponse.md | 12 - docs/models/operations/getwalletresponse.md | 12 - .../getworkflowoccurrenceresponse.md | 12 - .../models/operations/insertconfigresponse.md | 11 - .../operations/installconnectorrequest.md | 9 - .../models/operations/listaccountsresponse.md | 12 - .../operations/listallconnectorsresponse.md | 11 - .../models/operations/listbalancesresponse.md | 11 - docs/models/operations/listclientsresponse.md | 11 - .../listconfigsavailableconnectorsresponse.md | 11 - .../operations/listconnectortasksresponse.md | 11 - docs/models/operations/listflowsresponse.md | 12 - docs/models/operations/listlogsresponse.md | 12 - .../models/operations/listpaymentsresponse.md | 11 - docs/models/operations/listrunsresponse.md | 12 - docs/models/operations/listscopesresponse.md | 11 - .../operations/listtransactionsresponse.md | 12 - docs/models/operations/listusersresponse.md | 11 - docs/models/operations/listwalletsresponse.md | 11 - .../orchestrationgetserverinforesponse.md | 12 - .../paymentsgetserverinforesponse.md | 11 - .../paymentslistaccountsresponse.md | 11 - docs/models/operations/readclientresponse.md | 11 - .../operations/readconnectorconfigrequest.md | 8 - .../operations/readconnectorconfigresponse.md | 11 - docs/models/operations/readscoperesponse.md | 11 - docs/models/operations/readstatsresponse.md | 12 - docs/models/operations/readuserresponse.md | 11 - .../operations/reverttransactionresponse.md | 12 - docs/models/operations/runworkflowresponse.md | 12 - .../operations/searchgetserverinforesponse.md | 11 - docs/models/operations/searchresponse.md | 11 - docs/models/operations/testconfigresponse.md | 11 - .../operations/uninstallconnectorrequest.md | 8 - .../models/operations/updateclientresponse.md | 11 - .../models/operations/updatemappingrequest.md | 9 - .../operations/updatemappingresponse.md | 12 - docs/models/operations/updatescoperesponse.md | 11 - .../models/operations/updatewalletresponse.md | 11 - docs/models/operations/voidholdresponse.md | 11 - .../walletsgetserverinforesponse.md | 12 - docs/models/shared/accountresponse.md | 8 - docs/models/shared/accountscursor.md | 8 - docs/models/shared/accountscursorresponse.md | 8 - .../shared/accountscursorresponsecursor.md | 12 - .../shared/accountwithvolumesandbalances.md | 12 - docs/models/shared/attempt.md | 17 - docs/models/shared/attemptresponse.md | 8 - docs/models/shared/balancescursorresponse.md | 8 - docs/models/shared/client.md | 17 - docs/models/shared/config.md | 8 - docs/models/shared/configinfo.md | 10 - docs/models/shared/configresponse.md | 8 - docs/models/shared/configsresponse.md | 8 - docs/models/shared/configsresponsecursor.md | 12 - docs/models/shared/connectorconfigresponse.md | 8 - .../shared/connectorsconfigsresponse.md | 8 - .../connectorsconfigsresponseconnector.md | 8 - docs/models/shared/connectorsresponsedata.md | 9 - docs/models/shared/contract.md | 9 - docs/models/shared/createbalanceresponse.md | 8 - docs/models/shared/createscoperesponse.md | 8 - docs/models/shared/createsecretresponse.md | 8 - docs/models/shared/createwalletresponse.md | 8 - docs/models/shared/createworkflowresponse.md | 8 - docs/models/shared/creditwalletrequest.md | 12 - docs/models/shared/cursor.md | 12 - docs/models/shared/data.md | 8 - docs/models/shared/debitwalletresponse.md | 8 - docs/models/shared/error.md | 9 - docs/models/shared/expandeddebithold.md | 14 - docs/models/shared/getbalanceresponse.md | 8 - docs/models/shared/getholdresponse.md | 8 - docs/models/shared/getholdsresponsecursor.md | 12 - docs/models/shared/gettransactionsresponse.md | 8 - .../shared/gettransactionsresponsecursor.md | 12 - docs/models/shared/getwalletresponse.md | 8 - .../shared/getworkflowoccurrenceresponse.md | 8 - docs/models/shared/hold.md | 12 - docs/models/shared/listbalancesresponse.md | 8 - .../shared/listbalancesresponsecursor.md | 12 - docs/models/shared/listclientsresponse.md | 8 - docs/models/shared/listrunsresponsecursor.md | 12 - docs/models/shared/listscopesresponse.md | 8 - docs/models/shared/listusersresponse.md | 8 - docs/models/shared/listwalletsresponse.md | 8 - .../shared/listwalletsresponsecursor.md | 12 - .../models/shared/logscursorresponsecursor.md | 12 - docs/models/shared/migrationinfo.md | 11 - docs/models/shared/payment.md | 20 - docs/models/shared/paymentadjustment.md | 12 - docs/models/shared/paymentmetadata.md | 10 - docs/models/shared/paymentresponse.md | 8 - docs/models/shared/paymentsaccount.md | 12 - docs/models/shared/paymentscursor.md | 8 - docs/models/shared/paymentscursorcursor.md | 12 - docs/models/shared/posttransaction.md | 12 - docs/models/shared/readclientresponse.md | 8 - docs/models/shared/readscoperesponse.md | 8 - docs/models/shared/readuserresponse.md | 8 - docs/models/shared/responsecursor.md | 13 - docs/models/shared/statsresponse.md | 8 - docs/models/shared/taskbankingcircle.md | 15 - docs/models/shared/taskcurrencycloud.md | 15 - docs/models/shared/taskdummypay.md | 15 - docs/models/shared/taskmodulr.md | 15 - docs/models/shared/taskresponse.md | 8 - docs/models/shared/taskscursor.md | 8 - docs/models/shared/taskscursorcursor.md | 12 - docs/models/shared/taskstripe.md | 15 - docs/models/shared/taskwise.md | 15 - docs/models/shared/transaction.md | 14 - docs/models/shared/transactiondata.md | 11 - docs/models/shared/transactionresponse.md | 8 - docs/models/shared/transactions.md | 8 - .../shared/transactionscursorresponse.md | 8 - .../transactionscursorresponsecursor.md | 12 - docs/models/shared/transactionsresponse.md | 8 - docs/models/shared/updateclientresponse.md | 8 - docs/models/shared/updatescoperesponse.md | 8 - docs/models/shared/walletserrorresponse.md | 9 - docs/models/shared/walletstransaction.md | 14 - docs/models/shared/walletwithbalances.md | 13 - docs/models/shared/workflow.md | 11 - docs/models/shared/workflowoccurrence.md | 12 - .../operations/activateconfigrequest.md | 0 .../operations/activateconfigresponse.md | 11 + .../addmetadataontransactionrequest.md | 0 .../addmetadataontransactionresponse.md | 11 + .../operations/addmetadatatoaccountrequest.md | 0 .../addmetadatatoaccountresponse.md | 11 + .../operations/addscopetoclientrequest.md | 0 .../operations/addscopetoclientresponse.md | 0 .../operations/addtransientscoperequest.md | 0 .../operations/addtransientscoperesponse.md | 0 .../models/operations/balanceoperator.md | 0 .../operations/changeconfigsecretrequest.md | 9 + .../operations/changeconfigsecretresponse.md | 11 + .../models/operations/confirmholdrequest.md} | 5 +- .../models/operations/confirmholdresponse.md | 11 + .../connectorsstripetransferresponse.md | 11 + .../models/operations/countaccountsrequest.md | 2 +- .../operations/countaccountsresponse.md | 12 + .../counttransactionsqueryparammetadata.md | 0 .../operations/counttransactionsrequest.md | 2 +- .../operations/counttransactionsresponse.md | 12 + .../operations/createbalancerequest.md} | 5 +- .../operations/createbalanceresponse.md | 12 + .../models/operations/createclientresponse.md | 11 + .../models/operations/createscoperesponse.md | 11 + .../models/operations/createsecretrequest.md} | 5 +- .../models/operations/createsecretresponse.md | 11 + .../operations/createtransactionrequest.md | 2 +- .../operations/createtransactionresponse.md | 12 + .../operations/createtransactionsrequest.md | 9 + .../operations/createtransactionsresponse.md | 12 + .../models/operations/createwalletresponse.md | 12 + .../operations/createworkflowresponse.md | 12 + .../models/operations/creditwalletrequest.md | 9 + .../models/operations/creditwalletresponse.md | 11 + .../operations/deactivateconfigrequest.md | 0 .../operations/deactivateconfigresponse.md | 11 + .../models/operations/debitwalletrequest.md} | 5 +- .../models/operations/debitwalletresponse.md | 12 + .../models/operations/deleteclientrequest.md | 0 .../models/operations/deleteclientresponse.md | 0 .../models/operations/deleteconfigrequest.md | 0 .../models/operations/deleteconfigresponse.md | 0 .../deletescopefromclientrequest.md | 0 .../deletescopefromclientresponse.md | 0 .../models/operations/deletescoperequest.md | 0 .../models/operations/deletescoperesponse.md | 0 .../models/operations/deletesecretrequest.md | 0 .../models/operations/deletesecretresponse.md | 0 .../operations/deletetransientscoperequest.md | 0 .../deletetransientscoperesponse.md | 0 .../models/operations/getaccountrequest.md | 0 .../models/operations/getaccountresponse.md | 12 + .../models/operations/getbalancerequest.md | 0 .../models/operations/getbalanceresponse.md | 12 + .../getbalancesaggregatedrequest.md | 0 .../getbalancesaggregatedresponse.md | 12 + .../models/operations/getbalancesrequest.md | 0 .../models/operations/getbalancesresponse.md | 12 + .../operations/getconnectortaskrequest.md | 9 + .../operations/getconnectortaskresponse.md | 11 + .../models/operations/getflowrequest.md | 0 docs/pkg/models/operations/getflowresponse.md | 12 + .../models/operations/getholdrequest.md | 0 docs/pkg/models/operations/getholdresponse.md | 12 + .../operations/getholdsqueryparammetadata.md | 0 .../models/operations/getholdsrequest.md | 2 +- .../pkg/models/operations/getholdsresponse.md | 12 + docs/pkg/models/operations/getinforesponse.md | 12 + .../models/operations/getledgerinforequest.md | 0 .../operations/getledgerinforesponse.md | 12 + .../operations/getmanyconfigsrequest.md | 0 .../operations/getmanyconfigsresponse.md | 11 + .../models/operations/getmappingrequest.md | 0 .../models/operations/getmappingresponse.md | 12 + .../models/operations/getpaymentrequest.md | 0 .../models/operations/getpaymentresponse.md | 11 + .../operations/getserverinforesponse.md | 11 + .../operations/gettransactionrequest.md | 0 .../operations/gettransactionresponse.md | 12 + .../operations/gettransactionsrequest.md | 0 .../operations/gettransactionsresponse.md | 12 + .../models/operations/getwalletrequest.md | 0 .../models/operations/getwalletresponse.md | 12 + .../getworkflowoccurrencerequest.md | 0 .../getworkflowoccurrenceresponse.md | 12 + .../models/operations/insertconfigresponse.md | 11 + .../operations/installconnectorrequest.md} | 6 +- .../operations/installconnectorresponse.md | 0 .../models/operations/listaccountsrequest.md | 6 +- .../models/operations/listaccountsresponse.md | 12 + .../operations/listallconnectorsresponse.md | 11 + .../models/operations/listbalancesrequest.md | 0 .../models/operations/listbalancesresponse.md | 11 + .../models/operations/listclientsresponse.md | 11 + .../listconfigsavailableconnectorsresponse.md | 11 + .../operations/listconnectortasksrequest.md | 2 +- .../operations/listconnectortasksresponse.md | 11 + .../models/operations/listflowsresponse.md | 12 + .../models/operations/listlogsrequest.md | 0 .../pkg/models/operations/listlogsresponse.md | 12 + .../models/operations/listpaymentsrequest.md | 0 .../models/operations/listpaymentsresponse.md | 11 + .../models/operations/listrunsrequest.md | 0 .../pkg/models/operations/listrunsresponse.md | 12 + .../models/operations/listscopesresponse.md | 11 + .../listtransactionsqueryparammetadata.md | 0 .../operations/listtransactionsrequest.md | 2 +- .../operations/listtransactionsresponse.md | 12 + .../models/operations/listusersresponse.md | 11 + .../listwalletsqueryparammetadata.md | 0 .../models/operations/listwalletsrequest.md | 2 +- .../models/operations/listwalletsresponse.md | 11 + docs/{ => pkg}/models/operations/metadata.md | 0 .../orchestrationgetserverinforesponse.md | 12 + .../paymentsgetserverinforesponse.md | 11 + .../operations/paymentslistaccountsrequest.md | 0 .../paymentslistaccountsresponse.md | 11 + .../operations/queryparambalanceoperator.md | 0 .../models/operations/queryparammetadata.md | 0 .../models/operations/readclientrequest.md | 0 .../models/operations/readclientresponse.md | 11 + .../operations/readconnectorconfigrequest.md | 8 + .../operations/readconnectorconfigresponse.md | 11 + .../models/operations/readscoperequest.md | 0 .../models/operations/readscoperesponse.md | 11 + .../models/operations/readstatsrequest.md | 0 .../models/operations/readstatsresponse.md | 12 + .../models/operations/readuserrequest.md | 0 .../pkg/models/operations/readuserresponse.md | 11 + .../operations/resetconnectorrequest.md | 8 + .../operations/resetconnectorresponse.md | 0 .../operations/reverttransactionrequest.md | 0 .../operations/reverttransactionresponse.md | 12 + .../models/operations/runscriptrequest.md | 2 +- .../models/operations/runscriptresponse.md | 2 +- .../models/operations/runworkflowrequest.md | 0 .../models/operations/runworkflowresponse.md | 12 + .../operations/searchgetserverinforesponse.md | 11 + docs/pkg/models/operations/searchresponse.md | 11 + .../models/operations/testconfigrequest.md | 0 .../models/operations/testconfigresponse.md | 11 + .../operations/uninstallconnectorrequest.md | 8 + .../operations/uninstallconnectorresponse.md | 0 .../models/operations/updateclientrequest.md | 9 + .../models/operations/updateclientresponse.md | 11 + .../models/operations/updatemappingrequest.md | 9 + .../operations/updatemappingresponse.md | 12 + .../models/operations/updatescoperequest.md | 9 + .../models/operations/updatescoperesponse.md | 11 + .../models/operations/updatewalletrequest.md | 9 + .../operations/updatewalletrequestbody.md | 0 .../models/operations/updatewalletresponse.md | 11 + .../models/operations/voidholdrequest.md | 0 .../pkg/models/operations/voidholdresponse.md | 11 + .../walletsgetserverinforesponse.md | 12 + .../models/shared/account.md} | 7 +- docs/pkg/models/shared/accountresponse.md | 8 + docs/pkg/models/shared/accountscursor.md | 8 + .../models/shared/accountscursorresponse.md | 8 + .../shared/accountscursorresponsecursor.md | 12 + .../shared/accountwithvolumesandbalances.md | 12 + .../accountwithvolumesandbalancesmetadata.md | 0 .../shared/aggregatebalancesresponse.md | 0 docs/{ => pkg}/models/shared/assetholder.md | 0 docs/pkg/models/shared/attempt.md | 17 + docs/pkg/models/shared/attemptresponse.md | 8 + docs/{ => pkg}/models/shared/balance.md | 0 docs/pkg/models/shared/balances.md | 8 + .../models/shared/balancescursorresponse.md | 8 + .../shared/balancescursorresponsecursor.md | 0 .../models/shared/balancewithassets.md | 0 .../models/shared/bankingcircleconfig.md | 0 docs/pkg/models/shared/client.md | 17 + docs/{ => pkg}/models/shared/clientsecret.md | 0 docs/pkg/models/shared/config.md | 8 + .../models/shared/configchangesecret.md | 0 docs/pkg/models/shared/configinfo.md | 10 + docs/pkg/models/shared/configinforesponse.md | 8 + docs/pkg/models/shared/configresponse.md | 8 + docs/pkg/models/shared/configsresponse.md | 8 + .../models/shared/configsresponsecursor.md | 12 + docs/{ => pkg}/models/shared/configuser.md | 0 .../models/shared/confirmholdrequest.md | 0 docs/{ => pkg}/models/shared/connector.md | 0 .../models/shared/connectorconfig.md | 0 .../models/shared/connectorconfigresponse.md} | 5 +- .../shared/connectorsconfigsresponse.md | 8 + .../connectorsconfigsresponseconnector.md} | 4 +- docs/pkg/models/shared/connectorsresponse.md | 8 + .../models/shared/connectorsresponsedata.md | 9 + .../models/shared/contract.md} | 6 +- .../models/shared/createbalancerequest.md | 0 .../models/shared/createbalanceresponse.md | 8 + .../models/shared/createclientrequest.md | 0 .../pkg/models/shared/createclientresponse.md | 8 + .../models/shared/createscoperequest.md | 0 .../models/shared/createscoperesponse.md} | 4 +- .../models/shared/createsecretrequest.md | 0 .../pkg/models/shared/createsecretresponse.md | 8 + .../models/shared/createwalletrequest.md | 0 .../pkg/models/shared/createwalletresponse.md | 8 + .../models/shared/createworkflowrequest.md | 0 .../models/shared/createworkflowresponse.md | 8 + docs/pkg/models/shared/creditwalletrequest.md | 12 + .../models/shared/currencycloudconfig.md | 0 docs/pkg/models/shared/cursor.md | 12 + docs/pkg/models/shared/data.md | 8 + .../models/shared/debitwalletrequest.md | 4 +- .../models/shared/debitwalletresponse.md} | 4 +- docs/{ => pkg}/models/shared/descriptor.md | 0 .../{ => pkg}/models/shared/dummypayconfig.md | 0 docs/pkg/models/shared/error.md | 9 + docs/{ => pkg}/models/shared/errorcode.md | 0 docs/{ => pkg}/models/shared/errorresponse.md | 2 +- docs/{ => pkg}/models/shared/errorsenum.md | 0 docs/pkg/models/shared/expandeddebithold.md | 14 + docs/{ => pkg}/models/shared/expr.md | 0 .../models/shared/getbalanceresponse.md} | 5 +- docs/pkg/models/shared/getholdresponse.md | 8 + docs/pkg/models/shared/getholdsresponse.md | 8 + .../models/shared/getholdsresponsecursor.md} | 10 +- .../models/shared/gettransactionsresponse.md | 8 + .../shared/gettransactionsresponsecursor.md | 12 + docs/pkg/models/shared/getwalletresponse.md | 8 + .../shared/getworkflowoccurrenceresponse.md | 8 + docs/pkg/models/shared/getworkflowresponse.md | 8 + docs/pkg/models/shared/hold.md | 12 + docs/{ => pkg}/models/shared/key.md | 0 .../models/shared/ledgeraccountsubject.md | 0 docs/pkg/models/shared/ledgerinfo.md | 9 + .../models/shared/ledgerinforesponse.md} | 4 +- docs/{ => pkg}/models/shared/ledgerstorage.md | 0 .../pkg/models/shared/listbalancesresponse.md | 8 + .../shared/listbalancesresponsecursor.md | 12 + .../models/shared/listclientsresponse.md} | 4 +- docs/pkg/models/shared/listrunsresponse.md | 8 + .../models/shared/listrunsresponsecursor.md | 12 + docs/pkg/models/shared/listscopesresponse.md | 8 + docs/pkg/models/shared/listusersresponse.md | 8 + docs/pkg/models/shared/listwalletsresponse.md | 8 + .../shared/listwalletsresponsecursor.md | 12 + .../models/shared/listworkflowsresponse.md | 8 + docs/{ => pkg}/models/shared/log.md | 4 +- docs/{ => pkg}/models/shared/logdata.md | 0 .../models/shared/logscursorresponse.md} | 5 +- .../models/shared/logscursorresponsecursor.md | 12 + docs/pkg/models/shared/mapping.md | 8 + .../models/shared/mappingresponse.md} | 4 +- docs/{ => pkg}/models/shared/metadata.md | 0 docs/pkg/models/shared/migrationinfo.md | 11 + docs/{ => pkg}/models/shared/modulrconfig.md | 0 docs/{ => pkg}/models/shared/monetary.md | 0 docs/pkg/models/shared/payment.md | 20 + docs/pkg/models/shared/paymentadjustment.md | 12 + .../models/shared/paymentadjustmentraw.md | 0 docs/pkg/models/shared/paymentmetadata.md | 10 + .../models/shared/paymentmetadatachangelog.md | 0 docs/pkg/models/shared/paymentresponse.md | 8 + docs/pkg/models/shared/paymentsaccount.md | 12 + .../models/shared/paymentsaccounttype.md | 0 docs/pkg/models/shared/paymentscursor.md | 8 + .../pkg/models/shared/paymentscursorcursor.md | 12 + docs/{ => pkg}/models/shared/paymentstatus.md | 0 docs/{ => pkg}/models/shared/paymenttype.md | 0 docs/{ => pkg}/models/shared/posting.md | 0 docs/pkg/models/shared/posttransaction.md | 12 + .../models/shared/posttransactionscript.md | 2 +- .../models/shared/posttransactionvars.md | 0 docs/{ => pkg}/models/shared/query.md | 0 docs/{ => pkg}/models/shared/raw.md | 0 .../models/shared/readclientresponse.md} | 4 +- .../models/shared/readscoperesponse.md} | 4 +- .../models/shared/readuserresponse.md} | 4 +- .../models/shared/response.md} | 5 +- docs/pkg/models/shared/responsecursor.md | 13 + docs/{ => pkg}/models/shared/responsedata.md | 0 .../models/shared/responseschemasdata.md | 0 docs/pkg/models/shared/runworkflowresponse.md | 8 + docs/{ => pkg}/models/shared/scheme.md | 0 docs/{ => pkg}/models/shared/scope.md | 0 docs/{ => pkg}/models/shared/script.md | 2 +- .../{ => pkg}/models/shared/scriptresponse.md | 4 +- docs/{ => pkg}/models/shared/secret.md | 0 docs/{ => pkg}/models/shared/security.md | 0 docs/{ => pkg}/models/shared/serverinfo.md | 0 docs/{ => pkg}/models/shared/stagestatus.md | 0 docs/{ => pkg}/models/shared/state.md | 0 docs/{ => pkg}/models/shared/stats.md | 0 docs/pkg/models/shared/statsresponse.md | 8 + docs/pkg/models/shared/storage.md | 8 + docs/{ => pkg}/models/shared/stripeconfig.md | 0 .../models/shared/stripetransferrequest.md | 2 +- .../shared/stripetransferrequestmetadata.md | 0 .../models/shared/stripetransferresponse.md | 0 docs/{ => pkg}/models/shared/subject.md | 0 docs/pkg/models/shared/taskbankingcircle.md | 15 + .../models/shared/taskbankingcirclestate.md | 0 docs/pkg/models/shared/taskcurrencycloud.md | 15 + .../shared/taskcurrencyclouddescriptor.md | 0 .../models/shared/taskcurrencycloudstate.md | 0 docs/pkg/models/shared/taskdummypay.md | 15 + .../models/shared/taskdummypaydescriptor.md | 0 .../models/shared/taskdummypaystate.md | 0 docs/pkg/models/shared/taskmodulr.md | 15 + .../models/shared/taskmodulrdescriptor.md | 0 .../models/shared/taskmodulrstate.md | 0 .../models/shared/taskresponse.md} | 5 +- .../models/shared/taskresponsedata.md | 0 docs/pkg/models/shared/taskscursor.md | 8 + docs/pkg/models/shared/taskscursorcursor.md | 12 + .../models/shared/taskscursordata.md | 0 docs/pkg/models/shared/taskstripe.md | 15 + .../models/shared/taskstripedescriptor.md | 0 .../models/shared/taskstripestate.md | 0 docs/pkg/models/shared/taskwise.md | 15 + .../models/shared/taskwisedescriptor.md | 0 docs/{ => pkg}/models/shared/taskwisestate.md | 0 docs/{ => pkg}/models/shared/total.md | 0 docs/pkg/models/shared/transaction.md | 14 + docs/pkg/models/shared/transactiondata.md | 11 + .../models/shared/transactionresponse.md} | 5 +- .../models/shared/transactions.md} | 5 +- .../shared/transactionscursorresponse.md | 8 + .../transactionscursorresponsecursor.md | 12 + .../pkg/models/shared/transactionsresponse.md | 8 + docs/{ => pkg}/models/shared/type.md | 0 .../models/shared/updateclientrequest.md | 0 .../pkg/models/shared/updateclientresponse.md | 8 + .../models/shared/updatescoperequest.md | 0 .../models/shared/updatescoperesponse.md} | 4 +- docs/{ => pkg}/models/shared/user.md | 0 docs/{ => pkg}/models/shared/vars.md | 0 docs/{ => pkg}/models/shared/volume.md | 0 docs/{ => pkg}/models/shared/wallet.md | 0 .../pkg/models/shared/walletserrorresponse.md | 9 + .../shared/walletserrorresponseerrorcode.md | 0 docs/pkg/models/shared/walletstransaction.md | 14 + docs/{ => pkg}/models/shared/walletsubject.md | 0 docs/{ => pkg}/models/shared/walletsvolume.md | 0 docs/pkg/models/shared/walletwithbalances.md | 13 + .../{ => pkg}/models/shared/webhooksconfig.md | 0 docs/{ => pkg}/models/shared/wiseconfig.md | 0 docs/pkg/models/shared/workflow.md | 11 + .../{ => pkg}/models/shared/workflowconfig.md | 0 docs/pkg/models/shared/workflowoccurrence.md | 12 + docs/sdks/accounts/README.md | 36 +- docs/sdks/balances/README.md | 22 +- docs/sdks/clients/README.md | 84 ++- docs/sdks/formance/README.md | 18 +- docs/sdks/ledger/README.md | 8 +- docs/sdks/logs/README.md | 16 +- docs/sdks/mapping/README.md | 24 +- docs/sdks/orchestration/README.md | 52 +- docs/sdks/payments/README.md | 128 ++-- docs/sdks/scopes/README.md | 62 +- docs/sdks/script/README.md | 10 +- docs/sdks/search/README.md | 10 +- docs/sdks/server/README.md | 8 +- docs/sdks/stats/README.md | 8 +- docs/sdks/transactions/README.md | 74 +- docs/sdks/users/README.md | 14 +- docs/sdks/wallets/README.md | 154 ++-- docs/sdks/webhooks/README.md | 62 +- files.gen | 700 +++++++++--------- formance.go | 6 +- gen.yaml | 10 +- 532 files changed, 2735 insertions(+), 2522 deletions(-) delete mode 100755 docs/models/operations/activateconfigresponse.md delete mode 100755 docs/models/operations/addmetadataontransactionresponse.md delete mode 100755 docs/models/operations/addmetadatatoaccountresponse.md delete mode 100755 docs/models/operations/changeconfigsecretrequest.md delete mode 100755 docs/models/operations/changeconfigsecretresponse.md delete mode 100755 docs/models/operations/confirmholdrequest.md delete mode 100755 docs/models/operations/confirmholdresponse.md delete mode 100755 docs/models/operations/connectorsstripetransferresponse.md delete mode 100755 docs/models/operations/countaccountsresponse.md delete mode 100755 docs/models/operations/counttransactionsresponse.md delete mode 100755 docs/models/operations/createbalanceresponse.md delete mode 100755 docs/models/operations/createclientresponse.md delete mode 100755 docs/models/operations/createscoperesponse.md delete mode 100755 docs/models/operations/createsecretrequest.md delete mode 100755 docs/models/operations/createsecretresponse.md delete mode 100755 docs/models/operations/createtransactionresponse.md delete mode 100755 docs/models/operations/createtransactionsresponse.md delete mode 100755 docs/models/operations/createwalletresponse.md delete mode 100755 docs/models/operations/createworkflowresponse.md delete mode 100755 docs/models/operations/creditwalletresponse.md delete mode 100755 docs/models/operations/deactivateconfigresponse.md delete mode 100755 docs/models/operations/debitwalletresponse.md delete mode 100755 docs/models/operations/getaccountresponse.md delete mode 100755 docs/models/operations/getbalanceresponse.md delete mode 100755 docs/models/operations/getbalancesaggregatedresponse.md delete mode 100755 docs/models/operations/getbalancesresponse.md delete mode 100755 docs/models/operations/getconnectortaskrequest.md delete mode 100755 docs/models/operations/getconnectortaskresponse.md delete mode 100755 docs/models/operations/getflowresponse.md delete mode 100755 docs/models/operations/getholdresponse.md delete mode 100755 docs/models/operations/getholdsresponse.md delete mode 100755 docs/models/operations/getinforesponse.md delete mode 100755 docs/models/operations/getledgerinforesponse.md delete mode 100755 docs/models/operations/getmanyconfigsresponse.md delete mode 100755 docs/models/operations/getmappingresponse.md delete mode 100755 docs/models/operations/getpaymentresponse.md delete mode 100755 docs/models/operations/getserverinforesponse.md delete mode 100755 docs/models/operations/gettransactionresponse.md delete mode 100755 docs/models/operations/gettransactionsresponse.md delete mode 100755 docs/models/operations/getwalletresponse.md delete mode 100755 docs/models/operations/getworkflowoccurrenceresponse.md delete mode 100755 docs/models/operations/insertconfigresponse.md delete mode 100755 docs/models/operations/installconnectorrequest.md delete mode 100755 docs/models/operations/listaccountsresponse.md delete mode 100755 docs/models/operations/listallconnectorsresponse.md delete mode 100755 docs/models/operations/listbalancesresponse.md delete mode 100755 docs/models/operations/listclientsresponse.md delete mode 100755 docs/models/operations/listconfigsavailableconnectorsresponse.md delete mode 100755 docs/models/operations/listconnectortasksresponse.md delete mode 100755 docs/models/operations/listflowsresponse.md delete mode 100755 docs/models/operations/listlogsresponse.md delete mode 100755 docs/models/operations/listpaymentsresponse.md delete mode 100755 docs/models/operations/listrunsresponse.md delete mode 100755 docs/models/operations/listscopesresponse.md delete mode 100755 docs/models/operations/listtransactionsresponse.md delete mode 100755 docs/models/operations/listusersresponse.md delete mode 100755 docs/models/operations/listwalletsresponse.md delete mode 100755 docs/models/operations/orchestrationgetserverinforesponse.md delete mode 100755 docs/models/operations/paymentsgetserverinforesponse.md delete mode 100755 docs/models/operations/paymentslistaccountsresponse.md delete mode 100755 docs/models/operations/readclientresponse.md delete mode 100755 docs/models/operations/readconnectorconfigrequest.md delete mode 100755 docs/models/operations/readconnectorconfigresponse.md delete mode 100755 docs/models/operations/readscoperesponse.md delete mode 100755 docs/models/operations/readstatsresponse.md delete mode 100755 docs/models/operations/readuserresponse.md delete mode 100755 docs/models/operations/reverttransactionresponse.md delete mode 100755 docs/models/operations/runworkflowresponse.md delete mode 100755 docs/models/operations/searchgetserverinforesponse.md delete mode 100755 docs/models/operations/searchresponse.md delete mode 100755 docs/models/operations/testconfigresponse.md delete mode 100755 docs/models/operations/uninstallconnectorrequest.md delete mode 100755 docs/models/operations/updateclientresponse.md delete mode 100755 docs/models/operations/updatemappingrequest.md delete mode 100755 docs/models/operations/updatemappingresponse.md delete mode 100755 docs/models/operations/updatescoperesponse.md delete mode 100755 docs/models/operations/updatewalletresponse.md delete mode 100755 docs/models/operations/voidholdresponse.md delete mode 100755 docs/models/operations/walletsgetserverinforesponse.md delete mode 100755 docs/models/shared/accountresponse.md delete mode 100755 docs/models/shared/accountscursor.md delete mode 100755 docs/models/shared/accountscursorresponse.md delete mode 100755 docs/models/shared/accountscursorresponsecursor.md delete mode 100755 docs/models/shared/accountwithvolumesandbalances.md delete mode 100755 docs/models/shared/attempt.md delete mode 100755 docs/models/shared/attemptresponse.md delete mode 100755 docs/models/shared/balancescursorresponse.md delete mode 100755 docs/models/shared/client.md delete mode 100755 docs/models/shared/config.md delete mode 100755 docs/models/shared/configinfo.md delete mode 100755 docs/models/shared/configresponse.md delete mode 100755 docs/models/shared/configsresponse.md delete mode 100755 docs/models/shared/configsresponsecursor.md delete mode 100755 docs/models/shared/connectorconfigresponse.md delete mode 100755 docs/models/shared/connectorsconfigsresponse.md delete mode 100755 docs/models/shared/connectorsconfigsresponseconnector.md delete mode 100755 docs/models/shared/connectorsresponsedata.md delete mode 100755 docs/models/shared/contract.md delete mode 100755 docs/models/shared/createbalanceresponse.md delete mode 100755 docs/models/shared/createscoperesponse.md delete mode 100755 docs/models/shared/createsecretresponse.md delete mode 100755 docs/models/shared/createwalletresponse.md delete mode 100755 docs/models/shared/createworkflowresponse.md delete mode 100755 docs/models/shared/creditwalletrequest.md delete mode 100755 docs/models/shared/cursor.md delete mode 100755 docs/models/shared/data.md delete mode 100755 docs/models/shared/debitwalletresponse.md delete mode 100755 docs/models/shared/error.md delete mode 100755 docs/models/shared/expandeddebithold.md delete mode 100755 docs/models/shared/getbalanceresponse.md delete mode 100755 docs/models/shared/getholdresponse.md delete mode 100755 docs/models/shared/getholdsresponsecursor.md delete mode 100755 docs/models/shared/gettransactionsresponse.md delete mode 100755 docs/models/shared/gettransactionsresponsecursor.md delete mode 100755 docs/models/shared/getwalletresponse.md delete mode 100755 docs/models/shared/getworkflowoccurrenceresponse.md delete mode 100755 docs/models/shared/hold.md delete mode 100755 docs/models/shared/listbalancesresponse.md delete mode 100755 docs/models/shared/listbalancesresponsecursor.md delete mode 100755 docs/models/shared/listclientsresponse.md delete mode 100755 docs/models/shared/listrunsresponsecursor.md delete mode 100755 docs/models/shared/listscopesresponse.md delete mode 100755 docs/models/shared/listusersresponse.md delete mode 100755 docs/models/shared/listwalletsresponse.md delete mode 100755 docs/models/shared/listwalletsresponsecursor.md delete mode 100755 docs/models/shared/logscursorresponsecursor.md delete mode 100755 docs/models/shared/migrationinfo.md delete mode 100755 docs/models/shared/payment.md delete mode 100755 docs/models/shared/paymentadjustment.md delete mode 100755 docs/models/shared/paymentmetadata.md delete mode 100755 docs/models/shared/paymentresponse.md delete mode 100755 docs/models/shared/paymentsaccount.md delete mode 100755 docs/models/shared/paymentscursor.md delete mode 100755 docs/models/shared/paymentscursorcursor.md delete mode 100755 docs/models/shared/posttransaction.md delete mode 100755 docs/models/shared/readclientresponse.md delete mode 100755 docs/models/shared/readscoperesponse.md delete mode 100755 docs/models/shared/readuserresponse.md delete mode 100755 docs/models/shared/responsecursor.md delete mode 100755 docs/models/shared/statsresponse.md delete mode 100755 docs/models/shared/taskbankingcircle.md delete mode 100755 docs/models/shared/taskcurrencycloud.md delete mode 100755 docs/models/shared/taskdummypay.md delete mode 100755 docs/models/shared/taskmodulr.md delete mode 100755 docs/models/shared/taskresponse.md delete mode 100755 docs/models/shared/taskscursor.md delete mode 100755 docs/models/shared/taskscursorcursor.md delete mode 100755 docs/models/shared/taskstripe.md delete mode 100755 docs/models/shared/taskwise.md delete mode 100755 docs/models/shared/transaction.md delete mode 100755 docs/models/shared/transactiondata.md delete mode 100755 docs/models/shared/transactionresponse.md delete mode 100755 docs/models/shared/transactions.md delete mode 100755 docs/models/shared/transactionscursorresponse.md delete mode 100755 docs/models/shared/transactionscursorresponsecursor.md delete mode 100755 docs/models/shared/transactionsresponse.md delete mode 100755 docs/models/shared/updateclientresponse.md delete mode 100755 docs/models/shared/updatescoperesponse.md delete mode 100755 docs/models/shared/walletserrorresponse.md delete mode 100755 docs/models/shared/walletstransaction.md delete mode 100755 docs/models/shared/walletwithbalances.md delete mode 100755 docs/models/shared/workflow.md delete mode 100755 docs/models/shared/workflowoccurrence.md rename docs/{ => pkg}/models/operations/activateconfigrequest.md (100%) create mode 100755 docs/pkg/models/operations/activateconfigresponse.md rename docs/{ => pkg}/models/operations/addmetadataontransactionrequest.md (100%) create mode 100755 docs/pkg/models/operations/addmetadataontransactionresponse.md rename docs/{ => pkg}/models/operations/addmetadatatoaccountrequest.md (100%) create mode 100755 docs/pkg/models/operations/addmetadatatoaccountresponse.md rename docs/{ => pkg}/models/operations/addscopetoclientrequest.md (100%) rename docs/{ => pkg}/models/operations/addscopetoclientresponse.md (100%) rename docs/{ => pkg}/models/operations/addtransientscoperequest.md (100%) rename docs/{ => pkg}/models/operations/addtransientscoperesponse.md (100%) rename docs/{ => pkg}/models/operations/balanceoperator.md (100%) create mode 100755 docs/pkg/models/operations/changeconfigsecretrequest.md create mode 100755 docs/pkg/models/operations/changeconfigsecretresponse.md rename docs/{models/shared/getholdsresponse.md => pkg/models/operations/confirmholdrequest.md} (59%) create mode 100755 docs/pkg/models/operations/confirmholdresponse.md create mode 100755 docs/pkg/models/operations/connectorsstripetransferresponse.md rename docs/{ => pkg}/models/operations/countaccountsrequest.md (97%) create mode 100755 docs/pkg/models/operations/countaccountsresponse.md rename docs/{ => pkg}/models/operations/counttransactionsqueryparammetadata.md (100%) rename docs/{ => pkg}/models/operations/counttransactionsrequest.md (99%) create mode 100755 docs/pkg/models/operations/counttransactionsresponse.md rename docs/{models/shared/logscursorresponse.md => pkg/models/operations/createbalancerequest.md} (60%) create mode 100755 docs/pkg/models/operations/createbalanceresponse.md create mode 100755 docs/pkg/models/operations/createclientresponse.md create mode 100755 docs/pkg/models/operations/createscoperesponse.md rename docs/{models/shared/connectorsresponse.md => pkg/models/operations/createsecretrequest.md} (60%) create mode 100755 docs/pkg/models/operations/createsecretresponse.md rename docs/{ => pkg}/models/operations/createtransactionrequest.md (97%) create mode 100755 docs/pkg/models/operations/createtransactionresponse.md create mode 100755 docs/pkg/models/operations/createtransactionsrequest.md create mode 100755 docs/pkg/models/operations/createtransactionsresponse.md create mode 100755 docs/pkg/models/operations/createwalletresponse.md create mode 100755 docs/pkg/models/operations/createworkflowresponse.md create mode 100755 docs/pkg/models/operations/creditwalletrequest.md create mode 100755 docs/pkg/models/operations/creditwalletresponse.md rename docs/{ => pkg}/models/operations/deactivateconfigrequest.md (100%) create mode 100755 docs/pkg/models/operations/deactivateconfigresponse.md rename docs/{models/shared/listrunsresponse.md => pkg/models/operations/debitwalletrequest.md} (59%) create mode 100755 docs/pkg/models/operations/debitwalletresponse.md rename docs/{ => pkg}/models/operations/deleteclientrequest.md (100%) rename docs/{ => pkg}/models/operations/deleteclientresponse.md (100%) rename docs/{ => pkg}/models/operations/deleteconfigrequest.md (100%) rename docs/{ => pkg}/models/operations/deleteconfigresponse.md (100%) rename docs/{ => pkg}/models/operations/deletescopefromclientrequest.md (100%) rename docs/{ => pkg}/models/operations/deletescopefromclientresponse.md (100%) rename docs/{ => pkg}/models/operations/deletescoperequest.md (100%) rename docs/{ => pkg}/models/operations/deletescoperesponse.md (100%) rename docs/{ => pkg}/models/operations/deletesecretrequest.md (100%) rename docs/{ => pkg}/models/operations/deletesecretresponse.md (100%) rename docs/{ => pkg}/models/operations/deletetransientscoperequest.md (100%) rename docs/{ => pkg}/models/operations/deletetransientscoperesponse.md (100%) rename docs/{ => pkg}/models/operations/getaccountrequest.md (100%) create mode 100755 docs/pkg/models/operations/getaccountresponse.md rename docs/{ => pkg}/models/operations/getbalancerequest.md (100%) create mode 100755 docs/pkg/models/operations/getbalanceresponse.md rename docs/{ => pkg}/models/operations/getbalancesaggregatedrequest.md (100%) create mode 100755 docs/pkg/models/operations/getbalancesaggregatedresponse.md rename docs/{ => pkg}/models/operations/getbalancesrequest.md (100%) create mode 100755 docs/pkg/models/operations/getbalancesresponse.md create mode 100755 docs/pkg/models/operations/getconnectortaskrequest.md create mode 100755 docs/pkg/models/operations/getconnectortaskresponse.md rename docs/{ => pkg}/models/operations/getflowrequest.md (100%) create mode 100755 docs/pkg/models/operations/getflowresponse.md rename docs/{ => pkg}/models/operations/getholdrequest.md (100%) create mode 100755 docs/pkg/models/operations/getholdresponse.md rename docs/{ => pkg}/models/operations/getholdsqueryparammetadata.md (100%) rename docs/{ => pkg}/models/operations/getholdsrequest.md (98%) create mode 100755 docs/pkg/models/operations/getholdsresponse.md create mode 100755 docs/pkg/models/operations/getinforesponse.md rename docs/{ => pkg}/models/operations/getledgerinforequest.md (100%) create mode 100755 docs/pkg/models/operations/getledgerinforesponse.md rename docs/{ => pkg}/models/operations/getmanyconfigsrequest.md (100%) create mode 100755 docs/pkg/models/operations/getmanyconfigsresponse.md rename docs/{ => pkg}/models/operations/getmappingrequest.md (100%) create mode 100755 docs/pkg/models/operations/getmappingresponse.md rename docs/{ => pkg}/models/operations/getpaymentrequest.md (100%) create mode 100755 docs/pkg/models/operations/getpaymentresponse.md create mode 100755 docs/pkg/models/operations/getserverinforesponse.md rename docs/{ => pkg}/models/operations/gettransactionrequest.md (100%) create mode 100755 docs/pkg/models/operations/gettransactionresponse.md rename docs/{ => pkg}/models/operations/gettransactionsrequest.md (100%) create mode 100755 docs/pkg/models/operations/gettransactionsresponse.md rename docs/{ => pkg}/models/operations/getwalletrequest.md (100%) create mode 100755 docs/pkg/models/operations/getwalletresponse.md rename docs/{ => pkg}/models/operations/getworkflowoccurrencerequest.md (100%) create mode 100755 docs/pkg/models/operations/getworkflowoccurrenceresponse.md create mode 100755 docs/pkg/models/operations/insertconfigresponse.md rename docs/{models/operations/debitwalletrequest.md => pkg/models/operations/installconnectorrequest.md} (61%) rename docs/{ => pkg}/models/operations/installconnectorresponse.md (100%) rename docs/{ => pkg}/models/operations/listaccountsrequest.md (99%) create mode 100755 docs/pkg/models/operations/listaccountsresponse.md create mode 100755 docs/pkg/models/operations/listallconnectorsresponse.md rename docs/{ => pkg}/models/operations/listbalancesrequest.md (100%) create mode 100755 docs/pkg/models/operations/listbalancesresponse.md create mode 100755 docs/pkg/models/operations/listclientsresponse.md create mode 100755 docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md rename docs/{ => pkg}/models/operations/listconnectortasksrequest.md (98%) create mode 100755 docs/pkg/models/operations/listconnectortasksresponse.md create mode 100755 docs/pkg/models/operations/listflowsresponse.md rename docs/{ => pkg}/models/operations/listlogsrequest.md (100%) create mode 100755 docs/pkg/models/operations/listlogsresponse.md rename docs/{ => pkg}/models/operations/listpaymentsrequest.md (100%) create mode 100755 docs/pkg/models/operations/listpaymentsresponse.md rename docs/{ => pkg}/models/operations/listrunsrequest.md (100%) create mode 100755 docs/pkg/models/operations/listrunsresponse.md create mode 100755 docs/pkg/models/operations/listscopesresponse.md rename docs/{ => pkg}/models/operations/listtransactionsqueryparammetadata.md (100%) rename docs/{ => pkg}/models/operations/listtransactionsrequest.md (99%) create mode 100755 docs/pkg/models/operations/listtransactionsresponse.md create mode 100755 docs/pkg/models/operations/listusersresponse.md rename docs/{ => pkg}/models/operations/listwalletsqueryparammetadata.md (100%) rename docs/{ => pkg}/models/operations/listwalletsrequest.md (98%) create mode 100755 docs/pkg/models/operations/listwalletsresponse.md rename docs/{ => pkg}/models/operations/metadata.md (100%) create mode 100755 docs/pkg/models/operations/orchestrationgetserverinforesponse.md create mode 100755 docs/pkg/models/operations/paymentsgetserverinforesponse.md rename docs/{ => pkg}/models/operations/paymentslistaccountsrequest.md (100%) create mode 100755 docs/pkg/models/operations/paymentslistaccountsresponse.md rename docs/{ => pkg}/models/operations/queryparambalanceoperator.md (100%) rename docs/{ => pkg}/models/operations/queryparammetadata.md (100%) rename docs/{ => pkg}/models/operations/readclientrequest.md (100%) create mode 100755 docs/pkg/models/operations/readclientresponse.md create mode 100755 docs/pkg/models/operations/readconnectorconfigrequest.md create mode 100755 docs/pkg/models/operations/readconnectorconfigresponse.md rename docs/{ => pkg}/models/operations/readscoperequest.md (100%) create mode 100755 docs/pkg/models/operations/readscoperesponse.md rename docs/{ => pkg}/models/operations/readstatsrequest.md (100%) create mode 100755 docs/pkg/models/operations/readstatsresponse.md rename docs/{ => pkg}/models/operations/readuserrequest.md (100%) create mode 100755 docs/pkg/models/operations/readuserresponse.md create mode 100755 docs/pkg/models/operations/resetconnectorrequest.md rename docs/{ => pkg}/models/operations/resetconnectorresponse.md (100%) rename docs/{ => pkg}/models/operations/reverttransactionrequest.md (100%) create mode 100755 docs/pkg/models/operations/reverttransactionresponse.md rename docs/{ => pkg}/models/operations/runscriptrequest.md (97%) rename docs/{ => pkg}/models/operations/runscriptresponse.md (99%) rename docs/{ => pkg}/models/operations/runworkflowrequest.md (100%) create mode 100755 docs/pkg/models/operations/runworkflowresponse.md create mode 100755 docs/pkg/models/operations/searchgetserverinforesponse.md create mode 100755 docs/pkg/models/operations/searchresponse.md rename docs/{ => pkg}/models/operations/testconfigrequest.md (100%) create mode 100755 docs/pkg/models/operations/testconfigresponse.md create mode 100755 docs/pkg/models/operations/uninstallconnectorrequest.md rename docs/{ => pkg}/models/operations/uninstallconnectorresponse.md (100%) create mode 100755 docs/pkg/models/operations/updateclientrequest.md create mode 100755 docs/pkg/models/operations/updateclientresponse.md create mode 100755 docs/pkg/models/operations/updatemappingrequest.md create mode 100755 docs/pkg/models/operations/updatemappingresponse.md create mode 100755 docs/pkg/models/operations/updatescoperequest.md create mode 100755 docs/pkg/models/operations/updatescoperesponse.md create mode 100755 docs/pkg/models/operations/updatewalletrequest.md rename docs/{ => pkg}/models/operations/updatewalletrequestbody.md (100%) create mode 100755 docs/pkg/models/operations/updatewalletresponse.md rename docs/{ => pkg}/models/operations/voidholdrequest.md (100%) create mode 100755 docs/pkg/models/operations/voidholdresponse.md create mode 100755 docs/pkg/models/operations/walletsgetserverinforesponse.md rename docs/{models/operations/createtransactionsrequest.md => pkg/models/shared/account.md} (59%) create mode 100755 docs/pkg/models/shared/accountresponse.md create mode 100755 docs/pkg/models/shared/accountscursor.md create mode 100755 docs/pkg/models/shared/accountscursorresponse.md create mode 100755 docs/pkg/models/shared/accountscursorresponsecursor.md create mode 100755 docs/pkg/models/shared/accountwithvolumesandbalances.md rename docs/{ => pkg}/models/shared/accountwithvolumesandbalancesmetadata.md (100%) rename docs/{ => pkg}/models/shared/aggregatebalancesresponse.md (100%) rename docs/{ => pkg}/models/shared/assetholder.md (100%) create mode 100755 docs/pkg/models/shared/attempt.md create mode 100755 docs/pkg/models/shared/attemptresponse.md rename docs/{ => pkg}/models/shared/balance.md (100%) create mode 100755 docs/pkg/models/shared/balances.md create mode 100755 docs/pkg/models/shared/balancescursorresponse.md rename docs/{ => pkg}/models/shared/balancescursorresponsecursor.md (100%) rename docs/{ => pkg}/models/shared/balancewithassets.md (100%) rename docs/{ => pkg}/models/shared/bankingcircleconfig.md (100%) create mode 100755 docs/pkg/models/shared/client.md rename docs/{ => pkg}/models/shared/clientsecret.md (100%) create mode 100755 docs/pkg/models/shared/config.md rename docs/{ => pkg}/models/shared/configchangesecret.md (100%) create mode 100755 docs/pkg/models/shared/configinfo.md create mode 100755 docs/pkg/models/shared/configinforesponse.md create mode 100755 docs/pkg/models/shared/configresponse.md create mode 100755 docs/pkg/models/shared/configsresponse.md create mode 100755 docs/pkg/models/shared/configsresponsecursor.md rename docs/{ => pkg}/models/shared/configuser.md (100%) rename docs/{ => pkg}/models/shared/confirmholdrequest.md (100%) rename docs/{ => pkg}/models/shared/connector.md (100%) rename docs/{ => pkg}/models/shared/connectorconfig.md (100%) rename docs/{models/operations/updatescoperequest.md => pkg/models/shared/connectorconfigresponse.md} (58%) create mode 100755 docs/pkg/models/shared/connectorsconfigsresponse.md rename docs/{models/shared/createclientresponse.md => pkg/models/shared/connectorsconfigsresponseconnector.md} (74%) create mode 100755 docs/pkg/models/shared/connectorsresponse.md create mode 100755 docs/pkg/models/shared/connectorsresponsedata.md rename docs/{models/shared/ledgerinfo.md => pkg/models/shared/contract.md} (74%) rename docs/{ => pkg}/models/shared/createbalancerequest.md (100%) create mode 100755 docs/pkg/models/shared/createbalanceresponse.md rename docs/{ => pkg}/models/shared/createclientrequest.md (100%) create mode 100755 docs/pkg/models/shared/createclientresponse.md rename docs/{ => pkg}/models/shared/createscoperequest.md (100%) rename docs/{models/shared/listworkflowsresponse.md => pkg/models/shared/createscoperesponse.md} (69%) rename docs/{ => pkg}/models/shared/createsecretrequest.md (100%) create mode 100755 docs/pkg/models/shared/createsecretresponse.md rename docs/{ => pkg}/models/shared/createwalletrequest.md (100%) create mode 100755 docs/pkg/models/shared/createwalletresponse.md rename docs/{ => pkg}/models/shared/createworkflowrequest.md (100%) create mode 100755 docs/pkg/models/shared/createworkflowresponse.md create mode 100755 docs/pkg/models/shared/creditwalletrequest.md rename docs/{ => pkg}/models/shared/currencycloudconfig.md (100%) create mode 100755 docs/pkg/models/shared/cursor.md create mode 100755 docs/pkg/models/shared/data.md rename docs/{ => pkg}/models/shared/debitwalletrequest.md (91%) rename docs/{models/shared/mappingresponse.md => pkg/models/shared/debitwalletresponse.md} (77%) rename docs/{ => pkg}/models/shared/descriptor.md (100%) rename docs/{ => pkg}/models/shared/dummypayconfig.md (100%) create mode 100755 docs/pkg/models/shared/error.md rename docs/{ => pkg}/models/shared/errorcode.md (100%) rename docs/{ => pkg}/models/shared/errorresponse.md (94%) rename docs/{ => pkg}/models/shared/errorsenum.md (100%) create mode 100755 docs/pkg/models/shared/expandeddebithold.md rename docs/{ => pkg}/models/shared/expr.md (100%) rename docs/{models/operations/createbalancerequest.md => pkg/models/shared/getbalanceresponse.md} (59%) create mode 100755 docs/pkg/models/shared/getholdresponse.md create mode 100755 docs/pkg/models/shared/getholdsresponse.md rename docs/{models/shared/account.md => pkg/models/shared/getholdsresponsecursor.md} (50%) create mode 100755 docs/pkg/models/shared/gettransactionsresponse.md create mode 100755 docs/pkg/models/shared/gettransactionsresponsecursor.md create mode 100755 docs/pkg/models/shared/getwalletresponse.md create mode 100755 docs/pkg/models/shared/getworkflowoccurrenceresponse.md create mode 100755 docs/pkg/models/shared/getworkflowresponse.md create mode 100755 docs/pkg/models/shared/hold.md rename docs/{ => pkg}/models/shared/key.md (100%) rename docs/{ => pkg}/models/shared/ledgeraccountsubject.md (100%) create mode 100755 docs/pkg/models/shared/ledgerinfo.md rename docs/{models/shared/storage.md => pkg/models/shared/ledgerinforesponse.md} (81%) rename docs/{ => pkg}/models/shared/ledgerstorage.md (100%) create mode 100755 docs/pkg/models/shared/listbalancesresponse.md create mode 100755 docs/pkg/models/shared/listbalancesresponsecursor.md rename docs/{models/shared/ledgerinforesponse.md => pkg/models/shared/listclientsresponse.md} (79%) create mode 100755 docs/pkg/models/shared/listrunsresponse.md create mode 100755 docs/pkg/models/shared/listrunsresponsecursor.md create mode 100755 docs/pkg/models/shared/listscopesresponse.md create mode 100755 docs/pkg/models/shared/listusersresponse.md create mode 100755 docs/pkg/models/shared/listwalletsresponse.md create mode 100755 docs/pkg/models/shared/listwalletsresponsecursor.md create mode 100755 docs/pkg/models/shared/listworkflowsresponse.md rename docs/{ => pkg}/models/shared/log.md (94%) rename docs/{ => pkg}/models/shared/logdata.md (100%) rename docs/{models/operations/updatewalletrequest.md => pkg/models/shared/logscursorresponse.md} (61%) create mode 100755 docs/pkg/models/shared/logscursorresponsecursor.md create mode 100755 docs/pkg/models/shared/mapping.md rename docs/{models/shared/balances.md => pkg/models/shared/mappingresponse.md} (71%) rename docs/{ => pkg}/models/shared/metadata.md (100%) create mode 100755 docs/pkg/models/shared/migrationinfo.md rename docs/{ => pkg}/models/shared/modulrconfig.md (100%) rename docs/{ => pkg}/models/shared/monetary.md (100%) create mode 100755 docs/pkg/models/shared/payment.md create mode 100755 docs/pkg/models/shared/paymentadjustment.md rename docs/{ => pkg}/models/shared/paymentadjustmentraw.md (100%) create mode 100755 docs/pkg/models/shared/paymentmetadata.md rename docs/{ => pkg}/models/shared/paymentmetadatachangelog.md (100%) create mode 100755 docs/pkg/models/shared/paymentresponse.md create mode 100755 docs/pkg/models/shared/paymentsaccount.md rename docs/{ => pkg}/models/shared/paymentsaccounttype.md (100%) create mode 100755 docs/pkg/models/shared/paymentscursor.md create mode 100755 docs/pkg/models/shared/paymentscursorcursor.md rename docs/{ => pkg}/models/shared/paymentstatus.md (100%) rename docs/{ => pkg}/models/shared/paymenttype.md (100%) rename docs/{ => pkg}/models/shared/posting.md (100%) create mode 100755 docs/pkg/models/shared/posttransaction.md rename docs/{ => pkg}/models/shared/posttransactionscript.md (92%) rename docs/{ => pkg}/models/shared/posttransactionvars.md (100%) rename docs/{ => pkg}/models/shared/query.md (100%) rename docs/{ => pkg}/models/shared/raw.md (100%) rename docs/{models/shared/configinforesponse.md => pkg/models/shared/readclientresponse.md} (70%) rename docs/{models/shared/mapping.md => pkg/models/shared/readscoperesponse.md} (69%) rename docs/{models/shared/getworkflowresponse.md => pkg/models/shared/readuserresponse.md} (77%) rename docs/{models/shared/runworkflowresponse.md => pkg/models/shared/response.md} (63%) create mode 100755 docs/pkg/models/shared/responsecursor.md rename docs/{ => pkg}/models/shared/responsedata.md (100%) rename docs/{ => pkg}/models/shared/responseschemasdata.md (100%) create mode 100755 docs/pkg/models/shared/runworkflowresponse.md rename docs/{ => pkg}/models/shared/scheme.md (100%) rename docs/{ => pkg}/models/shared/scope.md (100%) rename docs/{ => pkg}/models/shared/script.md (94%) rename docs/{ => pkg}/models/shared/scriptresponse.md (91%) rename docs/{ => pkg}/models/shared/secret.md (100%) rename docs/{ => pkg}/models/shared/security.md (100%) rename docs/{ => pkg}/models/shared/serverinfo.md (100%) rename docs/{ => pkg}/models/shared/stagestatus.md (100%) rename docs/{ => pkg}/models/shared/state.md (100%) rename docs/{ => pkg}/models/shared/stats.md (100%) create mode 100755 docs/pkg/models/shared/statsresponse.md create mode 100755 docs/pkg/models/shared/storage.md rename docs/{ => pkg}/models/shared/stripeconfig.md (100%) rename docs/{ => pkg}/models/shared/stripetransferrequest.md (97%) rename docs/{ => pkg}/models/shared/stripetransferrequestmetadata.md (100%) rename docs/{ => pkg}/models/shared/stripetransferresponse.md (100%) rename docs/{ => pkg}/models/shared/subject.md (100%) create mode 100755 docs/pkg/models/shared/taskbankingcircle.md rename docs/{ => pkg}/models/shared/taskbankingcirclestate.md (100%) create mode 100755 docs/pkg/models/shared/taskcurrencycloud.md rename docs/{ => pkg}/models/shared/taskcurrencyclouddescriptor.md (100%) rename docs/{ => pkg}/models/shared/taskcurrencycloudstate.md (100%) create mode 100755 docs/pkg/models/shared/taskdummypay.md rename docs/{ => pkg}/models/shared/taskdummypaydescriptor.md (100%) rename docs/{ => pkg}/models/shared/taskdummypaystate.md (100%) create mode 100755 docs/pkg/models/shared/taskmodulr.md rename docs/{ => pkg}/models/shared/taskmodulrdescriptor.md (100%) rename docs/{ => pkg}/models/shared/taskmodulrstate.md (100%) rename docs/{models/operations/updateclientrequest.md => pkg/models/shared/taskresponse.md} (58%) rename docs/{ => pkg}/models/shared/taskresponsedata.md (100%) create mode 100755 docs/pkg/models/shared/taskscursor.md create mode 100755 docs/pkg/models/shared/taskscursorcursor.md rename docs/{ => pkg}/models/shared/taskscursordata.md (100%) create mode 100755 docs/pkg/models/shared/taskstripe.md rename docs/{ => pkg}/models/shared/taskstripedescriptor.md (100%) rename docs/{ => pkg}/models/shared/taskstripestate.md (100%) create mode 100755 docs/pkg/models/shared/taskwise.md rename docs/{ => pkg}/models/shared/taskwisedescriptor.md (100%) rename docs/{ => pkg}/models/shared/taskwisestate.md (100%) rename docs/{ => pkg}/models/shared/total.md (100%) create mode 100755 docs/pkg/models/shared/transaction.md create mode 100755 docs/pkg/models/shared/transactiondata.md rename docs/{models/shared/response.md => pkg/models/shared/transactionresponse.md} (62%) rename docs/{models/operations/creditwalletrequest.md => pkg/models/shared/transactions.md} (58%) create mode 100755 docs/pkg/models/shared/transactionscursorresponse.md create mode 100755 docs/pkg/models/shared/transactionscursorresponsecursor.md create mode 100755 docs/pkg/models/shared/transactionsresponse.md rename docs/{ => pkg}/models/shared/type.md (100%) rename docs/{ => pkg}/models/shared/updateclientrequest.md (100%) create mode 100755 docs/pkg/models/shared/updateclientresponse.md rename docs/{ => pkg}/models/shared/updatescoperequest.md (100%) rename docs/{models/operations/resetconnectorrequest.md => pkg/models/shared/updatescoperesponse.md} (65%) rename docs/{ => pkg}/models/shared/user.md (100%) rename docs/{ => pkg}/models/shared/vars.md (100%) rename docs/{ => pkg}/models/shared/volume.md (100%) rename docs/{ => pkg}/models/shared/wallet.md (100%) create mode 100755 docs/pkg/models/shared/walletserrorresponse.md rename docs/{ => pkg}/models/shared/walletserrorresponseerrorcode.md (100%) create mode 100755 docs/pkg/models/shared/walletstransaction.md rename docs/{ => pkg}/models/shared/walletsubject.md (100%) rename docs/{ => pkg}/models/shared/walletsvolume.md (100%) create mode 100755 docs/pkg/models/shared/walletwithbalances.md rename docs/{ => pkg}/models/shared/webhooksconfig.md (100%) rename docs/{ => pkg}/models/shared/wiseconfig.md (100%) create mode 100755 docs/pkg/models/shared/workflow.md rename docs/{ => pkg}/models/shared/workflowconfig.md (100%) create mode 100755 docs/pkg/models/shared/workflowoccurrence.md diff --git a/README.md b/README.md index 89cbe83..7ba7801 100755 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ func main() { * [PaymentsgetServerInfo](docs/sdks/formance/README.md#paymentsgetserverinfo) - Get server info * [SearchgetServerInfo](docs/sdks/formance/README.md#searchgetserverinfo) - Get server info -### [.Clients](docs/sdks/clients/README.md) +### [Clients](docs/sdks/clients/README.md) * [AddScopeToClient](docs/sdks/clients/README.md#addscopetoclient) - Add scope to client * [CreateClient](docs/sdks/clients/README.md#createclient) - Create client @@ -72,7 +72,7 @@ func main() { * [ReadClient](docs/sdks/clients/README.md#readclient) - Read client * [UpdateClient](docs/sdks/clients/README.md#updateclient) - Update client -### [.Scopes](docs/sdks/scopes/README.md) +### [Scopes](docs/sdks/scopes/README.md) * [AddTransientScope](docs/sdks/scopes/README.md#addtransientscope) - Add a transient scope to a scope * [CreateScope](docs/sdks/scopes/README.md#createscope) - Create scope @@ -82,49 +82,49 @@ func main() { * [ReadScope](docs/sdks/scopes/README.md#readscope) - Read scope * [UpdateScope](docs/sdks/scopes/README.md#updatescope) - Update scope -### [.Users](docs/sdks/users/README.md) +### [Users](docs/sdks/users/README.md) * [ListUsers](docs/sdks/users/README.md#listusers) - List users * [ReadUser](docs/sdks/users/README.md#readuser) - Read user -### [.Server](docs/sdks/server/README.md) +### [Server](docs/sdks/server/README.md) * [GetInfo](docs/sdks/server/README.md#getinfo) - Show server information -### [.Ledger](docs/sdks/ledger/README.md) +### [Ledger](docs/sdks/ledger/README.md) * [GetLedgerInfo](docs/sdks/ledger/README.md#getledgerinfo) - Get information about a ledger -### [.Accounts](docs/sdks/accounts/README.md) +### [Accounts](docs/sdks/accounts/README.md) * [AddMetadataToAccount](docs/sdks/accounts/README.md#addmetadatatoaccount) - Add metadata to an account * [CountAccounts](docs/sdks/accounts/README.md#countaccounts) - Count the accounts from a ledger * [GetAccount](docs/sdks/accounts/README.md#getaccount) - Get account by its address * [ListAccounts](docs/sdks/accounts/README.md#listaccounts) - List accounts from a ledger -### [.Balances](docs/sdks/balances/README.md) +### [Balances](docs/sdks/balances/README.md) * [GetBalances](docs/sdks/balances/README.md#getbalances) - Get the balances from a ledger's account * [GetBalancesAggregated](docs/sdks/balances/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts -### [.Logs](docs/sdks/logs/README.md) +### [Logs](docs/sdks/logs/README.md) * [ListLogs](docs/sdks/logs/README.md#listlogs) - List the logs from a ledger -### [.Mapping](docs/sdks/mapping/README.md) +### [Mapping](docs/sdks/mapping/README.md) * [GetMapping](docs/sdks/mapping/README.md#getmapping) - Get the mapping of a ledger * [UpdateMapping](docs/sdks/mapping/README.md#updatemapping) - Update the mapping of a ledger -### [.Script](docs/sdks/script/README.md) +### [Script](docs/sdks/script/README.md) * [~~RunScript~~](docs/sdks/script/README.md#runscript) - Execute a Numscript :warning: **Deprecated** -### [.Stats](docs/sdks/stats/README.md) +### [Stats](docs/sdks/stats/README.md) * [ReadStats](docs/sdks/stats/README.md#readstats) - Get statistics from a ledger -### [.Transactions](docs/sdks/transactions/README.md) +### [Transactions](docs/sdks/transactions/README.md) * [CreateTransactions](docs/sdks/transactions/README.md#createtransactions) - Create a new batch of transactions to a ledger * [AddMetadataOnTransaction](docs/sdks/transactions/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID @@ -134,7 +134,7 @@ func main() { * [ListTransactions](docs/sdks/transactions/README.md#listtransactions) - List transactions from a ledger * [RevertTransaction](docs/sdks/transactions/README.md#reverttransaction) - Revert a ledger transaction by its ID -### [.Orchestration](docs/sdks/orchestration/README.md) +### [Orchestration](docs/sdks/orchestration/README.md) * [CreateWorkflow](docs/sdks/orchestration/README.md#createworkflow) - Create workflow * [GetFlow](docs/sdks/orchestration/README.md#getflow) - Get a flow by id @@ -144,7 +144,7 @@ func main() { * [OrchestrationgetServerInfo](docs/sdks/orchestration/README.md#orchestrationgetserverinfo) - Get server info * [RunWorkflow](docs/sdks/orchestration/README.md#runworkflow) - Run workflow -### [.Payments](docs/sdks/payments/README.md) +### [Payments](docs/sdks/payments/README.md) * [ConnectorsStripeTransfer](docs/sdks/payments/README.md#connectorsstripetransfer) - Transfer funds between Stripe accounts * [GetConnectorTask](docs/sdks/payments/README.md#getconnectortask) - Read a specific task of the connector @@ -159,11 +159,11 @@ func main() { * [ResetConnector](docs/sdks/payments/README.md#resetconnector) - Reset a connector * [UninstallConnector](docs/sdks/payments/README.md#uninstallconnector) - Uninstall a connector -### [.Search](docs/sdks/search/README.md) +### [Search](docs/sdks/search/README.md) * [Search](docs/sdks/search/README.md#search) - Search -### [.Wallets](docs/sdks/wallets/README.md) +### [Wallets](docs/sdks/wallets/README.md) * [ConfirmHold](docs/sdks/wallets/README.md#confirmhold) - Confirm a hold * [CreateBalance](docs/sdks/wallets/README.md#createbalance) - Create a balance @@ -181,7 +181,7 @@ func main() { * [VoidHold](docs/sdks/wallets/README.md#voidhold) - Cancel a hold * [WalletsgetServerInfo](docs/sdks/wallets/README.md#walletsgetserverinfo) - Get server info -### [.Webhooks](docs/sdks/webhooks/README.md) +### [Webhooks](docs/sdks/webhooks/README.md) * [ActivateConfig](docs/sdks/webhooks/README.md#activateconfig) - Activate one config * [ChangeConfigSecret](docs/sdks/webhooks/README.md#changeconfigsecret) - Change the signing secret of a config @@ -203,7 +203,43 @@ func main() { # Error Handling -Handling errors in your SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass. +Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass. + +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | + + +## Example + +```go +package main + +import ( + "context" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "log" +) + +func main() { + s := formancegosdk.New( + formancegosdk.WithSecurity(""), + ) + + ctx := context.Background() + res, err := s.GetServerInfo(ctx) + if err != nil { + + var e *sdkerrors.SDKError + if errors.As(err, &e) { + // handle error + log.Fatal(e.Error()) + } + } +} + +``` @@ -330,12 +366,11 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea - # Authentication ## Per-Client Security Schemes -Your SDK supports the following security scheme globally: +This SDK supports the following security scheme globally: | Name | Type | Scheme | | --------------- | --------------- | --------------- | diff --git a/RELEASES.md b/RELEASES.md index f84e3e0..7783566 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -130,4 +130,14 @@ Based on: ### Generated - [go v0.5.0] . ### Releases -- [Go v0.5.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.0 - . \ No newline at end of file +- [Go v0.5.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.0 - . + +## 2023-11-09 00:38:44 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.116.0 (2.185.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.5.1] . +### Releases +- [Go v0.5.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.1 - . \ No newline at end of file diff --git a/docs/models/operations/activateconfigresponse.md b/docs/models/operations/activateconfigresponse.md deleted file mode 100755 index 36a9052..0000000 --- a/docs/models/operations/activateconfigresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ActivateConfigResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully activated. | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addmetadataontransactionresponse.md b/docs/models/operations/addmetadataontransactionresponse.md deleted file mode 100755 index 37afeaa..0000000 --- a/docs/models/operations/addmetadataontransactionresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddMetadataOnTransactionResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addmetadatatoaccountresponse.md b/docs/models/operations/addmetadatatoaccountresponse.md deleted file mode 100755 index 2a99068..0000000 --- a/docs/models/operations/addmetadatatoaccountresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddMetadataToAccountResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/changeconfigsecretrequest.md b/docs/models/operations/changeconfigsecretrequest.md deleted file mode 100755 index 7da1f3e..0000000 --- a/docs/models/operations/changeconfigsecretrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChangeConfigSecretRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ID` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | -| `ConfigChangeSecret` | [*shared.ConfigChangeSecret](../../models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/changeconfigsecretresponse.md b/docs/models/operations/changeconfigsecretresponse.md deleted file mode 100755 index a36d563..0000000 --- a/docs/models/operations/changeconfigsecretresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChangeConfigSecretResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Secret successfully changed. | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/confirmholdrequest.md b/docs/models/operations/confirmholdrequest.md deleted file mode 100755 index 8c17599..0000000 --- a/docs/models/operations/confirmholdrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# ConfirmHoldRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `HoldID` | *string* | :heavy_check_mark: | N/A | -| `ConfirmHoldRequest` | [*shared.ConfirmHoldRequest](../../models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/confirmholdresponse.md b/docs/models/operations/confirmholdresponse.md deleted file mode 100755 index f005845..0000000 --- a/docs/models/operations/confirmholdresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConfirmHoldResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/connectorsstripetransferresponse.md b/docs/models/operations/connectorsstripetransferresponse.md deleted file mode 100755 index eaf1f61..0000000 --- a/docs/models/operations/connectorsstripetransferresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConnectorsStripeTransferResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `StripeTransferResponse` | [*shared.StripeTransferResponse](../../models/shared/stripetransferresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/countaccountsresponse.md b/docs/models/operations/countaccountsresponse.md deleted file mode 100755 index 54f910b..0000000 --- a/docs/models/operations/countaccountsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CountAccountsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/counttransactionsresponse.md b/docs/models/operations/counttransactionsresponse.md deleted file mode 100755 index 12cf513..0000000 --- a/docs/models/operations/counttransactionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CountTransactionsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createbalanceresponse.md b/docs/models/operations/createbalanceresponse.md deleted file mode 100755 index 3288552..0000000 --- a/docs/models/operations/createbalanceresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateBalanceResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `CreateBalanceResponse` | [*shared.CreateBalanceResponse](../../models/shared/createbalanceresponse.md) | :heavy_minus_sign: | Created balance | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createclientresponse.md b/docs/models/operations/createclientresponse.md deleted file mode 100755 index 0ae3736..0000000 --- a/docs/models/operations/createclientresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateClientResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `CreateClientResponse` | [*shared.CreateClientResponse](../../models/shared/createclientresponse.md) | :heavy_minus_sign: | Client created | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createscoperesponse.md b/docs/models/operations/createscoperesponse.md deleted file mode 100755 index 11dfd1e..0000000 --- a/docs/models/operations/createscoperesponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateScopeResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `CreateScopeResponse` | [*shared.CreateScopeResponse](../../models/shared/createscoperesponse.md) | :heavy_minus_sign: | Created scope | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createsecretrequest.md b/docs/models/operations/createsecretrequest.md deleted file mode 100755 index b5a08e3..0000000 --- a/docs/models/operations/createsecretrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateSecretRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ClientID` | *string* | :heavy_check_mark: | Client ID | -| `CreateSecretRequest` | [*shared.CreateSecretRequest](../../models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createsecretresponse.md b/docs/models/operations/createsecretresponse.md deleted file mode 100755 index f2ebbae..0000000 --- a/docs/models/operations/createsecretresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateSecretResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `CreateSecretResponse` | [*shared.CreateSecretResponse](../../models/shared/createsecretresponse.md) | :heavy_minus_sign: | Created secret | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createtransactionresponse.md b/docs/models/operations/createtransactionresponse.md deleted file mode 100755 index ed87667..0000000 --- a/docs/models/operations/createtransactionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateTransactionResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `TransactionsResponse` | [*shared.TransactionsResponse](../../models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/createtransactionsresponse.md b/docs/models/operations/createtransactionsresponse.md deleted file mode 100755 index ce2d90d..0000000 --- a/docs/models/operations/createtransactionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateTransactionsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `TransactionsResponse` | [*shared.TransactionsResponse](../../models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/createwalletresponse.md b/docs/models/operations/createwalletresponse.md deleted file mode 100755 index d0592f1..0000000 --- a/docs/models/operations/createwalletresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `CreateWalletResponse` | [*shared.CreateWalletResponse](../../models/shared/createwalletresponse.md) | :heavy_minus_sign: | Wallet created | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createworkflowresponse.md b/docs/models/operations/createworkflowresponse.md deleted file mode 100755 index 1b1d6aa..0000000 --- a/docs/models/operations/createworkflowresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateWorkflowResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `CreateWorkflowResponse` | [*shared.CreateWorkflowResponse](../../models/shared/createworkflowresponse.md) | :heavy_minus_sign: | Created workflow | -| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/creditwalletresponse.md b/docs/models/operations/creditwalletresponse.md deleted file mode 100755 index 4f1ec99..0000000 --- a/docs/models/operations/creditwalletresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreditWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deactivateconfigresponse.md b/docs/models/operations/deactivateconfigresponse.md deleted file mode 100755 index 15ffb93..0000000 --- a/docs/models/operations/deactivateconfigresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeactivateConfigResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully deactivated. | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/debitwalletresponse.md b/docs/models/operations/debitwalletresponse.md deleted file mode 100755 index a8b527b..0000000 --- a/docs/models/operations/debitwalletresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# DebitWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `DebitWalletResponse` | [*shared.DebitWalletResponse](../../models/shared/debitwalletresponse.md) | :heavy_minus_sign: | Wallet successfully debited as a pending hold | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getaccountresponse.md b/docs/models/operations/getaccountresponse.md deleted file mode 100755 index 4f69b0e..0000000 --- a/docs/models/operations/getaccountresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAccountResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `AccountResponse` | [*shared.AccountResponse](../../models/shared/accountresponse.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getbalanceresponse.md b/docs/models/operations/getbalanceresponse.md deleted file mode 100755 index 6bdd936..0000000 --- a/docs/models/operations/getbalanceresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetBalanceResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `GetBalanceResponse` | [*shared.GetBalanceResponse](../../models/shared/getbalanceresponse.md) | :heavy_minus_sign: | Balance summary | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getbalancesaggregatedresponse.md b/docs/models/operations/getbalancesaggregatedresponse.md deleted file mode 100755 index 8729b46..0000000 --- a/docs/models/operations/getbalancesaggregatedresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetBalancesAggregatedResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `AggregateBalancesResponse` | [*shared.AggregateBalancesResponse](../../models/shared/aggregatebalancesresponse.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getbalancesresponse.md b/docs/models/operations/getbalancesresponse.md deleted file mode 100755 index fcad256..0000000 --- a/docs/models/operations/getbalancesresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetBalancesResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `BalancesCursorResponse` | [*shared.BalancesCursorResponse](../../models/shared/balancescursorresponse.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getconnectortaskrequest.md b/docs/models/operations/getconnectortaskrequest.md deleted file mode 100755 index b59c62d..0000000 --- a/docs/models/operations/getconnectortaskrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetConnectorTaskRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | -| `TaskID` | *string* | :heavy_check_mark: | The task ID. | \ No newline at end of file diff --git a/docs/models/operations/getconnectortaskresponse.md b/docs/models/operations/getconnectortaskresponse.md deleted file mode 100755 index 2fe2fb5..0000000 --- a/docs/models/operations/getconnectortaskresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetConnectorTaskResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `TaskResponse` | [*shared.TaskResponse](../../models/shared/taskresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getflowresponse.md b/docs/models/operations/getflowresponse.md deleted file mode 100755 index 5c7bf8c..0000000 --- a/docs/models/operations/getflowresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetFlowResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | -| `GetWorkflowResponse` | [*shared.GetWorkflowResponse](../../models/shared/getworkflowresponse.md) | :heavy_minus_sign: | The workflow | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getholdresponse.md b/docs/models/operations/getholdresponse.md deleted file mode 100755 index 1676405..0000000 --- a/docs/models/operations/getholdresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetHoldResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `GetHoldResponse` | [*shared.GetHoldResponse](../../models/shared/getholdresponse.md) | :heavy_minus_sign: | Holds | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getholdsresponse.md b/docs/models/operations/getholdsresponse.md deleted file mode 100755 index eda9419..0000000 --- a/docs/models/operations/getholdsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetHoldsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `GetHoldsResponse` | [*shared.GetHoldsResponse](../../models/shared/getholdsresponse.md) | :heavy_minus_sign: | Holds | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getinforesponse.md b/docs/models/operations/getinforesponse.md deleted file mode 100755 index 835462c..0000000 --- a/docs/models/operations/getinforesponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetInfoResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ConfigInfoResponse` | [*shared.ConfigInfoResponse](../../models/shared/configinforesponse.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getledgerinforesponse.md b/docs/models/operations/getledgerinforesponse.md deleted file mode 100755 index 44227bf..0000000 --- a/docs/models/operations/getledgerinforesponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetLedgerInfoResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `LedgerInfoResponse` | [*shared.LedgerInfoResponse](../../models/shared/ledgerinforesponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmanyconfigsresponse.md b/docs/models/operations/getmanyconfigsresponse.md deleted file mode 100755 index d57c1e8..0000000 --- a/docs/models/operations/getmanyconfigsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetManyConfigsResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `ConfigsResponse` | [*shared.ConfigsResponse](../../models/shared/configsresponse.md) | :heavy_minus_sign: | OK | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmappingresponse.md b/docs/models/operations/getmappingresponse.md deleted file mode 100755 index f2627ff..0000000 --- a/docs/models/operations/getmappingresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMappingResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `MappingResponse` | [*shared.MappingResponse](../../models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getpaymentresponse.md b/docs/models/operations/getpaymentresponse.md deleted file mode 100755 index f9b6db8..0000000 --- a/docs/models/operations/getpaymentresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetPaymentResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `PaymentResponse` | [*shared.PaymentResponse](../../models/shared/paymentresponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getserverinforesponse.md b/docs/models/operations/getserverinforesponse.md deleted file mode 100755 index 172e4c7..0000000 --- a/docs/models/operations/getserverinforesponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetServerInfoResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/gettransactionresponse.md b/docs/models/operations/gettransactionresponse.md deleted file mode 100755 index 6479ff0..0000000 --- a/docs/models/operations/gettransactionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTransactionResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `TransactionResponse` | [*shared.TransactionResponse](../../models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/gettransactionsresponse.md b/docs/models/operations/gettransactionsresponse.md deleted file mode 100755 index c99b5fa..0000000 --- a/docs/models/operations/gettransactionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTransactionsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `GetTransactionsResponse` | [*shared.GetTransactionsResponse](../../models/shared/gettransactionsresponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getwalletresponse.md b/docs/models/operations/getwalletresponse.md deleted file mode 100755 index 50cd33d..0000000 --- a/docs/models/operations/getwalletresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `GetWalletResponse` | [*shared.GetWalletResponse](../../models/shared/getwalletresponse.md) | :heavy_minus_sign: | Wallet | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getworkflowoccurrenceresponse.md b/docs/models/operations/getworkflowoccurrenceresponse.md deleted file mode 100755 index 6973e32..0000000 --- a/docs/models/operations/getworkflowoccurrenceresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetWorkflowOccurrenceResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | -| `GetWorkflowOccurrenceResponse` | [*shared.GetWorkflowOccurrenceResponse](../../models/shared/getworkflowoccurrenceresponse.md) | :heavy_minus_sign: | The workflow occurrence | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/insertconfigresponse.md b/docs/models/operations/insertconfigresponse.md deleted file mode 100755 index 0a04c5b..0000000 --- a/docs/models/operations/insertconfigresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# InsertConfigResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `ConfigResponse` | [*shared.ConfigResponse](../../models/shared/configresponse.md) | :heavy_minus_sign: | Config created successfully. | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/installconnectorrequest.md b/docs/models/operations/installconnectorrequest.md deleted file mode 100755 index 758c921..0000000 --- a/docs/models/operations/installconnectorrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# InstallConnectorRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `ConnectorConfig` | [shared.ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | -| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/listaccountsresponse.md b/docs/models/operations/listaccountsresponse.md deleted file mode 100755 index eb8c921..0000000 --- a/docs/models/operations/listaccountsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListAccountsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `AccountsCursorResponse` | [*shared.AccountsCursorResponse](../../models/shared/accountscursorresponse.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listallconnectorsresponse.md b/docs/models/operations/listallconnectorsresponse.md deleted file mode 100755 index ec431eb..0000000 --- a/docs/models/operations/listallconnectorsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListAllConnectorsResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ConnectorsResponse` | [*shared.ConnectorsResponse](../../models/shared/connectorsresponse.md) | :heavy_minus_sign: | OK | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listbalancesresponse.md b/docs/models/operations/listbalancesresponse.md deleted file mode 100755 index 0c803e7..0000000 --- a/docs/models/operations/listbalancesresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListBalancesResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ListBalancesResponse` | [*shared.ListBalancesResponse](../../models/shared/listbalancesresponse.md) | :heavy_minus_sign: | Balances list | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listclientsresponse.md b/docs/models/operations/listclientsresponse.md deleted file mode 100755 index 4a2207e..0000000 --- a/docs/models/operations/listclientsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListClientsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ListClientsResponse` | [*shared.ListClientsResponse](../../models/shared/listclientsresponse.md) | :heavy_minus_sign: | List of clients | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listconfigsavailableconnectorsresponse.md b/docs/models/operations/listconfigsavailableconnectorsresponse.md deleted file mode 100755 index 267f107..0000000 --- a/docs/models/operations/listconfigsavailableconnectorsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListConfigsAvailableConnectorsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `ConnectorsConfigsResponse` | [*shared.ConnectorsConfigsResponse](../../models/shared/connectorsconfigsresponse.md) | :heavy_minus_sign: | OK | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listconnectortasksresponse.md b/docs/models/operations/listconnectortasksresponse.md deleted file mode 100755 index cc9fe0b..0000000 --- a/docs/models/operations/listconnectortasksresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListConnectorTasksResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `TasksCursor` | [*shared.TasksCursor](../../models/shared/taskscursor.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/listflowsresponse.md b/docs/models/operations/listflowsresponse.md deleted file mode 100755 index 114b78e..0000000 --- a/docs/models/operations/listflowsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListFlowsResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | -| `ListWorkflowsResponse` | [*shared.ListWorkflowsResponse](../../models/shared/listworkflowsresponse.md) | :heavy_minus_sign: | List of workflows | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listlogsresponse.md b/docs/models/operations/listlogsresponse.md deleted file mode 100755 index 18518b5..0000000 --- a/docs/models/operations/listlogsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListLogsResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `LogsCursorResponse` | [*shared.LogsCursorResponse](../../models/shared/logscursorresponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listpaymentsresponse.md b/docs/models/operations/listpaymentsresponse.md deleted file mode 100755 index 8939fc3..0000000 --- a/docs/models/operations/listpaymentsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListPaymentsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `PaymentsCursor` | [*shared.PaymentsCursor](../../models/shared/paymentscursor.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listrunsresponse.md b/docs/models/operations/listrunsresponse.md deleted file mode 100755 index 39fe21f..0000000 --- a/docs/models/operations/listrunsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListRunsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | -| `ListRunsResponse` | [*shared.ListRunsResponse](../../models/shared/listrunsresponse.md) | :heavy_minus_sign: | List of workflow occurrences | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listscopesresponse.md b/docs/models/operations/listscopesresponse.md deleted file mode 100755 index de5bdf4..0000000 --- a/docs/models/operations/listscopesresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListScopesResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ListScopesResponse` | [*shared.ListScopesResponse](../../models/shared/listscopesresponse.md) | :heavy_minus_sign: | List of scopes | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listtransactionsresponse.md b/docs/models/operations/listtransactionsresponse.md deleted file mode 100755 index dbcde85..0000000 --- a/docs/models/operations/listtransactionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListTransactionsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `TransactionsCursorResponse` | [*shared.TransactionsCursorResponse](../../models/shared/transactionscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/listusersresponse.md b/docs/models/operations/listusersresponse.md deleted file mode 100755 index 601e737..0000000 --- a/docs/models/operations/listusersresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListUsersResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ListUsersResponse` | [*shared.ListUsersResponse](../../models/shared/listusersresponse.md) | :heavy_minus_sign: | List of users | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listwalletsresponse.md b/docs/models/operations/listwalletsresponse.md deleted file mode 100755 index 5055d31..0000000 --- a/docs/models/operations/listwalletsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListWalletsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ListWalletsResponse` | [*shared.ListWalletsResponse](../../models/shared/listwalletsresponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/orchestrationgetserverinforesponse.md b/docs/models/operations/orchestrationgetserverinforesponse.md deleted file mode 100755 index 46cb39f..0000000 --- a/docs/models/operations/orchestrationgetserverinforesponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# OrchestrationgetServerInfoResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | -| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/paymentsgetserverinforesponse.md b/docs/models/operations/paymentsgetserverinforesponse.md deleted file mode 100755 index bad79e1..0000000 --- a/docs/models/operations/paymentsgetserverinforesponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaymentsgetServerInfoResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/paymentslistaccountsresponse.md b/docs/models/operations/paymentslistaccountsresponse.md deleted file mode 100755 index fee21b7..0000000 --- a/docs/models/operations/paymentslistaccountsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PaymentslistAccountsResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `AccountsCursor` | [*shared.AccountsCursor](../../models/shared/accountscursor.md) | :heavy_minus_sign: | OK | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readclientresponse.md b/docs/models/operations/readclientresponse.md deleted file mode 100755 index 95da333..0000000 --- a/docs/models/operations/readclientresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadClientResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ReadClientResponse` | [*shared.ReadClientResponse](../../models/shared/readclientresponse.md) | :heavy_minus_sign: | Retrieved client | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readconnectorconfigrequest.md b/docs/models/operations/readconnectorconfigrequest.md deleted file mode 100755 index eb437e6..0000000 --- a/docs/models/operations/readconnectorconfigrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# ReadConnectorConfigRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/readconnectorconfigresponse.md b/docs/models/operations/readconnectorconfigresponse.md deleted file mode 100755 index d2ef298..0000000 --- a/docs/models/operations/readconnectorconfigresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadConnectorConfigResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `ConnectorConfigResponse` | [*shared.ConnectorConfigResponse](../../models/shared/connectorconfigresponse.md) | :heavy_minus_sign: | OK | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readscoperesponse.md b/docs/models/operations/readscoperesponse.md deleted file mode 100755 index f830df4..0000000 --- a/docs/models/operations/readscoperesponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadScopeResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ReadScopeResponse` | [*shared.ReadScopeResponse](../../models/shared/readscoperesponse.md) | :heavy_minus_sign: | Retrieved scope | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readstatsresponse.md b/docs/models/operations/readstatsresponse.md deleted file mode 100755 index 0bec295..0000000 --- a/docs/models/operations/readstatsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReadStatsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatsResponse` | [*shared.StatsResponse](../../models/shared/statsresponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readuserresponse.md b/docs/models/operations/readuserresponse.md deleted file mode 100755 index fb2cb57..0000000 --- a/docs/models/operations/readuserresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadUserResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ReadUserResponse` | [*shared.ReadUserResponse](../../models/shared/readuserresponse.md) | :heavy_minus_sign: | Retrieved user | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/reverttransactionresponse.md b/docs/models/operations/reverttransactionresponse.md deleted file mode 100755 index 3bd704d..0000000 --- a/docs/models/operations/reverttransactionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# RevertTransactionResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `TransactionResponse` | [*shared.TransactionResponse](../../models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/runworkflowresponse.md b/docs/models/operations/runworkflowresponse.md deleted file mode 100755 index 182fdd9..0000000 --- a/docs/models/operations/runworkflowresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# RunWorkflowResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Error` | [*shared.Error](../../models/shared/error.md) | :heavy_minus_sign: | General error | -| `RunWorkflowResponse` | [*shared.RunWorkflowResponse](../../models/shared/runworkflowresponse.md) | :heavy_minus_sign: | The workflow occurrence | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/searchgetserverinforesponse.md b/docs/models/operations/searchgetserverinforesponse.md deleted file mode 100755 index e728aa7..0000000 --- a/docs/models/operations/searchgetserverinforesponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchgetServerInfoResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/searchresponse.md b/docs/models/operations/searchresponse.md deleted file mode 100755 index 74816dd..0000000 --- a/docs/models/operations/searchresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Response` | [*shared.Response](../../models/shared/response.md) | :heavy_minus_sign: | Success | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/testconfigresponse.md b/docs/models/operations/testconfigresponse.md deleted file mode 100755 index 09b8403..0000000 --- a/docs/models/operations/testconfigresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestConfigResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `AttemptResponse` | [*shared.AttemptResponse](../../models/shared/attemptresponse.md) | :heavy_minus_sign: | OK | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/uninstallconnectorrequest.md b/docs/models/operations/uninstallconnectorrequest.md deleted file mode 100755 index 77656e5..0000000 --- a/docs/models/operations/uninstallconnectorrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# UninstallConnectorRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/updateclientresponse.md b/docs/models/operations/updateclientresponse.md deleted file mode 100755 index 1b47de5..0000000 --- a/docs/models/operations/updateclientresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateClientResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `UpdateClientResponse` | [*shared.UpdateClientResponse](../../models/shared/updateclientresponse.md) | :heavy_minus_sign: | Updated client | \ No newline at end of file diff --git a/docs/models/operations/updatemappingrequest.md b/docs/models/operations/updatemappingrequest.md deleted file mode 100755 index aeaf81f..0000000 --- a/docs/models/operations/updatemappingrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateMappingRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Mapping` | [shared.Mapping](../../models/shared/mapping.md) | :heavy_check_mark: | N/A | | -| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/models/operations/updatemappingresponse.md b/docs/models/operations/updatemappingresponse.md deleted file mode 100755 index a0ae95c..0000000 --- a/docs/models/operations/updatemappingresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateMappingResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorResponse` | [*shared.ErrorResponse](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `MappingResponse` | [*shared.MappingResponse](../../models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/updatescoperesponse.md b/docs/models/operations/updatescoperesponse.md deleted file mode 100755 index a980c61..0000000 --- a/docs/models/operations/updatescoperesponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateScopeResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `UpdateScopeResponse` | [*shared.UpdateScopeResponse](../../models/shared/updatescoperesponse.md) | :heavy_minus_sign: | Updated scope | \ No newline at end of file diff --git a/docs/models/operations/updatewalletresponse.md b/docs/models/operations/updatewalletresponse.md deleted file mode 100755 index 2ed290f..0000000 --- a/docs/models/operations/updatewalletresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/voidholdresponse.md b/docs/models/operations/voidholdresponse.md deleted file mode 100755 index fd3d2c0..0000000 --- a/docs/models/operations/voidholdresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# VoidHoldResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/walletsgetserverinforesponse.md b/docs/models/operations/walletsgetserverinforesponse.md deleted file mode 100755 index ae9ca76..0000000 --- a/docs/models/operations/walletsgetserverinforesponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# WalletsgetServerInfoResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ServerInfo` | [*shared.ServerInfo](../../models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | -| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/shared/accountresponse.md b/docs/models/shared/accountresponse.md deleted file mode 100755 index 5ed40dc..0000000 --- a/docs/models/shared/accountresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# AccountResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `Data` | [shared.AccountWithVolumesAndBalances](../../models/shared/accountwithvolumesandbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursor.md b/docs/models/shared/accountscursor.md deleted file mode 100755 index 3c7b9a5..0000000 --- a/docs/models/shared/accountscursor.md +++ /dev/null @@ -1,8 +0,0 @@ -# AccountsCursor - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `Cursor` | [shared.Cursor](../../models/shared/cursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursorresponse.md b/docs/models/shared/accountscursorresponse.md deleted file mode 100755 index b219113..0000000 --- a/docs/models/shared/accountscursorresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# AccountsCursorResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `Cursor` | [shared.AccountsCursorResponseCursor](../../models/shared/accountscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/accountscursorresponsecursor.md b/docs/models/shared/accountscursorresponsecursor.md deleted file mode 100755 index 398c5aa..0000000 --- a/docs/models/shared/accountscursorresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountsCursorResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Data` | [][shared.Account](../../models/shared/account.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/accountwithvolumesandbalances.md b/docs/models/shared/accountwithvolumesandbalances.md deleted file mode 100755 index 135d8e3..0000000 --- a/docs/models/shared/accountwithvolumesandbalances.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountWithVolumesAndBalances - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | -| `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | | -| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | -| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | \ No newline at end of file diff --git a/docs/models/shared/attempt.md b/docs/models/shared/attempt.md deleted file mode 100755 index 71bcccc..0000000 --- a/docs/models/shared/attempt.md +++ /dev/null @@ -1,17 +0,0 @@ -# Attempt - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Config` | [*shared.WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_minus_sign: | N/A | | -| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `ID` | **string* | :heavy_minus_sign: | N/A | | -| `NextRetryAfter` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `Payload` | **string* | :heavy_minus_sign: | N/A | {"data":"test"} | -| `RetryAttempt` | **int64* | :heavy_minus_sign: | N/A | 1 | -| `Status` | **string* | :heavy_minus_sign: | N/A | success | -| `StatusCode` | **int64* | :heavy_minus_sign: | N/A | 200 | -| `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `WebhookID` | **string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/attemptresponse.md b/docs/models/shared/attemptresponse.md deleted file mode 100755 index 9beee6d..0000000 --- a/docs/models/shared/attemptresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# AttemptResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Data` | [shared.Attempt](../../models/shared/attempt.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balancescursorresponse.md b/docs/models/shared/balancescursorresponse.md deleted file mode 100755 index aefd374..0000000 --- a/docs/models/shared/balancescursorresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# BalancesCursorResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `Cursor` | [shared.BalancesCursorResponseCursor](../../models/shared/balancescursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/client.md b/docs/models/shared/client.md deleted file mode 100755 index 5dbeeb2..0000000 --- a/docs/models/shared/client.md +++ /dev/null @@ -1,17 +0,0 @@ -# Client - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `Description` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | -| `Name` | *string* | :heavy_check_mark: | N/A | -| `PostLogoutRedirectUris` | []*string* | :heavy_minus_sign: | N/A | -| `Public` | **bool* | :heavy_minus_sign: | N/A | -| `RedirectUris` | []*string* | :heavy_minus_sign: | N/A | -| `Scopes` | []*string* | :heavy_minus_sign: | N/A | -| `Secrets` | [][shared.ClientSecret](../../models/shared/clientsecret.md) | :heavy_minus_sign: | N/A | -| `Trusted` | **bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/config.md b/docs/models/shared/config.md deleted file mode 100755 index c094fba..0000000 --- a/docs/models/shared/config.md +++ /dev/null @@ -1,8 +0,0 @@ -# Config - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `Storage` | [shared.LedgerStorage](../../models/shared/ledgerstorage.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configinfo.md b/docs/models/shared/configinfo.md deleted file mode 100755 index 2ff2756..0000000 --- a/docs/models/shared/configinfo.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConfigInfo - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `Config` | [shared.Config](../../models/shared/config.md) | :heavy_check_mark: | N/A | -| `Server` | *string* | :heavy_check_mark: | N/A | -| `Version` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configresponse.md b/docs/models/shared/configresponse.md deleted file mode 100755 index a65f1fe..0000000 --- a/docs/models/shared/configresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConfigResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `Data` | [shared.WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configsresponse.md b/docs/models/shared/configsresponse.md deleted file mode 100755 index 126ba3f..0000000 --- a/docs/models/shared/configsresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConfigsResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `Cursor` | [shared.ConfigsResponseCursor](../../models/shared/configsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configsresponsecursor.md b/docs/models/shared/configsresponsecursor.md deleted file mode 100755 index fbb63ae..0000000 --- a/docs/models/shared/configsresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConfigsResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `Data` | [][shared.WebhooksConfig](../../models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/connectorconfigresponse.md b/docs/models/shared/connectorconfigresponse.md deleted file mode 100755 index c12f1c9..0000000 --- a/docs/models/shared/connectorconfigresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConnectorConfigResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `Data` | [shared.ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponse.md b/docs/models/shared/connectorsconfigsresponse.md deleted file mode 100755 index 333e065..0000000 --- a/docs/models/shared/connectorsconfigsresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConnectorsConfigsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `Data` | [shared.Data](../../models/shared/data.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsconfigsresponseconnector.md b/docs/models/shared/connectorsconfigsresponseconnector.md deleted file mode 100755 index bf37053..0000000 --- a/docs/models/shared/connectorsconfigsresponseconnector.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConnectorsConfigsResponseConnector - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `Key` | [shared.Key](../../models/shared/key.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/connectorsresponsedata.md b/docs/models/shared/connectorsresponsedata.md deleted file mode 100755 index 48f5789..0000000 --- a/docs/models/shared/connectorsresponsedata.md +++ /dev/null @@ -1,9 +0,0 @@ -# ConnectorsResponseData - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `Enabled` | **bool* | :heavy_minus_sign: | N/A | true | -| `Provider` | [*shared.Connector](../../models/shared/connector.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/contract.md b/docs/models/shared/contract.md deleted file mode 100755 index 4d86582..0000000 --- a/docs/models/shared/contract.md +++ /dev/null @@ -1,9 +0,0 @@ -# Contract - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `Account` | **string* | :heavy_minus_sign: | N/A | users:001 | -| `Expr` | [shared.Expr](../../models/shared/expr.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/createbalanceresponse.md b/docs/models/shared/createbalanceresponse.md deleted file mode 100755 index b69c01a..0000000 --- a/docs/models/shared/createbalanceresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# CreateBalanceResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Data` | [shared.Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createscoperesponse.md b/docs/models/shared/createscoperesponse.md deleted file mode 100755 index 9688352..0000000 --- a/docs/models/shared/createscoperesponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# CreateScopeResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `Data` | [*shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createsecretresponse.md b/docs/models/shared/createsecretresponse.md deleted file mode 100755 index 3e1febe..0000000 --- a/docs/models/shared/createsecretresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# CreateSecretResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `Data` | [*shared.Secret](../../models/shared/secret.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createwalletresponse.md b/docs/models/shared/createwalletresponse.md deleted file mode 100755 index 9df0309..0000000 --- a/docs/models/shared/createwalletresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# CreateWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `Data` | [shared.Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createworkflowresponse.md b/docs/models/shared/createworkflowresponse.md deleted file mode 100755 index 4be2b1a..0000000 --- a/docs/models/shared/createworkflowresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# CreateWorkflowResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Data` | [shared.Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/creditwalletrequest.md b/docs/models/shared/creditwalletrequest.md deleted file mode 100755 index 90d9824..0000000 --- a/docs/models/shared/creditwalletrequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreditWalletRequest - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Amount` | [shared.Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | -| `Balance` | **string* | :heavy_minus_sign: | The balance to credit | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | -| `Reference` | **string* | :heavy_minus_sign: | N/A | -| `Sources` | [][shared.Subject](../../models/shared/subject.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/cursor.md b/docs/models/shared/cursor.md deleted file mode 100755 index 28ad745..0000000 --- a/docs/models/shared/cursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# Cursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `Data` | [][shared.PaymentsAccount](../../models/shared/paymentsaccount.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/data.md b/docs/models/shared/data.md deleted file mode 100755 index ba73421..0000000 --- a/docs/models/shared/data.md +++ /dev/null @@ -1,8 +0,0 @@ -# Data - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `Connector` | [shared.ConnectorsConfigsResponseConnector](../../models/shared/connectorsconfigsresponseconnector.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/debitwalletresponse.md b/docs/models/shared/debitwalletresponse.md deleted file mode 100755 index 3daf662..0000000 --- a/docs/models/shared/debitwalletresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# DebitWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `Data` | [shared.Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/error.md b/docs/models/shared/error.md deleted file mode 100755 index a02a088..0000000 --- a/docs/models/shared/error.md +++ /dev/null @@ -1,9 +0,0 @@ -# Error - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ErrorCode` | [shared.ErrorCode](../../models/shared/errorcode.md) | :heavy_check_mark: | N/A | -| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/expandeddebithold.md b/docs/models/shared/expandeddebithold.md deleted file mode 100755 index 176c61d..0000000 --- a/docs/models/shared/expandeddebithold.md +++ /dev/null @@ -1,14 +0,0 @@ -# ExpandedDebitHold - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Description` | *string* | :heavy_check_mark: | N/A | | -| `Destination` | [*shared.Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | | -| `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | | -| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | | -| `OriginalAmount` | *int64* | :heavy_check_mark: | Original amount on hold | 100 | -| `Remaining` | *int64* | :heavy_check_mark: | Remaining amount on hold | 10 | -| `WalletID` | *string* | :heavy_check_mark: | The ID of the wallet the hold is associated with. | | \ No newline at end of file diff --git a/docs/models/shared/getbalanceresponse.md b/docs/models/shared/getbalanceresponse.md deleted file mode 100755 index 3c5184a..0000000 --- a/docs/models/shared/getbalanceresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetBalanceResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `Data` | [shared.BalanceWithAssets](../../models/shared/balancewithassets.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdresponse.md b/docs/models/shared/getholdresponse.md deleted file mode 100755 index adfac8c..0000000 --- a/docs/models/shared/getholdresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetHoldResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `Data` | [shared.ExpandedDebitHold](../../models/shared/expandeddebithold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getholdsresponsecursor.md b/docs/models/shared/getholdsresponsecursor.md deleted file mode 100755 index bc54666..0000000 --- a/docs/models/shared/getholdsresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetHoldsResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][shared.Hold](../../models/shared/hold.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/gettransactionsresponse.md b/docs/models/shared/gettransactionsresponse.md deleted file mode 100755 index 5e6de4d..0000000 --- a/docs/models/shared/gettransactionsresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetTransactionsResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `Cursor` | [shared.GetTransactionsResponseCursor](../../models/shared/gettransactionsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/gettransactionsresponsecursor.md b/docs/models/shared/gettransactionsresponsecursor.md deleted file mode 100755 index 57fbb6c..0000000 --- a/docs/models/shared/gettransactionsresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetTransactionsResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `Data` | [][shared.WalletsTransaction](../../models/shared/walletstransaction.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/getwalletresponse.md b/docs/models/shared/getwalletresponse.md deleted file mode 100755 index 37305d6..0000000 --- a/docs/models/shared/getwalletresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetWalletResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `Data` | [shared.WalletWithBalances](../../models/shared/walletwithbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getworkflowoccurrenceresponse.md b/docs/models/shared/getworkflowoccurrenceresponse.md deleted file mode 100755 index 691f3ea..0000000 --- a/docs/models/shared/getworkflowoccurrenceresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetWorkflowOccurrenceResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `Data` | [shared.WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/hold.md b/docs/models/shared/hold.md deleted file mode 100755 index 56b4f50..0000000 --- a/docs/models/shared/hold.md +++ /dev/null @@ -1,12 +0,0 @@ -# Hold - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Description` | *string* | :heavy_check_mark: | N/A | -| `Destination` | [*shared.Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | -| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | -| `WalletID` | *string* | :heavy_check_mark: | The ID of the wallet the hold is associated with. | \ No newline at end of file diff --git a/docs/models/shared/listbalancesresponse.md b/docs/models/shared/listbalancesresponse.md deleted file mode 100755 index 3710e46..0000000 --- a/docs/models/shared/listbalancesresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ListBalancesResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `Cursor` | [shared.ListBalancesResponseCursor](../../models/shared/listbalancesresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listbalancesresponsecursor.md b/docs/models/shared/listbalancesresponsecursor.md deleted file mode 100755 index 6bd4986..0000000 --- a/docs/models/shared/listbalancesresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListBalancesResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Data` | [][shared.Balance](../../models/shared/balance.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listclientsresponse.md b/docs/models/shared/listclientsresponse.md deleted file mode 100755 index cc5c46b..0000000 --- a/docs/models/shared/listclientsresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ListClientsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Data` | [][shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listrunsresponsecursor.md b/docs/models/shared/listrunsresponsecursor.md deleted file mode 100755 index 9dee1e9..0000000 --- a/docs/models/shared/listrunsresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListRunsResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `Data` | [][shared.WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/listscopesresponse.md b/docs/models/shared/listscopesresponse.md deleted file mode 100755 index 21d767c..0000000 --- a/docs/models/shared/listscopesresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ListScopesResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `Data` | [][shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listusersresponse.md b/docs/models/shared/listusersresponse.md deleted file mode 100755 index 7f4b2ac..0000000 --- a/docs/models/shared/listusersresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ListUsersResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][shared.User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listwalletsresponse.md b/docs/models/shared/listwalletsresponse.md deleted file mode 100755 index 6d562b5..0000000 --- a/docs/models/shared/listwalletsresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ListWalletsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `Cursor` | [shared.ListWalletsResponseCursor](../../models/shared/listwalletsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listwalletsresponsecursor.md b/docs/models/shared/listwalletsresponsecursor.md deleted file mode 100755 index 3baa1cb..0000000 --- a/docs/models/shared/listwalletsresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListWalletsResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Data` | [][shared.Wallet](../../models/shared/wallet.md) | :heavy_check_mark: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/logscursorresponsecursor.md b/docs/models/shared/logscursorresponsecursor.md deleted file mode 100755 index 75c947f..0000000 --- a/docs/models/shared/logscursorresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# LogsCursorResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [][shared.Log](../../models/shared/log.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/migrationinfo.md b/docs/models/shared/migrationinfo.md deleted file mode 100755 index e13f964..0000000 --- a/docs/models/shared/migrationinfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# MigrationInfo - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `Date` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | -| `Name` | **string* | :heavy_minus_sign: | N/A | migrations:001 | -| `State` | [*shared.State](../../models/shared/state.md) | :heavy_minus_sign: | N/A | | -| `Version` | **int64* | :heavy_minus_sign: | N/A | 11 | \ No newline at end of file diff --git a/docs/models/shared/payment.md b/docs/models/shared/payment.md deleted file mode 100755 index 3ab7094..0000000 --- a/docs/models/shared/payment.md +++ /dev/null @@ -1,20 +0,0 @@ -# Payment - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `AccountID` | *string* | :heavy_check_mark: | N/A | | -| `Adjustments` | [][shared.PaymentAdjustment](../../models/shared/paymentadjustment.md) | :heavy_check_mark: | N/A | | -| `Asset` | *string* | :heavy_check_mark: | N/A | USD | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `ID` | *string* | :heavy_check_mark: | N/A | XXX | -| `InitialAmount` | *int64* | :heavy_check_mark: | N/A | 100 | -| `Metadata` | [][shared.PaymentMetadata](../../models/shared/paymentmetadata.md) | :heavy_check_mark: | N/A | | -| `Provider` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | | -| `Raw` | [shared.Raw](../../models/shared/raw.md) | :heavy_check_mark: | N/A | | -| `Reference` | *string* | :heavy_check_mark: | N/A | | -| `Scheme` | [shared.Scheme](../../models/shared/scheme.md) | :heavy_check_mark: | N/A | | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | -| `Type` | [shared.PaymentType](../../models/shared/paymenttype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/paymentadjustment.md b/docs/models/shared/paymentadjustment.md deleted file mode 100755 index 828ffff..0000000 --- a/docs/models/shared/paymentadjustment.md +++ /dev/null @@ -1,12 +0,0 @@ -# PaymentAdjustment - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `Absolute` | *bool* | :heavy_check_mark: | N/A | | -| `Amount` | *int64* | :heavy_check_mark: | N/A | 100 | -| `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Raw` | [shared.PaymentAdjustmentRaw](../../models/shared/paymentadjustmentraw.md) | :heavy_check_mark: | N/A | | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/paymentmetadata.md b/docs/models/shared/paymentmetadata.md deleted file mode 100755 index 6a620be..0000000 --- a/docs/models/shared/paymentmetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# PaymentMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `Changelog` | [*shared.PaymentMetadataChangelog](../../models/shared/paymentmetadatachangelog.md) | :heavy_minus_sign: | N/A | -| `Key` | *string* | :heavy_check_mark: | N/A | -| `Value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentresponse.md b/docs/models/shared/paymentresponse.md deleted file mode 100755 index 478476a..0000000 --- a/docs/models/shared/paymentresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# PaymentResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `Data` | [shared.Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentsaccount.md b/docs/models/shared/paymentsaccount.md deleted file mode 100755 index 57af277..0000000 --- a/docs/models/shared/paymentsaccount.md +++ /dev/null @@ -1,12 +0,0 @@ -# PaymentsAccount - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `Provider` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | N/A | -| `Reference` | *string* | :heavy_check_mark: | N/A | -| `Type` | [shared.PaymentsAccountType](../../models/shared/paymentsaccounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentscursor.md b/docs/models/shared/paymentscursor.md deleted file mode 100755 index b414be6..0000000 --- a/docs/models/shared/paymentscursor.md +++ /dev/null @@ -1,8 +0,0 @@ -# PaymentsCursor - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `Cursor` | [shared.PaymentsCursorCursor](../../models/shared/paymentscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentscursorcursor.md b/docs/models/shared/paymentscursorcursor.md deleted file mode 100755 index 1457bbc..0000000 --- a/docs/models/shared/paymentscursorcursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# PaymentsCursorCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Data` | [][shared.Payment](../../models/shared/payment.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/posttransaction.md b/docs/models/shared/posttransaction.md deleted file mode 100755 index d5d6063..0000000 --- a/docs/models/shared/posttransaction.md +++ /dev/null @@ -1,12 +0,0 @@ -# PostTransaction - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | -| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_minus_sign: | N/A | | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Script` | [*shared.PostTransactionScript](../../models/shared/posttransactionscript.md) | :heavy_minus_sign: | N/A | | -| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/readclientresponse.md b/docs/models/shared/readclientresponse.md deleted file mode 100755 index 62959f6..0000000 --- a/docs/models/shared/readclientresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ReadClientResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `Data` | [*shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/readscoperesponse.md b/docs/models/shared/readscoperesponse.md deleted file mode 100755 index 06b5123..0000000 --- a/docs/models/shared/readscoperesponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ReadScopeResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `Data` | [*shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/readuserresponse.md b/docs/models/shared/readuserresponse.md deleted file mode 100755 index 2ece6e2..0000000 --- a/docs/models/shared/readuserresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ReadUserResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `Data` | [*shared.User](../../models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/responsecursor.md b/docs/models/shared/responsecursor.md deleted file mode 100755 index 6c34e6a..0000000 --- a/docs/models/shared/responsecursor.md +++ /dev/null @@ -1,13 +0,0 @@ -# ResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `Data` | [][shared.ResponseSchemasData](../../models/shared/responseschemasdata.md) | :heavy_minus_sign: | N/A | | -| `HasMore` | **bool* | :heavy_minus_sign: | N/A | | -| `Next` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | -| `PageSize` | **int64* | :heavy_minus_sign: | N/A | | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | -| `Total` | [*shared.Total](../../models/shared/total.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/statsresponse.md b/docs/models/shared/statsresponse.md deleted file mode 100755 index c414d3e..0000000 --- a/docs/models/shared/statsresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# StatsResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `Data` | [shared.Stats](../../models/shared/stats.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskbankingcircle.md b/docs/models/shared/taskbankingcircle.md deleted file mode 100755 index 145f35d..0000000 --- a/docs/models/shared/taskbankingcircle.md +++ /dev/null @@ -1,15 +0,0 @@ -# TaskBankingCircle - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [shared.Descriptor](../../models/shared/descriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [shared.TaskBankingCircleState](../../models/shared/taskbankingcirclestate.md) | :heavy_check_mark: | N/A | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskcurrencycloud.md b/docs/models/shared/taskcurrencycloud.md deleted file mode 100755 index 0d3a091..0000000 --- a/docs/models/shared/taskcurrencycloud.md +++ /dev/null @@ -1,15 +0,0 @@ -# TaskCurrencyCloud - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [shared.TaskCurrencyCloudDescriptor](../../models/shared/taskcurrencyclouddescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [shared.TaskCurrencyCloudState](../../models/shared/taskcurrencycloudstate.md) | :heavy_check_mark: | N/A | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskdummypay.md b/docs/models/shared/taskdummypay.md deleted file mode 100755 index a9479db..0000000 --- a/docs/models/shared/taskdummypay.md +++ /dev/null @@ -1,15 +0,0 @@ -# TaskDummyPay - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [shared.TaskDummyPayDescriptor](../../models/shared/taskdummypaydescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [shared.TaskDummyPayState](../../models/shared/taskdummypaystate.md) | :heavy_check_mark: | N/A | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskmodulr.md b/docs/models/shared/taskmodulr.md deleted file mode 100755 index 9496008..0000000 --- a/docs/models/shared/taskmodulr.md +++ /dev/null @@ -1,15 +0,0 @@ -# TaskModulr - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [shared.TaskModulrDescriptor](../../models/shared/taskmodulrdescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [shared.TaskModulrState](../../models/shared/taskmodulrstate.md) | :heavy_check_mark: | N/A | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskresponse.md b/docs/models/shared/taskresponse.md deleted file mode 100755 index 7920b92..0000000 --- a/docs/models/shared/taskresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# TaskResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `Data` | [shared.TaskResponseData](../../models/shared/taskresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskscursor.md b/docs/models/shared/taskscursor.md deleted file mode 100755 index 407415d..0000000 --- a/docs/models/shared/taskscursor.md +++ /dev/null @@ -1,8 +0,0 @@ -# TasksCursor - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `Cursor` | [shared.TasksCursorCursor](../../models/shared/taskscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskscursorcursor.md b/docs/models/shared/taskscursorcursor.md deleted file mode 100755 index cf89c4b..0000000 --- a/docs/models/shared/taskscursorcursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# TasksCursorCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `Data` | [][shared.TasksCursorData](../../models/shared/taskscursordata.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/taskstripe.md b/docs/models/shared/taskstripe.md deleted file mode 100755 index e49de59..0000000 --- a/docs/models/shared/taskstripe.md +++ /dev/null @@ -1,15 +0,0 @@ -# TaskStripe - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [shared.TaskStripeDescriptor](../../models/shared/taskstripedescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [shared.TaskStripeState](../../models/shared/taskstripestate.md) | :heavy_check_mark: | N/A | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskwise.md b/docs/models/shared/taskwise.md deleted file mode 100755 index 54ffe1e..0000000 --- a/docs/models/shared/taskwise.md +++ /dev/null @@ -1,15 +0,0 @@ -# TaskWise - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `ConnectorID` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `Descriptor` | [shared.TaskWiseDescriptor](../../models/shared/taskwisedescriptor.md) | :heavy_check_mark: | N/A | -| `Error` | **string* | :heavy_minus_sign: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `State` | [shared.TaskWiseState](../../models/shared/taskwisestate.md) | :heavy_check_mark: | N/A | -| `Status` | [shared.PaymentStatus](../../models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transaction.md b/docs/models/shared/transaction.md deleted file mode 100755 index e838272..0000000 --- a/docs/models/shared/transaction.md +++ /dev/null @@ -1,14 +0,0 @@ -# Transaction - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | -| `PostCommitVolumes` | map[string]map[string][shared.Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | -| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `PreCommitVolumes` | map[string]map[string][shared.Volume](../../models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/transactiondata.md b/docs/models/shared/transactiondata.md deleted file mode 100755 index 47e37fd..0000000 --- a/docs/models/shared/transactiondata.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionData - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | -| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/transactionresponse.md b/docs/models/shared/transactionresponse.md deleted file mode 100755 index 5bb316c..0000000 --- a/docs/models/shared/transactionresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# TransactionResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `Data` | [shared.Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactions.md b/docs/models/shared/transactions.md deleted file mode 100755 index fde15d7..0000000 --- a/docs/models/shared/transactions.md +++ /dev/null @@ -1,8 +0,0 @@ -# Transactions - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `Transactions` | [][shared.TransactionData](../../models/shared/transactiondata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactionscursorresponse.md b/docs/models/shared/transactionscursorresponse.md deleted file mode 100755 index 6091f66..0000000 --- a/docs/models/shared/transactionscursorresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# TransactionsCursorResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `Cursor` | [shared.TransactionsCursorResponseCursor](../../models/shared/transactionscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/transactionscursorresponsecursor.md b/docs/models/shared/transactionscursorresponsecursor.md deleted file mode 100755 index 3e91b91..0000000 --- a/docs/models/shared/transactionscursorresponsecursor.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransactionsCursorResponseCursor - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `Data` | [][shared.Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | | -| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | -| `Next` | **string* | :heavy_minus_sign: | N/A | | -| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | -| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/transactionsresponse.md b/docs/models/shared/transactionsresponse.md deleted file mode 100755 index 5184138..0000000 --- a/docs/models/shared/transactionsresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# TransactionsResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `Data` | [][shared.Transaction](../../models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updateclientresponse.md b/docs/models/shared/updateclientresponse.md deleted file mode 100755 index 1c11a10..0000000 --- a/docs/models/shared/updateclientresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# UpdateClientResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `Data` | [*shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updatescoperesponse.md b/docs/models/shared/updatescoperesponse.md deleted file mode 100755 index 74f1ed2..0000000 --- a/docs/models/shared/updatescoperesponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# UpdateScopeResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `Data` | [*shared.Scope](../../models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletserrorresponse.md b/docs/models/shared/walletserrorresponse.md deleted file mode 100755 index e3fb663..0000000 --- a/docs/models/shared/walletserrorresponse.md +++ /dev/null @@ -1,9 +0,0 @@ -# WalletsErrorResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `ErrorCode` | [shared.WalletsErrorResponseErrorCode](../../models/shared/walletserrorresponseerrorcode.md) | :heavy_check_mark: | N/A | -| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletstransaction.md b/docs/models/shared/walletstransaction.md deleted file mode 100755 index 9c4adb3..0000000 --- a/docs/models/shared/walletstransaction.md +++ /dev/null @@ -1,14 +0,0 @@ -# WalletsTransaction - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | | -| `PostCommitVolumes` | map[string]map[string][shared.WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | -| `Postings` | [][shared.Posting](../../models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `PreCommitVolumes` | map[string]map[string][shared.WalletsVolume](../../models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/walletwithbalances.md b/docs/models/shared/walletwithbalances.md deleted file mode 100755 index aa163be..0000000 --- a/docs/models/shared/walletwithbalances.md +++ /dev/null @@ -1,13 +0,0 @@ -# WalletWithBalances - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Balances` | [shared.Balances](../../models/shared/balances.md) | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | The unique ID of the wallet. | -| `Ledger` | *string* | :heavy_check_mark: | N/A | -| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the wallet. | -| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workflow.md b/docs/models/shared/workflow.md deleted file mode 100755 index 25ecf54..0000000 --- a/docs/models/shared/workflow.md +++ /dev/null @@ -1,11 +0,0 @@ -# Workflow - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `Config` | [shared.WorkflowConfig](../../models/shared/workflowconfig.md) | :heavy_check_mark: | N/A | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workflowoccurrence.md b/docs/models/shared/workflowoccurrence.md deleted file mode 100755 index 32707d2..0000000 --- a/docs/models/shared/workflowoccurrence.md +++ /dev/null @@ -1,12 +0,0 @@ -# WorkflowOccurrence - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `Statuses` | [][shared.StageStatus](../../models/shared/stagestatus.md) | :heavy_check_mark: | N/A | -| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | -| `WorkflowID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/activateconfigrequest.md b/docs/pkg/models/operations/activateconfigrequest.md similarity index 100% rename from docs/models/operations/activateconfigrequest.md rename to docs/pkg/models/operations/activateconfigrequest.md diff --git a/docs/pkg/models/operations/activateconfigresponse.md b/docs/pkg/models/operations/activateconfigresponse.md new file mode 100755 index 0000000..d888bbf --- /dev/null +++ b/docs/pkg/models/operations/activateconfigresponse.md @@ -0,0 +1,11 @@ +# ActivateConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully activated. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addmetadataontransactionrequest.md b/docs/pkg/models/operations/addmetadataontransactionrequest.md similarity index 100% rename from docs/models/operations/addmetadataontransactionrequest.md rename to docs/pkg/models/operations/addmetadataontransactionrequest.md diff --git a/docs/pkg/models/operations/addmetadataontransactionresponse.md b/docs/pkg/models/operations/addmetadataontransactionresponse.md new file mode 100755 index 0000000..2041b32 --- /dev/null +++ b/docs/pkg/models/operations/addmetadataontransactionresponse.md @@ -0,0 +1,11 @@ +# AddMetadataOnTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addmetadatatoaccountrequest.md b/docs/pkg/models/operations/addmetadatatoaccountrequest.md similarity index 100% rename from docs/models/operations/addmetadatatoaccountrequest.md rename to docs/pkg/models/operations/addmetadatatoaccountrequest.md diff --git a/docs/pkg/models/operations/addmetadatatoaccountresponse.md b/docs/pkg/models/operations/addmetadatatoaccountresponse.md new file mode 100755 index 0000000..33aa8ca --- /dev/null +++ b/docs/pkg/models/operations/addmetadatatoaccountresponse.md @@ -0,0 +1,11 @@ +# AddMetadataToAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/addscopetoclientrequest.md b/docs/pkg/models/operations/addscopetoclientrequest.md similarity index 100% rename from docs/models/operations/addscopetoclientrequest.md rename to docs/pkg/models/operations/addscopetoclientrequest.md diff --git a/docs/models/operations/addscopetoclientresponse.md b/docs/pkg/models/operations/addscopetoclientresponse.md similarity index 100% rename from docs/models/operations/addscopetoclientresponse.md rename to docs/pkg/models/operations/addscopetoclientresponse.md diff --git a/docs/models/operations/addtransientscoperequest.md b/docs/pkg/models/operations/addtransientscoperequest.md similarity index 100% rename from docs/models/operations/addtransientscoperequest.md rename to docs/pkg/models/operations/addtransientscoperequest.md diff --git a/docs/models/operations/addtransientscoperesponse.md b/docs/pkg/models/operations/addtransientscoperesponse.md similarity index 100% rename from docs/models/operations/addtransientscoperesponse.md rename to docs/pkg/models/operations/addtransientscoperesponse.md diff --git a/docs/models/operations/balanceoperator.md b/docs/pkg/models/operations/balanceoperator.md similarity index 100% rename from docs/models/operations/balanceoperator.md rename to docs/pkg/models/operations/balanceoperator.md diff --git a/docs/pkg/models/operations/changeconfigsecretrequest.md b/docs/pkg/models/operations/changeconfigsecretrequest.md new file mode 100755 index 0000000..932b760 --- /dev/null +++ b/docs/pkg/models/operations/changeconfigsecretrequest.md @@ -0,0 +1,9 @@ +# ChangeConfigSecretRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | +| `ConfigChangeSecret` | [*shared.ConfigChangeSecret](../../../pkg/models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/operations/changeconfigsecretresponse.md b/docs/pkg/models/operations/changeconfigsecretresponse.md new file mode 100755 index 0000000..e3010dc --- /dev/null +++ b/docs/pkg/models/operations/changeconfigsecretresponse.md @@ -0,0 +1,11 @@ +# ChangeConfigSecretResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Secret successfully changed. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/getholdsresponse.md b/docs/pkg/models/operations/confirmholdrequest.md similarity index 59% rename from docs/models/shared/getholdsresponse.md rename to docs/pkg/models/operations/confirmholdrequest.md index e640434..e917ddb 100755 --- a/docs/models/shared/getholdsresponse.md +++ b/docs/pkg/models/operations/confirmholdrequest.md @@ -1,8 +1,9 @@ -# GetHoldsResponse +# ConfirmHoldRequest ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `Cursor` | [shared.GetHoldsResponseCursor](../../models/shared/getholdsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `HoldID` | *string* | :heavy_check_mark: | N/A | +| `ConfirmHoldRequest` | [*shared.ConfirmHoldRequest](../../../pkg/models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/operations/confirmholdresponse.md b/docs/pkg/models/operations/confirmholdresponse.md new file mode 100755 index 0000000..ef00f8d --- /dev/null +++ b/docs/pkg/models/operations/confirmholdresponse.md @@ -0,0 +1,11 @@ +# ConfirmHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/connectorsstripetransferresponse.md b/docs/pkg/models/operations/connectorsstripetransferresponse.md new file mode 100755 index 0000000..e1ee40e --- /dev/null +++ b/docs/pkg/models/operations/connectorsstripetransferresponse.md @@ -0,0 +1,11 @@ +# ConnectorsStripeTransferResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `StripeTransferResponse` | [*shared.StripeTransferResponse](../../../pkg/models/shared/stripetransferresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/countaccountsrequest.md b/docs/pkg/models/operations/countaccountsrequest.md similarity index 97% rename from docs/models/operations/countaccountsrequest.md rename to docs/pkg/models/operations/countaccountsrequest.md index f91ce63..658fdb8 100755 --- a/docs/models/operations/countaccountsrequest.md +++ b/docs/pkg/models/operations/countaccountsrequest.md @@ -7,4 +7,4 @@ | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `Address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | -| `Metadata` | [*operations.Metadata](../../models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | \ No newline at end of file +| `Metadata` | [*operations.Metadata](../../../pkg/models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | \ No newline at end of file diff --git a/docs/pkg/models/operations/countaccountsresponse.md b/docs/pkg/models/operations/countaccountsresponse.md new file mode 100755 index 0000000..f1cf55a --- /dev/null +++ b/docs/pkg/models/operations/countaccountsresponse.md @@ -0,0 +1,12 @@ +# CountAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/counttransactionsqueryparammetadata.md b/docs/pkg/models/operations/counttransactionsqueryparammetadata.md similarity index 100% rename from docs/models/operations/counttransactionsqueryparammetadata.md rename to docs/pkg/models/operations/counttransactionsqueryparammetadata.md diff --git a/docs/models/operations/counttransactionsrequest.md b/docs/pkg/models/operations/counttransactionsrequest.md similarity index 99% rename from docs/models/operations/counttransactionsrequest.md rename to docs/pkg/models/operations/counttransactionsrequest.md index 72f8055..0269383 100755 --- a/docs/models/operations/counttransactionsrequest.md +++ b/docs/pkg/models/operations/counttransactionsrequest.md @@ -10,7 +10,7 @@ | `EndTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
| | | ~~`EndTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use `endTime` instead.
| | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Metadata` | [*operations.CountTransactionsQueryParamMetadata](../../models/operations/counttransactionsqueryparammetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.CountTransactionsQueryParamMetadata](../../../pkg/models/operations/counttransactionsqueryparammetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `Reference` | **string* | :heavy_minus_sign: | Filter transactions by reference field. | ref:001 | | `Source` | **string* | :heavy_minus_sign: | Filter transactions with postings involving given account at source (regular expression placed between ^ and $). | users:001 | | `StartTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
| | diff --git a/docs/pkg/models/operations/counttransactionsresponse.md b/docs/pkg/models/operations/counttransactionsresponse.md new file mode 100755 index 0000000..1c7a1a2 --- /dev/null +++ b/docs/pkg/models/operations/counttransactionsresponse.md @@ -0,0 +1,12 @@ +# CountTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/logscursorresponse.md b/docs/pkg/models/operations/createbalancerequest.md similarity index 60% rename from docs/models/shared/logscursorresponse.md rename to docs/pkg/models/operations/createbalancerequest.md index 5010936..d9c2734 100755 --- a/docs/models/shared/logscursorresponse.md +++ b/docs/pkg/models/operations/createbalancerequest.md @@ -1,8 +1,9 @@ -# LogsCursorResponse +# CreateBalanceRequest ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `Cursor` | [shared.LogsCursorResponseCursor](../../models/shared/logscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `ID` | *string* | :heavy_check_mark: | N/A | +| `CreateBalanceRequest` | [*shared.CreateBalanceRequest](../../../pkg/models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/operations/createbalanceresponse.md b/docs/pkg/models/operations/createbalanceresponse.md new file mode 100755 index 0000000..37cead5 --- /dev/null +++ b/docs/pkg/models/operations/createbalanceresponse.md @@ -0,0 +1,12 @@ +# CreateBalanceResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateBalanceResponse` | [*shared.CreateBalanceResponse](../../../pkg/models/shared/createbalanceresponse.md) | :heavy_minus_sign: | Created balance | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/createclientresponse.md b/docs/pkg/models/operations/createclientresponse.md new file mode 100755 index 0000000..17796d0 --- /dev/null +++ b/docs/pkg/models/operations/createclientresponse.md @@ -0,0 +1,11 @@ +# CreateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateClientResponse` | [*shared.CreateClientResponse](../../../pkg/models/shared/createclientresponse.md) | :heavy_minus_sign: | Client created | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/createscoperesponse.md b/docs/pkg/models/operations/createscoperesponse.md new file mode 100755 index 0000000..49a556b --- /dev/null +++ b/docs/pkg/models/operations/createscoperesponse.md @@ -0,0 +1,11 @@ +# CreateScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateScopeResponse` | [*shared.CreateScopeResponse](../../../pkg/models/shared/createscoperesponse.md) | :heavy_minus_sign: | Created scope | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/connectorsresponse.md b/docs/pkg/models/operations/createsecretrequest.md similarity index 60% rename from docs/models/shared/connectorsresponse.md rename to docs/pkg/models/operations/createsecretrequest.md index 04d8b8d..70921ba 100755 --- a/docs/models/shared/connectorsresponse.md +++ b/docs/pkg/models/operations/createsecretrequest.md @@ -1,8 +1,9 @@ -# ConnectorsResponse +# CreateSecretRequest ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `Data` | [][shared.ConnectorsResponseData](../../models/shared/connectorsresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `ClientID` | *string* | :heavy_check_mark: | Client ID | +| `CreateSecretRequest` | [*shared.CreateSecretRequest](../../../pkg/models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/operations/createsecretresponse.md b/docs/pkg/models/operations/createsecretresponse.md new file mode 100755 index 0000000..6c99f98 --- /dev/null +++ b/docs/pkg/models/operations/createsecretresponse.md @@ -0,0 +1,11 @@ +# CreateSecretResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateSecretResponse` | [*shared.CreateSecretResponse](../../../pkg/models/shared/createsecretresponse.md) | :heavy_minus_sign: | Created secret | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/createtransactionrequest.md b/docs/pkg/models/operations/createtransactionrequest.md similarity index 97% rename from docs/models/operations/createtransactionrequest.md rename to docs/pkg/models/operations/createtransactionrequest.md index 2603d41..be69ff5 100755 --- a/docs/models/operations/createtransactionrequest.md +++ b/docs/pkg/models/operations/createtransactionrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PostTransaction` | [shared.PostTransaction](../../models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | +| `PostTransaction` | [shared.PostTransaction](../../../pkg/models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `Preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | \ No newline at end of file diff --git a/docs/pkg/models/operations/createtransactionresponse.md b/docs/pkg/models/operations/createtransactionresponse.md new file mode 100755 index 0000000..e541b74 --- /dev/null +++ b/docs/pkg/models/operations/createtransactionresponse.md @@ -0,0 +1,12 @@ +# CreateTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionsResponse` | [*shared.TransactionsResponse](../../../pkg/models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/createtransactionsrequest.md b/docs/pkg/models/operations/createtransactionsrequest.md new file mode 100755 index 0000000..43da835 --- /dev/null +++ b/docs/pkg/models/operations/createtransactionsrequest.md @@ -0,0 +1,9 @@ +# CreateTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `Transactions` | [shared.Transactions](../../../pkg/models/shared/transactions.md) | :heavy_check_mark: | N/A | | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/pkg/models/operations/createtransactionsresponse.md b/docs/pkg/models/operations/createtransactionsresponse.md new file mode 100755 index 0000000..6a8e738 --- /dev/null +++ b/docs/pkg/models/operations/createtransactionsresponse.md @@ -0,0 +1,12 @@ +# CreateTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionsResponse` | [*shared.TransactionsResponse](../../../pkg/models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/createwalletresponse.md b/docs/pkg/models/operations/createwalletresponse.md new file mode 100755 index 0000000..562414c --- /dev/null +++ b/docs/pkg/models/operations/createwalletresponse.md @@ -0,0 +1,12 @@ +# CreateWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateWalletResponse` | [*shared.CreateWalletResponse](../../../pkg/models/shared/createwalletresponse.md) | :heavy_minus_sign: | Wallet created | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/createworkflowresponse.md b/docs/pkg/models/operations/createworkflowresponse.md new file mode 100755 index 0000000..82ff556 --- /dev/null +++ b/docs/pkg/models/operations/createworkflowresponse.md @@ -0,0 +1,12 @@ +# CreateWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `CreateWorkflowResponse` | [*shared.CreateWorkflowResponse](../../../pkg/models/shared/createworkflowresponse.md) | :heavy_minus_sign: | Created workflow | +| `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/creditwalletrequest.md b/docs/pkg/models/operations/creditwalletrequest.md new file mode 100755 index 0000000..9c87b0f --- /dev/null +++ b/docs/pkg/models/operations/creditwalletrequest.md @@ -0,0 +1,9 @@ +# CreditWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `CreditWalletRequest` | [*shared.CreditWalletRequest](../../../pkg/models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/operations/creditwalletresponse.md b/docs/pkg/models/operations/creditwalletresponse.md new file mode 100755 index 0000000..728daa2 --- /dev/null +++ b/docs/pkg/models/operations/creditwalletresponse.md @@ -0,0 +1,11 @@ +# CreditWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deactivateconfigrequest.md b/docs/pkg/models/operations/deactivateconfigrequest.md similarity index 100% rename from docs/models/operations/deactivateconfigrequest.md rename to docs/pkg/models/operations/deactivateconfigrequest.md diff --git a/docs/pkg/models/operations/deactivateconfigresponse.md b/docs/pkg/models/operations/deactivateconfigresponse.md new file mode 100755 index 0000000..402d71c --- /dev/null +++ b/docs/pkg/models/operations/deactivateconfigresponse.md @@ -0,0 +1,11 @@ +# DeactivateConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully deactivated. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/listrunsresponse.md b/docs/pkg/models/operations/debitwalletrequest.md similarity index 59% rename from docs/models/shared/listrunsresponse.md rename to docs/pkg/models/operations/debitwalletrequest.md index 2c7df0b..8602afd 100755 --- a/docs/models/shared/listrunsresponse.md +++ b/docs/pkg/models/operations/debitwalletrequest.md @@ -1,8 +1,9 @@ -# ListRunsResponse +# DebitWalletRequest ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `Cursor` | [shared.ListRunsResponseCursor](../../models/shared/listrunsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `ID` | *string* | :heavy_check_mark: | N/A | +| `DebitWalletRequest` | [*shared.DebitWalletRequest](../../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/operations/debitwalletresponse.md b/docs/pkg/models/operations/debitwalletresponse.md new file mode 100755 index 0000000..da933d5 --- /dev/null +++ b/docs/pkg/models/operations/debitwalletresponse.md @@ -0,0 +1,12 @@ +# DebitWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `DebitWalletResponse` | [*shared.DebitWalletResponse](../../../pkg/models/shared/debitwalletresponse.md) | :heavy_minus_sign: | Wallet successfully debited as a pending hold | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deleteclientrequest.md b/docs/pkg/models/operations/deleteclientrequest.md similarity index 100% rename from docs/models/operations/deleteclientrequest.md rename to docs/pkg/models/operations/deleteclientrequest.md diff --git a/docs/models/operations/deleteclientresponse.md b/docs/pkg/models/operations/deleteclientresponse.md similarity index 100% rename from docs/models/operations/deleteclientresponse.md rename to docs/pkg/models/operations/deleteclientresponse.md diff --git a/docs/models/operations/deleteconfigrequest.md b/docs/pkg/models/operations/deleteconfigrequest.md similarity index 100% rename from docs/models/operations/deleteconfigrequest.md rename to docs/pkg/models/operations/deleteconfigrequest.md diff --git a/docs/models/operations/deleteconfigresponse.md b/docs/pkg/models/operations/deleteconfigresponse.md similarity index 100% rename from docs/models/operations/deleteconfigresponse.md rename to docs/pkg/models/operations/deleteconfigresponse.md diff --git a/docs/models/operations/deletescopefromclientrequest.md b/docs/pkg/models/operations/deletescopefromclientrequest.md similarity index 100% rename from docs/models/operations/deletescopefromclientrequest.md rename to docs/pkg/models/operations/deletescopefromclientrequest.md diff --git a/docs/models/operations/deletescopefromclientresponse.md b/docs/pkg/models/operations/deletescopefromclientresponse.md similarity index 100% rename from docs/models/operations/deletescopefromclientresponse.md rename to docs/pkg/models/operations/deletescopefromclientresponse.md diff --git a/docs/models/operations/deletescoperequest.md b/docs/pkg/models/operations/deletescoperequest.md similarity index 100% rename from docs/models/operations/deletescoperequest.md rename to docs/pkg/models/operations/deletescoperequest.md diff --git a/docs/models/operations/deletescoperesponse.md b/docs/pkg/models/operations/deletescoperesponse.md similarity index 100% rename from docs/models/operations/deletescoperesponse.md rename to docs/pkg/models/operations/deletescoperesponse.md diff --git a/docs/models/operations/deletesecretrequest.md b/docs/pkg/models/operations/deletesecretrequest.md similarity index 100% rename from docs/models/operations/deletesecretrequest.md rename to docs/pkg/models/operations/deletesecretrequest.md diff --git a/docs/models/operations/deletesecretresponse.md b/docs/pkg/models/operations/deletesecretresponse.md similarity index 100% rename from docs/models/operations/deletesecretresponse.md rename to docs/pkg/models/operations/deletesecretresponse.md diff --git a/docs/models/operations/deletetransientscoperequest.md b/docs/pkg/models/operations/deletetransientscoperequest.md similarity index 100% rename from docs/models/operations/deletetransientscoperequest.md rename to docs/pkg/models/operations/deletetransientscoperequest.md diff --git a/docs/models/operations/deletetransientscoperesponse.md b/docs/pkg/models/operations/deletetransientscoperesponse.md similarity index 100% rename from docs/models/operations/deletetransientscoperesponse.md rename to docs/pkg/models/operations/deletetransientscoperesponse.md diff --git a/docs/models/operations/getaccountrequest.md b/docs/pkg/models/operations/getaccountrequest.md similarity index 100% rename from docs/models/operations/getaccountrequest.md rename to docs/pkg/models/operations/getaccountrequest.md diff --git a/docs/pkg/models/operations/getaccountresponse.md b/docs/pkg/models/operations/getaccountresponse.md new file mode 100755 index 0000000..46acc47 --- /dev/null +++ b/docs/pkg/models/operations/getaccountresponse.md @@ -0,0 +1,12 @@ +# GetAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `AccountResponse` | [*shared.AccountResponse](../../../pkg/models/shared/accountresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getbalancerequest.md b/docs/pkg/models/operations/getbalancerequest.md similarity index 100% rename from docs/models/operations/getbalancerequest.md rename to docs/pkg/models/operations/getbalancerequest.md diff --git a/docs/pkg/models/operations/getbalanceresponse.md b/docs/pkg/models/operations/getbalanceresponse.md new file mode 100755 index 0000000..78f7315 --- /dev/null +++ b/docs/pkg/models/operations/getbalanceresponse.md @@ -0,0 +1,12 @@ +# GetBalanceResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetBalanceResponse` | [*shared.GetBalanceResponse](../../../pkg/models/shared/getbalanceresponse.md) | :heavy_minus_sign: | Balance summary | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getbalancesaggregatedrequest.md b/docs/pkg/models/operations/getbalancesaggregatedrequest.md similarity index 100% rename from docs/models/operations/getbalancesaggregatedrequest.md rename to docs/pkg/models/operations/getbalancesaggregatedrequest.md diff --git a/docs/pkg/models/operations/getbalancesaggregatedresponse.md b/docs/pkg/models/operations/getbalancesaggregatedresponse.md new file mode 100755 index 0000000..048f5e4 --- /dev/null +++ b/docs/pkg/models/operations/getbalancesaggregatedresponse.md @@ -0,0 +1,12 @@ +# GetBalancesAggregatedResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `AggregateBalancesResponse` | [*shared.AggregateBalancesResponse](../../../pkg/models/shared/aggregatebalancesresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getbalancesrequest.md b/docs/pkg/models/operations/getbalancesrequest.md similarity index 100% rename from docs/models/operations/getbalancesrequest.md rename to docs/pkg/models/operations/getbalancesrequest.md diff --git a/docs/pkg/models/operations/getbalancesresponse.md b/docs/pkg/models/operations/getbalancesresponse.md new file mode 100755 index 0000000..c30be7e --- /dev/null +++ b/docs/pkg/models/operations/getbalancesresponse.md @@ -0,0 +1,12 @@ +# GetBalancesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `BalancesCursorResponse` | [*shared.BalancesCursorResponse](../../../pkg/models/shared/balancescursorresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getconnectortaskrequest.md b/docs/pkg/models/operations/getconnectortaskrequest.md new file mode 100755 index 0000000..ae4d777 --- /dev/null +++ b/docs/pkg/models/operations/getconnectortaskrequest.md @@ -0,0 +1,9 @@ +# GetConnectorTaskRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| `TaskID` | *string* | :heavy_check_mark: | The task ID. | \ No newline at end of file diff --git a/docs/pkg/models/operations/getconnectortaskresponse.md b/docs/pkg/models/operations/getconnectortaskresponse.md new file mode 100755 index 0000000..5f259b6 --- /dev/null +++ b/docs/pkg/models/operations/getconnectortaskresponse.md @@ -0,0 +1,11 @@ +# GetConnectorTaskResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TaskResponse` | [*shared.TaskResponse](../../../pkg/models/shared/taskresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/getflowrequest.md b/docs/pkg/models/operations/getflowrequest.md similarity index 100% rename from docs/models/operations/getflowrequest.md rename to docs/pkg/models/operations/getflowrequest.md diff --git a/docs/pkg/models/operations/getflowresponse.md b/docs/pkg/models/operations/getflowresponse.md new file mode 100755 index 0000000..4b94f89 --- /dev/null +++ b/docs/pkg/models/operations/getflowresponse.md @@ -0,0 +1,12 @@ +# GetFlowResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | +| `GetWorkflowResponse` | [*shared.GetWorkflowResponse](../../../pkg/models/shared/getworkflowresponse.md) | :heavy_minus_sign: | The workflow | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getholdrequest.md b/docs/pkg/models/operations/getholdrequest.md similarity index 100% rename from docs/models/operations/getholdrequest.md rename to docs/pkg/models/operations/getholdrequest.md diff --git a/docs/pkg/models/operations/getholdresponse.md b/docs/pkg/models/operations/getholdresponse.md new file mode 100755 index 0000000..d5e6f5f --- /dev/null +++ b/docs/pkg/models/operations/getholdresponse.md @@ -0,0 +1,12 @@ +# GetHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetHoldResponse` | [*shared.GetHoldResponse](../../../pkg/models/shared/getholdresponse.md) | :heavy_minus_sign: | Holds | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getholdsqueryparammetadata.md b/docs/pkg/models/operations/getholdsqueryparammetadata.md similarity index 100% rename from docs/models/operations/getholdsqueryparammetadata.md rename to docs/pkg/models/operations/getholdsqueryparammetadata.md diff --git a/docs/models/operations/getholdsrequest.md b/docs/pkg/models/operations/getholdsrequest.md similarity index 98% rename from docs/models/operations/getholdsrequest.md rename to docs/pkg/models/operations/getholdsrequest.md index 68dee67..6eb985a 100755 --- a/docs/models/operations/getholdsrequest.md +++ b/docs/pkg/models/operations/getholdsrequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `Metadata` | [*operations.GetHoldsQueryParamMetadata](../../models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.GetHoldsQueryParamMetadata](../../../pkg/models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | | `WalletID` | **string* | :heavy_minus_sign: | The wallet to filter on | | \ No newline at end of file diff --git a/docs/pkg/models/operations/getholdsresponse.md b/docs/pkg/models/operations/getholdsresponse.md new file mode 100755 index 0000000..7fa6b08 --- /dev/null +++ b/docs/pkg/models/operations/getholdsresponse.md @@ -0,0 +1,12 @@ +# GetHoldsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetHoldsResponse` | [*shared.GetHoldsResponse](../../../pkg/models/shared/getholdsresponse.md) | :heavy_minus_sign: | Holds | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/getinforesponse.md b/docs/pkg/models/operations/getinforesponse.md new file mode 100755 index 0000000..e51dd62 --- /dev/null +++ b/docs/pkg/models/operations/getinforesponse.md @@ -0,0 +1,12 @@ +# GetInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ConfigInfoResponse` | [*shared.ConfigInfoResponse](../../../pkg/models/shared/configinforesponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getledgerinforequest.md b/docs/pkg/models/operations/getledgerinforequest.md similarity index 100% rename from docs/models/operations/getledgerinforequest.md rename to docs/pkg/models/operations/getledgerinforequest.md diff --git a/docs/pkg/models/operations/getledgerinforesponse.md b/docs/pkg/models/operations/getledgerinforesponse.md new file mode 100755 index 0000000..9ecf9d8 --- /dev/null +++ b/docs/pkg/models/operations/getledgerinforesponse.md @@ -0,0 +1,12 @@ +# GetLedgerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `LedgerInfoResponse` | [*shared.LedgerInfoResponse](../../../pkg/models/shared/ledgerinforesponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmanyconfigsrequest.md b/docs/pkg/models/operations/getmanyconfigsrequest.md similarity index 100% rename from docs/models/operations/getmanyconfigsrequest.md rename to docs/pkg/models/operations/getmanyconfigsrequest.md diff --git a/docs/pkg/models/operations/getmanyconfigsresponse.md b/docs/pkg/models/operations/getmanyconfigsresponse.md new file mode 100755 index 0000000..6902a3b --- /dev/null +++ b/docs/pkg/models/operations/getmanyconfigsresponse.md @@ -0,0 +1,11 @@ +# GetManyConfigsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ConfigsResponse` | [*shared.ConfigsResponse](../../../pkg/models/shared/configsresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getmappingrequest.md b/docs/pkg/models/operations/getmappingrequest.md similarity index 100% rename from docs/models/operations/getmappingrequest.md rename to docs/pkg/models/operations/getmappingrequest.md diff --git a/docs/pkg/models/operations/getmappingresponse.md b/docs/pkg/models/operations/getmappingresponse.md new file mode 100755 index 0000000..8ed69ac --- /dev/null +++ b/docs/pkg/models/operations/getmappingresponse.md @@ -0,0 +1,12 @@ +# GetMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `MappingResponse` | [*shared.MappingResponse](../../../pkg/models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/getpaymentrequest.md b/docs/pkg/models/operations/getpaymentrequest.md similarity index 100% rename from docs/models/operations/getpaymentrequest.md rename to docs/pkg/models/operations/getpaymentrequest.md diff --git a/docs/pkg/models/operations/getpaymentresponse.md b/docs/pkg/models/operations/getpaymentresponse.md new file mode 100755 index 0000000..ea77588 --- /dev/null +++ b/docs/pkg/models/operations/getpaymentresponse.md @@ -0,0 +1,11 @@ +# GetPaymentResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `PaymentResponse` | [*shared.PaymentResponse](../../../pkg/models/shared/paymentresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getserverinforesponse.md b/docs/pkg/models/operations/getserverinforesponse.md new file mode 100755 index 0000000..26d8f36 --- /dev/null +++ b/docs/pkg/models/operations/getserverinforesponse.md @@ -0,0 +1,11 @@ +# GetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/gettransactionrequest.md b/docs/pkg/models/operations/gettransactionrequest.md similarity index 100% rename from docs/models/operations/gettransactionrequest.md rename to docs/pkg/models/operations/gettransactionrequest.md diff --git a/docs/pkg/models/operations/gettransactionresponse.md b/docs/pkg/models/operations/gettransactionresponse.md new file mode 100755 index 0000000..07dabf0 --- /dev/null +++ b/docs/pkg/models/operations/gettransactionresponse.md @@ -0,0 +1,12 @@ +# GetTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionResponse` | [*shared.TransactionResponse](../../../pkg/models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/gettransactionsrequest.md b/docs/pkg/models/operations/gettransactionsrequest.md similarity index 100% rename from docs/models/operations/gettransactionsrequest.md rename to docs/pkg/models/operations/gettransactionsrequest.md diff --git a/docs/pkg/models/operations/gettransactionsresponse.md b/docs/pkg/models/operations/gettransactionsresponse.md new file mode 100755 index 0000000..082f55d --- /dev/null +++ b/docs/pkg/models/operations/gettransactionsresponse.md @@ -0,0 +1,12 @@ +# GetTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetTransactionsResponse` | [*shared.GetTransactionsResponse](../../../pkg/models/shared/gettransactionsresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getwalletrequest.md b/docs/pkg/models/operations/getwalletrequest.md similarity index 100% rename from docs/models/operations/getwalletrequest.md rename to docs/pkg/models/operations/getwalletrequest.md diff --git a/docs/pkg/models/operations/getwalletresponse.md b/docs/pkg/models/operations/getwalletresponse.md new file mode 100755 index 0000000..3138199 --- /dev/null +++ b/docs/pkg/models/operations/getwalletresponse.md @@ -0,0 +1,12 @@ +# GetWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `GetWalletResponse` | [*shared.GetWalletResponse](../../../pkg/models/shared/getwalletresponse.md) | :heavy_minus_sign: | Wallet | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getworkflowoccurrencerequest.md b/docs/pkg/models/operations/getworkflowoccurrencerequest.md similarity index 100% rename from docs/models/operations/getworkflowoccurrencerequest.md rename to docs/pkg/models/operations/getworkflowoccurrencerequest.md diff --git a/docs/pkg/models/operations/getworkflowoccurrenceresponse.md b/docs/pkg/models/operations/getworkflowoccurrenceresponse.md new file mode 100755 index 0000000..31956d3 --- /dev/null +++ b/docs/pkg/models/operations/getworkflowoccurrenceresponse.md @@ -0,0 +1,12 @@ +# GetWorkflowOccurrenceResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | +| `GetWorkflowOccurrenceResponse` | [*shared.GetWorkflowOccurrenceResponse](../../../pkg/models/shared/getworkflowoccurrenceresponse.md) | :heavy_minus_sign: | The workflow occurrence | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/insertconfigresponse.md b/docs/pkg/models/operations/insertconfigresponse.md new file mode 100755 index 0000000..a873a7a --- /dev/null +++ b/docs/pkg/models/operations/insertconfigresponse.md @@ -0,0 +1,11 @@ +# InsertConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Config created successfully. | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/debitwalletrequest.md b/docs/pkg/models/operations/installconnectorrequest.md similarity index 61% rename from docs/models/operations/debitwalletrequest.md rename to docs/pkg/models/operations/installconnectorrequest.md index ad31eae..3003ee3 100755 --- a/docs/models/operations/debitwalletrequest.md +++ b/docs/pkg/models/operations/installconnectorrequest.md @@ -1,9 +1,9 @@ -# DebitWalletRequest +# InstallConnectorRequest ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `DebitWalletRequest` | [*shared.DebitWalletRequest](../../models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `ConnectorConfig` | [shared.ConnectorConfig](../../../pkg/models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | +| `Connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/installconnectorresponse.md b/docs/pkg/models/operations/installconnectorresponse.md similarity index 100% rename from docs/models/operations/installconnectorresponse.md rename to docs/pkg/models/operations/installconnectorresponse.md diff --git a/docs/models/operations/listaccountsrequest.md b/docs/pkg/models/operations/listaccountsrequest.md similarity index 99% rename from docs/models/operations/listaccountsrequest.md rename to docs/pkg/models/operations/listaccountsrequest.md index fd85753..b252f91 100755 --- a/docs/models/operations/listaccountsrequest.md +++ b/docs/pkg/models/operations/listaccountsrequest.md @@ -8,11 +8,11 @@ | `Address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | | `After` | **string* | :heavy_minus_sign: | Pagination cursor, will return accounts after given address, in descending order. | users:003 | | `Balance` | **int64* | :heavy_minus_sign: | Filter accounts by their balance (default operator is gte) | 2400 | -| `BalanceOperator` | [*operations.BalanceOperator](../../models/operations/balanceoperator.md) | :heavy_minus_sign: | Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
| gte | -| ~~`BalanceOperatorDeprecated`~~ | [*operations.QueryParamBalanceOperator](../../models/operations/queryparambalanceoperator.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
Deprecated, please use `balanceOperator` instead.
| gte | +| `BalanceOperator` | [*operations.BalanceOperator](../../../pkg/models/operations/balanceoperator.md) | :heavy_minus_sign: | Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
| gte | +| ~~`BalanceOperatorDeprecated`~~ | [*operations.QueryParamBalanceOperator](../../../pkg/models/operations/queryparambalanceoperator.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
Deprecated, please use `balanceOperator` instead.
| gte | | `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Metadata` | [*operations.QueryParamMetadata](../../models/operations/queryparammetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.QueryParamMetadata](../../../pkg/models/operations/queryparammetadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | | ~~`PageSizeDeprecated`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The maximum number of results to return per page.
Deprecated, please use `pageSize` instead.
| | | ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use `cursor` instead.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | \ No newline at end of file diff --git a/docs/pkg/models/operations/listaccountsresponse.md b/docs/pkg/models/operations/listaccountsresponse.md new file mode 100755 index 0000000..dd2763c --- /dev/null +++ b/docs/pkg/models/operations/listaccountsresponse.md @@ -0,0 +1,12 @@ +# ListAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `AccountsCursorResponse` | [*shared.AccountsCursorResponse](../../../pkg/models/shared/accountscursorresponse.md) | :heavy_minus_sign: | OK | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listallconnectorsresponse.md b/docs/pkg/models/operations/listallconnectorsresponse.md new file mode 100755 index 0000000..408b197 --- /dev/null +++ b/docs/pkg/models/operations/listallconnectorsresponse.md @@ -0,0 +1,11 @@ +# ListAllConnectorsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ConnectorsResponse` | [*shared.ConnectorsResponse](../../../pkg/models/shared/connectorsresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listbalancesrequest.md b/docs/pkg/models/operations/listbalancesrequest.md similarity index 100% rename from docs/models/operations/listbalancesrequest.md rename to docs/pkg/models/operations/listbalancesrequest.md diff --git a/docs/pkg/models/operations/listbalancesresponse.md b/docs/pkg/models/operations/listbalancesresponse.md new file mode 100755 index 0000000..d9d8507 --- /dev/null +++ b/docs/pkg/models/operations/listbalancesresponse.md @@ -0,0 +1,11 @@ +# ListBalancesResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListBalancesResponse` | [*shared.ListBalancesResponse](../../../pkg/models/shared/listbalancesresponse.md) | :heavy_minus_sign: | Balances list | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listclientsresponse.md b/docs/pkg/models/operations/listclientsresponse.md new file mode 100755 index 0000000..abc8b00 --- /dev/null +++ b/docs/pkg/models/operations/listclientsresponse.md @@ -0,0 +1,11 @@ +# ListClientsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListClientsResponse` | [*shared.ListClientsResponse](../../../pkg/models/shared/listclientsresponse.md) | :heavy_minus_sign: | List of clients | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md b/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md new file mode 100755 index 0000000..29b12b5 --- /dev/null +++ b/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md @@ -0,0 +1,11 @@ +# ListConfigsAvailableConnectorsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `ConnectorsConfigsResponse` | [*shared.ConnectorsConfigsResponse](../../../pkg/models/shared/connectorsconfigsresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listconnectortasksrequest.md b/docs/pkg/models/operations/listconnectortasksrequest.md similarity index 98% rename from docs/models/operations/listconnectortasksrequest.md rename to docs/pkg/models/operations/listconnectortasksrequest.md index bca1819..d8298e3 100755 --- a/docs/models/operations/listconnectortasksrequest.md +++ b/docs/pkg/models/operations/listconnectortasksrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | +| `Connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | | `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | \ No newline at end of file diff --git a/docs/pkg/models/operations/listconnectortasksresponse.md b/docs/pkg/models/operations/listconnectortasksresponse.md new file mode 100755 index 0000000..f2b3b3b --- /dev/null +++ b/docs/pkg/models/operations/listconnectortasksresponse.md @@ -0,0 +1,11 @@ +# ListConnectorTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TasksCursor` | [*shared.TasksCursor](../../../pkg/models/shared/taskscursor.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/listflowsresponse.md b/docs/pkg/models/operations/listflowsresponse.md new file mode 100755 index 0000000..9111d25 --- /dev/null +++ b/docs/pkg/models/operations/listflowsresponse.md @@ -0,0 +1,12 @@ +# ListFlowsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | +| `ListWorkflowsResponse` | [*shared.ListWorkflowsResponse](../../../pkg/models/shared/listworkflowsresponse.md) | :heavy_minus_sign: | List of workflows | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listlogsrequest.md b/docs/pkg/models/operations/listlogsrequest.md similarity index 100% rename from docs/models/operations/listlogsrequest.md rename to docs/pkg/models/operations/listlogsrequest.md diff --git a/docs/pkg/models/operations/listlogsresponse.md b/docs/pkg/models/operations/listlogsresponse.md new file mode 100755 index 0000000..5b459b8 --- /dev/null +++ b/docs/pkg/models/operations/listlogsresponse.md @@ -0,0 +1,12 @@ +# ListLogsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `LogsCursorResponse` | [*shared.LogsCursorResponse](../../../pkg/models/shared/logscursorresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listpaymentsrequest.md b/docs/pkg/models/operations/listpaymentsrequest.md similarity index 100% rename from docs/models/operations/listpaymentsrequest.md rename to docs/pkg/models/operations/listpaymentsrequest.md diff --git a/docs/pkg/models/operations/listpaymentsresponse.md b/docs/pkg/models/operations/listpaymentsresponse.md new file mode 100755 index 0000000..4306f67 --- /dev/null +++ b/docs/pkg/models/operations/listpaymentsresponse.md @@ -0,0 +1,11 @@ +# ListPaymentsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `PaymentsCursor` | [*shared.PaymentsCursor](../../../pkg/models/shared/paymentscursor.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listrunsrequest.md b/docs/pkg/models/operations/listrunsrequest.md similarity index 100% rename from docs/models/operations/listrunsrequest.md rename to docs/pkg/models/operations/listrunsrequest.md diff --git a/docs/pkg/models/operations/listrunsresponse.md b/docs/pkg/models/operations/listrunsresponse.md new file mode 100755 index 0000000..708451e --- /dev/null +++ b/docs/pkg/models/operations/listrunsresponse.md @@ -0,0 +1,12 @@ +# ListRunsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | +| `ListRunsResponse` | [*shared.ListRunsResponse](../../../pkg/models/shared/listrunsresponse.md) | :heavy_minus_sign: | List of workflow occurrences | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listscopesresponse.md b/docs/pkg/models/operations/listscopesresponse.md new file mode 100755 index 0000000..9dfa97f --- /dev/null +++ b/docs/pkg/models/operations/listscopesresponse.md @@ -0,0 +1,11 @@ +# ListScopesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListScopesResponse` | [*shared.ListScopesResponse](../../../pkg/models/shared/listscopesresponse.md) | :heavy_minus_sign: | List of scopes | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listtransactionsqueryparammetadata.md b/docs/pkg/models/operations/listtransactionsqueryparammetadata.md similarity index 100% rename from docs/models/operations/listtransactionsqueryparammetadata.md rename to docs/pkg/models/operations/listtransactionsqueryparammetadata.md diff --git a/docs/models/operations/listtransactionsrequest.md b/docs/pkg/models/operations/listtransactionsrequest.md similarity index 99% rename from docs/models/operations/listtransactionsrequest.md rename to docs/pkg/models/operations/listtransactionsrequest.md index 611422d..92d5425 100755 --- a/docs/models/operations/listtransactionsrequest.md +++ b/docs/pkg/models/operations/listtransactionsrequest.md @@ -12,7 +12,7 @@ | `EndTime` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
| | | ~~`EndTimeDeprecated`~~ | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use `endTime` instead.
| | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Metadata` | [*operations.ListTransactionsQueryParamMetadata](../../models/operations/listtransactionsqueryparammetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.ListTransactionsQueryParamMetadata](../../../pkg/models/operations/listtransactionsqueryparammetadata.md) | :heavy_minus_sign: | Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | | ~~`PageSizeDeprecated`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The maximum number of results to return per page.
Deprecated, please use `pageSize` instead.
| | | ~~`PaginationToken`~~ | **string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use `cursor` instead.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | diff --git a/docs/pkg/models/operations/listtransactionsresponse.md b/docs/pkg/models/operations/listtransactionsresponse.md new file mode 100755 index 0000000..123cbf2 --- /dev/null +++ b/docs/pkg/models/operations/listtransactionsresponse.md @@ -0,0 +1,12 @@ +# ListTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionsCursorResponse` | [*shared.TransactionsCursorResponse](../../../pkg/models/shared/transactionscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/listusersresponse.md b/docs/pkg/models/operations/listusersresponse.md new file mode 100755 index 0000000..0392b26 --- /dev/null +++ b/docs/pkg/models/operations/listusersresponse.md @@ -0,0 +1,11 @@ +# ListUsersResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListUsersResponse` | [*shared.ListUsersResponse](../../../pkg/models/shared/listusersresponse.md) | :heavy_minus_sign: | List of users | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/listwalletsqueryparammetadata.md b/docs/pkg/models/operations/listwalletsqueryparammetadata.md similarity index 100% rename from docs/models/operations/listwalletsqueryparammetadata.md rename to docs/pkg/models/operations/listwalletsqueryparammetadata.md diff --git a/docs/models/operations/listwalletsrequest.md b/docs/pkg/models/operations/listwalletsrequest.md similarity index 98% rename from docs/models/operations/listwalletsrequest.md rename to docs/pkg/models/operations/listwalletsrequest.md index f6e21b4..6ded285 100755 --- a/docs/models/operations/listwalletsrequest.md +++ b/docs/pkg/models/operations/listwalletsrequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `Metadata` | [*operations.ListWalletsQueryParamMetadata](../../models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `Metadata` | [*operations.ListWalletsQueryParamMetadata](../../../pkg/models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `Name` | **string* | :heavy_minus_sign: | Filter on wallet name | | | `PageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | \ No newline at end of file diff --git a/docs/pkg/models/operations/listwalletsresponse.md b/docs/pkg/models/operations/listwalletsresponse.md new file mode 100755 index 0000000..e9eb0ba --- /dev/null +++ b/docs/pkg/models/operations/listwalletsresponse.md @@ -0,0 +1,11 @@ +# ListWalletsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ListWalletsResponse` | [*shared.ListWalletsResponse](../../../pkg/models/shared/listwalletsresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/metadata.md b/docs/pkg/models/operations/metadata.md similarity index 100% rename from docs/models/operations/metadata.md rename to docs/pkg/models/operations/metadata.md diff --git a/docs/pkg/models/operations/orchestrationgetserverinforesponse.md b/docs/pkg/models/operations/orchestrationgetserverinforesponse.md new file mode 100755 index 0000000..a3d9daa --- /dev/null +++ b/docs/pkg/models/operations/orchestrationgetserverinforesponse.md @@ -0,0 +1,12 @@ +# OrchestrationgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | +| `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/paymentsgetserverinforesponse.md b/docs/pkg/models/operations/paymentsgetserverinforesponse.md new file mode 100755 index 0000000..1d7fdd9 --- /dev/null +++ b/docs/pkg/models/operations/paymentsgetserverinforesponse.md @@ -0,0 +1,11 @@ +# PaymentsgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/paymentslistaccountsrequest.md b/docs/pkg/models/operations/paymentslistaccountsrequest.md similarity index 100% rename from docs/models/operations/paymentslistaccountsrequest.md rename to docs/pkg/models/operations/paymentslistaccountsrequest.md diff --git a/docs/pkg/models/operations/paymentslistaccountsresponse.md b/docs/pkg/models/operations/paymentslistaccountsresponse.md new file mode 100755 index 0000000..137bccf --- /dev/null +++ b/docs/pkg/models/operations/paymentslistaccountsresponse.md @@ -0,0 +1,11 @@ +# PaymentslistAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `AccountsCursor` | [*shared.AccountsCursor](../../../pkg/models/shared/accountscursor.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/queryparambalanceoperator.md b/docs/pkg/models/operations/queryparambalanceoperator.md similarity index 100% rename from docs/models/operations/queryparambalanceoperator.md rename to docs/pkg/models/operations/queryparambalanceoperator.md diff --git a/docs/models/operations/queryparammetadata.md b/docs/pkg/models/operations/queryparammetadata.md similarity index 100% rename from docs/models/operations/queryparammetadata.md rename to docs/pkg/models/operations/queryparammetadata.md diff --git a/docs/models/operations/readclientrequest.md b/docs/pkg/models/operations/readclientrequest.md similarity index 100% rename from docs/models/operations/readclientrequest.md rename to docs/pkg/models/operations/readclientrequest.md diff --git a/docs/pkg/models/operations/readclientresponse.md b/docs/pkg/models/operations/readclientresponse.md new file mode 100755 index 0000000..7386459 --- /dev/null +++ b/docs/pkg/models/operations/readclientresponse.md @@ -0,0 +1,11 @@ +# ReadClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ReadClientResponse` | [*shared.ReadClientResponse](../../../pkg/models/shared/readclientresponse.md) | :heavy_minus_sign: | Retrieved client | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/readconnectorconfigrequest.md b/docs/pkg/models/operations/readconnectorconfigrequest.md new file mode 100755 index 0000000..23eb5a3 --- /dev/null +++ b/docs/pkg/models/operations/readconnectorconfigrequest.md @@ -0,0 +1,8 @@ +# ReadConnectorConfigRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/pkg/models/operations/readconnectorconfigresponse.md b/docs/pkg/models/operations/readconnectorconfigresponse.md new file mode 100755 index 0000000..145ee0b --- /dev/null +++ b/docs/pkg/models/operations/readconnectorconfigresponse.md @@ -0,0 +1,11 @@ +# ReadConnectorConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `ConnectorConfigResponse` | [*shared.ConnectorConfigResponse](../../../pkg/models/shared/connectorconfigresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readscoperequest.md b/docs/pkg/models/operations/readscoperequest.md similarity index 100% rename from docs/models/operations/readscoperequest.md rename to docs/pkg/models/operations/readscoperequest.md diff --git a/docs/pkg/models/operations/readscoperesponse.md b/docs/pkg/models/operations/readscoperesponse.md new file mode 100755 index 0000000..b2a6372 --- /dev/null +++ b/docs/pkg/models/operations/readscoperesponse.md @@ -0,0 +1,11 @@ +# ReadScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ReadScopeResponse` | [*shared.ReadScopeResponse](../../../pkg/models/shared/readscoperesponse.md) | :heavy_minus_sign: | Retrieved scope | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readstatsrequest.md b/docs/pkg/models/operations/readstatsrequest.md similarity index 100% rename from docs/models/operations/readstatsrequest.md rename to docs/pkg/models/operations/readstatsrequest.md diff --git a/docs/pkg/models/operations/readstatsresponse.md b/docs/pkg/models/operations/readstatsresponse.md new file mode 100755 index 0000000..373588a --- /dev/null +++ b/docs/pkg/models/operations/readstatsresponse.md @@ -0,0 +1,12 @@ +# ReadStatsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatsResponse` | [*shared.StatsResponse](../../../pkg/models/shared/statsresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/readuserrequest.md b/docs/pkg/models/operations/readuserrequest.md similarity index 100% rename from docs/models/operations/readuserrequest.md rename to docs/pkg/models/operations/readuserrequest.md diff --git a/docs/pkg/models/operations/readuserresponse.md b/docs/pkg/models/operations/readuserresponse.md new file mode 100755 index 0000000..ec781f2 --- /dev/null +++ b/docs/pkg/models/operations/readuserresponse.md @@ -0,0 +1,11 @@ +# ReadUserResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ReadUserResponse` | [*shared.ReadUserResponse](../../../pkg/models/shared/readuserresponse.md) | :heavy_minus_sign: | Retrieved user | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/resetconnectorrequest.md b/docs/pkg/models/operations/resetconnectorrequest.md new file mode 100755 index 0000000..4da3f8d --- /dev/null +++ b/docs/pkg/models/operations/resetconnectorrequest.md @@ -0,0 +1,8 @@ +# ResetConnectorRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/resetconnectorresponse.md b/docs/pkg/models/operations/resetconnectorresponse.md similarity index 100% rename from docs/models/operations/resetconnectorresponse.md rename to docs/pkg/models/operations/resetconnectorresponse.md diff --git a/docs/models/operations/reverttransactionrequest.md b/docs/pkg/models/operations/reverttransactionrequest.md similarity index 100% rename from docs/models/operations/reverttransactionrequest.md rename to docs/pkg/models/operations/reverttransactionrequest.md diff --git a/docs/pkg/models/operations/reverttransactionresponse.md b/docs/pkg/models/operations/reverttransactionresponse.md new file mode 100755 index 0000000..4ff4d24 --- /dev/null +++ b/docs/pkg/models/operations/reverttransactionresponse.md @@ -0,0 +1,12 @@ +# RevertTransactionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `TransactionResponse` | [*shared.TransactionResponse](../../../pkg/models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/runscriptrequest.md b/docs/pkg/models/operations/runscriptrequest.md similarity index 97% rename from docs/models/operations/runscriptrequest.md rename to docs/pkg/models/operations/runscriptrequest.md index 2a03d60..14c76b7 100755 --- a/docs/models/operations/runscriptrequest.md +++ b/docs/pkg/models/operations/runscriptrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `Script` | [shared.Script](../../models/shared/script.md) | :heavy_check_mark: | N/A | | +| `Script` | [shared.Script](../../../pkg/models/shared/script.md) | :heavy_check_mark: | N/A | | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `Preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | \ No newline at end of file diff --git a/docs/models/operations/runscriptresponse.md b/docs/pkg/models/operations/runscriptresponse.md similarity index 99% rename from docs/models/operations/runscriptresponse.md rename to docs/pkg/models/operations/runscriptresponse.md index 7215131..5112389 100755 --- a/docs/models/operations/runscriptresponse.md +++ b/docs/pkg/models/operations/runscriptresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ScriptResponse` | [*shared.ScriptResponse](../../models/shared/scriptresponse.md) | :heavy_minus_sign: | On success, it will return a 200 status code, and the resulting transaction under the `transaction` field.

On failure, it will also return a 200 status code, and the following fields:
- `details`: contains a URL. When there is an error parsing Numscript, the result can be difficult to read—the provided URL will render the error in an easy-to-read format.
- `errorCode` and `error_code` (deprecated): contains the string code of the error
- `errorMessage` and `error_message` (deprecated): contains a human-readable indication of what went wrong, for example that an account had insufficient funds, or that there was an error in the provided Numscript.
| +| `ScriptResponse` | [*shared.ScriptResponse](../../../pkg/models/shared/scriptresponse.md) | :heavy_minus_sign: | On success, it will return a 200 status code, and the resulting transaction under the `transaction` field.

On failure, it will also return a 200 status code, and the following fields:
- `details`: contains a URL. When there is an error parsing Numscript, the result can be difficult to read—the provided URL will render the error in an easy-to-read format.
- `errorCode` and `error_code` (deprecated): contains the string code of the error
- `errorMessage` and `error_message` (deprecated): contains a human-readable indication of what went wrong, for example that an account had insufficient funds, or that there was an error in the provided Numscript.
| | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/runworkflowrequest.md b/docs/pkg/models/operations/runworkflowrequest.md similarity index 100% rename from docs/models/operations/runworkflowrequest.md rename to docs/pkg/models/operations/runworkflowrequest.md diff --git a/docs/pkg/models/operations/runworkflowresponse.md b/docs/pkg/models/operations/runworkflowresponse.md new file mode 100755 index 0000000..6ad933f --- /dev/null +++ b/docs/pkg/models/operations/runworkflowresponse.md @@ -0,0 +1,12 @@ +# RunWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | +| `RunWorkflowResponse` | [*shared.RunWorkflowResponse](../../../pkg/models/shared/runworkflowresponse.md) | :heavy_minus_sign: | The workflow occurrence | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/searchgetserverinforesponse.md b/docs/pkg/models/operations/searchgetserverinforesponse.md new file mode 100755 index 0000000..beb0122 --- /dev/null +++ b/docs/pkg/models/operations/searchgetserverinforesponse.md @@ -0,0 +1,11 @@ +# SearchgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/searchresponse.md b/docs/pkg/models/operations/searchresponse.md new file mode 100755 index 0000000..408f105 --- /dev/null +++ b/docs/pkg/models/operations/searchresponse.md @@ -0,0 +1,11 @@ +# SearchResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `Response` | [*shared.Response](../../../pkg/models/shared/response.md) | :heavy_minus_sign: | Success | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/testconfigrequest.md b/docs/pkg/models/operations/testconfigrequest.md similarity index 100% rename from docs/models/operations/testconfigrequest.md rename to docs/pkg/models/operations/testconfigrequest.md diff --git a/docs/pkg/models/operations/testconfigresponse.md b/docs/pkg/models/operations/testconfigresponse.md new file mode 100755 index 0000000..dfb7b53 --- /dev/null +++ b/docs/pkg/models/operations/testconfigresponse.md @@ -0,0 +1,11 @@ +# TestConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `AttemptResponse` | [*shared.AttemptResponse](../../../pkg/models/shared/attemptresponse.md) | :heavy_minus_sign: | OK | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/uninstallconnectorrequest.md b/docs/pkg/models/operations/uninstallconnectorrequest.md new file mode 100755 index 0000000..c142135 --- /dev/null +++ b/docs/pkg/models/operations/uninstallconnectorrequest.md @@ -0,0 +1,8 @@ +# UninstallConnectorRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file diff --git a/docs/models/operations/uninstallconnectorresponse.md b/docs/pkg/models/operations/uninstallconnectorresponse.md similarity index 100% rename from docs/models/operations/uninstallconnectorresponse.md rename to docs/pkg/models/operations/uninstallconnectorresponse.md diff --git a/docs/pkg/models/operations/updateclientrequest.md b/docs/pkg/models/operations/updateclientrequest.md new file mode 100755 index 0000000..e4a9429 --- /dev/null +++ b/docs/pkg/models/operations/updateclientrequest.md @@ -0,0 +1,9 @@ +# UpdateClientRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ClientID` | *string* | :heavy_check_mark: | Client ID | +| `UpdateClientRequest` | [*shared.UpdateClientRequest](../../../pkg/models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/operations/updateclientresponse.md b/docs/pkg/models/operations/updateclientresponse.md new file mode 100755 index 0000000..e6fad53 --- /dev/null +++ b/docs/pkg/models/operations/updateclientresponse.md @@ -0,0 +1,11 @@ +# UpdateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `UpdateClientResponse` | [*shared.UpdateClientResponse](../../../pkg/models/shared/updateclientresponse.md) | :heavy_minus_sign: | Updated client | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatemappingrequest.md b/docs/pkg/models/operations/updatemappingrequest.md new file mode 100755 index 0000000..27fb927 --- /dev/null +++ b/docs/pkg/models/operations/updatemappingrequest.md @@ -0,0 +1,9 @@ +# UpdateMappingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Mapping` | [shared.Mapping](../../../pkg/models/shared/mapping.md) | :heavy_check_mark: | N/A | | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatemappingresponse.md b/docs/pkg/models/operations/updatemappingresponse.md new file mode 100755 index 0000000..61006eb --- /dev/null +++ b/docs/pkg/models/operations/updatemappingresponse.md @@ -0,0 +1,12 @@ +# UpdateMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | +| `MappingResponse` | [*shared.MappingResponse](../../../pkg/models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatescoperequest.md b/docs/pkg/models/operations/updatescoperequest.md new file mode 100755 index 0000000..a999fa8 --- /dev/null +++ b/docs/pkg/models/operations/updatescoperequest.md @@ -0,0 +1,9 @@ +# UpdateScopeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | +| `UpdateScopeRequest` | [*shared.UpdateScopeRequest](../../../pkg/models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatescoperesponse.md b/docs/pkg/models/operations/updatescoperesponse.md new file mode 100755 index 0000000..3115cd6 --- /dev/null +++ b/docs/pkg/models/operations/updatescoperesponse.md @@ -0,0 +1,11 @@ +# UpdateScopeResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `UpdateScopeResponse` | [*shared.UpdateScopeResponse](../../../pkg/models/shared/updatescoperesponse.md) | :heavy_minus_sign: | Updated scope | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatewalletrequest.md b/docs/pkg/models/operations/updatewalletrequest.md new file mode 100755 index 0000000..2852bf7 --- /dev/null +++ b/docs/pkg/models/operations/updatewalletrequest.md @@ -0,0 +1,9 @@ +# UpdateWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `RequestBody` | [*operations.UpdateWalletRequestBody](../../../pkg/models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewalletrequestbody.md b/docs/pkg/models/operations/updatewalletrequestbody.md similarity index 100% rename from docs/models/operations/updatewalletrequestbody.md rename to docs/pkg/models/operations/updatewalletrequestbody.md diff --git a/docs/pkg/models/operations/updatewalletresponse.md b/docs/pkg/models/operations/updatewalletresponse.md new file mode 100755 index 0000000..ee06b16 --- /dev/null +++ b/docs/pkg/models/operations/updatewalletresponse.md @@ -0,0 +1,11 @@ +# UpdateWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/voidholdrequest.md b/docs/pkg/models/operations/voidholdrequest.md similarity index 100% rename from docs/models/operations/voidholdrequest.md rename to docs/pkg/models/operations/voidholdrequest.md diff --git a/docs/pkg/models/operations/voidholdresponse.md b/docs/pkg/models/operations/voidholdresponse.md new file mode 100755 index 0000000..b1beb94 --- /dev/null +++ b/docs/pkg/models/operations/voidholdresponse.md @@ -0,0 +1,11 @@ +# VoidHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/walletsgetserverinforesponse.md b/docs/pkg/models/operations/walletsgetserverinforesponse.md new file mode 100755 index 0000000..585707c --- /dev/null +++ b/docs/pkg/models/operations/walletsgetserverinforesponse.md @@ -0,0 +1,12 @@ +# WalletsgetServerInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createtransactionsrequest.md b/docs/pkg/models/shared/account.md similarity index 59% rename from docs/models/operations/createtransactionsrequest.md rename to docs/pkg/models/shared/account.md index 87a865c..71c051f 100755 --- a/docs/models/operations/createtransactionsrequest.md +++ b/docs/pkg/models/shared/account.md @@ -1,9 +1,10 @@ -# CreateTransactionsRequest +# Account ## Fields | Field | Type | Required | Description | Example | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `Transactions` | [shared.Transactions](../../models/shared/transactions.md) | :heavy_check_mark: | N/A | | -| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file +| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | +| `Metadata` | [*shared.Metadata](../../../pkg/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountresponse.md b/docs/pkg/models/shared/accountresponse.md new file mode 100755 index 0000000..8dfd051 --- /dev/null +++ b/docs/pkg/models/shared/accountresponse.md @@ -0,0 +1,8 @@ +# AccountResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `Data` | [shared.AccountWithVolumesAndBalances](../../../pkg/models/shared/accountwithvolumesandbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountscursor.md b/docs/pkg/models/shared/accountscursor.md new file mode 100755 index 0000000..24882ae --- /dev/null +++ b/docs/pkg/models/shared/accountscursor.md @@ -0,0 +1,8 @@ +# AccountsCursor + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Cursor` | [shared.Cursor](../../../pkg/models/shared/cursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountscursorresponse.md b/docs/pkg/models/shared/accountscursorresponse.md new file mode 100755 index 0000000..8a0ce9e --- /dev/null +++ b/docs/pkg/models/shared/accountscursorresponse.md @@ -0,0 +1,8 @@ +# AccountsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.AccountsCursorResponseCursor](../../../pkg/models/shared/accountscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountscursorresponsecursor.md b/docs/pkg/models/shared/accountscursorresponsecursor.md new file mode 100755 index 0000000..4c864bc --- /dev/null +++ b/docs/pkg/models/shared/accountscursorresponsecursor.md @@ -0,0 +1,12 @@ +# AccountsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | [][shared.Account](../../../pkg/models/shared/account.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountwithvolumesandbalances.md b/docs/pkg/models/shared/accountwithvolumesandbalances.md new file mode 100755 index 0000000..c156ecf --- /dev/null +++ b/docs/pkg/models/shared/accountwithvolumesandbalances.md @@ -0,0 +1,12 @@ +# AccountWithVolumesAndBalances + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | +| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | +| `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../../pkg/models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | | +| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | +| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | \ No newline at end of file diff --git a/docs/models/shared/accountwithvolumesandbalancesmetadata.md b/docs/pkg/models/shared/accountwithvolumesandbalancesmetadata.md similarity index 100% rename from docs/models/shared/accountwithvolumesandbalancesmetadata.md rename to docs/pkg/models/shared/accountwithvolumesandbalancesmetadata.md diff --git a/docs/models/shared/aggregatebalancesresponse.md b/docs/pkg/models/shared/aggregatebalancesresponse.md similarity index 100% rename from docs/models/shared/aggregatebalancesresponse.md rename to docs/pkg/models/shared/aggregatebalancesresponse.md diff --git a/docs/models/shared/assetholder.md b/docs/pkg/models/shared/assetholder.md similarity index 100% rename from docs/models/shared/assetholder.md rename to docs/pkg/models/shared/assetholder.md diff --git a/docs/pkg/models/shared/attempt.md b/docs/pkg/models/shared/attempt.md new file mode 100755 index 0000000..952fff2 --- /dev/null +++ b/docs/pkg/models/shared/attempt.md @@ -0,0 +1,17 @@ +# Attempt + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `Config` | [*shared.WebhooksConfig](../../../pkg/models/shared/webhooksconfig.md) | :heavy_minus_sign: | N/A | | +| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `ID` | **string* | :heavy_minus_sign: | N/A | | +| `NextRetryAfter` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `Payload` | **string* | :heavy_minus_sign: | N/A | {"data":"test"} | +| `RetryAttempt` | **int64* | :heavy_minus_sign: | N/A | 1 | +| `Status` | **string* | :heavy_minus_sign: | N/A | success | +| `StatusCode` | **int64* | :heavy_minus_sign: | N/A | 200 | +| `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `WebhookID` | **string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/attemptresponse.md b/docs/pkg/models/shared/attemptresponse.md new file mode 100755 index 0000000..9e41f02 --- /dev/null +++ b/docs/pkg/models/shared/attemptresponse.md @@ -0,0 +1,8 @@ +# AttemptResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Data` | [shared.Attempt](../../../pkg/models/shared/attempt.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balance.md b/docs/pkg/models/shared/balance.md similarity index 100% rename from docs/models/shared/balance.md rename to docs/pkg/models/shared/balance.md diff --git a/docs/pkg/models/shared/balances.md b/docs/pkg/models/shared/balances.md new file mode 100755 index 0000000..7d25b17 --- /dev/null +++ b/docs/pkg/models/shared/balances.md @@ -0,0 +1,8 @@ +# Balances + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `Main` | [shared.AssetHolder](../../../pkg/models/shared/assetholder.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/balancescursorresponse.md b/docs/pkg/models/shared/balancescursorresponse.md new file mode 100755 index 0000000..06ba0cd --- /dev/null +++ b/docs/pkg/models/shared/balancescursorresponse.md @@ -0,0 +1,8 @@ +# BalancesCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.BalancesCursorResponseCursor](../../../pkg/models/shared/balancescursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balancescursorresponsecursor.md b/docs/pkg/models/shared/balancescursorresponsecursor.md similarity index 100% rename from docs/models/shared/balancescursorresponsecursor.md rename to docs/pkg/models/shared/balancescursorresponsecursor.md diff --git a/docs/models/shared/balancewithassets.md b/docs/pkg/models/shared/balancewithassets.md similarity index 100% rename from docs/models/shared/balancewithassets.md rename to docs/pkg/models/shared/balancewithassets.md diff --git a/docs/models/shared/bankingcircleconfig.md b/docs/pkg/models/shared/bankingcircleconfig.md similarity index 100% rename from docs/models/shared/bankingcircleconfig.md rename to docs/pkg/models/shared/bankingcircleconfig.md diff --git a/docs/pkg/models/shared/client.md b/docs/pkg/models/shared/client.md new file mode 100755 index 0000000..e0e4b06 --- /dev/null +++ b/docs/pkg/models/shared/client.md @@ -0,0 +1,17 @@ +# Client + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Description` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `PostLogoutRedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Public` | **bool* | :heavy_minus_sign: | N/A | +| `RedirectUris` | []*string* | :heavy_minus_sign: | N/A | +| `Scopes` | []*string* | :heavy_minus_sign: | N/A | +| `Secrets` | [][shared.ClientSecret](../../../pkg/models/shared/clientsecret.md) | :heavy_minus_sign: | N/A | +| `Trusted` | **bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/clientsecret.md b/docs/pkg/models/shared/clientsecret.md similarity index 100% rename from docs/models/shared/clientsecret.md rename to docs/pkg/models/shared/clientsecret.md diff --git a/docs/pkg/models/shared/config.md b/docs/pkg/models/shared/config.md new file mode 100755 index 0000000..fb0c7f4 --- /dev/null +++ b/docs/pkg/models/shared/config.md @@ -0,0 +1,8 @@ +# Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Storage` | [shared.LedgerStorage](../../../pkg/models/shared/ledgerstorage.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/configchangesecret.md b/docs/pkg/models/shared/configchangesecret.md similarity index 100% rename from docs/models/shared/configchangesecret.md rename to docs/pkg/models/shared/configchangesecret.md diff --git a/docs/pkg/models/shared/configinfo.md b/docs/pkg/models/shared/configinfo.md new file mode 100755 index 0000000..8fa0977 --- /dev/null +++ b/docs/pkg/models/shared/configinfo.md @@ -0,0 +1,10 @@ +# ConfigInfo + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Config` | [shared.Config](../../../pkg/models/shared/config.md) | :heavy_check_mark: | N/A | +| `Server` | *string* | :heavy_check_mark: | N/A | +| `Version` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/configinforesponse.md b/docs/pkg/models/shared/configinforesponse.md new file mode 100755 index 0000000..7f656b4 --- /dev/null +++ b/docs/pkg/models/shared/configinforesponse.md @@ -0,0 +1,8 @@ +# ConfigInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `Data` | [shared.ConfigInfo](../../../pkg/models/shared/configinfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/configresponse.md b/docs/pkg/models/shared/configresponse.md new file mode 100755 index 0000000..5e523a5 --- /dev/null +++ b/docs/pkg/models/shared/configresponse.md @@ -0,0 +1,8 @@ +# ConfigResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `Data` | [shared.WebhooksConfig](../../../pkg/models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/configsresponse.md b/docs/pkg/models/shared/configsresponse.md new file mode 100755 index 0000000..2187fe7 --- /dev/null +++ b/docs/pkg/models/shared/configsresponse.md @@ -0,0 +1,8 @@ +# ConfigsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `Cursor` | [shared.ConfigsResponseCursor](../../../pkg/models/shared/configsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/configsresponsecursor.md b/docs/pkg/models/shared/configsresponsecursor.md new file mode 100755 index 0000000..29bd8bd --- /dev/null +++ b/docs/pkg/models/shared/configsresponsecursor.md @@ -0,0 +1,12 @@ +# ConfigsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `Data` | [][shared.WebhooksConfig](../../../pkg/models/shared/webhooksconfig.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/configuser.md b/docs/pkg/models/shared/configuser.md similarity index 100% rename from docs/models/shared/configuser.md rename to docs/pkg/models/shared/configuser.md diff --git a/docs/models/shared/confirmholdrequest.md b/docs/pkg/models/shared/confirmholdrequest.md similarity index 100% rename from docs/models/shared/confirmholdrequest.md rename to docs/pkg/models/shared/confirmholdrequest.md diff --git a/docs/models/shared/connector.md b/docs/pkg/models/shared/connector.md similarity index 100% rename from docs/models/shared/connector.md rename to docs/pkg/models/shared/connector.md diff --git a/docs/models/shared/connectorconfig.md b/docs/pkg/models/shared/connectorconfig.md similarity index 100% rename from docs/models/shared/connectorconfig.md rename to docs/pkg/models/shared/connectorconfig.md diff --git a/docs/models/operations/updatescoperequest.md b/docs/pkg/models/shared/connectorconfigresponse.md similarity index 58% rename from docs/models/operations/updatescoperequest.md rename to docs/pkg/models/shared/connectorconfigresponse.md index cb5f607..8e2fd33 100755 --- a/docs/models/operations/updatescoperequest.md +++ b/docs/pkg/models/shared/connectorconfigresponse.md @@ -1,9 +1,8 @@ -# UpdateScopeRequest +# ConnectorConfigResponse ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ScopeID` | *string* | :heavy_check_mark: | Scope ID | -| `UpdateScopeRequest` | [*shared.UpdateScopeRequest](../../models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Data` | [shared.ConnectorConfig](../../../pkg/models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/connectorsconfigsresponse.md b/docs/pkg/models/shared/connectorsconfigsresponse.md new file mode 100755 index 0000000..ccbed4a --- /dev/null +++ b/docs/pkg/models/shared/connectorsconfigsresponse.md @@ -0,0 +1,8 @@ +# ConnectorsConfigsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Data` | [shared.Data](../../../pkg/models/shared/data.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createclientresponse.md b/docs/pkg/models/shared/connectorsconfigsresponseconnector.md similarity index 74% rename from docs/models/shared/createclientresponse.md rename to docs/pkg/models/shared/connectorsconfigsresponseconnector.md index c4d36ba..501a747 100755 --- a/docs/models/shared/createclientresponse.md +++ b/docs/pkg/models/shared/connectorsconfigsresponseconnector.md @@ -1,8 +1,8 @@ -# CreateClientResponse +# ConnectorsConfigsResponseConnector ## Fields | Field | Type | Required | Description | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `Data` | [*shared.Client](../../models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Key` | [shared.Key](../../../pkg/models/shared/key.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/connectorsresponse.md b/docs/pkg/models/shared/connectorsresponse.md new file mode 100755 index 0000000..903d6fe --- /dev/null +++ b/docs/pkg/models/shared/connectorsresponse.md @@ -0,0 +1,8 @@ +# ConnectorsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `Data` | [][shared.ConnectorsResponseData](../../../pkg/models/shared/connectorsresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/connectorsresponsedata.md b/docs/pkg/models/shared/connectorsresponsedata.md new file mode 100755 index 0000000..22d5c7b --- /dev/null +++ b/docs/pkg/models/shared/connectorsresponsedata.md @@ -0,0 +1,9 @@ +# ConnectorsResponseData + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `Enabled` | **bool* | :heavy_minus_sign: | N/A | true | +| `Provider` | [*shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/ledgerinfo.md b/docs/pkg/models/shared/contract.md similarity index 74% rename from docs/models/shared/ledgerinfo.md rename to docs/pkg/models/shared/contract.md index 8d428d7..9cde5e3 100755 --- a/docs/models/shared/ledgerinfo.md +++ b/docs/pkg/models/shared/contract.md @@ -1,9 +1,9 @@ -# LedgerInfo +# Contract ## Fields | Field | Type | Required | Description | Example | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Name` | **string* | :heavy_minus_sign: | N/A | ledger001 | -| `Storage` | [*shared.Storage](../../models/shared/storage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Account` | **string* | :heavy_minus_sign: | N/A | users:001 | +| `Expr` | [shared.Expr](../../../pkg/models/shared/expr.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/createbalancerequest.md b/docs/pkg/models/shared/createbalancerequest.md similarity index 100% rename from docs/models/shared/createbalancerequest.md rename to docs/pkg/models/shared/createbalancerequest.md diff --git a/docs/pkg/models/shared/createbalanceresponse.md b/docs/pkg/models/shared/createbalanceresponse.md new file mode 100755 index 0000000..d8798cf --- /dev/null +++ b/docs/pkg/models/shared/createbalanceresponse.md @@ -0,0 +1,8 @@ +# CreateBalanceResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Data` | [shared.Balance](../../../pkg/models/shared/balance.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createclientrequest.md b/docs/pkg/models/shared/createclientrequest.md similarity index 100% rename from docs/models/shared/createclientrequest.md rename to docs/pkg/models/shared/createclientrequest.md diff --git a/docs/pkg/models/shared/createclientresponse.md b/docs/pkg/models/shared/createclientresponse.md new file mode 100755 index 0000000..bbc26e1 --- /dev/null +++ b/docs/pkg/models/shared/createclientresponse.md @@ -0,0 +1,8 @@ +# CreateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `Data` | [*shared.Client](../../../pkg/models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createscoperequest.md b/docs/pkg/models/shared/createscoperequest.md similarity index 100% rename from docs/models/shared/createscoperequest.md rename to docs/pkg/models/shared/createscoperequest.md diff --git a/docs/models/shared/listworkflowsresponse.md b/docs/pkg/models/shared/createscoperesponse.md similarity index 69% rename from docs/models/shared/listworkflowsresponse.md rename to docs/pkg/models/shared/createscoperesponse.md index 4461bec..0651cbe 100755 --- a/docs/models/shared/listworkflowsresponse.md +++ b/docs/pkg/models/shared/createscoperesponse.md @@ -1,8 +1,8 @@ -# ListWorkflowsResponse +# CreateScopeResponse ## Fields | Field | Type | Required | Description | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `Data` | [][shared.Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Data` | [*shared.Scope](../../../pkg/models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createsecretrequest.md b/docs/pkg/models/shared/createsecretrequest.md similarity index 100% rename from docs/models/shared/createsecretrequest.md rename to docs/pkg/models/shared/createsecretrequest.md diff --git a/docs/pkg/models/shared/createsecretresponse.md b/docs/pkg/models/shared/createsecretresponse.md new file mode 100755 index 0000000..07aede4 --- /dev/null +++ b/docs/pkg/models/shared/createsecretresponse.md @@ -0,0 +1,8 @@ +# CreateSecretResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `Data` | [*shared.Secret](../../../pkg/models/shared/secret.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createwalletrequest.md b/docs/pkg/models/shared/createwalletrequest.md similarity index 100% rename from docs/models/shared/createwalletrequest.md rename to docs/pkg/models/shared/createwalletrequest.md diff --git a/docs/pkg/models/shared/createwalletresponse.md b/docs/pkg/models/shared/createwalletresponse.md new file mode 100755 index 0000000..9c8baf9 --- /dev/null +++ b/docs/pkg/models/shared/createwalletresponse.md @@ -0,0 +1,8 @@ +# CreateWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Data` | [shared.Wallet](../../../pkg/models/shared/wallet.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createworkflowrequest.md b/docs/pkg/models/shared/createworkflowrequest.md similarity index 100% rename from docs/models/shared/createworkflowrequest.md rename to docs/pkg/models/shared/createworkflowrequest.md diff --git a/docs/pkg/models/shared/createworkflowresponse.md b/docs/pkg/models/shared/createworkflowresponse.md new file mode 100755 index 0000000..9b53e1a --- /dev/null +++ b/docs/pkg/models/shared/createworkflowresponse.md @@ -0,0 +1,8 @@ +# CreateWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | [shared.Workflow](../../../pkg/models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/creditwalletrequest.md b/docs/pkg/models/shared/creditwalletrequest.md new file mode 100755 index 0000000..aab44d3 --- /dev/null +++ b/docs/pkg/models/shared/creditwalletrequest.md @@ -0,0 +1,12 @@ +# CreditWalletRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Amount` | [shared.Monetary](../../../pkg/models/shared/monetary.md) | :heavy_check_mark: | N/A | +| `Balance` | **string* | :heavy_minus_sign: | The balance to credit | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | +| `Reference` | **string* | :heavy_minus_sign: | N/A | +| `Sources` | [][shared.Subject](../../../pkg/models/shared/subject.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/currencycloudconfig.md b/docs/pkg/models/shared/currencycloudconfig.md similarity index 100% rename from docs/models/shared/currencycloudconfig.md rename to docs/pkg/models/shared/currencycloudconfig.md diff --git a/docs/pkg/models/shared/cursor.md b/docs/pkg/models/shared/cursor.md new file mode 100755 index 0000000..77528ac --- /dev/null +++ b/docs/pkg/models/shared/cursor.md @@ -0,0 +1,12 @@ +# Cursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Data` | [][shared.PaymentsAccount](../../../pkg/models/shared/paymentsaccount.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/data.md b/docs/pkg/models/shared/data.md new file mode 100755 index 0000000..cc92502 --- /dev/null +++ b/docs/pkg/models/shared/data.md @@ -0,0 +1,8 @@ +# Data + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `Connector` | [shared.ConnectorsConfigsResponseConnector](../../../pkg/models/shared/connectorsconfigsresponseconnector.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/debitwalletrequest.md b/docs/pkg/models/shared/debitwalletrequest.md similarity index 91% rename from docs/models/shared/debitwalletrequest.md rename to docs/pkg/models/shared/debitwalletrequest.md index b338ef6..f574866 100755 --- a/docs/models/shared/debitwalletrequest.md +++ b/docs/pkg/models/shared/debitwalletrequest.md @@ -5,9 +5,9 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `Amount` | [shared.Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A | +| `Amount` | [shared.Monetary](../../../pkg/models/shared/monetary.md) | :heavy_check_mark: | N/A | | `Balances` | []*string* | :heavy_minus_sign: | N/A | | `Description` | **string* | :heavy_minus_sign: | N/A | -| `Destination` | [*shared.Subject](../../models/shared/subject.md) | :heavy_minus_sign: | N/A | +| `Destination` | [*shared.Subject](../../../pkg/models/shared/subject.md) | :heavy_minus_sign: | N/A | | `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | | `Pending` | **bool* | :heavy_minus_sign: | Set to true to create a pending hold. If false, the wallet will be debited immediately. | \ No newline at end of file diff --git a/docs/models/shared/mappingresponse.md b/docs/pkg/models/shared/debitwalletresponse.md similarity index 77% rename from docs/models/shared/mappingresponse.md rename to docs/pkg/models/shared/debitwalletresponse.md index 7ccb321..ab7ab86 100755 --- a/docs/models/shared/mappingresponse.md +++ b/docs/pkg/models/shared/debitwalletresponse.md @@ -1,8 +1,8 @@ -# MappingResponse +# DebitWalletResponse ## Fields | Field | Type | Required | Description | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Data` | [*shared.Mapping](../../models/shared/mapping.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Data` | [shared.Hold](../../../pkg/models/shared/hold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/descriptor.md b/docs/pkg/models/shared/descriptor.md similarity index 100% rename from docs/models/shared/descriptor.md rename to docs/pkg/models/shared/descriptor.md diff --git a/docs/models/shared/dummypayconfig.md b/docs/pkg/models/shared/dummypayconfig.md similarity index 100% rename from docs/models/shared/dummypayconfig.md rename to docs/pkg/models/shared/dummypayconfig.md diff --git a/docs/pkg/models/shared/error.md b/docs/pkg/models/shared/error.md new file mode 100755 index 0000000..88b0188 --- /dev/null +++ b/docs/pkg/models/shared/error.md @@ -0,0 +1,9 @@ +# Error + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `ErrorCode` | [shared.ErrorCode](../../../pkg/models/shared/errorcode.md) | :heavy_check_mark: | N/A | +| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/errorcode.md b/docs/pkg/models/shared/errorcode.md similarity index 100% rename from docs/models/shared/errorcode.md rename to docs/pkg/models/shared/errorcode.md diff --git a/docs/models/shared/errorresponse.md b/docs/pkg/models/shared/errorresponse.md similarity index 94% rename from docs/models/shared/errorresponse.md rename to docs/pkg/models/shared/errorresponse.md index a9ca124..dd01872 100755 --- a/docs/models/shared/errorresponse.md +++ b/docs/pkg/models/shared/errorresponse.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | -| `ErrorCode` | [*shared.ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | +| `ErrorCode` | [*shared.ErrorsEnum](../../../pkg/models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | | `ErrorMessage` | **string* | :heavy_minus_sign: | N/A | [INSUFFICIENT_FUND] account had insufficient funds | \ No newline at end of file diff --git a/docs/models/shared/errorsenum.md b/docs/pkg/models/shared/errorsenum.md similarity index 100% rename from docs/models/shared/errorsenum.md rename to docs/pkg/models/shared/errorsenum.md diff --git a/docs/pkg/models/shared/expandeddebithold.md b/docs/pkg/models/shared/expandeddebithold.md new file mode 100755 index 0000000..33bf60c --- /dev/null +++ b/docs/pkg/models/shared/expandeddebithold.md @@ -0,0 +1,14 @@ +# ExpandedDebitHold + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Description` | *string* | :heavy_check_mark: | N/A | | +| `Destination` | [*shared.Subject](../../../pkg/models/shared/subject.md) | :heavy_minus_sign: | N/A | | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | | +| `OriginalAmount` | *int64* | :heavy_check_mark: | Original amount on hold | 100 | +| `Remaining` | *int64* | :heavy_check_mark: | Remaining amount on hold | 10 | +| `WalletID` | *string* | :heavy_check_mark: | The ID of the wallet the hold is associated with. | | \ No newline at end of file diff --git a/docs/models/shared/expr.md b/docs/pkg/models/shared/expr.md similarity index 100% rename from docs/models/shared/expr.md rename to docs/pkg/models/shared/expr.md diff --git a/docs/models/operations/createbalancerequest.md b/docs/pkg/models/shared/getbalanceresponse.md similarity index 59% rename from docs/models/operations/createbalancerequest.md rename to docs/pkg/models/shared/getbalanceresponse.md index 0608572..07ffc7d 100755 --- a/docs/models/operations/createbalancerequest.md +++ b/docs/pkg/models/shared/getbalanceresponse.md @@ -1,9 +1,8 @@ -# CreateBalanceRequest +# GetBalanceResponse ## Fields | Field | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `CreateBalanceRequest` | [*shared.CreateBalanceRequest](../../models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Data` | [shared.BalanceWithAssets](../../../pkg/models/shared/balancewithassets.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/getholdresponse.md b/docs/pkg/models/shared/getholdresponse.md new file mode 100755 index 0000000..1f5ffbd --- /dev/null +++ b/docs/pkg/models/shared/getholdresponse.md @@ -0,0 +1,8 @@ +# GetHoldResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `Data` | [shared.ExpandedDebitHold](../../../pkg/models/shared/expandeddebithold.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/getholdsresponse.md b/docs/pkg/models/shared/getholdsresponse.md new file mode 100755 index 0000000..8a2fdaf --- /dev/null +++ b/docs/pkg/models/shared/getholdsresponse.md @@ -0,0 +1,8 @@ +# GetHoldsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Cursor` | [shared.GetHoldsResponseCursor](../../../pkg/models/shared/getholdsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/account.md b/docs/pkg/models/shared/getholdsresponsecursor.md similarity index 50% rename from docs/models/shared/account.md rename to docs/pkg/models/shared/getholdsresponsecursor.md index f811fd9..c9b0da3 100755 --- a/docs/models/shared/account.md +++ b/docs/pkg/models/shared/getholdsresponsecursor.md @@ -1,10 +1,12 @@ -# Account +# GetHoldsResponseCursor ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Metadata` | [*shared.Metadata](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `Type` | **string* | :heavy_minus_sign: | N/A | virtual | \ No newline at end of file +| `Data` | [][shared.Hold](../../../pkg/models/shared/hold.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/gettransactionsresponse.md b/docs/pkg/models/shared/gettransactionsresponse.md new file mode 100755 index 0000000..cb8e892 --- /dev/null +++ b/docs/pkg/models/shared/gettransactionsresponse.md @@ -0,0 +1,8 @@ +# GetTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.GetTransactionsResponseCursor](../../../pkg/models/shared/gettransactionsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/gettransactionsresponsecursor.md b/docs/pkg/models/shared/gettransactionsresponsecursor.md new file mode 100755 index 0000000..d65eecf --- /dev/null +++ b/docs/pkg/models/shared/gettransactionsresponsecursor.md @@ -0,0 +1,12 @@ +# GetTransactionsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `Data` | [][shared.WalletsTransaction](../../../pkg/models/shared/walletstransaction.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/getwalletresponse.md b/docs/pkg/models/shared/getwalletresponse.md new file mode 100755 index 0000000..fa8b63d --- /dev/null +++ b/docs/pkg/models/shared/getwalletresponse.md @@ -0,0 +1,8 @@ +# GetWalletResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Data` | [shared.WalletWithBalances](../../../pkg/models/shared/walletwithbalances.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/getworkflowoccurrenceresponse.md b/docs/pkg/models/shared/getworkflowoccurrenceresponse.md new file mode 100755 index 0000000..b0c81df --- /dev/null +++ b/docs/pkg/models/shared/getworkflowoccurrenceresponse.md @@ -0,0 +1,8 @@ +# GetWorkflowOccurrenceResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Data` | [shared.WorkflowOccurrence](../../../pkg/models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/getworkflowresponse.md b/docs/pkg/models/shared/getworkflowresponse.md new file mode 100755 index 0000000..50b7045 --- /dev/null +++ b/docs/pkg/models/shared/getworkflowresponse.md @@ -0,0 +1,8 @@ +# GetWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | [shared.Workflow](../../../pkg/models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/hold.md b/docs/pkg/models/shared/hold.md new file mode 100755 index 0000000..fae65f9 --- /dev/null +++ b/docs/pkg/models/shared/hold.md @@ -0,0 +1,12 @@ +# Hold + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Description` | *string* | :heavy_check_mark: | N/A | +| `Destination` | [*shared.Subject](../../../pkg/models/shared/subject.md) | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the hold. | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the hold. | +| `WalletID` | *string* | :heavy_check_mark: | The ID of the wallet the hold is associated with. | \ No newline at end of file diff --git a/docs/models/shared/key.md b/docs/pkg/models/shared/key.md similarity index 100% rename from docs/models/shared/key.md rename to docs/pkg/models/shared/key.md diff --git a/docs/models/shared/ledgeraccountsubject.md b/docs/pkg/models/shared/ledgeraccountsubject.md similarity index 100% rename from docs/models/shared/ledgeraccountsubject.md rename to docs/pkg/models/shared/ledgeraccountsubject.md diff --git a/docs/pkg/models/shared/ledgerinfo.md b/docs/pkg/models/shared/ledgerinfo.md new file mode 100755 index 0000000..9f7a522 --- /dev/null +++ b/docs/pkg/models/shared/ledgerinfo.md @@ -0,0 +1,9 @@ +# LedgerInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Name` | **string* | :heavy_minus_sign: | N/A | ledger001 | +| `Storage` | [*shared.Storage](../../../pkg/models/shared/storage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/storage.md b/docs/pkg/models/shared/ledgerinforesponse.md similarity index 81% rename from docs/models/shared/storage.md rename to docs/pkg/models/shared/ledgerinforesponse.md index bb77542..f55b183 100755 --- a/docs/models/shared/storage.md +++ b/docs/pkg/models/shared/ledgerinforesponse.md @@ -1,8 +1,8 @@ -# Storage +# LedgerInfoResponse ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `Migrations` | [][shared.MigrationInfo](../../models/shared/migrationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Data` | [*shared.LedgerInfo](../../../pkg/models/shared/ledgerinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ledgerstorage.md b/docs/pkg/models/shared/ledgerstorage.md similarity index 100% rename from docs/models/shared/ledgerstorage.md rename to docs/pkg/models/shared/ledgerstorage.md diff --git a/docs/pkg/models/shared/listbalancesresponse.md b/docs/pkg/models/shared/listbalancesresponse.md new file mode 100755 index 0000000..02f66a1 --- /dev/null +++ b/docs/pkg/models/shared/listbalancesresponse.md @@ -0,0 +1,8 @@ +# ListBalancesResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.ListBalancesResponseCursor](../../../pkg/models/shared/listbalancesresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/listbalancesresponsecursor.md b/docs/pkg/models/shared/listbalancesresponsecursor.md new file mode 100755 index 0000000..fd3f9ea --- /dev/null +++ b/docs/pkg/models/shared/listbalancesresponsecursor.md @@ -0,0 +1,12 @@ +# ListBalancesResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | [][shared.Balance](../../../pkg/models/shared/balance.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/ledgerinforesponse.md b/docs/pkg/models/shared/listclientsresponse.md similarity index 79% rename from docs/models/shared/ledgerinforesponse.md rename to docs/pkg/models/shared/listclientsresponse.md index 36ab229..aa148f9 100755 --- a/docs/models/shared/ledgerinforesponse.md +++ b/docs/pkg/models/shared/listclientsresponse.md @@ -1,8 +1,8 @@ -# LedgerInfoResponse +# ListClientsResponse ## Fields | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `Data` | [*shared.LedgerInfo](../../models/shared/ledgerinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Data` | [][shared.Client](../../../pkg/models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/listrunsresponse.md b/docs/pkg/models/shared/listrunsresponse.md new file mode 100755 index 0000000..5be5fb4 --- /dev/null +++ b/docs/pkg/models/shared/listrunsresponse.md @@ -0,0 +1,8 @@ +# ListRunsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Cursor` | [shared.ListRunsResponseCursor](../../../pkg/models/shared/listrunsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/listrunsresponsecursor.md b/docs/pkg/models/shared/listrunsresponsecursor.md new file mode 100755 index 0000000..ce3753d --- /dev/null +++ b/docs/pkg/models/shared/listrunsresponsecursor.md @@ -0,0 +1,12 @@ +# ListRunsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `Data` | [][shared.WorkflowOccurrence](../../../pkg/models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/listscopesresponse.md b/docs/pkg/models/shared/listscopesresponse.md new file mode 100755 index 0000000..78a8c3d --- /dev/null +++ b/docs/pkg/models/shared/listscopesresponse.md @@ -0,0 +1,8 @@ +# ListScopesResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `Data` | [][shared.Scope](../../../pkg/models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/listusersresponse.md b/docs/pkg/models/shared/listusersresponse.md new file mode 100755 index 0000000..a315c5d --- /dev/null +++ b/docs/pkg/models/shared/listusersresponse.md @@ -0,0 +1,8 @@ +# ListUsersResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `Data` | [][shared.User](../../../pkg/models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/listwalletsresponse.md b/docs/pkg/models/shared/listwalletsresponse.md new file mode 100755 index 0000000..dc3298f --- /dev/null +++ b/docs/pkg/models/shared/listwalletsresponse.md @@ -0,0 +1,8 @@ +# ListWalletsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.ListWalletsResponseCursor](../../../pkg/models/shared/listwalletsresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/listwalletsresponsecursor.md b/docs/pkg/models/shared/listwalletsresponsecursor.md new file mode 100755 index 0000000..4da81fc --- /dev/null +++ b/docs/pkg/models/shared/listwalletsresponsecursor.md @@ -0,0 +1,12 @@ +# ListWalletsResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Data` | [][shared.Wallet](../../../pkg/models/shared/wallet.md) | :heavy_check_mark: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/listworkflowsresponse.md b/docs/pkg/models/shared/listworkflowsresponse.md new file mode 100755 index 0000000..7ea3676 --- /dev/null +++ b/docs/pkg/models/shared/listworkflowsresponse.md @@ -0,0 +1,8 @@ +# ListWorkflowsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Data` | [][shared.Workflow](../../../pkg/models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/log.md b/docs/pkg/models/shared/log.md similarity index 94% rename from docs/models/shared/log.md rename to docs/pkg/models/shared/log.md index 8ff13c4..4869af3 100755 --- a/docs/models/shared/log.md +++ b/docs/pkg/models/shared/log.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `Data` | [shared.LogData](../../models/shared/logdata.md) | :heavy_check_mark: | N/A | | +| `Data` | [shared.LogData](../../../pkg/models/shared/logdata.md) | :heavy_check_mark: | N/A | | | `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | | `Hash` | *string* | :heavy_check_mark: | N/A | 9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e | | `ID` | *int64* | :heavy_check_mark: | N/A | 1234 | -| `Type` | [shared.Type](../../models/shared/type.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `Type` | [shared.Type](../../../pkg/models/shared/type.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/logdata.md b/docs/pkg/models/shared/logdata.md similarity index 100% rename from docs/models/shared/logdata.md rename to docs/pkg/models/shared/logdata.md diff --git a/docs/models/operations/updatewalletrequest.md b/docs/pkg/models/shared/logscursorresponse.md similarity index 61% rename from docs/models/operations/updatewalletrequest.md rename to docs/pkg/models/shared/logscursorresponse.md index 2d398d3..496693e 100755 --- a/docs/models/operations/updatewalletrequest.md +++ b/docs/pkg/models/shared/logscursorresponse.md @@ -1,9 +1,8 @@ -# UpdateWalletRequest +# LogsCursorResponse ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `RequestBody` | [*operations.UpdateWalletRequestBody](../../models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Cursor` | [shared.LogsCursorResponseCursor](../../../pkg/models/shared/logscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/logscursorresponsecursor.md b/docs/pkg/models/shared/logscursorresponsecursor.md new file mode 100755 index 0000000..b47280d --- /dev/null +++ b/docs/pkg/models/shared/logscursorresponsecursor.md @@ -0,0 +1,12 @@ +# LogsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Data` | [][shared.Log](../../../pkg/models/shared/log.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/mapping.md b/docs/pkg/models/shared/mapping.md new file mode 100755 index 0000000..dffd42c --- /dev/null +++ b/docs/pkg/models/shared/mapping.md @@ -0,0 +1,8 @@ +# Mapping + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Contracts` | [][shared.Contract](../../../pkg/models/shared/contract.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/balances.md b/docs/pkg/models/shared/mappingresponse.md similarity index 71% rename from docs/models/shared/balances.md rename to docs/pkg/models/shared/mappingresponse.md index aefe689..36ed49e 100755 --- a/docs/models/shared/balances.md +++ b/docs/pkg/models/shared/mappingresponse.md @@ -1,8 +1,8 @@ -# Balances +# MappingResponse ## Fields | Field | Type | Required | Description | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `Main` | [shared.AssetHolder](../../models/shared/assetholder.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Data` | [*shared.Mapping](../../../pkg/models/shared/mapping.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/metadata.md b/docs/pkg/models/shared/metadata.md similarity index 100% rename from docs/models/shared/metadata.md rename to docs/pkg/models/shared/metadata.md diff --git a/docs/pkg/models/shared/migrationinfo.md b/docs/pkg/models/shared/migrationinfo.md new file mode 100755 index 0000000..30d5554 --- /dev/null +++ b/docs/pkg/models/shared/migrationinfo.md @@ -0,0 +1,11 @@ +# MigrationInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Date` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | +| `Name` | **string* | :heavy_minus_sign: | N/A | migrations:001 | +| `State` | [*shared.State](../../../pkg/models/shared/state.md) | :heavy_minus_sign: | N/A | | +| `Version` | **int64* | :heavy_minus_sign: | N/A | 11 | \ No newline at end of file diff --git a/docs/models/shared/modulrconfig.md b/docs/pkg/models/shared/modulrconfig.md similarity index 100% rename from docs/models/shared/modulrconfig.md rename to docs/pkg/models/shared/modulrconfig.md diff --git a/docs/models/shared/monetary.md b/docs/pkg/models/shared/monetary.md similarity index 100% rename from docs/models/shared/monetary.md rename to docs/pkg/models/shared/monetary.md diff --git a/docs/pkg/models/shared/payment.md b/docs/pkg/models/shared/payment.md new file mode 100755 index 0000000..67421b6 --- /dev/null +++ b/docs/pkg/models/shared/payment.md @@ -0,0 +1,20 @@ +# Payment + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `AccountID` | *string* | :heavy_check_mark: | N/A | | +| `Adjustments` | [][shared.PaymentAdjustment](../../../pkg/models/shared/paymentadjustment.md) | :heavy_check_mark: | N/A | | +| `Asset` | *string* | :heavy_check_mark: | N/A | USD | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `ID` | *string* | :heavy_check_mark: | N/A | XXX | +| `InitialAmount` | *int64* | :heavy_check_mark: | N/A | 100 | +| `Metadata` | [][shared.PaymentMetadata](../../../pkg/models/shared/paymentmetadata.md) | :heavy_check_mark: | N/A | | +| `Provider` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | N/A | | +| `Raw` | [shared.Raw](../../../pkg/models/shared/raw.md) | :heavy_check_mark: | N/A | | +| `Reference` | *string* | :heavy_check_mark: | N/A | | +| `Scheme` | [shared.Scheme](../../../pkg/models/shared/scheme.md) | :heavy_check_mark: | N/A | | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | +| `Type` | [shared.PaymentType](../../../pkg/models/shared/paymenttype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/paymentadjustment.md b/docs/pkg/models/shared/paymentadjustment.md new file mode 100755 index 0000000..e3d3517 --- /dev/null +++ b/docs/pkg/models/shared/paymentadjustment.md @@ -0,0 +1,12 @@ +# PaymentAdjustment + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Absolute` | *bool* | :heavy_check_mark: | N/A | | +| `Amount` | *int64* | :heavy_check_mark: | N/A | 100 | +| `Date` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Raw` | [shared.PaymentAdjustmentRaw](../../../pkg/models/shared/paymentadjustmentraw.md) | :heavy_check_mark: | N/A | | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/paymentadjustmentraw.md b/docs/pkg/models/shared/paymentadjustmentraw.md similarity index 100% rename from docs/models/shared/paymentadjustmentraw.md rename to docs/pkg/models/shared/paymentadjustmentraw.md diff --git a/docs/pkg/models/shared/paymentmetadata.md b/docs/pkg/models/shared/paymentmetadata.md new file mode 100755 index 0000000..533ab37 --- /dev/null +++ b/docs/pkg/models/shared/paymentmetadata.md @@ -0,0 +1,10 @@ +# PaymentMetadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `Changelog` | [*shared.PaymentMetadataChangelog](../../../pkg/models/shared/paymentmetadatachangelog.md) | :heavy_minus_sign: | N/A | +| `Key` | *string* | :heavy_check_mark: | N/A | +| `Value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentmetadatachangelog.md b/docs/pkg/models/shared/paymentmetadatachangelog.md similarity index 100% rename from docs/models/shared/paymentmetadatachangelog.md rename to docs/pkg/models/shared/paymentmetadatachangelog.md diff --git a/docs/pkg/models/shared/paymentresponse.md b/docs/pkg/models/shared/paymentresponse.md new file mode 100755 index 0000000..f46c830 --- /dev/null +++ b/docs/pkg/models/shared/paymentresponse.md @@ -0,0 +1,8 @@ +# PaymentResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Data` | [shared.Payment](../../../pkg/models/shared/payment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/paymentsaccount.md b/docs/pkg/models/shared/paymentsaccount.md new file mode 100755 index 0000000..b56344f --- /dev/null +++ b/docs/pkg/models/shared/paymentsaccount.md @@ -0,0 +1,12 @@ +# PaymentsAccount + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Provider` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | N/A | +| `Reference` | *string* | :heavy_check_mark: | N/A | +| `Type` | [shared.PaymentsAccountType](../../../pkg/models/shared/paymentsaccounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentsaccounttype.md b/docs/pkg/models/shared/paymentsaccounttype.md similarity index 100% rename from docs/models/shared/paymentsaccounttype.md rename to docs/pkg/models/shared/paymentsaccounttype.md diff --git a/docs/pkg/models/shared/paymentscursor.md b/docs/pkg/models/shared/paymentscursor.md new file mode 100755 index 0000000..afac016 --- /dev/null +++ b/docs/pkg/models/shared/paymentscursor.md @@ -0,0 +1,8 @@ +# PaymentsCursor + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Cursor` | [shared.PaymentsCursorCursor](../../../pkg/models/shared/paymentscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/paymentscursorcursor.md b/docs/pkg/models/shared/paymentscursorcursor.md new file mode 100755 index 0000000..2754a80 --- /dev/null +++ b/docs/pkg/models/shared/paymentscursorcursor.md @@ -0,0 +1,12 @@ +# PaymentsCursorCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | [][shared.Payment](../../../pkg/models/shared/payment.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/paymentstatus.md b/docs/pkg/models/shared/paymentstatus.md similarity index 100% rename from docs/models/shared/paymentstatus.md rename to docs/pkg/models/shared/paymentstatus.md diff --git a/docs/models/shared/paymenttype.md b/docs/pkg/models/shared/paymenttype.md similarity index 100% rename from docs/models/shared/paymenttype.md rename to docs/pkg/models/shared/paymenttype.md diff --git a/docs/models/shared/posting.md b/docs/pkg/models/shared/posting.md similarity index 100% rename from docs/models/shared/posting.md rename to docs/pkg/models/shared/posting.md diff --git a/docs/pkg/models/shared/posttransaction.md b/docs/pkg/models/shared/posttransaction.md new file mode 100755 index 0000000..44cf664 --- /dev/null +++ b/docs/pkg/models/shared/posttransaction.md @@ -0,0 +1,12 @@ +# PostTransaction + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_minus_sign: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Script` | [*shared.PostTransactionScript](../../../pkg/models/shared/posttransactionscript.md) | :heavy_minus_sign: | N/A | | +| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/posttransactionscript.md b/docs/pkg/models/shared/posttransactionscript.md similarity index 92% rename from docs/models/shared/posttransactionscript.md rename to docs/pkg/models/shared/posttransactionscript.md index c3f03c8..29cd273 100755 --- a/docs/models/shared/posttransactionscript.md +++ b/docs/pkg/models/shared/posttransactionscript.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| -| `Vars` | [*shared.PostTransactionVars](../../models/shared/posttransactionvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Vars` | [*shared.PostTransactionVars](../../../pkg/models/shared/posttransactionvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/posttransactionvars.md b/docs/pkg/models/shared/posttransactionvars.md similarity index 100% rename from docs/models/shared/posttransactionvars.md rename to docs/pkg/models/shared/posttransactionvars.md diff --git a/docs/models/shared/query.md b/docs/pkg/models/shared/query.md similarity index 100% rename from docs/models/shared/query.md rename to docs/pkg/models/shared/query.md diff --git a/docs/models/shared/raw.md b/docs/pkg/models/shared/raw.md similarity index 100% rename from docs/models/shared/raw.md rename to docs/pkg/models/shared/raw.md diff --git a/docs/models/shared/configinforesponse.md b/docs/pkg/models/shared/readclientresponse.md similarity index 70% rename from docs/models/shared/configinforesponse.md rename to docs/pkg/models/shared/readclientresponse.md index be67d97..4ecdd90 100755 --- a/docs/models/shared/configinforesponse.md +++ b/docs/pkg/models/shared/readclientresponse.md @@ -1,8 +1,8 @@ -# ConfigInfoResponse +# ReadClientResponse ## Fields | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `Data` | [shared.ConfigInfo](../../models/shared/configinfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Data` | [*shared.Client](../../../pkg/models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/mapping.md b/docs/pkg/models/shared/readscoperesponse.md similarity index 69% rename from docs/models/shared/mapping.md rename to docs/pkg/models/shared/readscoperesponse.md index 7133093..afd2054 100755 --- a/docs/models/shared/mapping.md +++ b/docs/pkg/models/shared/readscoperesponse.md @@ -1,8 +1,8 @@ -# Mapping +# ReadScopeResponse ## Fields | Field | Type | Required | Description | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `Contracts` | [][shared.Contract](../../models/shared/contract.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Data` | [*shared.Scope](../../../pkg/models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/getworkflowresponse.md b/docs/pkg/models/shared/readuserresponse.md similarity index 77% rename from docs/models/shared/getworkflowresponse.md rename to docs/pkg/models/shared/readuserresponse.md index b9cc161..f0a2ac7 100755 --- a/docs/models/shared/getworkflowresponse.md +++ b/docs/pkg/models/shared/readuserresponse.md @@ -1,8 +1,8 @@ -# GetWorkflowResponse +# ReadUserResponse ## Fields | Field | Type | Required | Description | | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `Data` | [shared.Workflow](../../models/shared/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Data` | [*shared.User](../../../pkg/models/shared/user.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/runworkflowresponse.md b/docs/pkg/models/shared/response.md similarity index 63% rename from docs/models/shared/runworkflowresponse.md rename to docs/pkg/models/shared/response.md index 2e5eacb..5399b59 100755 --- a/docs/models/shared/runworkflowresponse.md +++ b/docs/pkg/models/shared/response.md @@ -1,8 +1,9 @@ -# RunWorkflowResponse +# Response ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `Data` | [shared.WorkflowOccurrence](../../models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Cursor` | [*shared.ResponseCursor](../../../pkg/models/shared/responsecursor.md) | :heavy_minus_sign: | N/A | +| `Data` | [*shared.ResponseData](../../../pkg/models/shared/responsedata.md) | :heavy_minus_sign: | The payload | \ No newline at end of file diff --git a/docs/pkg/models/shared/responsecursor.md b/docs/pkg/models/shared/responsecursor.md new file mode 100755 index 0000000..6df390d --- /dev/null +++ b/docs/pkg/models/shared/responsecursor.md @@ -0,0 +1,13 @@ +# ResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Data` | [][shared.ResponseSchemasData](../../../pkg/models/shared/responseschemasdata.md) | :heavy_minus_sign: | N/A | | +| `HasMore` | **bool* | :heavy_minus_sign: | N/A | | +| `Next` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | +| `PageSize` | **int64* | :heavy_minus_sign: | N/A | | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | +| `Total` | [*shared.Total](../../../pkg/models/shared/total.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/responsedata.md b/docs/pkg/models/shared/responsedata.md similarity index 100% rename from docs/models/shared/responsedata.md rename to docs/pkg/models/shared/responsedata.md diff --git a/docs/models/shared/responseschemasdata.md b/docs/pkg/models/shared/responseschemasdata.md similarity index 100% rename from docs/models/shared/responseschemasdata.md rename to docs/pkg/models/shared/responseschemasdata.md diff --git a/docs/pkg/models/shared/runworkflowresponse.md b/docs/pkg/models/shared/runworkflowresponse.md new file mode 100755 index 0000000..2bbad17 --- /dev/null +++ b/docs/pkg/models/shared/runworkflowresponse.md @@ -0,0 +1,8 @@ +# RunWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Data` | [shared.WorkflowOccurrence](../../../pkg/models/shared/workflowoccurrence.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/scheme.md b/docs/pkg/models/shared/scheme.md similarity index 100% rename from docs/models/shared/scheme.md rename to docs/pkg/models/shared/scheme.md diff --git a/docs/models/shared/scope.md b/docs/pkg/models/shared/scope.md similarity index 100% rename from docs/models/shared/scope.md rename to docs/pkg/models/shared/scope.md diff --git a/docs/models/shared/script.md b/docs/pkg/models/shared/script.md similarity index 94% rename from docs/models/shared/script.md rename to docs/pkg/models/shared/script.md index 7162a57..41b73f7 100755 --- a/docs/models/shared/script.md +++ b/docs/pkg/models/shared/script.md @@ -8,4 +8,4 @@ | `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| | `Reference` | **string* | :heavy_minus_sign: | Reference to attach to the generated transaction | order_1234 | -| `Vars` | [*shared.Vars](../../models/shared/vars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Vars` | [*shared.Vars](../../../pkg/models/shared/vars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/scriptresponse.md b/docs/pkg/models/shared/scriptresponse.md similarity index 91% rename from docs/models/shared/scriptresponse.md rename to docs/pkg/models/shared/scriptresponse.md index 67f1970..ccd3b0f 100755 --- a/docs/models/shared/scriptresponse.md +++ b/docs/pkg/models/shared/scriptresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | -| `ErrorCode` | [*shared.ErrorsEnum](../../models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | +| `ErrorCode` | [*shared.ErrorsEnum](../../../pkg/models/shared/errorsenum.md) | :heavy_minus_sign: | N/A | INSUFFICIENT_FUND | | `ErrorMessage` | **string* | :heavy_minus_sign: | N/A | account had insufficient funds | -| `Transaction` | [*shared.Transaction](../../models/shared/transaction.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Transaction` | [*shared.Transaction](../../../pkg/models/shared/transaction.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/secret.md b/docs/pkg/models/shared/secret.md similarity index 100% rename from docs/models/shared/secret.md rename to docs/pkg/models/shared/secret.md diff --git a/docs/models/shared/security.md b/docs/pkg/models/shared/security.md similarity index 100% rename from docs/models/shared/security.md rename to docs/pkg/models/shared/security.md diff --git a/docs/models/shared/serverinfo.md b/docs/pkg/models/shared/serverinfo.md similarity index 100% rename from docs/models/shared/serverinfo.md rename to docs/pkg/models/shared/serverinfo.md diff --git a/docs/models/shared/stagestatus.md b/docs/pkg/models/shared/stagestatus.md similarity index 100% rename from docs/models/shared/stagestatus.md rename to docs/pkg/models/shared/stagestatus.md diff --git a/docs/models/shared/state.md b/docs/pkg/models/shared/state.md similarity index 100% rename from docs/models/shared/state.md rename to docs/pkg/models/shared/state.md diff --git a/docs/models/shared/stats.md b/docs/pkg/models/shared/stats.md similarity index 100% rename from docs/models/shared/stats.md rename to docs/pkg/models/shared/stats.md diff --git a/docs/pkg/models/shared/statsresponse.md b/docs/pkg/models/shared/statsresponse.md new file mode 100755 index 0000000..54ed20d --- /dev/null +++ b/docs/pkg/models/shared/statsresponse.md @@ -0,0 +1,8 @@ +# StatsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `Data` | [shared.Stats](../../../pkg/models/shared/stats.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/storage.md b/docs/pkg/models/shared/storage.md new file mode 100755 index 0000000..1819c36 --- /dev/null +++ b/docs/pkg/models/shared/storage.md @@ -0,0 +1,8 @@ +# Storage + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `Migrations` | [][shared.MigrationInfo](../../../pkg/models/shared/migrationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/stripeconfig.md b/docs/pkg/models/shared/stripeconfig.md similarity index 100% rename from docs/models/shared/stripeconfig.md rename to docs/pkg/models/shared/stripeconfig.md diff --git a/docs/models/shared/stripetransferrequest.md b/docs/pkg/models/shared/stripetransferrequest.md similarity index 97% rename from docs/models/shared/stripetransferrequest.md rename to docs/pkg/models/shared/stripetransferrequest.md index fa7553d..a2a7137 100755 --- a/docs/models/shared/stripetransferrequest.md +++ b/docs/pkg/models/shared/stripetransferrequest.md @@ -8,4 +8,4 @@ | `Amount` | **int64* | :heavy_minus_sign: | N/A | 100 | | `Asset` | **string* | :heavy_minus_sign: | N/A | USD | | `Destination` | **string* | :heavy_minus_sign: | N/A | acct_1Gqj58KZcSIg2N2q | -| `Metadata` | [*shared.StripeTransferRequestMetadata](../../models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| | \ No newline at end of file +| `Metadata` | [*shared.StripeTransferRequestMetadata](../../../pkg/models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| | \ No newline at end of file diff --git a/docs/models/shared/stripetransferrequestmetadata.md b/docs/pkg/models/shared/stripetransferrequestmetadata.md similarity index 100% rename from docs/models/shared/stripetransferrequestmetadata.md rename to docs/pkg/models/shared/stripetransferrequestmetadata.md diff --git a/docs/models/shared/stripetransferresponse.md b/docs/pkg/models/shared/stripetransferresponse.md similarity index 100% rename from docs/models/shared/stripetransferresponse.md rename to docs/pkg/models/shared/stripetransferresponse.md diff --git a/docs/models/shared/subject.md b/docs/pkg/models/shared/subject.md similarity index 100% rename from docs/models/shared/subject.md rename to docs/pkg/models/shared/subject.md diff --git a/docs/pkg/models/shared/taskbankingcircle.md b/docs/pkg/models/shared/taskbankingcircle.md new file mode 100755 index 0000000..ed60bff --- /dev/null +++ b/docs/pkg/models/shared/taskbankingcircle.md @@ -0,0 +1,15 @@ +# TaskBankingCircle + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.Descriptor](../../../pkg/models/shared/descriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskBankingCircleState](../../../pkg/models/shared/taskbankingcirclestate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskbankingcirclestate.md b/docs/pkg/models/shared/taskbankingcirclestate.md similarity index 100% rename from docs/models/shared/taskbankingcirclestate.md rename to docs/pkg/models/shared/taskbankingcirclestate.md diff --git a/docs/pkg/models/shared/taskcurrencycloud.md b/docs/pkg/models/shared/taskcurrencycloud.md new file mode 100755 index 0000000..838b3fb --- /dev/null +++ b/docs/pkg/models/shared/taskcurrencycloud.md @@ -0,0 +1,15 @@ +# TaskCurrencyCloud + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskCurrencyCloudDescriptor](../../../pkg/models/shared/taskcurrencyclouddescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskCurrencyCloudState](../../../pkg/models/shared/taskcurrencycloudstate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskcurrencyclouddescriptor.md b/docs/pkg/models/shared/taskcurrencyclouddescriptor.md similarity index 100% rename from docs/models/shared/taskcurrencyclouddescriptor.md rename to docs/pkg/models/shared/taskcurrencyclouddescriptor.md diff --git a/docs/models/shared/taskcurrencycloudstate.md b/docs/pkg/models/shared/taskcurrencycloudstate.md similarity index 100% rename from docs/models/shared/taskcurrencycloudstate.md rename to docs/pkg/models/shared/taskcurrencycloudstate.md diff --git a/docs/pkg/models/shared/taskdummypay.md b/docs/pkg/models/shared/taskdummypay.md new file mode 100755 index 0000000..50ae21a --- /dev/null +++ b/docs/pkg/models/shared/taskdummypay.md @@ -0,0 +1,15 @@ +# TaskDummyPay + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskDummyPayDescriptor](../../../pkg/models/shared/taskdummypaydescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskDummyPayState](../../../pkg/models/shared/taskdummypaystate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskdummypaydescriptor.md b/docs/pkg/models/shared/taskdummypaydescriptor.md similarity index 100% rename from docs/models/shared/taskdummypaydescriptor.md rename to docs/pkg/models/shared/taskdummypaydescriptor.md diff --git a/docs/models/shared/taskdummypaystate.md b/docs/pkg/models/shared/taskdummypaystate.md similarity index 100% rename from docs/models/shared/taskdummypaystate.md rename to docs/pkg/models/shared/taskdummypaystate.md diff --git a/docs/pkg/models/shared/taskmodulr.md b/docs/pkg/models/shared/taskmodulr.md new file mode 100755 index 0000000..13d7472 --- /dev/null +++ b/docs/pkg/models/shared/taskmodulr.md @@ -0,0 +1,15 @@ +# TaskModulr + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskModulrDescriptor](../../../pkg/models/shared/taskmodulrdescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskModulrState](../../../pkg/models/shared/taskmodulrstate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskmodulrdescriptor.md b/docs/pkg/models/shared/taskmodulrdescriptor.md similarity index 100% rename from docs/models/shared/taskmodulrdescriptor.md rename to docs/pkg/models/shared/taskmodulrdescriptor.md diff --git a/docs/models/shared/taskmodulrstate.md b/docs/pkg/models/shared/taskmodulrstate.md similarity index 100% rename from docs/models/shared/taskmodulrstate.md rename to docs/pkg/models/shared/taskmodulrstate.md diff --git a/docs/models/operations/updateclientrequest.md b/docs/pkg/models/shared/taskresponse.md similarity index 58% rename from docs/models/operations/updateclientrequest.md rename to docs/pkg/models/shared/taskresponse.md index 8380a84..ed20a49 100755 --- a/docs/models/operations/updateclientrequest.md +++ b/docs/pkg/models/shared/taskresponse.md @@ -1,9 +1,8 @@ -# UpdateClientRequest +# TaskResponse ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ClientID` | *string* | :heavy_check_mark: | Client ID | -| `UpdateClientRequest` | [*shared.UpdateClientRequest](../../models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Data` | [shared.TaskResponseData](../../../pkg/models/shared/taskresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskresponsedata.md b/docs/pkg/models/shared/taskresponsedata.md similarity index 100% rename from docs/models/shared/taskresponsedata.md rename to docs/pkg/models/shared/taskresponsedata.md diff --git a/docs/pkg/models/shared/taskscursor.md b/docs/pkg/models/shared/taskscursor.md new file mode 100755 index 0000000..30595d5 --- /dev/null +++ b/docs/pkg/models/shared/taskscursor.md @@ -0,0 +1,8 @@ +# TasksCursor + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `Cursor` | [shared.TasksCursorCursor](../../../pkg/models/shared/taskscursorcursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/taskscursorcursor.md b/docs/pkg/models/shared/taskscursorcursor.md new file mode 100755 index 0000000..b925242 --- /dev/null +++ b/docs/pkg/models/shared/taskscursorcursor.md @@ -0,0 +1,12 @@ +# TasksCursorCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Data` | [][shared.TasksCursorData](../../../pkg/models/shared/taskscursordata.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/models/shared/taskscursordata.md b/docs/pkg/models/shared/taskscursordata.md similarity index 100% rename from docs/models/shared/taskscursordata.md rename to docs/pkg/models/shared/taskscursordata.md diff --git a/docs/pkg/models/shared/taskstripe.md b/docs/pkg/models/shared/taskstripe.md new file mode 100755 index 0000000..fc0ae85 --- /dev/null +++ b/docs/pkg/models/shared/taskstripe.md @@ -0,0 +1,15 @@ +# TaskStripe + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskStripeDescriptor](../../../pkg/models/shared/taskstripedescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskStripeState](../../../pkg/models/shared/taskstripestate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskstripedescriptor.md b/docs/pkg/models/shared/taskstripedescriptor.md similarity index 100% rename from docs/models/shared/taskstripedescriptor.md rename to docs/pkg/models/shared/taskstripedescriptor.md diff --git a/docs/models/shared/taskstripestate.md b/docs/pkg/models/shared/taskstripestate.md similarity index 100% rename from docs/models/shared/taskstripestate.md rename to docs/pkg/models/shared/taskstripestate.md diff --git a/docs/pkg/models/shared/taskwise.md b/docs/pkg/models/shared/taskwise.md new file mode 100755 index 0000000..6c3eac8 --- /dev/null +++ b/docs/pkg/models/shared/taskwise.md @@ -0,0 +1,15 @@ +# TaskWise + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `ConnectorID` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `Descriptor` | [shared.TaskWiseDescriptor](../../../pkg/models/shared/taskwisedescriptor.md) | :heavy_check_mark: | N/A | +| `Error` | **string* | :heavy_minus_sign: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `State` | [shared.TaskWiseState](../../../pkg/models/shared/taskwisestate.md) | :heavy_check_mark: | N/A | +| `Status` | [shared.PaymentStatus](../../../pkg/models/shared/paymentstatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/taskwisedescriptor.md b/docs/pkg/models/shared/taskwisedescriptor.md similarity index 100% rename from docs/models/shared/taskwisedescriptor.md rename to docs/pkg/models/shared/taskwisedescriptor.md diff --git a/docs/models/shared/taskwisestate.md b/docs/pkg/models/shared/taskwisestate.md similarity index 100% rename from docs/models/shared/taskwisestate.md rename to docs/pkg/models/shared/taskwisestate.md diff --git a/docs/models/shared/total.md b/docs/pkg/models/shared/total.md similarity index 100% rename from docs/models/shared/total.md rename to docs/pkg/models/shared/total.md diff --git a/docs/pkg/models/shared/transaction.md b/docs/pkg/models/shared/transaction.md new file mode 100755 index 0000000..3f1f084 --- /dev/null +++ b/docs/pkg/models/shared/transaction.md @@ -0,0 +1,14 @@ +# Transaction + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `PostCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/transactiondata.md b/docs/pkg/models/shared/transactiondata.md new file mode 100755 index 0000000..a7bcc30 --- /dev/null +++ b/docs/pkg/models/shared/transactiondata.md @@ -0,0 +1,11 @@ +# TransactionData + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/response.md b/docs/pkg/models/shared/transactionresponse.md similarity index 62% rename from docs/models/shared/response.md rename to docs/pkg/models/shared/transactionresponse.md index 09df12c..2acb3dd 100755 --- a/docs/models/shared/response.md +++ b/docs/pkg/models/shared/transactionresponse.md @@ -1,9 +1,8 @@ -# Response +# TransactionResponse ## Fields | Field | Type | Required | Description | | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Cursor` | [*shared.ResponseCursor](../../models/shared/responsecursor.md) | :heavy_minus_sign: | N/A | -| `Data` | [*shared.ResponseData](../../models/shared/responsedata.md) | :heavy_minus_sign: | The payload | \ No newline at end of file +| `Data` | [shared.Transaction](../../../pkg/models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/creditwalletrequest.md b/docs/pkg/models/shared/transactions.md similarity index 58% rename from docs/models/operations/creditwalletrequest.md rename to docs/pkg/models/shared/transactions.md index 4522463..c7ab849 100755 --- a/docs/models/operations/creditwalletrequest.md +++ b/docs/pkg/models/shared/transactions.md @@ -1,9 +1,8 @@ -# CreditWalletRequest +# Transactions ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `CreditWalletRequest` | [*shared.CreditWalletRequest](../../models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `Transactions` | [][shared.TransactionData](../../../pkg/models/shared/transactiondata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/transactionscursorresponse.md b/docs/pkg/models/shared/transactionscursorresponse.md new file mode 100755 index 0000000..51c89a5 --- /dev/null +++ b/docs/pkg/models/shared/transactionscursorresponse.md @@ -0,0 +1,8 @@ +# TransactionsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `Cursor` | [shared.TransactionsCursorResponseCursor](../../../pkg/models/shared/transactionscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/pkg/models/shared/transactionscursorresponsecursor.md b/docs/pkg/models/shared/transactionscursorresponsecursor.md new file mode 100755 index 0000000..5b02cdb --- /dev/null +++ b/docs/pkg/models/shared/transactionscursorresponsecursor.md @@ -0,0 +1,12 @@ +# TransactionsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `Data` | [][shared.Transaction](../../../pkg/models/shared/transaction.md) | :heavy_check_mark: | N/A | | +| `HasMore` | *bool* | :heavy_check_mark: | N/A | false | +| `Next` | **string* | :heavy_minus_sign: | N/A | | +| `PageSize` | *int64* | :heavy_check_mark: | N/A | 15 | +| `Previous` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/pkg/models/shared/transactionsresponse.md b/docs/pkg/models/shared/transactionsresponse.md new file mode 100755 index 0000000..8551cee --- /dev/null +++ b/docs/pkg/models/shared/transactionsresponse.md @@ -0,0 +1,8 @@ +# TransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `Data` | [][shared.Transaction](../../../pkg/models/shared/transaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/type.md b/docs/pkg/models/shared/type.md similarity index 100% rename from docs/models/shared/type.md rename to docs/pkg/models/shared/type.md diff --git a/docs/models/shared/updateclientrequest.md b/docs/pkg/models/shared/updateclientrequest.md similarity index 100% rename from docs/models/shared/updateclientrequest.md rename to docs/pkg/models/shared/updateclientrequest.md diff --git a/docs/pkg/models/shared/updateclientresponse.md b/docs/pkg/models/shared/updateclientresponse.md new file mode 100755 index 0000000..4efc339 --- /dev/null +++ b/docs/pkg/models/shared/updateclientresponse.md @@ -0,0 +1,8 @@ +# UpdateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `Data` | [*shared.Client](../../../pkg/models/shared/client.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/updatescoperequest.md b/docs/pkg/models/shared/updatescoperequest.md similarity index 100% rename from docs/models/shared/updatescoperequest.md rename to docs/pkg/models/shared/updatescoperequest.md diff --git a/docs/models/operations/resetconnectorrequest.md b/docs/pkg/models/shared/updatescoperesponse.md similarity index 65% rename from docs/models/operations/resetconnectorrequest.md rename to docs/pkg/models/shared/updatescoperesponse.md index 3b7f11c..0cf5828 100755 --- a/docs/models/operations/resetconnectorrequest.md +++ b/docs/pkg/models/shared/updatescoperesponse.md @@ -1,8 +1,8 @@ -# ResetConnectorRequest +# UpdateScopeResponse ## Fields | Field | Type | Required | Description | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `Connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | \ No newline at end of file +| `Data` | [*shared.Scope](../../../pkg/models/shared/scope.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/user.md b/docs/pkg/models/shared/user.md similarity index 100% rename from docs/models/shared/user.md rename to docs/pkg/models/shared/user.md diff --git a/docs/models/shared/vars.md b/docs/pkg/models/shared/vars.md similarity index 100% rename from docs/models/shared/vars.md rename to docs/pkg/models/shared/vars.md diff --git a/docs/models/shared/volume.md b/docs/pkg/models/shared/volume.md similarity index 100% rename from docs/models/shared/volume.md rename to docs/pkg/models/shared/volume.md diff --git a/docs/models/shared/wallet.md b/docs/pkg/models/shared/wallet.md similarity index 100% rename from docs/models/shared/wallet.md rename to docs/pkg/models/shared/wallet.md diff --git a/docs/pkg/models/shared/walletserrorresponse.md b/docs/pkg/models/shared/walletserrorresponse.md new file mode 100755 index 0000000..8ac29aa --- /dev/null +++ b/docs/pkg/models/shared/walletserrorresponse.md @@ -0,0 +1,9 @@ +# WalletsErrorResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `ErrorCode` | [shared.WalletsErrorResponseErrorCode](../../../pkg/models/shared/walletserrorresponseerrorcode.md) | :heavy_check_mark: | N/A | +| `ErrorMessage` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/walletserrorresponseerrorcode.md b/docs/pkg/models/shared/walletserrorresponseerrorcode.md similarity index 100% rename from docs/models/shared/walletserrorresponseerrorcode.md rename to docs/pkg/models/shared/walletserrorresponseerrorcode.md diff --git a/docs/pkg/models/shared/walletstransaction.md b/docs/pkg/models/shared/walletstransaction.md new file mode 100755 index 0000000..ea8f465 --- /dev/null +++ b/docs/pkg/models/shared/walletstransaction.md @@ -0,0 +1,14 @@ +# WalletsTransaction + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | Metadata associated with the wallet. | | +| `PostCommitVolumes` | map[string]map[string][shared.WalletsVolume](../../../pkg/models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | +| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][shared.WalletsVolume](../../../pkg/models/shared/walletsvolume.md) | :heavy_minus_sign: | N/A | | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/walletsubject.md b/docs/pkg/models/shared/walletsubject.md similarity index 100% rename from docs/models/shared/walletsubject.md rename to docs/pkg/models/shared/walletsubject.md diff --git a/docs/models/shared/walletsvolume.md b/docs/pkg/models/shared/walletsvolume.md similarity index 100% rename from docs/models/shared/walletsvolume.md rename to docs/pkg/models/shared/walletsvolume.md diff --git a/docs/pkg/models/shared/walletwithbalances.md b/docs/pkg/models/shared/walletwithbalances.md new file mode 100755 index 0000000..d0a9b93 --- /dev/null +++ b/docs/pkg/models/shared/walletwithbalances.md @@ -0,0 +1,13 @@ +# WalletWithBalances + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Balances` | [shared.Balances](../../../pkg/models/shared/balances.md) | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | The unique ID of the wallet. | +| `Ledger` | *string* | :heavy_check_mark: | N/A | +| `Metadata` | map[string]*interface{}* | :heavy_check_mark: | Metadata associated with the wallet. | +| `Name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/webhooksconfig.md b/docs/pkg/models/shared/webhooksconfig.md similarity index 100% rename from docs/models/shared/webhooksconfig.md rename to docs/pkg/models/shared/webhooksconfig.md diff --git a/docs/models/shared/wiseconfig.md b/docs/pkg/models/shared/wiseconfig.md similarity index 100% rename from docs/models/shared/wiseconfig.md rename to docs/pkg/models/shared/wiseconfig.md diff --git a/docs/pkg/models/shared/workflow.md b/docs/pkg/models/shared/workflow.md new file mode 100755 index 0000000..fb9fb4b --- /dev/null +++ b/docs/pkg/models/shared/workflow.md @@ -0,0 +1,11 @@ +# Workflow + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `Config` | [shared.WorkflowConfig](../../../pkg/models/shared/workflowconfig.md) | :heavy_check_mark: | N/A | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/workflowconfig.md b/docs/pkg/models/shared/workflowconfig.md similarity index 100% rename from docs/models/shared/workflowconfig.md rename to docs/pkg/models/shared/workflowconfig.md diff --git a/docs/pkg/models/shared/workflowoccurrence.md b/docs/pkg/models/shared/workflowoccurrence.md new file mode 100755 index 0000000..71aba94 --- /dev/null +++ b/docs/pkg/models/shared/workflowoccurrence.md @@ -0,0 +1,12 @@ +# WorkflowOccurrence + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `CreatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `ID` | *string* | :heavy_check_mark: | N/A | +| `Statuses` | [][shared.StageStatus](../../../pkg/models/shared/stagestatus.md) | :heavy_check_mark: | N/A | +| `UpdatedAt` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | +| `WorkflowID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 4690f3f..df68279 100755 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -1,5 +1,5 @@ # Accounts -(*.Accounts*) +(*Accounts*) ## Overview @@ -67,8 +67,10 @@ func main() { ### Response -**[*operations.AddMetadataToAccountResponse](../../models/operations/addmetadatatoaccountresponse.md), error** - +**[*operations.AddMetadataToAccountResponse](../../pkg/models/operations/addmetadatatoaccountresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CountAccounts @@ -118,13 +120,15 @@ func main() { | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | -| `metadata` | [*operations.Metadata](../../models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.Metadata](../../../pkg/models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | ### Response -**[*operations.CountAccountsResponse](../../models/operations/countaccountsresponse.md), error** - +**[*operations.CountAccountsResponse](../../pkg/models/operations/countaccountsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetAccount @@ -175,8 +179,10 @@ func main() { ### Response -**[*operations.GetAccountResponse](../../models/operations/getaccountresponse.md), error** - +**[*operations.GetAccountResponse](../../pkg/models/operations/getaccountresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListAccounts @@ -224,13 +230,15 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [operations.ListAccountsRequest](../../models/operations/listaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.ListAccountsRequest](../../pkg/models/operations/listaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.ListAccountsResponse](../../models/operations/listaccountsresponse.md), error** - +**[*operations.ListAccountsResponse](../../pkg/models/operations/listaccountsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index 027c48a..74a9a91 100755 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -1,5 +1,5 @@ # Balances -(*.Balances*) +(*Balances*) ## Overview @@ -52,16 +52,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [operations.GetBalancesRequest](../../models/operations/getbalancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.GetBalancesRequest](../../pkg/models/operations/getbalancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.GetBalancesResponse](../../models/operations/getbalancesresponse.md), error** - +**[*operations.GetBalancesResponse](../../pkg/models/operations/getbalancesresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetBalancesAggregated @@ -112,5 +114,7 @@ func main() { ### Response -**[*operations.GetBalancesAggregatedResponse](../../models/operations/getbalancesaggregatedresponse.md), error** - +**[*operations.GetBalancesAggregatedResponse](../../pkg/models/operations/getbalancesaggregatedresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 2147fd0..3622a72 100755 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -1,5 +1,5 @@ # Clients -(*.Clients*) +(*Clients*) ## Overview @@ -66,8 +66,10 @@ func main() { ### Response -**[*operations.AddScopeToClientResponse](../../models/operations/addscopetoclientresponse.md), error** - +**[*operations.AddScopeToClientResponse](../../pkg/models/operations/addscopetoclientresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CreateClient @@ -115,16 +117,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [shared.CreateClientRequest](../../models/shared/createclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateClientRequest](../../pkg/models/shared/createclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.CreateClientResponse](../../models/operations/createclientresponse.md), error** - +**[*operations.CreateClientResponse](../../pkg/models/operations/createclientresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CreateSecret @@ -171,17 +175,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `clientID` | *string* | :heavy_check_mark: | Client ID | -| `createSecretRequest` | [*shared.CreateSecretRequest](../../models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `createSecretRequest` | [*shared.CreateSecretRequest](../../../pkg/models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.CreateSecretResponse](../../models/operations/createsecretresponse.md), error** - +**[*operations.CreateSecretResponse](../../pkg/models/operations/createsecretresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DeleteClient @@ -229,8 +235,10 @@ func main() { ### Response -**[*operations.DeleteClientResponse](../../models/operations/deleteclientresponse.md), error** - +**[*operations.DeleteClientResponse](../../pkg/models/operations/deleteclientresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DeleteScopeFromClient @@ -281,8 +289,10 @@ func main() { ### Response -**[*operations.DeleteScopeFromClientResponse](../../models/operations/deletescopefromclientresponse.md), error** - +**[*operations.DeleteScopeFromClientResponse](../../pkg/models/operations/deletescopefromclientresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DeleteSecret @@ -333,8 +343,10 @@ func main() { ### Response -**[*operations.DeleteSecretResponse](../../models/operations/deletesecretresponse.md), error** - +**[*operations.DeleteSecretResponse](../../pkg/models/operations/deletesecretresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListClients @@ -378,8 +390,10 @@ func main() { ### Response -**[*operations.ListClientsResponse](../../models/operations/listclientsresponse.md), error** - +**[*operations.ListClientsResponse](../../pkg/models/operations/listclientsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ReadClient @@ -427,8 +441,10 @@ func main() { ### Response -**[*operations.ReadClientResponse](../../models/operations/readclientresponse.md), error** - +**[*operations.ReadClientResponse](../../pkg/models/operations/readclientresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## UpdateClient @@ -481,14 +497,16 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `clientID` | *string* | :heavy_check_mark: | Client ID | -| `updateClientRequest` | [*shared.UpdateClientRequest](../../models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `updateClientRequest` | [*shared.UpdateClientRequest](../../../pkg/models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.UpdateClientResponse](../../models/operations/updateclientresponse.md), error** - +**[*operations.UpdateClientResponse](../../pkg/models/operations/updateclientresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md index 014d023..26cec59 100755 --- a/docs/sdks/formance/README.md +++ b/docs/sdks/formance/README.md @@ -64,8 +64,10 @@ func main() { ### Response -**[*operations.GetServerInfoResponse](../../models/operations/getserverinforesponse.md), error** - +**[*operations.GetServerInfoResponse](../../pkg/models/operations/getserverinforesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## PaymentsgetServerInfo @@ -109,8 +111,10 @@ func main() { ### Response -**[*operations.PaymentsgetServerInfoResponse](../../models/operations/paymentsgetserverinforesponse.md), error** - +**[*operations.PaymentsgetServerInfoResponse](../../pkg/models/operations/paymentsgetserverinforesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## SearchgetServerInfo @@ -154,5 +158,7 @@ func main() { ### Response -**[*operations.SearchgetServerInfoResponse](../../models/operations/searchgetserverinforesponse.md), error** - +**[*operations.SearchgetServerInfoResponse](../../pkg/models/operations/searchgetserverinforesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index de5db01..0a4806c 100755 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -1,5 +1,5 @@ # Ledger -(*.Ledger*) +(*Ledger*) ## Overview @@ -55,5 +55,7 @@ func main() { ### Response -**[*operations.GetLedgerInfoResponse](../../models/operations/getledgerinforesponse.md), error** - +**[*operations.GetLedgerInfoResponse](../../pkg/models/operations/getledgerinforesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md index 669dd60..aef59b8 100755 --- a/docs/sdks/logs/README.md +++ b/docs/sdks/logs/README.md @@ -1,5 +1,5 @@ # Logs -(*.Logs*) +(*Logs*) ## Overview @@ -50,13 +50,15 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [operations.ListLogsRequest](../../models/operations/listlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.ListLogsRequest](../../pkg/models/operations/listlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.ListLogsResponse](../../models/operations/listlogsresponse.md), error** - +**[*operations.ListLogsResponse](../../pkg/models/operations/listlogsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md index 7af367b..89417c5 100755 --- a/docs/sdks/mapping/README.md +++ b/docs/sdks/mapping/README.md @@ -1,5 +1,5 @@ # Mapping -(*.Mapping*) +(*Mapping*) ## Overview @@ -56,8 +56,10 @@ func main() { ### Response -**[*operations.GetMappingResponse](../../models/operations/getmappingresponse.md), error** - +**[*operations.GetMappingResponse](../../pkg/models/operations/getmappingresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## UpdateMapping @@ -106,14 +108,16 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `mapping` | [shared.Mapping](../../models/shared/mapping.md) | :heavy_check_mark: | N/A | | -| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `mapping` | [shared.Mapping](../../../pkg/models/shared/mapping.md) | :heavy_check_mark: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | ### Response -**[*operations.UpdateMappingResponse](../../models/operations/updatemappingresponse.md), error** - +**[*operations.UpdateMappingResponse](../../pkg/models/operations/updatemappingresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 847fab3..854e5b1 100755 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -1,5 +1,5 @@ # Orchestration -(*.Orchestration*) +(*Orchestration*) ## Overview @@ -56,16 +56,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [shared.CreateWorkflowRequest](../../models/shared/createworkflowrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateWorkflowRequest](../../pkg/models/shared/createworkflowrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.CreateWorkflowResponse](../../models/operations/createworkflowresponse.md), error** - +**[*operations.CreateWorkflowResponse](../../pkg/models/operations/createworkflowresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetFlow @@ -113,8 +115,10 @@ func main() { ### Response -**[*operations.GetFlowResponse](../../models/operations/getflowresponse.md), error** - +**[*operations.GetFlowResponse](../../pkg/models/operations/getflowresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetWorkflowOccurrence @@ -165,8 +169,10 @@ func main() { ### Response -**[*operations.GetWorkflowOccurrenceResponse](../../models/operations/getworkflowoccurrenceresponse.md), error** - +**[*operations.GetWorkflowOccurrenceResponse](../../pkg/models/operations/getworkflowoccurrenceresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListFlows @@ -210,8 +216,10 @@ func main() { ### Response -**[*operations.ListFlowsResponse](../../models/operations/listflowsresponse.md), error** - +**[*operations.ListFlowsResponse](../../pkg/models/operations/listflowsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListRuns @@ -259,8 +267,10 @@ func main() { ### Response -**[*operations.ListRunsResponse](../../models/operations/listrunsresponse.md), error** - +**[*operations.ListRunsResponse](../../pkg/models/operations/listrunsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## OrchestrationgetServerInfo @@ -304,8 +314,10 @@ func main() { ### Response -**[*operations.OrchestrationgetServerInfoResponse](../../models/operations/orchestrationgetserverinforesponse.md), error** - +**[*operations.OrchestrationgetServerInfoResponse](../../pkg/models/operations/orchestrationgetserverinforesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## RunWorkflow @@ -361,5 +373,7 @@ func main() { ### Response -**[*operations.RunWorkflowResponse](../../models/operations/runworkflowresponse.md), error** - +**[*operations.RunWorkflowResponse](../../pkg/models/operations/runworkflowresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 87c610a..74ba676 100755 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -1,5 +1,5 @@ # Payments -(*.Payments*) +(*Payments*) ## Overview @@ -60,16 +60,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [shared.StripeTransferRequest](../../models/shared/stripetransferrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.StripeTransferRequest](../../pkg/models/shared/stripetransferrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.ConnectorsStripeTransferResponse](../../models/operations/connectorsstripetransferresponse.md), error** - +**[*operations.ConnectorsStripeTransferResponse](../../pkg/models/operations/connectorsstripetransferresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetConnectorTask @@ -111,17 +113,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | -| `taskID` | *string* | :heavy_check_mark: | The task ID. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| `taskID` | *string* | :heavy_check_mark: | The task ID. | ### Response -**[*operations.GetConnectorTaskResponse](../../models/operations/getconnectortaskresponse.md), error** - +**[*operations.GetConnectorTaskResponse](../../pkg/models/operations/getconnectortaskresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetPayment @@ -169,8 +173,10 @@ func main() { ### Response -**[*operations.GetPaymentResponse](../../models/operations/getpaymentresponse.md), error** - +**[*operations.GetPaymentResponse](../../pkg/models/operations/getpaymentresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## InstallConnector @@ -218,17 +224,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connectorConfig` | [shared.ConnectorConfig](../../models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | -| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connectorConfig` | [shared.ConnectorConfig](../../../pkg/models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | +| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response -**[*operations.InstallConnectorResponse](../../models/operations/installconnectorresponse.md), error** - +**[*operations.InstallConnectorResponse](../../pkg/models/operations/installconnectorresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListAllConnectors @@ -272,8 +280,10 @@ func main() { ### Response -**[*operations.ListAllConnectorsResponse](../../models/operations/listallconnectorsresponse.md), error** - +**[*operations.ListAllConnectorsResponse](../../pkg/models/operations/listallconnectorsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListConfigsAvailableConnectors @@ -317,8 +327,10 @@ func main() { ### Response -**[*operations.ListConfigsAvailableConnectorsResponse](../../models/operations/listconfigsavailableconnectorsresponse.md), error** - +**[*operations.ListConfigsAvailableConnectorsResponse](../../pkg/models/operations/listconfigsavailableconnectorsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListConnectorTasks @@ -365,15 +377,17 @@ func main() { | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | +| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | ### Response -**[*operations.ListConnectorTasksResponse](../../models/operations/listconnectortasksresponse.md), error** - +**[*operations.ListConnectorTasksResponse](../../pkg/models/operations/listconnectortasksresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListPayments @@ -429,8 +443,10 @@ func main() { ### Response -**[*operations.ListPaymentsResponse](../../models/operations/listpaymentsresponse.md), error** - +**[*operations.ListPaymentsResponse](../../pkg/models/operations/listpaymentsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## PaymentslistAccounts @@ -486,8 +502,10 @@ func main() { ### Response -**[*operations.PaymentslistAccountsResponse](../../models/operations/paymentslistaccountsresponse.md), error** - +**[*operations.PaymentslistAccountsResponse](../../pkg/models/operations/paymentslistaccountsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ReadConnectorConfig @@ -527,16 +545,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response -**[*operations.ReadConnectorConfigResponse](../../models/operations/readconnectorconfigresponse.md), error** - +**[*operations.ReadConnectorConfigResponse](../../pkg/models/operations/readconnectorconfigresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ResetConnector @@ -578,16 +598,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response -**[*operations.ResetConnectorResponse](../../models/operations/resetconnectorresponse.md), error** - +**[*operations.ResetConnectorResponse](../../pkg/models/operations/resetconnectorresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## UninstallConnector @@ -627,13 +649,15 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response -**[*operations.UninstallConnectorResponse](../../models/operations/uninstallconnectorresponse.md), error** - +**[*operations.UninstallConnectorResponse](../../pkg/models/operations/uninstallconnectorresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index ea12e70..eba5cfd 100755 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -1,5 +1,5 @@ # Scopes -(*.Scopes*) +(*Scopes*) ## Overview @@ -64,8 +64,10 @@ func main() { ### Response -**[*operations.AddTransientScopeResponse](../../models/operations/addtransientscoperesponse.md), error** - +**[*operations.AddTransientScopeResponse](../../pkg/models/operations/addtransientscoperesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CreateScope @@ -107,16 +109,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [shared.CreateScopeRequest](../../models/shared/createscoperequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateScopeRequest](../../pkg/models/shared/createscoperequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.CreateScopeResponse](../../models/operations/createscoperesponse.md), error** - +**[*operations.CreateScopeResponse](../../pkg/models/operations/createscoperesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DeleteScope @@ -164,8 +168,10 @@ func main() { ### Response -**[*operations.DeleteScopeResponse](../../models/operations/deletescoperesponse.md), error** - +**[*operations.DeleteScopeResponse](../../pkg/models/operations/deletescoperesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DeleteTransientScope @@ -216,8 +222,10 @@ func main() { ### Response -**[*operations.DeleteTransientScopeResponse](../../models/operations/deletetransientscoperesponse.md), error** - +**[*operations.DeleteTransientScopeResponse](../../pkg/models/operations/deletetransientscoperesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListScopes @@ -261,8 +269,10 @@ func main() { ### Response -**[*operations.ListScopesResponse](../../models/operations/listscopesresponse.md), error** - +**[*operations.ListScopesResponse](../../pkg/models/operations/listscopesresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ReadScope @@ -310,8 +320,10 @@ func main() { ### Response -**[*operations.ReadScopeResponse](../../models/operations/readscoperesponse.md), error** - +**[*operations.ReadScopeResponse](../../pkg/models/operations/readscoperesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## UpdateScope @@ -358,14 +370,16 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `scopeID` | *string* | :heavy_check_mark: | Scope ID | -| `updateScopeRequest` | [*shared.UpdateScopeRequest](../../models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | +| `updateScopeRequest` | [*shared.UpdateScopeRequest](../../../pkg/models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.UpdateScopeResponse](../../models/operations/updatescoperesponse.md), error** - +**[*operations.UpdateScopeResponse](../../pkg/models/operations/updatescoperesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index 7429ba0..e1df308 100755 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -1,5 +1,5 @@ # Script -(*.Script*) +(*Script*) ## Overview @@ -72,12 +72,14 @@ func main() { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `script` | [shared.Script](../../models/shared/script.md) | :heavy_check_mark: | N/A | | +| `script` | [shared.Script](../../../pkg/models/shared/script.md) | :heavy_check_mark: | N/A | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | ### Response -**[*operations.RunScriptResponse](../../models/operations/runscriptresponse.md), error** - +**[*operations.RunScriptResponse](../../pkg/models/operations/runscriptresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index ca5769e..4fb0d8a 100755 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -1,5 +1,5 @@ # Search -(*.Search*) +(*Search*) ## Overview @@ -101,10 +101,12 @@ func main() { | Parameter | Type | Required | Description | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [shared.Query](../../models/shared/query.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [shared.Query](../../pkg/models/shared/query.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.SearchResponse](../../models/operations/searchresponse.md), error** - +**[*operations.SearchResponse](../../pkg/models/operations/searchresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 8747c46..840b915 100755 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -1,5 +1,5 @@ # Server -(*.Server*) +(*Server*) ## Overview @@ -51,5 +51,7 @@ func main() { ### Response -**[*operations.GetInfoResponse](../../models/operations/getinforesponse.md), error** - +**[*operations.GetInfoResponse](../../pkg/models/operations/getinforesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index 5a75d28..d23e634 100755 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -1,5 +1,5 @@ # Stats -(*.Stats*) +(*Stats*) ## Overview @@ -56,5 +56,7 @@ func main() { ### Response -**[*operations.ReadStatsResponse](../../models/operations/readstatsresponse.md), error** - +**[*operations.ReadStatsResponse](../../pkg/models/operations/readstatsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index b838f7f..50beb91 100755 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -1,5 +1,5 @@ # Transactions -(*.Transactions*) +(*Transactions*) ## Overview @@ -73,17 +73,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `transactions` | [shared.Transactions](../../models/shared/transactions.md) | :heavy_check_mark: | N/A | | -| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `transactions` | [shared.Transactions](../../../pkg/models/shared/transactions.md) | :heavy_check_mark: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | ### Response -**[*operations.CreateTransactionsResponse](../../models/operations/createtransactionsresponse.md), error** - +**[*operations.CreateTransactionsResponse](../../pkg/models/operations/createtransactionsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## AddMetadataOnTransaction @@ -140,8 +142,10 @@ func main() { ### Response -**[*operations.AddMetadataOnTransactionResponse](../../models/operations/addmetadataontransactionresponse.md), error** - +**[*operations.AddMetadataOnTransactionResponse](../../pkg/models/operations/addmetadataontransactionresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CountTransactions @@ -186,16 +190,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [operations.CountTransactionsRequest](../../models/operations/counttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.CountTransactionsRequest](../../pkg/models/operations/counttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.CountTransactionsResponse](../../models/operations/counttransactionsresponse.md), error** - +**[*operations.CountTransactionsResponse](../../pkg/models/operations/counttransactionsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CreateTransaction @@ -221,8 +227,8 @@ func main() { postTransaction := shared.PostTransaction{ Metadata: map[string]interface{}{ - "a": "string", "admin": "string", + "a": "string", }, Postings: []shared.Posting{ shared.Posting{ @@ -267,15 +273,17 @@ func main() { | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `postTransaction` | [shared.PostTransaction](../../models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | +| `postTransaction` | [shared.PostTransaction](../../../pkg/models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | ### Response -**[*operations.CreateTransactionResponse](../../models/operations/createtransactionresponse.md), error** - +**[*operations.CreateTransactionResponse](../../pkg/models/operations/createtransactionresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetTransaction @@ -326,8 +334,10 @@ func main() { ### Response -**[*operations.GetTransactionResponse](../../models/operations/gettransactionresponse.md), error** - +**[*operations.GetTransactionResponse](../../pkg/models/operations/gettransactionresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListTransactions @@ -375,16 +385,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [operations.ListTransactionsRequest](../../models/operations/listtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.ListTransactionsRequest](../../pkg/models/operations/listtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.ListTransactionsResponse](../../models/operations/listtransactionsresponse.md), error** - +**[*operations.ListTransactionsResponse](../../pkg/models/operations/listtransactionsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## RevertTransaction @@ -435,5 +447,7 @@ func main() { ### Response -**[*operations.RevertTransactionResponse](../../models/operations/reverttransactionresponse.md), error** - +**[*operations.RevertTransactionResponse](../../pkg/models/operations/reverttransactionresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 5a77b0a..b887ee4 100755 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -1,5 +1,5 @@ # Users -(*.Users*) +(*Users*) ## Overview @@ -52,8 +52,10 @@ func main() { ### Response -**[*operations.ListUsersResponse](../../models/operations/listusersresponse.md), error** - +**[*operations.ListUsersResponse](../../pkg/models/operations/listusersresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ReadUser @@ -101,5 +103,7 @@ func main() { ### Response -**[*operations.ReadUserResponse](../../models/operations/readuserresponse.md), error** - +**[*operations.ReadUserResponse](../../pkg/models/operations/readuserresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index cf0c586..ac63665 100755 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -1,5 +1,5 @@ # Wallets -(*.Wallets*) +(*Wallets*) ## Overview @@ -66,17 +66,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `holdID` | *string* | :heavy_check_mark: | N/A | -| `confirmHoldRequest` | [*shared.ConfirmHoldRequest](../../models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `holdID` | *string* | :heavy_check_mark: | N/A | +| `confirmHoldRequest` | [*shared.ConfirmHoldRequest](../../../pkg/models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.ConfirmHoldResponse](../../models/operations/confirmholdresponse.md), error** - +**[*operations.ConfirmHoldResponse](../../pkg/models/operations/confirmholdresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CreateBalance @@ -120,17 +122,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `createBalanceRequest` | [*shared.CreateBalanceRequest](../../models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `createBalanceRequest` | [*shared.CreateBalanceRequest](../../../pkg/models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.CreateBalanceResponse](../../models/operations/createbalanceresponse.md), error** - +**[*operations.CreateBalanceResponse](../../pkg/models/operations/createbalanceresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CreateWallet @@ -172,16 +176,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [shared.CreateWalletRequest](../../models/shared/createwalletrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.CreateWalletRequest](../../pkg/models/shared/createwalletrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.CreateWalletResponse](../../models/operations/createwalletresponse.md), error** - +**[*operations.CreateWalletResponse](../../pkg/models/operations/createwalletresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## CreditWallet @@ -239,17 +245,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `creditWalletRequest` | [*shared.CreditWalletRequest](../../models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `creditWalletRequest` | [*shared.CreditWalletRequest](../../../pkg/models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.CreditWalletResponse](../../models/operations/creditwalletresponse.md), error** - +**[*operations.CreditWalletResponse](../../pkg/models/operations/creditwalletresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DebitWallet @@ -308,17 +316,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `debitWalletRequest` | [*shared.DebitWalletRequest](../../models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `debitWalletRequest` | [*shared.DebitWalletRequest](../../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.DebitWalletResponse](../../models/operations/debitwalletresponse.md), error** - +**[*operations.DebitWalletResponse](../../pkg/models/operations/debitwalletresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetBalance @@ -369,8 +379,10 @@ func main() { ### Response -**[*operations.GetBalanceResponse](../../models/operations/getbalanceresponse.md), error** - +**[*operations.GetBalanceResponse](../../pkg/models/operations/getbalanceresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetHold @@ -418,8 +430,10 @@ func main() { ### Response -**[*operations.GetHoldResponse](../../models/operations/getholdresponse.md), error** - +**[*operations.GetHoldResponse](../../pkg/models/operations/getholdresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetHolds @@ -470,15 +484,17 @@ func main() { | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `metadata` | [*operations.GetHoldsQueryParamMetadata](../../models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.GetHoldsQueryParamMetadata](../../../pkg/models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | | `walletID` | **string* | :heavy_minus_sign: | The wallet to filter on | | ### Response -**[*operations.GetHoldsResponse](../../models/operations/getholdsresponse.md), error** - +**[*operations.GetHoldsResponse](../../pkg/models/operations/getholdsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetTransactions @@ -530,8 +546,10 @@ func main() { ### Response -**[*operations.GetTransactionsResponse](../../models/operations/gettransactionsresponse.md), error** - +**[*operations.GetTransactionsResponse](../../pkg/models/operations/gettransactionsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetWallet @@ -579,8 +597,10 @@ func main() { ### Response -**[*operations.GetWalletResponse](../../models/operations/getwalletresponse.md), error** - +**[*operations.GetWalletResponse](../../pkg/models/operations/getwalletresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListBalances @@ -628,8 +648,10 @@ func main() { ### Response -**[*operations.ListBalancesResponse](../../models/operations/listbalancesresponse.md), error** - +**[*operations.ListBalancesResponse](../../pkg/models/operations/listbalancesresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ListWallets @@ -680,15 +702,17 @@ func main() { | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `metadata` | [*operations.ListWalletsQueryParamMetadata](../../models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.ListWalletsQueryParamMetadata](../../../pkg/models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `name` | **string* | :heavy_minus_sign: | Filter on wallet name | | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | ### Response -**[*operations.ListWalletsResponse](../../models/operations/listwalletsresponse.md), error** - +**[*operations.ListWalletsResponse](../../pkg/models/operations/listwalletsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## UpdateWallet @@ -735,17 +759,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [*operations.UpdateWalletRequestBody](../../models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [*operations.UpdateWalletRequestBody](../../../pkg/models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | ### Response -**[*operations.UpdateWalletResponse](../../models/operations/updatewalletresponse.md), error** - +**[*operations.UpdateWalletResponse](../../pkg/models/operations/updatewalletresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## VoidHold @@ -793,8 +819,10 @@ func main() { ### Response -**[*operations.VoidHoldResponse](../../models/operations/voidholdresponse.md), error** - +**[*operations.VoidHoldResponse](../../pkg/models/operations/voidholdresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## WalletsgetServerInfo @@ -838,5 +866,7 @@ func main() { ### Response -**[*operations.WalletsgetServerInfoResponse](../../models/operations/walletsgetserverinforesponse.md), error** - +**[*operations.WalletsgetServerInfoResponse](../../pkg/models/operations/walletsgetserverinforesponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index ea1e024..d6d1cf3 100755 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -1,5 +1,5 @@ # Webhooks -(*.Webhooks*) +(*Webhooks*) ## Overview @@ -61,8 +61,10 @@ func main() { ### Response -**[*operations.ActivateConfigResponse](../../models/operations/activateconfigresponse.md), error** - +**[*operations.ActivateConfigResponse](../../pkg/models/operations/activateconfigresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## ChangeConfigSecret @@ -110,17 +112,19 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | -| `configChangeSecret` | [*shared.ConfigChangeSecret](../../models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | +| `configChangeSecret` | [*shared.ConfigChangeSecret](../../../pkg/models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | ### Response -**[*operations.ChangeConfigSecretResponse](../../models/operations/changeconfigsecretresponse.md), error** - +**[*operations.ChangeConfigSecretResponse](../../pkg/models/operations/changeconfigsecretresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DeactivateConfig @@ -168,8 +172,10 @@ func main() { ### Response -**[*operations.DeactivateConfigResponse](../../models/operations/deactivateconfigresponse.md), error** - +**[*operations.DeactivateConfigResponse](../../pkg/models/operations/deactivateconfigresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## DeleteConfig @@ -217,8 +223,10 @@ func main() { ### Response -**[*operations.DeleteConfigResponse](../../models/operations/deleteconfigresponse.md), error** - +**[*operations.DeleteConfigResponse](../../pkg/models/operations/deleteconfigresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## GetManyConfigs @@ -269,8 +277,10 @@ func main() { ### Response -**[*operations.GetManyConfigsResponse](../../models/operations/getmanyconfigsresponse.md), error** - +**[*operations.GetManyConfigsResponse](../../pkg/models/operations/getmanyconfigsresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## InsertConfig @@ -323,16 +333,18 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [shared.ConfigUser](../../models/shared/configuser.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [shared.ConfigUser](../../pkg/models/shared/configuser.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[*operations.InsertConfigResponse](../../models/operations/insertconfigresponse.md), error** - +**[*operations.InsertConfigResponse](../../pkg/models/operations/insertconfigresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | ## TestConfig @@ -380,5 +392,7 @@ func main() { ### Response -**[*operations.TestConfigResponse](../../models/operations/testconfigresponse.md), error** - +**[*operations.TestConfigResponse](../../pkg/models/operations/testconfigresponse.md), error** +| Error Object | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| sdkerrors.SDKError | 400-600 | */* | diff --git a/files.gen b/files.gen index 4a59f49..dd7049a 100755 --- a/files.gen +++ b/files.gen @@ -35,6 +35,9 @@ pkg/utils/requestbody.go pkg/utils/retries.go pkg/utils/security.go pkg/utils/utils.go +/pkg/models/operations/getserverinfo.go +/pkg/models/operations/paymentsgetserverinfo.go +/pkg/models/operations/searchgetserverinfo.go /pkg/models/operations/addscopetoclient.go /pkg/models/operations/createclient.go /pkg/models/operations/createsecret.go @@ -115,9 +118,7 @@ pkg/utils/utils.go /pkg/models/operations/getmanyconfigs.go /pkg/models/operations/insertconfig.go /pkg/models/operations/testconfig.go -/pkg/models/operations/getserverinfo.go -/pkg/models/operations/paymentsgetserverinfo.go -/pkg/models/operations/searchgetserverinfo.go +/pkg/models/shared/serverinfo.go /pkg/models/shared/createclientresponse.go /pkg/models/shared/client.go /pkg/models/shared/clientsecret.go @@ -183,7 +184,6 @@ pkg/utils/utils.go /pkg/models/shared/stagestatus.go /pkg/models/shared/listworkflowsresponse.go /pkg/models/shared/listrunsresponse.go -/pkg/models/shared/serverinfo.go /pkg/models/shared/runworkflowresponse.go /pkg/models/shared/stripetransferresponse.go /pkg/models/shared/stripetransferrequest.go @@ -255,352 +255,352 @@ pkg/utils/utils.go /pkg/models/shared/attempt.go /pkg/models/shared/security.go USAGE.md -docs/models/operations/addscopetoclientrequest.md -docs/models/operations/addscopetoclientresponse.md -docs/models/operations/createclientresponse.md -docs/models/operations/createsecretrequest.md -docs/models/operations/createsecretresponse.md -docs/models/operations/deleteclientrequest.md -docs/models/operations/deleteclientresponse.md -docs/models/operations/deletescopefromclientrequest.md -docs/models/operations/deletescopefromclientresponse.md -docs/models/operations/deletesecretrequest.md -docs/models/operations/deletesecretresponse.md -docs/models/operations/listclientsresponse.md -docs/models/operations/readclientrequest.md -docs/models/operations/readclientresponse.md -docs/models/operations/updateclientrequest.md -docs/models/operations/updateclientresponse.md -docs/models/operations/addtransientscoperequest.md -docs/models/operations/addtransientscoperesponse.md -docs/models/operations/createscoperesponse.md -docs/models/operations/deletescoperequest.md -docs/models/operations/deletescoperesponse.md -docs/models/operations/deletetransientscoperequest.md -docs/models/operations/deletetransientscoperesponse.md -docs/models/operations/listscopesresponse.md -docs/models/operations/readscoperequest.md -docs/models/operations/readscoperesponse.md -docs/models/operations/updatescoperequest.md -docs/models/operations/updatescoperesponse.md -docs/models/operations/listusersresponse.md -docs/models/operations/readuserrequest.md -docs/models/operations/readuserresponse.md -docs/models/operations/getinforesponse.md -docs/models/operations/getledgerinforequest.md -docs/models/operations/getledgerinforesponse.md -docs/models/operations/addmetadatatoaccountrequest.md -docs/models/operations/addmetadatatoaccountresponse.md -docs/models/operations/metadata.md -docs/models/operations/countaccountsrequest.md -docs/models/operations/countaccountsresponse.md -docs/models/operations/getaccountrequest.md -docs/models/operations/getaccountresponse.md -docs/models/operations/balanceoperator.md -docs/models/operations/queryparambalanceoperator.md -docs/models/operations/queryparammetadata.md -docs/models/operations/listaccountsrequest.md -docs/models/operations/listaccountsresponse.md -docs/models/operations/getbalancesrequest.md -docs/models/operations/getbalancesresponse.md -docs/models/operations/getbalancesaggregatedrequest.md -docs/models/operations/getbalancesaggregatedresponse.md -docs/models/operations/listlogsrequest.md -docs/models/operations/listlogsresponse.md -docs/models/operations/getmappingrequest.md -docs/models/operations/getmappingresponse.md -docs/models/operations/updatemappingrequest.md -docs/models/operations/updatemappingresponse.md -docs/models/operations/runscriptrequest.md -docs/models/operations/runscriptresponse.md -docs/models/operations/readstatsrequest.md -docs/models/operations/readstatsresponse.md -docs/models/operations/createtransactionsrequest.md -docs/models/operations/createtransactionsresponse.md -docs/models/operations/addmetadataontransactionrequest.md -docs/models/operations/addmetadataontransactionresponse.md -docs/models/operations/counttransactionsqueryparammetadata.md -docs/models/operations/counttransactionsrequest.md -docs/models/operations/counttransactionsresponse.md -docs/models/operations/createtransactionrequest.md -docs/models/operations/createtransactionresponse.md -docs/models/operations/gettransactionrequest.md -docs/models/operations/gettransactionresponse.md -docs/models/operations/listtransactionsqueryparammetadata.md -docs/models/operations/listtransactionsrequest.md -docs/models/operations/listtransactionsresponse.md -docs/models/operations/reverttransactionrequest.md -docs/models/operations/reverttransactionresponse.md -docs/models/operations/createworkflowresponse.md -docs/models/operations/getflowrequest.md -docs/models/operations/getflowresponse.md -docs/models/operations/getworkflowoccurrencerequest.md -docs/models/operations/getworkflowoccurrenceresponse.md -docs/models/operations/listflowsresponse.md -docs/models/operations/listrunsrequest.md -docs/models/operations/listrunsresponse.md -docs/models/operations/orchestrationgetserverinforesponse.md -docs/models/operations/runworkflowrequest.md -docs/models/operations/runworkflowresponse.md -docs/models/operations/connectorsstripetransferresponse.md -docs/models/operations/getconnectortaskrequest.md -docs/models/operations/getconnectortaskresponse.md -docs/models/operations/getpaymentrequest.md -docs/models/operations/getpaymentresponse.md -docs/models/operations/installconnectorrequest.md -docs/models/operations/installconnectorresponse.md -docs/models/operations/listallconnectorsresponse.md -docs/models/operations/listconfigsavailableconnectorsresponse.md -docs/models/operations/listconnectortasksrequest.md -docs/models/operations/listconnectortasksresponse.md -docs/models/operations/listpaymentsrequest.md -docs/models/operations/listpaymentsresponse.md -docs/models/operations/paymentslistaccountsrequest.md -docs/models/operations/paymentslistaccountsresponse.md -docs/models/operations/readconnectorconfigrequest.md -docs/models/operations/readconnectorconfigresponse.md -docs/models/operations/resetconnectorrequest.md -docs/models/operations/resetconnectorresponse.md -docs/models/operations/uninstallconnectorrequest.md -docs/models/operations/uninstallconnectorresponse.md -docs/models/operations/searchresponse.md -docs/models/operations/confirmholdrequest.md -docs/models/operations/confirmholdresponse.md -docs/models/operations/createbalancerequest.md -docs/models/operations/createbalanceresponse.md -docs/models/operations/createwalletresponse.md -docs/models/operations/creditwalletrequest.md -docs/models/operations/creditwalletresponse.md -docs/models/operations/debitwalletrequest.md -docs/models/operations/debitwalletresponse.md -docs/models/operations/getbalancerequest.md -docs/models/operations/getbalanceresponse.md -docs/models/operations/getholdrequest.md -docs/models/operations/getholdresponse.md -docs/models/operations/getholdsqueryparammetadata.md -docs/models/operations/getholdsrequest.md -docs/models/operations/getholdsresponse.md -docs/models/operations/gettransactionsrequest.md -docs/models/operations/gettransactionsresponse.md -docs/models/operations/getwalletrequest.md -docs/models/operations/getwalletresponse.md -docs/models/operations/listbalancesrequest.md -docs/models/operations/listbalancesresponse.md -docs/models/operations/listwalletsqueryparammetadata.md -docs/models/operations/listwalletsrequest.md -docs/models/operations/listwalletsresponse.md -docs/models/operations/updatewalletrequestbody.md -docs/models/operations/updatewalletrequest.md -docs/models/operations/updatewalletresponse.md -docs/models/operations/voidholdrequest.md -docs/models/operations/voidholdresponse.md -docs/models/operations/walletsgetserverinforesponse.md -docs/models/operations/activateconfigrequest.md -docs/models/operations/activateconfigresponse.md -docs/models/operations/changeconfigsecretrequest.md -docs/models/operations/changeconfigsecretresponse.md -docs/models/operations/deactivateconfigrequest.md -docs/models/operations/deactivateconfigresponse.md -docs/models/operations/deleteconfigrequest.md -docs/models/operations/deleteconfigresponse.md -docs/models/operations/getmanyconfigsrequest.md -docs/models/operations/getmanyconfigsresponse.md -docs/models/operations/insertconfigresponse.md -docs/models/operations/testconfigrequest.md -docs/models/operations/testconfigresponse.md -docs/models/operations/getserverinforesponse.md -docs/models/operations/paymentsgetserverinforesponse.md -docs/models/operations/searchgetserverinforesponse.md -docs/models/shared/createclientresponse.md -docs/models/shared/client.md -docs/models/shared/clientsecret.md -docs/models/shared/createclientrequest.md -docs/models/shared/createsecretresponse.md -docs/models/shared/secret.md -docs/models/shared/createsecretrequest.md -docs/models/shared/listclientsresponse.md -docs/models/shared/readclientresponse.md -docs/models/shared/updateclientresponse.md -docs/models/shared/updateclientrequest.md -docs/models/shared/createscoperesponse.md -docs/models/shared/scope.md -docs/models/shared/createscoperequest.md -docs/models/shared/listscopesresponse.md -docs/models/shared/readscoperesponse.md -docs/models/shared/updatescoperesponse.md -docs/models/shared/updatescoperequest.md -docs/models/shared/listusersresponse.md -docs/models/shared/user.md -docs/models/shared/readuserresponse.md -docs/models/shared/errorresponse.md -docs/models/shared/errorsenum.md -docs/models/shared/configinforesponse.md -docs/models/shared/configinfo.md -docs/models/shared/config.md -docs/models/shared/ledgerstorage.md -docs/models/shared/ledgerinforesponse.md -docs/models/shared/storage.md -docs/models/shared/ledgerinfo.md -docs/models/shared/state.md -docs/models/shared/migrationinfo.md -docs/models/shared/accountresponse.md -docs/models/shared/accountwithvolumesandbalancesmetadata.md -docs/models/shared/accountwithvolumesandbalances.md -docs/models/shared/accountscursorresponsecursor.md -docs/models/shared/accountscursorresponse.md -docs/models/shared/metadata.md -docs/models/shared/account.md -docs/models/shared/balancescursorresponsecursor.md -docs/models/shared/balancescursorresponse.md -docs/models/shared/aggregatebalancesresponse.md -docs/models/shared/logscursorresponsecursor.md -docs/models/shared/logscursorresponse.md -docs/models/shared/logdata.md -docs/models/shared/type.md -docs/models/shared/log.md -docs/models/shared/mappingresponse.md -docs/models/shared/mapping.md -docs/models/shared/expr.md -docs/models/shared/contract.md -docs/models/shared/scriptresponse.md -docs/models/shared/transaction.md -docs/models/shared/volume.md -docs/models/shared/posting.md -docs/models/shared/vars.md -docs/models/shared/script.md -docs/models/shared/statsresponse.md -docs/models/shared/stats.md -docs/models/shared/transactionsresponse.md -docs/models/shared/transactions.md -docs/models/shared/transactiondata.md -docs/models/shared/posttransactionvars.md -docs/models/shared/posttransactionscript.md -docs/models/shared/posttransaction.md -docs/models/shared/transactionresponse.md -docs/models/shared/transactionscursorresponsecursor.md -docs/models/shared/transactionscursorresponse.md -docs/models/shared/errorcode.md -docs/models/shared/error.md -docs/models/shared/createworkflowresponse.md -docs/models/shared/workflow.md -docs/models/shared/workflowconfig.md -docs/models/shared/createworkflowrequest.md -docs/models/shared/getworkflowresponse.md -docs/models/shared/getworkflowoccurrenceresponse.md -docs/models/shared/workflowoccurrence.md -docs/models/shared/stagestatus.md -docs/models/shared/listworkflowsresponse.md -docs/models/shared/listrunsresponsecursor.md -docs/models/shared/listrunsresponse.md -docs/models/shared/serverinfo.md -docs/models/shared/runworkflowresponse.md -docs/models/shared/stripetransferresponse.md -docs/models/shared/stripetransferrequestmetadata.md -docs/models/shared/stripetransferrequest.md -docs/models/shared/taskresponsedata.md -docs/models/shared/taskresponse.md -docs/models/shared/taskstripedescriptor.md -docs/models/shared/taskstripestate.md -docs/models/shared/taskstripe.md -docs/models/shared/paymentstatus.md -docs/models/shared/taskwisedescriptor.md -docs/models/shared/taskwisestate.md -docs/models/shared/taskwise.md -docs/models/shared/taskcurrencyclouddescriptor.md -docs/models/shared/taskcurrencycloudstate.md -docs/models/shared/taskcurrencycloud.md -docs/models/shared/taskdummypaydescriptor.md -docs/models/shared/taskdummypaystate.md -docs/models/shared/taskdummypay.md -docs/models/shared/taskmodulrdescriptor.md -docs/models/shared/taskmodulrstate.md -docs/models/shared/taskmodulr.md -docs/models/shared/descriptor.md -docs/models/shared/taskbankingcirclestate.md -docs/models/shared/taskbankingcircle.md -docs/models/shared/connector.md -docs/models/shared/paymentresponse.md -docs/models/shared/raw.md -docs/models/shared/scheme.md -docs/models/shared/paymenttype.md -docs/models/shared/payment.md -docs/models/shared/paymentmetadata.md -docs/models/shared/paymentmetadatachangelog.md -docs/models/shared/paymentadjustmentraw.md -docs/models/shared/paymentadjustment.md -docs/models/shared/connectorconfig.md -docs/models/shared/stripeconfig.md -docs/models/shared/dummypayconfig.md -docs/models/shared/wiseconfig.md -docs/models/shared/modulrconfig.md -docs/models/shared/currencycloudconfig.md -docs/models/shared/bankingcircleconfig.md -docs/models/shared/connectorsresponsedata.md -docs/models/shared/connectorsresponse.md -docs/models/shared/key.md -docs/models/shared/connectorsconfigsresponseconnector.md -docs/models/shared/data.md -docs/models/shared/connectorsconfigsresponse.md -docs/models/shared/taskscursordata.md -docs/models/shared/taskscursorcursor.md -docs/models/shared/taskscursor.md -docs/models/shared/paymentscursorcursor.md -docs/models/shared/paymentscursor.md -docs/models/shared/cursor.md -docs/models/shared/accountscursor.md -docs/models/shared/paymentsaccounttype.md -docs/models/shared/paymentsaccount.md -docs/models/shared/connectorconfigresponse.md -docs/models/shared/responseschemasdata.md -docs/models/shared/total.md -docs/models/shared/responsecursor.md -docs/models/shared/responsedata.md -docs/models/shared/response.md -docs/models/shared/query.md -docs/models/shared/walletserrorresponseerrorcode.md -docs/models/shared/walletserrorresponse.md -docs/models/shared/confirmholdrequest.md -docs/models/shared/createbalanceresponse.md -docs/models/shared/balance.md -docs/models/shared/createbalancerequest.md -docs/models/shared/createwalletresponse.md -docs/models/shared/wallet.md -docs/models/shared/createwalletrequest.md -docs/models/shared/creditwalletrequest.md -docs/models/shared/subject.md -docs/models/shared/ledgeraccountsubject.md -docs/models/shared/walletsubject.md -docs/models/shared/monetary.md -docs/models/shared/debitwalletresponse.md -docs/models/shared/hold.md -docs/models/shared/debitwalletrequest.md -docs/models/shared/getbalanceresponse.md -docs/models/shared/balancewithassets.md -docs/models/shared/getholdresponse.md -docs/models/shared/expandeddebithold.md -docs/models/shared/getholdsresponsecursor.md -docs/models/shared/getholdsresponse.md -docs/models/shared/gettransactionsresponsecursor.md -docs/models/shared/gettransactionsresponse.md -docs/models/shared/walletstransaction.md -docs/models/shared/walletsvolume.md -docs/models/shared/getwalletresponse.md -docs/models/shared/balances.md -docs/models/shared/walletwithbalances.md -docs/models/shared/assetholder.md -docs/models/shared/listbalancesresponsecursor.md -docs/models/shared/listbalancesresponse.md -docs/models/shared/listwalletsresponsecursor.md -docs/models/shared/listwalletsresponse.md -docs/models/shared/configresponse.md -docs/models/shared/webhooksconfig.md -docs/models/shared/configchangesecret.md -docs/models/shared/configsresponsecursor.md -docs/models/shared/configsresponse.md -docs/models/shared/configuser.md -docs/models/shared/attemptresponse.md -docs/models/shared/attempt.md -docs/models/shared/security.md +docs/pkg/models/operations/getserverinforesponse.md +docs/pkg/models/operations/paymentsgetserverinforesponse.md +docs/pkg/models/operations/searchgetserverinforesponse.md +docs/pkg/models/operations/addscopetoclientrequest.md +docs/pkg/models/operations/addscopetoclientresponse.md +docs/pkg/models/operations/createclientresponse.md +docs/pkg/models/operations/createsecretrequest.md +docs/pkg/models/operations/createsecretresponse.md +docs/pkg/models/operations/deleteclientrequest.md +docs/pkg/models/operations/deleteclientresponse.md +docs/pkg/models/operations/deletescopefromclientrequest.md +docs/pkg/models/operations/deletescopefromclientresponse.md +docs/pkg/models/operations/deletesecretrequest.md +docs/pkg/models/operations/deletesecretresponse.md +docs/pkg/models/operations/listclientsresponse.md +docs/pkg/models/operations/readclientrequest.md +docs/pkg/models/operations/readclientresponse.md +docs/pkg/models/operations/updateclientrequest.md +docs/pkg/models/operations/updateclientresponse.md +docs/pkg/models/operations/addtransientscoperequest.md +docs/pkg/models/operations/addtransientscoperesponse.md +docs/pkg/models/operations/createscoperesponse.md +docs/pkg/models/operations/deletescoperequest.md +docs/pkg/models/operations/deletescoperesponse.md +docs/pkg/models/operations/deletetransientscoperequest.md +docs/pkg/models/operations/deletetransientscoperesponse.md +docs/pkg/models/operations/listscopesresponse.md +docs/pkg/models/operations/readscoperequest.md +docs/pkg/models/operations/readscoperesponse.md +docs/pkg/models/operations/updatescoperequest.md +docs/pkg/models/operations/updatescoperesponse.md +docs/pkg/models/operations/listusersresponse.md +docs/pkg/models/operations/readuserrequest.md +docs/pkg/models/operations/readuserresponse.md +docs/pkg/models/operations/getinforesponse.md +docs/pkg/models/operations/getledgerinforequest.md +docs/pkg/models/operations/getledgerinforesponse.md +docs/pkg/models/operations/addmetadatatoaccountrequest.md +docs/pkg/models/operations/addmetadatatoaccountresponse.md +docs/pkg/models/operations/metadata.md +docs/pkg/models/operations/countaccountsrequest.md +docs/pkg/models/operations/countaccountsresponse.md +docs/pkg/models/operations/getaccountrequest.md +docs/pkg/models/operations/getaccountresponse.md +docs/pkg/models/operations/balanceoperator.md +docs/pkg/models/operations/queryparambalanceoperator.md +docs/pkg/models/operations/queryparammetadata.md +docs/pkg/models/operations/listaccountsrequest.md +docs/pkg/models/operations/listaccountsresponse.md +docs/pkg/models/operations/getbalancesrequest.md +docs/pkg/models/operations/getbalancesresponse.md +docs/pkg/models/operations/getbalancesaggregatedrequest.md +docs/pkg/models/operations/getbalancesaggregatedresponse.md +docs/pkg/models/operations/listlogsrequest.md +docs/pkg/models/operations/listlogsresponse.md +docs/pkg/models/operations/getmappingrequest.md +docs/pkg/models/operations/getmappingresponse.md +docs/pkg/models/operations/updatemappingrequest.md +docs/pkg/models/operations/updatemappingresponse.md +docs/pkg/models/operations/runscriptrequest.md +docs/pkg/models/operations/runscriptresponse.md +docs/pkg/models/operations/readstatsrequest.md +docs/pkg/models/operations/readstatsresponse.md +docs/pkg/models/operations/createtransactionsrequest.md +docs/pkg/models/operations/createtransactionsresponse.md +docs/pkg/models/operations/addmetadataontransactionrequest.md +docs/pkg/models/operations/addmetadataontransactionresponse.md +docs/pkg/models/operations/counttransactionsqueryparammetadata.md +docs/pkg/models/operations/counttransactionsrequest.md +docs/pkg/models/operations/counttransactionsresponse.md +docs/pkg/models/operations/createtransactionrequest.md +docs/pkg/models/operations/createtransactionresponse.md +docs/pkg/models/operations/gettransactionrequest.md +docs/pkg/models/operations/gettransactionresponse.md +docs/pkg/models/operations/listtransactionsqueryparammetadata.md +docs/pkg/models/operations/listtransactionsrequest.md +docs/pkg/models/operations/listtransactionsresponse.md +docs/pkg/models/operations/reverttransactionrequest.md +docs/pkg/models/operations/reverttransactionresponse.md +docs/pkg/models/operations/createworkflowresponse.md +docs/pkg/models/operations/getflowrequest.md +docs/pkg/models/operations/getflowresponse.md +docs/pkg/models/operations/getworkflowoccurrencerequest.md +docs/pkg/models/operations/getworkflowoccurrenceresponse.md +docs/pkg/models/operations/listflowsresponse.md +docs/pkg/models/operations/listrunsrequest.md +docs/pkg/models/operations/listrunsresponse.md +docs/pkg/models/operations/orchestrationgetserverinforesponse.md +docs/pkg/models/operations/runworkflowrequest.md +docs/pkg/models/operations/runworkflowresponse.md +docs/pkg/models/operations/connectorsstripetransferresponse.md +docs/pkg/models/operations/getconnectortaskrequest.md +docs/pkg/models/operations/getconnectortaskresponse.md +docs/pkg/models/operations/getpaymentrequest.md +docs/pkg/models/operations/getpaymentresponse.md +docs/pkg/models/operations/installconnectorrequest.md +docs/pkg/models/operations/installconnectorresponse.md +docs/pkg/models/operations/listallconnectorsresponse.md +docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md +docs/pkg/models/operations/listconnectortasksrequest.md +docs/pkg/models/operations/listconnectortasksresponse.md +docs/pkg/models/operations/listpaymentsrequest.md +docs/pkg/models/operations/listpaymentsresponse.md +docs/pkg/models/operations/paymentslistaccountsrequest.md +docs/pkg/models/operations/paymentslistaccountsresponse.md +docs/pkg/models/operations/readconnectorconfigrequest.md +docs/pkg/models/operations/readconnectorconfigresponse.md +docs/pkg/models/operations/resetconnectorrequest.md +docs/pkg/models/operations/resetconnectorresponse.md +docs/pkg/models/operations/uninstallconnectorrequest.md +docs/pkg/models/operations/uninstallconnectorresponse.md +docs/pkg/models/operations/searchresponse.md +docs/pkg/models/operations/confirmholdrequest.md +docs/pkg/models/operations/confirmholdresponse.md +docs/pkg/models/operations/createbalancerequest.md +docs/pkg/models/operations/createbalanceresponse.md +docs/pkg/models/operations/createwalletresponse.md +docs/pkg/models/operations/creditwalletrequest.md +docs/pkg/models/operations/creditwalletresponse.md +docs/pkg/models/operations/debitwalletrequest.md +docs/pkg/models/operations/debitwalletresponse.md +docs/pkg/models/operations/getbalancerequest.md +docs/pkg/models/operations/getbalanceresponse.md +docs/pkg/models/operations/getholdrequest.md +docs/pkg/models/operations/getholdresponse.md +docs/pkg/models/operations/getholdsqueryparammetadata.md +docs/pkg/models/operations/getholdsrequest.md +docs/pkg/models/operations/getholdsresponse.md +docs/pkg/models/operations/gettransactionsrequest.md +docs/pkg/models/operations/gettransactionsresponse.md +docs/pkg/models/operations/getwalletrequest.md +docs/pkg/models/operations/getwalletresponse.md +docs/pkg/models/operations/listbalancesrequest.md +docs/pkg/models/operations/listbalancesresponse.md +docs/pkg/models/operations/listwalletsqueryparammetadata.md +docs/pkg/models/operations/listwalletsrequest.md +docs/pkg/models/operations/listwalletsresponse.md +docs/pkg/models/operations/updatewalletrequestbody.md +docs/pkg/models/operations/updatewalletrequest.md +docs/pkg/models/operations/updatewalletresponse.md +docs/pkg/models/operations/voidholdrequest.md +docs/pkg/models/operations/voidholdresponse.md +docs/pkg/models/operations/walletsgetserverinforesponse.md +docs/pkg/models/operations/activateconfigrequest.md +docs/pkg/models/operations/activateconfigresponse.md +docs/pkg/models/operations/changeconfigsecretrequest.md +docs/pkg/models/operations/changeconfigsecretresponse.md +docs/pkg/models/operations/deactivateconfigrequest.md +docs/pkg/models/operations/deactivateconfigresponse.md +docs/pkg/models/operations/deleteconfigrequest.md +docs/pkg/models/operations/deleteconfigresponse.md +docs/pkg/models/operations/getmanyconfigsrequest.md +docs/pkg/models/operations/getmanyconfigsresponse.md +docs/pkg/models/operations/insertconfigresponse.md +docs/pkg/models/operations/testconfigrequest.md +docs/pkg/models/operations/testconfigresponse.md +docs/pkg/models/shared/serverinfo.md +docs/pkg/models/shared/createclientresponse.md +docs/pkg/models/shared/client.md +docs/pkg/models/shared/clientsecret.md +docs/pkg/models/shared/createclientrequest.md +docs/pkg/models/shared/createsecretresponse.md +docs/pkg/models/shared/secret.md +docs/pkg/models/shared/createsecretrequest.md +docs/pkg/models/shared/listclientsresponse.md +docs/pkg/models/shared/readclientresponse.md +docs/pkg/models/shared/updateclientresponse.md +docs/pkg/models/shared/updateclientrequest.md +docs/pkg/models/shared/createscoperesponse.md +docs/pkg/models/shared/scope.md +docs/pkg/models/shared/createscoperequest.md +docs/pkg/models/shared/listscopesresponse.md +docs/pkg/models/shared/readscoperesponse.md +docs/pkg/models/shared/updatescoperesponse.md +docs/pkg/models/shared/updatescoperequest.md +docs/pkg/models/shared/listusersresponse.md +docs/pkg/models/shared/user.md +docs/pkg/models/shared/readuserresponse.md +docs/pkg/models/shared/errorresponse.md +docs/pkg/models/shared/errorsenum.md +docs/pkg/models/shared/configinforesponse.md +docs/pkg/models/shared/configinfo.md +docs/pkg/models/shared/config.md +docs/pkg/models/shared/ledgerstorage.md +docs/pkg/models/shared/ledgerinforesponse.md +docs/pkg/models/shared/storage.md +docs/pkg/models/shared/ledgerinfo.md +docs/pkg/models/shared/state.md +docs/pkg/models/shared/migrationinfo.md +docs/pkg/models/shared/accountresponse.md +docs/pkg/models/shared/accountwithvolumesandbalancesmetadata.md +docs/pkg/models/shared/accountwithvolumesandbalances.md +docs/pkg/models/shared/accountscursorresponsecursor.md +docs/pkg/models/shared/accountscursorresponse.md +docs/pkg/models/shared/metadata.md +docs/pkg/models/shared/account.md +docs/pkg/models/shared/balancescursorresponsecursor.md +docs/pkg/models/shared/balancescursorresponse.md +docs/pkg/models/shared/aggregatebalancesresponse.md +docs/pkg/models/shared/logscursorresponsecursor.md +docs/pkg/models/shared/logscursorresponse.md +docs/pkg/models/shared/logdata.md +docs/pkg/models/shared/type.md +docs/pkg/models/shared/log.md +docs/pkg/models/shared/mappingresponse.md +docs/pkg/models/shared/mapping.md +docs/pkg/models/shared/expr.md +docs/pkg/models/shared/contract.md +docs/pkg/models/shared/scriptresponse.md +docs/pkg/models/shared/transaction.md +docs/pkg/models/shared/volume.md +docs/pkg/models/shared/posting.md +docs/pkg/models/shared/vars.md +docs/pkg/models/shared/script.md +docs/pkg/models/shared/statsresponse.md +docs/pkg/models/shared/stats.md +docs/pkg/models/shared/transactionsresponse.md +docs/pkg/models/shared/transactions.md +docs/pkg/models/shared/transactiondata.md +docs/pkg/models/shared/posttransactionvars.md +docs/pkg/models/shared/posttransactionscript.md +docs/pkg/models/shared/posttransaction.md +docs/pkg/models/shared/transactionresponse.md +docs/pkg/models/shared/transactionscursorresponsecursor.md +docs/pkg/models/shared/transactionscursorresponse.md +docs/pkg/models/shared/errorcode.md +docs/pkg/models/shared/error.md +docs/pkg/models/shared/createworkflowresponse.md +docs/pkg/models/shared/workflow.md +docs/pkg/models/shared/workflowconfig.md +docs/pkg/models/shared/createworkflowrequest.md +docs/pkg/models/shared/getworkflowresponse.md +docs/pkg/models/shared/getworkflowoccurrenceresponse.md +docs/pkg/models/shared/workflowoccurrence.md +docs/pkg/models/shared/stagestatus.md +docs/pkg/models/shared/listworkflowsresponse.md +docs/pkg/models/shared/listrunsresponsecursor.md +docs/pkg/models/shared/listrunsresponse.md +docs/pkg/models/shared/runworkflowresponse.md +docs/pkg/models/shared/stripetransferresponse.md +docs/pkg/models/shared/stripetransferrequestmetadata.md +docs/pkg/models/shared/stripetransferrequest.md +docs/pkg/models/shared/taskresponsedata.md +docs/pkg/models/shared/taskresponse.md +docs/pkg/models/shared/taskstripedescriptor.md +docs/pkg/models/shared/taskstripestate.md +docs/pkg/models/shared/taskstripe.md +docs/pkg/models/shared/paymentstatus.md +docs/pkg/models/shared/taskwisedescriptor.md +docs/pkg/models/shared/taskwisestate.md +docs/pkg/models/shared/taskwise.md +docs/pkg/models/shared/taskcurrencyclouddescriptor.md +docs/pkg/models/shared/taskcurrencycloudstate.md +docs/pkg/models/shared/taskcurrencycloud.md +docs/pkg/models/shared/taskdummypaydescriptor.md +docs/pkg/models/shared/taskdummypaystate.md +docs/pkg/models/shared/taskdummypay.md +docs/pkg/models/shared/taskmodulrdescriptor.md +docs/pkg/models/shared/taskmodulrstate.md +docs/pkg/models/shared/taskmodulr.md +docs/pkg/models/shared/descriptor.md +docs/pkg/models/shared/taskbankingcirclestate.md +docs/pkg/models/shared/taskbankingcircle.md +docs/pkg/models/shared/connector.md +docs/pkg/models/shared/paymentresponse.md +docs/pkg/models/shared/raw.md +docs/pkg/models/shared/scheme.md +docs/pkg/models/shared/paymenttype.md +docs/pkg/models/shared/payment.md +docs/pkg/models/shared/paymentmetadata.md +docs/pkg/models/shared/paymentmetadatachangelog.md +docs/pkg/models/shared/paymentadjustmentraw.md +docs/pkg/models/shared/paymentadjustment.md +docs/pkg/models/shared/connectorconfig.md +docs/pkg/models/shared/stripeconfig.md +docs/pkg/models/shared/dummypayconfig.md +docs/pkg/models/shared/wiseconfig.md +docs/pkg/models/shared/modulrconfig.md +docs/pkg/models/shared/currencycloudconfig.md +docs/pkg/models/shared/bankingcircleconfig.md +docs/pkg/models/shared/connectorsresponsedata.md +docs/pkg/models/shared/connectorsresponse.md +docs/pkg/models/shared/key.md +docs/pkg/models/shared/connectorsconfigsresponseconnector.md +docs/pkg/models/shared/data.md +docs/pkg/models/shared/connectorsconfigsresponse.md +docs/pkg/models/shared/taskscursordata.md +docs/pkg/models/shared/taskscursorcursor.md +docs/pkg/models/shared/taskscursor.md +docs/pkg/models/shared/paymentscursorcursor.md +docs/pkg/models/shared/paymentscursor.md +docs/pkg/models/shared/cursor.md +docs/pkg/models/shared/accountscursor.md +docs/pkg/models/shared/paymentsaccounttype.md +docs/pkg/models/shared/paymentsaccount.md +docs/pkg/models/shared/connectorconfigresponse.md +docs/pkg/models/shared/responseschemasdata.md +docs/pkg/models/shared/total.md +docs/pkg/models/shared/responsecursor.md +docs/pkg/models/shared/responsedata.md +docs/pkg/models/shared/response.md +docs/pkg/models/shared/query.md +docs/pkg/models/shared/walletserrorresponseerrorcode.md +docs/pkg/models/shared/walletserrorresponse.md +docs/pkg/models/shared/confirmholdrequest.md +docs/pkg/models/shared/createbalanceresponse.md +docs/pkg/models/shared/balance.md +docs/pkg/models/shared/createbalancerequest.md +docs/pkg/models/shared/createwalletresponse.md +docs/pkg/models/shared/wallet.md +docs/pkg/models/shared/createwalletrequest.md +docs/pkg/models/shared/creditwalletrequest.md +docs/pkg/models/shared/subject.md +docs/pkg/models/shared/ledgeraccountsubject.md +docs/pkg/models/shared/walletsubject.md +docs/pkg/models/shared/monetary.md +docs/pkg/models/shared/debitwalletresponse.md +docs/pkg/models/shared/hold.md +docs/pkg/models/shared/debitwalletrequest.md +docs/pkg/models/shared/getbalanceresponse.md +docs/pkg/models/shared/balancewithassets.md +docs/pkg/models/shared/getholdresponse.md +docs/pkg/models/shared/expandeddebithold.md +docs/pkg/models/shared/getholdsresponsecursor.md +docs/pkg/models/shared/getholdsresponse.md +docs/pkg/models/shared/gettransactionsresponsecursor.md +docs/pkg/models/shared/gettransactionsresponse.md +docs/pkg/models/shared/walletstransaction.md +docs/pkg/models/shared/walletsvolume.md +docs/pkg/models/shared/getwalletresponse.md +docs/pkg/models/shared/balances.md +docs/pkg/models/shared/walletwithbalances.md +docs/pkg/models/shared/assetholder.md +docs/pkg/models/shared/listbalancesresponsecursor.md +docs/pkg/models/shared/listbalancesresponse.md +docs/pkg/models/shared/listwalletsresponsecursor.md +docs/pkg/models/shared/listwalletsresponse.md +docs/pkg/models/shared/configresponse.md +docs/pkg/models/shared/webhooksconfig.md +docs/pkg/models/shared/configchangesecret.md +docs/pkg/models/shared/configsresponsecursor.md +docs/pkg/models/shared/configsresponse.md +docs/pkg/models/shared/configuser.md +docs/pkg/models/shared/attemptresponse.md +docs/pkg/models/shared/attempt.md +docs/pkg/models/shared/security.md docs/sdks/formance/README.md docs/sdks/clients/README.md docs/sdks/scopes/README.md diff --git a/formance.go b/formance.go index 15e73a4..0508473 100755 --- a/formance.go +++ b/formance.go @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.5.0", - GenVersion: "2.181.1", - UserAgent: "speakeasy-sdk/go 0.5.0 2.181.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.5.1", + GenVersion: "2.185.0", + UserAgent: "speakeasy-sdk/go 0.5.1 2.185.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index d966037..a9a069e 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,8 +2,8 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.114.1 - generationVersion: 2.181.1 + speakeasyVersion: 1.116.0 + generationVersion: 2.185.0 generation: comments: {} sdkClassName: formance @@ -11,7 +11,7 @@ generation: features: go: constsAndDefaults: 0.1.1 - core: 3.1.0 + core: 3.1.2 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.2 @@ -19,7 +19,7 @@ features: nameOverrides: 2.81.1 unions: 2.85.0 go: - version: 0.5.0 + version: 0.5.1 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: @@ -30,8 +30,10 @@ go: operations: pkg/models/operations shared: pkg/models/shared webhooks: pkg/models/webhooks + inputModelSuffix: input installationURL: https://github.com/speakeasy-sdks/formance-go-sdk maxMethodParams: 4 + outputModelSuffix: output packageName: github.com/speakeasy-sdks/formance-go-sdk published: true repoSubDirectory: . From 47aa6c2b8bcaef576383cbf3f62587329394ad76 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 10 Nov 2023 00:39:27 +0000 Subject: [PATCH 04/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.118.3 --- .gitattributes | 0 README.md | 31 +++++++++---------- RELEASES.md | 12 ++++++- USAGE.md | 2 -- accounts.go | 0 balances.go | 0 clients.go | 0 .../operations/activateconfigrequest.md | 0 .../operations/activateconfigresponse.md | 0 .../addmetadataontransactionrequest.md | 0 .../addmetadataontransactionresponse.md | 0 .../operations/addmetadatatoaccountrequest.md | 0 .../addmetadatatoaccountresponse.md | 0 .../operations/addscopetoclientrequest.md | 0 .../operations/addscopetoclientresponse.md | 0 .../operations/addtransientscoperequest.md | 0 .../operations/addtransientscoperesponse.md | 0 docs/pkg/models/operations/balanceoperator.md | 0 .../operations/changeconfigsecretrequest.md | 0 .../operations/changeconfigsecretresponse.md | 0 .../models/operations/confirmholdrequest.md | 0 .../models/operations/confirmholdresponse.md | 0 .../connectorsstripetransferresponse.md | 0 .../models/operations/countaccountsrequest.md | 0 .../operations/countaccountsresponse.md | 0 .../counttransactionsqueryparammetadata.md | 0 .../operations/counttransactionsrequest.md | 0 .../operations/counttransactionsresponse.md | 0 .../models/operations/createbalancerequest.md | 0 .../operations/createbalanceresponse.md | 0 .../models/operations/createclientresponse.md | 0 .../models/operations/createscoperesponse.md | 0 .../models/operations/createsecretrequest.md | 0 .../models/operations/createsecretresponse.md | 0 .../operations/createtransactionrequest.md | 0 .../operations/createtransactionresponse.md | 0 .../operations/createtransactionsrequest.md | 0 .../operations/createtransactionsresponse.md | 0 .../models/operations/createwalletresponse.md | 0 .../operations/createworkflowresponse.md | 0 .../models/operations/creditwalletrequest.md | 0 .../models/operations/creditwalletresponse.md | 0 .../operations/deactivateconfigrequest.md | 0 .../operations/deactivateconfigresponse.md | 0 .../models/operations/debitwalletrequest.md | 0 .../models/operations/debitwalletresponse.md | 0 .../models/operations/deleteclientrequest.md | 0 .../models/operations/deleteclientresponse.md | 0 .../models/operations/deleteconfigrequest.md | 0 .../models/operations/deleteconfigresponse.md | 0 .../deletescopefromclientrequest.md | 0 .../deletescopefromclientresponse.md | 0 .../models/operations/deletescoperequest.md | 0 .../models/operations/deletescoperesponse.md | 0 .../models/operations/deletesecretrequest.md | 0 .../models/operations/deletesecretresponse.md | 0 .../operations/deletetransientscoperequest.md | 0 .../deletetransientscoperesponse.md | 0 .../models/operations/getaccountrequest.md | 0 .../models/operations/getaccountresponse.md | 0 .../models/operations/getbalancerequest.md | 0 .../models/operations/getbalanceresponse.md | 0 .../getbalancesaggregatedrequest.md | 0 .../getbalancesaggregatedresponse.md | 0 .../models/operations/getbalancesrequest.md | 0 .../models/operations/getbalancesresponse.md | 0 .../operations/getconnectortaskrequest.md | 0 .../operations/getconnectortaskresponse.md | 0 docs/pkg/models/operations/getflowrequest.md | 0 docs/pkg/models/operations/getflowresponse.md | 0 docs/pkg/models/operations/getholdrequest.md | 0 docs/pkg/models/operations/getholdresponse.md | 0 .../operations/getholdsqueryparammetadata.md | 0 docs/pkg/models/operations/getholdsrequest.md | 0 .../pkg/models/operations/getholdsresponse.md | 0 docs/pkg/models/operations/getinforesponse.md | 0 .../models/operations/getledgerinforequest.md | 0 .../operations/getledgerinforesponse.md | 0 .../operations/getmanyconfigsrequest.md | 0 .../operations/getmanyconfigsresponse.md | 0 .../models/operations/getmappingrequest.md | 0 .../models/operations/getmappingresponse.md | 0 .../models/operations/getpaymentrequest.md | 0 .../models/operations/getpaymentresponse.md | 0 .../operations/getserverinforesponse.md | 0 .../operations/gettransactionrequest.md | 0 .../operations/gettransactionresponse.md | 0 .../operations/gettransactionsrequest.md | 0 .../operations/gettransactionsresponse.md | 0 .../pkg/models/operations/getwalletrequest.md | 0 .../models/operations/getwalletresponse.md | 0 .../getworkflowoccurrencerequest.md | 0 .../getworkflowoccurrenceresponse.md | 0 .../models/operations/insertconfigresponse.md | 0 .../operations/installconnectorrequest.md | 0 .../operations/installconnectorresponse.md | 0 .../models/operations/listaccountsrequest.md | 0 .../models/operations/listaccountsresponse.md | 0 .../operations/listallconnectorsresponse.md | 0 .../models/operations/listbalancesrequest.md | 0 .../models/operations/listbalancesresponse.md | 0 .../models/operations/listclientsresponse.md | 0 .../listconfigsavailableconnectorsresponse.md | 0 .../operations/listconnectortasksrequest.md | 0 .../operations/listconnectortasksresponse.md | 0 .../models/operations/listflowsresponse.md | 0 docs/pkg/models/operations/listlogsrequest.md | 0 .../pkg/models/operations/listlogsresponse.md | 0 .../models/operations/listpaymentsrequest.md | 0 .../models/operations/listpaymentsresponse.md | 0 docs/pkg/models/operations/listrunsrequest.md | 0 .../pkg/models/operations/listrunsresponse.md | 0 .../models/operations/listscopesresponse.md | 0 .../listtransactionsqueryparammetadata.md | 0 .../operations/listtransactionsrequest.md | 0 .../operations/listtransactionsresponse.md | 0 .../models/operations/listusersresponse.md | 0 .../listwalletsqueryparammetadata.md | 0 .../models/operations/listwalletsrequest.md | 0 .../models/operations/listwalletsresponse.md | 0 docs/pkg/models/operations/metadata.md | 0 .../orchestrationgetserverinforesponse.md | 0 .../paymentsgetserverinforesponse.md | 0 .../operations/paymentslistaccountsrequest.md | 0 .../paymentslistaccountsresponse.md | 0 .../operations/queryparambalanceoperator.md | 0 .../models/operations/queryparammetadata.md | 0 .../models/operations/readclientrequest.md | 0 .../models/operations/readclientresponse.md | 0 .../operations/readconnectorconfigrequest.md | 0 .../operations/readconnectorconfigresponse.md | 0 .../pkg/models/operations/readscoperequest.md | 0 .../models/operations/readscoperesponse.md | 0 .../pkg/models/operations/readstatsrequest.md | 0 .../models/operations/readstatsresponse.md | 0 docs/pkg/models/operations/readuserrequest.md | 0 .../pkg/models/operations/readuserresponse.md | 0 .../operations/resetconnectorrequest.md | 0 .../operations/resetconnectorresponse.md | 0 .../operations/reverttransactionrequest.md | 0 .../operations/reverttransactionresponse.md | 0 .../pkg/models/operations/runscriptrequest.md | 0 .../models/operations/runscriptresponse.md | 0 .../models/operations/runworkflowrequest.md | 0 .../models/operations/runworkflowresponse.md | 0 .../operations/searchgetserverinforesponse.md | 0 docs/pkg/models/operations/searchresponse.md | 0 .../models/operations/testconfigrequest.md | 0 .../models/operations/testconfigresponse.md | 0 .../operations/uninstallconnectorrequest.md | 0 .../operations/uninstallconnectorresponse.md | 0 .../models/operations/updateclientrequest.md | 0 .../models/operations/updateclientresponse.md | 0 .../models/operations/updatemappingrequest.md | 0 .../operations/updatemappingresponse.md | 0 .../models/operations/updatescoperequest.md | 0 .../models/operations/updatescoperesponse.md | 0 .../models/operations/updatewalletrequest.md | 0 .../operations/updatewalletrequestbody.md | 0 .../models/operations/updatewalletresponse.md | 0 docs/pkg/models/operations/voidholdrequest.md | 0 .../pkg/models/operations/voidholdresponse.md | 0 .../walletsgetserverinforesponse.md | 0 docs/pkg/models/shared/account.md | 0 docs/pkg/models/shared/accountresponse.md | 0 docs/pkg/models/shared/accountscursor.md | 0 .../models/shared/accountscursorresponse.md | 0 .../shared/accountscursorresponsecursor.md | 0 .../shared/accountwithvolumesandbalances.md | 0 .../accountwithvolumesandbalancesmetadata.md | 0 .../shared/aggregatebalancesresponse.md | 0 docs/pkg/models/shared/assetholder.md | 0 docs/pkg/models/shared/attempt.md | 0 docs/pkg/models/shared/attemptresponse.md | 0 docs/pkg/models/shared/balance.md | 0 docs/pkg/models/shared/balances.md | 0 .../models/shared/balancescursorresponse.md | 0 .../shared/balancescursorresponsecursor.md | 0 docs/pkg/models/shared/balancewithassets.md | 0 docs/pkg/models/shared/bankingcircleconfig.md | 0 docs/pkg/models/shared/client.md | 0 docs/pkg/models/shared/clientsecret.md | 0 docs/pkg/models/shared/config.md | 0 docs/pkg/models/shared/configchangesecret.md | 0 docs/pkg/models/shared/configinfo.md | 0 docs/pkg/models/shared/configinforesponse.md | 0 docs/pkg/models/shared/configresponse.md | 0 docs/pkg/models/shared/configsresponse.md | 0 .../models/shared/configsresponsecursor.md | 0 docs/pkg/models/shared/configuser.md | 0 docs/pkg/models/shared/confirmholdrequest.md | 0 docs/pkg/models/shared/connector.md | 0 docs/pkg/models/shared/connectorconfig.md | 0 .../models/shared/connectorconfigresponse.md | 0 .../shared/connectorsconfigsresponse.md | 0 .../connectorsconfigsresponseconnector.md | 0 docs/pkg/models/shared/connectorsresponse.md | 0 .../models/shared/connectorsresponsedata.md | 0 docs/pkg/models/shared/contract.md | 0 .../pkg/models/shared/createbalancerequest.md | 0 .../models/shared/createbalanceresponse.md | 0 docs/pkg/models/shared/createclientrequest.md | 0 .../pkg/models/shared/createclientresponse.md | 0 docs/pkg/models/shared/createscoperequest.md | 0 docs/pkg/models/shared/createscoperesponse.md | 0 docs/pkg/models/shared/createsecretrequest.md | 0 .../pkg/models/shared/createsecretresponse.md | 0 docs/pkg/models/shared/createwalletrequest.md | 0 .../pkg/models/shared/createwalletresponse.md | 0 .../models/shared/createworkflowrequest.md | 0 .../models/shared/createworkflowresponse.md | 0 docs/pkg/models/shared/creditwalletrequest.md | 0 docs/pkg/models/shared/currencycloudconfig.md | 0 docs/pkg/models/shared/cursor.md | 0 docs/pkg/models/shared/data.md | 0 docs/pkg/models/shared/debitwalletrequest.md | 0 docs/pkg/models/shared/debitwalletresponse.md | 0 docs/pkg/models/shared/descriptor.md | 0 docs/pkg/models/shared/dummypayconfig.md | 0 docs/pkg/models/shared/error.md | 0 docs/pkg/models/shared/errorcode.md | 0 docs/pkg/models/shared/errorresponse.md | 0 docs/pkg/models/shared/errorsenum.md | 0 docs/pkg/models/shared/expandeddebithold.md | 0 docs/pkg/models/shared/expr.md | 0 docs/pkg/models/shared/getbalanceresponse.md | 0 docs/pkg/models/shared/getholdresponse.md | 0 docs/pkg/models/shared/getholdsresponse.md | 0 .../models/shared/getholdsresponsecursor.md | 0 .../models/shared/gettransactionsresponse.md | 0 .../shared/gettransactionsresponsecursor.md | 0 docs/pkg/models/shared/getwalletresponse.md | 0 .../shared/getworkflowoccurrenceresponse.md | 0 docs/pkg/models/shared/getworkflowresponse.md | 0 docs/pkg/models/shared/hold.md | 0 docs/pkg/models/shared/key.md | 0 .../pkg/models/shared/ledgeraccountsubject.md | 0 docs/pkg/models/shared/ledgerinfo.md | 0 docs/pkg/models/shared/ledgerinforesponse.md | 0 docs/pkg/models/shared/ledgerstorage.md | 0 .../pkg/models/shared/listbalancesresponse.md | 0 .../shared/listbalancesresponsecursor.md | 0 docs/pkg/models/shared/listclientsresponse.md | 0 docs/pkg/models/shared/listrunsresponse.md | 0 .../models/shared/listrunsresponsecursor.md | 0 docs/pkg/models/shared/listscopesresponse.md | 0 docs/pkg/models/shared/listusersresponse.md | 0 docs/pkg/models/shared/listwalletsresponse.md | 0 .../shared/listwalletsresponsecursor.md | 0 .../models/shared/listworkflowsresponse.md | 0 docs/pkg/models/shared/log.md | 0 docs/pkg/models/shared/logdata.md | 0 docs/pkg/models/shared/logscursorresponse.md | 0 .../models/shared/logscursorresponsecursor.md | 0 docs/pkg/models/shared/mapping.md | 0 docs/pkg/models/shared/mappingresponse.md | 0 docs/pkg/models/shared/metadata.md | 0 docs/pkg/models/shared/migrationinfo.md | 0 docs/pkg/models/shared/modulrconfig.md | 0 docs/pkg/models/shared/monetary.md | 0 docs/pkg/models/shared/payment.md | 0 docs/pkg/models/shared/paymentadjustment.md | 0 .../pkg/models/shared/paymentadjustmentraw.md | 0 docs/pkg/models/shared/paymentmetadata.md | 0 .../models/shared/paymentmetadatachangelog.md | 0 docs/pkg/models/shared/paymentresponse.md | 0 docs/pkg/models/shared/paymentsaccount.md | 0 docs/pkg/models/shared/paymentsaccounttype.md | 0 docs/pkg/models/shared/paymentscursor.md | 0 .../pkg/models/shared/paymentscursorcursor.md | 0 docs/pkg/models/shared/paymentstatus.md | 0 docs/pkg/models/shared/paymenttype.md | 0 docs/pkg/models/shared/posting.md | 0 docs/pkg/models/shared/posttransaction.md | 0 .../models/shared/posttransactionscript.md | 0 docs/pkg/models/shared/posttransactionvars.md | 0 docs/pkg/models/shared/query.md | 0 docs/pkg/models/shared/raw.md | 0 docs/pkg/models/shared/readclientresponse.md | 0 docs/pkg/models/shared/readscoperesponse.md | 0 docs/pkg/models/shared/readuserresponse.md | 0 docs/pkg/models/shared/response.md | 0 docs/pkg/models/shared/responsecursor.md | 0 docs/pkg/models/shared/responsedata.md | 0 docs/pkg/models/shared/responseschemasdata.md | 0 docs/pkg/models/shared/runworkflowresponse.md | 0 docs/pkg/models/shared/scheme.md | 0 docs/pkg/models/shared/scope.md | 0 docs/pkg/models/shared/script.md | 0 docs/pkg/models/shared/scriptresponse.md | 0 docs/pkg/models/shared/secret.md | 0 docs/pkg/models/shared/security.md | 0 docs/pkg/models/shared/serverinfo.md | 0 docs/pkg/models/shared/stagestatus.md | 0 docs/pkg/models/shared/state.md | 0 docs/pkg/models/shared/stats.md | 0 docs/pkg/models/shared/statsresponse.md | 0 docs/pkg/models/shared/storage.md | 0 docs/pkg/models/shared/stripeconfig.md | 0 .../models/shared/stripetransferrequest.md | 0 .../shared/stripetransferrequestmetadata.md | 0 .../models/shared/stripetransferresponse.md | 0 docs/pkg/models/shared/subject.md | 0 docs/pkg/models/shared/taskbankingcircle.md | 0 .../models/shared/taskbankingcirclestate.md | 0 docs/pkg/models/shared/taskcurrencycloud.md | 0 .../shared/taskcurrencyclouddescriptor.md | 0 .../models/shared/taskcurrencycloudstate.md | 0 docs/pkg/models/shared/taskdummypay.md | 0 .../models/shared/taskdummypaydescriptor.md | 0 docs/pkg/models/shared/taskdummypaystate.md | 0 docs/pkg/models/shared/taskmodulr.md | 0 .../pkg/models/shared/taskmodulrdescriptor.md | 0 docs/pkg/models/shared/taskmodulrstate.md | 0 docs/pkg/models/shared/taskresponse.md | 0 docs/pkg/models/shared/taskresponsedata.md | 0 docs/pkg/models/shared/taskscursor.md | 0 docs/pkg/models/shared/taskscursorcursor.md | 0 docs/pkg/models/shared/taskscursordata.md | 0 docs/pkg/models/shared/taskstripe.md | 0 .../pkg/models/shared/taskstripedescriptor.md | 0 docs/pkg/models/shared/taskstripestate.md | 0 docs/pkg/models/shared/taskwise.md | 0 docs/pkg/models/shared/taskwisedescriptor.md | 0 docs/pkg/models/shared/taskwisestate.md | 0 docs/pkg/models/shared/total.md | 0 docs/pkg/models/shared/transaction.md | 0 docs/pkg/models/shared/transactiondata.md | 0 docs/pkg/models/shared/transactionresponse.md | 0 docs/pkg/models/shared/transactions.md | 0 .../shared/transactionscursorresponse.md | 0 .../transactionscursorresponsecursor.md | 0 .../pkg/models/shared/transactionsresponse.md | 0 docs/pkg/models/shared/type.md | 0 docs/pkg/models/shared/updateclientrequest.md | 0 .../pkg/models/shared/updateclientresponse.md | 0 docs/pkg/models/shared/updatescoperequest.md | 0 docs/pkg/models/shared/updatescoperesponse.md | 0 docs/pkg/models/shared/user.md | 0 docs/pkg/models/shared/vars.md | 0 docs/pkg/models/shared/volume.md | 0 docs/pkg/models/shared/wallet.md | 0 .../pkg/models/shared/walletserrorresponse.md | 0 .../shared/walletserrorresponseerrorcode.md | 0 docs/pkg/models/shared/walletstransaction.md | 0 docs/pkg/models/shared/walletsubject.md | 0 docs/pkg/models/shared/walletsvolume.md | 0 docs/pkg/models/shared/walletwithbalances.md | 0 docs/pkg/models/shared/webhooksconfig.md | 0 docs/pkg/models/shared/wiseconfig.md | 0 docs/pkg/models/shared/workflow.md | 0 docs/pkg/models/shared/workflowconfig.md | 0 docs/pkg/models/shared/workflowoccurrence.md | 0 docs/sdks/accounts/README.md | 0 docs/sdks/balances/README.md | 0 docs/sdks/clients/README.md | 0 docs/sdks/formance/README.md | 0 docs/sdks/ledger/README.md | 0 docs/sdks/logs/README.md | 0 docs/sdks/mapping/README.md | 0 docs/sdks/orchestration/README.md | 0 docs/sdks/payments/README.md | 0 docs/sdks/scopes/README.md | 0 docs/sdks/script/README.md | 0 docs/sdks/search/README.md | 0 docs/sdks/server/README.md | 0 docs/sdks/stats/README.md | 0 docs/sdks/transactions/README.md | 2 +- docs/sdks/users/README.md | 0 docs/sdks/wallets/README.md | 0 docs/sdks/webhooks/README.md | 0 formance.go | 6 ++-- gen.yaml | 10 +++--- go.mod | 0 go.sum | 0 ledger.go | 0 logs.go | 0 mapping.go | 0 orchestration.go | 0 payments.go | 0 pkg/models/operations/activateconfig.go | 0 .../operations/addmetadataontransaction.go | 0 pkg/models/operations/addmetadatatoaccount.go | 0 pkg/models/operations/addscopetoclient.go | 0 pkg/models/operations/addtransientscope.go | 0 pkg/models/operations/changeconfigsecret.go | 0 pkg/models/operations/confirmhold.go | 0 .../operations/connectorsstripetransfer.go | 0 pkg/models/operations/countaccounts.go | 0 pkg/models/operations/counttransactions.go | 0 pkg/models/operations/createbalance.go | 0 pkg/models/operations/createclient.go | 0 pkg/models/operations/createscope.go | 0 pkg/models/operations/createsecret.go | 0 pkg/models/operations/createtransaction.go | 0 pkg/models/operations/createtransactions.go | 0 pkg/models/operations/createwallet.go | 0 pkg/models/operations/createworkflow.go | 0 pkg/models/operations/creditwallet.go | 0 pkg/models/operations/deactivateconfig.go | 0 pkg/models/operations/debitwallet.go | 0 pkg/models/operations/deleteclient.go | 0 pkg/models/operations/deleteconfig.go | 0 pkg/models/operations/deletescope.go | 0 .../operations/deletescopefromclient.go | 0 pkg/models/operations/deletesecret.go | 0 pkg/models/operations/deletetransientscope.go | 0 pkg/models/operations/getaccount.go | 0 pkg/models/operations/getbalance.go | 0 pkg/models/operations/getbalances.go | 0 .../operations/getbalancesaggregated.go | 0 pkg/models/operations/getconnectortask.go | 0 pkg/models/operations/getflow.go | 0 pkg/models/operations/gethold.go | 0 pkg/models/operations/getholds.go | 0 pkg/models/operations/getinfo.go | 0 pkg/models/operations/getledgerinfo.go | 0 pkg/models/operations/getmanyconfigs.go | 0 pkg/models/operations/getmapping.go | 0 pkg/models/operations/getpayment.go | 0 pkg/models/operations/getserverinfo.go | 0 pkg/models/operations/gettransaction.go | 0 pkg/models/operations/gettransactions.go | 0 pkg/models/operations/getwallet.go | 0 .../operations/getworkflowoccurrence.go | 0 pkg/models/operations/insertconfig.go | 0 pkg/models/operations/installconnector.go | 0 pkg/models/operations/listaccounts.go | 0 pkg/models/operations/listallconnectors.go | 0 pkg/models/operations/listbalances.go | 0 pkg/models/operations/listclients.go | 0 .../listconfigsavailableconnectors.go | 0 pkg/models/operations/listconnectortasks.go | 0 pkg/models/operations/listflows.go | 0 pkg/models/operations/listlogs.go | 0 pkg/models/operations/listpayments.go | 0 pkg/models/operations/listruns.go | 0 pkg/models/operations/listscopes.go | 0 pkg/models/operations/listtransactions.go | 0 pkg/models/operations/listusers.go | 0 pkg/models/operations/listwallets.go | 0 .../operations/orchestrationgetserverinfo.go | 0 .../operations/paymentsgetserverinfo.go | 0 pkg/models/operations/paymentslistaccounts.go | 0 pkg/models/operations/readclient.go | 0 pkg/models/operations/readconnectorconfig.go | 0 pkg/models/operations/readscope.go | 0 pkg/models/operations/readstats.go | 0 pkg/models/operations/readuser.go | 0 pkg/models/operations/resetconnector.go | 0 pkg/models/operations/reverttransaction.go | 0 pkg/models/operations/runscript.go | 0 pkg/models/operations/runworkflow.go | 0 pkg/models/operations/search.go | 0 pkg/models/operations/searchgetserverinfo.go | 0 pkg/models/operations/testconfig.go | 0 pkg/models/operations/uninstallconnector.go | 0 pkg/models/operations/updateclient.go | 0 pkg/models/operations/updatemapping.go | 0 pkg/models/operations/updatescope.go | 0 pkg/models/operations/updatewallet.go | 0 pkg/models/operations/voidhold.go | 0 pkg/models/operations/walletsgetserverinfo.go | 0 pkg/models/sdkerrors/sdkerror.go | 0 pkg/models/shared/account.go | 0 pkg/models/shared/accountresponse.go | 0 pkg/models/shared/accountscursor.go | 0 pkg/models/shared/accountscursorresponse.go | 0 .../shared/accountwithvolumesandbalances.go | 0 .../shared/aggregatebalancesresponse.go | 0 pkg/models/shared/assetholder.go | 0 pkg/models/shared/attempt.go | 0 pkg/models/shared/attemptresponse.go | 0 pkg/models/shared/balance.go | 0 pkg/models/shared/balancescursorresponse.go | 0 pkg/models/shared/balancewithassets.go | 0 pkg/models/shared/bankingcircleconfig.go | 0 pkg/models/shared/client.go | 0 pkg/models/shared/clientsecret.go | 0 pkg/models/shared/config.go | 0 pkg/models/shared/configchangesecret.go | 0 pkg/models/shared/configinfo.go | 0 pkg/models/shared/configinforesponse.go | 0 pkg/models/shared/configresponse.go | 0 pkg/models/shared/configsresponse.go | 0 pkg/models/shared/configuser.go | 0 pkg/models/shared/confirmholdrequest.go | 0 pkg/models/shared/connector.go | 0 pkg/models/shared/connectorconfig.go | 0 pkg/models/shared/connectorconfigresponse.go | 0 .../shared/connectorsconfigsresponse.go | 0 pkg/models/shared/connectorsresponse.go | 0 pkg/models/shared/contract.go | 0 pkg/models/shared/createbalancerequest.go | 0 pkg/models/shared/createbalanceresponse.go | 0 pkg/models/shared/createclientrequest.go | 0 pkg/models/shared/createclientresponse.go | 0 pkg/models/shared/createscoperequest.go | 0 pkg/models/shared/createscoperesponse.go | 0 pkg/models/shared/createsecretrequest.go | 0 pkg/models/shared/createsecretresponse.go | 0 pkg/models/shared/createwalletrequest.go | 0 pkg/models/shared/createwalletresponse.go | 0 pkg/models/shared/createworkflowrequest.go | 0 pkg/models/shared/createworkflowresponse.go | 0 pkg/models/shared/creditwalletrequest.go | 0 pkg/models/shared/currencycloudconfig.go | 0 pkg/models/shared/debitwalletrequest.go | 0 pkg/models/shared/debitwalletresponse.go | 0 pkg/models/shared/dummypayconfig.go | 0 pkg/models/shared/error.go | 0 pkg/models/shared/errorresponse.go | 0 pkg/models/shared/errorsenum.go | 0 pkg/models/shared/expandeddebithold.go | 0 pkg/models/shared/getbalanceresponse.go | 0 pkg/models/shared/getholdresponse.go | 0 pkg/models/shared/getholdsresponse.go | 0 pkg/models/shared/gettransactionsresponse.go | 0 pkg/models/shared/getwalletresponse.go | 0 .../shared/getworkflowoccurrenceresponse.go | 0 pkg/models/shared/getworkflowresponse.go | 0 pkg/models/shared/hold.go | 0 pkg/models/shared/ledgeraccountsubject.go | 0 pkg/models/shared/ledgerinfo.go | 0 pkg/models/shared/ledgerinforesponse.go | 0 pkg/models/shared/ledgerstorage.go | 0 pkg/models/shared/listbalancesresponse.go | 0 pkg/models/shared/listclientsresponse.go | 0 pkg/models/shared/listrunsresponse.go | 0 pkg/models/shared/listscopesresponse.go | 0 pkg/models/shared/listusersresponse.go | 0 pkg/models/shared/listwalletsresponse.go | 0 pkg/models/shared/listworkflowsresponse.go | 0 pkg/models/shared/log.go | 0 pkg/models/shared/logscursorresponse.go | 0 pkg/models/shared/mapping.go | 0 pkg/models/shared/mappingresponse.go | 0 pkg/models/shared/migrationinfo.go | 0 pkg/models/shared/modulrconfig.go | 0 pkg/models/shared/monetary.go | 0 pkg/models/shared/payment.go | 0 pkg/models/shared/paymentadjustment.go | 0 pkg/models/shared/paymentmetadata.go | 0 pkg/models/shared/paymentmetadatachangelog.go | 0 pkg/models/shared/paymentresponse.go | 0 pkg/models/shared/paymentsaccount.go | 0 pkg/models/shared/paymentscursor.go | 0 pkg/models/shared/paymentstatus.go | 0 pkg/models/shared/posting.go | 0 pkg/models/shared/posttransaction.go | 0 pkg/models/shared/query.go | 0 pkg/models/shared/readclientresponse.go | 0 pkg/models/shared/readscoperesponse.go | 0 pkg/models/shared/readuserresponse.go | 0 pkg/models/shared/response.go | 0 pkg/models/shared/runworkflowresponse.go | 0 pkg/models/shared/scope.go | 0 pkg/models/shared/script.go | 0 pkg/models/shared/scriptresponse.go | 0 pkg/models/shared/secret.go | 0 pkg/models/shared/security.go | 0 pkg/models/shared/serverinfo.go | 0 pkg/models/shared/stagestatus.go | 0 pkg/models/shared/stats.go | 0 pkg/models/shared/statsresponse.go | 0 pkg/models/shared/stripeconfig.go | 0 pkg/models/shared/stripetransferrequest.go | 0 pkg/models/shared/stripetransferresponse.go | 0 pkg/models/shared/subject.go | 0 pkg/models/shared/taskbankingcircle.go | 0 pkg/models/shared/taskcurrencycloud.go | 0 pkg/models/shared/taskdummypay.go | 0 pkg/models/shared/taskmodulr.go | 0 pkg/models/shared/taskresponse.go | 0 pkg/models/shared/taskscursor.go | 0 pkg/models/shared/taskstripe.go | 0 pkg/models/shared/taskwise.go | 0 pkg/models/shared/transaction.go | 0 pkg/models/shared/transactiondata.go | 0 pkg/models/shared/transactionresponse.go | 0 pkg/models/shared/transactions.go | 0 .../shared/transactionscursorresponse.go | 0 pkg/models/shared/transactionsresponse.go | 0 pkg/models/shared/updateclientrequest.go | 0 pkg/models/shared/updateclientresponse.go | 0 pkg/models/shared/updatescoperequest.go | 0 pkg/models/shared/updatescoperesponse.go | 0 pkg/models/shared/user.go | 0 pkg/models/shared/volume.go | 0 pkg/models/shared/wallet.go | 0 pkg/models/shared/walletserrorresponse.go | 0 pkg/models/shared/walletstransaction.go | 0 pkg/models/shared/walletsubject.go | 0 pkg/models/shared/walletsvolume.go | 0 pkg/models/shared/walletwithbalances.go | 0 pkg/models/shared/webhooksconfig.go | 0 pkg/models/shared/wiseconfig.go | 0 pkg/models/shared/workflow.go | 0 pkg/models/shared/workflowconfig.go | 0 pkg/models/shared/workflowoccurrence.go | 0 pkg/types/bigint.go | 0 pkg/types/date.go | 0 pkg/types/datetime.go | 0 pkg/types/decimal.go | 0 pkg/types/pointers.go | 0 pkg/utils/contenttype.go | 0 pkg/utils/form.go | 0 pkg/utils/headers.go | 0 pkg/utils/json.go | 0 pkg/utils/pathparams.go | 0 pkg/utils/queryparams.go | 0 pkg/utils/requestbody.go | 0 pkg/utils/retries.go | 0 pkg/utils/security.go | 0 pkg/utils/utils.go | 1 - scopes.go | 0 script.go | 0 search.go | 0 server.go | 0 stats.go | 0 transactions.go | 0 users.go | 0 wallets.go | 0 webhooks.go | 0 624 files changed, 36 insertions(+), 28 deletions(-) mode change 100755 => 100644 .gitattributes mode change 100755 => 100644 USAGE.md mode change 100755 => 100644 accounts.go mode change 100755 => 100644 balances.go mode change 100755 => 100644 clients.go mode change 100755 => 100644 docs/pkg/models/operations/activateconfigrequest.md mode change 100755 => 100644 docs/pkg/models/operations/activateconfigresponse.md mode change 100755 => 100644 docs/pkg/models/operations/addmetadataontransactionrequest.md mode change 100755 => 100644 docs/pkg/models/operations/addmetadataontransactionresponse.md mode change 100755 => 100644 docs/pkg/models/operations/addmetadatatoaccountrequest.md mode change 100755 => 100644 docs/pkg/models/operations/addmetadatatoaccountresponse.md mode change 100755 => 100644 docs/pkg/models/operations/addscopetoclientrequest.md mode change 100755 => 100644 docs/pkg/models/operations/addscopetoclientresponse.md mode change 100755 => 100644 docs/pkg/models/operations/addtransientscoperequest.md mode change 100755 => 100644 docs/pkg/models/operations/addtransientscoperesponse.md mode change 100755 => 100644 docs/pkg/models/operations/balanceoperator.md mode change 100755 => 100644 docs/pkg/models/operations/changeconfigsecretrequest.md mode change 100755 => 100644 docs/pkg/models/operations/changeconfigsecretresponse.md mode change 100755 => 100644 docs/pkg/models/operations/confirmholdrequest.md mode change 100755 => 100644 docs/pkg/models/operations/confirmholdresponse.md mode change 100755 => 100644 docs/pkg/models/operations/connectorsstripetransferresponse.md mode change 100755 => 100644 docs/pkg/models/operations/countaccountsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/countaccountsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/counttransactionsqueryparammetadata.md mode change 100755 => 100644 docs/pkg/models/operations/counttransactionsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/counttransactionsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/createbalancerequest.md mode change 100755 => 100644 docs/pkg/models/operations/createbalanceresponse.md mode change 100755 => 100644 docs/pkg/models/operations/createclientresponse.md mode change 100755 => 100644 docs/pkg/models/operations/createscoperesponse.md mode change 100755 => 100644 docs/pkg/models/operations/createsecretrequest.md mode change 100755 => 100644 docs/pkg/models/operations/createsecretresponse.md mode change 100755 => 100644 docs/pkg/models/operations/createtransactionrequest.md mode change 100755 => 100644 docs/pkg/models/operations/createtransactionresponse.md mode change 100755 => 100644 docs/pkg/models/operations/createtransactionsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/createtransactionsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/createwalletresponse.md mode change 100755 => 100644 docs/pkg/models/operations/createworkflowresponse.md mode change 100755 => 100644 docs/pkg/models/operations/creditwalletrequest.md mode change 100755 => 100644 docs/pkg/models/operations/creditwalletresponse.md mode change 100755 => 100644 docs/pkg/models/operations/deactivateconfigrequest.md mode change 100755 => 100644 docs/pkg/models/operations/deactivateconfigresponse.md mode change 100755 => 100644 docs/pkg/models/operations/debitwalletrequest.md mode change 100755 => 100644 docs/pkg/models/operations/debitwalletresponse.md mode change 100755 => 100644 docs/pkg/models/operations/deleteclientrequest.md mode change 100755 => 100644 docs/pkg/models/operations/deleteclientresponse.md mode change 100755 => 100644 docs/pkg/models/operations/deleteconfigrequest.md mode change 100755 => 100644 docs/pkg/models/operations/deleteconfigresponse.md mode change 100755 => 100644 docs/pkg/models/operations/deletescopefromclientrequest.md mode change 100755 => 100644 docs/pkg/models/operations/deletescopefromclientresponse.md mode change 100755 => 100644 docs/pkg/models/operations/deletescoperequest.md mode change 100755 => 100644 docs/pkg/models/operations/deletescoperesponse.md mode change 100755 => 100644 docs/pkg/models/operations/deletesecretrequest.md mode change 100755 => 100644 docs/pkg/models/operations/deletesecretresponse.md mode change 100755 => 100644 docs/pkg/models/operations/deletetransientscoperequest.md mode change 100755 => 100644 docs/pkg/models/operations/deletetransientscoperesponse.md mode change 100755 => 100644 docs/pkg/models/operations/getaccountrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getaccountresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getbalancerequest.md mode change 100755 => 100644 docs/pkg/models/operations/getbalanceresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getbalancesaggregatedrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getbalancesaggregatedresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getbalancesrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getbalancesresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getconnectortaskrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getconnectortaskresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getflowrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getflowresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getholdrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getholdresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getholdsqueryparammetadata.md mode change 100755 => 100644 docs/pkg/models/operations/getholdsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getholdsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getinforesponse.md mode change 100755 => 100644 docs/pkg/models/operations/getledgerinforequest.md mode change 100755 => 100644 docs/pkg/models/operations/getledgerinforesponse.md mode change 100755 => 100644 docs/pkg/models/operations/getmanyconfigsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getmanyconfigsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getmappingrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getmappingresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getpaymentrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getpaymentresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getserverinforesponse.md mode change 100755 => 100644 docs/pkg/models/operations/gettransactionrequest.md mode change 100755 => 100644 docs/pkg/models/operations/gettransactionresponse.md mode change 100755 => 100644 docs/pkg/models/operations/gettransactionsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/gettransactionsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getwalletrequest.md mode change 100755 => 100644 docs/pkg/models/operations/getwalletresponse.md mode change 100755 => 100644 docs/pkg/models/operations/getworkflowoccurrencerequest.md mode change 100755 => 100644 docs/pkg/models/operations/getworkflowoccurrenceresponse.md mode change 100755 => 100644 docs/pkg/models/operations/insertconfigresponse.md mode change 100755 => 100644 docs/pkg/models/operations/installconnectorrequest.md mode change 100755 => 100644 docs/pkg/models/operations/installconnectorresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listaccountsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listaccountsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listallconnectorsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listbalancesrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listbalancesresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listclientsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listconnectortasksrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listconnectortasksresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listflowsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listlogsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listlogsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listpaymentsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listpaymentsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listrunsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listrunsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listscopesresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listtransactionsqueryparammetadata.md mode change 100755 => 100644 docs/pkg/models/operations/listtransactionsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listtransactionsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listusersresponse.md mode change 100755 => 100644 docs/pkg/models/operations/listwalletsqueryparammetadata.md mode change 100755 => 100644 docs/pkg/models/operations/listwalletsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/listwalletsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/metadata.md mode change 100755 => 100644 docs/pkg/models/operations/orchestrationgetserverinforesponse.md mode change 100755 => 100644 docs/pkg/models/operations/paymentsgetserverinforesponse.md mode change 100755 => 100644 docs/pkg/models/operations/paymentslistaccountsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/paymentslistaccountsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/queryparambalanceoperator.md mode change 100755 => 100644 docs/pkg/models/operations/queryparammetadata.md mode change 100755 => 100644 docs/pkg/models/operations/readclientrequest.md mode change 100755 => 100644 docs/pkg/models/operations/readclientresponse.md mode change 100755 => 100644 docs/pkg/models/operations/readconnectorconfigrequest.md mode change 100755 => 100644 docs/pkg/models/operations/readconnectorconfigresponse.md mode change 100755 => 100644 docs/pkg/models/operations/readscoperequest.md mode change 100755 => 100644 docs/pkg/models/operations/readscoperesponse.md mode change 100755 => 100644 docs/pkg/models/operations/readstatsrequest.md mode change 100755 => 100644 docs/pkg/models/operations/readstatsresponse.md mode change 100755 => 100644 docs/pkg/models/operations/readuserrequest.md mode change 100755 => 100644 docs/pkg/models/operations/readuserresponse.md mode change 100755 => 100644 docs/pkg/models/operations/resetconnectorrequest.md mode change 100755 => 100644 docs/pkg/models/operations/resetconnectorresponse.md mode change 100755 => 100644 docs/pkg/models/operations/reverttransactionrequest.md mode change 100755 => 100644 docs/pkg/models/operations/reverttransactionresponse.md mode change 100755 => 100644 docs/pkg/models/operations/runscriptrequest.md mode change 100755 => 100644 docs/pkg/models/operations/runscriptresponse.md mode change 100755 => 100644 docs/pkg/models/operations/runworkflowrequest.md mode change 100755 => 100644 docs/pkg/models/operations/runworkflowresponse.md mode change 100755 => 100644 docs/pkg/models/operations/searchgetserverinforesponse.md mode change 100755 => 100644 docs/pkg/models/operations/searchresponse.md mode change 100755 => 100644 docs/pkg/models/operations/testconfigrequest.md mode change 100755 => 100644 docs/pkg/models/operations/testconfigresponse.md mode change 100755 => 100644 docs/pkg/models/operations/uninstallconnectorrequest.md mode change 100755 => 100644 docs/pkg/models/operations/uninstallconnectorresponse.md mode change 100755 => 100644 docs/pkg/models/operations/updateclientrequest.md mode change 100755 => 100644 docs/pkg/models/operations/updateclientresponse.md mode change 100755 => 100644 docs/pkg/models/operations/updatemappingrequest.md mode change 100755 => 100644 docs/pkg/models/operations/updatemappingresponse.md mode change 100755 => 100644 docs/pkg/models/operations/updatescoperequest.md mode change 100755 => 100644 docs/pkg/models/operations/updatescoperesponse.md mode change 100755 => 100644 docs/pkg/models/operations/updatewalletrequest.md mode change 100755 => 100644 docs/pkg/models/operations/updatewalletrequestbody.md mode change 100755 => 100644 docs/pkg/models/operations/updatewalletresponse.md mode change 100755 => 100644 docs/pkg/models/operations/voidholdrequest.md mode change 100755 => 100644 docs/pkg/models/operations/voidholdresponse.md mode change 100755 => 100644 docs/pkg/models/operations/walletsgetserverinforesponse.md mode change 100755 => 100644 docs/pkg/models/shared/account.md mode change 100755 => 100644 docs/pkg/models/shared/accountresponse.md mode change 100755 => 100644 docs/pkg/models/shared/accountscursor.md mode change 100755 => 100644 docs/pkg/models/shared/accountscursorresponse.md mode change 100755 => 100644 docs/pkg/models/shared/accountscursorresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/accountwithvolumesandbalances.md mode change 100755 => 100644 docs/pkg/models/shared/accountwithvolumesandbalancesmetadata.md mode change 100755 => 100644 docs/pkg/models/shared/aggregatebalancesresponse.md mode change 100755 => 100644 docs/pkg/models/shared/assetholder.md mode change 100755 => 100644 docs/pkg/models/shared/attempt.md mode change 100755 => 100644 docs/pkg/models/shared/attemptresponse.md mode change 100755 => 100644 docs/pkg/models/shared/balance.md mode change 100755 => 100644 docs/pkg/models/shared/balances.md mode change 100755 => 100644 docs/pkg/models/shared/balancescursorresponse.md mode change 100755 => 100644 docs/pkg/models/shared/balancescursorresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/balancewithassets.md mode change 100755 => 100644 docs/pkg/models/shared/bankingcircleconfig.md mode change 100755 => 100644 docs/pkg/models/shared/client.md mode change 100755 => 100644 docs/pkg/models/shared/clientsecret.md mode change 100755 => 100644 docs/pkg/models/shared/config.md mode change 100755 => 100644 docs/pkg/models/shared/configchangesecret.md mode change 100755 => 100644 docs/pkg/models/shared/configinfo.md mode change 100755 => 100644 docs/pkg/models/shared/configinforesponse.md mode change 100755 => 100644 docs/pkg/models/shared/configresponse.md mode change 100755 => 100644 docs/pkg/models/shared/configsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/configsresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/configuser.md mode change 100755 => 100644 docs/pkg/models/shared/confirmholdrequest.md mode change 100755 => 100644 docs/pkg/models/shared/connector.md mode change 100755 => 100644 docs/pkg/models/shared/connectorconfig.md mode change 100755 => 100644 docs/pkg/models/shared/connectorconfigresponse.md mode change 100755 => 100644 docs/pkg/models/shared/connectorsconfigsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/connectorsconfigsresponseconnector.md mode change 100755 => 100644 docs/pkg/models/shared/connectorsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/connectorsresponsedata.md mode change 100755 => 100644 docs/pkg/models/shared/contract.md mode change 100755 => 100644 docs/pkg/models/shared/createbalancerequest.md mode change 100755 => 100644 docs/pkg/models/shared/createbalanceresponse.md mode change 100755 => 100644 docs/pkg/models/shared/createclientrequest.md mode change 100755 => 100644 docs/pkg/models/shared/createclientresponse.md mode change 100755 => 100644 docs/pkg/models/shared/createscoperequest.md mode change 100755 => 100644 docs/pkg/models/shared/createscoperesponse.md mode change 100755 => 100644 docs/pkg/models/shared/createsecretrequest.md mode change 100755 => 100644 docs/pkg/models/shared/createsecretresponse.md mode change 100755 => 100644 docs/pkg/models/shared/createwalletrequest.md mode change 100755 => 100644 docs/pkg/models/shared/createwalletresponse.md mode change 100755 => 100644 docs/pkg/models/shared/createworkflowrequest.md mode change 100755 => 100644 docs/pkg/models/shared/createworkflowresponse.md mode change 100755 => 100644 docs/pkg/models/shared/creditwalletrequest.md mode change 100755 => 100644 docs/pkg/models/shared/currencycloudconfig.md mode change 100755 => 100644 docs/pkg/models/shared/cursor.md mode change 100755 => 100644 docs/pkg/models/shared/data.md mode change 100755 => 100644 docs/pkg/models/shared/debitwalletrequest.md mode change 100755 => 100644 docs/pkg/models/shared/debitwalletresponse.md mode change 100755 => 100644 docs/pkg/models/shared/descriptor.md mode change 100755 => 100644 docs/pkg/models/shared/dummypayconfig.md mode change 100755 => 100644 docs/pkg/models/shared/error.md mode change 100755 => 100644 docs/pkg/models/shared/errorcode.md mode change 100755 => 100644 docs/pkg/models/shared/errorresponse.md mode change 100755 => 100644 docs/pkg/models/shared/errorsenum.md mode change 100755 => 100644 docs/pkg/models/shared/expandeddebithold.md mode change 100755 => 100644 docs/pkg/models/shared/expr.md mode change 100755 => 100644 docs/pkg/models/shared/getbalanceresponse.md mode change 100755 => 100644 docs/pkg/models/shared/getholdresponse.md mode change 100755 => 100644 docs/pkg/models/shared/getholdsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/getholdsresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/gettransactionsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/gettransactionsresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/getwalletresponse.md mode change 100755 => 100644 docs/pkg/models/shared/getworkflowoccurrenceresponse.md mode change 100755 => 100644 docs/pkg/models/shared/getworkflowresponse.md mode change 100755 => 100644 docs/pkg/models/shared/hold.md mode change 100755 => 100644 docs/pkg/models/shared/key.md mode change 100755 => 100644 docs/pkg/models/shared/ledgeraccountsubject.md mode change 100755 => 100644 docs/pkg/models/shared/ledgerinfo.md mode change 100755 => 100644 docs/pkg/models/shared/ledgerinforesponse.md mode change 100755 => 100644 docs/pkg/models/shared/ledgerstorage.md mode change 100755 => 100644 docs/pkg/models/shared/listbalancesresponse.md mode change 100755 => 100644 docs/pkg/models/shared/listbalancesresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/listclientsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/listrunsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/listrunsresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/listscopesresponse.md mode change 100755 => 100644 docs/pkg/models/shared/listusersresponse.md mode change 100755 => 100644 docs/pkg/models/shared/listwalletsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/listwalletsresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/listworkflowsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/log.md mode change 100755 => 100644 docs/pkg/models/shared/logdata.md mode change 100755 => 100644 docs/pkg/models/shared/logscursorresponse.md mode change 100755 => 100644 docs/pkg/models/shared/logscursorresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/mapping.md mode change 100755 => 100644 docs/pkg/models/shared/mappingresponse.md mode change 100755 => 100644 docs/pkg/models/shared/metadata.md mode change 100755 => 100644 docs/pkg/models/shared/migrationinfo.md mode change 100755 => 100644 docs/pkg/models/shared/modulrconfig.md mode change 100755 => 100644 docs/pkg/models/shared/monetary.md mode change 100755 => 100644 docs/pkg/models/shared/payment.md mode change 100755 => 100644 docs/pkg/models/shared/paymentadjustment.md mode change 100755 => 100644 docs/pkg/models/shared/paymentadjustmentraw.md mode change 100755 => 100644 docs/pkg/models/shared/paymentmetadata.md mode change 100755 => 100644 docs/pkg/models/shared/paymentmetadatachangelog.md mode change 100755 => 100644 docs/pkg/models/shared/paymentresponse.md mode change 100755 => 100644 docs/pkg/models/shared/paymentsaccount.md mode change 100755 => 100644 docs/pkg/models/shared/paymentsaccounttype.md mode change 100755 => 100644 docs/pkg/models/shared/paymentscursor.md mode change 100755 => 100644 docs/pkg/models/shared/paymentscursorcursor.md mode change 100755 => 100644 docs/pkg/models/shared/paymentstatus.md mode change 100755 => 100644 docs/pkg/models/shared/paymenttype.md mode change 100755 => 100644 docs/pkg/models/shared/posting.md mode change 100755 => 100644 docs/pkg/models/shared/posttransaction.md mode change 100755 => 100644 docs/pkg/models/shared/posttransactionscript.md mode change 100755 => 100644 docs/pkg/models/shared/posttransactionvars.md mode change 100755 => 100644 docs/pkg/models/shared/query.md mode change 100755 => 100644 docs/pkg/models/shared/raw.md mode change 100755 => 100644 docs/pkg/models/shared/readclientresponse.md mode change 100755 => 100644 docs/pkg/models/shared/readscoperesponse.md mode change 100755 => 100644 docs/pkg/models/shared/readuserresponse.md mode change 100755 => 100644 docs/pkg/models/shared/response.md mode change 100755 => 100644 docs/pkg/models/shared/responsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/responsedata.md mode change 100755 => 100644 docs/pkg/models/shared/responseschemasdata.md mode change 100755 => 100644 docs/pkg/models/shared/runworkflowresponse.md mode change 100755 => 100644 docs/pkg/models/shared/scheme.md mode change 100755 => 100644 docs/pkg/models/shared/scope.md mode change 100755 => 100644 docs/pkg/models/shared/script.md mode change 100755 => 100644 docs/pkg/models/shared/scriptresponse.md mode change 100755 => 100644 docs/pkg/models/shared/secret.md mode change 100755 => 100644 docs/pkg/models/shared/security.md mode change 100755 => 100644 docs/pkg/models/shared/serverinfo.md mode change 100755 => 100644 docs/pkg/models/shared/stagestatus.md mode change 100755 => 100644 docs/pkg/models/shared/state.md mode change 100755 => 100644 docs/pkg/models/shared/stats.md mode change 100755 => 100644 docs/pkg/models/shared/statsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/storage.md mode change 100755 => 100644 docs/pkg/models/shared/stripeconfig.md mode change 100755 => 100644 docs/pkg/models/shared/stripetransferrequest.md mode change 100755 => 100644 docs/pkg/models/shared/stripetransferrequestmetadata.md mode change 100755 => 100644 docs/pkg/models/shared/stripetransferresponse.md mode change 100755 => 100644 docs/pkg/models/shared/subject.md mode change 100755 => 100644 docs/pkg/models/shared/taskbankingcircle.md mode change 100755 => 100644 docs/pkg/models/shared/taskbankingcirclestate.md mode change 100755 => 100644 docs/pkg/models/shared/taskcurrencycloud.md mode change 100755 => 100644 docs/pkg/models/shared/taskcurrencyclouddescriptor.md mode change 100755 => 100644 docs/pkg/models/shared/taskcurrencycloudstate.md mode change 100755 => 100644 docs/pkg/models/shared/taskdummypay.md mode change 100755 => 100644 docs/pkg/models/shared/taskdummypaydescriptor.md mode change 100755 => 100644 docs/pkg/models/shared/taskdummypaystate.md mode change 100755 => 100644 docs/pkg/models/shared/taskmodulr.md mode change 100755 => 100644 docs/pkg/models/shared/taskmodulrdescriptor.md mode change 100755 => 100644 docs/pkg/models/shared/taskmodulrstate.md mode change 100755 => 100644 docs/pkg/models/shared/taskresponse.md mode change 100755 => 100644 docs/pkg/models/shared/taskresponsedata.md mode change 100755 => 100644 docs/pkg/models/shared/taskscursor.md mode change 100755 => 100644 docs/pkg/models/shared/taskscursorcursor.md mode change 100755 => 100644 docs/pkg/models/shared/taskscursordata.md mode change 100755 => 100644 docs/pkg/models/shared/taskstripe.md mode change 100755 => 100644 docs/pkg/models/shared/taskstripedescriptor.md mode change 100755 => 100644 docs/pkg/models/shared/taskstripestate.md mode change 100755 => 100644 docs/pkg/models/shared/taskwise.md mode change 100755 => 100644 docs/pkg/models/shared/taskwisedescriptor.md mode change 100755 => 100644 docs/pkg/models/shared/taskwisestate.md mode change 100755 => 100644 docs/pkg/models/shared/total.md mode change 100755 => 100644 docs/pkg/models/shared/transaction.md mode change 100755 => 100644 docs/pkg/models/shared/transactiondata.md mode change 100755 => 100644 docs/pkg/models/shared/transactionresponse.md mode change 100755 => 100644 docs/pkg/models/shared/transactions.md mode change 100755 => 100644 docs/pkg/models/shared/transactionscursorresponse.md mode change 100755 => 100644 docs/pkg/models/shared/transactionscursorresponsecursor.md mode change 100755 => 100644 docs/pkg/models/shared/transactionsresponse.md mode change 100755 => 100644 docs/pkg/models/shared/type.md mode change 100755 => 100644 docs/pkg/models/shared/updateclientrequest.md mode change 100755 => 100644 docs/pkg/models/shared/updateclientresponse.md mode change 100755 => 100644 docs/pkg/models/shared/updatescoperequest.md mode change 100755 => 100644 docs/pkg/models/shared/updatescoperesponse.md mode change 100755 => 100644 docs/pkg/models/shared/user.md mode change 100755 => 100644 docs/pkg/models/shared/vars.md mode change 100755 => 100644 docs/pkg/models/shared/volume.md mode change 100755 => 100644 docs/pkg/models/shared/wallet.md mode change 100755 => 100644 docs/pkg/models/shared/walletserrorresponse.md mode change 100755 => 100644 docs/pkg/models/shared/walletserrorresponseerrorcode.md mode change 100755 => 100644 docs/pkg/models/shared/walletstransaction.md mode change 100755 => 100644 docs/pkg/models/shared/walletsubject.md mode change 100755 => 100644 docs/pkg/models/shared/walletsvolume.md mode change 100755 => 100644 docs/pkg/models/shared/walletwithbalances.md mode change 100755 => 100644 docs/pkg/models/shared/webhooksconfig.md mode change 100755 => 100644 docs/pkg/models/shared/wiseconfig.md mode change 100755 => 100644 docs/pkg/models/shared/workflow.md mode change 100755 => 100644 docs/pkg/models/shared/workflowconfig.md mode change 100755 => 100644 docs/pkg/models/shared/workflowoccurrence.md mode change 100755 => 100644 docs/sdks/accounts/README.md mode change 100755 => 100644 docs/sdks/balances/README.md mode change 100755 => 100644 docs/sdks/clients/README.md mode change 100755 => 100644 docs/sdks/formance/README.md mode change 100755 => 100644 docs/sdks/ledger/README.md mode change 100755 => 100644 docs/sdks/logs/README.md mode change 100755 => 100644 docs/sdks/mapping/README.md mode change 100755 => 100644 docs/sdks/orchestration/README.md mode change 100755 => 100644 docs/sdks/payments/README.md mode change 100755 => 100644 docs/sdks/scopes/README.md mode change 100755 => 100644 docs/sdks/script/README.md mode change 100755 => 100644 docs/sdks/search/README.md mode change 100755 => 100644 docs/sdks/server/README.md mode change 100755 => 100644 docs/sdks/stats/README.md mode change 100755 => 100644 docs/sdks/transactions/README.md mode change 100755 => 100644 docs/sdks/users/README.md mode change 100755 => 100644 docs/sdks/wallets/README.md mode change 100755 => 100644 docs/sdks/webhooks/README.md mode change 100755 => 100644 formance.go mode change 100755 => 100644 go.mod mode change 100755 => 100644 go.sum mode change 100755 => 100644 ledger.go mode change 100755 => 100644 logs.go mode change 100755 => 100644 mapping.go mode change 100755 => 100644 orchestration.go mode change 100755 => 100644 payments.go mode change 100755 => 100644 pkg/models/operations/activateconfig.go mode change 100755 => 100644 pkg/models/operations/addmetadataontransaction.go mode change 100755 => 100644 pkg/models/operations/addmetadatatoaccount.go mode change 100755 => 100644 pkg/models/operations/addscopetoclient.go mode change 100755 => 100644 pkg/models/operations/addtransientscope.go mode change 100755 => 100644 pkg/models/operations/changeconfigsecret.go mode change 100755 => 100644 pkg/models/operations/confirmhold.go mode change 100755 => 100644 pkg/models/operations/connectorsstripetransfer.go mode change 100755 => 100644 pkg/models/operations/countaccounts.go mode change 100755 => 100644 pkg/models/operations/counttransactions.go mode change 100755 => 100644 pkg/models/operations/createbalance.go mode change 100755 => 100644 pkg/models/operations/createclient.go mode change 100755 => 100644 pkg/models/operations/createscope.go mode change 100755 => 100644 pkg/models/operations/createsecret.go mode change 100755 => 100644 pkg/models/operations/createtransaction.go mode change 100755 => 100644 pkg/models/operations/createtransactions.go mode change 100755 => 100644 pkg/models/operations/createwallet.go mode change 100755 => 100644 pkg/models/operations/createworkflow.go mode change 100755 => 100644 pkg/models/operations/creditwallet.go mode change 100755 => 100644 pkg/models/operations/deactivateconfig.go mode change 100755 => 100644 pkg/models/operations/debitwallet.go mode change 100755 => 100644 pkg/models/operations/deleteclient.go mode change 100755 => 100644 pkg/models/operations/deleteconfig.go mode change 100755 => 100644 pkg/models/operations/deletescope.go mode change 100755 => 100644 pkg/models/operations/deletescopefromclient.go mode change 100755 => 100644 pkg/models/operations/deletesecret.go mode change 100755 => 100644 pkg/models/operations/deletetransientscope.go mode change 100755 => 100644 pkg/models/operations/getaccount.go mode change 100755 => 100644 pkg/models/operations/getbalance.go mode change 100755 => 100644 pkg/models/operations/getbalances.go mode change 100755 => 100644 pkg/models/operations/getbalancesaggregated.go mode change 100755 => 100644 pkg/models/operations/getconnectortask.go mode change 100755 => 100644 pkg/models/operations/getflow.go mode change 100755 => 100644 pkg/models/operations/gethold.go mode change 100755 => 100644 pkg/models/operations/getholds.go mode change 100755 => 100644 pkg/models/operations/getinfo.go mode change 100755 => 100644 pkg/models/operations/getledgerinfo.go mode change 100755 => 100644 pkg/models/operations/getmanyconfigs.go mode change 100755 => 100644 pkg/models/operations/getmapping.go mode change 100755 => 100644 pkg/models/operations/getpayment.go mode change 100755 => 100644 pkg/models/operations/getserverinfo.go mode change 100755 => 100644 pkg/models/operations/gettransaction.go mode change 100755 => 100644 pkg/models/operations/gettransactions.go mode change 100755 => 100644 pkg/models/operations/getwallet.go mode change 100755 => 100644 pkg/models/operations/getworkflowoccurrence.go mode change 100755 => 100644 pkg/models/operations/insertconfig.go mode change 100755 => 100644 pkg/models/operations/installconnector.go mode change 100755 => 100644 pkg/models/operations/listaccounts.go mode change 100755 => 100644 pkg/models/operations/listallconnectors.go mode change 100755 => 100644 pkg/models/operations/listbalances.go mode change 100755 => 100644 pkg/models/operations/listclients.go mode change 100755 => 100644 pkg/models/operations/listconfigsavailableconnectors.go mode change 100755 => 100644 pkg/models/operations/listconnectortasks.go mode change 100755 => 100644 pkg/models/operations/listflows.go mode change 100755 => 100644 pkg/models/operations/listlogs.go mode change 100755 => 100644 pkg/models/operations/listpayments.go mode change 100755 => 100644 pkg/models/operations/listruns.go mode change 100755 => 100644 pkg/models/operations/listscopes.go mode change 100755 => 100644 pkg/models/operations/listtransactions.go mode change 100755 => 100644 pkg/models/operations/listusers.go mode change 100755 => 100644 pkg/models/operations/listwallets.go mode change 100755 => 100644 pkg/models/operations/orchestrationgetserverinfo.go mode change 100755 => 100644 pkg/models/operations/paymentsgetserverinfo.go mode change 100755 => 100644 pkg/models/operations/paymentslistaccounts.go mode change 100755 => 100644 pkg/models/operations/readclient.go mode change 100755 => 100644 pkg/models/operations/readconnectorconfig.go mode change 100755 => 100644 pkg/models/operations/readscope.go mode change 100755 => 100644 pkg/models/operations/readstats.go mode change 100755 => 100644 pkg/models/operations/readuser.go mode change 100755 => 100644 pkg/models/operations/resetconnector.go mode change 100755 => 100644 pkg/models/operations/reverttransaction.go mode change 100755 => 100644 pkg/models/operations/runscript.go mode change 100755 => 100644 pkg/models/operations/runworkflow.go mode change 100755 => 100644 pkg/models/operations/search.go mode change 100755 => 100644 pkg/models/operations/searchgetserverinfo.go mode change 100755 => 100644 pkg/models/operations/testconfig.go mode change 100755 => 100644 pkg/models/operations/uninstallconnector.go mode change 100755 => 100644 pkg/models/operations/updateclient.go mode change 100755 => 100644 pkg/models/operations/updatemapping.go mode change 100755 => 100644 pkg/models/operations/updatescope.go mode change 100755 => 100644 pkg/models/operations/updatewallet.go mode change 100755 => 100644 pkg/models/operations/voidhold.go mode change 100755 => 100644 pkg/models/operations/walletsgetserverinfo.go mode change 100755 => 100644 pkg/models/sdkerrors/sdkerror.go mode change 100755 => 100644 pkg/models/shared/account.go mode change 100755 => 100644 pkg/models/shared/accountresponse.go mode change 100755 => 100644 pkg/models/shared/accountscursor.go mode change 100755 => 100644 pkg/models/shared/accountscursorresponse.go mode change 100755 => 100644 pkg/models/shared/accountwithvolumesandbalances.go mode change 100755 => 100644 pkg/models/shared/aggregatebalancesresponse.go mode change 100755 => 100644 pkg/models/shared/assetholder.go mode change 100755 => 100644 pkg/models/shared/attempt.go mode change 100755 => 100644 pkg/models/shared/attemptresponse.go mode change 100755 => 100644 pkg/models/shared/balance.go mode change 100755 => 100644 pkg/models/shared/balancescursorresponse.go mode change 100755 => 100644 pkg/models/shared/balancewithassets.go mode change 100755 => 100644 pkg/models/shared/bankingcircleconfig.go mode change 100755 => 100644 pkg/models/shared/client.go mode change 100755 => 100644 pkg/models/shared/clientsecret.go mode change 100755 => 100644 pkg/models/shared/config.go mode change 100755 => 100644 pkg/models/shared/configchangesecret.go mode change 100755 => 100644 pkg/models/shared/configinfo.go mode change 100755 => 100644 pkg/models/shared/configinforesponse.go mode change 100755 => 100644 pkg/models/shared/configresponse.go mode change 100755 => 100644 pkg/models/shared/configsresponse.go mode change 100755 => 100644 pkg/models/shared/configuser.go mode change 100755 => 100644 pkg/models/shared/confirmholdrequest.go mode change 100755 => 100644 pkg/models/shared/connector.go mode change 100755 => 100644 pkg/models/shared/connectorconfig.go mode change 100755 => 100644 pkg/models/shared/connectorconfigresponse.go mode change 100755 => 100644 pkg/models/shared/connectorsconfigsresponse.go mode change 100755 => 100644 pkg/models/shared/connectorsresponse.go mode change 100755 => 100644 pkg/models/shared/contract.go mode change 100755 => 100644 pkg/models/shared/createbalancerequest.go mode change 100755 => 100644 pkg/models/shared/createbalanceresponse.go mode change 100755 => 100644 pkg/models/shared/createclientrequest.go mode change 100755 => 100644 pkg/models/shared/createclientresponse.go mode change 100755 => 100644 pkg/models/shared/createscoperequest.go mode change 100755 => 100644 pkg/models/shared/createscoperesponse.go mode change 100755 => 100644 pkg/models/shared/createsecretrequest.go mode change 100755 => 100644 pkg/models/shared/createsecretresponse.go mode change 100755 => 100644 pkg/models/shared/createwalletrequest.go mode change 100755 => 100644 pkg/models/shared/createwalletresponse.go mode change 100755 => 100644 pkg/models/shared/createworkflowrequest.go mode change 100755 => 100644 pkg/models/shared/createworkflowresponse.go mode change 100755 => 100644 pkg/models/shared/creditwalletrequest.go mode change 100755 => 100644 pkg/models/shared/currencycloudconfig.go mode change 100755 => 100644 pkg/models/shared/debitwalletrequest.go mode change 100755 => 100644 pkg/models/shared/debitwalletresponse.go mode change 100755 => 100644 pkg/models/shared/dummypayconfig.go mode change 100755 => 100644 pkg/models/shared/error.go mode change 100755 => 100644 pkg/models/shared/errorresponse.go mode change 100755 => 100644 pkg/models/shared/errorsenum.go mode change 100755 => 100644 pkg/models/shared/expandeddebithold.go mode change 100755 => 100644 pkg/models/shared/getbalanceresponse.go mode change 100755 => 100644 pkg/models/shared/getholdresponse.go mode change 100755 => 100644 pkg/models/shared/getholdsresponse.go mode change 100755 => 100644 pkg/models/shared/gettransactionsresponse.go mode change 100755 => 100644 pkg/models/shared/getwalletresponse.go mode change 100755 => 100644 pkg/models/shared/getworkflowoccurrenceresponse.go mode change 100755 => 100644 pkg/models/shared/getworkflowresponse.go mode change 100755 => 100644 pkg/models/shared/hold.go mode change 100755 => 100644 pkg/models/shared/ledgeraccountsubject.go mode change 100755 => 100644 pkg/models/shared/ledgerinfo.go mode change 100755 => 100644 pkg/models/shared/ledgerinforesponse.go mode change 100755 => 100644 pkg/models/shared/ledgerstorage.go mode change 100755 => 100644 pkg/models/shared/listbalancesresponse.go mode change 100755 => 100644 pkg/models/shared/listclientsresponse.go mode change 100755 => 100644 pkg/models/shared/listrunsresponse.go mode change 100755 => 100644 pkg/models/shared/listscopesresponse.go mode change 100755 => 100644 pkg/models/shared/listusersresponse.go mode change 100755 => 100644 pkg/models/shared/listwalletsresponse.go mode change 100755 => 100644 pkg/models/shared/listworkflowsresponse.go mode change 100755 => 100644 pkg/models/shared/log.go mode change 100755 => 100644 pkg/models/shared/logscursorresponse.go mode change 100755 => 100644 pkg/models/shared/mapping.go mode change 100755 => 100644 pkg/models/shared/mappingresponse.go mode change 100755 => 100644 pkg/models/shared/migrationinfo.go mode change 100755 => 100644 pkg/models/shared/modulrconfig.go mode change 100755 => 100644 pkg/models/shared/monetary.go mode change 100755 => 100644 pkg/models/shared/payment.go mode change 100755 => 100644 pkg/models/shared/paymentadjustment.go mode change 100755 => 100644 pkg/models/shared/paymentmetadata.go mode change 100755 => 100644 pkg/models/shared/paymentmetadatachangelog.go mode change 100755 => 100644 pkg/models/shared/paymentresponse.go mode change 100755 => 100644 pkg/models/shared/paymentsaccount.go mode change 100755 => 100644 pkg/models/shared/paymentscursor.go mode change 100755 => 100644 pkg/models/shared/paymentstatus.go mode change 100755 => 100644 pkg/models/shared/posting.go mode change 100755 => 100644 pkg/models/shared/posttransaction.go mode change 100755 => 100644 pkg/models/shared/query.go mode change 100755 => 100644 pkg/models/shared/readclientresponse.go mode change 100755 => 100644 pkg/models/shared/readscoperesponse.go mode change 100755 => 100644 pkg/models/shared/readuserresponse.go mode change 100755 => 100644 pkg/models/shared/response.go mode change 100755 => 100644 pkg/models/shared/runworkflowresponse.go mode change 100755 => 100644 pkg/models/shared/scope.go mode change 100755 => 100644 pkg/models/shared/script.go mode change 100755 => 100644 pkg/models/shared/scriptresponse.go mode change 100755 => 100644 pkg/models/shared/secret.go mode change 100755 => 100644 pkg/models/shared/security.go mode change 100755 => 100644 pkg/models/shared/serverinfo.go mode change 100755 => 100644 pkg/models/shared/stagestatus.go mode change 100755 => 100644 pkg/models/shared/stats.go mode change 100755 => 100644 pkg/models/shared/statsresponse.go mode change 100755 => 100644 pkg/models/shared/stripeconfig.go mode change 100755 => 100644 pkg/models/shared/stripetransferrequest.go mode change 100755 => 100644 pkg/models/shared/stripetransferresponse.go mode change 100755 => 100644 pkg/models/shared/subject.go mode change 100755 => 100644 pkg/models/shared/taskbankingcircle.go mode change 100755 => 100644 pkg/models/shared/taskcurrencycloud.go mode change 100755 => 100644 pkg/models/shared/taskdummypay.go mode change 100755 => 100644 pkg/models/shared/taskmodulr.go mode change 100755 => 100644 pkg/models/shared/taskresponse.go mode change 100755 => 100644 pkg/models/shared/taskscursor.go mode change 100755 => 100644 pkg/models/shared/taskstripe.go mode change 100755 => 100644 pkg/models/shared/taskwise.go mode change 100755 => 100644 pkg/models/shared/transaction.go mode change 100755 => 100644 pkg/models/shared/transactiondata.go mode change 100755 => 100644 pkg/models/shared/transactionresponse.go mode change 100755 => 100644 pkg/models/shared/transactions.go mode change 100755 => 100644 pkg/models/shared/transactionscursorresponse.go mode change 100755 => 100644 pkg/models/shared/transactionsresponse.go mode change 100755 => 100644 pkg/models/shared/updateclientrequest.go mode change 100755 => 100644 pkg/models/shared/updateclientresponse.go mode change 100755 => 100644 pkg/models/shared/updatescoperequest.go mode change 100755 => 100644 pkg/models/shared/updatescoperesponse.go mode change 100755 => 100644 pkg/models/shared/user.go mode change 100755 => 100644 pkg/models/shared/volume.go mode change 100755 => 100644 pkg/models/shared/wallet.go mode change 100755 => 100644 pkg/models/shared/walletserrorresponse.go mode change 100755 => 100644 pkg/models/shared/walletstransaction.go mode change 100755 => 100644 pkg/models/shared/walletsubject.go mode change 100755 => 100644 pkg/models/shared/walletsvolume.go mode change 100755 => 100644 pkg/models/shared/walletwithbalances.go mode change 100755 => 100644 pkg/models/shared/webhooksconfig.go mode change 100755 => 100644 pkg/models/shared/wiseconfig.go mode change 100755 => 100644 pkg/models/shared/workflow.go mode change 100755 => 100644 pkg/models/shared/workflowconfig.go mode change 100755 => 100644 pkg/models/shared/workflowoccurrence.go mode change 100755 => 100644 pkg/types/bigint.go mode change 100755 => 100644 pkg/types/date.go mode change 100755 => 100644 pkg/types/datetime.go mode change 100755 => 100644 pkg/types/decimal.go mode change 100755 => 100644 pkg/types/pointers.go mode change 100755 => 100644 pkg/utils/contenttype.go mode change 100755 => 100644 pkg/utils/form.go mode change 100755 => 100644 pkg/utils/headers.go mode change 100755 => 100644 pkg/utils/json.go mode change 100755 => 100644 pkg/utils/pathparams.go mode change 100755 => 100644 pkg/utils/queryparams.go mode change 100755 => 100644 pkg/utils/requestbody.go mode change 100755 => 100644 pkg/utils/retries.go mode change 100755 => 100644 pkg/utils/security.go mode change 100755 => 100644 pkg/utils/utils.go mode change 100755 => 100644 scopes.go mode change 100755 => 100644 script.go mode change 100755 => 100644 search.go mode change 100755 => 100644 server.go mode change 100755 => 100644 stats.go mode change 100755 => 100644 transactions.go mode change 100755 => 100644 users.go mode change 100755 => 100644 wallets.go mode change 100755 => 100644 webhooks.go diff --git a/.gitattributes b/.gitattributes old mode 100755 new mode 100644 diff --git a/README.md b/README.md index 7ba7801..bbc2e1b 100755 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ go get github.com/speakeasy-sdks/formance-go-sdk ## SDK Example Usage +### Example + ```go package main @@ -201,7 +203,7 @@ func main() { -# Error Handling +## Error Handling Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass. @@ -209,8 +211,7 @@ Handling errors in this SDK should largely match your expectations. All operati | ------------------ | ------------------ | ------------------ | | sdkerrors.SDKError | 400-600 | */* | - -## Example +### Example ```go package main @@ -245,9 +246,9 @@ func main() { -# Server Selection +## Server Selection -## Select Server by Index +### Select Server by Index You can override the default server globally using the `WithServerIndex` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: @@ -256,11 +257,7 @@ You can override the default server globally using the `WithServerIndex` option | 0 | `http://localhost` | None | | 1 | `https://{organization}.sandbox.formance.cloud` | `organization` | - -Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so: - * `WithOrganization string` - -For example: +#### Example ```go package main @@ -291,11 +288,14 @@ func main() { ``` +#### Variables -## Override Server URL Per-Client +Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so: + * `WithOrganization string` -The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example: +### Override Server URL Per-Client +The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example: ```go package main @@ -329,7 +329,7 @@ func main() { -# Custom HTTP Client +## Custom HTTP Client The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface: @@ -366,9 +366,9 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea -# Authentication +## Authentication -## Per-Client Security Schemes +### Per-Client Security Schemes This SDK supports the following security scheme globally: @@ -377,7 +377,6 @@ This SDK supports the following security scheme globally: | `Authorization` | oauth2 | OAuth2 token | You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example: - ```go package main diff --git a/RELEASES.md b/RELEASES.md index 7783566..d0489b1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -140,4 +140,14 @@ Based on: ### Generated - [go v0.5.1] . ### Releases -- [Go v0.5.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.1 - . \ No newline at end of file +- [Go v0.5.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.1 - . + +## 2023-11-10 00:39:04 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.118.3 (2.187.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.5.2] . +### Releases +- [Go v0.5.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.2 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md old mode 100755 new mode 100644 index d328943..430049c --- a/USAGE.md +++ b/USAGE.md @@ -1,6 +1,4 @@ - - ```go package main diff --git a/accounts.go b/accounts.go old mode 100755 new mode 100644 diff --git a/balances.go b/balances.go old mode 100755 new mode 100644 diff --git a/clients.go b/clients.go old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/activateconfigrequest.md b/docs/pkg/models/operations/activateconfigrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/activateconfigresponse.md b/docs/pkg/models/operations/activateconfigresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addmetadataontransactionrequest.md b/docs/pkg/models/operations/addmetadataontransactionrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addmetadataontransactionresponse.md b/docs/pkg/models/operations/addmetadataontransactionresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addmetadatatoaccountrequest.md b/docs/pkg/models/operations/addmetadatatoaccountrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addmetadatatoaccountresponse.md b/docs/pkg/models/operations/addmetadatatoaccountresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addscopetoclientrequest.md b/docs/pkg/models/operations/addscopetoclientrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addscopetoclientresponse.md b/docs/pkg/models/operations/addscopetoclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addtransientscoperequest.md b/docs/pkg/models/operations/addtransientscoperequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/addtransientscoperesponse.md b/docs/pkg/models/operations/addtransientscoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/balanceoperator.md b/docs/pkg/models/operations/balanceoperator.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/changeconfigsecretrequest.md b/docs/pkg/models/operations/changeconfigsecretrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/changeconfigsecretresponse.md b/docs/pkg/models/operations/changeconfigsecretresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/confirmholdrequest.md b/docs/pkg/models/operations/confirmholdrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/confirmholdresponse.md b/docs/pkg/models/operations/confirmholdresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/connectorsstripetransferresponse.md b/docs/pkg/models/operations/connectorsstripetransferresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/countaccountsrequest.md b/docs/pkg/models/operations/countaccountsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/countaccountsresponse.md b/docs/pkg/models/operations/countaccountsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/counttransactionsqueryparammetadata.md b/docs/pkg/models/operations/counttransactionsqueryparammetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/counttransactionsrequest.md b/docs/pkg/models/operations/counttransactionsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/counttransactionsresponse.md b/docs/pkg/models/operations/counttransactionsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createbalancerequest.md b/docs/pkg/models/operations/createbalancerequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createbalanceresponse.md b/docs/pkg/models/operations/createbalanceresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createclientresponse.md b/docs/pkg/models/operations/createclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createscoperesponse.md b/docs/pkg/models/operations/createscoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createsecretrequest.md b/docs/pkg/models/operations/createsecretrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createsecretresponse.md b/docs/pkg/models/operations/createsecretresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createtransactionrequest.md b/docs/pkg/models/operations/createtransactionrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createtransactionresponse.md b/docs/pkg/models/operations/createtransactionresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createtransactionsrequest.md b/docs/pkg/models/operations/createtransactionsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createtransactionsresponse.md b/docs/pkg/models/operations/createtransactionsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createwalletresponse.md b/docs/pkg/models/operations/createwalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/createworkflowresponse.md b/docs/pkg/models/operations/createworkflowresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/creditwalletrequest.md b/docs/pkg/models/operations/creditwalletrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/creditwalletresponse.md b/docs/pkg/models/operations/creditwalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deactivateconfigrequest.md b/docs/pkg/models/operations/deactivateconfigrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deactivateconfigresponse.md b/docs/pkg/models/operations/deactivateconfigresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/debitwalletrequest.md b/docs/pkg/models/operations/debitwalletrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/debitwalletresponse.md b/docs/pkg/models/operations/debitwalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deleteclientrequest.md b/docs/pkg/models/operations/deleteclientrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deleteclientresponse.md b/docs/pkg/models/operations/deleteclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deleteconfigrequest.md b/docs/pkg/models/operations/deleteconfigrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deleteconfigresponse.md b/docs/pkg/models/operations/deleteconfigresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletescopefromclientrequest.md b/docs/pkg/models/operations/deletescopefromclientrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletescopefromclientresponse.md b/docs/pkg/models/operations/deletescopefromclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletescoperequest.md b/docs/pkg/models/operations/deletescoperequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletescoperesponse.md b/docs/pkg/models/operations/deletescoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletesecretrequest.md b/docs/pkg/models/operations/deletesecretrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletesecretresponse.md b/docs/pkg/models/operations/deletesecretresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletetransientscoperequest.md b/docs/pkg/models/operations/deletetransientscoperequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/deletetransientscoperesponse.md b/docs/pkg/models/operations/deletetransientscoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getaccountrequest.md b/docs/pkg/models/operations/getaccountrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getaccountresponse.md b/docs/pkg/models/operations/getaccountresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getbalancerequest.md b/docs/pkg/models/operations/getbalancerequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getbalanceresponse.md b/docs/pkg/models/operations/getbalanceresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getbalancesaggregatedrequest.md b/docs/pkg/models/operations/getbalancesaggregatedrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getbalancesaggregatedresponse.md b/docs/pkg/models/operations/getbalancesaggregatedresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getbalancesrequest.md b/docs/pkg/models/operations/getbalancesrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getbalancesresponse.md b/docs/pkg/models/operations/getbalancesresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getconnectortaskrequest.md b/docs/pkg/models/operations/getconnectortaskrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getconnectortaskresponse.md b/docs/pkg/models/operations/getconnectortaskresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getflowrequest.md b/docs/pkg/models/operations/getflowrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getflowresponse.md b/docs/pkg/models/operations/getflowresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getholdrequest.md b/docs/pkg/models/operations/getholdrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getholdresponse.md b/docs/pkg/models/operations/getholdresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getholdsqueryparammetadata.md b/docs/pkg/models/operations/getholdsqueryparammetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getholdsrequest.md b/docs/pkg/models/operations/getholdsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getholdsresponse.md b/docs/pkg/models/operations/getholdsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getinforesponse.md b/docs/pkg/models/operations/getinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getledgerinforequest.md b/docs/pkg/models/operations/getledgerinforequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getledgerinforesponse.md b/docs/pkg/models/operations/getledgerinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getmanyconfigsrequest.md b/docs/pkg/models/operations/getmanyconfigsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getmanyconfigsresponse.md b/docs/pkg/models/operations/getmanyconfigsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getmappingrequest.md b/docs/pkg/models/operations/getmappingrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getmappingresponse.md b/docs/pkg/models/operations/getmappingresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getpaymentrequest.md b/docs/pkg/models/operations/getpaymentrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getpaymentresponse.md b/docs/pkg/models/operations/getpaymentresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getserverinforesponse.md b/docs/pkg/models/operations/getserverinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/gettransactionrequest.md b/docs/pkg/models/operations/gettransactionrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/gettransactionresponse.md b/docs/pkg/models/operations/gettransactionresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/gettransactionsrequest.md b/docs/pkg/models/operations/gettransactionsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/gettransactionsresponse.md b/docs/pkg/models/operations/gettransactionsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getwalletrequest.md b/docs/pkg/models/operations/getwalletrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getwalletresponse.md b/docs/pkg/models/operations/getwalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getworkflowoccurrencerequest.md b/docs/pkg/models/operations/getworkflowoccurrencerequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/getworkflowoccurrenceresponse.md b/docs/pkg/models/operations/getworkflowoccurrenceresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/insertconfigresponse.md b/docs/pkg/models/operations/insertconfigresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/installconnectorrequest.md b/docs/pkg/models/operations/installconnectorrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/installconnectorresponse.md b/docs/pkg/models/operations/installconnectorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listaccountsrequest.md b/docs/pkg/models/operations/listaccountsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listaccountsresponse.md b/docs/pkg/models/operations/listaccountsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listallconnectorsresponse.md b/docs/pkg/models/operations/listallconnectorsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listbalancesrequest.md b/docs/pkg/models/operations/listbalancesrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listbalancesresponse.md b/docs/pkg/models/operations/listbalancesresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listclientsresponse.md b/docs/pkg/models/operations/listclientsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md b/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listconnectortasksrequest.md b/docs/pkg/models/operations/listconnectortasksrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listconnectortasksresponse.md b/docs/pkg/models/operations/listconnectortasksresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listflowsresponse.md b/docs/pkg/models/operations/listflowsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listlogsrequest.md b/docs/pkg/models/operations/listlogsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listlogsresponse.md b/docs/pkg/models/operations/listlogsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listpaymentsrequest.md b/docs/pkg/models/operations/listpaymentsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listpaymentsresponse.md b/docs/pkg/models/operations/listpaymentsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listrunsrequest.md b/docs/pkg/models/operations/listrunsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listrunsresponse.md b/docs/pkg/models/operations/listrunsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listscopesresponse.md b/docs/pkg/models/operations/listscopesresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listtransactionsqueryparammetadata.md b/docs/pkg/models/operations/listtransactionsqueryparammetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listtransactionsrequest.md b/docs/pkg/models/operations/listtransactionsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listtransactionsresponse.md b/docs/pkg/models/operations/listtransactionsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listusersresponse.md b/docs/pkg/models/operations/listusersresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listwalletsqueryparammetadata.md b/docs/pkg/models/operations/listwalletsqueryparammetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listwalletsrequest.md b/docs/pkg/models/operations/listwalletsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/listwalletsresponse.md b/docs/pkg/models/operations/listwalletsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/metadata.md b/docs/pkg/models/operations/metadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/orchestrationgetserverinforesponse.md b/docs/pkg/models/operations/orchestrationgetserverinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/paymentsgetserverinforesponse.md b/docs/pkg/models/operations/paymentsgetserverinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/paymentslistaccountsrequest.md b/docs/pkg/models/operations/paymentslistaccountsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/paymentslistaccountsresponse.md b/docs/pkg/models/operations/paymentslistaccountsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/queryparambalanceoperator.md b/docs/pkg/models/operations/queryparambalanceoperator.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/queryparammetadata.md b/docs/pkg/models/operations/queryparammetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readclientrequest.md b/docs/pkg/models/operations/readclientrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readclientresponse.md b/docs/pkg/models/operations/readclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readconnectorconfigrequest.md b/docs/pkg/models/operations/readconnectorconfigrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readconnectorconfigresponse.md b/docs/pkg/models/operations/readconnectorconfigresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readscoperequest.md b/docs/pkg/models/operations/readscoperequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readscoperesponse.md b/docs/pkg/models/operations/readscoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readstatsrequest.md b/docs/pkg/models/operations/readstatsrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readstatsresponse.md b/docs/pkg/models/operations/readstatsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readuserrequest.md b/docs/pkg/models/operations/readuserrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/readuserresponse.md b/docs/pkg/models/operations/readuserresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/resetconnectorrequest.md b/docs/pkg/models/operations/resetconnectorrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/resetconnectorresponse.md b/docs/pkg/models/operations/resetconnectorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/reverttransactionrequest.md b/docs/pkg/models/operations/reverttransactionrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/reverttransactionresponse.md b/docs/pkg/models/operations/reverttransactionresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/runscriptrequest.md b/docs/pkg/models/operations/runscriptrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/runscriptresponse.md b/docs/pkg/models/operations/runscriptresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/runworkflowrequest.md b/docs/pkg/models/operations/runworkflowrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/runworkflowresponse.md b/docs/pkg/models/operations/runworkflowresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/searchgetserverinforesponse.md b/docs/pkg/models/operations/searchgetserverinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/searchresponse.md b/docs/pkg/models/operations/searchresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/testconfigrequest.md b/docs/pkg/models/operations/testconfigrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/testconfigresponse.md b/docs/pkg/models/operations/testconfigresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/uninstallconnectorrequest.md b/docs/pkg/models/operations/uninstallconnectorrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/uninstallconnectorresponse.md b/docs/pkg/models/operations/uninstallconnectorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updateclientrequest.md b/docs/pkg/models/operations/updateclientrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updateclientresponse.md b/docs/pkg/models/operations/updateclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updatemappingrequest.md b/docs/pkg/models/operations/updatemappingrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updatemappingresponse.md b/docs/pkg/models/operations/updatemappingresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updatescoperequest.md b/docs/pkg/models/operations/updatescoperequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updatescoperesponse.md b/docs/pkg/models/operations/updatescoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updatewalletrequest.md b/docs/pkg/models/operations/updatewalletrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updatewalletrequestbody.md b/docs/pkg/models/operations/updatewalletrequestbody.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/updatewalletresponse.md b/docs/pkg/models/operations/updatewalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/voidholdrequest.md b/docs/pkg/models/operations/voidholdrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/voidholdresponse.md b/docs/pkg/models/operations/voidholdresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/operations/walletsgetserverinforesponse.md b/docs/pkg/models/operations/walletsgetserverinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/account.md b/docs/pkg/models/shared/account.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/accountresponse.md b/docs/pkg/models/shared/accountresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/accountscursor.md b/docs/pkg/models/shared/accountscursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/accountscursorresponse.md b/docs/pkg/models/shared/accountscursorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/accountscursorresponsecursor.md b/docs/pkg/models/shared/accountscursorresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/accountwithvolumesandbalances.md b/docs/pkg/models/shared/accountwithvolumesandbalances.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/accountwithvolumesandbalancesmetadata.md b/docs/pkg/models/shared/accountwithvolumesandbalancesmetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/aggregatebalancesresponse.md b/docs/pkg/models/shared/aggregatebalancesresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/assetholder.md b/docs/pkg/models/shared/assetholder.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/attempt.md b/docs/pkg/models/shared/attempt.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/attemptresponse.md b/docs/pkg/models/shared/attemptresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/balance.md b/docs/pkg/models/shared/balance.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/balances.md b/docs/pkg/models/shared/balances.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/balancescursorresponse.md b/docs/pkg/models/shared/balancescursorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/balancescursorresponsecursor.md b/docs/pkg/models/shared/balancescursorresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/balancewithassets.md b/docs/pkg/models/shared/balancewithassets.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/bankingcircleconfig.md b/docs/pkg/models/shared/bankingcircleconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/client.md b/docs/pkg/models/shared/client.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/clientsecret.md b/docs/pkg/models/shared/clientsecret.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/config.md b/docs/pkg/models/shared/config.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/configchangesecret.md b/docs/pkg/models/shared/configchangesecret.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/configinfo.md b/docs/pkg/models/shared/configinfo.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/configinforesponse.md b/docs/pkg/models/shared/configinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/configresponse.md b/docs/pkg/models/shared/configresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/configsresponse.md b/docs/pkg/models/shared/configsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/configsresponsecursor.md b/docs/pkg/models/shared/configsresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/configuser.md b/docs/pkg/models/shared/configuser.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/confirmholdrequest.md b/docs/pkg/models/shared/confirmholdrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/connector.md b/docs/pkg/models/shared/connector.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/connectorconfig.md b/docs/pkg/models/shared/connectorconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/connectorconfigresponse.md b/docs/pkg/models/shared/connectorconfigresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/connectorsconfigsresponse.md b/docs/pkg/models/shared/connectorsconfigsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/connectorsconfigsresponseconnector.md b/docs/pkg/models/shared/connectorsconfigsresponseconnector.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/connectorsresponse.md b/docs/pkg/models/shared/connectorsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/connectorsresponsedata.md b/docs/pkg/models/shared/connectorsresponsedata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/contract.md b/docs/pkg/models/shared/contract.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createbalancerequest.md b/docs/pkg/models/shared/createbalancerequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createbalanceresponse.md b/docs/pkg/models/shared/createbalanceresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createclientrequest.md b/docs/pkg/models/shared/createclientrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createclientresponse.md b/docs/pkg/models/shared/createclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createscoperequest.md b/docs/pkg/models/shared/createscoperequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createscoperesponse.md b/docs/pkg/models/shared/createscoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createsecretrequest.md b/docs/pkg/models/shared/createsecretrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createsecretresponse.md b/docs/pkg/models/shared/createsecretresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createwalletrequest.md b/docs/pkg/models/shared/createwalletrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createwalletresponse.md b/docs/pkg/models/shared/createwalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createworkflowrequest.md b/docs/pkg/models/shared/createworkflowrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/createworkflowresponse.md b/docs/pkg/models/shared/createworkflowresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/creditwalletrequest.md b/docs/pkg/models/shared/creditwalletrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/currencycloudconfig.md b/docs/pkg/models/shared/currencycloudconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/cursor.md b/docs/pkg/models/shared/cursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/data.md b/docs/pkg/models/shared/data.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/debitwalletrequest.md b/docs/pkg/models/shared/debitwalletrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/debitwalletresponse.md b/docs/pkg/models/shared/debitwalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/descriptor.md b/docs/pkg/models/shared/descriptor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/dummypayconfig.md b/docs/pkg/models/shared/dummypayconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/error.md b/docs/pkg/models/shared/error.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/errorcode.md b/docs/pkg/models/shared/errorcode.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/errorresponse.md b/docs/pkg/models/shared/errorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/errorsenum.md b/docs/pkg/models/shared/errorsenum.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/expandeddebithold.md b/docs/pkg/models/shared/expandeddebithold.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/expr.md b/docs/pkg/models/shared/expr.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/getbalanceresponse.md b/docs/pkg/models/shared/getbalanceresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/getholdresponse.md b/docs/pkg/models/shared/getholdresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/getholdsresponse.md b/docs/pkg/models/shared/getholdsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/getholdsresponsecursor.md b/docs/pkg/models/shared/getholdsresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/gettransactionsresponse.md b/docs/pkg/models/shared/gettransactionsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/gettransactionsresponsecursor.md b/docs/pkg/models/shared/gettransactionsresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/getwalletresponse.md b/docs/pkg/models/shared/getwalletresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/getworkflowoccurrenceresponse.md b/docs/pkg/models/shared/getworkflowoccurrenceresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/getworkflowresponse.md b/docs/pkg/models/shared/getworkflowresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/hold.md b/docs/pkg/models/shared/hold.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/key.md b/docs/pkg/models/shared/key.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/ledgeraccountsubject.md b/docs/pkg/models/shared/ledgeraccountsubject.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/ledgerinfo.md b/docs/pkg/models/shared/ledgerinfo.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/ledgerinforesponse.md b/docs/pkg/models/shared/ledgerinforesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/ledgerstorage.md b/docs/pkg/models/shared/ledgerstorage.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listbalancesresponse.md b/docs/pkg/models/shared/listbalancesresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listbalancesresponsecursor.md b/docs/pkg/models/shared/listbalancesresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listclientsresponse.md b/docs/pkg/models/shared/listclientsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listrunsresponse.md b/docs/pkg/models/shared/listrunsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listrunsresponsecursor.md b/docs/pkg/models/shared/listrunsresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listscopesresponse.md b/docs/pkg/models/shared/listscopesresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listusersresponse.md b/docs/pkg/models/shared/listusersresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listwalletsresponse.md b/docs/pkg/models/shared/listwalletsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listwalletsresponsecursor.md b/docs/pkg/models/shared/listwalletsresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/listworkflowsresponse.md b/docs/pkg/models/shared/listworkflowsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/log.md b/docs/pkg/models/shared/log.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/logdata.md b/docs/pkg/models/shared/logdata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/logscursorresponse.md b/docs/pkg/models/shared/logscursorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/logscursorresponsecursor.md b/docs/pkg/models/shared/logscursorresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/mapping.md b/docs/pkg/models/shared/mapping.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/mappingresponse.md b/docs/pkg/models/shared/mappingresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/metadata.md b/docs/pkg/models/shared/metadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/migrationinfo.md b/docs/pkg/models/shared/migrationinfo.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/modulrconfig.md b/docs/pkg/models/shared/modulrconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/monetary.md b/docs/pkg/models/shared/monetary.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/payment.md b/docs/pkg/models/shared/payment.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentadjustment.md b/docs/pkg/models/shared/paymentadjustment.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentadjustmentraw.md b/docs/pkg/models/shared/paymentadjustmentraw.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentmetadata.md b/docs/pkg/models/shared/paymentmetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentmetadatachangelog.md b/docs/pkg/models/shared/paymentmetadatachangelog.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentresponse.md b/docs/pkg/models/shared/paymentresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentsaccount.md b/docs/pkg/models/shared/paymentsaccount.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentsaccounttype.md b/docs/pkg/models/shared/paymentsaccounttype.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentscursor.md b/docs/pkg/models/shared/paymentscursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentscursorcursor.md b/docs/pkg/models/shared/paymentscursorcursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymentstatus.md b/docs/pkg/models/shared/paymentstatus.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/paymenttype.md b/docs/pkg/models/shared/paymenttype.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/posting.md b/docs/pkg/models/shared/posting.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/posttransaction.md b/docs/pkg/models/shared/posttransaction.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/posttransactionscript.md b/docs/pkg/models/shared/posttransactionscript.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/posttransactionvars.md b/docs/pkg/models/shared/posttransactionvars.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/query.md b/docs/pkg/models/shared/query.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/raw.md b/docs/pkg/models/shared/raw.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/readclientresponse.md b/docs/pkg/models/shared/readclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/readscoperesponse.md b/docs/pkg/models/shared/readscoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/readuserresponse.md b/docs/pkg/models/shared/readuserresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/response.md b/docs/pkg/models/shared/response.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/responsecursor.md b/docs/pkg/models/shared/responsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/responsedata.md b/docs/pkg/models/shared/responsedata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/responseschemasdata.md b/docs/pkg/models/shared/responseschemasdata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/runworkflowresponse.md b/docs/pkg/models/shared/runworkflowresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/scheme.md b/docs/pkg/models/shared/scheme.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/scope.md b/docs/pkg/models/shared/scope.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/script.md b/docs/pkg/models/shared/script.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/scriptresponse.md b/docs/pkg/models/shared/scriptresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/secret.md b/docs/pkg/models/shared/secret.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/security.md b/docs/pkg/models/shared/security.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/serverinfo.md b/docs/pkg/models/shared/serverinfo.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/stagestatus.md b/docs/pkg/models/shared/stagestatus.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/state.md b/docs/pkg/models/shared/state.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/stats.md b/docs/pkg/models/shared/stats.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/statsresponse.md b/docs/pkg/models/shared/statsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/storage.md b/docs/pkg/models/shared/storage.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/stripeconfig.md b/docs/pkg/models/shared/stripeconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/stripetransferrequest.md b/docs/pkg/models/shared/stripetransferrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/stripetransferrequestmetadata.md b/docs/pkg/models/shared/stripetransferrequestmetadata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/stripetransferresponse.md b/docs/pkg/models/shared/stripetransferresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/subject.md b/docs/pkg/models/shared/subject.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskbankingcircle.md b/docs/pkg/models/shared/taskbankingcircle.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskbankingcirclestate.md b/docs/pkg/models/shared/taskbankingcirclestate.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskcurrencycloud.md b/docs/pkg/models/shared/taskcurrencycloud.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskcurrencyclouddescriptor.md b/docs/pkg/models/shared/taskcurrencyclouddescriptor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskcurrencycloudstate.md b/docs/pkg/models/shared/taskcurrencycloudstate.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskdummypay.md b/docs/pkg/models/shared/taskdummypay.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskdummypaydescriptor.md b/docs/pkg/models/shared/taskdummypaydescriptor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskdummypaystate.md b/docs/pkg/models/shared/taskdummypaystate.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskmodulr.md b/docs/pkg/models/shared/taskmodulr.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskmodulrdescriptor.md b/docs/pkg/models/shared/taskmodulrdescriptor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskmodulrstate.md b/docs/pkg/models/shared/taskmodulrstate.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskresponse.md b/docs/pkg/models/shared/taskresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskresponsedata.md b/docs/pkg/models/shared/taskresponsedata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskscursor.md b/docs/pkg/models/shared/taskscursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskscursorcursor.md b/docs/pkg/models/shared/taskscursorcursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskscursordata.md b/docs/pkg/models/shared/taskscursordata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskstripe.md b/docs/pkg/models/shared/taskstripe.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskstripedescriptor.md b/docs/pkg/models/shared/taskstripedescriptor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskstripestate.md b/docs/pkg/models/shared/taskstripestate.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskwise.md b/docs/pkg/models/shared/taskwise.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskwisedescriptor.md b/docs/pkg/models/shared/taskwisedescriptor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/taskwisestate.md b/docs/pkg/models/shared/taskwisestate.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/total.md b/docs/pkg/models/shared/total.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/transaction.md b/docs/pkg/models/shared/transaction.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/transactiondata.md b/docs/pkg/models/shared/transactiondata.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/transactionresponse.md b/docs/pkg/models/shared/transactionresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/transactions.md b/docs/pkg/models/shared/transactions.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/transactionscursorresponse.md b/docs/pkg/models/shared/transactionscursorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/transactionscursorresponsecursor.md b/docs/pkg/models/shared/transactionscursorresponsecursor.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/transactionsresponse.md b/docs/pkg/models/shared/transactionsresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/type.md b/docs/pkg/models/shared/type.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/updateclientrequest.md b/docs/pkg/models/shared/updateclientrequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/updateclientresponse.md b/docs/pkg/models/shared/updateclientresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/updatescoperequest.md b/docs/pkg/models/shared/updatescoperequest.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/updatescoperesponse.md b/docs/pkg/models/shared/updatescoperesponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/user.md b/docs/pkg/models/shared/user.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/vars.md b/docs/pkg/models/shared/vars.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/volume.md b/docs/pkg/models/shared/volume.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/wallet.md b/docs/pkg/models/shared/wallet.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/walletserrorresponse.md b/docs/pkg/models/shared/walletserrorresponse.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/walletserrorresponseerrorcode.md b/docs/pkg/models/shared/walletserrorresponseerrorcode.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/walletstransaction.md b/docs/pkg/models/shared/walletstransaction.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/walletsubject.md b/docs/pkg/models/shared/walletsubject.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/walletsvolume.md b/docs/pkg/models/shared/walletsvolume.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/walletwithbalances.md b/docs/pkg/models/shared/walletwithbalances.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/webhooksconfig.md b/docs/pkg/models/shared/webhooksconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/wiseconfig.md b/docs/pkg/models/shared/wiseconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/workflow.md b/docs/pkg/models/shared/workflow.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/workflowconfig.md b/docs/pkg/models/shared/workflowconfig.md old mode 100755 new mode 100644 diff --git a/docs/pkg/models/shared/workflowoccurrence.md b/docs/pkg/models/shared/workflowoccurrence.md old mode 100755 new mode 100644 diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md old mode 100755 new mode 100644 index 50beb91..c1d522c --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -41,8 +41,8 @@ func main() { Transactions: []shared.TransactionData{ shared.TransactionData{ Metadata: map[string]interface{}{ - "a": "string", "admin": "string", + "a": "string", }, Postings: []shared.Posting{ shared.Posting{ diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md old mode 100755 new mode 100644 diff --git a/formance.go b/formance.go old mode 100755 new mode 100644 index 0508473..3cee883 --- a/formance.go +++ b/formance.go @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.5.1", - GenVersion: "2.185.0", - UserAgent: "speakeasy-sdk/go 0.5.1 2.185.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.5.2", + GenVersion: "2.187.7", + UserAgent: "speakeasy-sdk/go 0.5.2 2.187.7 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index a9a069e..5d13b94 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,16 +2,18 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.116.0 - generationVersion: 2.185.0 + speakeasyVersion: 1.118.3 + generationVersion: 2.187.7 generation: comments: {} sdkClassName: formance repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git + usageSnippets: + optionalPropertyRendering: withExample features: go: constsAndDefaults: 0.1.1 - core: 3.1.2 + core: 3.1.4 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.2 @@ -19,7 +21,7 @@ features: nameOverrides: 2.81.1 unions: 2.85.0 go: - version: 0.5.1 + version: 0.5.2 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/go.mod b/go.mod old mode 100755 new mode 100644 diff --git a/go.sum b/go.sum old mode 100755 new mode 100644 diff --git a/ledger.go b/ledger.go old mode 100755 new mode 100644 diff --git a/logs.go b/logs.go old mode 100755 new mode 100644 diff --git a/mapping.go b/mapping.go old mode 100755 new mode 100644 diff --git a/orchestration.go b/orchestration.go old mode 100755 new mode 100644 diff --git a/payments.go b/payments.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/activateconfig.go b/pkg/models/operations/activateconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/addmetadataontransaction.go b/pkg/models/operations/addmetadataontransaction.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/addmetadatatoaccount.go b/pkg/models/operations/addmetadatatoaccount.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/addscopetoclient.go b/pkg/models/operations/addscopetoclient.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/addtransientscope.go b/pkg/models/operations/addtransientscope.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/changeconfigsecret.go b/pkg/models/operations/changeconfigsecret.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/confirmhold.go b/pkg/models/operations/confirmhold.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/connectorsstripetransfer.go b/pkg/models/operations/connectorsstripetransfer.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/countaccounts.go b/pkg/models/operations/countaccounts.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/counttransactions.go b/pkg/models/operations/counttransactions.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createbalance.go b/pkg/models/operations/createbalance.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createclient.go b/pkg/models/operations/createclient.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createscope.go b/pkg/models/operations/createscope.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createsecret.go b/pkg/models/operations/createsecret.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createtransaction.go b/pkg/models/operations/createtransaction.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createtransactions.go b/pkg/models/operations/createtransactions.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createwallet.go b/pkg/models/operations/createwallet.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/createworkflow.go b/pkg/models/operations/createworkflow.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/creditwallet.go b/pkg/models/operations/creditwallet.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/deactivateconfig.go b/pkg/models/operations/deactivateconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/debitwallet.go b/pkg/models/operations/debitwallet.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/deleteclient.go b/pkg/models/operations/deleteclient.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/deleteconfig.go b/pkg/models/operations/deleteconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/deletescope.go b/pkg/models/operations/deletescope.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/deletescopefromclient.go b/pkg/models/operations/deletescopefromclient.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/deletesecret.go b/pkg/models/operations/deletesecret.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/deletetransientscope.go b/pkg/models/operations/deletetransientscope.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getaccount.go b/pkg/models/operations/getaccount.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getbalance.go b/pkg/models/operations/getbalance.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getbalances.go b/pkg/models/operations/getbalances.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getbalancesaggregated.go b/pkg/models/operations/getbalancesaggregated.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getconnectortask.go b/pkg/models/operations/getconnectortask.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getflow.go b/pkg/models/operations/getflow.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/gethold.go b/pkg/models/operations/gethold.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getholds.go b/pkg/models/operations/getholds.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getinfo.go b/pkg/models/operations/getinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getledgerinfo.go b/pkg/models/operations/getledgerinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getmanyconfigs.go b/pkg/models/operations/getmanyconfigs.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getmapping.go b/pkg/models/operations/getmapping.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getpayment.go b/pkg/models/operations/getpayment.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getserverinfo.go b/pkg/models/operations/getserverinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/gettransaction.go b/pkg/models/operations/gettransaction.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/gettransactions.go b/pkg/models/operations/gettransactions.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getwallet.go b/pkg/models/operations/getwallet.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/getworkflowoccurrence.go b/pkg/models/operations/getworkflowoccurrence.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/insertconfig.go b/pkg/models/operations/insertconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/installconnector.go b/pkg/models/operations/installconnector.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listaccounts.go b/pkg/models/operations/listaccounts.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listallconnectors.go b/pkg/models/operations/listallconnectors.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listbalances.go b/pkg/models/operations/listbalances.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listclients.go b/pkg/models/operations/listclients.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listconfigsavailableconnectors.go b/pkg/models/operations/listconfigsavailableconnectors.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listconnectortasks.go b/pkg/models/operations/listconnectortasks.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listflows.go b/pkg/models/operations/listflows.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listlogs.go b/pkg/models/operations/listlogs.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listpayments.go b/pkg/models/operations/listpayments.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listruns.go b/pkg/models/operations/listruns.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listscopes.go b/pkg/models/operations/listscopes.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listtransactions.go b/pkg/models/operations/listtransactions.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listusers.go b/pkg/models/operations/listusers.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/listwallets.go b/pkg/models/operations/listwallets.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/orchestrationgetserverinfo.go b/pkg/models/operations/orchestrationgetserverinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/paymentsgetserverinfo.go b/pkg/models/operations/paymentsgetserverinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/paymentslistaccounts.go b/pkg/models/operations/paymentslistaccounts.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/readclient.go b/pkg/models/operations/readclient.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/readconnectorconfig.go b/pkg/models/operations/readconnectorconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/readscope.go b/pkg/models/operations/readscope.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/readstats.go b/pkg/models/operations/readstats.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/readuser.go b/pkg/models/operations/readuser.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/resetconnector.go b/pkg/models/operations/resetconnector.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/reverttransaction.go b/pkg/models/operations/reverttransaction.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/runscript.go b/pkg/models/operations/runscript.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/runworkflow.go b/pkg/models/operations/runworkflow.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/search.go b/pkg/models/operations/search.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/searchgetserverinfo.go b/pkg/models/operations/searchgetserverinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/testconfig.go b/pkg/models/operations/testconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/uninstallconnector.go b/pkg/models/operations/uninstallconnector.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/updateclient.go b/pkg/models/operations/updateclient.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/updatemapping.go b/pkg/models/operations/updatemapping.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/updatescope.go b/pkg/models/operations/updatescope.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/updatewallet.go b/pkg/models/operations/updatewallet.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/voidhold.go b/pkg/models/operations/voidhold.go old mode 100755 new mode 100644 diff --git a/pkg/models/operations/walletsgetserverinfo.go b/pkg/models/operations/walletsgetserverinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/sdkerrors/sdkerror.go b/pkg/models/sdkerrors/sdkerror.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/account.go b/pkg/models/shared/account.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/accountresponse.go b/pkg/models/shared/accountresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/accountscursor.go b/pkg/models/shared/accountscursor.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/accountscursorresponse.go b/pkg/models/shared/accountscursorresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/accountwithvolumesandbalances.go b/pkg/models/shared/accountwithvolumesandbalances.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/aggregatebalancesresponse.go b/pkg/models/shared/aggregatebalancesresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/assetholder.go b/pkg/models/shared/assetholder.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/attempt.go b/pkg/models/shared/attempt.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/attemptresponse.go b/pkg/models/shared/attemptresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/balance.go b/pkg/models/shared/balance.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/balancescursorresponse.go b/pkg/models/shared/balancescursorresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/balancewithassets.go b/pkg/models/shared/balancewithassets.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/bankingcircleconfig.go b/pkg/models/shared/bankingcircleconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/client.go b/pkg/models/shared/client.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/clientsecret.go b/pkg/models/shared/clientsecret.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/config.go b/pkg/models/shared/config.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/configchangesecret.go b/pkg/models/shared/configchangesecret.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/configinfo.go b/pkg/models/shared/configinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/configinforesponse.go b/pkg/models/shared/configinforesponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/configresponse.go b/pkg/models/shared/configresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/configsresponse.go b/pkg/models/shared/configsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/configuser.go b/pkg/models/shared/configuser.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/confirmholdrequest.go b/pkg/models/shared/confirmholdrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/connector.go b/pkg/models/shared/connector.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/connectorconfig.go b/pkg/models/shared/connectorconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/connectorconfigresponse.go b/pkg/models/shared/connectorconfigresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/connectorsconfigsresponse.go b/pkg/models/shared/connectorsconfigsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/connectorsresponse.go b/pkg/models/shared/connectorsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/contract.go b/pkg/models/shared/contract.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createbalancerequest.go b/pkg/models/shared/createbalancerequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createbalanceresponse.go b/pkg/models/shared/createbalanceresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createclientrequest.go b/pkg/models/shared/createclientrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createclientresponse.go b/pkg/models/shared/createclientresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createscoperequest.go b/pkg/models/shared/createscoperequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createscoperesponse.go b/pkg/models/shared/createscoperesponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createsecretrequest.go b/pkg/models/shared/createsecretrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createsecretresponse.go b/pkg/models/shared/createsecretresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createwalletrequest.go b/pkg/models/shared/createwalletrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createwalletresponse.go b/pkg/models/shared/createwalletresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createworkflowrequest.go b/pkg/models/shared/createworkflowrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/createworkflowresponse.go b/pkg/models/shared/createworkflowresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/creditwalletrequest.go b/pkg/models/shared/creditwalletrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/currencycloudconfig.go b/pkg/models/shared/currencycloudconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/debitwalletrequest.go b/pkg/models/shared/debitwalletrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/debitwalletresponse.go b/pkg/models/shared/debitwalletresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/dummypayconfig.go b/pkg/models/shared/dummypayconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/error.go b/pkg/models/shared/error.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/errorresponse.go b/pkg/models/shared/errorresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/errorsenum.go b/pkg/models/shared/errorsenum.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/expandeddebithold.go b/pkg/models/shared/expandeddebithold.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/getbalanceresponse.go b/pkg/models/shared/getbalanceresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/getholdresponse.go b/pkg/models/shared/getholdresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/getholdsresponse.go b/pkg/models/shared/getholdsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/gettransactionsresponse.go b/pkg/models/shared/gettransactionsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/getwalletresponse.go b/pkg/models/shared/getwalletresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/getworkflowoccurrenceresponse.go b/pkg/models/shared/getworkflowoccurrenceresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/getworkflowresponse.go b/pkg/models/shared/getworkflowresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/hold.go b/pkg/models/shared/hold.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/ledgeraccountsubject.go b/pkg/models/shared/ledgeraccountsubject.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/ledgerinfo.go b/pkg/models/shared/ledgerinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/ledgerinforesponse.go b/pkg/models/shared/ledgerinforesponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/ledgerstorage.go b/pkg/models/shared/ledgerstorage.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/listbalancesresponse.go b/pkg/models/shared/listbalancesresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/listclientsresponse.go b/pkg/models/shared/listclientsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/listrunsresponse.go b/pkg/models/shared/listrunsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/listscopesresponse.go b/pkg/models/shared/listscopesresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/listusersresponse.go b/pkg/models/shared/listusersresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/listwalletsresponse.go b/pkg/models/shared/listwalletsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/listworkflowsresponse.go b/pkg/models/shared/listworkflowsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/log.go b/pkg/models/shared/log.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/logscursorresponse.go b/pkg/models/shared/logscursorresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/mapping.go b/pkg/models/shared/mapping.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/mappingresponse.go b/pkg/models/shared/mappingresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/migrationinfo.go b/pkg/models/shared/migrationinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/modulrconfig.go b/pkg/models/shared/modulrconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/monetary.go b/pkg/models/shared/monetary.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/payment.go b/pkg/models/shared/payment.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/paymentadjustment.go b/pkg/models/shared/paymentadjustment.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/paymentmetadata.go b/pkg/models/shared/paymentmetadata.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/paymentmetadatachangelog.go b/pkg/models/shared/paymentmetadatachangelog.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/paymentresponse.go b/pkg/models/shared/paymentresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/paymentsaccount.go b/pkg/models/shared/paymentsaccount.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/paymentscursor.go b/pkg/models/shared/paymentscursor.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/paymentstatus.go b/pkg/models/shared/paymentstatus.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/posting.go b/pkg/models/shared/posting.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/posttransaction.go b/pkg/models/shared/posttransaction.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/query.go b/pkg/models/shared/query.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/readclientresponse.go b/pkg/models/shared/readclientresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/readscoperesponse.go b/pkg/models/shared/readscoperesponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/readuserresponse.go b/pkg/models/shared/readuserresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/response.go b/pkg/models/shared/response.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/runworkflowresponse.go b/pkg/models/shared/runworkflowresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/scope.go b/pkg/models/shared/scope.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/script.go b/pkg/models/shared/script.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/scriptresponse.go b/pkg/models/shared/scriptresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/secret.go b/pkg/models/shared/secret.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/security.go b/pkg/models/shared/security.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/serverinfo.go b/pkg/models/shared/serverinfo.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/stagestatus.go b/pkg/models/shared/stagestatus.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/stats.go b/pkg/models/shared/stats.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/statsresponse.go b/pkg/models/shared/statsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/stripeconfig.go b/pkg/models/shared/stripeconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/stripetransferrequest.go b/pkg/models/shared/stripetransferrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/stripetransferresponse.go b/pkg/models/shared/stripetransferresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/subject.go b/pkg/models/shared/subject.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskbankingcircle.go b/pkg/models/shared/taskbankingcircle.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskcurrencycloud.go b/pkg/models/shared/taskcurrencycloud.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskdummypay.go b/pkg/models/shared/taskdummypay.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskmodulr.go b/pkg/models/shared/taskmodulr.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskresponse.go b/pkg/models/shared/taskresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskscursor.go b/pkg/models/shared/taskscursor.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskstripe.go b/pkg/models/shared/taskstripe.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/taskwise.go b/pkg/models/shared/taskwise.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/transaction.go b/pkg/models/shared/transaction.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/transactiondata.go b/pkg/models/shared/transactiondata.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/transactionresponse.go b/pkg/models/shared/transactionresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/transactions.go b/pkg/models/shared/transactions.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/transactionscursorresponse.go b/pkg/models/shared/transactionscursorresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/transactionsresponse.go b/pkg/models/shared/transactionsresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/updateclientrequest.go b/pkg/models/shared/updateclientrequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/updateclientresponse.go b/pkg/models/shared/updateclientresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/updatescoperequest.go b/pkg/models/shared/updatescoperequest.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/updatescoperesponse.go b/pkg/models/shared/updatescoperesponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/user.go b/pkg/models/shared/user.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/volume.go b/pkg/models/shared/volume.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/wallet.go b/pkg/models/shared/wallet.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/walletserrorresponse.go b/pkg/models/shared/walletserrorresponse.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/walletstransaction.go b/pkg/models/shared/walletstransaction.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/walletsubject.go b/pkg/models/shared/walletsubject.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/walletsvolume.go b/pkg/models/shared/walletsvolume.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/walletwithbalances.go b/pkg/models/shared/walletwithbalances.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/webhooksconfig.go b/pkg/models/shared/webhooksconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/wiseconfig.go b/pkg/models/shared/wiseconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/workflow.go b/pkg/models/shared/workflow.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/workflowconfig.go b/pkg/models/shared/workflowconfig.go old mode 100755 new mode 100644 diff --git a/pkg/models/shared/workflowoccurrence.go b/pkg/models/shared/workflowoccurrence.go old mode 100755 new mode 100644 diff --git a/pkg/types/bigint.go b/pkg/types/bigint.go old mode 100755 new mode 100644 diff --git a/pkg/types/date.go b/pkg/types/date.go old mode 100755 new mode 100644 diff --git a/pkg/types/datetime.go b/pkg/types/datetime.go old mode 100755 new mode 100644 diff --git a/pkg/types/decimal.go b/pkg/types/decimal.go old mode 100755 new mode 100644 diff --git a/pkg/types/pointers.go b/pkg/types/pointers.go old mode 100755 new mode 100644 diff --git a/pkg/utils/contenttype.go b/pkg/utils/contenttype.go old mode 100755 new mode 100644 diff --git a/pkg/utils/form.go b/pkg/utils/form.go old mode 100755 new mode 100644 diff --git a/pkg/utils/headers.go b/pkg/utils/headers.go old mode 100755 new mode 100644 diff --git a/pkg/utils/json.go b/pkg/utils/json.go old mode 100755 new mode 100644 diff --git a/pkg/utils/pathparams.go b/pkg/utils/pathparams.go old mode 100755 new mode 100644 diff --git a/pkg/utils/queryparams.go b/pkg/utils/queryparams.go old mode 100755 new mode 100644 diff --git a/pkg/utils/requestbody.go b/pkg/utils/requestbody.go old mode 100755 new mode 100644 diff --git a/pkg/utils/retries.go b/pkg/utils/retries.go old mode 100755 new mode 100644 diff --git a/pkg/utils/security.go b/pkg/utils/security.go old mode 100755 new mode 100644 diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go old mode 100755 new mode 100644 index 4ef632a..b4618bb --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -81,7 +81,6 @@ func parseStructTag(tagKey string, field reflect.StructField) map[string]string parts = append(parts, "true") case 2: // key=value option - break default: // invalid option continue diff --git a/scopes.go b/scopes.go old mode 100755 new mode 100644 diff --git a/script.go b/script.go old mode 100755 new mode 100644 diff --git a/search.go b/search.go old mode 100755 new mode 100644 diff --git a/server.go b/server.go old mode 100755 new mode 100644 diff --git a/stats.go b/stats.go old mode 100755 new mode 100644 diff --git a/transactions.go b/transactions.go old mode 100755 new mode 100644 diff --git a/users.go b/users.go old mode 100755 new mode 100644 diff --git a/wallets.go b/wallets.go old mode 100755 new mode 100644 diff --git a/webhooks.go b/webhooks.go old mode 100755 new mode 100644 From b2b4f2a4bf24d4e1492e385aed092885c1ae835f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 16 Nov 2023 00:41:22 +0000 Subject: [PATCH 05/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.120.3 --- README.md | 3 +- RELEASES.md | 12 +++- .../operations/activateconfigresponse.md | 2 +- .../addmetadataontransactionresponse.md | 2 +- .../addmetadatatoaccountresponse.md | 2 +- .../operations/addscopetoclientresponse.md | 2 +- .../operations/addtransientscoperesponse.md | 2 +- .../operations/changeconfigsecretresponse.md | 2 +- .../models/operations/confirmholdresponse.md | 2 +- .../connectorsstripetransferresponse.md | 2 +- .../operations/countaccountsresponse.md | 4 +- .../operations/counttransactionsresponse.md | 4 +- .../operations/createbalanceresponse.md | 2 +- .../models/operations/createclientresponse.md | 2 +- .../models/operations/createscoperesponse.md | 2 +- .../models/operations/createsecretresponse.md | 2 +- .../operations/createtransactionresponse.md | 2 +- .../operations/createtransactionsresponse.md | 2 +- .../models/operations/createwalletresponse.md | 2 +- .../operations/createworkflowresponse.md | 2 +- .../models/operations/creditwalletresponse.md | 2 +- .../operations/deactivateconfigresponse.md | 2 +- .../models/operations/debitwalletresponse.md | 2 +- .../models/operations/deleteclientresponse.md | 2 +- .../models/operations/deleteconfigresponse.md | 2 +- .../deletescopefromclientresponse.md | 2 +- .../models/operations/deletescoperesponse.md | 2 +- .../models/operations/deletesecretresponse.md | 2 +- .../deletetransientscoperesponse.md | 2 +- .../models/operations/getaccountresponse.md | 2 +- .../models/operations/getbalanceresponse.md | 2 +- .../getbalancesaggregatedresponse.md | 2 +- .../models/operations/getbalancesresponse.md | 2 +- .../operations/getconnectortaskresponse.md | 2 +- docs/pkg/models/operations/getflowresponse.md | 2 +- docs/pkg/models/operations/getholdresponse.md | 2 +- .../pkg/models/operations/getholdsresponse.md | 2 +- docs/pkg/models/operations/getinforesponse.md | 2 +- .../operations/getledgerinforesponse.md | 2 +- .../operations/getmanyconfigsresponse.md | 2 +- .../models/operations/getmappingresponse.md | 2 +- .../models/operations/getpaymentresponse.md | 2 +- .../operations/getserverinforesponse.md | 2 +- .../operations/gettransactionresponse.md | 2 +- .../operations/gettransactionsresponse.md | 2 +- .../models/operations/getwalletresponse.md | 2 +- .../getworkflowoccurrenceresponse.md | 2 +- .../models/operations/insertconfigresponse.md | 2 +- .../operations/installconnectorresponse.md | 2 +- .../models/operations/listaccountsresponse.md | 2 +- .../operations/listallconnectorsresponse.md | 2 +- .../models/operations/listbalancesresponse.md | 2 +- .../models/operations/listclientsresponse.md | 2 +- .../listconfigsavailableconnectorsresponse.md | 2 +- .../operations/listconnectortasksresponse.md | 2 +- .../models/operations/listflowsresponse.md | 2 +- .../pkg/models/operations/listlogsresponse.md | 2 +- .../models/operations/listpaymentsresponse.md | 2 +- .../pkg/models/operations/listrunsresponse.md | 2 +- .../models/operations/listscopesresponse.md | 2 +- .../operations/listtransactionsresponse.md | 2 +- .../models/operations/listusersresponse.md | 2 +- .../models/operations/listwalletsresponse.md | 2 +- .../orchestrationgetserverinforesponse.md | 2 +- .../paymentsgetserverinforesponse.md | 2 +- .../paymentslistaccountsresponse.md | 2 +- .../models/operations/readclientresponse.md | 2 +- .../operations/readconnectorconfigresponse.md | 2 +- .../models/operations/readscoperesponse.md | 2 +- .../models/operations/readstatsresponse.md | 2 +- .../pkg/models/operations/readuserresponse.md | 2 +- .../operations/resetconnectorresponse.md | 2 +- .../operations/reverttransactionresponse.md | 2 +- .../models/operations/runscriptresponse.md | 2 +- .../models/operations/runworkflowresponse.md | 2 +- .../operations/searchgetserverinforesponse.md | 2 +- docs/pkg/models/operations/searchresponse.md | 2 +- .../models/operations/testconfigresponse.md | 2 +- .../operations/uninstallconnectorresponse.md | 2 +- .../models/operations/updateclientresponse.md | 2 +- .../operations/updatemappingresponse.md | 2 +- .../models/operations/updatescoperesponse.md | 2 +- .../models/operations/updatewalletresponse.md | 2 +- .../pkg/models/operations/voidholdresponse.md | 2 +- .../walletsgetserverinforesponse.md | 2 +- docs/sdks/accounts/README.md | 22 +++--- docs/sdks/balances/README.md | 10 +-- docs/sdks/clients/README.md | 40 ++++++----- docs/sdks/formance/README.md | 12 ++-- docs/sdks/ledger/README.md | 4 +- docs/sdks/logs/README.md | 6 +- docs/sdks/mapping/README.md | 8 +-- docs/sdks/orchestration/README.md | 28 ++++---- docs/sdks/payments/README.md | 51 +++++++------- docs/sdks/scopes/README.md | 31 ++++---- docs/sdks/script/README.md | 4 +- docs/sdks/search/README.md | 4 +- docs/sdks/server/README.md | 4 +- docs/sdks/stats/README.md | 4 +- docs/sdks/transactions/README.md | 34 ++++----- docs/sdks/users/README.md | 8 +-- docs/sdks/wallets/README.md | 70 ++++++++++--------- docs/sdks/webhooks/README.md | 29 ++++---- formance.go | 6 +- gen.yaml | 8 +-- pkg/models/operations/countaccounts.go | 2 +- pkg/models/operations/counttransactions.go | 2 +- 107 files changed, 301 insertions(+), 271 deletions(-) diff --git a/README.md b/README.md index bbc2e1b..f8bfe7d 100755 --- a/README.md +++ b/README.md @@ -218,7 +218,9 @@ package main import ( "context" + "errors" formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "log" ) @@ -383,7 +385,6 @@ package main import ( "context" formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "log" ) diff --git a/RELEASES.md b/RELEASES.md index d0489b1..c9fca16 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -150,4 +150,14 @@ Based on: ### Generated - [go v0.5.2] . ### Releases -- [Go v0.5.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.2 - . \ No newline at end of file +- [Go v0.5.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.2 - . + +## 2023-11-16 00:41:07 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.120.3 (2.192.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.5.3] . +### Releases +- [Go v0.5.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.3 - . \ No newline at end of file diff --git a/docs/pkg/models/operations/activateconfigresponse.md b/docs/pkg/models/operations/activateconfigresponse.md index d888bbf..4bdb9bf 100644 --- a/docs/pkg/models/operations/activateconfigresponse.md +++ b/docs/pkg/models/operations/activateconfigresponse.md @@ -8,4 +8,4 @@ | `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully activated. | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/addmetadataontransactionresponse.md b/docs/pkg/models/operations/addmetadataontransactionresponse.md index 2041b32..7e42fbf 100644 --- a/docs/pkg/models/operations/addmetadataontransactionresponse.md +++ b/docs/pkg/models/operations/addmetadataontransactionresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/addmetadatatoaccountresponse.md b/docs/pkg/models/operations/addmetadatatoaccountresponse.md index 33aa8ca..8439c3d 100644 --- a/docs/pkg/models/operations/addmetadatatoaccountresponse.md +++ b/docs/pkg/models/operations/addmetadatatoaccountresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/addscopetoclientresponse.md b/docs/pkg/models/operations/addscopetoclientresponse.md index 192bbc5..6d8b4e5 100644 --- a/docs/pkg/models/operations/addscopetoclientresponse.md +++ b/docs/pkg/models/operations/addscopetoclientresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/addtransientscoperesponse.md b/docs/pkg/models/operations/addtransientscoperesponse.md index 7ceda34..c869506 100644 --- a/docs/pkg/models/operations/addtransientscoperesponse.md +++ b/docs/pkg/models/operations/addtransientscoperesponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/changeconfigsecretresponse.md b/docs/pkg/models/operations/changeconfigsecretresponse.md index e3010dc..f7155ed 100644 --- a/docs/pkg/models/operations/changeconfigsecretresponse.md +++ b/docs/pkg/models/operations/changeconfigsecretresponse.md @@ -8,4 +8,4 @@ | `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Secret successfully changed. | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/confirmholdresponse.md b/docs/pkg/models/operations/confirmholdresponse.md index ef00f8d..d77a915 100644 --- a/docs/pkg/models/operations/confirmholdresponse.md +++ b/docs/pkg/models/operations/confirmholdresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/connectorsstripetransferresponse.md b/docs/pkg/models/operations/connectorsstripetransferresponse.md index e1ee40e..fe31cd0 100644 --- a/docs/pkg/models/operations/connectorsstripetransferresponse.md +++ b/docs/pkg/models/operations/connectorsstripetransferresponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `StripeTransferResponse` | [*shared.StripeTransferResponse](../../../pkg/models/shared/stripetransferresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/countaccountsresponse.md b/docs/pkg/models/operations/countaccountsresponse.md index f1cf55a..bf9376c 100644 --- a/docs/pkg/models/operations/countaccountsresponse.md +++ b/docs/pkg/models/operations/countaccountsresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | +| `Headers` | map[string][]*string* | :heavy_check_mark: | N/A | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/counttransactionsresponse.md b/docs/pkg/models/operations/counttransactionsresponse.md index 1c7a1a2..dc04f5f 100644 --- a/docs/pkg/models/operations/counttransactionsresponse.md +++ b/docs/pkg/models/operations/counttransactionsresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | -| `Headers` | map[string][]*string* | :heavy_minus_sign: | N/A | +| `Headers` | map[string][]*string* | :heavy_check_mark: | N/A | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/createbalanceresponse.md b/docs/pkg/models/operations/createbalanceresponse.md index 37cead5..8a7b7a1 100644 --- a/docs/pkg/models/operations/createbalanceresponse.md +++ b/docs/pkg/models/operations/createbalanceresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateBalanceResponse` | [*shared.CreateBalanceResponse](../../../pkg/models/shared/createbalanceresponse.md) | :heavy_minus_sign: | Created balance | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/createclientresponse.md b/docs/pkg/models/operations/createclientresponse.md index 17796d0..2cda764 100644 --- a/docs/pkg/models/operations/createclientresponse.md +++ b/docs/pkg/models/operations/createclientresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateClientResponse` | [*shared.CreateClientResponse](../../../pkg/models/shared/createclientresponse.md) | :heavy_minus_sign: | Client created | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/createscoperesponse.md b/docs/pkg/models/operations/createscoperesponse.md index 49a556b..124dfb4 100644 --- a/docs/pkg/models/operations/createscoperesponse.md +++ b/docs/pkg/models/operations/createscoperesponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateScopeResponse` | [*shared.CreateScopeResponse](../../../pkg/models/shared/createscoperesponse.md) | :heavy_minus_sign: | Created scope | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/createsecretresponse.md b/docs/pkg/models/operations/createsecretresponse.md index 6c99f98..ff9f3ec 100644 --- a/docs/pkg/models/operations/createsecretresponse.md +++ b/docs/pkg/models/operations/createsecretresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateSecretResponse` | [*shared.CreateSecretResponse](../../../pkg/models/shared/createsecretresponse.md) | :heavy_minus_sign: | Created secret | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/createtransactionresponse.md b/docs/pkg/models/operations/createtransactionresponse.md index e541b74..5b0033f 100644 --- a/docs/pkg/models/operations/createtransactionresponse.md +++ b/docs/pkg/models/operations/createtransactionresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TransactionsResponse` | [*shared.TransactionsResponse](../../../pkg/models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/createtransactionsresponse.md b/docs/pkg/models/operations/createtransactionsresponse.md index 6a8e738..ddd7ca4 100644 --- a/docs/pkg/models/operations/createtransactionsresponse.md +++ b/docs/pkg/models/operations/createtransactionsresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TransactionsResponse` | [*shared.TransactionsResponse](../../../pkg/models/shared/transactionsresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/createwalletresponse.md b/docs/pkg/models/operations/createwalletresponse.md index 562414c..43964cf 100644 --- a/docs/pkg/models/operations/createwalletresponse.md +++ b/docs/pkg/models/operations/createwalletresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateWalletResponse` | [*shared.CreateWalletResponse](../../../pkg/models/shared/createwalletresponse.md) | :heavy_minus_sign: | Wallet created | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/createworkflowresponse.md b/docs/pkg/models/operations/createworkflowresponse.md index 82ff556..9194fd1 100644 --- a/docs/pkg/models/operations/createworkflowresponse.md +++ b/docs/pkg/models/operations/createworkflowresponse.md @@ -9,4 +9,4 @@ | `CreateWorkflowResponse` | [*shared.CreateWorkflowResponse](../../../pkg/models/shared/createworkflowresponse.md) | :heavy_minus_sign: | Created workflow | | `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/creditwalletresponse.md b/docs/pkg/models/operations/creditwalletresponse.md index 728daa2..6eee6fb 100644 --- a/docs/pkg/models/operations/creditwalletresponse.md +++ b/docs/pkg/models/operations/creditwalletresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/deactivateconfigresponse.md b/docs/pkg/models/operations/deactivateconfigresponse.md index 402d71c..eb8da7b 100644 --- a/docs/pkg/models/operations/deactivateconfigresponse.md +++ b/docs/pkg/models/operations/deactivateconfigresponse.md @@ -8,4 +8,4 @@ | `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Config successfully deactivated. | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/debitwalletresponse.md b/docs/pkg/models/operations/debitwalletresponse.md index da933d5..152b95e 100644 --- a/docs/pkg/models/operations/debitwalletresponse.md +++ b/docs/pkg/models/operations/debitwalletresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `DebitWalletResponse` | [*shared.DebitWalletResponse](../../../pkg/models/shared/debitwalletresponse.md) | :heavy_minus_sign: | Wallet successfully debited as a pending hold | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/deleteclientresponse.md b/docs/pkg/models/operations/deleteclientresponse.md index ac17a0a..541fac0 100644 --- a/docs/pkg/models/operations/deleteclientresponse.md +++ b/docs/pkg/models/operations/deleteclientresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/deleteconfigresponse.md b/docs/pkg/models/operations/deleteconfigresponse.md index 306c77b..35a8c19 100644 --- a/docs/pkg/models/operations/deleteconfigresponse.md +++ b/docs/pkg/models/operations/deleteconfigresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/deletescopefromclientresponse.md b/docs/pkg/models/operations/deletescopefromclientresponse.md index ea34061..8f854bb 100644 --- a/docs/pkg/models/operations/deletescopefromclientresponse.md +++ b/docs/pkg/models/operations/deletescopefromclientresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/deletescoperesponse.md b/docs/pkg/models/operations/deletescoperesponse.md index 165d20c..a2589fd 100644 --- a/docs/pkg/models/operations/deletescoperesponse.md +++ b/docs/pkg/models/operations/deletescoperesponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/deletesecretresponse.md b/docs/pkg/models/operations/deletesecretresponse.md index d59ea6b..1af0590 100644 --- a/docs/pkg/models/operations/deletesecretresponse.md +++ b/docs/pkg/models/operations/deletesecretresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/deletetransientscoperesponse.md b/docs/pkg/models/operations/deletetransientscoperesponse.md index 6b09320..5fd3d42 100644 --- a/docs/pkg/models/operations/deletetransientscoperesponse.md +++ b/docs/pkg/models/operations/deletetransientscoperesponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getaccountresponse.md b/docs/pkg/models/operations/getaccountresponse.md index 46acc47..8845471 100644 --- a/docs/pkg/models/operations/getaccountresponse.md +++ b/docs/pkg/models/operations/getaccountresponse.md @@ -9,4 +9,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getbalanceresponse.md b/docs/pkg/models/operations/getbalanceresponse.md index 78f7315..114a9af 100644 --- a/docs/pkg/models/operations/getbalanceresponse.md +++ b/docs/pkg/models/operations/getbalanceresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `GetBalanceResponse` | [*shared.GetBalanceResponse](../../../pkg/models/shared/getbalanceresponse.md) | :heavy_minus_sign: | Balance summary | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/getbalancesaggregatedresponse.md b/docs/pkg/models/operations/getbalancesaggregatedresponse.md index 048f5e4..b894c00 100644 --- a/docs/pkg/models/operations/getbalancesaggregatedresponse.md +++ b/docs/pkg/models/operations/getbalancesaggregatedresponse.md @@ -9,4 +9,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getbalancesresponse.md b/docs/pkg/models/operations/getbalancesresponse.md index c30be7e..de924ea 100644 --- a/docs/pkg/models/operations/getbalancesresponse.md +++ b/docs/pkg/models/operations/getbalancesresponse.md @@ -9,4 +9,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getconnectortaskresponse.md b/docs/pkg/models/operations/getconnectortaskresponse.md index 5f259b6..ea975b5 100644 --- a/docs/pkg/models/operations/getconnectortaskresponse.md +++ b/docs/pkg/models/operations/getconnectortaskresponse.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TaskResponse` | [*shared.TaskResponse](../../../pkg/models/shared/taskresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/getflowresponse.md b/docs/pkg/models/operations/getflowresponse.md index 4b94f89..4caf9a0 100644 --- a/docs/pkg/models/operations/getflowresponse.md +++ b/docs/pkg/models/operations/getflowresponse.md @@ -9,4 +9,4 @@ | `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | | `GetWorkflowResponse` | [*shared.GetWorkflowResponse](../../../pkg/models/shared/getworkflowresponse.md) | :heavy_minus_sign: | The workflow | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getholdresponse.md b/docs/pkg/models/operations/getholdresponse.md index d5e6f5f..47dc5b1 100644 --- a/docs/pkg/models/operations/getholdresponse.md +++ b/docs/pkg/models/operations/getholdresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `GetHoldResponse` | [*shared.GetHoldResponse](../../../pkg/models/shared/getholdresponse.md) | :heavy_minus_sign: | Holds | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/getholdsresponse.md b/docs/pkg/models/operations/getholdsresponse.md index 7fa6b08..880d7eb 100644 --- a/docs/pkg/models/operations/getholdsresponse.md +++ b/docs/pkg/models/operations/getholdsresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `GetHoldsResponse` | [*shared.GetHoldsResponse](../../../pkg/models/shared/getholdsresponse.md) | :heavy_minus_sign: | Holds | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/getinforesponse.md b/docs/pkg/models/operations/getinforesponse.md index e51dd62..75c9a67 100644 --- a/docs/pkg/models/operations/getinforesponse.md +++ b/docs/pkg/models/operations/getinforesponse.md @@ -9,4 +9,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getledgerinforesponse.md b/docs/pkg/models/operations/getledgerinforesponse.md index 9ecf9d8..9c3df61 100644 --- a/docs/pkg/models/operations/getledgerinforesponse.md +++ b/docs/pkg/models/operations/getledgerinforesponse.md @@ -9,4 +9,4 @@ | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `LedgerInfoResponse` | [*shared.LedgerInfoResponse](../../../pkg/models/shared/ledgerinforesponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getmanyconfigsresponse.md b/docs/pkg/models/operations/getmanyconfigsresponse.md index 6902a3b..12c3ebc 100644 --- a/docs/pkg/models/operations/getmanyconfigsresponse.md +++ b/docs/pkg/models/operations/getmanyconfigsresponse.md @@ -8,4 +8,4 @@ | `ConfigsResponse` | [*shared.ConfigsResponse](../../../pkg/models/shared/configsresponse.md) | :heavy_minus_sign: | OK | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getmappingresponse.md b/docs/pkg/models/operations/getmappingresponse.md index 8ed69ac..cb24ee7 100644 --- a/docs/pkg/models/operations/getmappingresponse.md +++ b/docs/pkg/models/operations/getmappingresponse.md @@ -9,4 +9,4 @@ | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `MappingResponse` | [*shared.MappingResponse](../../../pkg/models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getpaymentresponse.md b/docs/pkg/models/operations/getpaymentresponse.md index ea77588..98c51a6 100644 --- a/docs/pkg/models/operations/getpaymentresponse.md +++ b/docs/pkg/models/operations/getpaymentresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `PaymentResponse` | [*shared.PaymentResponse](../../../pkg/models/shared/paymentresponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/getserverinforesponse.md b/docs/pkg/models/operations/getserverinforesponse.md index 26d8f36..b4f27b8 100644 --- a/docs/pkg/models/operations/getserverinforesponse.md +++ b/docs/pkg/models/operations/getserverinforesponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/gettransactionresponse.md b/docs/pkg/models/operations/gettransactionresponse.md index 07dabf0..f8c41da 100644 --- a/docs/pkg/models/operations/gettransactionresponse.md +++ b/docs/pkg/models/operations/gettransactionresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TransactionResponse` | [*shared.TransactionResponse](../../../pkg/models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/gettransactionsresponse.md b/docs/pkg/models/operations/gettransactionsresponse.md index 082f55d..43098e7 100644 --- a/docs/pkg/models/operations/gettransactionsresponse.md +++ b/docs/pkg/models/operations/gettransactionsresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `GetTransactionsResponse` | [*shared.GetTransactionsResponse](../../../pkg/models/shared/gettransactionsresponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/getwalletresponse.md b/docs/pkg/models/operations/getwalletresponse.md index 3138199..e4683bc 100644 --- a/docs/pkg/models/operations/getwalletresponse.md +++ b/docs/pkg/models/operations/getwalletresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `GetWalletResponse` | [*shared.GetWalletResponse](../../../pkg/models/shared/getwalletresponse.md) | :heavy_minus_sign: | Wallet | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/getworkflowoccurrenceresponse.md b/docs/pkg/models/operations/getworkflowoccurrenceresponse.md index 31956d3..a4a3f6b 100644 --- a/docs/pkg/models/operations/getworkflowoccurrenceresponse.md +++ b/docs/pkg/models/operations/getworkflowoccurrenceresponse.md @@ -9,4 +9,4 @@ | `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | | `GetWorkflowOccurrenceResponse` | [*shared.GetWorkflowOccurrenceResponse](../../../pkg/models/shared/getworkflowoccurrenceresponse.md) | :heavy_minus_sign: | The workflow occurrence | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/insertconfigresponse.md b/docs/pkg/models/operations/insertconfigresponse.md index a873a7a..5f2a0ca 100644 --- a/docs/pkg/models/operations/insertconfigresponse.md +++ b/docs/pkg/models/operations/insertconfigresponse.md @@ -8,4 +8,4 @@ | `ConfigResponse` | [*shared.ConfigResponse](../../../pkg/models/shared/configresponse.md) | :heavy_minus_sign: | Config created successfully. | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/installconnectorresponse.md b/docs/pkg/models/operations/installconnectorresponse.md index b1318b5..cc98f40 100644 --- a/docs/pkg/models/operations/installconnectorresponse.md +++ b/docs/pkg/models/operations/installconnectorresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listaccountsresponse.md b/docs/pkg/models/operations/listaccountsresponse.md index dd2763c..bf00737 100644 --- a/docs/pkg/models/operations/listaccountsresponse.md +++ b/docs/pkg/models/operations/listaccountsresponse.md @@ -9,4 +9,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listallconnectorsresponse.md b/docs/pkg/models/operations/listallconnectorsresponse.md index 408b197..a90e798 100644 --- a/docs/pkg/models/operations/listallconnectorsresponse.md +++ b/docs/pkg/models/operations/listallconnectorsresponse.md @@ -8,4 +8,4 @@ | `ConnectorsResponse` | [*shared.ConnectorsResponse](../../../pkg/models/shared/connectorsresponse.md) | :heavy_minus_sign: | OK | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listbalancesresponse.md b/docs/pkg/models/operations/listbalancesresponse.md index d9d8507..1c7f42a 100644 --- a/docs/pkg/models/operations/listbalancesresponse.md +++ b/docs/pkg/models/operations/listbalancesresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ListBalancesResponse` | [*shared.ListBalancesResponse](../../../pkg/models/shared/listbalancesresponse.md) | :heavy_minus_sign: | Balances list | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listclientsresponse.md b/docs/pkg/models/operations/listclientsresponse.md index abc8b00..3ad27df 100644 --- a/docs/pkg/models/operations/listclientsresponse.md +++ b/docs/pkg/models/operations/listclientsresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ListClientsResponse` | [*shared.ListClientsResponse](../../../pkg/models/shared/listclientsresponse.md) | :heavy_minus_sign: | List of clients | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md b/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md index 29b12b5..a3e8603 100644 --- a/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md +++ b/docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md @@ -8,4 +8,4 @@ | `ConnectorsConfigsResponse` | [*shared.ConnectorsConfigsResponse](../../../pkg/models/shared/connectorsconfigsresponse.md) | :heavy_minus_sign: | OK | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listconnectortasksresponse.md b/docs/pkg/models/operations/listconnectortasksresponse.md index f2b3b3b..018bd6b 100644 --- a/docs/pkg/models/operations/listconnectortasksresponse.md +++ b/docs/pkg/models/operations/listconnectortasksresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TasksCursor` | [*shared.TasksCursor](../../../pkg/models/shared/taskscursor.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/listflowsresponse.md b/docs/pkg/models/operations/listflowsresponse.md index 9111d25..afe8a5e 100644 --- a/docs/pkg/models/operations/listflowsresponse.md +++ b/docs/pkg/models/operations/listflowsresponse.md @@ -9,4 +9,4 @@ | `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | | `ListWorkflowsResponse` | [*shared.ListWorkflowsResponse](../../../pkg/models/shared/listworkflowsresponse.md) | :heavy_minus_sign: | List of workflows | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listlogsresponse.md b/docs/pkg/models/operations/listlogsresponse.md index 5b459b8..12cced6 100644 --- a/docs/pkg/models/operations/listlogsresponse.md +++ b/docs/pkg/models/operations/listlogsresponse.md @@ -9,4 +9,4 @@ | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `LogsCursorResponse` | [*shared.LogsCursorResponse](../../../pkg/models/shared/logscursorresponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listpaymentsresponse.md b/docs/pkg/models/operations/listpaymentsresponse.md index 4306f67..bb1257b 100644 --- a/docs/pkg/models/operations/listpaymentsresponse.md +++ b/docs/pkg/models/operations/listpaymentsresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `PaymentsCursor` | [*shared.PaymentsCursor](../../../pkg/models/shared/paymentscursor.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listrunsresponse.md b/docs/pkg/models/operations/listrunsresponse.md index 708451e..6dce03c 100644 --- a/docs/pkg/models/operations/listrunsresponse.md +++ b/docs/pkg/models/operations/listrunsresponse.md @@ -9,4 +9,4 @@ | `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | | `ListRunsResponse` | [*shared.ListRunsResponse](../../../pkg/models/shared/listrunsresponse.md) | :heavy_minus_sign: | List of workflow occurrences | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listscopesresponse.md b/docs/pkg/models/operations/listscopesresponse.md index 9dfa97f..ffa2a67 100644 --- a/docs/pkg/models/operations/listscopesresponse.md +++ b/docs/pkg/models/operations/listscopesresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ListScopesResponse` | [*shared.ListScopesResponse](../../../pkg/models/shared/listscopesresponse.md) | :heavy_minus_sign: | List of scopes | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listtransactionsresponse.md b/docs/pkg/models/operations/listtransactionsresponse.md index 123cbf2..5fa3b01 100644 --- a/docs/pkg/models/operations/listtransactionsresponse.md +++ b/docs/pkg/models/operations/listtransactionsresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TransactionsCursorResponse` | [*shared.TransactionsCursorResponse](../../../pkg/models/shared/transactionscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/listusersresponse.md b/docs/pkg/models/operations/listusersresponse.md index 0392b26..608dfa4 100644 --- a/docs/pkg/models/operations/listusersresponse.md +++ b/docs/pkg/models/operations/listusersresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ListUsersResponse` | [*shared.ListUsersResponse](../../../pkg/models/shared/listusersresponse.md) | :heavy_minus_sign: | List of users | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/listwalletsresponse.md b/docs/pkg/models/operations/listwalletsresponse.md index e9eb0ba..7a23e42 100644 --- a/docs/pkg/models/operations/listwalletsresponse.md +++ b/docs/pkg/models/operations/listwalletsresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ListWalletsResponse` | [*shared.ListWalletsResponse](../../../pkg/models/shared/listwalletsresponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/orchestrationgetserverinforesponse.md b/docs/pkg/models/operations/orchestrationgetserverinforesponse.md index a3d9daa..0cbc269 100644 --- a/docs/pkg/models/operations/orchestrationgetserverinforesponse.md +++ b/docs/pkg/models/operations/orchestrationgetserverinforesponse.md @@ -9,4 +9,4 @@ | `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | | `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/paymentsgetserverinforesponse.md b/docs/pkg/models/operations/paymentsgetserverinforesponse.md index 1d7fdd9..832107f 100644 --- a/docs/pkg/models/operations/paymentsgetserverinforesponse.md +++ b/docs/pkg/models/operations/paymentsgetserverinforesponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/paymentslistaccountsresponse.md b/docs/pkg/models/operations/paymentslistaccountsresponse.md index 137bccf..8dc8fc4 100644 --- a/docs/pkg/models/operations/paymentslistaccountsresponse.md +++ b/docs/pkg/models/operations/paymentslistaccountsresponse.md @@ -8,4 +8,4 @@ | `AccountsCursor` | [*shared.AccountsCursor](../../../pkg/models/shared/accountscursor.md) | :heavy_minus_sign: | OK | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/readclientresponse.md b/docs/pkg/models/operations/readclientresponse.md index 7386459..f5a03a1 100644 --- a/docs/pkg/models/operations/readclientresponse.md +++ b/docs/pkg/models/operations/readclientresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ReadClientResponse` | [*shared.ReadClientResponse](../../../pkg/models/shared/readclientresponse.md) | :heavy_minus_sign: | Retrieved client | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/readconnectorconfigresponse.md b/docs/pkg/models/operations/readconnectorconfigresponse.md index 145ee0b..817f81b 100644 --- a/docs/pkg/models/operations/readconnectorconfigresponse.md +++ b/docs/pkg/models/operations/readconnectorconfigresponse.md @@ -8,4 +8,4 @@ | `ConnectorConfigResponse` | [*shared.ConnectorConfigResponse](../../../pkg/models/shared/connectorconfigresponse.md) | :heavy_minus_sign: | OK | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/readscoperesponse.md b/docs/pkg/models/operations/readscoperesponse.md index b2a6372..7346910 100644 --- a/docs/pkg/models/operations/readscoperesponse.md +++ b/docs/pkg/models/operations/readscoperesponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ReadScopeResponse` | [*shared.ReadScopeResponse](../../../pkg/models/shared/readscoperesponse.md) | :heavy_minus_sign: | Retrieved scope | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/readstatsresponse.md b/docs/pkg/models/operations/readstatsresponse.md index 373588a..7831b27 100644 --- a/docs/pkg/models/operations/readstatsresponse.md +++ b/docs/pkg/models/operations/readstatsresponse.md @@ -9,4 +9,4 @@ | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatsResponse` | [*shared.StatsResponse](../../../pkg/models/shared/statsresponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/readuserresponse.md b/docs/pkg/models/operations/readuserresponse.md index ec781f2..f60591e 100644 --- a/docs/pkg/models/operations/readuserresponse.md +++ b/docs/pkg/models/operations/readuserresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ReadUserResponse` | [*shared.ReadUserResponse](../../../pkg/models/shared/readuserresponse.md) | :heavy_minus_sign: | Retrieved user | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/resetconnectorresponse.md b/docs/pkg/models/operations/resetconnectorresponse.md index b7349da..8087328 100644 --- a/docs/pkg/models/operations/resetconnectorresponse.md +++ b/docs/pkg/models/operations/resetconnectorresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/reverttransactionresponse.md b/docs/pkg/models/operations/reverttransactionresponse.md index 4ff4d24..646a748 100644 --- a/docs/pkg/models/operations/reverttransactionresponse.md +++ b/docs/pkg/models/operations/reverttransactionresponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TransactionResponse` | [*shared.TransactionResponse](../../../pkg/models/shared/transactionresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/pkg/models/operations/runscriptresponse.md b/docs/pkg/models/operations/runscriptresponse.md index 5112389..30b7bc7 100644 --- a/docs/pkg/models/operations/runscriptresponse.md +++ b/docs/pkg/models/operations/runscriptresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ScriptResponse` | [*shared.ScriptResponse](../../../pkg/models/shared/scriptresponse.md) | :heavy_minus_sign: | On success, it will return a 200 status code, and the resulting transaction under the `transaction` field.

On failure, it will also return a 200 status code, and the following fields:
- `details`: contains a URL. When there is an error parsing Numscript, the result can be difficult to read—the provided URL will render the error in an easy-to-read format.
- `errorCode` and `error_code` (deprecated): contains the string code of the error
- `errorMessage` and `error_message` (deprecated): contains a human-readable indication of what went wrong, for example that an account had insufficient funds, or that there was an error in the provided Numscript.
| | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/runworkflowresponse.md b/docs/pkg/models/operations/runworkflowresponse.md index 6ad933f..6a7b06d 100644 --- a/docs/pkg/models/operations/runworkflowresponse.md +++ b/docs/pkg/models/operations/runworkflowresponse.md @@ -9,4 +9,4 @@ | `Error` | [*shared.Error](../../../pkg/models/shared/error.md) | :heavy_minus_sign: | General error | | `RunWorkflowResponse` | [*shared.RunWorkflowResponse](../../../pkg/models/shared/runworkflowresponse.md) | :heavy_minus_sign: | The workflow occurrence | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/searchgetserverinforesponse.md b/docs/pkg/models/operations/searchgetserverinforesponse.md index beb0122..c89ce80 100644 --- a/docs/pkg/models/operations/searchgetserverinforesponse.md +++ b/docs/pkg/models/operations/searchgetserverinforesponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/searchresponse.md b/docs/pkg/models/operations/searchresponse.md index 408f105..51a71d1 100644 --- a/docs/pkg/models/operations/searchresponse.md +++ b/docs/pkg/models/operations/searchresponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `Response` | [*shared.Response](../../../pkg/models/shared/response.md) | :heavy_minus_sign: | Success | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/testconfigresponse.md b/docs/pkg/models/operations/testconfigresponse.md index dfb7b53..87d5c5d 100644 --- a/docs/pkg/models/operations/testconfigresponse.md +++ b/docs/pkg/models/operations/testconfigresponse.md @@ -8,4 +8,4 @@ | `AttemptResponse` | [*shared.AttemptResponse](../../../pkg/models/shared/attemptresponse.md) | :heavy_minus_sign: | OK | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/uninstallconnectorresponse.md b/docs/pkg/models/operations/uninstallconnectorresponse.md index cc34c54..4dd0e44 100644 --- a/docs/pkg/models/operations/uninstallconnectorresponse.md +++ b/docs/pkg/models/operations/uninstallconnectorresponse.md @@ -7,4 +7,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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/updateclientresponse.md b/docs/pkg/models/operations/updateclientresponse.md index e6fad53..ed01783 100644 --- a/docs/pkg/models/operations/updateclientresponse.md +++ b/docs/pkg/models/operations/updateclientresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `UpdateClientResponse` | [*shared.UpdateClientResponse](../../../pkg/models/shared/updateclientresponse.md) | :heavy_minus_sign: | Updated client | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatemappingresponse.md b/docs/pkg/models/operations/updatemappingresponse.md index 61006eb..6a83a75 100644 --- a/docs/pkg/models/operations/updatemappingresponse.md +++ b/docs/pkg/models/operations/updatemappingresponse.md @@ -9,4 +9,4 @@ | `ErrorResponse` | [*shared.ErrorResponse](../../../pkg/models/shared/errorresponse.md) | :heavy_minus_sign: | Error | | `MappingResponse` | [*shared.MappingResponse](../../../pkg/models/shared/mappingresponse.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatescoperesponse.md b/docs/pkg/models/operations/updatescoperesponse.md index 3115cd6..e1db213 100644 --- a/docs/pkg/models/operations/updatescoperesponse.md +++ b/docs/pkg/models/operations/updatescoperesponse.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `UpdateScopeResponse` | [*shared.UpdateScopeResponse](../../../pkg/models/shared/updatescoperesponse.md) | :heavy_minus_sign: | Updated scope | \ No newline at end of file diff --git a/docs/pkg/models/operations/updatewalletresponse.md b/docs/pkg/models/operations/updatewalletresponse.md index ee06b16..13ecf71 100644 --- a/docs/pkg/models/operations/updatewalletresponse.md +++ b/docs/pkg/models/operations/updatewalletresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/voidholdresponse.md b/docs/pkg/models/operations/voidholdresponse.md index b1beb94..c5e3a0e 100644 --- a/docs/pkg/models/operations/voidholdresponse.md +++ b/docs/pkg/models/operations/voidholdresponse.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `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` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/pkg/models/operations/walletsgetserverinforesponse.md b/docs/pkg/models/operations/walletsgetserverinforesponse.md index 585707c..4009574 100644 --- a/docs/pkg/models/operations/walletsgetserverinforesponse.md +++ b/docs/pkg/models/operations/walletsgetserverinforesponse.md @@ -8,5 +8,5 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `ServerInfo` | [*shared.ServerInfo](../../../pkg/models/shared/serverinfo.md) | :heavy_minus_sign: | Server information | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `WalletsErrorResponse` | [*shared.WalletsErrorResponse](../../../pkg/models/shared/walletserrorresponse.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index df68279..b3c5f89 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -22,10 +22,11 @@ Add metadata to an account package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -82,11 +83,12 @@ Count the accounts from a ledger package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "context" + "log" + "net/http" ) func main() { @@ -140,10 +142,10 @@ Get account by its address package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -194,11 +196,11 @@ List accounts from a ledger, sorted by address in descending order. package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "context" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "log" ) func main() { diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index 74a9a91..b874d54 100644 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -20,11 +20,11 @@ Get the balances from a ledger's account package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "context" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "log" ) func main() { @@ -75,10 +75,10 @@ Get the aggregated balances from selected accounts package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 3622a72..9500ea7 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -27,10 +27,11 @@ Add scope to client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -81,10 +82,10 @@ Create client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -140,10 +141,10 @@ Add a secret to a client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -199,10 +200,11 @@ Delete client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -250,10 +252,11 @@ Delete scope from client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -304,10 +307,11 @@ Delete a secret from a client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -358,10 +362,10 @@ List clients package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -405,10 +409,10 @@ Read client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -456,10 +460,10 @@ Update client package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md index 26cec59..baf24b3 100644 --- a/docs/sdks/formance/README.md +++ b/docs/sdks/formance/README.md @@ -32,10 +32,10 @@ Get server info package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -79,10 +79,10 @@ Get server info package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -126,10 +126,10 @@ Get server info package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index 0a4806c..bf2d34a 100644 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -19,10 +19,10 @@ Get information about a ledger package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md index aef59b8..2865a92 100644 --- a/docs/sdks/logs/README.md +++ b/docs/sdks/logs/README.md @@ -19,11 +19,11 @@ List the logs from a ledger, sorted by ID in descending order. package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "context" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "log" ) func main() { diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md index 89417c5..b71a4c5 100644 --- a/docs/sdks/mapping/README.md +++ b/docs/sdks/mapping/README.md @@ -20,10 +20,10 @@ Get the mapping of a ledger package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -71,10 +71,10 @@ Update the mapping of a ledger package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 854e5b1..7393c4f 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -25,10 +25,10 @@ Create a workflow package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -79,10 +79,10 @@ Get a flow by id package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -130,10 +130,10 @@ Get a workflow occurrence by id package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -184,10 +184,10 @@ List registered flows package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -231,10 +231,10 @@ List occurrences of a workflow package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -282,10 +282,10 @@ Get server info package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -329,10 +329,10 @@ Run workflow package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 74ba676..59094a9 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -30,10 +30,10 @@ Execute a transfer between two Stripe accounts. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -83,10 +83,10 @@ Get a specific task associated to the connector. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -137,10 +137,10 @@ Get a payment package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -188,10 +188,11 @@ Install a connector by its name and config. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -248,10 +249,10 @@ List all installed connectors. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -295,10 +296,10 @@ List the configs of each available connector. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -342,10 +343,10 @@ List all tasks associated with this connector. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -399,10 +400,10 @@ List payments package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -458,10 +459,10 @@ List accounts package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -517,10 +518,10 @@ Read connector config package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -570,10 +571,11 @@ It will remove the connector and ALL PAYMENTS generated with it. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -621,10 +623,11 @@ Uninstall a connector by its name. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index eba5cfd..67ed5ab 100644 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -25,10 +25,11 @@ Add a transient scope to a scope package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -79,10 +80,10 @@ Create scope package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -132,10 +133,11 @@ Delete scope package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -183,10 +185,11 @@ Delete a transient scope from a scope package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -237,10 +240,10 @@ List Scopes package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -284,10 +287,10 @@ Read scope package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -335,10 +338,10 @@ Update scope package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index e1df308..b445441 100644 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -22,10 +22,10 @@ This route is deprecated, and has been merged into `POST /{ledger}/transactions` package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 4fb0d8a..0589b7b 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -19,10 +19,10 @@ ElasticSearch query engine package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 840b915..b9b7e8d 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -19,10 +19,10 @@ Show server information package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index d23e634..66c057d 100644 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -20,10 +20,10 @@ Get statistics from a ledger. (aggregate metrics on accounts and transactions) package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index c1d522c..141fa5e 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -25,10 +25,10 @@ Create a new batch of transactions to a ledger package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -97,10 +97,11 @@ Set the metadata of a transaction by its ID package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -157,11 +158,12 @@ Count the transactions from a ledger package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "context" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "log" + "net/http" ) func main() { @@ -213,10 +215,10 @@ Create a new transaction to a ledger package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -295,10 +297,10 @@ Get transaction from a ledger by its ID package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -349,11 +351,11 @@ List transactions from a ledger, sorted by txid in descending order. package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" + "context" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "log" ) func main() { @@ -408,10 +410,10 @@ Revert a ledger transaction by its ID package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index b887ee4..e7f13ae 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -20,10 +20,10 @@ List users package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -67,10 +67,10 @@ Read user package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index ac63665..060d4ed 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -33,10 +33,11 @@ Confirm a hold package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -90,10 +91,10 @@ Create a balance package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -146,10 +147,10 @@ Create a new wallet package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -199,10 +200,11 @@ Credit a wallet package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -269,10 +271,10 @@ Debit a wallet package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -340,10 +342,10 @@ Get detailed balance package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -394,10 +396,10 @@ Get a hold package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -445,11 +447,11 @@ Get all holds for a wallet package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "context" + "log" ) func main() { @@ -504,10 +506,10 @@ func main() { package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -561,10 +563,10 @@ Get a wallet package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -612,10 +614,10 @@ List balances of a wallet package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -663,11 +665,11 @@ List all wallets package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "context" + "log" ) func main() { @@ -724,11 +726,12 @@ Update a wallet package main import( - "context" - "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" + "context" + "log" + "net/http" ) func main() { @@ -783,10 +786,11 @@ Cancel a hold package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -834,10 +838,10 @@ Get server info package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index d6d1cf3..069a19a 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -25,10 +25,10 @@ Activate a webhooks config by ID, to start receiving webhooks to its endpoint. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -80,10 +80,10 @@ The format is a random string of bytes of size 24, base64 encoded. (larger size package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -136,10 +136,10 @@ Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -187,10 +187,11 @@ Delete a webhooks config by ID. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + "net/http" ) func main() { @@ -238,10 +239,10 @@ Sorted by updated date descending package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -301,10 +302,10 @@ All eventTypes are converted to lower-case when inserted. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { @@ -356,10 +357,10 @@ Test a config by sending a webhook to its endpoint. package main import( + "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" + formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" - "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" ) func main() { diff --git a/formance.go b/formance.go index 3cee883..e8bf100 100644 --- a/formance.go +++ b/formance.go @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.5.2", - GenVersion: "2.187.7", - UserAgent: "speakeasy-sdk/go 0.5.2 2.187.7 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.5.3", + GenVersion: "2.192.1", + UserAgent: "speakeasy-sdk/go 0.5.3 2.192.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 5d13b94..19956cc 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,8 +2,8 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.118.3 - generationVersion: 2.187.7 + speakeasyVersion: 1.120.3 + generationVersion: 2.192.1 generation: comments: {} sdkClassName: formance @@ -13,7 +13,7 @@ generation: features: go: constsAndDefaults: 0.1.1 - core: 3.1.4 + core: 3.1.5 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.2 @@ -21,7 +21,7 @@ features: nameOverrides: 2.81.1 unions: 2.85.0 go: - version: 0.5.2 + version: 0.5.3 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/pkg/models/operations/countaccounts.go b/pkg/models/operations/countaccounts.go index 165a909..143ebe2 100644 --- a/pkg/models/operations/countaccounts.go +++ b/pkg/models/operations/countaccounts.go @@ -69,7 +69,7 @@ func (o *CountAccountsResponse) GetErrorResponse() *shared.ErrorResponse { func (o *CountAccountsResponse) GetHeaders() map[string][]string { if o == nil { - return nil + return map[string][]string{} } return o.Headers } diff --git a/pkg/models/operations/counttransactions.go b/pkg/models/operations/counttransactions.go index 86021a9..14fb1d2 100644 --- a/pkg/models/operations/counttransactions.go +++ b/pkg/models/operations/counttransactions.go @@ -159,7 +159,7 @@ func (o *CountTransactionsResponse) GetErrorResponse() *shared.ErrorResponse { func (o *CountTransactionsResponse) GetHeaders() map[string][]string { if o == nil { - return nil + return map[string][]string{} } return o.Headers } From 84dfadf7ec4ea498bf57ebaaebbc583a34eb8b5f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 18 Nov 2023 00:39:55 +0000 Subject: [PATCH 06/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.121.1 --- RELEASES.md | 12 +++++++++++- docs/sdks/accounts/README.md | 2 +- formance.go | 6 +++--- gen.yaml | 8 ++++---- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index c9fca16..6106be9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -160,4 +160,14 @@ Based on: ### Generated - [go v0.5.3] . ### Releases -- [Go v0.5.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.3 - . \ No newline at end of file +- [Go v0.5.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.3 - . + +## 2023-11-18 00:39:40 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.121.1 (2.194.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.5.4] . +### Releases +- [Go v0.5.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.4 - . \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index b3c5f89..81e1467 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -36,8 +36,8 @@ func main() { requestBody := map[string]interface{}{ - "admin": "string", "a": "string", + "admin": "string", } var address string = "users:001" diff --git a/formance.go b/formance.go index e8bf100..f47054a 100644 --- a/formance.go +++ b/formance.go @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.5.3", - GenVersion: "2.192.1", - UserAgent: "speakeasy-sdk/go 0.5.3 2.192.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.5.4", + GenVersion: "2.194.1", + UserAgent: "speakeasy-sdk/go 0.5.4 2.194.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 19956cc..fb58a69 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,8 +2,8 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.120.3 - generationVersion: 2.192.1 + speakeasyVersion: 1.121.1 + generationVersion: 2.194.1 generation: comments: {} sdkClassName: formance @@ -17,11 +17,11 @@ features: deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.2 - globalServerURLs: 2.82.0 + globalServerURLs: 2.82.1 nameOverrides: 2.81.1 unions: 2.85.0 go: - version: 0.5.3 + version: 0.5.4 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: From d8bccc119cc40fa3a3b9903d7cd225f4c290ab29 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 5 Dec 2023 00:41:52 +0000 Subject: [PATCH 07/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.125.1 --- README.md | 39 +++++++++---------- RELEASES.md | 12 +++++- USAGE.md | 4 +- .../addmetadataontransactionrequest.md | 10 ++--- .../operations/addmetadatatoaccountrequest.md | 2 +- .../shared/accountwithvolumesandbalances.md | 4 +- .../shared/aggregatebalancesresponse.md | 6 +-- docs/pkg/models/shared/configuser.md | 2 +- docs/pkg/models/shared/posttransaction.md | 2 +- docs/pkg/models/shared/script.md | 2 +- docs/pkg/models/shared/transaction.md | 18 ++++----- docs/pkg/models/shared/transactiondata.md | 2 +- docs/pkg/models/shared/webhooksconfig.md | 2 +- docs/sdks/accounts/README.md | 4 +- docs/sdks/transactions/README.md | 2 +- files.gen | 2 +- formance.go | 6 +-- gen.yaml | 8 ++-- pkg/utils/json.go | 29 +++++++++++--- 19 files changed, 91 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index f8bfe7d..e3a7b13 100755 --- a/README.md +++ b/README.md @@ -12,16 +12,17 @@ - + ## SDK Installation ```bash go get github.com/speakeasy-sdks/formance-go-sdk ``` - + + ## SDK Example Usage - + ### Example ```go @@ -51,9 +52,9 @@ func main() { } ``` - + - + ## Available Resources and Operations ### [Formance SDK](docs/sdks/formance/README.md) @@ -192,17 +193,13 @@ func main() { * [GetManyConfigs](docs/sdks/webhooks/README.md#getmanyconfigs) - Get many configs * [InsertConfig](docs/sdks/webhooks/README.md#insertconfig) - Insert a new config * [TestConfig](docs/sdks/webhooks/README.md#testconfig) - Test one config - - + - - - - + ## Error Handling Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass. @@ -243,11 +240,11 @@ func main() { } ``` - + - + ## Server Selection ### Select Server by Index @@ -326,11 +323,11 @@ func main() { } ``` - + - + ## Custom HTTP Client The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface: @@ -357,17 +354,19 @@ var ( ``` This can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration. - + + + +## Special Types - - + - + ## Authentication ### Per-Client Security Schemes @@ -405,7 +404,7 @@ func main() { } ``` - + diff --git a/RELEASES.md b/RELEASES.md index 6106be9..ba1499b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -170,4 +170,14 @@ Based on: ### Generated - [go v0.5.4] . ### Releases -- [Go v0.5.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.4 - . \ No newline at end of file +- [Go v0.5.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.4 - . + +## 2023-12-05 00:41:37 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.125.1 (2.210.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.5.5] . +### Releases +- [Go v0.5.5] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.5 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 430049c..04511c8 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,4 +1,4 @@ - + ```go package main @@ -26,4 +26,4 @@ func main() { } ``` - \ No newline at end of file + \ No newline at end of file diff --git a/docs/pkg/models/operations/addmetadataontransactionrequest.md b/docs/pkg/models/operations/addmetadataontransactionrequest.md index 15302f5..701a028 100644 --- a/docs/pkg/models/operations/addmetadataontransactionrequest.md +++ b/docs/pkg/models/operations/addmetadataontransactionrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | -| `RequestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | [object Object] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | +| `RequestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | \ No newline at end of file diff --git a/docs/pkg/models/operations/addmetadatatoaccountrequest.md b/docs/pkg/models/operations/addmetadatatoaccountrequest.md index 17f0b5d..7cec63a 100644 --- a/docs/pkg/models/operations/addmetadatatoaccountrequest.md +++ b/docs/pkg/models/operations/addmetadatatoaccountrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `RequestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | [object Object] | +| `RequestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | | `Address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountwithvolumesandbalances.md b/docs/pkg/models/shared/accountwithvolumesandbalances.md index c156ecf..b9a6cb0 100644 --- a/docs/pkg/models/shared/accountwithvolumesandbalances.md +++ b/docs/pkg/models/shared/accountwithvolumesandbalances.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | +| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | {"COIN":100} | | `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../../pkg/models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | | | `Type` | **string* | :heavy_minus_sign: | N/A | virtual | -| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | [object Object] | \ No newline at end of file +| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | {"COIN":{"input":100,"output":0}} | \ No newline at end of file diff --git a/docs/pkg/models/shared/aggregatebalancesresponse.md b/docs/pkg/models/shared/aggregatebalancesresponse.md index 82b9b94..cb8629e 100644 --- a/docs/pkg/models/shared/aggregatebalancesresponse.md +++ b/docs/pkg/models/shared/aggregatebalancesresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `Data` | map[string]*int64* | :heavy_check_mark: | N/A | [object Object] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| `Data` | map[string]*int64* | :heavy_check_mark: | N/A | {"USD":100,"EUR":12} | \ No newline at end of file diff --git a/docs/pkg/models/shared/configuser.md b/docs/pkg/models/shared/configuser.md index 1bdef6f..41535c0 100644 --- a/docs/pkg/models/shared/configuser.md +++ b/docs/pkg/models/shared/configuser.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | | `Endpoint` | *string* | :heavy_check_mark: | N/A | https://example.com | -| `EventTypes` | []*string* | :heavy_check_mark: | N/A | TYPE1,TYPE2 | +| `EventTypes` | []*string* | :heavy_check_mark: | N/A | ["TYPE1","TYPE2"] | | `Secret` | **string* | :heavy_minus_sign: | N/A | V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 | \ No newline at end of file diff --git a/docs/pkg/models/shared/posttransaction.md b/docs/pkg/models/shared/posttransaction.md index 44cf664..fa868eb 100644 --- a/docs/pkg/models/shared/posttransaction.md +++ b/docs/pkg/models/shared/posttransaction.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | | `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_minus_sign: | N/A | | | `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | | `Script` | [*shared.PostTransactionScript](../../../pkg/models/shared/posttransactionscript.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/pkg/models/shared/script.md b/docs/pkg/models/shared/script.md index 41b73f7..e16de68 100644 --- a/docs/pkg/models/shared/script.md +++ b/docs/pkg/models/shared/script.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| | `Reference` | **string* | :heavy_minus_sign: | Reference to attach to the generated transaction | order_1234 | | `Vars` | [*shared.Vars](../../../pkg/models/shared/vars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/transaction.md b/docs/pkg/models/shared/transaction.md index 3f1f084..6c7c80b 100644 --- a/docs/pkg/models/shared/transaction.md +++ b/docs/pkg/models/shared/transaction.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | -| `PostCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | -| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `PreCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | [object Object] | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `PostCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | {"orders:1":{"USD":{"input":100,"output":10,"balance":90}},"orders:2":{"USD":{"input":100,"output":10,"balance":90}}} | +| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | {"orders:1":{"USD":{"input":100,"output":10,"balance":90}},"orders:2":{"USD":{"input":100,"output":10,"balance":90}}} | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/transactiondata.md b/docs/pkg/models/shared/transactiondata.md index a7bcc30..8a8fb7c 100644 --- a/docs/pkg/models/shared/transactiondata.md +++ b/docs/pkg/models/shared/transactiondata.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | [object Object] | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | | `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | | `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | | `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/webhooksconfig.md b/docs/pkg/models/shared/webhooksconfig.md index 353a2cf..c41b941 100644 --- a/docs/pkg/models/shared/webhooksconfig.md +++ b/docs/pkg/models/shared/webhooksconfig.md @@ -8,7 +8,7 @@ | `Active` | **bool* | :heavy_minus_sign: | N/A | true | | `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | | `Endpoint` | **string* | :heavy_minus_sign: | N/A | https://example.com | -| `EventTypes` | []*string* | :heavy_minus_sign: | N/A | TYPE1,TYPE2 | +| `EventTypes` | []*string* | :heavy_minus_sign: | N/A | ["TYPE1","TYPE2"] | | `ID` | **string* | :heavy_minus_sign: | N/A | | | `Secret` | **string* | :heavy_minus_sign: | N/A | V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 | | `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 81e1467..533aa46 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -36,8 +36,8 @@ func main() { requestBody := map[string]interface{}{ - "a": "string", "admin": "string", + "a": "string", } var address string = "users:001" @@ -61,7 +61,7 @@ func main() { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `requestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | [object Object] | +| `requestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | | `address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 141fa5e..301aa78 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -138,7 +138,7 @@ func main() { | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | -| `requestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | [object Object] | +| `requestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | ### Response diff --git a/files.gen b/files.gen index dd7049a..83e1598 100755 --- a/files.gen +++ b/files.gen @@ -254,7 +254,6 @@ pkg/utils/utils.go /pkg/models/shared/attemptresponse.go /pkg/models/shared/attempt.go /pkg/models/shared/security.go -USAGE.md docs/pkg/models/operations/getserverinforesponse.md docs/pkg/models/operations/paymentsgetserverinforesponse.md docs/pkg/models/operations/searchgetserverinforesponse.md @@ -619,4 +618,5 @@ docs/sdks/payments/README.md docs/sdks/search/README.md docs/sdks/wallets/README.md docs/sdks/webhooks/README.md +USAGE.md .gitattributes \ No newline at end of file diff --git a/formance.go b/formance.go index f47054a..29fa024 100644 --- a/formance.go +++ b/formance.go @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.5.4", - GenVersion: "2.194.1", - UserAgent: "speakeasy-sdk/go 0.5.4 2.194.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.5.5", + GenVersion: "2.210.3", + UserAgent: "speakeasy-sdk/go 0.5.5 2.210.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index fb58a69..be2c792 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,8 +2,8 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.121.1 - generationVersion: 2.194.1 + speakeasyVersion: 1.125.1 + generationVersion: 2.210.3 generation: comments: {} sdkClassName: formance @@ -12,7 +12,7 @@ generation: optionalPropertyRendering: withExample features: go: - constsAndDefaults: 0.1.1 + constsAndDefaults: 0.1.2 core: 3.1.5 deprecations: 2.81.1 flattening: 2.81.1 @@ -21,7 +21,7 @@ features: nameOverrides: 2.81.1 unions: 2.85.0 go: - version: 0.5.4 + version: 0.5.5 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/pkg/utils/json.go b/pkg/utils/json.go index dd057d5..478744c 100644 --- a/pkg/utils/json.go +++ b/pkg/utils/json.go @@ -50,7 +50,7 @@ func MarshalJSON(v interface{}, tag reflect.StructTag, topLevel bool) ([]byte, e } } - if isNil(field.Type, fieldVal) { + if isNil(field.Type, fieldVal) && field.Tag.Get("const") == "" { if omitEmpty { continue } @@ -66,7 +66,11 @@ func MarshalJSON(v interface{}, tag reflect.StructTag, topLevel bool) ([]byte, e } if additionalProperties == "true" { - if field.Type.Kind() != reflect.Map { + if isNil(field.Type, fieldVal) { + continue + } + fieldVal := trueReflectValue(fieldVal) + if fieldVal.Type().Kind() != reflect.Map { return nil, fmt.Errorf("additionalProperties must be a map") } @@ -202,20 +206,33 @@ func UnmarshalJSON(b []byte, v interface{}, tag reflect.StructTag, topLevel bool } if additionalPropertiesField != nil && additionalPropertiesValue != nil { - if additionalPropertiesValue.Kind() != reflect.Map { + typeOfMap := additionalPropertiesField.Type + if additionalPropertiesValue.Type().Kind() == reflect.Interface { + typeOfMap = reflect.TypeOf(map[string]interface{}{}) + } else if additionalPropertiesValue.Type().Kind() != reflect.Map { return fmt.Errorf("additionalProperties must be a map") } - additionalPropertiesValue.Set(reflect.MakeMap(additionalPropertiesField.Type)) + mapValue := reflect.MakeMap(typeOfMap) for key, value := range unmarhsaled { - val := reflect.New(additionalPropertiesField.Type.Elem()) + val := reflect.New(typeOfMap.Elem()) if err := unmarshalValue(value, val, additionalPropertiesField.Tag, disallowUnknownFields); err != nil { return err } - additionalPropertiesValue.SetMapIndex(reflect.ValueOf(key), val.Elem()) + if val.Elem().Type().String() == typeOfMap.Elem().String() { + mapValue.SetMapIndex(reflect.ValueOf(key), val.Elem()) + } else { + mapValue.SetMapIndex(reflect.ValueOf(key), trueReflectValue(val)) + } + + } + if additionalPropertiesValue.Type().Kind() == reflect.Interface { + additionalPropertiesValue.Set(mapValue) + } else { + additionalPropertiesValue.Set(mapValue) } } } From de1944506ddbceb4bd46c3c52e16427142235284 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 12 Dec 2023 00:46:37 +0000 Subject: [PATCH 08/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.126.0 --- README.md | 10 ++-- RELEASES.md | 12 ++++- USAGE.md | 2 +- docs/pkg/models/shared/query.md | 6 +-- docs/pkg/models/shared/security.md | 6 +-- docs/sdks/accounts/README.md | 10 ++-- docs/sdks/balances/README.md | 4 +- docs/sdks/clients/README.md | 38 +++++++------- docs/sdks/formance/README.md | 6 +-- docs/sdks/ledger/README.md | 2 +- docs/sdks/logs/README.md | 2 +- docs/sdks/mapping/README.md | 14 ++--- docs/sdks/orchestration/README.md | 14 ++--- docs/sdks/payments/README.md | 70 ++++++++++++------------- docs/sdks/scopes/README.md | 24 ++++----- docs/sdks/script/README.md | 4 +- docs/sdks/search/README.md | 49 ++--------------- docs/sdks/server/README.md | 2 +- docs/sdks/stats/README.md | 2 +- docs/sdks/transactions/README.md | 26 ++++----- docs/sdks/users/README.md | 4 +- docs/sdks/wallets/README.md | 84 +++++++++++++++--------------- docs/sdks/webhooks/README.md | 24 ++++----- formance.go | 7 ++- gen.yaml | 10 ++-- 25 files changed, 200 insertions(+), 232 deletions(-) diff --git a/README.md b/README.md index e3a7b13..35802c8 100755 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ import ( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -224,7 +224,7 @@ import ( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -271,7 +271,7 @@ import ( func main() { s := formancegosdk.New( formancegosdk.WithServerIndex(1), - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -308,7 +308,7 @@ import ( func main() { s := formancegosdk.New( formancegosdk.WithServerURL("http://localhost"), - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -389,7 +389,7 @@ import ( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() diff --git a/RELEASES.md b/RELEASES.md index ba1499b..6797fb0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -180,4 +180,14 @@ Based on: ### Generated - [go v0.5.5] . ### Releases -- [Go v0.5.5] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.5 - . \ No newline at end of file +- [Go v0.5.5] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.5.5 - . + +## 2023-12-12 00:46:23 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.126.0 (2.213.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.6.0] . +### Releases +- [Go v0.6.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 04511c8..49106f8 100644 --- a/USAGE.md +++ b/USAGE.md @@ -11,7 +11,7 @@ import ( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() diff --git a/docs/pkg/models/shared/query.md b/docs/pkg/models/shared/query.md index bca8d31..63e5dfb 100644 --- a/docs/pkg/models/shared/query.md +++ b/docs/pkg/models/shared/query.md @@ -5,11 +5,11 @@ | Field | Type | Required | Description | Example | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `After` | []*string* | :heavy_minus_sign: | N/A | users:002 | +| `After` | []*string* | :heavy_minus_sign: | N/A | | | `Cursor` | **string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | -| `Ledgers` | []*string* | :heavy_minus_sign: | N/A | quickstart | +| `Ledgers` | []*string* | :heavy_minus_sign: | N/A | | | `PageSize` | **int64* | :heavy_minus_sign: | N/A | | | `Policy` | **string* | :heavy_minus_sign: | N/A | OR | | `Sort` | **string* | :heavy_minus_sign: | N/A | txid:asc | | `Target` | **string* | :heavy_minus_sign: | N/A | | -| `Terms` | []*string* | :heavy_minus_sign: | N/A | destination=central_bank1 | \ No newline at end of file +| `Terms` | []*string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/security.md b/docs/pkg/models/shared/security.md index 5d923fc..1fe487a 100644 --- a/docs/pkg/models/shared/security.md +++ b/docs/pkg/models/shared/security.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `Authorization` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Authorization` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 533aa46..1002fb0 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -31,7 +31,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -93,7 +93,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -122,7 +122,7 @@ func main() { | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `address` | **string* | :heavy_minus_sign: | Filter accounts by address pattern (regular expression placed between ^ and $). | users:.+ | -| `metadata` | [*operations.Metadata](../../../pkg/models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.Metadata](../../pkg/models/operations/metadata.md) | :heavy_minus_sign: | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | | ### Response @@ -150,7 +150,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -205,7 +205,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index b874d54..4c1db22 100644 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -29,7 +29,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -83,7 +83,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 9500ea7..f11a7df 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -36,7 +36,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -90,7 +90,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -149,7 +149,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -176,11 +176,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `clientID` | *string* | :heavy_check_mark: | Client ID | -| `createSecretRequest` | [*shared.CreateSecretRequest](../../../pkg/models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `createSecretRequest` | [*shared.CreateSecretRequest](../../pkg/models/shared/createsecretrequest.md) | :heavy_minus_sign: | N/A | ### Response @@ -209,7 +209,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -261,7 +261,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -316,7 +316,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -370,7 +370,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -417,7 +417,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -468,7 +468,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -501,11 +501,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `clientID` | *string* | :heavy_check_mark: | Client ID | -| `updateClientRequest` | [*shared.UpdateClientRequest](../../../pkg/models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `clientID` | *string* | :heavy_check_mark: | Client ID | +| `updateClientRequest` | [*shared.UpdateClientRequest](../../pkg/models/shared/updateclientrequest.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md index baf24b3..84ebd11 100644 --- a/docs/sdks/formance/README.md +++ b/docs/sdks/formance/README.md @@ -40,7 +40,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -87,7 +87,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -134,7 +134,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index bf2d34a..fa800b3 100644 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -27,7 +27,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md index 2865a92..d597053 100644 --- a/docs/sdks/logs/README.md +++ b/docs/sdks/logs/README.md @@ -28,7 +28,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md index b71a4c5..227431f 100644 --- a/docs/sdks/mapping/README.md +++ b/docs/sdks/mapping/README.md @@ -28,7 +28,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -79,7 +79,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -108,11 +108,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `mapping` | [shared.Mapping](../../../pkg/models/shared/mapping.md) | :heavy_check_mark: | N/A | | -| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `mapping` | [shared.Mapping](../../pkg/models/shared/mapping.md) | :heavy_check_mark: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | ### Response diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 7393c4f..6323641 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -33,7 +33,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -87,7 +87,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -138,7 +138,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -192,7 +192,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -239,7 +239,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -290,7 +290,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -337,7 +337,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 59094a9..42411ac 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -38,7 +38,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -91,7 +91,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -113,11 +113,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | -| `taskID` | *string* | :heavy_check_mark: | The task ID. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| `taskID` | *string* | :heavy_check_mark: | The task ID. | ### Response @@ -145,7 +145,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -197,7 +197,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -225,11 +225,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connectorConfig` | [shared.ConnectorConfig](../../../pkg/models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | -| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connectorConfig` | [shared.ConnectorConfig](../../pkg/models/shared/connectorconfig.md) | :heavy_check_mark: | N/A | +| `connector` | [shared.Connector](../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response @@ -257,7 +257,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -304,7 +304,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -351,7 +351,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -378,7 +378,7 @@ func main() { | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | +| `connector` | [shared.Connector](../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page.
| | @@ -408,7 +408,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -467,7 +467,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -526,7 +526,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -546,10 +546,10 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response @@ -580,7 +580,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -600,10 +600,10 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response @@ -632,7 +632,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -652,10 +652,10 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `connector` | [shared.Connector](../../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `connector` | [shared.Connector](../../pkg/models/shared/connector.md) | :heavy_check_mark: | The name of the connector. | ### Response diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index 67ed5ab..c63c29f 100644 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -34,7 +34,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -88,7 +88,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -142,7 +142,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -194,7 +194,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -248,7 +248,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -295,7 +295,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -346,7 +346,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -373,11 +373,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `scopeID` | *string* | :heavy_check_mark: | Scope ID | -| `updateScopeRequest` | [*shared.UpdateScopeRequest](../../../pkg/models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `scopeID` | *string* | :heavy_check_mark: | Scope ID | +| `updateScopeRequest` | [*shared.UpdateScopeRequest](../../pkg/models/shared/updatescoperequest.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index b445441..4cbcf33 100644 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -30,7 +30,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -72,7 +72,7 @@ func main() { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `script` | [shared.Script](../../../pkg/models/shared/script.md) | :heavy_check_mark: | N/A | | +| `script` | [shared.Script](../../pkg/models/shared/script.md) | :heavy_check_mark: | N/A | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 0589b7b..81b1664 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -27,63 +27,22 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() res, err := s.Search.Search(ctx, shared.Query{ After: []string{ - "u", - "s", - "e", - "r", - "s", - ":", - "0", - "0", - "2", + "users:002", }, Cursor: formancegosdk.String("YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="), Ledgers: []string{ - "q", - "u", - "i", - "c", - "k", - "s", - "t", - "a", - "r", - "t", + "quickstart", }, Policy: formancegosdk.String("OR"), Sort: formancegosdk.String("txid:asc"), Terms: []string{ - "d", - "e", - "s", - "t", - "i", - "n", - "a", - "t", - "i", - "o", - "n", - "=", - "c", - "e", - "n", - "t", - "r", - "a", - "l", - "_", - "b", - "a", - "n", - "k", - "1", + "destination=central_bank1", }, }) if err != nil { diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index b9b7e8d..fcfa831 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -27,7 +27,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index 66c057d..739ebc7 100644 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -28,7 +28,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 301aa78..5c0f380 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -33,7 +33,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -73,11 +73,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `transactions` | [shared.Transactions](../../../pkg/models/shared/transactions.md) | :heavy_check_mark: | N/A | | -| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `transactions` | [shared.Transactions](../../pkg/models/shared/transactions.md) | :heavy_check_mark: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | ### Response @@ -106,7 +106,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -168,7 +168,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -223,7 +223,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -275,7 +275,7 @@ func main() { | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `postTransaction` | [shared.PostTransaction](../../../pkg/models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | +| `postTransaction` | [shared.PostTransaction](../../pkg/models/shared/posttransaction.md) | :heavy_check_mark: | The request body must contain at least one of the following objects:
- `postings`: suitable for simple transactions
- `script`: enabling more complex transactions with Numscript
| | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `preview` | **bool* | :heavy_minus_sign: | Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. | true | @@ -305,7 +305,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -360,7 +360,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -418,7 +418,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index e7f13ae..b340270 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -28,7 +28,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -75,7 +75,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index 060d4ed..4250130 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -42,7 +42,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -67,11 +67,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `holdID` | *string* | :heavy_check_mark: | N/A | -| `confirmHoldRequest` | [*shared.ConfirmHoldRequest](../../../pkg/models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `holdID` | *string* | :heavy_check_mark: | N/A | +| `confirmHoldRequest` | [*shared.ConfirmHoldRequest](../../pkg/models/shared/confirmholdrequest.md) | :heavy_minus_sign: | N/A | ### Response @@ -99,7 +99,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -123,11 +123,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `createBalanceRequest` | [*shared.CreateBalanceRequest](../../../pkg/models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `createBalanceRequest` | [*shared.CreateBalanceRequest](../../pkg/models/shared/createbalancerequest.md) | :heavy_minus_sign: | N/A | ### Response @@ -155,7 +155,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -209,7 +209,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -247,11 +247,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `creditWalletRequest` | [*shared.CreditWalletRequest](../../../pkg/models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `creditWalletRequest` | [*shared.CreditWalletRequest](../../pkg/models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | ### Response @@ -279,7 +279,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -318,11 +318,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `debitWalletRequest` | [*shared.DebitWalletRequest](../../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `debitWalletRequest` | [*shared.DebitWalletRequest](../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | ### Response @@ -350,7 +350,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -404,7 +404,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -456,7 +456,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -486,7 +486,7 @@ func main() { | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `metadata` | [*operations.GetHoldsQueryParamMetadata](../../../pkg/models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.GetHoldsQueryParamMetadata](../../pkg/models/operations/getholdsqueryparammetadata.md) | :heavy_minus_sign: | Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | | `walletID` | **string* | :heavy_minus_sign: | The wallet to filter on | | @@ -514,7 +514,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -571,7 +571,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -622,7 +622,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -674,7 +674,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -704,7 +704,7 @@ func main() { | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `cursor` | **string* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | -| `metadata` | [*operations.ListWalletsQueryParamMetadata](../../../pkg/models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | +| `metadata` | [*operations.ListWalletsQueryParamMetadata](../../pkg/models/operations/listwalletsqueryparammetadata.md) | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | | | `name` | **string* | :heavy_minus_sign: | Filter on wallet name | | | `pageSize` | **int64* | :heavy_minus_sign: | The maximum number of results to return per page | | @@ -736,7 +736,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -762,11 +762,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [*operations.UpdateWalletRequestBody](../../../pkg/models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `id` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [*operations.UpdateWalletRequestBody](../../pkg/models/operations/updatewalletrequestbody.md) | :heavy_minus_sign: | N/A | ### Response @@ -795,7 +795,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -846,7 +846,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 069a19a..aa1acf1 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -33,7 +33,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -88,7 +88,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -112,11 +112,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | -| `configChangeSecret` | [*shared.ConfigChangeSecret](../../../pkg/models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | Config ID | 4997257d-dfb6-445b-929c-cbe2ab182818 | +| `configChangeSecret` | [*shared.ConfigChangeSecret](../../pkg/models/shared/configchangesecret.md) | :heavy_minus_sign: | N/A | | ### Response @@ -144,7 +144,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -196,7 +196,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -247,7 +247,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) @@ -310,7 +310,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) ctx := context.Background() @@ -365,7 +365,7 @@ import( func main() { s := formancegosdk.New( - formancegosdk.WithSecurity(""), + formancegosdk.WithSecurity("Bearer "), ) diff --git a/formance.go b/formance.go index 29fa024..31c1d39 100644 --- a/formance.go +++ b/formance.go @@ -179,7 +179,6 @@ func withSecurity(security interface{}) func(context.Context) (interface{}, erro } // WithSecurity configures the SDK to use the provided security details - func WithSecurity(authorization string) SDKOption { return func(sdk *Formance) { security := shared.Security{Authorization: authorization} @@ -199,9 +198,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.5.5", - GenVersion: "2.210.3", - UserAgent: "speakeasy-sdk/go 0.5.5 2.210.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.6.0", + GenVersion: "2.213.3", + UserAgent: "speakeasy-sdk/go 0.6.0 2.213.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index be2c792..3acfe0f 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,8 +2,8 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.125.1 - generationVersion: 2.210.3 + speakeasyVersion: 1.126.0 + generationVersion: 2.213.3 generation: comments: {} sdkClassName: formance @@ -13,15 +13,15 @@ generation: features: go: constsAndDefaults: 0.1.2 - core: 3.1.5 + core: 3.2.0 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.2 + globalSecurity: 2.82.3 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 unions: 2.85.0 go: - version: 0.5.5 + version: 0.6.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: From 11fc4a7423c4c41b24ae45556667e83395083d56 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 19 Dec 2023 00:18:14 +0000 Subject: [PATCH 09/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.127.0 --- README.md | 2 +- RELEASES.md | 12 +++++++++++- docs/sdks/accounts/README.md | 8 ++++---- docs/sdks/balances/README.md | 4 ++-- docs/sdks/clients/README.md | 18 +++++++++--------- docs/sdks/formance/README.md | 6 +++--- docs/sdks/ledger/README.md | 2 +- docs/sdks/logs/README.md | 2 +- docs/sdks/mapping/README.md | 4 ++-- docs/sdks/orchestration/README.md | 14 +++++++------- docs/sdks/payments/README.md | 24 ++++++++++++------------ docs/sdks/scopes/README.md | 14 +++++++------- docs/sdks/script/README.md | 2 +- docs/sdks/search/README.md | 2 +- docs/sdks/server/README.md | 2 +- docs/sdks/stats/README.md | 2 +- docs/sdks/transactions/README.md | 14 +++++++------- docs/sdks/users/README.md | 4 ++-- docs/sdks/wallets/README.md | 30 +++++++++++++++--------------- docs/sdks/webhooks/README.md | 14 +++++++------- formance.go | 6 +++--- gen.yaml | 12 +++++++----- 22 files changed, 105 insertions(+), 93 deletions(-) diff --git a/README.md b/README.md index 35802c8..b3cd688 100755 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ Handling errors in this SDK should largely match your expectations. All operati | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ### Example diff --git a/RELEASES.md b/RELEASES.md index 6797fb0..f8a5d68 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -190,4 +190,14 @@ Based on: ### Generated - [go v0.6.0] . ### Releases -- [Go v0.6.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.0 - . \ No newline at end of file +- [Go v0.6.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.0 - . + +## 2023-12-19 00:17:59 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.127.0 (2.220.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.6.1] . +### Releases +- [Go v0.6.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.1 - . \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 1002fb0..1014714 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -71,7 +71,7 @@ func main() { **[*operations.AddMetadataToAccountResponse](../../pkg/models/operations/addmetadatatoaccountresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CountAccounts @@ -130,7 +130,7 @@ func main() { **[*operations.CountAccountsResponse](../../pkg/models/operations/countaccountsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetAccount @@ -184,7 +184,7 @@ func main() { **[*operations.GetAccountResponse](../../pkg/models/operations/getaccountresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListAccounts @@ -243,4 +243,4 @@ func main() { **[*operations.ListAccountsResponse](../../pkg/models/operations/listaccountsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index 4c1db22..97f5038 100644 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -63,7 +63,7 @@ func main() { **[*operations.GetBalancesResponse](../../pkg/models/operations/getbalancesresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetBalancesAggregated @@ -117,4 +117,4 @@ func main() { **[*operations.GetBalancesAggregatedResponse](../../pkg/models/operations/getbalancesaggregatedresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index f11a7df..2a6d3ee 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -70,7 +70,7 @@ func main() { **[*operations.AddScopeToClientResponse](../../pkg/models/operations/addscopetoclientresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CreateClient @@ -129,7 +129,7 @@ func main() { **[*operations.CreateClientResponse](../../pkg/models/operations/createclientresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CreateSecret @@ -188,7 +188,7 @@ func main() { **[*operations.CreateSecretResponse](../../pkg/models/operations/createsecretresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DeleteClient @@ -240,7 +240,7 @@ func main() { **[*operations.DeleteClientResponse](../../pkg/models/operations/deleteclientresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DeleteScopeFromClient @@ -295,7 +295,7 @@ func main() { **[*operations.DeleteScopeFromClientResponse](../../pkg/models/operations/deletescopefromclientresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DeleteSecret @@ -350,7 +350,7 @@ func main() { **[*operations.DeleteSecretResponse](../../pkg/models/operations/deletesecretresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListClients @@ -397,7 +397,7 @@ func main() { **[*operations.ListClientsResponse](../../pkg/models/operations/listclientsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ReadClient @@ -448,7 +448,7 @@ func main() { **[*operations.ReadClientResponse](../../pkg/models/operations/readclientresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## UpdateClient @@ -513,4 +513,4 @@ func main() { **[*operations.UpdateClientResponse](../../pkg/models/operations/updateclientresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md index 84ebd11..9277b20 100644 --- a/docs/sdks/formance/README.md +++ b/docs/sdks/formance/README.md @@ -67,7 +67,7 @@ func main() { **[*operations.GetServerInfoResponse](../../pkg/models/operations/getserverinforesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## PaymentsgetServerInfo @@ -114,7 +114,7 @@ func main() { **[*operations.PaymentsgetServerInfoResponse](../../pkg/models/operations/paymentsgetserverinforesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## SearchgetServerInfo @@ -161,4 +161,4 @@ func main() { **[*operations.SearchgetServerInfoResponse](../../pkg/models/operations/searchgetserverinforesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index fa800b3..0991c18 100644 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -58,4 +58,4 @@ func main() { **[*operations.GetLedgerInfoResponse](../../pkg/models/operations/getledgerinforesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md index d597053..11bab1d 100644 --- a/docs/sdks/logs/README.md +++ b/docs/sdks/logs/README.md @@ -61,4 +61,4 @@ func main() { **[*operations.ListLogsResponse](../../pkg/models/operations/listlogsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md index 227431f..a36d227 100644 --- a/docs/sdks/mapping/README.md +++ b/docs/sdks/mapping/README.md @@ -59,7 +59,7 @@ func main() { **[*operations.GetMappingResponse](../../pkg/models/operations/getmappingresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## UpdateMapping @@ -120,4 +120,4 @@ func main() { **[*operations.UpdateMappingResponse](../../pkg/models/operations/updatemappingresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 6323641..2f34b5e 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -67,7 +67,7 @@ func main() { **[*operations.CreateWorkflowResponse](../../pkg/models/operations/createworkflowresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetFlow @@ -118,7 +118,7 @@ func main() { **[*operations.GetFlowResponse](../../pkg/models/operations/getflowresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetWorkflowOccurrence @@ -172,7 +172,7 @@ func main() { **[*operations.GetWorkflowOccurrenceResponse](../../pkg/models/operations/getworkflowoccurrenceresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListFlows @@ -219,7 +219,7 @@ func main() { **[*operations.ListFlowsResponse](../../pkg/models/operations/listflowsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListRuns @@ -270,7 +270,7 @@ func main() { **[*operations.ListRunsResponse](../../pkg/models/operations/listrunsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## OrchestrationgetServerInfo @@ -317,7 +317,7 @@ func main() { **[*operations.OrchestrationgetServerInfoResponse](../../pkg/models/operations/orchestrationgetserverinforesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## RunWorkflow @@ -376,4 +376,4 @@ func main() { **[*operations.RunWorkflowResponse](../../pkg/models/operations/runworkflowresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 42411ac..2db132f 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -71,7 +71,7 @@ func main() { **[*operations.ConnectorsStripeTransferResponse](../../pkg/models/operations/connectorsstripetransferresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetConnectorTask @@ -125,7 +125,7 @@ func main() { **[*operations.GetConnectorTaskResponse](../../pkg/models/operations/getconnectortaskresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetPayment @@ -176,7 +176,7 @@ func main() { **[*operations.GetPaymentResponse](../../pkg/models/operations/getpaymentresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## InstallConnector @@ -237,7 +237,7 @@ func main() { **[*operations.InstallConnectorResponse](../../pkg/models/operations/installconnectorresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListAllConnectors @@ -284,7 +284,7 @@ func main() { **[*operations.ListAllConnectorsResponse](../../pkg/models/operations/listallconnectorsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListConfigsAvailableConnectors @@ -331,7 +331,7 @@ func main() { **[*operations.ListConfigsAvailableConnectorsResponse](../../pkg/models/operations/listconfigsavailableconnectorsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListConnectorTasks @@ -388,7 +388,7 @@ func main() { **[*operations.ListConnectorTasksResponse](../../pkg/models/operations/listconnectortasksresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListPayments @@ -447,7 +447,7 @@ func main() { **[*operations.ListPaymentsResponse](../../pkg/models/operations/listpaymentsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## PaymentslistAccounts @@ -506,7 +506,7 @@ func main() { **[*operations.PaymentslistAccountsResponse](../../pkg/models/operations/paymentslistaccountsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ReadConnectorConfig @@ -557,7 +557,7 @@ func main() { **[*operations.ReadConnectorConfigResponse](../../pkg/models/operations/readconnectorconfigresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ResetConnector @@ -611,7 +611,7 @@ func main() { **[*operations.ResetConnectorResponse](../../pkg/models/operations/resetconnectorresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## UninstallConnector @@ -663,4 +663,4 @@ func main() { **[*operations.UninstallConnectorResponse](../../pkg/models/operations/uninstallconnectorresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index c63c29f..60c9bb0 100644 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -68,7 +68,7 @@ func main() { **[*operations.AddTransientScopeResponse](../../pkg/models/operations/addtransientscoperesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CreateScope @@ -121,7 +121,7 @@ func main() { **[*operations.CreateScopeResponse](../../pkg/models/operations/createscoperesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DeleteScope @@ -173,7 +173,7 @@ func main() { **[*operations.DeleteScopeResponse](../../pkg/models/operations/deletescoperesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DeleteTransientScope @@ -228,7 +228,7 @@ func main() { **[*operations.DeleteTransientScopeResponse](../../pkg/models/operations/deletetransientscoperesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListScopes @@ -275,7 +275,7 @@ func main() { **[*operations.ListScopesResponse](../../pkg/models/operations/listscopesresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ReadScope @@ -326,7 +326,7 @@ func main() { **[*operations.ReadScopeResponse](../../pkg/models/operations/readscoperesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## UpdateScope @@ -385,4 +385,4 @@ func main() { **[*operations.UpdateScopeResponse](../../pkg/models/operations/updatescoperesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index 4cbcf33..e6dfaa9 100644 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -82,4 +82,4 @@ func main() { **[*operations.RunScriptResponse](../../pkg/models/operations/runscriptresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 81b1664..7a9e2b2 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -68,4 +68,4 @@ func main() { **[*operations.SearchResponse](../../pkg/models/operations/searchresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index fcfa831..a3b855d 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -54,4 +54,4 @@ func main() { **[*operations.GetInfoResponse](../../pkg/models/operations/getinforesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index 739ebc7..d02d28e 100644 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -59,4 +59,4 @@ func main() { **[*operations.ReadStatsResponse](../../pkg/models/operations/readstatsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 5c0f380..89e827f 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -85,7 +85,7 @@ func main() { **[*operations.CreateTransactionsResponse](../../pkg/models/operations/createtransactionsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## AddMetadataOnTransaction @@ -146,7 +146,7 @@ func main() { **[*operations.AddMetadataOnTransactionResponse](../../pkg/models/operations/addmetadataontransactionresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CountTransactions @@ -203,7 +203,7 @@ func main() { **[*operations.CountTransactionsResponse](../../pkg/models/operations/counttransactionsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CreateTransaction @@ -285,7 +285,7 @@ func main() { **[*operations.CreateTransactionResponse](../../pkg/models/operations/createtransactionresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetTransaction @@ -339,7 +339,7 @@ func main() { **[*operations.GetTransactionResponse](../../pkg/models/operations/gettransactionresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListTransactions @@ -398,7 +398,7 @@ func main() { **[*operations.ListTransactionsResponse](../../pkg/models/operations/listtransactionsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## RevertTransaction @@ -452,4 +452,4 @@ func main() { **[*operations.RevertTransactionResponse](../../pkg/models/operations/reverttransactionresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index b340270..693c17d 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -55,7 +55,7 @@ func main() { **[*operations.ListUsersResponse](../../pkg/models/operations/listusersresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ReadUser @@ -106,4 +106,4 @@ func main() { **[*operations.ReadUserResponse](../../pkg/models/operations/readuserresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index 4250130..fe4a916 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -79,7 +79,7 @@ func main() { **[*operations.ConfirmHoldResponse](../../pkg/models/operations/confirmholdresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CreateBalance @@ -135,7 +135,7 @@ func main() { **[*operations.CreateBalanceResponse](../../pkg/models/operations/createbalanceresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CreateWallet @@ -188,7 +188,7 @@ func main() { **[*operations.CreateWalletResponse](../../pkg/models/operations/createwalletresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## CreditWallet @@ -259,7 +259,7 @@ func main() { **[*operations.CreditWalletResponse](../../pkg/models/operations/creditwalletresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DebitWallet @@ -330,7 +330,7 @@ func main() { **[*operations.DebitWalletResponse](../../pkg/models/operations/debitwalletresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetBalance @@ -384,7 +384,7 @@ func main() { **[*operations.GetBalanceResponse](../../pkg/models/operations/getbalanceresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetHold @@ -435,7 +435,7 @@ func main() { **[*operations.GetHoldResponse](../../pkg/models/operations/getholdresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetHolds @@ -496,7 +496,7 @@ func main() { **[*operations.GetHoldsResponse](../../pkg/models/operations/getholdsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetTransactions @@ -551,7 +551,7 @@ func main() { **[*operations.GetTransactionsResponse](../../pkg/models/operations/gettransactionsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetWallet @@ -602,7 +602,7 @@ func main() { **[*operations.GetWalletResponse](../../pkg/models/operations/getwalletresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListBalances @@ -653,7 +653,7 @@ func main() { **[*operations.ListBalancesResponse](../../pkg/models/operations/listbalancesresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ListWallets @@ -714,7 +714,7 @@ func main() { **[*operations.ListWalletsResponse](../../pkg/models/operations/listwalletsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## UpdateWallet @@ -774,7 +774,7 @@ func main() { **[*operations.UpdateWalletResponse](../../pkg/models/operations/updatewalletresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## VoidHold @@ -826,7 +826,7 @@ func main() { **[*operations.VoidHoldResponse](../../pkg/models/operations/voidholdresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## WalletsgetServerInfo @@ -873,4 +873,4 @@ func main() { **[*operations.WalletsgetServerInfoResponse](../../pkg/models/operations/walletsgetserverinforesponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index aa1acf1..9b622ec 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -64,7 +64,7 @@ func main() { **[*operations.ActivateConfigResponse](../../pkg/models/operations/activateconfigresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## ChangeConfigSecret @@ -124,7 +124,7 @@ func main() { **[*operations.ChangeConfigSecretResponse](../../pkg/models/operations/changeconfigsecretresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DeactivateConfig @@ -175,7 +175,7 @@ func main() { **[*operations.DeactivateConfigResponse](../../pkg/models/operations/deactivateconfigresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## DeleteConfig @@ -227,7 +227,7 @@ func main() { **[*operations.DeleteConfigResponse](../../pkg/models/operations/deleteconfigresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## GetManyConfigs @@ -281,7 +281,7 @@ func main() { **[*operations.GetManyConfigsResponse](../../pkg/models/operations/getmanyconfigsresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## InsertConfig @@ -345,7 +345,7 @@ func main() { **[*operations.InsertConfigResponse](../../pkg/models/operations/insertconfigresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | ## TestConfig @@ -396,4 +396,4 @@ func main() { **[*operations.TestConfigResponse](../../pkg/models/operations/testconfigresponse.md), error** | Error Object | Status Code | Content Type | | ------------------ | ------------------ | ------------------ | -| sdkerrors.SDKError | 400-600 | */* | +| sdkerrors.SDKError | 4xx-5xx | */* | diff --git a/formance.go b/formance.go index 31c1d39..b470a72 100644 --- a/formance.go +++ b/formance.go @@ -198,9 +198,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.6.0", - GenVersion: "2.213.3", - UserAgent: "speakeasy-sdk/go 0.6.0 2.213.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.6.1", + GenVersion: "2.220.0", + UserAgent: "speakeasy-sdk/go 0.6.1 2.220.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 3acfe0f..0348012 100644 --- a/gen.yaml +++ b/gen.yaml @@ -2,26 +2,28 @@ configVersion: 1.0.0 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.126.0 - generationVersion: 2.213.3 + speakeasyVersion: 1.127.0 + generationVersion: 2.220.0 generation: comments: {} sdkClassName: formance repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git usageSnippets: optionalPropertyRendering: withExample + fixes: + nameResolutionDec2023: false features: go: constsAndDefaults: 0.1.2 - core: 3.2.0 + core: 3.2.2 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.3 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 - unions: 2.85.0 + unions: 2.85.2 go: - version: 0.6.0 + version: 0.6.1 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: From 7a1f2a24d611427b58b205695b90f442cceeb4fc Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 5 Jan 2024 00:19:59 +0000 Subject: [PATCH 10/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.130.1 --- .speakeasy/gen.lock | 646 ++++++++++++++++++++++++++++++++++++++++++++ RELEASES.md | 10 + formance.go | 4 +- gen.yaml | 22 +- 4 files changed, 659 insertions(+), 23 deletions(-) create mode 100755 .speakeasy/gen.lock diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100755 index 0000000..2453f7f --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,646 @@ +lockVersion: 2.0.0 +id: 884040e6-e056-469c-81c7-dc3139ef42b6 +management: + docChecksum: e2d62c3257abdb44d60905723bd6484e + docVersion: v1.0.0-rc.5 + speakeasyVersion: internal + generationVersion: 2.225.2 + releaseVersion: 0.6.1 + configChecksum: 11542cf7f0d8916d3138e970230bdb4a + repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git + repoSubDirectory: . + installationURL: https://github.com/speakeasy-sdks/formance-go-sdk + published: true +features: + go: + constsAndDefaults: 0.1.2 + core: 3.3.0 + deprecations: 2.81.1 + flattening: 2.81.1 + globalSecurity: 2.82.3 + globalServerURLs: 2.82.1 + nameOverrides: 2.81.1 + unions: 2.85.2 +generatedFiles: + - clients.go + - scopes.go + - users.go + - server.go + - ledger.go + - accounts.go + - balances.go + - logs.go + - mapping.go + - script.go + - stats.go + - transactions.go + - orchestration.go + - payments.go + - search.go + - wallets.go + - webhooks.go + - formance.go + - go.mod + - go.sum + - tests/helpers.go + - pkg/models/sdkerrors/sdkerror.go + - pkg/types/bigint.go + - pkg/types/date.go + - pkg/types/datetime.go + - pkg/types/decimal.go + - pkg/types/pointers.go + - pkg/utils/contenttype.go + - pkg/utils/form.go + - pkg/utils/headers.go + - pkg/utils/json.go + - pkg/utils/pathparams.go + - pkg/utils/queryparams.go + - pkg/utils/requestbody.go + - pkg/utils/retries.go + - pkg/utils/security.go + - pkg/utils/utils.go + - /pkg/models/operations/getserverinfo.go + - /pkg/models/operations/paymentsgetserverinfo.go + - /pkg/models/operations/searchgetserverinfo.go + - /pkg/models/operations/addscopetoclient.go + - /pkg/models/operations/createclient.go + - /pkg/models/operations/createsecret.go + - /pkg/models/operations/deleteclient.go + - /pkg/models/operations/deletescopefromclient.go + - /pkg/models/operations/deletesecret.go + - /pkg/models/operations/listclients.go + - /pkg/models/operations/readclient.go + - /pkg/models/operations/updateclient.go + - /pkg/models/operations/addtransientscope.go + - /pkg/models/operations/createscope.go + - /pkg/models/operations/deletescope.go + - /pkg/models/operations/deletetransientscope.go + - /pkg/models/operations/listscopes.go + - /pkg/models/operations/readscope.go + - /pkg/models/operations/updatescope.go + - /pkg/models/operations/listusers.go + - /pkg/models/operations/readuser.go + - /pkg/models/operations/getinfo.go + - /pkg/models/operations/getledgerinfo.go + - /pkg/models/operations/addmetadatatoaccount.go + - /pkg/models/operations/countaccounts.go + - /pkg/models/operations/getaccount.go + - /pkg/models/operations/listaccounts.go + - /pkg/models/operations/getbalances.go + - /pkg/models/operations/getbalancesaggregated.go + - /pkg/models/operations/listlogs.go + - /pkg/models/operations/getmapping.go + - /pkg/models/operations/updatemapping.go + - /pkg/models/operations/runscript.go + - /pkg/models/operations/readstats.go + - /pkg/models/operations/createtransactions.go + - /pkg/models/operations/addmetadataontransaction.go + - /pkg/models/operations/counttransactions.go + - /pkg/models/operations/createtransaction.go + - /pkg/models/operations/gettransaction.go + - /pkg/models/operations/listtransactions.go + - /pkg/models/operations/reverttransaction.go + - /pkg/models/operations/createworkflow.go + - /pkg/models/operations/getflow.go + - /pkg/models/operations/getworkflowoccurrence.go + - /pkg/models/operations/listflows.go + - /pkg/models/operations/listruns.go + - /pkg/models/operations/orchestrationgetserverinfo.go + - /pkg/models/operations/runworkflow.go + - /pkg/models/operations/connectorsstripetransfer.go + - /pkg/models/operations/getconnectortask.go + - /pkg/models/operations/getpayment.go + - /pkg/models/operations/installconnector.go + - /pkg/models/operations/listallconnectors.go + - /pkg/models/operations/listconfigsavailableconnectors.go + - /pkg/models/operations/listconnectortasks.go + - /pkg/models/operations/listpayments.go + - /pkg/models/operations/paymentslistaccounts.go + - /pkg/models/operations/readconnectorconfig.go + - /pkg/models/operations/resetconnector.go + - /pkg/models/operations/uninstallconnector.go + - /pkg/models/operations/search.go + - /pkg/models/operations/confirmhold.go + - /pkg/models/operations/createbalance.go + - /pkg/models/operations/createwallet.go + - /pkg/models/operations/creditwallet.go + - /pkg/models/operations/debitwallet.go + - /pkg/models/operations/getbalance.go + - /pkg/models/operations/gethold.go + - /pkg/models/operations/getholds.go + - /pkg/models/operations/gettransactions.go + - /pkg/models/operations/getwallet.go + - /pkg/models/operations/listbalances.go + - /pkg/models/operations/listwallets.go + - /pkg/models/operations/updatewallet.go + - /pkg/models/operations/voidhold.go + - /pkg/models/operations/walletsgetserverinfo.go + - /pkg/models/operations/activateconfig.go + - /pkg/models/operations/changeconfigsecret.go + - /pkg/models/operations/deactivateconfig.go + - /pkg/models/operations/deleteconfig.go + - /pkg/models/operations/getmanyconfigs.go + - /pkg/models/operations/insertconfig.go + - /pkg/models/operations/testconfig.go + - /pkg/models/shared/serverinfo.go + - /pkg/models/shared/createclientresponse.go + - /pkg/models/shared/client.go + - /pkg/models/shared/clientsecret.go + - /pkg/models/shared/createclientrequest.go + - /pkg/models/shared/createsecretresponse.go + - /pkg/models/shared/secret.go + - /pkg/models/shared/createsecretrequest.go + - /pkg/models/shared/listclientsresponse.go + - /pkg/models/shared/readclientresponse.go + - /pkg/models/shared/updateclientresponse.go + - /pkg/models/shared/updateclientrequest.go + - /pkg/models/shared/createscoperesponse.go + - /pkg/models/shared/scope.go + - /pkg/models/shared/createscoperequest.go + - /pkg/models/shared/listscopesresponse.go + - /pkg/models/shared/readscoperesponse.go + - /pkg/models/shared/updatescoperesponse.go + - /pkg/models/shared/updatescoperequest.go + - /pkg/models/shared/listusersresponse.go + - /pkg/models/shared/user.go + - /pkg/models/shared/readuserresponse.go + - /pkg/models/shared/errorresponse.go + - /pkg/models/shared/errorsenum.go + - /pkg/models/shared/configinforesponse.go + - /pkg/models/shared/configinfo.go + - /pkg/models/shared/config.go + - /pkg/models/shared/ledgerstorage.go + - /pkg/models/shared/ledgerinforesponse.go + - /pkg/models/shared/ledgerinfo.go + - /pkg/models/shared/migrationinfo.go + - /pkg/models/shared/accountresponse.go + - /pkg/models/shared/accountwithvolumesandbalances.go + - /pkg/models/shared/accountscursorresponse.go + - /pkg/models/shared/account.go + - /pkg/models/shared/balancescursorresponse.go + - /pkg/models/shared/aggregatebalancesresponse.go + - /pkg/models/shared/logscursorresponse.go + - /pkg/models/shared/log.go + - /pkg/models/shared/mappingresponse.go + - /pkg/models/shared/mapping.go + - /pkg/models/shared/contract.go + - /pkg/models/shared/scriptresponse.go + - /pkg/models/shared/transaction.go + - /pkg/models/shared/volume.go + - /pkg/models/shared/posting.go + - /pkg/models/shared/script.go + - /pkg/models/shared/statsresponse.go + - /pkg/models/shared/stats.go + - /pkg/models/shared/transactionsresponse.go + - /pkg/models/shared/transactions.go + - /pkg/models/shared/transactiondata.go + - /pkg/models/shared/posttransaction.go + - /pkg/models/shared/transactionresponse.go + - /pkg/models/shared/transactionscursorresponse.go + - /pkg/models/shared/error.go + - /pkg/models/shared/createworkflowresponse.go + - /pkg/models/shared/workflow.go + - /pkg/models/shared/workflowconfig.go + - /pkg/models/shared/createworkflowrequest.go + - /pkg/models/shared/getworkflowresponse.go + - /pkg/models/shared/getworkflowoccurrenceresponse.go + - /pkg/models/shared/workflowoccurrence.go + - /pkg/models/shared/stagestatus.go + - /pkg/models/shared/listworkflowsresponse.go + - /pkg/models/shared/listrunsresponse.go + - /pkg/models/shared/runworkflowresponse.go + - /pkg/models/shared/stripetransferresponse.go + - /pkg/models/shared/stripetransferrequest.go + - /pkg/models/shared/taskresponse.go + - /pkg/models/shared/taskstripe.go + - /pkg/models/shared/paymentstatus.go + - /pkg/models/shared/taskwise.go + - /pkg/models/shared/taskcurrencycloud.go + - /pkg/models/shared/taskdummypay.go + - /pkg/models/shared/taskmodulr.go + - /pkg/models/shared/taskbankingcircle.go + - /pkg/models/shared/connector.go + - /pkg/models/shared/paymentresponse.go + - /pkg/models/shared/payment.go + - /pkg/models/shared/paymentmetadata.go + - /pkg/models/shared/paymentmetadatachangelog.go + - /pkg/models/shared/paymentadjustment.go + - /pkg/models/shared/connectorconfig.go + - /pkg/models/shared/stripeconfig.go + - /pkg/models/shared/dummypayconfig.go + - /pkg/models/shared/wiseconfig.go + - /pkg/models/shared/modulrconfig.go + - /pkg/models/shared/currencycloudconfig.go + - /pkg/models/shared/bankingcircleconfig.go + - /pkg/models/shared/connectorsresponse.go + - /pkg/models/shared/connectorsconfigsresponse.go + - /pkg/models/shared/taskscursor.go + - /pkg/models/shared/paymentscursor.go + - /pkg/models/shared/accountscursor.go + - /pkg/models/shared/paymentsaccount.go + - /pkg/models/shared/connectorconfigresponse.go + - /pkg/models/shared/response.go + - /pkg/models/shared/query.go + - /pkg/models/shared/walletserrorresponse.go + - /pkg/models/shared/confirmholdrequest.go + - /pkg/models/shared/createbalanceresponse.go + - /pkg/models/shared/balance.go + - /pkg/models/shared/createbalancerequest.go + - /pkg/models/shared/createwalletresponse.go + - /pkg/models/shared/wallet.go + - /pkg/models/shared/createwalletrequest.go + - /pkg/models/shared/creditwalletrequest.go + - /pkg/models/shared/subject.go + - /pkg/models/shared/ledgeraccountsubject.go + - /pkg/models/shared/walletsubject.go + - /pkg/models/shared/monetary.go + - /pkg/models/shared/debitwalletresponse.go + - /pkg/models/shared/hold.go + - /pkg/models/shared/debitwalletrequest.go + - /pkg/models/shared/getbalanceresponse.go + - /pkg/models/shared/balancewithassets.go + - /pkg/models/shared/getholdresponse.go + - /pkg/models/shared/expandeddebithold.go + - /pkg/models/shared/getholdsresponse.go + - /pkg/models/shared/gettransactionsresponse.go + - /pkg/models/shared/walletstransaction.go + - /pkg/models/shared/walletsvolume.go + - /pkg/models/shared/getwalletresponse.go + - /pkg/models/shared/walletwithbalances.go + - /pkg/models/shared/assetholder.go + - /pkg/models/shared/listbalancesresponse.go + - /pkg/models/shared/listwalletsresponse.go + - /pkg/models/shared/configresponse.go + - /pkg/models/shared/webhooksconfig.go + - /pkg/models/shared/configchangesecret.go + - /pkg/models/shared/configsresponse.go + - /pkg/models/shared/configuser.go + - /pkg/models/shared/attemptresponse.go + - /pkg/models/shared/attempt.go + - /pkg/models/shared/security.go + - docs/pkg/models/operations/getserverinforesponse.md + - docs/pkg/models/operations/paymentsgetserverinforesponse.md + - docs/pkg/models/operations/searchgetserverinforesponse.md + - docs/pkg/models/operations/addscopetoclientrequest.md + - docs/pkg/models/operations/addscopetoclientresponse.md + - docs/pkg/models/operations/createclientresponse.md + - docs/pkg/models/operations/createsecretrequest.md + - docs/pkg/models/operations/createsecretresponse.md + - docs/pkg/models/operations/deleteclientrequest.md + - docs/pkg/models/operations/deleteclientresponse.md + - docs/pkg/models/operations/deletescopefromclientrequest.md + - docs/pkg/models/operations/deletescopefromclientresponse.md + - docs/pkg/models/operations/deletesecretrequest.md + - docs/pkg/models/operations/deletesecretresponse.md + - docs/pkg/models/operations/listclientsresponse.md + - docs/pkg/models/operations/readclientrequest.md + - docs/pkg/models/operations/readclientresponse.md + - docs/pkg/models/operations/updateclientrequest.md + - docs/pkg/models/operations/updateclientresponse.md + - docs/pkg/models/operations/addtransientscoperequest.md + - docs/pkg/models/operations/addtransientscoperesponse.md + - docs/pkg/models/operations/createscoperesponse.md + - docs/pkg/models/operations/deletescoperequest.md + - docs/pkg/models/operations/deletescoperesponse.md + - docs/pkg/models/operations/deletetransientscoperequest.md + - docs/pkg/models/operations/deletetransientscoperesponse.md + - docs/pkg/models/operations/listscopesresponse.md + - docs/pkg/models/operations/readscoperequest.md + - docs/pkg/models/operations/readscoperesponse.md + - docs/pkg/models/operations/updatescoperequest.md + - docs/pkg/models/operations/updatescoperesponse.md + - docs/pkg/models/operations/listusersresponse.md + - docs/pkg/models/operations/readuserrequest.md + - docs/pkg/models/operations/readuserresponse.md + - docs/pkg/models/operations/getinforesponse.md + - docs/pkg/models/operations/getledgerinforequest.md + - docs/pkg/models/operations/getledgerinforesponse.md + - docs/pkg/models/operations/addmetadatatoaccountrequest.md + - docs/pkg/models/operations/addmetadatatoaccountresponse.md + - docs/pkg/models/operations/metadata.md + - docs/pkg/models/operations/countaccountsrequest.md + - docs/pkg/models/operations/countaccountsresponse.md + - docs/pkg/models/operations/getaccountrequest.md + - docs/pkg/models/operations/getaccountresponse.md + - docs/pkg/models/operations/balanceoperator.md + - docs/pkg/models/operations/queryparambalanceoperator.md + - docs/pkg/models/operations/queryparammetadata.md + - docs/pkg/models/operations/listaccountsrequest.md + - docs/pkg/models/operations/listaccountsresponse.md + - docs/pkg/models/operations/getbalancesrequest.md + - docs/pkg/models/operations/getbalancesresponse.md + - docs/pkg/models/operations/getbalancesaggregatedrequest.md + - docs/pkg/models/operations/getbalancesaggregatedresponse.md + - docs/pkg/models/operations/listlogsrequest.md + - docs/pkg/models/operations/listlogsresponse.md + - docs/pkg/models/operations/getmappingrequest.md + - docs/pkg/models/operations/getmappingresponse.md + - docs/pkg/models/operations/updatemappingrequest.md + - docs/pkg/models/operations/updatemappingresponse.md + - docs/pkg/models/operations/runscriptrequest.md + - docs/pkg/models/operations/runscriptresponse.md + - docs/pkg/models/operations/readstatsrequest.md + - docs/pkg/models/operations/readstatsresponse.md + - docs/pkg/models/operations/createtransactionsrequest.md + - docs/pkg/models/operations/createtransactionsresponse.md + - docs/pkg/models/operations/addmetadataontransactionrequest.md + - docs/pkg/models/operations/addmetadataontransactionresponse.md + - docs/pkg/models/operations/counttransactionsqueryparammetadata.md + - docs/pkg/models/operations/counttransactionsrequest.md + - docs/pkg/models/operations/counttransactionsresponse.md + - docs/pkg/models/operations/createtransactionrequest.md + - docs/pkg/models/operations/createtransactionresponse.md + - docs/pkg/models/operations/gettransactionrequest.md + - docs/pkg/models/operations/gettransactionresponse.md + - docs/pkg/models/operations/listtransactionsqueryparammetadata.md + - docs/pkg/models/operations/listtransactionsrequest.md + - docs/pkg/models/operations/listtransactionsresponse.md + - docs/pkg/models/operations/reverttransactionrequest.md + - docs/pkg/models/operations/reverttransactionresponse.md + - docs/pkg/models/operations/createworkflowresponse.md + - docs/pkg/models/operations/getflowrequest.md + - docs/pkg/models/operations/getflowresponse.md + - docs/pkg/models/operations/getworkflowoccurrencerequest.md + - docs/pkg/models/operations/getworkflowoccurrenceresponse.md + - docs/pkg/models/operations/listflowsresponse.md + - docs/pkg/models/operations/listrunsrequest.md + - docs/pkg/models/operations/listrunsresponse.md + - docs/pkg/models/operations/orchestrationgetserverinforesponse.md + - docs/pkg/models/operations/runworkflowrequest.md + - docs/pkg/models/operations/runworkflowresponse.md + - docs/pkg/models/operations/connectorsstripetransferresponse.md + - docs/pkg/models/operations/getconnectortaskrequest.md + - docs/pkg/models/operations/getconnectortaskresponse.md + - docs/pkg/models/operations/getpaymentrequest.md + - docs/pkg/models/operations/getpaymentresponse.md + - docs/pkg/models/operations/installconnectorrequest.md + - docs/pkg/models/operations/installconnectorresponse.md + - docs/pkg/models/operations/listallconnectorsresponse.md + - docs/pkg/models/operations/listconfigsavailableconnectorsresponse.md + - docs/pkg/models/operations/listconnectortasksrequest.md + - docs/pkg/models/operations/listconnectortasksresponse.md + - docs/pkg/models/operations/listpaymentsrequest.md + - docs/pkg/models/operations/listpaymentsresponse.md + - docs/pkg/models/operations/paymentslistaccountsrequest.md + - docs/pkg/models/operations/paymentslistaccountsresponse.md + - docs/pkg/models/operations/readconnectorconfigrequest.md + - docs/pkg/models/operations/readconnectorconfigresponse.md + - docs/pkg/models/operations/resetconnectorrequest.md + - docs/pkg/models/operations/resetconnectorresponse.md + - docs/pkg/models/operations/uninstallconnectorrequest.md + - docs/pkg/models/operations/uninstallconnectorresponse.md + - docs/pkg/models/operations/searchresponse.md + - docs/pkg/models/operations/confirmholdrequest.md + - docs/pkg/models/operations/confirmholdresponse.md + - docs/pkg/models/operations/createbalancerequest.md + - docs/pkg/models/operations/createbalanceresponse.md + - docs/pkg/models/operations/createwalletresponse.md + - docs/pkg/models/operations/creditwalletrequest.md + - docs/pkg/models/operations/creditwalletresponse.md + - docs/pkg/models/operations/debitwalletrequest.md + - docs/pkg/models/operations/debitwalletresponse.md + - docs/pkg/models/operations/getbalancerequest.md + - docs/pkg/models/operations/getbalanceresponse.md + - docs/pkg/models/operations/getholdrequest.md + - docs/pkg/models/operations/getholdresponse.md + - docs/pkg/models/operations/getholdsqueryparammetadata.md + - docs/pkg/models/operations/getholdsrequest.md + - docs/pkg/models/operations/getholdsresponse.md + - docs/pkg/models/operations/gettransactionsrequest.md + - docs/pkg/models/operations/gettransactionsresponse.md + - docs/pkg/models/operations/getwalletrequest.md + - docs/pkg/models/operations/getwalletresponse.md + - docs/pkg/models/operations/listbalancesrequest.md + - docs/pkg/models/operations/listbalancesresponse.md + - docs/pkg/models/operations/listwalletsqueryparammetadata.md + - docs/pkg/models/operations/listwalletsrequest.md + - docs/pkg/models/operations/listwalletsresponse.md + - docs/pkg/models/operations/updatewalletrequestbody.md + - docs/pkg/models/operations/updatewalletrequest.md + - docs/pkg/models/operations/updatewalletresponse.md + - docs/pkg/models/operations/voidholdrequest.md + - docs/pkg/models/operations/voidholdresponse.md + - docs/pkg/models/operations/walletsgetserverinforesponse.md + - docs/pkg/models/operations/activateconfigrequest.md + - docs/pkg/models/operations/activateconfigresponse.md + - docs/pkg/models/operations/changeconfigsecretrequest.md + - docs/pkg/models/operations/changeconfigsecretresponse.md + - docs/pkg/models/operations/deactivateconfigrequest.md + - docs/pkg/models/operations/deactivateconfigresponse.md + - docs/pkg/models/operations/deleteconfigrequest.md + - docs/pkg/models/operations/deleteconfigresponse.md + - docs/pkg/models/operations/getmanyconfigsrequest.md + - docs/pkg/models/operations/getmanyconfigsresponse.md + - docs/pkg/models/operations/insertconfigresponse.md + - docs/pkg/models/operations/testconfigrequest.md + - docs/pkg/models/operations/testconfigresponse.md + - docs/pkg/models/shared/serverinfo.md + - docs/pkg/models/shared/createclientresponse.md + - docs/pkg/models/shared/client.md + - docs/pkg/models/shared/clientsecret.md + - docs/pkg/models/shared/createclientrequest.md + - docs/pkg/models/shared/createsecretresponse.md + - docs/pkg/models/shared/secret.md + - docs/pkg/models/shared/createsecretrequest.md + - docs/pkg/models/shared/listclientsresponse.md + - docs/pkg/models/shared/readclientresponse.md + - docs/pkg/models/shared/updateclientresponse.md + - docs/pkg/models/shared/updateclientrequest.md + - docs/pkg/models/shared/createscoperesponse.md + - docs/pkg/models/shared/scope.md + - docs/pkg/models/shared/createscoperequest.md + - docs/pkg/models/shared/listscopesresponse.md + - docs/pkg/models/shared/readscoperesponse.md + - docs/pkg/models/shared/updatescoperesponse.md + - docs/pkg/models/shared/updatescoperequest.md + - docs/pkg/models/shared/listusersresponse.md + - docs/pkg/models/shared/user.md + - docs/pkg/models/shared/readuserresponse.md + - docs/pkg/models/shared/errorresponse.md + - docs/pkg/models/shared/errorsenum.md + - docs/pkg/models/shared/configinforesponse.md + - docs/pkg/models/shared/configinfo.md + - docs/pkg/models/shared/config.md + - docs/pkg/models/shared/ledgerstorage.md + - docs/pkg/models/shared/ledgerinforesponse.md + - docs/pkg/models/shared/storage.md + - docs/pkg/models/shared/ledgerinfo.md + - docs/pkg/models/shared/state.md + - docs/pkg/models/shared/migrationinfo.md + - docs/pkg/models/shared/accountresponse.md + - docs/pkg/models/shared/accountwithvolumesandbalancesmetadata.md + - docs/pkg/models/shared/accountwithvolumesandbalances.md + - docs/pkg/models/shared/accountscursorresponsecursor.md + - docs/pkg/models/shared/accountscursorresponse.md + - docs/pkg/models/shared/metadata.md + - docs/pkg/models/shared/account.md + - docs/pkg/models/shared/balancescursorresponsecursor.md + - docs/pkg/models/shared/balancescursorresponse.md + - docs/pkg/models/shared/aggregatebalancesresponse.md + - docs/pkg/models/shared/logscursorresponsecursor.md + - docs/pkg/models/shared/logscursorresponse.md + - docs/pkg/models/shared/logdata.md + - docs/pkg/models/shared/type.md + - docs/pkg/models/shared/log.md + - docs/pkg/models/shared/mappingresponse.md + - docs/pkg/models/shared/mapping.md + - docs/pkg/models/shared/expr.md + - docs/pkg/models/shared/contract.md + - docs/pkg/models/shared/scriptresponse.md + - docs/pkg/models/shared/transaction.md + - docs/pkg/models/shared/volume.md + - docs/pkg/models/shared/posting.md + - docs/pkg/models/shared/vars.md + - docs/pkg/models/shared/script.md + - docs/pkg/models/shared/statsresponse.md + - docs/pkg/models/shared/stats.md + - docs/pkg/models/shared/transactionsresponse.md + - docs/pkg/models/shared/transactions.md + - docs/pkg/models/shared/transactiondata.md + - docs/pkg/models/shared/posttransactionvars.md + - docs/pkg/models/shared/posttransactionscript.md + - docs/pkg/models/shared/posttransaction.md + - docs/pkg/models/shared/transactionresponse.md + - docs/pkg/models/shared/transactionscursorresponsecursor.md + - docs/pkg/models/shared/transactionscursorresponse.md + - docs/pkg/models/shared/errorcode.md + - docs/pkg/models/shared/error.md + - docs/pkg/models/shared/createworkflowresponse.md + - docs/pkg/models/shared/workflow.md + - docs/pkg/models/shared/workflowconfig.md + - docs/pkg/models/shared/createworkflowrequest.md + - docs/pkg/models/shared/getworkflowresponse.md + - docs/pkg/models/shared/getworkflowoccurrenceresponse.md + - docs/pkg/models/shared/workflowoccurrence.md + - docs/pkg/models/shared/stagestatus.md + - docs/pkg/models/shared/listworkflowsresponse.md + - docs/pkg/models/shared/listrunsresponsecursor.md + - docs/pkg/models/shared/listrunsresponse.md + - docs/pkg/models/shared/runworkflowresponse.md + - docs/pkg/models/shared/stripetransferresponse.md + - docs/pkg/models/shared/stripetransferrequestmetadata.md + - docs/pkg/models/shared/stripetransferrequest.md + - docs/pkg/models/shared/taskresponsedata.md + - docs/pkg/models/shared/taskresponse.md + - docs/pkg/models/shared/taskstripedescriptor.md + - docs/pkg/models/shared/taskstripestate.md + - docs/pkg/models/shared/taskstripe.md + - docs/pkg/models/shared/paymentstatus.md + - docs/pkg/models/shared/taskwisedescriptor.md + - docs/pkg/models/shared/taskwisestate.md + - docs/pkg/models/shared/taskwise.md + - docs/pkg/models/shared/taskcurrencyclouddescriptor.md + - docs/pkg/models/shared/taskcurrencycloudstate.md + - docs/pkg/models/shared/taskcurrencycloud.md + - docs/pkg/models/shared/taskdummypaydescriptor.md + - docs/pkg/models/shared/taskdummypaystate.md + - docs/pkg/models/shared/taskdummypay.md + - docs/pkg/models/shared/taskmodulrdescriptor.md + - docs/pkg/models/shared/taskmodulrstate.md + - docs/pkg/models/shared/taskmodulr.md + - docs/pkg/models/shared/descriptor.md + - docs/pkg/models/shared/taskbankingcirclestate.md + - docs/pkg/models/shared/taskbankingcircle.md + - docs/pkg/models/shared/connector.md + - docs/pkg/models/shared/paymentresponse.md + - docs/pkg/models/shared/raw.md + - docs/pkg/models/shared/scheme.md + - docs/pkg/models/shared/paymenttype.md + - docs/pkg/models/shared/payment.md + - docs/pkg/models/shared/paymentmetadata.md + - docs/pkg/models/shared/paymentmetadatachangelog.md + - docs/pkg/models/shared/paymentadjustmentraw.md + - docs/pkg/models/shared/paymentadjustment.md + - docs/pkg/models/shared/connectorconfig.md + - docs/pkg/models/shared/stripeconfig.md + - docs/pkg/models/shared/dummypayconfig.md + - docs/pkg/models/shared/wiseconfig.md + - docs/pkg/models/shared/modulrconfig.md + - docs/pkg/models/shared/currencycloudconfig.md + - docs/pkg/models/shared/bankingcircleconfig.md + - docs/pkg/models/shared/connectorsresponsedata.md + - docs/pkg/models/shared/connectorsresponse.md + - docs/pkg/models/shared/key.md + - docs/pkg/models/shared/connectorsconfigsresponseconnector.md + - docs/pkg/models/shared/data.md + - docs/pkg/models/shared/connectorsconfigsresponse.md + - docs/pkg/models/shared/taskscursordata.md + - docs/pkg/models/shared/taskscursorcursor.md + - docs/pkg/models/shared/taskscursor.md + - docs/pkg/models/shared/paymentscursorcursor.md + - docs/pkg/models/shared/paymentscursor.md + - docs/pkg/models/shared/cursor.md + - docs/pkg/models/shared/accountscursor.md + - docs/pkg/models/shared/paymentsaccounttype.md + - docs/pkg/models/shared/paymentsaccount.md + - docs/pkg/models/shared/connectorconfigresponse.md + - docs/pkg/models/shared/responseschemasdata.md + - docs/pkg/models/shared/total.md + - docs/pkg/models/shared/responsecursor.md + - docs/pkg/models/shared/responsedata.md + - docs/pkg/models/shared/response.md + - docs/pkg/models/shared/query.md + - docs/pkg/models/shared/walletserrorresponseerrorcode.md + - docs/pkg/models/shared/walletserrorresponse.md + - docs/pkg/models/shared/confirmholdrequest.md + - docs/pkg/models/shared/createbalanceresponse.md + - docs/pkg/models/shared/balance.md + - docs/pkg/models/shared/createbalancerequest.md + - docs/pkg/models/shared/createwalletresponse.md + - docs/pkg/models/shared/wallet.md + - docs/pkg/models/shared/createwalletrequest.md + - docs/pkg/models/shared/creditwalletrequest.md + - docs/pkg/models/shared/subject.md + - docs/pkg/models/shared/ledgeraccountsubject.md + - docs/pkg/models/shared/walletsubject.md + - docs/pkg/models/shared/monetary.md + - docs/pkg/models/shared/debitwalletresponse.md + - docs/pkg/models/shared/hold.md + - docs/pkg/models/shared/debitwalletrequest.md + - docs/pkg/models/shared/getbalanceresponse.md + - docs/pkg/models/shared/balancewithassets.md + - docs/pkg/models/shared/getholdresponse.md + - docs/pkg/models/shared/expandeddebithold.md + - docs/pkg/models/shared/getholdsresponsecursor.md + - docs/pkg/models/shared/getholdsresponse.md + - docs/pkg/models/shared/gettransactionsresponsecursor.md + - docs/pkg/models/shared/gettransactionsresponse.md + - docs/pkg/models/shared/walletstransaction.md + - docs/pkg/models/shared/walletsvolume.md + - docs/pkg/models/shared/getwalletresponse.md + - docs/pkg/models/shared/balances.md + - docs/pkg/models/shared/walletwithbalances.md + - docs/pkg/models/shared/assetholder.md + - docs/pkg/models/shared/listbalancesresponsecursor.md + - docs/pkg/models/shared/listbalancesresponse.md + - docs/pkg/models/shared/listwalletsresponsecursor.md + - docs/pkg/models/shared/listwalletsresponse.md + - docs/pkg/models/shared/configresponse.md + - docs/pkg/models/shared/webhooksconfig.md + - docs/pkg/models/shared/configchangesecret.md + - docs/pkg/models/shared/configsresponsecursor.md + - docs/pkg/models/shared/configsresponse.md + - docs/pkg/models/shared/configuser.md + - docs/pkg/models/shared/attemptresponse.md + - docs/pkg/models/shared/attempt.md + - docs/pkg/models/shared/security.md + - docs/sdks/formance/README.md + - docs/sdks/clients/README.md + - docs/sdks/scopes/README.md + - docs/sdks/users/README.md + - docs/sdks/server/README.md + - docs/sdks/ledger/README.md + - docs/sdks/accounts/README.md + - docs/sdks/balances/README.md + - docs/sdks/logs/README.md + - docs/sdks/mapping/README.md + - docs/sdks/script/README.md + - docs/sdks/stats/README.md + - docs/sdks/transactions/README.md + - docs/sdks/orchestration/README.md + - docs/sdks/payments/README.md + - docs/sdks/search/README.md + - docs/sdks/wallets/README.md + - docs/sdks/webhooks/README.md + - USAGE.md + - .gitattributes diff --git a/RELEASES.md b/RELEASES.md index f8a5d68..4469ead 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -200,4 +200,14 @@ Based on: ### Generated - [go v0.6.1] . ### Releases +- [Go v0.6.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.1 - . + +## 2024-01-05 00:19:47 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.130.1 (2.225.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.6.1] . +### Releases - [Go v0.6.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.1 - . \ No newline at end of file diff --git a/formance.go b/formance.go index b470a72..4286641 100644 --- a/formance.go +++ b/formance.go @@ -199,8 +199,8 @@ func New(opts ...SDKOption) *Formance { Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", SDKVersion: "0.6.1", - GenVersion: "2.220.0", - UserAgent: "speakeasy-sdk/go 0.6.1 2.220.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + GenVersion: "2.225.2", + UserAgent: "speakeasy-sdk/go 0.6.1 2.225.2 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 0348012..624f701 100644 --- a/gen.yaml +++ b/gen.yaml @@ -1,27 +1,10 @@ -configVersion: 1.0.0 -management: - docChecksum: e2d62c3257abdb44d60905723bd6484e - docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.127.0 - generationVersion: 2.220.0 +configVersion: 2.0.0 generation: - comments: {} sdkClassName: formance - repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git usageSnippets: optionalPropertyRendering: withExample fixes: nameResolutionDec2023: false -features: - go: - constsAndDefaults: 0.1.2 - core: 3.2.2 - deprecations: 2.81.1 - flattening: 2.81.1 - globalSecurity: 2.82.3 - globalServerURLs: 2.82.1 - nameOverrides: 2.81.1 - unions: 2.85.2 go: version: 0.6.1 clientServerStatusCodesAsErrors: true @@ -35,9 +18,6 @@ go: shared: pkg/models/shared webhooks: pkg/models/webhooks inputModelSuffix: input - installationURL: https://github.com/speakeasy-sdks/formance-go-sdk maxMethodParams: 4 outputModelSuffix: output packageName: github.com/speakeasy-sdks/formance-go-sdk - published: true - repoSubDirectory: . From 14ad32e2d0043c2a27430db29f6542491195dcaa Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 17 Jan 2024 00:45:45 +0000 Subject: [PATCH 11/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.142.1 --- .speakeasy/gen.lock | 8 ++++---- RELEASES.md | 12 +++++++++++- formance.go | 6 +++--- gen.yaml | 2 +- go.mod | 2 +- pkg/models/shared/subject.go | 2 ++ 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2453f7f..901a959 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.225.2 - releaseVersion: 0.6.1 - configChecksum: 11542cf7f0d8916d3138e970230bdb4a + generationVersion: 2.234.3 + releaseVersion: 0.6.2 + configChecksum: 1cb620bde92379882a876ea77085db4e repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -14,7 +14,7 @@ management: features: go: constsAndDefaults: 0.1.2 - core: 3.3.0 + core: 3.3.1 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.3 diff --git a/RELEASES.md b/RELEASES.md index 4469ead..85251fb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -210,4 +210,14 @@ Based on: ### Generated - [go v0.6.1] . ### Releases -- [Go v0.6.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.1 - . \ No newline at end of file +- [Go v0.6.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.1 - . + +## 2024-01-17 00:45:33 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.142.1 (2.234.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.6.2] . +### Releases +- [Go v0.6.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.2 - . \ No newline at end of file diff --git a/formance.go b/formance.go index 4286641..05f3bab 100644 --- a/formance.go +++ b/formance.go @@ -198,9 +198,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.6.1", - GenVersion: "2.225.2", - UserAgent: "speakeasy-sdk/go 0.6.1 2.225.2 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.6.2", + GenVersion: "2.234.3", + UserAgent: "speakeasy-sdk/go 0.6.2 2.234.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 624f701..17581b8 100644 --- a/gen.yaml +++ b/gen.yaml @@ -6,7 +6,7 @@ generation: fixes: nameResolutionDec2023: false go: - version: 0.6.1 + version: 0.6.2 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/go.mod b/go.mod index 13fed1e..7a6b7fb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/speakeasy-sdks/formance-go-sdk -go 1.14 +go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 diff --git a/pkg/models/shared/subject.go b/pkg/models/shared/subject.go index 64f172e..fdcaa11 100644 --- a/pkg/models/shared/subject.go +++ b/pkg/models/shared/subject.go @@ -25,6 +25,7 @@ type Subject struct { func CreateSubjectAccount(account LedgerAccountSubject) Subject { typ := SubjectTypeAccount + typStr := string(typ) account.Type = typStr @@ -36,6 +37,7 @@ func CreateSubjectAccount(account LedgerAccountSubject) Subject { func CreateSubjectWallet(wallet WalletSubject) Subject { typ := SubjectTypeWallet + typStr := string(typ) wallet.Type = typStr From 5d675b397dde7b34e818b55e66e9a778f8a0b03d Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 19 Jan 2024 00:47:53 +0000 Subject: [PATCH 12/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.147.0 --- .speakeasy/gen.lock | 9 ++++----- RELEASES.md | 12 +++++++++++- formance.go | 6 +++--- gen.yaml | 2 +- pkg/utils/security.go | 4 ++-- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 901a959..30e1244 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.234.3 - releaseVersion: 0.6.2 - configChecksum: 1cb620bde92379882a876ea77085db4e + generationVersion: 2.237.2 + releaseVersion: 0.6.3 + configChecksum: 693a753d5df02f6181bd29d943658901 repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -17,7 +17,7 @@ features: core: 3.3.1 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.3 + globalSecurity: 2.82.4 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 unions: 2.85.2 @@ -42,7 +42,6 @@ generatedFiles: - formance.go - go.mod - go.sum - - tests/helpers.go - pkg/models/sdkerrors/sdkerror.go - pkg/types/bigint.go - pkg/types/date.go diff --git a/RELEASES.md b/RELEASES.md index 85251fb..ebf55e9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -220,4 +220,14 @@ Based on: ### Generated - [go v0.6.2] . ### Releases -- [Go v0.6.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.2 - . \ No newline at end of file +- [Go v0.6.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.2 - . + +## 2024-01-19 00:47:42 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.147.0 (2.237.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.6.3] . +### Releases +- [Go v0.6.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.3 - . \ No newline at end of file diff --git a/formance.go b/formance.go index 05f3bab..33c1a54 100644 --- a/formance.go +++ b/formance.go @@ -198,9 +198,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.6.2", - GenVersion: "2.234.3", - UserAgent: "speakeasy-sdk/go 0.6.2 2.234.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.6.3", + GenVersion: "2.237.2", + UserAgent: "speakeasy-sdk/go 0.6.3 2.237.2 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 17581b8..41d4170 100644 --- a/gen.yaml +++ b/gen.yaml @@ -6,7 +6,7 @@ generation: fixes: nameResolutionDec2023: false go: - version: 0.6.2 + version: 0.6.3 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/pkg/utils/security.go b/pkg/utils/security.go index fa5eff7..ea1d4b2 100644 --- a/pkg/utils/security.go +++ b/pkg/utils/security.go @@ -204,9 +204,9 @@ func parseSecuritySchemeValue(client *securityConfig, schemeTag *securityTag, se panic("not supported") } case "openIdConnect": - client.headers[secTag.Name] = valToString(val) + client.headers[secTag.Name] = prefixBearer(valToString(val)) case "oauth2": - client.headers[secTag.Name] = valToString(val) + client.headers[secTag.Name] = prefixBearer(valToString(val)) case "http": switch schemeTag.SubType { case "bearer": From 83401978734bff4f71e28678f56890d8d61485f6 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 1 Feb 2024 00:23:40 +0000 Subject: [PATCH 13/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.161.0 --- .speakeasy/gen.lock | 8 ++++---- RELEASES.md | 12 +++++++++++- formance.go | 15 ++++++++++++--- gen.yaml | 2 +- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 30e1244..bdfe6a2 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.237.2 - releaseVersion: 0.6.3 - configChecksum: 693a753d5df02f6181bd29d943658901 + generationVersion: 2.245.1 + releaseVersion: 0.6.4 + configChecksum: 77bf8acbfbe53bbfd5336d9eb0f72e0e repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -17,7 +17,7 @@ features: core: 3.3.1 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.4 + globalSecurity: 2.82.5 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 unions: 2.85.2 diff --git a/RELEASES.md b/RELEASES.md index ebf55e9..63b8169 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -230,4 +230,14 @@ Based on: ### Generated - [go v0.6.3] . ### Releases -- [Go v0.6.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.3 - . \ No newline at end of file +- [Go v0.6.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.3 - . + +## 2024-02-01 00:23:28 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.161.0 (2.245.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.6.4] . +### Releases +- [Go v0.6.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.4 - . \ No newline at end of file diff --git a/formance.go b/formance.go index 33c1a54..62648ea 100644 --- a/formance.go +++ b/formance.go @@ -186,6 +186,15 @@ func WithSecurity(authorization string) SDKOption { } } +// WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication +func WithSecuritySource(security func(context.Context) (shared.Security, error)) SDKOption { + return func(sdk *Formance) { + sdk.sdkConfiguration.Security = func(ctx context.Context) (interface{}, error) { + return security(ctx) + } + } +} + func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption { return func(sdk *Formance) { sdk.sdkConfiguration.RetryConfig = &retryConfig @@ -198,9 +207,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.6.3", - GenVersion: "2.237.2", - UserAgent: "speakeasy-sdk/go 0.6.3 2.237.2 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.6.4", + GenVersion: "2.245.1", + UserAgent: "speakeasy-sdk/go 0.6.4 2.245.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 41d4170..7921d03 100644 --- a/gen.yaml +++ b/gen.yaml @@ -6,7 +6,7 @@ generation: fixes: nameResolutionDec2023: false go: - version: 0.6.3 + version: 0.6.4 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: From 3e1f4d61d6e193fc91e5bbad8c1bbbf45dfd306d Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 6 Feb 2024 00:22:14 +0000 Subject: [PATCH 14/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.167.3 --- .speakeasy/gen.lock | 12 ++++++------ RELEASES.md | 12 +++++++++++- formance.go | 6 +++--- gen.yaml | 3 ++- pkg/utils/json.go | 2 +- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index bdfe6a2..8e01270 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,20 +4,20 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.245.1 - releaseVersion: 0.6.4 - configChecksum: 77bf8acbfbe53bbfd5336d9eb0f72e0e + generationVersion: 2.250.2 + releaseVersion: 0.7.0 + configChecksum: f46b99de4597dba79f57e0e2972c0d62 repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk published: true features: go: - constsAndDefaults: 0.1.2 - core: 3.3.1 + constsAndDefaults: 0.1.3 + core: 3.3.2 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.5 + globalSecurity: 2.82.6 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 unions: 2.85.2 diff --git a/RELEASES.md b/RELEASES.md index 63b8169..c1b8dfb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -240,4 +240,14 @@ Based on: ### Generated - [go v0.6.4] . ### Releases -- [Go v0.6.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.4 - . \ No newline at end of file +- [Go v0.6.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.6.4 - . + +## 2024-02-06 00:22:02 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.167.3 (2.250.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.7.0] . +### Releases +- [Go v0.7.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.7.0 - . \ No newline at end of file diff --git a/formance.go b/formance.go index 62648ea..fdd2d24 100644 --- a/formance.go +++ b/formance.go @@ -207,9 +207,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.6.4", - GenVersion: "2.245.1", - UserAgent: "speakeasy-sdk/go 0.6.4 2.245.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.7.0", + GenVersion: "2.250.2", + UserAgent: "speakeasy-sdk/go 0.7.0 2.250.2 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 7921d03..159e52e 100644 --- a/gen.yaml +++ b/gen.yaml @@ -5,8 +5,9 @@ generation: optionalPropertyRendering: withExample fixes: nameResolutionDec2023: false + parameterOrderingFeb2024: false go: - version: 0.6.4 + version: 0.7.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/pkg/utils/json.go b/pkg/utils/json.go index 478744c..fee2c1e 100644 --- a/pkg/utils/json.go +++ b/pkg/utils/json.go @@ -358,7 +358,7 @@ func handleDefaultConstValue(tagValue string, val interface{}, tag reflect.Struc return []byte(fmt.Sprintf(`"%s"`, tagValue)) default: if typ.Kind() == reflect.String { - return []byte(fmt.Sprintf(`"%s"`, tagValue)) + return []byte(fmt.Sprintf("%q", tagValue)) } } From 486e28267837fe09a6f2e5f58f0243d094313c46 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 8 Feb 2024 00:18:48 +0000 Subject: [PATCH 15/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.173.1 --- .speakeasy/gen.lock | 8 ++++---- RELEASES.md | 12 +++++++++++- formance.go | 6 +++--- gen.yaml | 3 ++- pkg/models/shared/subject.go | 2 +- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8e01270..bed589a 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.250.2 - releaseVersion: 0.7.0 - configChecksum: f46b99de4597dba79f57e0e2972c0d62 + generationVersion: 2.250.16 + releaseVersion: 0.8.0 + configChecksum: a4fdd8174d316d8cd42244cc35a62cea repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -20,7 +20,7 @@ features: globalSecurity: 2.82.6 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 - unions: 2.85.2 + unions: 2.85.3 generatedFiles: - clients.go - scopes.go diff --git a/RELEASES.md b/RELEASES.md index c1b8dfb..ec8bfb2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -250,4 +250,14 @@ Based on: ### Generated - [go v0.7.0] . ### Releases -- [Go v0.7.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.7.0 - . \ No newline at end of file +- [Go v0.7.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.7.0 - . + +## 2024-02-08 00:18:36 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.173.1 (2.250.16) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.8.0] . +### Releases +- [Go v0.8.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.8.0 - . \ No newline at end of file diff --git a/formance.go b/formance.go index fdd2d24..5843a7d 100644 --- a/formance.go +++ b/formance.go @@ -207,9 +207,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.7.0", - GenVersion: "2.250.2", - UserAgent: "speakeasy-sdk/go 0.7.0 2.250.2 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.8.0", + GenVersion: "2.250.16", + UserAgent: "speakeasy-sdk/go 0.8.0 2.250.16 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 159e52e..a88f868 100644 --- a/gen.yaml +++ b/gen.yaml @@ -6,8 +6,9 @@ generation: fixes: nameResolutionDec2023: false parameterOrderingFeb2024: false + requestResponseComponentNamesFeb2024: false go: - version: 0.7.0 + version: 0.8.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/pkg/models/shared/subject.go b/pkg/models/shared/subject.go index fdcaa11..de75105 100644 --- a/pkg/models/shared/subject.go +++ b/pkg/models/shared/subject.go @@ -50,7 +50,7 @@ func CreateSubjectWallet(wallet WalletSubject) Subject { func (u *Subject) UnmarshalJSON(data []byte) error { type discriminator struct { - Type string + Type string `json:"type"` } dis := new(discriminator) From afd8b6c206242703c545f64b74dbd1bca961cd13 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 13 Feb 2024 00:23:39 +0000 Subject: [PATCH 16/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.178.0 --- .speakeasy/gen.lock | 2 +- RELEASES.md | 10 ++++ .../models/operations/debitwalletrequest.md | 8 +-- docs/pkg/models/shared/account.md | 2 +- .../shared/accountwithvolumesandbalances.md | 2 +- .../models/shared/posttransactionscript.md | 2 +- docs/pkg/models/shared/script.md | 2 +- .../models/shared/stripetransferrequest.md | 2 +- docs/sdks/accounts/README.md | 5 +- docs/sdks/balances/README.md | 2 +- docs/sdks/clients/README.md | 21 ------- docs/sdks/mapping/README.md | 2 +- docs/sdks/orchestration/README.md | 2 +- docs/sdks/payments/README.md | 12 ++-- docs/sdks/scopes/README.md | 6 -- docs/sdks/script/README.md | 4 +- docs/sdks/search/README.md | 9 --- docs/sdks/transactions/README.md | 29 ++-------- docs/sdks/wallets/README.md | 57 ++++++------------- docs/sdks/webhooks/README.md | 4 +- formance.go | 4 +- 21 files changed, 59 insertions(+), 128 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index bed589a..a38c171 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,7 +4,7 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.250.16 + generationVersion: 2.253.0 releaseVersion: 0.8.0 configChecksum: a4fdd8174d316d8cd42244cc35a62cea repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git diff --git a/RELEASES.md b/RELEASES.md index ec8bfb2..cb34e59 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -260,4 +260,14 @@ Based on: ### Generated - [go v0.8.0] . ### Releases +- [Go v0.8.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.8.0 - . + +## 2024-02-13 00:23:26 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.178.0 (2.253.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.8.0] . +### Releases - [Go v0.8.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.8.0 - . \ No newline at end of file diff --git a/docs/pkg/models/operations/debitwalletrequest.md b/docs/pkg/models/operations/debitwalletrequest.md index 8602afd..cd7f724 100644 --- a/docs/pkg/models/operations/debitwalletrequest.md +++ b/docs/pkg/models/operations/debitwalletrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `ID` | *string* | :heavy_check_mark: | N/A | -| `DebitWalletRequest` | [*shared.DebitWalletRequest](../../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ID` | *string* | :heavy_check_mark: | N/A | | +| `DebitWalletRequest` | [*shared.DebitWalletRequest](../../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | {"amount":{"asset":"USD/2","amount":100},"pending":true} | \ No newline at end of file diff --git a/docs/pkg/models/shared/account.md b/docs/pkg/models/shared/account.md index 71c051f..2572c6f 100644 --- a/docs/pkg/models/shared/account.md +++ b/docs/pkg/models/shared/account.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | | `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Metadata` | [*shared.Metadata](../../../pkg/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `Metadata` | [*shared.Metadata](../../../pkg/models/shared/metadata.md) | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | | `Type` | **string* | :heavy_minus_sign: | N/A | virtual | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountwithvolumesandbalances.md b/docs/pkg/models/shared/accountwithvolumesandbalances.md index b9a6cb0..68737a4 100644 --- a/docs/pkg/models/shared/accountwithvolumesandbalances.md +++ b/docs/pkg/models/shared/accountwithvolumesandbalances.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `Address` | *string* | :heavy_check_mark: | N/A | users:001 | | `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | {"COIN":100} | -| `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../../pkg/models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | | +| `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../../pkg/models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | | `Type` | **string* | :heavy_minus_sign: | N/A | virtual | | `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | {"COIN":{"input":100,"output":0}} | \ No newline at end of file diff --git a/docs/pkg/models/shared/posttransactionscript.md b/docs/pkg/models/shared/posttransactionscript.md index 29cd273..08a4635 100644 --- a/docs/pkg/models/shared/posttransactionscript.md +++ b/docs/pkg/models/shared/posttransactionscript.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| -| `Vars` | [*shared.PostTransactionVars](../../../pkg/models/shared/posttransactionvars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Vars` | [*shared.PostTransactionVars](../../../pkg/models/shared/posttransactionvars.md) | :heavy_minus_sign: | N/A | {"vars":{"user":"users:042"}} | \ No newline at end of file diff --git a/docs/pkg/models/shared/script.md b/docs/pkg/models/shared/script.md index e16de68..0a03379 100644 --- a/docs/pkg/models/shared/script.md +++ b/docs/pkg/models/shared/script.md @@ -8,4 +8,4 @@ | `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| | `Reference` | **string* | :heavy_minus_sign: | Reference to attach to the generated transaction | order_1234 | -| `Vars` | [*shared.Vars](../../../pkg/models/shared/vars.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Vars` | [*shared.Vars](../../../pkg/models/shared/vars.md) | :heavy_minus_sign: | N/A | {"vars":{"user":"users:042"}} | \ No newline at end of file diff --git a/docs/pkg/models/shared/stripetransferrequest.md b/docs/pkg/models/shared/stripetransferrequest.md index a2a7137..2800eea 100644 --- a/docs/pkg/models/shared/stripetransferrequest.md +++ b/docs/pkg/models/shared/stripetransferrequest.md @@ -8,4 +8,4 @@ | `Amount` | **int64* | :heavy_minus_sign: | N/A | 100 | | `Asset` | **string* | :heavy_minus_sign: | N/A | USD | | `Destination` | **string* | :heavy_minus_sign: | N/A | acct_1Gqj58KZcSIg2N2q | -| `Metadata` | [*shared.StripeTransferRequestMetadata](../../../pkg/models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| | \ No newline at end of file +| `Metadata` | [*shared.StripeTransferRequestMetadata](../../../pkg/models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| {"order_id":"6735"} | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 1014714..29b6fd6 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -36,7 +36,7 @@ func main() { requestBody := map[string]interface{}{ - "admin": "string", + "admin": true, "a": "string", } @@ -99,7 +99,7 @@ func main() { var ledger string = "ledger001" - var address *string = "users:.+" + var address *string = formancegosdk.String("users:.+") metadata := &operations.Metadata{} @@ -217,7 +217,6 @@ func main() { BalanceOperatorDeprecated: operations.QueryParamBalanceOperatorGte.ToPointer(), Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), Ledger: "ledger001", - Metadata: &operations.QueryParamMetadata{}, PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), }) if err != nil { diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index 97f5038..d8dcb00 100644 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -89,7 +89,7 @@ func main() { var ledger string = "ledger001" - var address *string = "users:001" + var address *string = formancegosdk.String("users:001") ctx := context.Background() res, err := s.Balances.GetBalancesAggregated(ctx, ledger, address) diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 2a6d3ee..4c4a5b8 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -95,16 +95,7 @@ func main() { ctx := context.Background() res, err := s.Clients.CreateClient(ctx, &shared.CreateClientRequest{ - Metadata: map[string]interface{}{ - "key": "string", - }, Name: "string", - PostLogoutRedirectUris: []string{ - "string", - }, - RedirectUris: []string{ - "string", - }, }) if err != nil { log.Fatal(err) @@ -156,9 +147,6 @@ func main() { var clientID string = "string" createSecretRequest := &shared.CreateSecretRequest{ - Metadata: map[string]interface{}{ - "key": "string", - }, Name: "string", } @@ -475,16 +463,7 @@ func main() { var clientID string = "string" updateClientRequest := &shared.UpdateClientRequest{ - Metadata: map[string]interface{}{ - "key": "string", - }, Name: "string", - PostLogoutRedirectUris: []string{ - "string", - }, - RedirectUris: []string{ - "string", - }, } ctx := context.Background() diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md index a36d227..bad716d 100644 --- a/docs/sdks/mapping/README.md +++ b/docs/sdks/mapping/README.md @@ -83,7 +83,7 @@ func main() { ) - mapping := shared.Mapping{ + mapping := &shared.Mapping{ Contracts: []shared.Contract{ shared.Contract{ Account: formancegosdk.String("users:001"), diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 2f34b5e..709ccb3 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -347,7 +347,7 @@ func main() { "key": "string", } - var wait *bool = false + var wait *bool = formancegosdk.Bool(false) ctx := context.Background() res, err := s.Orchestration.RunWorkflow(ctx, flowID, requestBody, wait) diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 2db132f..a8d1fd4 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -357,9 +357,9 @@ func main() { var connector shared.Connector = shared.ConnectorDummyPay - var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = 501686 + var pageSize *int64 = formancegosdk.Int64(501686) ctx := context.Background() res, err := s.Payments.ListConnectorTasks(ctx, connector, cursor, pageSize) @@ -412,9 +412,9 @@ func main() { ) - var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = 13778 + var pageSize *int64 = formancegosdk.Int64(13778) sort := []string{ "string", @@ -471,9 +471,9 @@ func main() { ) - var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = 227071 + var pageSize *int64 = formancegosdk.Int64(227071) sort := []string{ "string", diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index 60c9bb0..cebe4e1 100644 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -94,9 +94,6 @@ func main() { ctx := context.Background() res, err := s.Scopes.CreateScope(ctx, &shared.CreateScopeRequest{ Label: "string", - Metadata: map[string]interface{}{ - "key": "string", - }, }) if err != nil { log.Fatal(err) @@ -354,9 +351,6 @@ func main() { updateScopeRequest := &shared.UpdateScopeRequest{ Label: "string", - Metadata: map[string]interface{}{ - "key": "string", - }, } ctx := context.Background() diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index e6dfaa9..0ca7d21 100644 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -36,7 +36,7 @@ func main() { script := shared.Script{ Metadata: map[string]interface{}{ - "admin": "string", + "admin": true, "a": "string", }, Plain: "vars { @@ -53,7 +53,7 @@ func main() { var ledger string = "ledger001" - var preview *bool = true + var preview *bool = formancegosdk.Bool(true) ctx := context.Background() res, err := s.Script.RunScript(ctx, script, ledger, preview) diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 7a9e2b2..8108037 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -32,18 +32,9 @@ func main() { ctx := context.Background() res, err := s.Search.Search(ctx, shared.Query{ - After: []string{ - "users:002", - }, Cursor: formancegosdk.String("YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="), - Ledgers: []string{ - "quickstart", - }, Policy: formancegosdk.String("OR"), Sort: formancegosdk.String("txid:asc"), - Terms: []string{ - "destination=central_bank1", - }, }) if err != nil { log.Fatal(err) diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 89e827f..7251386 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -41,7 +41,7 @@ func main() { Transactions: []shared.TransactionData{ shared.TransactionData{ Metadata: map[string]interface{}{ - "admin": "string", + "admin": true, "a": "string", }, Postings: []shared.Posting{ @@ -115,7 +115,7 @@ func main() { var txid int64 = 1234 requestBody := map[string]interface{}{ - "admin": "string", + "admin": true, "a": "string", } @@ -176,7 +176,6 @@ func main() { Account: formancegosdk.String("users:001"), Destination: formancegosdk.String("users:001"), Ledger: "ledger001", - Metadata: &operations.CountTransactionsQueryParamMetadata{}, Reference: formancegosdk.String("ref:001"), Source: formancegosdk.String("users:001"), }) @@ -229,34 +228,15 @@ func main() { postTransaction := shared.PostTransaction{ Metadata: map[string]interface{}{ - "admin": "string", + "admin": true, "a": "string", }, - Postings: []shared.Posting{ - shared.Posting{ - Amount: 100, - Asset: "COIN", - Destination: "users:002", - Source: "users:001", - }, - }, Reference: formancegosdk.String("ref:001"), - Script: &shared.PostTransactionScript{ - Plain: "vars { - account $user - } - send [COIN 10] ( - source = @world - destination = $user - ) - ", - Vars: &shared.PostTransactionVars{}, - }, } var ledger string = "ledger001" - var preview *bool = true + var preview *bool = formancegosdk.Bool(true) ctx := context.Background() res, err := s.Transactions.CreateTransaction(ctx, postTransaction, ledger, preview) @@ -370,7 +350,6 @@ func main() { Cursor: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), Destination: formancegosdk.String("users:001"), Ledger: "ledger001", - Metadata: &operations.ListTransactionsQueryParamMetadata{}, PaginationToken: formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), Reference: formancegosdk.String("ref:001"), Source: formancegosdk.String("users:001"), diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index fe4a916..337d501 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -160,9 +160,6 @@ func main() { ctx := context.Background() res, err := s.Wallets.CreateWallet(ctx, &shared.CreateWalletRequest{ - Metadata: map[string]interface{}{ - "key": "string", - }, Name: "string", }) if err != nil { @@ -220,9 +217,6 @@ func main() { Amount: 201874, Asset: "string", }, - Metadata: map[string]interface{}{ - "key": "string", - }, Sources: []shared.Subject{ shared.CreateSubjectLedgerAccountSubject( shared.LedgerAccountSubject{ @@ -287,21 +281,10 @@ func main() { debitWalletRequest := &shared.DebitWalletRequest{ Amount: shared.Monetary{ - Amount: 245256, - Asset: "string", - }, - Balances: []string{ - "string", - }, - Destination: shared.CreateSubjectLedgerAccountSubject( - shared.LedgerAccountSubject{ - Identifier: "string", - Type: "string", - }, - ), - Metadata: map[string]interface{}{ - "key": "string", + Amount: 100, + Asset: "USD/2", }, + Pending: formancegosdk.Bool(true), } ctx := context.Background() @@ -318,11 +301,11 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `id` | *string* | :heavy_check_mark: | N/A | -| `debitWalletRequest` | [*shared.DebitWalletRequest](../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `id` | *string* | :heavy_check_mark: | N/A | | +| `debitWalletRequest` | [*shared.DebitWalletRequest](../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | {"amount":{"asset":"USD/2","amount":100},"pending":true} | ### Response @@ -460,13 +443,13 @@ func main() { ) - var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") metadata := &operations.GetHoldsQueryParamMetadata{} - var pageSize *int64 = 692494 + var pageSize *int64 = formancegosdk.Int64(692494) - var walletID *string = "string" + var walletID *string = formancegosdk.String("string") ctx := context.Background() res, err := s.Wallets.GetHolds(ctx, cursor, metadata, pageSize, walletID) @@ -518,11 +501,11 @@ func main() { ) - var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = 680555 + var pageSize *int64 = formancegosdk.Int64(680555) - var walletID *string = "string" + var walletID *string = formancegosdk.String("string") ctx := context.Background() res, err := s.Wallets.GetTransactions(ctx, cursor, pageSize, walletID) @@ -678,13 +661,13 @@ func main() { ) - var cursor *string = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" + var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") metadata := &operations.ListWalletsQueryParamMetadata{} - var name *string = "string" + var name *string = formancegosdk.String("string") - var pageSize *int64 = 412533 + var pageSize *int64 = formancegosdk.Int64(412533) ctx := context.Background() res, err := s.Wallets.ListWallets(ctx, cursor, metadata, name, pageSize) @@ -742,11 +725,7 @@ func main() { var id string = "string" - requestBody := &operations.UpdateWalletRequestBody{ - Metadata: map[string]interface{}{ - "key": "string", - }, - } + requestBody := &operations.UpdateWalletRequestBody{} ctx := context.Background() res, err := s.Wallets.UpdateWallet(ctx, id, requestBody) diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 9b622ec..0b89785 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -251,9 +251,9 @@ func main() { ) - var endpoint *string = "https://example.com" + var endpoint *string = formancegosdk.String("https://example.com") - var id *string = "4997257d-dfb6-445b-929c-cbe2ab182818" + var id *string = formancegosdk.String("4997257d-dfb6-445b-929c-cbe2ab182818") ctx := context.Background() res, err := s.Webhooks.GetManyConfigs(ctx, endpoint, id) diff --git a/formance.go b/formance.go index 5843a7d..0870f91 100644 --- a/formance.go +++ b/formance.go @@ -208,8 +208,8 @@ func New(opts ...SDKOption) *Formance { Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", SDKVersion: "0.8.0", - GenVersion: "2.250.16", - UserAgent: "speakeasy-sdk/go 0.8.0 2.250.16 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + GenVersion: "2.253.0", + UserAgent: "speakeasy-sdk/go 0.8.0 2.253.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { From 4842738310fe669dee967bbe25033fc9efd4ab81 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 15 Feb 2024 00:25:28 +0000 Subject: [PATCH 17/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.180.0 --- .speakeasy/gen.lock | 9 +- RELEASES.md | 12 +- accounts.go | 151 ++++++-- balances.go | 73 +++- clients.go | 342 ++++++++++++++---- docs/sdks/accounts/README.md | 2 +- docs/sdks/clients/README.md | 26 +- docs/sdks/orchestration/README.md | 14 +- docs/sdks/payments/README.md | 8 +- docs/sdks/scopes/README.md | 18 +- docs/sdks/script/README.md | 2 +- docs/sdks/transactions/README.md | 6 +- docs/sdks/users/README.md | 2 +- docs/sdks/wallets/README.md | 38 +- formance.go | 130 +++++-- gen.yaml | 2 +- go.mod | 1 - go.sum | 2 - internal/hooks/hooks.go | 140 ++++++++ internal/hooks/registration.go | 12 + ledger.go | 37 +- logs.go | 37 +- mapping.go | 79 +++- orchestration.go | 270 +++++++++++--- payments.go | 462 +++++++++++++++++++----- pkg/utils/requestbody.go | 13 + pkg/utils/utils.go | 24 ++ scopes.go | 267 +++++++++++--- script.go | 43 ++- search.go | 48 ++- server.go | 42 ++- stats.go | 37 +- transactions.go | 268 ++++++++++---- users.go | 78 +++- wallets.go | 576 ++++++++++++++++++++++++------ webhooks.go | 270 +++++++++++--- 36 files changed, 2805 insertions(+), 736 deletions(-) create mode 100644 internal/hooks/hooks.go create mode 100644 internal/hooks/registration.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index a38c171..3f7150a 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.253.0 - releaseVersion: 0.8.0 - configChecksum: a4fdd8174d316d8cd42244cc35a62cea + generationVersion: 2.258.0 + releaseVersion: 0.9.0 + configChecksum: 426f03bc7ed68f9a13b7680f1c4d0116 repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -14,7 +14,7 @@ management: features: go: constsAndDefaults: 0.1.3 - core: 3.3.2 + core: 3.4.0 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.6 @@ -643,3 +643,4 @@ generatedFiles: - docs/sdks/webhooks/README.md - USAGE.md - .gitattributes + - internal/hooks/hooks.go diff --git a/RELEASES.md b/RELEASES.md index cb34e59..d8b617c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -270,4 +270,14 @@ Based on: ### Generated - [go v0.8.0] . ### Releases -- [Go v0.8.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.8.0 - . \ No newline at end of file +- [Go v0.8.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.8.0 - . + +## 2024-02-15 00:25:16 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.180.0 (2.258.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.9.0] . +### Releases +- [Go v0.9.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.0 - . \ No newline at end of file diff --git a/accounts.go b/accounts.go index c9ee00d..d3bf68f 100644 --- a/accounts.go +++ b/accounts.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -27,6 +28,8 @@ func newAccounts(sdkConfig sdkConfiguration) *Accounts { // AddMetadataToAccount - Add metadata to an account func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[string]interface{}, address string, ledger string) (*operations.AddMetadataToAccountResponse, error) { + hookCtx := hooks.HookContext{OperationID: "addMetadataToAccount"} + request := operations.AddMetadataToAccountRequest{ RequestBody: requestBody, Address: address, @@ -34,36 +37,51 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}/metadata", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}/metadata", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, true, false, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -80,6 +98,7 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -105,6 +124,8 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str // CountAccounts - Count the accounts from a ledger func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *string, metadata *operations.Metadata) (*operations.CountAccountsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "countAccounts"} + request := operations.CountAccountsRequest{ Ledger: ledger, Address: address, @@ -112,17 +133,17 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "HEAD", url, nil) + req, err := http.NewRequestWithContext(ctx, "HEAD", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -130,12 +151,31 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -152,6 +192,7 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: res.Headers = httpRes.Header @@ -179,32 +220,53 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st // GetAccount - Get account by its address func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string) (*operations.GetAccountResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getAccount"} + request := operations.GetAccountRequest{ Address: address, Ledger: ledger, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts/{address}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -221,6 +283,7 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -258,18 +321,20 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string // ListAccounts - List accounts from a ledger // List accounts from a ledger, sorted by address in descending order. func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAccountsRequest) (*operations.ListAccountsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listAccounts"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -277,12 +342,31 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -299,6 +383,7 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/balances.go b/balances.go index 30790b4..8eafcb5 100644 --- a/balances.go +++ b/balances.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -27,18 +28,20 @@ func newBalances(sdkConfig sdkConfiguration) *Balances { // GetBalances - Get the balances from a ledger's account func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalancesRequest) (*operations.GetBalancesResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getBalances"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/balances", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/balances", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -46,12 +49,31 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -68,6 +90,7 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -104,23 +127,25 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc // GetBalancesAggregated - Get the aggregated balances from selected accounts func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, address *string) (*operations.GetBalancesAggregatedResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getBalancesAggregated"} + request := operations.GetBalancesAggregatedRequest{ Ledger: ledger, Address: address, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/aggregate/balances", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/aggregate/balances", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -128,12 +153,31 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -150,6 +194,7 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/clients.go b/clients.go index 0c0e9f9..85a7151 100644 --- a/clients.go +++ b/clients.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Clients - Everything related to Clients @@ -28,32 +29,53 @@ func newClients(sdkConfig sdkConfiguration) *Clients { // AddScopeToClient - Add scope to client func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID string) (*operations.AddScopeToClientResponse, error) { + hookCtx := hooks.HookContext{OperationID: "addScopeToClient"} + request := operations.AddScopeToClientRequest{ ClientID: clientID, ScopeID: scopeID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -70,6 +92,7 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -83,31 +106,54 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID // CreateClient - Create client func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClientRequest) (*operations.CreateClientResponse, error) { + hookCtx := hooks.HookContext{OperationID: "createClient"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/auth/clients" + opURL, err := url.JoinPath(baseURL, "/api/auth/clients") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -124,6 +170,7 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 201: switch { @@ -148,39 +195,59 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient // CreateSecret - Add a secret to a client func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecretRequest *shared.CreateSecretRequest) (*operations.CreateSecretResponse, error) { + hookCtx := hooks.HookContext{OperationID: "createSecret"} + request := operations.CreateSecretRequest{ ClientID: clientID, CreateSecretRequest: createSecretRequest, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreateSecretRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -197,6 +264,7 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -221,31 +289,52 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre // DeleteClient - Delete client func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operations.DeleteClientResponse, error) { + hookCtx := hooks.HookContext{OperationID: "deleteClient"} + request := operations.DeleteClientRequest{ ClientID: clientID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -262,6 +351,7 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -275,32 +365,53 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation // DeleteScopeFromClient - Delete scope from client func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, scopeID string) (*operations.DeleteScopeFromClientResponse, error) { + hookCtx := hooks.HookContext{OperationID: "deleteScopeFromClient"} + request := operations.DeleteScopeFromClientRequest{ ClientID: clientID, ScopeID: scopeID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/scopes/{scopeId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -317,6 +428,7 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -330,32 +442,53 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc // DeleteSecret - Delete a secret from a client func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID string) (*operations.DeleteSecretResponse, error) { + hookCtx := hooks.HookContext{OperationID: "deleteSecret"} + request := operations.DeleteSecretRequest{ ClientID: clientID, SecretID: secretID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets/{secretId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}/secrets/{secretId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -372,6 +505,7 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -385,24 +519,48 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st // ListClients - List clients func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listClients"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/auth/clients" + opURL, err := url.JoinPath(baseURL, "/api/auth/clients") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -419,6 +577,7 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -443,31 +602,52 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo // ReadClient - Read client func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations.ReadClientResponse, error) { + hookCtx := hooks.HookContext{OperationID: "readClient"} + request := operations.ReadClientRequest{ ClientID: clientID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -484,6 +664,7 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -508,39 +689,59 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. // UpdateClient - Update client func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClientRequest *shared.UpdateClientRequest) (*operations.UpdateClientResponse, error) { + hookCtx := hooks.HookContext{OperationID: "updateClient"} + request := operations.UpdateClientRequest{ ClientID: clientID, UpdateClientRequest: updateClientRequest, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/clients/{clientId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateClientRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "PUT", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -557,6 +758,7 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 29b6fd6..95e2fa1 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -37,7 +37,7 @@ func main() { requestBody := map[string]interface{}{ "admin": true, - "a": "string", + "a": "", } var address string = "users:001" diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 4c4a5b8..951af12 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -40,9 +40,9 @@ func main() { ) - var clientID string = "string" + var clientID string = "" - var scopeID string = "string" + var scopeID string = "" ctx := context.Background() res, err := s.Clients.AddScopeToClient(ctx, clientID, scopeID) @@ -95,7 +95,7 @@ func main() { ctx := context.Background() res, err := s.Clients.CreateClient(ctx, &shared.CreateClientRequest{ - Name: "string", + Name: "", }) if err != nil { log.Fatal(err) @@ -144,10 +144,10 @@ func main() { ) - var clientID string = "string" + var clientID string = "" createSecretRequest := &shared.CreateSecretRequest{ - Name: "string", + Name: "", } ctx := context.Background() @@ -201,7 +201,7 @@ func main() { ) - var clientID string = "string" + var clientID string = "" ctx := context.Background() res, err := s.Clients.DeleteClient(ctx, clientID) @@ -253,9 +253,9 @@ func main() { ) - var clientID string = "string" + var clientID string = "" - var scopeID string = "string" + var scopeID string = "" ctx := context.Background() res, err := s.Clients.DeleteScopeFromClient(ctx, clientID, scopeID) @@ -308,9 +308,9 @@ func main() { ) - var clientID string = "string" + var clientID string = "" - var secretID string = "string" + var secretID string = "" ctx := context.Background() res, err := s.Clients.DeleteSecret(ctx, clientID, secretID) @@ -409,7 +409,7 @@ func main() { ) - var clientID string = "string" + var clientID string = "" ctx := context.Background() res, err := s.Clients.ReadClient(ctx, clientID) @@ -460,10 +460,10 @@ func main() { ) - var clientID string = "string" + var clientID string = "" updateClientRequest := &shared.UpdateClientRequest{ - Name: "string", + Name: "", } ctx := context.Background() diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 709ccb3..4ea826f 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -40,7 +40,7 @@ func main() { res, err := s.Orchestration.CreateWorkflow(ctx, &shared.CreateWorkflowRequest{ Stages: []map[string]interface{}{ map[string]interface{}{ - "key": "string", + "key": "", }, }, }) @@ -91,7 +91,7 @@ func main() { ) - var flowID string = "string" + var flowID string = "" ctx := context.Background() res, err := s.Orchestration.GetFlow(ctx, flowID) @@ -142,9 +142,9 @@ func main() { ) - var flowID string = "string" + var flowID string = "" - var runID string = "string" + var runID string = "" ctx := context.Background() res, err := s.Orchestration.GetWorkflowOccurrence(ctx, flowID, runID) @@ -243,7 +243,7 @@ func main() { ) - var flowID string = "string" + var flowID string = "" ctx := context.Background() res, err := s.Orchestration.ListRuns(ctx, flowID) @@ -341,10 +341,10 @@ func main() { ) - var flowID string = "string" + var flowID string = "" requestBody := map[string]string{ - "key": "string", + "key": "", } var wait *bool = formancegosdk.Bool(false) diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index a8d1fd4..01887da 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -97,7 +97,7 @@ func main() { var connector shared.Connector = shared.ConnectorBankingCircle - var taskID string = "string" + var taskID string = "" ctx := context.Background() res, err := s.Payments.GetConnectorTask(ctx, connector, taskID) @@ -149,7 +149,7 @@ func main() { ) - var paymentID string = "string" + var paymentID string = "" ctx := context.Background() res, err := s.Payments.GetPayment(ctx, paymentID) @@ -417,7 +417,7 @@ func main() { var pageSize *int64 = formancegosdk.Int64(13778) sort := []string{ - "string", + "", } ctx := context.Background() @@ -476,7 +476,7 @@ func main() { var pageSize *int64 = formancegosdk.Int64(227071) sort := []string{ - "string", + "", } ctx := context.Background() diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index cebe4e1..bbbb296 100644 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -38,9 +38,9 @@ func main() { ) - var scopeID string = "string" + var scopeID string = "" - var transientScopeID string = "string" + var transientScopeID string = "" ctx := context.Background() res, err := s.Scopes.AddTransientScope(ctx, scopeID, transientScopeID) @@ -93,7 +93,7 @@ func main() { ctx := context.Background() res, err := s.Scopes.CreateScope(ctx, &shared.CreateScopeRequest{ - Label: "string", + Label: "", }) if err != nil { log.Fatal(err) @@ -143,7 +143,7 @@ func main() { ) - var scopeID string = "string" + var scopeID string = "" ctx := context.Background() res, err := s.Scopes.DeleteScope(ctx, scopeID) @@ -195,9 +195,9 @@ func main() { ) - var scopeID string = "string" + var scopeID string = "" - var transientScopeID string = "string" + var transientScopeID string = "" ctx := context.Background() res, err := s.Scopes.DeleteTransientScope(ctx, scopeID, transientScopeID) @@ -296,7 +296,7 @@ func main() { ) - var scopeID string = "string" + var scopeID string = "" ctx := context.Background() res, err := s.Scopes.ReadScope(ctx, scopeID) @@ -347,10 +347,10 @@ func main() { ) - var scopeID string = "string" + var scopeID string = "" updateScopeRequest := &shared.UpdateScopeRequest{ - Label: "string", + Label: "", } ctx := context.Background() diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index 0ca7d21..5616d48 100644 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -37,7 +37,7 @@ func main() { script := shared.Script{ Metadata: map[string]interface{}{ "admin": true, - "a": "string", + "a": "", }, Plain: "vars { account $user diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 7251386..13afffa 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -42,7 +42,7 @@ func main() { shared.TransactionData{ Metadata: map[string]interface{}{ "admin": true, - "a": "string", + "a": "", }, Postings: []shared.Posting{ shared.Posting{ @@ -116,7 +116,7 @@ func main() { requestBody := map[string]interface{}{ "admin": true, - "a": "string", + "a": "", } ctx := context.Background() @@ -229,7 +229,7 @@ func main() { postTransaction := shared.PostTransaction{ Metadata: map[string]interface{}{ "admin": true, - "a": "string", + "a": "", }, Reference: formancegosdk.String("ref:001"), } diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 693c17d..61d0fcc 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -79,7 +79,7 @@ func main() { ) - var userID string = "string" + var userID string = "" ctx := context.Background() res, err := s.Users.ReadUser(ctx, userID) diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index 337d501..cf875d2 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -46,7 +46,7 @@ func main() { ) - var holdID string = "string" + var holdID string = "" confirmHoldRequest := &shared.ConfirmHoldRequest{ Amount: formancegosdk.Int64(100), @@ -103,10 +103,10 @@ func main() { ) - var id string = "string" + var id string = "" createBalanceRequest := &shared.CreateBalanceRequest{ - Name: "string", + Name: "", } ctx := context.Background() @@ -160,7 +160,7 @@ func main() { ctx := context.Background() res, err := s.Wallets.CreateWallet(ctx, &shared.CreateWalletRequest{ - Name: "string", + Name: "", }) if err != nil { log.Fatal(err) @@ -210,18 +210,18 @@ func main() { ) - var id string = "string" + var id string = "" creditWalletRequest := &shared.CreditWalletRequest{ Amount: shared.Monetary{ Amount: 201874, - Asset: "string", + Asset: "", }, Sources: []shared.Subject{ shared.CreateSubjectLedgerAccountSubject( shared.LedgerAccountSubject{ - Identifier: "string", - Type: "string", + Identifier: "", + Type: "", }, ), }, @@ -277,7 +277,7 @@ func main() { ) - var id string = "string" + var id string = "" debitWalletRequest := &shared.DebitWalletRequest{ Amount: shared.Monetary{ @@ -337,9 +337,9 @@ func main() { ) - var balanceName string = "string" + var balanceName string = "" - var id string = "string" + var id string = "" ctx := context.Background() res, err := s.Wallets.GetBalance(ctx, balanceName, id) @@ -391,7 +391,7 @@ func main() { ) - var holdID string = "string" + var holdID string = "" ctx := context.Background() res, err := s.Wallets.GetHold(ctx, holdID) @@ -449,7 +449,7 @@ func main() { var pageSize *int64 = formancegosdk.Int64(692494) - var walletID *string = formancegosdk.String("string") + var walletID *string = formancegosdk.String("") ctx := context.Background() res, err := s.Wallets.GetHolds(ctx, cursor, metadata, pageSize, walletID) @@ -505,7 +505,7 @@ func main() { var pageSize *int64 = formancegosdk.Int64(680555) - var walletID *string = formancegosdk.String("string") + var walletID *string = formancegosdk.String("") ctx := context.Background() res, err := s.Wallets.GetTransactions(ctx, cursor, pageSize, walletID) @@ -558,7 +558,7 @@ func main() { ) - var id string = "string" + var id string = "" ctx := context.Background() res, err := s.Wallets.GetWallet(ctx, id) @@ -609,7 +609,7 @@ func main() { ) - var id string = "string" + var id string = "" ctx := context.Background() res, err := s.Wallets.ListBalances(ctx, id) @@ -665,7 +665,7 @@ func main() { metadata := &operations.ListWalletsQueryParamMetadata{} - var name *string = formancegosdk.String("string") + var name *string = formancegosdk.String("") var pageSize *int64 = formancegosdk.Int64(412533) @@ -723,7 +723,7 @@ func main() { ) - var id string = "string" + var id string = "" requestBody := &operations.UpdateWalletRequestBody{} @@ -778,7 +778,7 @@ func main() { ) - var holdID string = "string" + var holdID string = "" ctx := context.Background() res, err := s.Wallets.VoidHold(ctx, holdID) diff --git a/formance.go b/formance.go index 0870f91..a18a74b 100644 --- a/formance.go +++ b/formance.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" "time" ) @@ -60,6 +61,7 @@ type sdkConfiguration struct { GenVersion string UserAgent string RetryConfig *utils.RetryConfig + Hooks *hooks.Hooks } func (c *sdkConfiguration) GetServerDetails() (string, map[string]string) { @@ -207,21 +209,24 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.8.0", - GenVersion: "2.253.0", - UserAgent: "speakeasy-sdk/go 0.8.0 2.253.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.9.0", + GenVersion: "2.258.0", + UserAgent: "speakeasy-sdk/go 0.9.0 2.258.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { "organization": "", }, }, + Hooks: hooks.New(), }, } for _, opt := range opts { opt(sdk) } + sdk.sdkConfiguration.DefaultClient = sdk.sdkConfiguration.Hooks.ClientInit(sdk.sdkConfiguration.DefaultClient) + // Use WithClient to override the default client if you would like to customize the timeout if sdk.sdkConfiguration.DefaultClient == nil { sdk.sdkConfiguration.DefaultClient = &http.Client{Timeout: 60 * time.Second} @@ -273,24 +278,48 @@ func New(opts ...SDKOption) *Formance { // GetServerInfo - Get server info func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfoResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getServerInfo"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/auth/_info" + opURL, err := url.JoinPath(baseURL, "/api/auth/_info") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -307,6 +336,7 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -331,24 +361,48 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo // PaymentsgetServerInfo - Get server info func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.PaymentsgetServerInfoResponse, error) { + hookCtx := hooks.HookContext{OperationID: "paymentsgetServerInfo"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/payments/_info" + opURL, err := url.JoinPath(baseURL, "/api/payments/_info") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -365,6 +419,7 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -389,24 +444,48 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme // SearchgetServerInfo - Get server info func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.SearchgetServerInfoResponse, error) { + hookCtx := hooks.HookContext{OperationID: "searchgetServerInfo"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/search/_info" + opURL, err := url.JoinPath(baseURL, "/api/search/_info") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -423,6 +502,7 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/gen.yaml b/gen.yaml index a88f868..8f3787b 100644 --- a/gen.yaml +++ b/gen.yaml @@ -8,7 +8,7 @@ generation: parameterOrderingFeb2024: false requestResponseComponentNamesFeb2024: false go: - version: 0.8.0 + version: 0.9.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/go.mod b/go.mod index 7a6b7fb..e73a4c8 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,5 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/mitchellh/mapstructure v1.5.0 github.com/spyzhov/ajson v0.8.0 ) diff --git a/go.sum b/go.sum index ae03a47..1f07f51 100644 --- a/go.sum +++ b/go.sum @@ -2,7 +2,5 @@ github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+M github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/spyzhov/ajson v0.8.0 h1:sFXyMbi4Y/BKjrsfkUZHSjA2JM1184enheSjjoT/zCc= github.com/spyzhov/ajson v0.8.0/go.mod h1:63V+CGM6f1Bu/p4nLIN8885ojBdt88TbLoSFzyqMuVA= diff --git a/internal/hooks/hooks.go b/internal/hooks/hooks.go new file mode 100644 index 0000000..f7e4b62 --- /dev/null +++ b/internal/hooks/hooks.go @@ -0,0 +1,140 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package hooks + +import ( + "errors" + "net/http" +) + +type FailEarly struct { + Cause error +} + +var _ error = (*FailEarly)(nil) + +func (f *FailEarly) Error() string { + return f.Cause.Error() +} + +// HTTPClient provides an interface for supplying the SDK with a custom HTTP client +type HTTPClient interface { + Do(req *http.Request) (*http.Response, error) +} + +type HookContext struct { + OperationID string +} + +type BeforeRequestContext struct { + HookContext +} + +type AfterSuccessContext struct { + HookContext +} + +type AfterErrorContext struct { + HookContext +} + +// clientInitHook is called when the SDK is initializing the HTTP client. The hook can return a new HTTP client to be used by the SDK. +type clientInitHook interface { + ClientInit(client HTTPClient) HTTPClient +} + +// beforeRequestHook is called before the SDK sends a request. The hook can modify the request before it is sent or return an error to stop the request from being sent. +type beforeRequestHook interface { + BeforeRequest(hookCtx BeforeRequestContext, req *http.Request) (*http.Request, error) +} + +// afterSuccessHook is called after the SDK receives a response. The hook can modify the response before it is handled or return an error to stop the response from being handled. +type afterSuccessHook interface { + AfterSuccess(hookCtx AfterSuccessContext, res *http.Response) (*http.Response, error) +} + +// afterSuccessHook is called after the SDK encounters an error, or a non-successful response. The hook can modify the response if available otherwise modify the error. +// All afterErrorHook hooks are called and returning an error won't stop the other hooks from being called. But if you want to stop the other hooks from being called, you can return a FailEarly error wrapping your error. +type afterErrorHook interface { + AfterError(hookCtx AfterErrorContext, res *http.Response, err error) (*http.Response, error) +} + +type Hooks struct { + clientInitHooks []clientInitHook + beforeRequestHook []beforeRequestHook + afterSuccessHook []afterSuccessHook + afterErrorHook []afterErrorHook +} + +func New() *Hooks { + h := &Hooks{ + clientInitHooks: []clientInitHook{}, + beforeRequestHook: []beforeRequestHook{}, + afterSuccessHook: []afterSuccessHook{}, + afterErrorHook: []afterErrorHook{}, + } + + initHooks(h) + + return h +} + +// registerClientInitHook registers a hook to be used by the SDK for the client initialization event. +func (h *Hooks) registerClientInitHook(hook clientInitHook) { + h.clientInitHooks = append(h.clientInitHooks, hook) +} + +// registerBeforeRequestHook registers a hook to be used by the SDK for the before request event. +func (h *Hooks) registerBeforeRequestHook(hook beforeRequestHook) { + h.beforeRequestHook = append(h.beforeRequestHook, hook) +} + +// registerAfterSuccessHook registers a hook to be used by the SDK for the after success event. +func (h *Hooks) registerAfterSuccessHook(hook afterSuccessHook) { + h.afterSuccessHook = append(h.afterSuccessHook, hook) +} + +// registerAfterErrorHook registers a hook to be used by the SDK for the after error event. +func (h *Hooks) registerAfterErrorHook(hook afterErrorHook) { + h.afterErrorHook = append(h.afterErrorHook, hook) +} + +func (h *Hooks) ClientInit(client HTTPClient) HTTPClient { + for _, hook := range h.clientInitHooks { + client = hook.ClientInit(client) + } + return client +} + +func (h *Hooks) BeforeRequest(hookCtx BeforeRequestContext, req *http.Request) (*http.Request, error) { + for _, hook := range h.beforeRequestHook { + var err error + req, err = hook.BeforeRequest(hookCtx, req) + if err != nil { + return req, err + } + } + return req, nil +} + +func (h *Hooks) AfterSuccess(hookCtx AfterSuccessContext, res *http.Response) (*http.Response, error) { + for _, hook := range h.afterSuccessHook { + var err error + res, err = hook.AfterSuccess(hookCtx, res) + if err != nil { + return res, err + } + } + return res, nil +} + +func (h *Hooks) AfterError(hookCtx AfterErrorContext, res *http.Response, err error) (*http.Response, error) { + for _, hook := range h.afterErrorHook { + res, err = hook.AfterError(hookCtx, res, err) + var fe *FailEarly + if errors.As(err, &fe) { + return nil, fe.Cause + } + } + return res, err +} diff --git a/internal/hooks/registration.go b/internal/hooks/registration.go new file mode 100644 index 0000000..e52569a --- /dev/null +++ b/internal/hooks/registration.go @@ -0,0 +1,12 @@ +package hooks + +/* + * This file is only ever generated once on the first generation and then is free to be modified + * Any hooks you wish to add should be added to the InitHooks function. Feel free to define them + * in this file or in a separate files in the hooks package. + */ + +func initHooks(h *Hooks) { + // Add hooks by calling h.RegisterHook with an instance of a hook that implements the Hook interface + // Hooks are registered per SDK instance are valid for the lifetime of the SDK instance +} diff --git a/ledger.go b/ledger.go index f4641a2..c1f6ed8 100644 --- a/ledger.go +++ b/ledger.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -27,31 +28,52 @@ func newLedger(sdkConfig sdkConfiguration) *Ledger { // GetLedgerInfo - Get information about a ledger func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations.GetLedgerInfoResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getLedgerInfo"} + request := operations.GetLedgerInfoRequest{ Ledger: ledger, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/_info", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/_info", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -68,6 +90,7 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/logs.go b/logs.go index 6c8b68d..f59de2f 100644 --- a/logs.go +++ b/logs.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -28,18 +29,20 @@ func newLogs(sdkConfig sdkConfiguration) *Logs { // ListLogs - List the logs from a ledger // List the logs from a ledger, sorted by ID in descending order. func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) (*operations.ListLogsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listLogs"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/log", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/log", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -47,12 +50,31 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -69,6 +91,7 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/mapping.go b/mapping.go index cb1e36e..4f1d4d2 100644 --- a/mapping.go +++ b/mapping.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -27,31 +28,52 @@ func newMapping(sdkConfig sdkConfiguration) *Mapping { // GetMapping - Get the mapping of a ledger func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.GetMappingResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getMapping"} + request := operations.GetMappingRequest{ Ledger: ledger, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -68,6 +90,7 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -104,42 +127,59 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge // UpdateMapping - Update the mapping of a ledger func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, ledger string) (*operations.UpdateMappingResponse, error) { + hookCtx := hooks.HookContext{OperationID: "updateMapping"} + request := operations.UpdateMappingRequest{ Mapping: mapping, Ledger: ledger, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/mapping", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, true, false, "Mapping", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "PUT", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -156,6 +196,7 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/orchestration.go b/orchestration.go index 1fbac38..7a78983 100644 --- a/orchestration.go +++ b/orchestration.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Orchestration - Everything related to Orchestration @@ -29,31 +30,54 @@ func newOrchestration(sdkConfig sdkConfiguration) *Orchestration { // CreateWorkflow - Create workflow // Create a workflow func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.CreateWorkflowRequest) (*operations.CreateWorkflowResponse, error) { + hookCtx := hooks.HookContext{OperationID: "createWorkflow"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/flows" + opURL, err := url.JoinPath(baseURL, "/api/orchestration/flows") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -70,6 +94,7 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 201: switch { @@ -107,31 +132,52 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea // GetFlow - Get a flow by id // Get a flow by id func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations.GetFlowResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getFlow"} + request := operations.GetFlowRequest{ FlowID: flowID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -148,6 +194,7 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -185,32 +232,53 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations // GetWorkflowOccurrence - Get a workflow occurrence by id // Get a workflow occurrence by id func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string, runID string) (*operations.GetWorkflowOccurrenceResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getWorkflowOccurrence"} + request := operations.GetWorkflowOccurrenceRequest{ FlowID: flowID, RunID: runID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs/{runId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs/{runId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -227,6 +295,7 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -264,24 +333,48 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string // ListFlows - List registered flows // List registered flows func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listFlows"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/flows" + opURL, err := url.JoinPath(baseURL, "/api/orchestration/flows") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -298,6 +391,7 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -335,31 +429,52 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes // ListRuns - List occurrences of a workflow // List occurrences of a workflow func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operations.ListRunsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listRuns"} + request := operations.ListRunsRequest{ FlowID: flowID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -376,6 +491,7 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -412,24 +528,48 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation // OrchestrationgetServerInfo - Get server info func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operations.OrchestrationgetServerInfoResponse, error) { + hookCtx := hooks.HookContext{OperationID: "orchestrationgetServerInfo"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/orchestration/_info" + opURL, err := url.JoinPath(baseURL, "/api/orchestration/_info") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -446,6 +586,7 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -483,6 +624,8 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat // RunWorkflow - Run workflow // Run workflow func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestBody map[string]string, wait *bool) (*operations.RunWorkflowResponse, error) { + hookCtx := hooks.HookContext{OperationID: "runWorkflow"} + request := operations.RunWorkflowRequest{ FlowID: flowID, RequestBody: requestBody, @@ -490,23 +633,22 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/orchestration/flows/{flowId}/runs", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { @@ -515,12 +657,31 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -537,6 +698,7 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 201: switch { diff --git a/payments.go b/payments.go index c4913c0..b88d7da 100644 --- a/payments.go +++ b/payments.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Payments - Everything related to Payments @@ -29,34 +30,54 @@ func newPayments(sdkConfig sdkConfiguration) *Payments { // ConnectorsStripeTransfer - Transfer funds between Stripe accounts // Execute a transfer between two Stripe accounts. func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared.StripeTransferRequest) (*operations.ConnectorsStripeTransferResponse, error) { + hookCtx := hooks.HookContext{OperationID: "connectorsStripeTransfer"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors/stripe/transfer" + opURL, err := url.JoinPath(baseURL, "/api/payments/connectors/stripe/transfer") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -73,6 +94,7 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -98,32 +120,53 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. // GetConnectorTask - Read a specific task of the connector // Get a specific task associated to the connector. func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connector, taskID string) (*operations.GetConnectorTaskResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getConnectorTask"} + request := operations.GetConnectorTaskRequest{ Connector: connector, TaskID: taskID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks/{taskId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks/{taskId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -140,6 +183,7 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -164,31 +208,52 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec // GetPayment - Get a payment func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operations.GetPaymentResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getPayment"} + request := operations.GetPaymentRequest{ PaymentID: paymentID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/payments/{paymentId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/payments/payments/{paymentId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -205,6 +270,7 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -230,42 +296,59 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation // InstallConnector - Install a connector // Install a connector by its name and config. func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared.ConnectorConfig, connector shared.Connector) (*operations.InstallConnectorResponse, error) { + hookCtx := hooks.HookContext{OperationID: "installConnector"} + request := operations.InstallConnectorRequest{ ConnectorConfig: connectorConfig, Connector: connector, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "ConnectorConfig", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -282,6 +365,7 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -296,24 +380,48 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. // ListAllConnectors - List all installed connectors // List all installed connectors. func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllConnectorsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listAllConnectors"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors" + opURL, err := url.JoinPath(baseURL, "/api/payments/connectors") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -330,6 +438,7 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -355,24 +464,48 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo // ListConfigsAvailableConnectors - List the configs of each available connector // List the configs of each available connector. func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operations.ListConfigsAvailableConnectorsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listConfigsAvailableConnectors"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/payments/connectors/configs" + opURL, err := url.JoinPath(baseURL, "/api/payments/connectors/configs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -389,6 +522,7 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -414,6 +548,8 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati // ListConnectorTasks - List tasks from a connector // List all tasks associated with this connector. func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Connector, cursor *string, pageSize *int64) (*operations.ListConnectorTasksResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listConnectorTasks"} + request := operations.ListConnectorTasksRequest{ Connector: connector, Cursor: cursor, @@ -421,17 +557,17 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/tasks", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -439,12 +575,31 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -461,6 +616,7 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -485,6 +641,8 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn // ListPayments - List payments func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.ListPaymentsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listPayments"} + request := operations.ListPaymentsRequest{ Cursor: cursor, PageSize: pageSize, @@ -492,14 +650,17 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/payments/payments" + opURL, err := url.JoinPath(baseURL, "/api/payments/payments") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -507,12 +668,31 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -529,6 +709,7 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -553,6 +734,8 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i // PaymentslistAccounts - List accounts func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.PaymentslistAccountsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "paymentslistAccounts"} + request := operations.PaymentslistAccountsRequest{ Cursor: cursor, PageSize: pageSize, @@ -560,14 +743,17 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/payments/accounts" + opURL, err := url.JoinPath(baseURL, "/api/payments/accounts") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -575,12 +761,31 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -597,6 +802,7 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -622,31 +828,52 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag // ReadConnectorConfig - Read the config of a connector // Read connector config func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Connector) (*operations.ReadConnectorConfigResponse, error) { + hookCtx := hooks.HookContext{OperationID: "readConnectorConfig"} + request := operations.ReadConnectorConfigRequest{ Connector: connector, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/config", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/config", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -663,6 +890,7 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -689,31 +917,52 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con // Reset a connector by its name. // It will remove the connector and ALL PAYMENTS generated with it. func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connector) (*operations.ResetConnectorResponse, error) { + hookCtx := hooks.HookContext{OperationID: "resetConnector"} + request := operations.ResetConnectorRequest{ Connector: connector, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/reset", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}/reset", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "POST", url, nil) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -730,6 +979,7 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -744,31 +994,52 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto // UninstallConnector - Uninstall a connector // Uninstall a connector by its name. func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Connector) (*operations.UninstallConnectorResponse, error) { + hookCtx := hooks.HookContext{OperationID: "uninstallConnector"} + request := operations.UninstallConnectorRequest{ Connector: connector, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/payments/connectors/{connector}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -785,6 +1056,7 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: diff --git a/pkg/utils/requestbody.go b/pkg/utils/requestbody.go index 950f39a..322b8b3 100644 --- a/pkg/utils/requestbody.go +++ b/pkg/utils/requestbody.go @@ -26,6 +26,19 @@ var ( ) func SerializeRequestBody(ctx context.Context, request interface{}, nullable, optional bool, requestFieldName, serializationMethod, tag string) (io.Reader, string, error) { + bodyReader, contentType, err := serializeRequestBody(ctx, request, nullable, optional, requestFieldName, serializationMethod, tag) + if err != nil { + return nil, "", fmt.Errorf("error serializing request body: %w", err) + } + + if bodyReader == nil && !optional { + return nil, "", fmt.Errorf("request body is required") + } + + return bodyReader, contentType, nil +} + +func serializeRequestBody(ctx context.Context, request interface{}, nullable, optional bool, requestFieldName, serializationMethod, tag string) (io.Reader, string, error) { requestStructType := reflect.TypeOf(request) requestValType := reflect.ValueOf(request) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index b4618bb..5508c5f 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,6 +8,7 @@ import ( "math/big" "reflect" "regexp" + "strconv" "strings" "time" @@ -63,6 +64,29 @@ func Contains(slice []string, item string) bool { return false } +func MatchStatusCodes(expectedCodes []string, statusCode int) bool { + for _, codeStr := range expectedCodes { + code, err := strconv.Atoi(codeStr) + if err == nil { + if code == statusCode { + return true + } + continue + } + + codeRange, err := strconv.Atoi(string(codeStr[0])) + if err != nil { + continue + } + + if statusCode >= (codeRange*100) && statusCode < ((codeRange+1)*100) { + return true + } + } + + return false +} + func parseStructTag(tagKey string, field reflect.StructField) map[string]string { tag := field.Tag.Get(tagKey) if tag == "" { diff --git a/scopes.go b/scopes.go index eaac810..4fbd5b9 100644 --- a/scopes.go +++ b/scopes.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Scopes - Everything related to Scopes @@ -29,32 +30,53 @@ func newScopes(sdkConfig sdkConfiguration) *Scopes { // AddTransientScope - Add a transient scope to a scope // Add a transient scope to a scope func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.AddTransientScopeResponse, error) { + hookCtx := hooks.HookContext{OperationID: "addTransientScope"} + request := operations.AddTransientScopeRequest{ ScopeID: scopeID, TransientScopeID: transientScopeID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -71,6 +93,7 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -85,31 +108,54 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien // CreateScope - Create scope // Create scope func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeRequest) (*operations.CreateScopeResponse, error) { + hookCtx := hooks.HookContext{OperationID: "createScope"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/auth/scopes" + opURL, err := url.JoinPath(baseURL, "/api/auth/scopes") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -126,6 +172,7 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 201: switch { @@ -151,31 +198,52 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq // DeleteScope - Delete scope // Delete scope func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.DeleteScopeResponse, error) { + hookCtx := hooks.HookContext{OperationID: "deleteScope"} + request := operations.DeleteScopeRequest{ ScopeID: scopeID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -192,6 +260,7 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -206,32 +275,53 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D // DeleteTransientScope - Delete a transient scope from a scope // Delete a transient scope from a scope func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.DeleteTransientScopeResponse, error) { + hookCtx := hooks.HookContext{OperationID: "deleteTransientScope"} + request := operations.DeleteTransientScopeRequest{ ScopeID: scopeID, TransientScopeID: transientScopeID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}/transient/{transientScopeId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -248,6 +338,7 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -262,24 +353,48 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans // ListScopes - List scopes // List Scopes func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listScopes"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/auth/scopes" + opURL, err := url.JoinPath(baseURL, "/api/auth/scopes") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -296,6 +411,7 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -321,31 +437,52 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse // ReadScope - Read scope // Read scope func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.ReadScopeResponse, error) { + hookCtx := hooks.HookContext{OperationID: "readScope"} + request := operations.ReadScopeRequest{ ScopeID: scopeID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -362,6 +499,7 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -387,39 +525,59 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea // UpdateScope - Update scope // Update scope func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeRequest *shared.UpdateScopeRequest) (*operations.UpdateScopeResponse, error) { + hookCtx := hooks.HookContext{OperationID: "updateScope"} + request := operations.UpdateScopeRequest{ ScopeID: scopeID, UpdateScopeRequest: updateScopeRequest, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/scopes/{scopeId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateScopeRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "PUT", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -436,6 +594,7 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/script.go b/script.go index 286d481..720687b 100644 --- a/script.go +++ b/script.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -30,6 +31,8 @@ func newScript(sdkConfig sdkConfiguration) *Script { // // Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger string, preview *bool) (*operations.RunScriptResponse, error) { + hookCtx := hooks.HookContext{OperationID: "runScript"} + request := operations.RunScriptRequest{ Script: script, Ledger: ledger, @@ -37,26 +40,22 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/script", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/script", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Script", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { @@ -65,12 +64,31 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -87,6 +105,7 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/search.go b/search.go index e2bc6a3..8b4e860 100644 --- a/search.go +++ b/search.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Search - Everything related to Search @@ -29,34 +30,54 @@ func newSearch(sdkConfig sdkConfiguration) *Search { // Search // ElasticSearch query engine func (s *Search) Search(ctx context.Context, request shared.Query) (*operations.SearchResponse, error) { + hookCtx := hooks.HookContext{OperationID: "search"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/search/" + opURL, err := url.JoinPath(baseURL, "/api/search/") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -73,6 +94,7 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/server.go b/server.go index 823168f..ef46299 100644 --- a/server.go +++ b/server.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Server - Everything related to Server @@ -28,24 +29,48 @@ func newServer(sdkConfig sdkConfiguration) *Server { // GetInfo - Show server information func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getInfo"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/ledger/_info" + opURL, err := url.JoinPath(baseURL, "/api/ledger/_info") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -62,6 +87,7 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/stats.go b/stats.go index 795521e..3f12d3f 100644 --- a/stats.go +++ b/stats.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -28,31 +29,52 @@ func newStats(sdkConfig sdkConfiguration) *Stats { // ReadStats - Get statistics from a ledger // Get statistics from a ledger. (aggregate metrics on accounts and transactions) func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadStatsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "readStats"} + request := operations.ReadStatsRequest{ Ledger: ledger, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/stats", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/stats", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -69,6 +91,7 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/transactions.go b/transactions.go index c9b4297..547555e 100644 --- a/transactions.go +++ b/transactions.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" @@ -27,42 +28,59 @@ func newTransactions(sdkConfig sdkConfiguration) *Transactions { // CreateTransactions - Create a new batch of transactions to a ledger func (s *Transactions) CreateTransactions(ctx context.Context, transactions shared.Transactions, ledger string) (*operations.CreateTransactionsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "CreateTransactions"} + request := operations.CreateTransactionsRequest{ Transactions: transactions, Ledger: ledger, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/batch", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/batch", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Transactions", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -79,6 +97,7 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -115,6 +134,8 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar // AddMetadataOnTransaction - Set the metadata of a transaction by its ID func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger string, txid int64, requestBody map[string]interface{}) (*operations.AddMetadataOnTransactionResponse, error) { + hookCtx := hooks.HookContext{OperationID: "addMetadataOnTransaction"} + request := operations.AddMetadataOnTransactionRequest{ Ledger: ledger, Txid: txid, @@ -122,33 +143,51 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/metadata", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/metadata", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, true, true, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -165,6 +204,7 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -190,18 +230,20 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri // CountTransactions - Count the transactions from a ledger func (s *Transactions) CountTransactions(ctx context.Context, request operations.CountTransactionsRequest) (*operations.CountTransactionsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "countTransactions"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "HEAD", url, nil) + req, err := http.NewRequestWithContext(ctx, "HEAD", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -209,12 +251,31 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -231,6 +292,7 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: res.Headers = httpRes.Header @@ -258,6 +320,8 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations // CreateTransaction - Create a new transaction to a ledger func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction shared.PostTransaction, ledger string, preview *bool) (*operations.CreateTransactionResponse, error) { + hookCtx := hooks.HookContext{OperationID: "createTransaction"} + request := operations.CreateTransactionRequest{ PostTransaction: postTransaction, Ledger: ledger, @@ -265,26 +329,22 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "PostTransaction", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { @@ -293,12 +353,31 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -315,6 +394,7 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -351,32 +431,53 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh // GetTransaction - Get transaction from a ledger by its ID func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid int64) (*operations.GetTransactionResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getTransaction"} + request := operations.GetTransactionRequest{ Ledger: ledger, Txid: txid, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -393,6 +494,7 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -430,18 +532,20 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i // ListTransactions - List transactions from a ledger // List transactions from a ledger, sorted by txid in descending order. func (s *Transactions) ListTransactions(ctx context.Context, request operations.ListTransactionsRequest) (*operations.ListTransactionsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listTransactions"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -449,12 +553,31 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -471,6 +594,7 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -507,32 +631,53 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. // RevertTransaction - Revert a ledger transaction by its ID func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txid int64) (*operations.RevertTransactionResponse, error) { + hookCtx := hooks.HookContext{OperationID: "revertTransaction"} + request := operations.RevertTransactionRequest{ Ledger: ledger, Txid: txid, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/revert", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions/{txid}/revert", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "POST", url, nil) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -549,6 +694,7 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/users.go b/users.go index 2ea5772..5143aa0 100644 --- a/users.go +++ b/users.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Users - Everything related to Users @@ -29,24 +30,48 @@ func newUsers(sdkConfig sdkConfiguration) *Users { // ListUsers - List users // List users func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listUsers"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/auth/users" + opURL, err := url.JoinPath(baseURL, "/api/auth/users") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -63,6 +88,7 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -88,31 +114,52 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e // ReadUser - Read user // Read user func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUserResponse, error) { + hookCtx := hooks.HookContext{OperationID: "readUser"} + request := operations.ReadUserRequest{ UserID: userID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/auth/users/{userId}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/auth/users/{userId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -129,6 +176,7 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/wallets.go b/wallets.go index b394644..36e5377 100644 --- a/wallets.go +++ b/wallets.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Wallets - Everything related to Wallets @@ -28,39 +29,59 @@ func newWallets(sdkConfig sdkConfiguration) *Wallets { // ConfirmHold - Confirm a hold func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldRequest *shared.ConfirmHoldRequest) (*operations.ConfirmHoldResponse, error) { + hookCtx := hooks.HookContext{OperationID: "confirmHold"} + request := operations.ConfirmHoldRequest{ HoldID: holdID, ConfirmHoldRequest: confirmHoldRequest, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/confirm", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/confirm", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ConfirmHoldRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -77,6 +98,7 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -102,39 +124,59 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq // CreateBalance - Create a balance func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceRequest *shared.CreateBalanceRequest) (*operations.CreateBalanceResponse, error) { + hookCtx := hooks.HookContext{OperationID: "createBalance"} + request := operations.CreateBalanceRequest{ ID: id, CreateBalanceRequest: createBalanceRequest, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreateBalanceRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -151,6 +193,7 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 201: switch { @@ -187,31 +230,54 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq // CreateWallet - Create a new wallet func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWalletRequest) (*operations.CreateWalletResponse, error) { + hookCtx := hooks.HookContext{OperationID: "createWallet"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/wallets" + opURL, err := url.JoinPath(baseURL, "/api/wallets/wallets") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -228,6 +294,7 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 201: switch { @@ -264,39 +331,59 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet // CreditWallet - Credit a wallet func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletRequest *shared.CreditWalletRequest) (*operations.CreditWalletResponse, error) { + hookCtx := hooks.HookContext{OperationID: "creditWallet"} + request := operations.CreditWalletRequest{ ID: id, CreditWalletRequest: creditWalletRequest, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/credit", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/credit", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreditWalletRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -313,6 +400,7 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -338,39 +426,59 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque // DebitWallet - Debit a wallet func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest *shared.DebitWalletRequest) (*operations.DebitWalletResponse, error) { + hookCtx := hooks.HookContext{OperationID: "debitWallet"} + request := operations.DebitWalletRequest{ ID: id, DebitWalletRequest: debitWalletRequest, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/debit", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/debit", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DebitWalletRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -387,6 +495,7 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -424,32 +533,53 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest // GetBalance - Get detailed balance func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) (*operations.GetBalanceResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getBalance"} + request := operations.GetBalanceRequest{ BalanceName: balanceName, ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances/{balanceName}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances/{balanceName}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -466,6 +596,7 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -502,31 +633,52 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) // GetHold - Get a hold func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHoldResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getHold"} + request := operations.GetHoldRequest{ HoldID: holdID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{holdID}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{holdID}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -543,6 +695,7 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -579,6 +732,8 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo // GetHolds - Get all holds for a wallet func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operations.GetHoldsQueryParamMetadata, pageSize *int64, walletID *string) (*operations.GetHoldsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getHolds"} + request := operations.GetHoldsRequest{ Cursor: cursor, Metadata: metadata, @@ -587,14 +742,17 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/holds" + opURL, err := url.JoinPath(baseURL, "/api/wallets/holds") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -602,12 +760,31 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -624,6 +801,7 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -659,6 +837,8 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat } func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize *int64, walletID *string) (*operations.GetTransactionsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getTransactions"} + request := operations.GetTransactionsRequest{ Cursor: cursor, PageSize: pageSize, @@ -666,14 +846,17 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/transactions" + opURL, err := url.JoinPath(baseURL, "/api/wallets/transactions") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -681,12 +864,31 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -703,6 +905,7 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -739,31 +942,52 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize // GetWallet - Get a wallet func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWalletResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getWallet"} + request := operations.GetWalletRequest{ ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -780,6 +1004,7 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -818,31 +1043,52 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall // ListBalances - List balances of a wallet func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.ListBalancesResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listBalances"} + request := operations.ListBalancesRequest{ ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}/balances", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -859,6 +1105,7 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -883,6 +1130,8 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List // ListWallets - List all wallets func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *operations.ListWalletsQueryParamMetadata, name *string, pageSize *int64) (*operations.ListWalletsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "listWallets"} + request := operations.ListWalletsRequest{ Cursor: cursor, Metadata: metadata, @@ -891,14 +1140,17 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/wallets" + opURL, err := url.JoinPath(baseURL, "/api/wallets/wallets") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -906,12 +1158,31 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -928,6 +1199,7 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -952,39 +1224,59 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope // UpdateWallet - Update a wallet func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *operations.UpdateWalletRequestBody) (*operations.UpdateWalletResponse, error) { + hookCtx := hooks.HookContext{OperationID: "updateWallet"} + request := operations.UpdateWalletRequest{ ID: id, RequestBody: requestBody, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/wallets/{id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "PATCH", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -1001,6 +1293,7 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -1026,31 +1319,52 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper // VoidHold - Cancel a hold func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.VoidHoldResponse, error) { + hookCtx := hooks.HookContext{OperationID: "voidHold"} + request := operations.VoidHoldRequest{ HoldID: holdID, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/void", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/wallets/holds/{hold_id}/void", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "POST", url, nil) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -1067,6 +1381,7 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -1092,24 +1407,48 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void // WalletsgetServerInfo - Get server info func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.WalletsgetServerInfoResponse, error) { + hookCtx := hooks.HookContext{OperationID: "walletsgetServerInfo"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/wallets/_info" + opURL, err := url.JoinPath(baseURL, "/api/wallets/_info") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -1126,6 +1465,7 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { diff --git a/webhooks.go b/webhooks.go index 69af6e0..177a220 100644 --- a/webhooks.go +++ b/webhooks.go @@ -6,13 +6,14 @@ import ( "bytes" "context" "fmt" + "github.com/speakeasy-sdks/formance-go-sdk/internal/hooks" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/sdkerrors" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared" "github.com/speakeasy-sdks/formance-go-sdk/pkg/utils" "io" "net/http" - "strings" + "net/url" ) // Webhooks - Everything related to Webhooks @@ -29,31 +30,52 @@ func newWebhooks(sdkConfig sdkConfiguration) *Webhooks { // ActivateConfig - Activate one config // Activate a webhooks config by ID, to start receiving webhooks to its endpoint. func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.ActivateConfigResponse, error) { + hookCtx := hooks.HookContext{OperationID: "activateConfig"} + request := operations.ActivateConfigRequest{ ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/activate", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/activate", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -70,6 +92,7 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -99,39 +122,59 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A // If not passed or empty, a secret is automatically generated. // The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChangeSecret *shared.ConfigChangeSecret) (*operations.ChangeConfigSecretResponse, error) { + hookCtx := hooks.HookContext{OperationID: "changeConfigSecret"} + request := operations.ChangeConfigSecretRequest{ ID: id, ConfigChangeSecret: configChangeSecret, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/secret/change", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/secret/change", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ConfigChangeSecret", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) + return nil, err } - req, err := http.NewRequestWithContext(ctx, "PUT", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -148,6 +191,7 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -173,31 +217,52 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan // DeactivateConfig - Deactivate one config // Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations.DeactivateConfigResponse, error) { + hookCtx := hooks.HookContext{OperationID: "deactivateConfig"} + request := operations.DeactivateConfigRequest{ ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/deactivate", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/deactivate", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "PUT", url, nil) + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -214,6 +279,7 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -240,31 +306,52 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations // DeleteConfig - Delete one config // Delete a webhooks config by ID. func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.DeleteConfigResponse, error) { + hookCtx := hooks.HookContext{OperationID: "deleteConfig"} + request := operations.DeleteConfigRequest{ ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "*/*") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -281,6 +368,7 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -295,20 +383,25 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del // GetManyConfigs - Get many configs // Sorted by updated date descending func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *string) (*operations.GetManyConfigsResponse, error) { + hookCtx := hooks.HookContext{OperationID: "getManyConfigs"} + request := operations.GetManyConfigsRequest{ Endpoint: endpoint, ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/webhooks/configs" + opURL, err := url.JoinPath(baseURL, "/api/webhooks/configs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) @@ -316,12 +409,31 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -338,6 +450,7 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -371,34 +484,54 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str // // All eventTypes are converted to lower-case when inserted. func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) (*operations.InsertConfigResponse, error) { + hookCtx := hooks.HookContext{OperationID: "insertConfig"} + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url := strings.TrimSuffix(baseURL, "/") + "/api/webhooks/configs" + opURL, err := url.JoinPath(baseURL, "/api/webhooks/configs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error serializing request body: %w", err) - } - if bodyReader == nil { - return nil, fmt.Errorf("request body is required") + return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", url, bodyReader) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) - + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -415,6 +548,7 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { @@ -442,31 +576,52 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) // TestConfig - Test one config // Test a config by sending a webhook to its endpoint. func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestConfigResponse, error) { + hookCtx := hooks.HookContext{OperationID: "testConfig"} + request := operations.TestConfigRequest{ ID: id, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - url, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/test", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/webhooks/configs/{id}/test", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") - req.Header.Set("user-agent", s.sdkConfiguration.UserAgent) + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { - return nil, fmt.Errorf("error sending request: %w", err) + return nil, err } - if httpRes == nil { - return nil, fmt.Errorf("error sending request: no response") + + httpRes, err := client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + if err != nil { + return nil, err + } } contentType := httpRes.Header.Get("Content-Type") @@ -483,6 +638,7 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC } httpRes.Body.Close() httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + switch { case httpRes.StatusCode == 200: switch { From 8ed99bd33c144b169abc9d625678254d52772954 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 20 Feb 2024 00:20:36 +0000 Subject: [PATCH 18/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.183.3 --- .speakeasy/gen.lock | 9 +++-- RELEASES.md | 12 ++++++- accounts.go | 20 +++++------ balances.go | 10 +++--- clients.go | 45 ++++++++++--------------- formance.go | 21 +++++------- gen.yaml | 3 +- go.mod | 4 +-- go.sum | 6 ---- internal/hooks/hooks.go | 2 +- ledger.go | 5 ++- logs.go | 5 ++- mapping.go | 10 +++--- orchestration.go | 35 ++++++++----------- payments.go | 60 +++++++++++++-------------------- scopes.go | 35 ++++++++----------- script.go | 5 ++- search.go | 5 ++- server.go | 5 ++- stats.go | 5 ++- transactions.go | 35 ++++++++----------- users.go | 10 +++--- wallets.go | 75 +++++++++++++++++------------------------ webhooks.go | 35 ++++++++----------- 24 files changed, 189 insertions(+), 268 deletions(-) delete mode 100644 go.sum diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 3f7150a..9464968 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.258.0 - releaseVersion: 0.9.0 - configChecksum: 426f03bc7ed68f9a13b7680f1c4d0116 + generationVersion: 2.263.3 + releaseVersion: 0.9.1 + configChecksum: 64722758d9fc37000432783fced05b45 repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -14,7 +14,7 @@ management: features: go: constsAndDefaults: 0.1.3 - core: 3.4.0 + core: 3.4.1 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.6 @@ -41,7 +41,6 @@ generatedFiles: - webhooks.go - formance.go - go.mod - - go.sum - pkg/models/sdkerrors/sdkerror.go - pkg/types/bigint.go - pkg/types/date.go diff --git a/RELEASES.md b/RELEASES.md index d8b617c..8855cf8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -280,4 +280,14 @@ Based on: ### Generated - [go v0.9.0] . ### Releases -- [Go v0.9.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.0 - . \ No newline at end of file +- [Go v0.9.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.0 - . + +## 2024-02-20 00:20:24 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.183.3 (2.263.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.9.1] . +### Releases +- [Go v0.9.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.1 - . \ No newline at end of file diff --git a/accounts.go b/accounts.go index d3bf68f..d34aad3 100644 --- a/accounts.go +++ b/accounts.go @@ -55,13 +55,13 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -83,7 +83,6 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddMetadataToAccountResponse{ @@ -149,13 +148,13 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -177,7 +176,6 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CountAccountsResponse{ @@ -240,13 +238,13 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -268,7 +266,6 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetAccountResponse{ @@ -340,13 +337,13 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -368,7 +365,6 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListAccountsResponse{ diff --git a/balances.go b/balances.go index 8eafcb5..aa940fb 100644 --- a/balances.go +++ b/balances.go @@ -47,13 +47,13 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -75,7 +75,6 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetBalancesResponse{ @@ -151,13 +150,13 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -179,7 +178,6 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetBalancesAggregatedResponse{ diff --git a/clients.go b/clients.go index 85a7151..a810b03 100644 --- a/clients.go +++ b/clients.go @@ -49,13 +49,13 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -77,7 +77,6 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddScopeToClientResponse{ @@ -127,13 +126,13 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -155,7 +154,6 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateClientResponse{ @@ -221,13 +219,13 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -249,7 +247,6 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateSecretResponse{ @@ -308,13 +305,13 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -336,7 +333,6 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteClientResponse{ @@ -385,13 +381,13 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -413,7 +409,6 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteScopeFromClientResponse{ @@ -462,13 +457,13 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -490,7 +485,6 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteSecretResponse{ @@ -534,13 +528,13 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -562,7 +556,6 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListClientsResponse{ @@ -621,13 +614,13 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -649,7 +642,6 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadClientResponse{ @@ -715,13 +707,13 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -743,7 +735,6 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateClientResponse{ diff --git a/formance.go b/formance.go index a18a74b..0502a03 100644 --- a/formance.go +++ b/formance.go @@ -209,9 +209,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.9.0", - GenVersion: "2.258.0", - UserAgent: "speakeasy-sdk/go 0.9.0 2.258.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.9.1", + GenVersion: "2.263.3", + UserAgent: "speakeasy-sdk/go 0.9.1 2.263.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { @@ -293,13 +293,13 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -321,7 +321,6 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetServerInfoResponse{ @@ -376,13 +375,13 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -404,7 +403,6 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.PaymentsgetServerInfoResponse{ @@ -459,13 +457,13 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -487,7 +485,6 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.SearchgetServerInfoResponse{ diff --git a/gen.yaml b/gen.yaml index 8f3787b..5530c91 100644 --- a/gen.yaml +++ b/gen.yaml @@ -8,7 +8,8 @@ generation: parameterOrderingFeb2024: false requestResponseComponentNamesFeb2024: false go: - version: 0.9.0 + version: 0.9.1 + additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/go.mod b/go.mod index e73a4c8..f772bdc 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,6 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/spyzhov/ajson v0.8.0 ) diff --git a/go.sum b/go.sum deleted file mode 100644 index 1f07f51..0000000 --- a/go.sum +++ /dev/null @@ -1,6 +0,0 @@ -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= -github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= -github.com/spyzhov/ajson v0.8.0 h1:sFXyMbi4Y/BKjrsfkUZHSjA2JM1184enheSjjoT/zCc= -github.com/spyzhov/ajson v0.8.0/go.mod h1:63V+CGM6f1Bu/p4nLIN8885ojBdt88TbLoSFzyqMuVA= diff --git a/internal/hooks/hooks.go b/internal/hooks/hooks.go index f7e4b62..f25bdb0 100644 --- a/internal/hooks/hooks.go +++ b/internal/hooks/hooks.go @@ -53,7 +53,7 @@ type afterSuccessHook interface { AfterSuccess(hookCtx AfterSuccessContext, res *http.Response) (*http.Response, error) } -// afterSuccessHook is called after the SDK encounters an error, or a non-successful response. The hook can modify the response if available otherwise modify the error. +// afterErrorHook is called after the SDK encounters an error, or a non-successful response. The hook can modify the response if available otherwise modify the error. // All afterErrorHook hooks are called and returning an error won't stop the other hooks from being called. But if you want to stop the other hooks from being called, you can return a FailEarly error wrapping your error. type afterErrorHook interface { AfterError(hookCtx AfterErrorContext, res *http.Response, err error) (*http.Response, error) diff --git a/ledger.go b/ledger.go index c1f6ed8..c72d9c9 100644 --- a/ledger.go +++ b/ledger.go @@ -47,13 +47,13 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -75,7 +75,6 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetLedgerInfoResponse{ diff --git a/logs.go b/logs.go index f59de2f..dbb178c 100644 --- a/logs.go +++ b/logs.go @@ -48,13 +48,13 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -76,7 +76,6 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListLogsResponse{ diff --git a/mapping.go b/mapping.go index 4f1d4d2..4ae0e6c 100644 --- a/mapping.go +++ b/mapping.go @@ -47,13 +47,13 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -75,7 +75,6 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetMappingResponse{ @@ -153,13 +152,13 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -181,7 +180,6 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateMappingResponse{ diff --git a/orchestration.go b/orchestration.go index 7a78983..bbbf86d 100644 --- a/orchestration.go +++ b/orchestration.go @@ -51,13 +51,13 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -79,7 +79,6 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateWorkflowResponse{ @@ -151,13 +150,13 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -179,7 +178,6 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetFlowResponse{ @@ -252,13 +250,13 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -280,7 +278,6 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetWorkflowOccurrenceResponse{ @@ -348,13 +345,13 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -376,7 +373,6 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListFlowsResponse{ @@ -448,13 +444,13 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -476,7 +472,6 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListRunsResponse{ @@ -543,13 +538,13 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -571,7 +566,6 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.OrchestrationgetServerInfoResponse{ @@ -655,13 +649,13 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -683,7 +677,6 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.RunWorkflowResponse{ diff --git a/payments.go b/payments.go index b88d7da..e1bbf1d 100644 --- a/payments.go +++ b/payments.go @@ -51,13 +51,13 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -79,7 +79,6 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ConnectorsStripeTransferResponse{ @@ -140,13 +139,13 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -168,7 +167,6 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetConnectorTaskResponse{ @@ -227,13 +225,13 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -255,7 +253,6 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetPaymentResponse{ @@ -322,13 +319,13 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -350,7 +347,6 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.InstallConnectorResponse{ @@ -395,13 +391,13 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -423,7 +419,6 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListAllConnectorsResponse{ @@ -479,13 +474,13 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -507,7 +502,6 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListConfigsAvailableConnectorsResponse{ @@ -573,13 +567,13 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -601,7 +595,6 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListConnectorTasksResponse{ @@ -666,13 +659,13 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -694,7 +687,6 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListPaymentsResponse{ @@ -759,13 +751,13 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -787,7 +779,6 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.PaymentslistAccountsResponse{ @@ -847,13 +838,13 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -875,7 +866,6 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadConnectorConfigResponse{ @@ -936,13 +926,13 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -964,7 +954,6 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ResetConnectorResponse{ @@ -1013,13 +1002,13 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1041,7 +1030,6 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UninstallConnectorResponse{ diff --git a/scopes.go b/scopes.go index 4fbd5b9..6cb2d54 100644 --- a/scopes.go +++ b/scopes.go @@ -50,13 +50,13 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -78,7 +78,6 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddTransientScopeResponse{ @@ -129,13 +128,13 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -157,7 +156,6 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateScopeResponse{ @@ -217,13 +215,13 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -245,7 +243,6 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteScopeResponse{ @@ -295,13 +292,13 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -323,7 +320,6 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteTransientScopeResponse{ @@ -368,13 +364,13 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -396,7 +392,6 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListScopesResponse{ @@ -456,13 +451,13 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -484,7 +479,6 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadScopeResponse{ @@ -551,13 +545,13 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -579,7 +573,6 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateScopeResponse{ diff --git a/script.go b/script.go index 720687b..64b7000 100644 --- a/script.go +++ b/script.go @@ -62,13 +62,13 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -90,7 +90,6 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.RunScriptResponse{ diff --git a/search.go b/search.go index 8b4e860..606eff1 100644 --- a/search.go +++ b/search.go @@ -51,13 +51,13 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -79,7 +79,6 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.SearchResponse{ diff --git a/server.go b/server.go index ef46299..d4b48c4 100644 --- a/server.go +++ b/server.go @@ -44,13 +44,13 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -72,7 +72,6 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetInfoResponse{ diff --git a/stats.go b/stats.go index 3f12d3f..d501657 100644 --- a/stats.go +++ b/stats.go @@ -48,13 +48,13 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -76,7 +76,6 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadStatsResponse{ diff --git a/transactions.go b/transactions.go index 547555e..cde9a48 100644 --- a/transactions.go +++ b/transactions.go @@ -54,13 +54,13 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -82,7 +82,6 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateTransactionsResponse{ @@ -161,13 +160,13 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -189,7 +188,6 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddMetadataOnTransactionResponse{ @@ -249,13 +247,13 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -277,7 +275,6 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CountTransactionsResponse{ @@ -351,13 +348,13 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -379,7 +376,6 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateTransactionResponse{ @@ -451,13 +447,13 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -479,7 +475,6 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetTransactionResponse{ @@ -551,13 +546,13 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -579,7 +574,6 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListTransactionsResponse{ @@ -651,13 +645,13 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -679,7 +673,6 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.RevertTransactionResponse{ diff --git a/users.go b/users.go index 5143aa0..1b55b39 100644 --- a/users.go +++ b/users.go @@ -45,13 +45,13 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -73,7 +73,6 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListUsersResponse{ @@ -133,13 +132,13 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -161,7 +160,6 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadUserResponse{ diff --git a/wallets.go b/wallets.go index 36e5377..52941bf 100644 --- a/wallets.go +++ b/wallets.go @@ -55,13 +55,13 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -83,7 +83,6 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ConfirmHoldResponse{ @@ -150,13 +149,13 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -178,7 +177,6 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateBalanceResponse{ @@ -251,13 +249,13 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -279,7 +277,6 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateWalletResponse{ @@ -357,13 +354,13 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -385,7 +382,6 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreditWalletResponse{ @@ -452,13 +448,13 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -480,7 +476,6 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DebitWalletResponse{ @@ -553,13 +548,13 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -581,7 +576,6 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetBalanceResponse{ @@ -652,13 +646,13 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -680,7 +674,6 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetHoldResponse{ @@ -758,13 +751,13 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -786,7 +779,6 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetHoldsResponse{ @@ -862,13 +854,13 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -890,7 +882,6 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetTransactionsResponse{ @@ -961,13 +952,13 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -989,7 +980,6 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetWalletResponse{ @@ -1062,13 +1052,13 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1090,7 +1080,6 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListBalancesResponse{ @@ -1156,13 +1145,13 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1184,7 +1173,6 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListWalletsResponse{ @@ -1250,13 +1238,13 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1278,7 +1266,6 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateWalletResponse{ @@ -1338,13 +1325,13 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1366,7 +1353,6 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.VoidHoldResponse{ @@ -1422,13 +1408,13 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1450,7 +1436,6 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.WalletsgetServerInfoResponse{ diff --git a/webhooks.go b/webhooks.go index 177a220..5b42841 100644 --- a/webhooks.go +++ b/webhooks.go @@ -49,13 +49,13 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -77,7 +77,6 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ActivateConfigResponse{ @@ -148,13 +147,13 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -176,7 +175,6 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ChangeConfigSecretResponse{ @@ -236,13 +234,13 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -264,7 +262,6 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeactivateConfigResponse{ @@ -325,13 +322,13 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -353,7 +350,6 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteConfigResponse{ @@ -407,13 +403,13 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -435,7 +431,6 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetManyConfigsResponse{ @@ -505,13 +500,13 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -533,7 +528,6 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.InsertConfigResponse{ @@ -595,13 +589,13 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) if err != nil { return nil, err } + client := s.sdkConfiguration.SecurityClient + httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -623,7 +617,6 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.TestConfigResponse{ From 425a84cb79417bc67319b02f1aaf1f05187f6d54 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sun, 25 Feb 2024 00:18:26 +0000 Subject: [PATCH 19/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.193.4 --- .speakeasy/gen.lock | 10 +- RELEASES.md | 12 +- accounts.go | 72 +++-- balances.go | 36 ++- clients.go | 162 +++++++---- .../addmetadataontransactionrequest.md | 10 +- .../operations/addmetadatatoaccountrequest.md | 2 +- .../models/operations/debitwalletrequest.md | 2 +- docs/pkg/models/shared/account.md | 2 +- .../shared/accountwithvolumesandbalances.md | 6 +- .../shared/aggregatebalancesresponse.md | 6 +- docs/pkg/models/shared/configuser.md | 2 +- docs/pkg/models/shared/posttransaction.md | 2 +- .../models/shared/posttransactionscript.md | 2 +- docs/pkg/models/shared/script.md | 4 +- .../models/shared/stripetransferrequest.md | 2 +- docs/pkg/models/shared/transaction.md | 18 +- docs/pkg/models/shared/transactiondata.md | 2 +- docs/pkg/models/shared/webhooksconfig.md | 2 +- docs/sdks/accounts/README.md | 2 +- docs/sdks/transactions/README.md | 12 +- docs/sdks/wallets/README.md | 2 +- formance.go | 72 +++-- gen.yaml | 4 +- internal/hooks/hooks.go | 32 ++- ledger.go | 18 +- logs.go | 18 +- mapping.go | 36 ++- orchestration.go | 126 ++++---- payments.go | 216 ++++++++------ pkg/utils/security.go | 10 +- scopes.go | 126 ++++---- script.go | 18 +- search.go | 18 +- server.go | 18 +- stats.go | 18 +- transactions.go | 126 ++++---- users.go | 36 ++- wallets.go | 270 +++++++++++------- webhooks.go | 126 ++++---- 40 files changed, 1005 insertions(+), 653 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9464968..ba6a0d9 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.263.3 - releaseVersion: 0.9.1 - configChecksum: 64722758d9fc37000432783fced05b45 + generationVersion: 2.272.4 + releaseVersion: 0.9.2 + configChecksum: 36485a0713c2e24c79a09566ad21e266 repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -14,10 +14,10 @@ management: features: go: constsAndDefaults: 0.1.3 - core: 3.4.1 + core: 3.4.3 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.6 + globalSecurity: 2.82.7 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 unions: 2.85.3 diff --git a/RELEASES.md b/RELEASES.md index 8855cf8..6478000 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -290,4 +290,14 @@ Based on: ### Generated - [go v0.9.1] . ### Releases -- [Go v0.9.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.1 - . \ No newline at end of file +- [Go v0.9.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.1 - . + +## 2024-02-25 00:18:14 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.193.4 (2.272.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.9.2] . +### Releases +- [Go v0.9.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.2 - . \ No newline at end of file diff --git a/accounts.go b/accounts.go index d34aad3..389f121 100644 --- a/accounts.go +++ b/accounts.go @@ -28,7 +28,11 @@ func newAccounts(sdkConfig sdkConfiguration) *Accounts { // AddMetadataToAccount - Add metadata to an account func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[string]interface{}, address string, ledger string) (*operations.AddMetadataToAccountResponse, error) { - hookCtx := hooks.HookContext{OperationID: "addMetadataToAccount"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "addMetadataToAccount", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.AddMetadataToAccountRequest{ RequestBody: requestBody, @@ -55,13 +59,13 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -70,15 +74,15 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -123,7 +127,11 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str // CountAccounts - Count the accounts from a ledger func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *string, metadata *operations.Metadata) (*operations.CountAccountsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "countAccounts"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "countAccounts", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.CountAccountsRequest{ Ledger: ledger, @@ -148,13 +156,13 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -163,15 +171,15 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -218,7 +226,11 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st // GetAccount - Get account by its address func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string) (*operations.GetAccountResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getAccount"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getAccount", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetAccountRequest{ Address: address, @@ -238,13 +250,13 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -253,15 +265,15 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -318,7 +330,11 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string // ListAccounts - List accounts from a ledger // List accounts from a ledger, sorted by address in descending order. func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAccountsRequest) (*operations.ListAccountsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listAccounts"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listAccounts", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/accounts", request, nil) @@ -337,13 +353,13 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -352,15 +368,15 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/balances.go b/balances.go index aa940fb..5002dce 100644 --- a/balances.go +++ b/balances.go @@ -28,7 +28,11 @@ func newBalances(sdkConfig sdkConfiguration) *Balances { // GetBalances - Get the balances from a ledger's account func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalancesRequest) (*operations.GetBalancesResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getBalances"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getBalances", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/balances", request, nil) @@ -47,13 +51,13 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -62,15 +66,15 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -126,7 +130,11 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc // GetBalancesAggregated - Get the aggregated balances from selected accounts func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, address *string) (*operations.GetBalancesAggregatedResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getBalancesAggregated"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getBalancesAggregated", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetBalancesAggregatedRequest{ Ledger: ledger, @@ -150,13 +158,13 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -165,15 +173,15 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/clients.go b/clients.go index a810b03..5740364 100644 --- a/clients.go +++ b/clients.go @@ -29,7 +29,11 @@ func newClients(sdkConfig sdkConfiguration) *Clients { // AddScopeToClient - Add scope to client func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID string) (*operations.AddScopeToClientResponse, error) { - hookCtx := hooks.HookContext{OperationID: "addScopeToClient"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "addScopeToClient", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.AddScopeToClientRequest{ ClientID: clientID, @@ -49,13 +53,13 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -64,15 +68,15 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -105,7 +109,11 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID // CreateClient - Create client func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClientRequest) (*operations.CreateClientResponse, error) { - hookCtx := hooks.HookContext{OperationID: "createClient"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createClient", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/auth/clients") @@ -126,13 +134,13 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -141,15 +149,15 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -193,7 +201,11 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient // CreateSecret - Add a secret to a client func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecretRequest *shared.CreateSecretRequest) (*operations.CreateSecretResponse, error) { - hookCtx := hooks.HookContext{OperationID: "createSecret"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSecret", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.CreateSecretRequest{ ClientID: clientID, @@ -219,13 +231,13 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -234,15 +246,15 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -286,7 +298,11 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre // DeleteClient - Delete client func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operations.DeleteClientResponse, error) { - hookCtx := hooks.HookContext{OperationID: "deleteClient"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteClient", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DeleteClientRequest{ ClientID: clientID, @@ -305,13 +321,13 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -320,15 +336,15 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -361,7 +377,11 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation // DeleteScopeFromClient - Delete scope from client func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, scopeID string) (*operations.DeleteScopeFromClientResponse, error) { - hookCtx := hooks.HookContext{OperationID: "deleteScopeFromClient"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteScopeFromClient", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DeleteScopeFromClientRequest{ ClientID: clientID, @@ -381,13 +401,13 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -396,15 +416,15 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -437,7 +457,11 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc // DeleteSecret - Delete a secret from a client func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID string) (*operations.DeleteSecretResponse, error) { - hookCtx := hooks.HookContext{OperationID: "deleteSecret"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSecret", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DeleteSecretRequest{ ClientID: clientID, @@ -457,13 +481,13 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -472,15 +496,15 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -513,7 +537,11 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st // ListClients - List clients func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listClients"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listClients", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/auth/clients") @@ -528,13 +556,13 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -543,15 +571,15 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -595,7 +623,11 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo // ReadClient - Read client func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations.ReadClientResponse, error) { - hookCtx := hooks.HookContext{OperationID: "readClient"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "readClient", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ReadClientRequest{ ClientID: clientID, @@ -614,13 +646,13 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -629,15 +661,15 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -681,7 +713,11 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. // UpdateClient - Update client func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClientRequest *shared.UpdateClientRequest) (*operations.UpdateClientResponse, error) { - hookCtx := hooks.HookContext{OperationID: "updateClient"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "updateClient", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.UpdateClientRequest{ ClientID: clientID, @@ -707,13 +743,13 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -722,15 +758,15 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/docs/pkg/models/operations/addmetadataontransactionrequest.md b/docs/pkg/models/operations/addmetadataontransactionrequest.md index 701a028..aa40e71 100644 --- a/docs/pkg/models/operations/addmetadataontransactionrequest.md +++ b/docs/pkg/models/operations/addmetadataontransactionrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `Txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | -| `RequestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `Txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | +| `RequestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | \ No newline at end of file diff --git a/docs/pkg/models/operations/addmetadatatoaccountrequest.md b/docs/pkg/models/operations/addmetadatatoaccountrequest.md index 7cec63a..06f6548 100644 --- a/docs/pkg/models/operations/addmetadatatoaccountrequest.md +++ b/docs/pkg/models/operations/addmetadatatoaccountrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `RequestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `RequestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | | `Address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | \ No newline at end of file diff --git a/docs/pkg/models/operations/debitwalletrequest.md b/docs/pkg/models/operations/debitwalletrequest.md index cd7f724..bb3b511 100644 --- a/docs/pkg/models/operations/debitwalletrequest.md +++ b/docs/pkg/models/operations/debitwalletrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `ID` | *string* | :heavy_check_mark: | N/A | | -| `DebitWalletRequest` | [*shared.DebitWalletRequest](../../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | {"amount":{"asset":"USD/2","amount":100},"pending":true} | \ No newline at end of file +| `DebitWalletRequest` | [*shared.DebitWalletRequest](../../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | {
"amount": {
"asset": "USD/2",
"amount": 100
},
"pending": true
} | \ No newline at end of file diff --git a/docs/pkg/models/shared/account.md b/docs/pkg/models/shared/account.md index 2572c6f..718f085 100644 --- a/docs/pkg/models/shared/account.md +++ b/docs/pkg/models/shared/account.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | | `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Metadata` | [*shared.Metadata](../../../pkg/models/shared/metadata.md) | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `Metadata` | [*shared.Metadata](../../../pkg/models/shared/metadata.md) | :heavy_minus_sign: | N/A | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | | `Type` | **string* | :heavy_minus_sign: | N/A | virtual | \ No newline at end of file diff --git a/docs/pkg/models/shared/accountwithvolumesandbalances.md b/docs/pkg/models/shared/accountwithvolumesandbalances.md index 68737a4..a874f09 100644 --- a/docs/pkg/models/shared/accountwithvolumesandbalances.md +++ b/docs/pkg/models/shared/accountwithvolumesandbalances.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `Address` | *string* | :heavy_check_mark: | N/A | users:001 | -| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | {"COIN":100} | -| `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../../pkg/models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `Balances` | map[string]*int64* | :heavy_minus_sign: | N/A | {
"COIN": 100
} | +| `Metadata` | [*shared.AccountWithVolumesAndBalancesMetadata](../../../pkg/models/shared/accountwithvolumesandbalancesmetadata.md) | :heavy_minus_sign: | N/A | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | | `Type` | **string* | :heavy_minus_sign: | N/A | virtual | -| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | {"COIN":{"input":100,"output":0}} | \ No newline at end of file +| `Volumes` | map[string]map[string]*int64* | :heavy_minus_sign: | N/A | {
"COIN": {
"input": 100,
"output": 0
}
} | \ No newline at end of file diff --git a/docs/pkg/models/shared/aggregatebalancesresponse.md b/docs/pkg/models/shared/aggregatebalancesresponse.md index cb8629e..2c1da41 100644 --- a/docs/pkg/models/shared/aggregatebalancesresponse.md +++ b/docs/pkg/models/shared/aggregatebalancesresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `Data` | map[string]*int64* | :heavy_check_mark: | N/A | {"USD":100,"EUR":12} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `Data` | map[string]*int64* | :heavy_check_mark: | N/A | {
"USD": 100,
"EUR": 12
} | \ No newline at end of file diff --git a/docs/pkg/models/shared/configuser.md b/docs/pkg/models/shared/configuser.md index 41535c0..65c0b82 100644 --- a/docs/pkg/models/shared/configuser.md +++ b/docs/pkg/models/shared/configuser.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | | `Endpoint` | *string* | :heavy_check_mark: | N/A | https://example.com | -| `EventTypes` | []*string* | :heavy_check_mark: | N/A | ["TYPE1","TYPE2"] | +| `EventTypes` | []*string* | :heavy_check_mark: | N/A | [
"TYPE1",
"TYPE2"
] | | `Secret` | **string* | :heavy_minus_sign: | N/A | V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 | \ No newline at end of file diff --git a/docs/pkg/models/shared/posttransaction.md b/docs/pkg/models/shared/posttransaction.md index fa868eb..bab39d1 100644 --- a/docs/pkg/models/shared/posttransaction.md +++ b/docs/pkg/models/shared/posttransaction.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | | `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_minus_sign: | N/A | | | `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | | `Script` | [*shared.PostTransactionScript](../../../pkg/models/shared/posttransactionscript.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/pkg/models/shared/posttransactionscript.md b/docs/pkg/models/shared/posttransactionscript.md index 08a4635..ef7a94c 100644 --- a/docs/pkg/models/shared/posttransactionscript.md +++ b/docs/pkg/models/shared/posttransactionscript.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| -| `Vars` | [*shared.PostTransactionVars](../../../pkg/models/shared/posttransactionvars.md) | :heavy_minus_sign: | N/A | {"vars":{"user":"users:042"}} | \ No newline at end of file +| `Vars` | [*shared.PostTransactionVars](../../../pkg/models/shared/posttransactionvars.md) | :heavy_minus_sign: | N/A | {
"vars": {
"user": "users:042"
}
} | \ No newline at end of file diff --git a/docs/pkg/models/shared/script.md b/docs/pkg/models/shared/script.md index 0a03379..4c57d26 100644 --- a/docs/pkg/models/shared/script.md +++ b/docs/pkg/models/shared/script.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | | `Plain` | *string* | :heavy_check_mark: | N/A | vars {
account $user
}
send [COIN 10] (
source = @world
destination = $user
)
| | `Reference` | **string* | :heavy_minus_sign: | Reference to attach to the generated transaction | order_1234 | -| `Vars` | [*shared.Vars](../../../pkg/models/shared/vars.md) | :heavy_minus_sign: | N/A | {"vars":{"user":"users:042"}} | \ No newline at end of file +| `Vars` | [*shared.Vars](../../../pkg/models/shared/vars.md) | :heavy_minus_sign: | N/A | {
"vars": {
"user": "users:042"
}
} | \ No newline at end of file diff --git a/docs/pkg/models/shared/stripetransferrequest.md b/docs/pkg/models/shared/stripetransferrequest.md index 2800eea..04be2de 100644 --- a/docs/pkg/models/shared/stripetransferrequest.md +++ b/docs/pkg/models/shared/stripetransferrequest.md @@ -8,4 +8,4 @@ | `Amount` | **int64* | :heavy_minus_sign: | N/A | 100 | | `Asset` | **string* | :heavy_minus_sign: | N/A | USD | | `Destination` | **string* | :heavy_minus_sign: | N/A | acct_1Gqj58KZcSIg2N2q | -| `Metadata` | [*shared.StripeTransferRequestMetadata](../../../pkg/models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| {"order_id":"6735"} | \ No newline at end of file +| `Metadata` | [*shared.StripeTransferRequestMetadata](../../../pkg/models/shared/stripetransferrequestmetadata.md) | :heavy_minus_sign: | A set of key/value pairs that you can attach to a transfer object.
It can be useful for storing additional information about the transfer in a structured format.
| {
"order_id": "6735"
} | \ No newline at end of file diff --git a/docs/pkg/models/shared/transaction.md b/docs/pkg/models/shared/transaction.md index 6c7c80b..04c0648 100644 --- a/docs/pkg/models/shared/transaction.md +++ b/docs/pkg/models/shared/transaction.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | -| `PostCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | {"orders:1":{"USD":{"input":100,"output":10,"balance":90}},"orders:2":{"USD":{"input":100,"output":10,"balance":90}}} | -| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | -| `PreCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | {"orders:1":{"USD":{"input":100,"output":10,"balance":90}},"orders:2":{"USD":{"input":100,"output":10,"balance":90}}} | -| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | -| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | -| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | +| `PostCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
} | +| `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | +| `PreCommitVolumes` | map[string]map[string][shared.Volume](../../../pkg/models/shared/volume.md) | :heavy_minus_sign: | N/A | {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
} | +| `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | +| `Timestamp` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | N/A | | +| `Txid` | *int64* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/transactiondata.md b/docs/pkg/models/shared/transactiondata.md index 8a8fb7c..4b36fb3 100644 --- a/docs/pkg/models/shared/transactiondata.md +++ b/docs/pkg/models/shared/transactiondata.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `Metadata` | map[string]*interface{}* | :heavy_minus_sign: | N/A | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | | `Postings` | [][shared.Posting](../../../pkg/models/shared/posting.md) | :heavy_check_mark: | N/A | | | `Reference` | **string* | :heavy_minus_sign: | N/A | ref:001 | | `Timestamp` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/pkg/models/shared/webhooksconfig.md b/docs/pkg/models/shared/webhooksconfig.md index c41b941..9272ef4 100644 --- a/docs/pkg/models/shared/webhooksconfig.md +++ b/docs/pkg/models/shared/webhooksconfig.md @@ -8,7 +8,7 @@ | `Active` | **bool* | :heavy_minus_sign: | N/A | true | | `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | | `Endpoint` | **string* | :heavy_minus_sign: | N/A | https://example.com | -| `EventTypes` | []*string* | :heavy_minus_sign: | N/A | ["TYPE1","TYPE2"] | +| `EventTypes` | []*string* | :heavy_minus_sign: | N/A | [
"TYPE1",
"TYPE2"
] | | `ID` | **string* | :heavy_minus_sign: | N/A | | | `Secret` | **string* | :heavy_minus_sign: | N/A | V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 | | `UpdatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 95e2fa1..0ff5aa0 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -61,7 +61,7 @@ func main() { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `requestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | +| `requestBody` | map[string]*interface{}* | :heavy_check_mark: | metadata | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | | `address` | *string* | :heavy_check_mark: | Exact address of the account. It must match the following regular expressions pattern:
```
^\w+(:\w+)*$
```
| users:001 | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 13afffa..5734e7c 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -133,12 +133,12 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | -| `requestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | {"admin":true,"a":{"nested":{"key":"value"}}} | +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `txid` | *int64* | :heavy_check_mark: | Transaction ID. | 1234 | +| `requestBody` | map[string]*interface{}* | :heavy_minus_sign: | metadata | {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
} | ### Response diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index cf875d2..00a5be3 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -305,7 +305,7 @@ func main() { | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `id` | *string* | :heavy_check_mark: | N/A | | -| `debitWalletRequest` | [*shared.DebitWalletRequest](../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | {"amount":{"asset":"USD/2","amount":100},"pending":true} | +| `debitWalletRequest` | [*shared.DebitWalletRequest](../../pkg/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | {
"amount": {
"asset": "USD/2",
"amount": 100
},
"pending": true
} | ### Response diff --git a/formance.go b/formance.go index 0502a03..4ad6aa2 100644 --- a/formance.go +++ b/formance.go @@ -176,7 +176,7 @@ func WithClient(client HTTPClient) SDKOption { func withSecurity(security interface{}) func(context.Context) (interface{}, error) { return func(context.Context) (interface{}, error) { - return &security, nil + return security, nil } } @@ -209,9 +209,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.9.1", - GenVersion: "2.263.3", - UserAgent: "speakeasy-sdk/go 0.9.1 2.263.3 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.9.2", + GenVersion: "2.272.4", + UserAgent: "speakeasy-sdk/go 0.9.2 2.272.4 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { @@ -225,12 +225,18 @@ func New(opts ...SDKOption) *Formance { opt(sdk) } - sdk.sdkConfiguration.DefaultClient = sdk.sdkConfiguration.Hooks.ClientInit(sdk.sdkConfiguration.DefaultClient) - // Use WithClient to override the default client if you would like to customize the timeout if sdk.sdkConfiguration.DefaultClient == nil { sdk.sdkConfiguration.DefaultClient = &http.Client{Timeout: 60 * time.Second} } + + currentServerURL, _ := sdk.sdkConfiguration.GetServerDetails() + serverURL := currentServerURL + serverURL, sdk.sdkConfiguration.DefaultClient = sdk.sdkConfiguration.Hooks.SDKInit(currentServerURL, sdk.sdkConfiguration.DefaultClient) + if serverURL != currentServerURL { + sdk.sdkConfiguration.ServerURL = serverURL + } + if sdk.sdkConfiguration.SecurityClient == nil { if sdk.sdkConfiguration.Security != nil { sdk.sdkConfiguration.SecurityClient = utils.ConfigureSecurityClient(sdk.sdkConfiguration.DefaultClient, sdk.sdkConfiguration.Security) @@ -278,7 +284,11 @@ func New(opts ...SDKOption) *Formance { // GetServerInfo - Get server info func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfoResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getServerInfo"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getServerInfo", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/auth/_info") @@ -293,13 +303,13 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -308,15 +318,15 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -360,7 +370,11 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo // PaymentsgetServerInfo - Get server info func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.PaymentsgetServerInfoResponse, error) { - hookCtx := hooks.HookContext{OperationID: "paymentsgetServerInfo"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "paymentsgetServerInfo", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/payments/_info") @@ -375,13 +389,13 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -390,15 +404,15 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -442,7 +456,11 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme // SearchgetServerInfo - Get server info func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.SearchgetServerInfoResponse, error) { - hookCtx := hooks.HookContext{OperationID: "searchgetServerInfo"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "searchgetServerInfo", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/search/_info") @@ -457,13 +475,13 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -472,15 +490,15 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/gen.yaml b/gen.yaml index 5530c91..7a0309d 100644 --- a/gen.yaml +++ b/gen.yaml @@ -7,8 +7,10 @@ generation: nameResolutionDec2023: false parameterOrderingFeb2024: false requestResponseComponentNamesFeb2024: false + auth: + oAuth2ClientCredentialsEnabled: false go: - version: 0.9.1 + version: 0.9.2 additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true diff --git a/internal/hooks/hooks.go b/internal/hooks/hooks.go index f25bdb0..58e5a4e 100644 --- a/internal/hooks/hooks.go +++ b/internal/hooks/hooks.go @@ -3,6 +3,7 @@ package hooks import ( + "context" "errors" "net/http" ) @@ -23,7 +24,10 @@ type HTTPClient interface { } type HookContext struct { - OperationID string + Context context.Context + OperationID string + OAuth2Scopes []string + SecuritySource func(context.Context) (interface{}, error) } type BeforeRequestContext struct { @@ -38,9 +42,9 @@ type AfterErrorContext struct { HookContext } -// clientInitHook is called when the SDK is initializing the HTTP client. The hook can return a new HTTP client to be used by the SDK. -type clientInitHook interface { - ClientInit(client HTTPClient) HTTPClient +// sdkInitHook is called when the SDK is initializing. The hook can modify and return a new baseURL and HTTP client to be used by the SDK. +type sdkInitHook interface { + SDKInit(baseURL string, client HTTPClient) (string, HTTPClient) } // beforeRequestHook is called before the SDK sends a request. The hook can modify the request before it is sent or return an error to stop the request from being sent. @@ -60,7 +64,7 @@ type afterErrorHook interface { } type Hooks struct { - clientInitHooks []clientInitHook + sdkInitHooks []sdkInitHook beforeRequestHook []beforeRequestHook afterSuccessHook []afterSuccessHook afterErrorHook []afterErrorHook @@ -68,20 +72,18 @@ type Hooks struct { func New() *Hooks { h := &Hooks{ - clientInitHooks: []clientInitHook{}, + sdkInitHooks: []sdkInitHook{}, beforeRequestHook: []beforeRequestHook{}, afterSuccessHook: []afterSuccessHook{}, afterErrorHook: []afterErrorHook{}, } - initHooks(h) - return h } -// registerClientInitHook registers a hook to be used by the SDK for the client initialization event. -func (h *Hooks) registerClientInitHook(hook clientInitHook) { - h.clientInitHooks = append(h.clientInitHooks, hook) +// registerSDKInitHook registers a hook to be used by the SDK for the initialization event. +func (h *Hooks) registerSDKInitHook(hook sdkInitHook) { + h.sdkInitHooks = append(h.sdkInitHooks, hook) } // registerBeforeRequestHook registers a hook to be used by the SDK for the before request event. @@ -99,11 +101,11 @@ func (h *Hooks) registerAfterErrorHook(hook afterErrorHook) { h.afterErrorHook = append(h.afterErrorHook, hook) } -func (h *Hooks) ClientInit(client HTTPClient) HTTPClient { - for _, hook := range h.clientInitHooks { - client = hook.ClientInit(client) +func (h *Hooks) SDKInit(baseURL string, client HTTPClient) (string, HTTPClient) { + for _, hook := range h.sdkInitHooks { + baseURL, client = hook.SDKInit(baseURL, client) } - return client + return baseURL, client } func (h *Hooks) BeforeRequest(hookCtx BeforeRequestContext, req *http.Request) (*http.Request, error) { diff --git a/ledger.go b/ledger.go index c72d9c9..6c8f41d 100644 --- a/ledger.go +++ b/ledger.go @@ -28,7 +28,11 @@ func newLedger(sdkConfig sdkConfiguration) *Ledger { // GetLedgerInfo - Get information about a ledger func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations.GetLedgerInfoResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getLedgerInfo"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getLedgerInfo", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetLedgerInfoRequest{ Ledger: ledger, @@ -47,13 +51,13 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -62,15 +66,15 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/logs.go b/logs.go index dbb178c..adf94f8 100644 --- a/logs.go +++ b/logs.go @@ -29,7 +29,11 @@ func newLogs(sdkConfig sdkConfiguration) *Logs { // ListLogs - List the logs from a ledger // List the logs from a ledger, sorted by ID in descending order. func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) (*operations.ListLogsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listLogs"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listLogs", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/log", request, nil) @@ -48,13 +52,13 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -63,15 +67,15 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/mapping.go b/mapping.go index 4ae0e6c..e516de8 100644 --- a/mapping.go +++ b/mapping.go @@ -28,7 +28,11 @@ func newMapping(sdkConfig sdkConfiguration) *Mapping { // GetMapping - Get the mapping of a ledger func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.GetMappingResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getMapping"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getMapping", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetMappingRequest{ Ledger: ledger, @@ -47,13 +51,13 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -62,15 +66,15 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -126,7 +130,11 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge // UpdateMapping - Update the mapping of a ledger func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, ledger string) (*operations.UpdateMappingResponse, error) { - hookCtx := hooks.HookContext{OperationID: "updateMapping"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "updateMapping", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.UpdateMappingRequest{ Mapping: mapping, @@ -152,13 +160,13 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -167,15 +175,15 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/orchestration.go b/orchestration.go index bbbf86d..3d5a74e 100644 --- a/orchestration.go +++ b/orchestration.go @@ -30,7 +30,11 @@ func newOrchestration(sdkConfig sdkConfiguration) *Orchestration { // CreateWorkflow - Create workflow // Create a workflow func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.CreateWorkflowRequest) (*operations.CreateWorkflowResponse, error) { - hookCtx := hooks.HookContext{OperationID: "createWorkflow"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createWorkflow", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/orchestration/flows") @@ -51,13 +55,13 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -66,15 +70,15 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -131,7 +135,11 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea // GetFlow - Get a flow by id // Get a flow by id func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations.GetFlowResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getFlow"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getFlow", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetFlowRequest{ FlowID: flowID, @@ -150,13 +158,13 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -165,15 +173,15 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -230,7 +238,11 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations // GetWorkflowOccurrence - Get a workflow occurrence by id // Get a workflow occurrence by id func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string, runID string) (*operations.GetWorkflowOccurrenceResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getWorkflowOccurrence"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getWorkflowOccurrence", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetWorkflowOccurrenceRequest{ FlowID: flowID, @@ -250,13 +262,13 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -265,15 +277,15 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -330,7 +342,11 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string // ListFlows - List registered flows // List registered flows func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listFlows"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listFlows", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/orchestration/flows") @@ -345,13 +361,13 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -360,15 +376,15 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -425,7 +441,11 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes // ListRuns - List occurrences of a workflow // List occurrences of a workflow func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operations.ListRunsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listRuns"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listRuns", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ListRunsRequest{ FlowID: flowID, @@ -444,13 +464,13 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -459,15 +479,15 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -523,7 +543,11 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation // OrchestrationgetServerInfo - Get server info func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operations.OrchestrationgetServerInfoResponse, error) { - hookCtx := hooks.HookContext{OperationID: "orchestrationgetServerInfo"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "orchestrationgetServerInfo", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/orchestration/_info") @@ -538,13 +562,13 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -553,15 +577,15 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -618,7 +642,11 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat // RunWorkflow - Run workflow // Run workflow func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestBody map[string]string, wait *bool) (*operations.RunWorkflowResponse, error) { - hookCtx := hooks.HookContext{OperationID: "runWorkflow"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "runWorkflow", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.RunWorkflowRequest{ FlowID: flowID, @@ -649,13 +677,13 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -664,15 +692,15 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/payments.go b/payments.go index e1bbf1d..0cefd01 100644 --- a/payments.go +++ b/payments.go @@ -30,7 +30,11 @@ func newPayments(sdkConfig sdkConfiguration) *Payments { // ConnectorsStripeTransfer - Transfer funds between Stripe accounts // Execute a transfer between two Stripe accounts. func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared.StripeTransferRequest) (*operations.ConnectorsStripeTransferResponse, error) { - hookCtx := hooks.HookContext{OperationID: "connectorsStripeTransfer"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "connectorsStripeTransfer", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/payments/connectors/stripe/transfer") @@ -51,13 +55,13 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -66,15 +70,15 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -119,7 +123,11 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. // GetConnectorTask - Read a specific task of the connector // Get a specific task associated to the connector. func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connector, taskID string) (*operations.GetConnectorTaskResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getConnectorTask"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getConnectorTask", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetConnectorTaskRequest{ Connector: connector, @@ -139,13 +147,13 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -154,15 +162,15 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -206,7 +214,11 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec // GetPayment - Get a payment func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operations.GetPaymentResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getPayment"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getPayment", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetPaymentRequest{ PaymentID: paymentID, @@ -225,13 +237,13 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -240,15 +252,15 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -293,7 +305,11 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation // InstallConnector - Install a connector // Install a connector by its name and config. func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared.ConnectorConfig, connector shared.Connector) (*operations.InstallConnectorResponse, error) { - hookCtx := hooks.HookContext{OperationID: "installConnector"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "installConnector", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.InstallConnectorRequest{ ConnectorConfig: connectorConfig, @@ -319,13 +335,13 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -334,15 +350,15 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -376,7 +392,11 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. // ListAllConnectors - List all installed connectors // List all installed connectors. func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllConnectorsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listAllConnectors"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listAllConnectors", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/payments/connectors") @@ -391,13 +411,13 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -406,15 +426,15 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -459,7 +479,11 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo // ListConfigsAvailableConnectors - List the configs of each available connector // List the configs of each available connector. func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operations.ListConfigsAvailableConnectorsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listConfigsAvailableConnectors"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listConfigsAvailableConnectors", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/payments/connectors/configs") @@ -474,13 +498,13 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -489,15 +513,15 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -542,7 +566,11 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati // ListConnectorTasks - List tasks from a connector // List all tasks associated with this connector. func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Connector, cursor *string, pageSize *int64) (*operations.ListConnectorTasksResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listConnectorTasks"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listConnectorTasks", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ListConnectorTasksRequest{ Connector: connector, @@ -567,13 +595,13 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -582,15 +610,15 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -634,7 +662,11 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn // ListPayments - List payments func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.ListPaymentsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listPayments"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listPayments", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ListPaymentsRequest{ Cursor: cursor, @@ -659,13 +691,13 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -674,15 +706,15 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -726,7 +758,11 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i // PaymentslistAccounts - List accounts func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pageSize *int64, sort []string) (*operations.PaymentslistAccountsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "paymentslistAccounts"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "paymentslistAccounts", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.PaymentslistAccountsRequest{ Cursor: cursor, @@ -751,13 +787,13 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -766,15 +802,15 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -819,7 +855,11 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag // ReadConnectorConfig - Read the config of a connector // Read connector config func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Connector) (*operations.ReadConnectorConfigResponse, error) { - hookCtx := hooks.HookContext{OperationID: "readConnectorConfig"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "readConnectorConfig", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ReadConnectorConfigRequest{ Connector: connector, @@ -838,13 +878,13 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -853,15 +893,15 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -907,7 +947,11 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con // Reset a connector by its name. // It will remove the connector and ALL PAYMENTS generated with it. func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connector) (*operations.ResetConnectorResponse, error) { - hookCtx := hooks.HookContext{OperationID: "resetConnector"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "resetConnector", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ResetConnectorRequest{ Connector: connector, @@ -926,13 +970,13 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -941,15 +985,15 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -983,7 +1027,11 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto // UninstallConnector - Uninstall a connector // Uninstall a connector by its name. func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Connector) (*operations.UninstallConnectorResponse, error) { - hookCtx := hooks.HookContext{OperationID: "uninstallConnector"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "uninstallConnector", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.UninstallConnectorRequest{ Connector: connector, @@ -1002,13 +1050,13 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1017,15 +1065,15 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/pkg/utils/security.go b/pkg/utils/security.go index ea1d4b2..1baf978 100644 --- a/pkg/utils/security.go +++ b/pkg/utils/security.go @@ -131,12 +131,12 @@ func parseSecurityStruct(c *securityConfig, security interface{}) { } } -func handleSecurityOption(c *securityConfig, option interface{}) error { +func handleSecurityOption(c *securityConfig, option interface{}) { optionValType := trueReflectValue(reflect.ValueOf(option)) optionStructType := optionValType.Type() if isNil(optionStructType, optionValType) { - return nil + return } for i := 0; i < optionStructType.NumField(); i++ { @@ -148,8 +148,6 @@ func handleSecurityOption(c *securityConfig, option interface{}) error { parseSecurityScheme(c, secTag, valType.Interface()) } } - - return nil } func parseSecurityScheme(client *securityConfig, schemeTag *securityTag, scheme interface{}) { @@ -206,7 +204,9 @@ func parseSecuritySchemeValue(client *securityConfig, schemeTag *securityTag, se case "openIdConnect": client.headers[secTag.Name] = prefixBearer(valToString(val)) case "oauth2": - client.headers[secTag.Name] = prefixBearer(valToString(val)) + if schemeTag.SubType != "client_credentials" { + client.headers[secTag.Name] = prefixBearer(valToString(val)) + } case "http": switch schemeTag.SubType { case "bearer": diff --git a/scopes.go b/scopes.go index 6cb2d54..786c5e0 100644 --- a/scopes.go +++ b/scopes.go @@ -30,7 +30,11 @@ func newScopes(sdkConfig sdkConfiguration) *Scopes { // AddTransientScope - Add a transient scope to a scope // Add a transient scope to a scope func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.AddTransientScopeResponse, error) { - hookCtx := hooks.HookContext{OperationID: "addTransientScope"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "addTransientScope", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.AddTransientScopeRequest{ ScopeID: scopeID, @@ -50,13 +54,13 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -65,15 +69,15 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -107,7 +111,11 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien // CreateScope - Create scope // Create scope func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeRequest) (*operations.CreateScopeResponse, error) { - hookCtx := hooks.HookContext{OperationID: "createScope"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createScope", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/auth/scopes") @@ -128,13 +136,13 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -143,15 +151,15 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -196,7 +204,11 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq // DeleteScope - Delete scope // Delete scope func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.DeleteScopeResponse, error) { - hookCtx := hooks.HookContext{OperationID: "deleteScope"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteScope", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DeleteScopeRequest{ ScopeID: scopeID, @@ -215,13 +227,13 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -230,15 +242,15 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -272,7 +284,11 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D // DeleteTransientScope - Delete a transient scope from a scope // Delete a transient scope from a scope func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, transientScopeID string) (*operations.DeleteTransientScopeResponse, error) { - hookCtx := hooks.HookContext{OperationID: "deleteTransientScope"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteTransientScope", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DeleteTransientScopeRequest{ ScopeID: scopeID, @@ -292,13 +308,13 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -307,15 +323,15 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -349,7 +365,11 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans // ListScopes - List scopes // List Scopes func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listScopes"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listScopes", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/auth/scopes") @@ -364,13 +384,13 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -379,15 +399,15 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -432,7 +452,11 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse // ReadScope - Read scope // Read scope func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.ReadScopeResponse, error) { - hookCtx := hooks.HookContext{OperationID: "readScope"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "readScope", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ReadScopeRequest{ ScopeID: scopeID, @@ -451,13 +475,13 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -466,15 +490,15 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -519,7 +543,11 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea // UpdateScope - Update scope // Update scope func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeRequest *shared.UpdateScopeRequest) (*operations.UpdateScopeResponse, error) { - hookCtx := hooks.HookContext{OperationID: "updateScope"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "updateScope", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.UpdateScopeRequest{ ScopeID: scopeID, @@ -545,13 +573,13 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -560,15 +588,15 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/script.go b/script.go index 64b7000..3350296 100644 --- a/script.go +++ b/script.go @@ -31,7 +31,11 @@ func newScript(sdkConfig sdkConfiguration) *Script { // // Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger string, preview *bool) (*operations.RunScriptResponse, error) { - hookCtx := hooks.HookContext{OperationID: "runScript"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "runScript", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.RunScriptRequest{ Script: script, @@ -62,13 +66,13 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -77,15 +81,15 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/search.go b/search.go index 606eff1..5687d1c 100644 --- a/search.go +++ b/search.go @@ -30,7 +30,11 @@ func newSearch(sdkConfig sdkConfiguration) *Search { // Search // ElasticSearch query engine func (s *Search) Search(ctx context.Context, request shared.Query) (*operations.SearchResponse, error) { - hookCtx := hooks.HookContext{OperationID: "search"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "search", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/search/") @@ -51,13 +55,13 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -66,15 +70,15 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/server.go b/server.go index d4b48c4..9101538 100644 --- a/server.go +++ b/server.go @@ -29,7 +29,11 @@ func newServer(sdkConfig sdkConfiguration) *Server { // GetInfo - Show server information func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getInfo"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getInfo", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/ledger/_info") @@ -44,13 +48,13 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -59,15 +63,15 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/stats.go b/stats.go index d501657..3b2be2a 100644 --- a/stats.go +++ b/stats.go @@ -29,7 +29,11 @@ func newStats(sdkConfig sdkConfiguration) *Stats { // ReadStats - Get statistics from a ledger // Get statistics from a ledger. (aggregate metrics on accounts and transactions) func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadStatsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "readStats"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "readStats", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ReadStatsRequest{ Ledger: ledger, @@ -48,13 +52,13 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -63,15 +67,15 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/transactions.go b/transactions.go index cde9a48..1112e1f 100644 --- a/transactions.go +++ b/transactions.go @@ -28,7 +28,11 @@ func newTransactions(sdkConfig sdkConfiguration) *Transactions { // CreateTransactions - Create a new batch of transactions to a ledger func (s *Transactions) CreateTransactions(ctx context.Context, transactions shared.Transactions, ledger string) (*operations.CreateTransactionsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "CreateTransactions"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "CreateTransactions", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.CreateTransactionsRequest{ Transactions: transactions, @@ -54,13 +58,13 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -69,15 +73,15 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -133,7 +137,11 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar // AddMetadataOnTransaction - Set the metadata of a transaction by its ID func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger string, txid int64, requestBody map[string]interface{}) (*operations.AddMetadataOnTransactionResponse, error) { - hookCtx := hooks.HookContext{OperationID: "addMetadataOnTransaction"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "addMetadataOnTransaction", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.AddMetadataOnTransactionRequest{ Ledger: ledger, @@ -160,13 +168,13 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -175,15 +183,15 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -228,7 +236,11 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri // CountTransactions - Count the transactions from a ledger func (s *Transactions) CountTransactions(ctx context.Context, request operations.CountTransactionsRequest) (*operations.CountTransactionsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "countTransactions"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "countTransactions", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) @@ -247,13 +259,13 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -262,15 +274,15 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -317,7 +329,11 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations // CreateTransaction - Create a new transaction to a ledger func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction shared.PostTransaction, ledger string, preview *bool) (*operations.CreateTransactionResponse, error) { - hookCtx := hooks.HookContext{OperationID: "createTransaction"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createTransaction", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.CreateTransactionRequest{ PostTransaction: postTransaction, @@ -348,13 +364,13 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -363,15 +379,15 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -427,7 +443,11 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh // GetTransaction - Get transaction from a ledger by its ID func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid int64) (*operations.GetTransactionResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getTransaction"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getTransaction", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetTransactionRequest{ Ledger: ledger, @@ -447,13 +467,13 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -462,15 +482,15 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -527,7 +547,11 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i // ListTransactions - List transactions from a ledger // List transactions from a ledger, sorted by txid in descending order. func (s *Transactions) ListTransactions(ctx context.Context, request operations.ListTransactionsRequest) (*operations.ListTransactionsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listTransactions"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listTransactions", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/api/ledger/{ledger}/transactions", request, nil) @@ -546,13 +570,13 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -561,15 +585,15 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -625,7 +649,11 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. // RevertTransaction - Revert a ledger transaction by its ID func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txid int64) (*operations.RevertTransactionResponse, error) { - hookCtx := hooks.HookContext{OperationID: "revertTransaction"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "revertTransaction", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.RevertTransactionRequest{ Ledger: ledger, @@ -645,13 +673,13 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -660,15 +688,15 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/users.go b/users.go index 1b55b39..bbb8303 100644 --- a/users.go +++ b/users.go @@ -30,7 +30,11 @@ func newUsers(sdkConfig sdkConfiguration) *Users { // ListUsers - List users // List users func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listUsers"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listUsers", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/auth/users") @@ -45,13 +49,13 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -60,15 +64,15 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -113,7 +117,11 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e // ReadUser - Read user // Read user func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUserResponse, error) { - hookCtx := hooks.HookContext{OperationID: "readUser"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "readUser", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ReadUserRequest{ UserID: userID, @@ -132,13 +140,13 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -147,15 +155,15 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/wallets.go b/wallets.go index 52941bf..be498a2 100644 --- a/wallets.go +++ b/wallets.go @@ -29,7 +29,11 @@ func newWallets(sdkConfig sdkConfiguration) *Wallets { // ConfirmHold - Confirm a hold func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldRequest *shared.ConfirmHoldRequest) (*operations.ConfirmHoldResponse, error) { - hookCtx := hooks.HookContext{OperationID: "confirmHold"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "confirmHold", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ConfirmHoldRequest{ HoldID: holdID, @@ -55,13 +59,13 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -70,15 +74,15 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -123,7 +127,11 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq // CreateBalance - Create a balance func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceRequest *shared.CreateBalanceRequest) (*operations.CreateBalanceResponse, error) { - hookCtx := hooks.HookContext{OperationID: "createBalance"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createBalance", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.CreateBalanceRequest{ ID: id, @@ -149,13 +157,13 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -164,15 +172,15 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -228,7 +236,11 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq // CreateWallet - Create a new wallet func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWalletRequest) (*operations.CreateWalletResponse, error) { - hookCtx := hooks.HookContext{OperationID: "createWallet"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createWallet", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/wallets/wallets") @@ -249,13 +261,13 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -264,15 +276,15 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -328,7 +340,11 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet // CreditWallet - Credit a wallet func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletRequest *shared.CreditWalletRequest) (*operations.CreditWalletResponse, error) { - hookCtx := hooks.HookContext{OperationID: "creditWallet"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "creditWallet", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.CreditWalletRequest{ ID: id, @@ -354,13 +370,13 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -369,15 +385,15 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -422,7 +438,11 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque // DebitWallet - Debit a wallet func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest *shared.DebitWalletRequest) (*operations.DebitWalletResponse, error) { - hookCtx := hooks.HookContext{OperationID: "debitWallet"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "debitWallet", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DebitWalletRequest{ ID: id, @@ -448,13 +468,13 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -463,15 +483,15 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -528,7 +548,11 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest // GetBalance - Get detailed balance func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) (*operations.GetBalanceResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getBalance"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getBalance", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetBalanceRequest{ BalanceName: balanceName, @@ -548,13 +572,13 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -563,15 +587,15 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -627,7 +651,11 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) // GetHold - Get a hold func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHoldResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getHold"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getHold", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetHoldRequest{ HoldID: holdID, @@ -646,13 +674,13 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -661,15 +689,15 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -725,7 +753,11 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo // GetHolds - Get all holds for a wallet func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operations.GetHoldsQueryParamMetadata, pageSize *int64, walletID *string) (*operations.GetHoldsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getHolds"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getHolds", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetHoldsRequest{ Cursor: cursor, @@ -751,13 +783,13 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -766,15 +798,15 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -829,7 +861,11 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat } func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize *int64, walletID *string) (*operations.GetTransactionsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getTransactions"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getTransactions", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetTransactionsRequest{ Cursor: cursor, @@ -854,13 +890,13 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -869,15 +905,15 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -933,7 +969,11 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize // GetWallet - Get a wallet func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWalletResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getWallet"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getWallet", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetWalletRequest{ ID: id, @@ -952,13 +992,13 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -967,15 +1007,15 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1033,7 +1073,11 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall // ListBalances - List balances of a wallet func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.ListBalancesResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listBalances"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listBalances", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ListBalancesRequest{ ID: id, @@ -1052,13 +1096,13 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1067,15 +1111,15 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1119,7 +1163,11 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List // ListWallets - List all wallets func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *operations.ListWalletsQueryParamMetadata, name *string, pageSize *int64) (*operations.ListWalletsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "listWallets"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "listWallets", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ListWalletsRequest{ Cursor: cursor, @@ -1145,13 +1193,13 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1160,15 +1208,15 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1212,7 +1260,11 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope // UpdateWallet - Update a wallet func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *operations.UpdateWalletRequestBody) (*operations.UpdateWalletResponse, error) { - hookCtx := hooks.HookContext{OperationID: "updateWallet"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "updateWallet", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.UpdateWalletRequest{ ID: id, @@ -1238,13 +1290,13 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1253,15 +1305,15 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1306,7 +1358,11 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper // VoidHold - Cancel a hold func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.VoidHoldResponse, error) { - hookCtx := hooks.HookContext{OperationID: "voidHold"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "voidHold", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.VoidHoldRequest{ HoldID: holdID, @@ -1325,13 +1381,13 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1340,15 +1396,15 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1393,7 +1449,11 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void // WalletsgetServerInfo - Get server info func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.WalletsgetServerInfoResponse, error) { - hookCtx := hooks.HookContext{OperationID: "walletsgetServerInfo"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "walletsgetServerInfo", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/wallets/_info") @@ -1408,13 +1468,13 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -1423,15 +1483,15 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/webhooks.go b/webhooks.go index 5b42841..f686e64 100644 --- a/webhooks.go +++ b/webhooks.go @@ -30,7 +30,11 @@ func newWebhooks(sdkConfig sdkConfiguration) *Webhooks { // ActivateConfig - Activate one config // Activate a webhooks config by ID, to start receiving webhooks to its endpoint. func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.ActivateConfigResponse, error) { - hookCtx := hooks.HookContext{OperationID: "activateConfig"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "activateConfig", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ActivateConfigRequest{ ID: id, @@ -49,13 +53,13 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -64,15 +68,15 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -121,7 +125,11 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A // If not passed or empty, a secret is automatically generated. // The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChangeSecret *shared.ConfigChangeSecret) (*operations.ChangeConfigSecretResponse, error) { - hookCtx := hooks.HookContext{OperationID: "changeConfigSecret"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "changeConfigSecret", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.ChangeConfigSecretRequest{ ID: id, @@ -147,13 +155,13 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -162,15 +170,15 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -215,7 +223,11 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan // DeactivateConfig - Deactivate one config // Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations.DeactivateConfigResponse, error) { - hookCtx := hooks.HookContext{OperationID: "deactivateConfig"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deactivateConfig", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DeactivateConfigRequest{ ID: id, @@ -234,13 +246,13 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -249,15 +261,15 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -303,7 +315,11 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations // DeleteConfig - Delete one config // Delete a webhooks config by ID. func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.DeleteConfigResponse, error) { - hookCtx := hooks.HookContext{OperationID: "deleteConfig"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteConfig", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.DeleteConfigRequest{ ID: id, @@ -322,13 +338,13 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -337,15 +353,15 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -379,7 +395,11 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del // GetManyConfigs - Get many configs // Sorted by updated date descending func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *string) (*operations.GetManyConfigsResponse, error) { - hookCtx := hooks.HookContext{OperationID: "getManyConfigs"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "getManyConfigs", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.GetManyConfigsRequest{ Endpoint: endpoint, @@ -403,13 +423,13 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str return nil, fmt.Errorf("error populating query params: %w", err) } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -418,15 +438,15 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -479,7 +499,11 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str // // All eventTypes are converted to lower-case when inserted. func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) (*operations.InsertConfigResponse, error) { - hookCtx := hooks.HookContext{OperationID: "insertConfig"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "insertConfig", + SecuritySource: s.sdkConfiguration.Security, + } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/api/webhooks/configs") @@ -500,13 +524,13 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -515,15 +539,15 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -570,7 +594,11 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) // TestConfig - Test one config // Test a config by sending a webhook to its endpoint. func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestConfigResponse, error) { - hookCtx := hooks.HookContext{OperationID: "testConfig"} + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "testConfig", + SecuritySource: s.sdkConfiguration.Security, + } request := operations.TestConfigRequest{ ID: id, @@ -589,13 +617,13 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req) + client := s.sdkConfiguration.SecurityClient + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - client := s.sdkConfiguration.SecurityClient - httpRes, err := client.Do(req) if err != nil || httpRes == nil { if err != nil { @@ -604,15 +632,15 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err) + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { - httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil) + httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes) + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } From 987c4f9085165e33395cc39b667a291491a1b3b2 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sun, 25 Feb 2024 00:31:04 +0000 Subject: [PATCH 20/32] chore: update dependencies --- go.mod | 3 +-- go.sum | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 go.sum diff --git a/go.mod b/go.mod index f772bdc..aa36632 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,5 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 ) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..f955779 --- /dev/null +++ b/go.sum @@ -0,0 +1,4 @@ +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= From 7f778c970c39133c20f83441d0b3f91e667d427a Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 27 Feb 2024 00:23:25 +0000 Subject: [PATCH 21/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.194.0 --- .speakeasy/gen.lock | 8 ++++---- RELEASES.md | 12 +++++++++++- formance.go | 6 +++--- gen.yaml | 2 +- go.mod | 3 ++- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ba6a0d9..fcab962 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.272.4 - releaseVersion: 0.9.2 - configChecksum: 36485a0713c2e24c79a09566ad21e266 + generationVersion: 2.272.7 + releaseVersion: 0.9.3 + configChecksum: 0776273b2cddecb0f59290929a846148 repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -17,7 +17,7 @@ features: core: 3.4.3 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.7 + globalSecurity: 2.82.8 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 unions: 2.85.3 diff --git a/RELEASES.md b/RELEASES.md index 6478000..13e4773 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -300,4 +300,14 @@ Based on: ### Generated - [go v0.9.2] . ### Releases -- [Go v0.9.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.2 - . \ No newline at end of file +- [Go v0.9.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.2 - . + +## 2024-02-27 00:23:13 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.194.0 (2.272.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.9.3] . +### Releases +- [Go v0.9.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.3 - . \ No newline at end of file diff --git a/formance.go b/formance.go index 4ad6aa2..695b7bf 100644 --- a/formance.go +++ b/formance.go @@ -209,9 +209,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.9.2", - GenVersion: "2.272.4", - UserAgent: "speakeasy-sdk/go 0.9.2 2.272.4 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.9.3", + GenVersion: "2.272.7", + UserAgent: "speakeasy-sdk/go 0.9.3 2.272.7 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 7a0309d..00a1eca 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 0.9.2 + version: 0.9.3 additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true diff --git a/go.mod b/go.mod index aa36632..f772bdc 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,6 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/spyzhov/ajson v0.8.0 ) From 78e592080641a36cb53ce5d947a082f5483ff695 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 27 Feb 2024 00:45:29 +0000 Subject: [PATCH 22/32] chore: update dependencies --- go.mod | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index f772bdc..aa36632 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,5 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 ) From a8186ee790148e2660652b44071b84d242a487d5 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 2 Mar 2024 00:20:49 +0000 Subject: [PATCH 23/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.200.0 --- .speakeasy/gen.lock | 10 +++++----- RELEASES.md | 12 +++++++++++- docs/sdks/payments/README.md | 6 +++--- docs/sdks/wallets/README.md | 6 +++--- formance.go | 6 +++--- gen.yaml | 2 +- go.mod | 3 ++- 7 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index fcab962..4181d4d 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,23 +4,23 @@ management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 speakeasyVersion: internal - generationVersion: 2.272.7 - releaseVersion: 0.9.3 - configChecksum: 0776273b2cddecb0f59290929a846148 + generationVersion: 2.277.0 + releaseVersion: 0.9.4 + configChecksum: bfaa51154512fbb24ca6cdaa65a8161c repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk published: true features: go: - constsAndDefaults: 0.1.3 + constsAndDefaults: 0.1.4 core: 3.4.3 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.8 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 - unions: 2.85.3 + unions: 2.85.4 generatedFiles: - clients.go - scopes.go diff --git a/RELEASES.md b/RELEASES.md index 13e4773..94ed1f9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -310,4 +310,14 @@ Based on: ### Generated - [go v0.9.3] . ### Releases -- [Go v0.9.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.3 - . \ No newline at end of file +- [Go v0.9.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.3 - . + +## 2024-03-02 00:20:37 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.200.0 (2.277.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.9.4] . +### Releases +- [Go v0.9.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.4 - . \ No newline at end of file diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 01887da..b1b7983 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -359,7 +359,7 @@ func main() { var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = formancegosdk.Int64(501686) + var pageSize *int64 = formancegosdk.Int64(15) ctx := context.Background() res, err := s.Payments.ListConnectorTasks(ctx, connector, cursor, pageSize) @@ -414,7 +414,7 @@ func main() { var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = formancegosdk.Int64(13778) + var pageSize *int64 = formancegosdk.Int64(15) sort := []string{ "", @@ -473,7 +473,7 @@ func main() { var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = formancegosdk.Int64(227071) + var pageSize *int64 = formancegosdk.Int64(15) sort := []string{ "", diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index 00a5be3..d24d4b7 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -447,7 +447,7 @@ func main() { metadata := &operations.GetHoldsQueryParamMetadata{} - var pageSize *int64 = formancegosdk.Int64(692494) + var pageSize *int64 = formancegosdk.Int64(15) var walletID *string = formancegosdk.String("") @@ -503,7 +503,7 @@ func main() { var cursor *string = formancegosdk.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==") - var pageSize *int64 = formancegosdk.Int64(680555) + var pageSize *int64 = formancegosdk.Int64(15) var walletID *string = formancegosdk.String("") @@ -667,7 +667,7 @@ func main() { var name *string = formancegosdk.String("") - var pageSize *int64 = formancegosdk.Int64(412533) + var pageSize *int64 = formancegosdk.Int64(15) ctx := context.Background() res, err := s.Wallets.ListWallets(ctx, cursor, metadata, name, pageSize) diff --git a/formance.go b/formance.go index 695b7bf..9f15958 100644 --- a/formance.go +++ b/formance.go @@ -209,9 +209,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.9.3", - GenVersion: "2.272.7", - UserAgent: "speakeasy-sdk/go 0.9.3 2.272.7 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.9.4", + GenVersion: "2.277.0", + UserAgent: "speakeasy-sdk/go 0.9.4 2.277.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 00a1eca..3be1dd0 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 0.9.3 + version: 0.9.4 additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true diff --git a/go.mod b/go.mod index aa36632..f772bdc 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,6 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/spyzhov/ajson v0.8.0 ) From 707a1b2707292093a9f3b4921485141d4b739ac7 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 2 Mar 2024 00:40:09 +0000 Subject: [PATCH 24/32] chore: update dependencies --- go.mod | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index f772bdc..aa36632 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,5 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 ) From 0314a17e8036154bbc60522c36e82e66ada7ff94 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 8 Mar 2024 00:26:53 +0000 Subject: [PATCH 25/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.204.1 --- .speakeasy/gen.lock | 11 +- README.md | 4 - RELEASES.md | 12 +- USAGE.md | 1 - accounts.go | 60 ++++---- balances.go | 34 +++-- clients.go | 119 +++++++++------ docs/sdks/accounts/README.md | 10 +- docs/sdks/balances/README.md | 2 - docs/sdks/clients/README.md | 21 +-- docs/sdks/formance/README.md | 3 - docs/sdks/ledger/README.md | 1 - docs/sdks/logs/README.md | 1 - docs/sdks/mapping/README.md | 2 - docs/sdks/orchestration/README.md | 7 - docs/sdks/payments/README.md | 21 +-- docs/sdks/scopes/README.md | 16 +- docs/sdks/script/README.md | 1 - docs/sdks/search/README.md | 1 - docs/sdks/server/README.md | 1 - docs/sdks/stats/README.md | 1 - docs/sdks/transactions/README.md | 13 +- docs/sdks/users/README.md | 2 - docs/sdks/wallets/README.md | 27 +--- docs/sdks/webhooks/README.md | 10 +- formance.go | 70 ++++----- gen.yaml | 3 +- go.mod | 3 +- ledger.go | 17 ++- logs.go | 17 ++- mapping.go | 34 +++-- orchestration.go | 119 ++++++++------- payments.go | 168 ++++++++++++--------- pkg/utils/security.go | 130 +++++++---------- scopes.go | 93 +++++++----- script.go | 15 +- search.go | 13 +- server.go | 17 ++- stats.go | 17 ++- transactions.go | 111 +++++++------- users.go | 30 ++-- wallets.go | 235 ++++++++++++++++-------------- webhooks.go | 101 ++++++++----- 43 files changed, 806 insertions(+), 768 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4181d4d..4480b67 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 884040e6-e056-469c-81c7-dc3139ef42b6 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: internal - generationVersion: 2.277.0 - releaseVersion: 0.9.4 - configChecksum: bfaa51154512fbb24ca6cdaa65a8161c + speakeasyVersion: 1.204.1 + generationVersion: 2.279.1 + releaseVersion: 0.10.0 + configChecksum: f8ef15934a669b82079120ba2241cfc4 repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -14,12 +14,13 @@ management: features: go: constsAndDefaults: 0.1.4 - core: 3.4.3 + core: 3.4.4 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.8 globalServerURLs: 2.82.1 nameOverrides: 2.81.1 + responseFormat: 0.1.0 unions: 2.85.4 generatedFiles: - clients.go diff --git a/README.md b/README.md index b3cd688..edadfdc 100755 --- a/README.md +++ b/README.md @@ -45,7 +45,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } @@ -279,7 +278,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } @@ -316,7 +314,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } @@ -397,7 +394,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } diff --git a/RELEASES.md b/RELEASES.md index 94ed1f9..7935e62 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -320,4 +320,14 @@ Based on: ### Generated - [go v0.9.4] . ### Releases -- [Go v0.9.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.4 - . \ No newline at end of file +- [Go v0.9.4] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.9.4 - . + +## 2024-03-08 00:26:41 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.204.1 (2.279.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.10.0] . +### Releases +- [Go v0.10.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 49106f8..4e75942 100644 --- a/USAGE.md +++ b/USAGE.md @@ -19,7 +19,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } diff --git a/accounts.go b/accounts.go index 389f121..b9c88f8 100644 --- a/accounts.go +++ b/accounts.go @@ -59,14 +59,16 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -87,11 +89,10 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddMetadataToAccountResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -110,7 +111,7 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -118,7 +119,7 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -156,14 +157,16 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -184,11 +187,10 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CountAccountsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -209,7 +211,7 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -217,7 +219,7 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -250,14 +252,16 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -278,11 +282,10 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetAccountResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -296,7 +299,7 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.AccountResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -304,7 +307,7 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string res.AccountResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -312,7 +315,7 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -320,7 +323,7 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -353,14 +356,16 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -381,11 +386,10 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListAccountsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -399,7 +403,7 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.AccountsCursorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -407,7 +411,7 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco res.AccountsCursorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -415,7 +419,7 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -423,7 +427,7 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/balances.go b/balances.go index 5002dce..0999679 100644 --- a/balances.go +++ b/balances.go @@ -51,14 +51,16 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -79,11 +81,10 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetBalancesResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -97,7 +98,7 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.BalancesCursorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -105,7 +106,7 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc res.BalancesCursorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -113,7 +114,7 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -121,7 +122,7 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -158,14 +159,16 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -186,11 +189,10 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetBalancesAggregatedResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -204,7 +206,7 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.AggregateBalancesResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -212,7 +214,7 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add res.AggregateBalancesResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -220,7 +222,7 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -228,7 +230,7 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/clients.go b/clients.go index 5740364..46cbbc6 100644 --- a/clients.go +++ b/clients.go @@ -53,14 +53,16 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -81,11 +83,10 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddScopeToClientResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -102,6 +103,8 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -134,14 +137,16 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -162,11 +167,10 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateClientResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -180,7 +184,7 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient switch { case httpRes.StatusCode == 201: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.CreateClientResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -188,12 +192,14 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient res.CreateClientResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -231,14 +237,16 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -259,11 +267,10 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateSecretResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -277,7 +284,7 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.CreateSecretResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -285,12 +292,14 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre res.CreateSecretResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -321,14 +330,16 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -349,11 +360,10 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteClientResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -370,6 +380,8 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -401,14 +413,16 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -429,11 +443,10 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteScopeFromClientResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -450,6 +463,8 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -481,14 +496,16 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -509,11 +526,10 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteSecretResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -530,6 +546,8 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -556,14 +574,16 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -584,11 +604,10 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListClientsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -602,7 +621,7 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ListClientsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -610,12 +629,14 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo res.ListClientsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -646,14 +667,16 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -674,11 +697,10 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadClientResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -692,7 +714,7 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ReadClientResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -700,12 +722,14 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. res.ReadClientResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -743,14 +767,16 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -771,11 +797,10 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateClientResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -789,7 +814,7 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.UpdateClientResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -797,12 +822,14 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien res.UpdateClientResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/docs/sdks/accounts/README.md b/docs/sdks/accounts/README.md index 0ff5aa0..2f2b797 100644 --- a/docs/sdks/accounts/README.md +++ b/docs/sdks/accounts/README.md @@ -26,7 +26,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -49,8 +48,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -88,7 +86,6 @@ import( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "context" "log" - "net/http" ) func main() { @@ -108,8 +105,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -163,7 +159,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.AccountResponse != nil { // handle response } @@ -222,7 +217,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.AccountsCursorResponse != nil { // handle response } diff --git a/docs/sdks/balances/README.md b/docs/sdks/balances/README.md index d8dcb00..582dad7 100644 --- a/docs/sdks/balances/README.md +++ b/docs/sdks/balances/README.md @@ -43,7 +43,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.BalancesCursorResponse != nil { // handle response } @@ -96,7 +95,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.AggregateBalancesResponse != nil { // handle response } diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 951af12..48781fa 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -31,7 +31,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -49,8 +48,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -100,7 +98,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.CreateClientResponse != nil { // handle response } @@ -155,7 +152,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.CreateSecretResponse != nil { // handle response } @@ -192,7 +188,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -208,8 +203,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -244,7 +238,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -262,8 +255,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -299,7 +291,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -317,8 +308,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -366,7 +356,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ListClientsResponse != nil { // handle response } @@ -416,7 +405,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ReadClientResponse != nil { // handle response } @@ -471,7 +459,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.UpdateClientResponse != nil { // handle response } diff --git a/docs/sdks/formance/README.md b/docs/sdks/formance/README.md index 9277b20..17a32c6 100644 --- a/docs/sdks/formance/README.md +++ b/docs/sdks/formance/README.md @@ -48,7 +48,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } @@ -95,7 +94,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } @@ -142,7 +140,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index 0991c18..fccf16c 100644 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -38,7 +38,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.LedgerInfoResponse != nil { // handle response } diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md index 11bab1d..cc7f413 100644 --- a/docs/sdks/logs/README.md +++ b/docs/sdks/logs/README.md @@ -41,7 +41,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.LogsCursorResponse != nil { // handle response } diff --git a/docs/sdks/mapping/README.md b/docs/sdks/mapping/README.md index bad716d..caaf9d0 100644 --- a/docs/sdks/mapping/README.md +++ b/docs/sdks/mapping/README.md @@ -39,7 +39,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.MappingResponse != nil { // handle response } @@ -99,7 +98,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.MappingResponse != nil { // handle response } diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 4ea826f..cf27951 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -47,7 +47,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.CreateWorkflowResponse != nil { // handle response } @@ -98,7 +97,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.GetWorkflowResponse != nil { // handle response } @@ -151,7 +149,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.GetWorkflowOccurrenceResponse != nil { // handle response } @@ -200,7 +197,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ListWorkflowsResponse != nil { // handle response } @@ -250,7 +246,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ListRunsResponse != nil { // handle response } @@ -298,7 +293,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } @@ -354,7 +348,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.RunWorkflowResponse != nil { // handle response } diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index b1b7983..96358c0 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -51,7 +51,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.StripeTransferResponse != nil { // handle response } @@ -104,7 +103,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.TaskResponse != nil { // handle response } @@ -156,7 +154,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.PaymentResponse != nil { // handle response } @@ -192,7 +189,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -216,8 +212,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -265,7 +260,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConnectorsResponse != nil { // handle response } @@ -312,7 +306,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConnectorsConfigsResponse != nil { // handle response } @@ -366,7 +359,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.TasksCursor != nil { // handle response } @@ -425,7 +417,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.PaymentsCursor != nil { // handle response } @@ -484,7 +475,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.AccountsCursor != nil { // handle response } @@ -537,7 +527,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConnectorConfigResponse != nil { // handle response } @@ -575,7 +564,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -591,8 +579,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -627,7 +614,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -643,8 +629,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } diff --git a/docs/sdks/scopes/README.md b/docs/sdks/scopes/README.md index bbbb296..034a21a 100644 --- a/docs/sdks/scopes/README.md +++ b/docs/sdks/scopes/README.md @@ -29,7 +29,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -47,8 +46,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -98,7 +96,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.CreateScopeResponse != nil { // handle response } @@ -134,7 +131,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -150,8 +146,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -186,7 +181,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -204,8 +198,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -253,7 +246,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ListScopesResponse != nil { // handle response } @@ -303,7 +295,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ReadScopeResponse != nil { // handle response } @@ -358,7 +349,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.UpdateScopeResponse != nil { // handle response } diff --git a/docs/sdks/script/README.md b/docs/sdks/script/README.md index 5616d48..df606f8 100644 --- a/docs/sdks/script/README.md +++ b/docs/sdks/script/README.md @@ -60,7 +60,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ScriptResponse != nil { // handle response } diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 8108037..c15c4fa 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -39,7 +39,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.Response != nil { // handle response } diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index a3b855d..b3301bc 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -35,7 +35,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConfigInfoResponse != nil { // handle response } diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index d02d28e..4ed8525 100644 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -39,7 +39,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.StatsResponse != nil { // handle response } diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 5734e7c..b48d1fb 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -64,7 +64,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.TransactionsResponse != nil { // handle response } @@ -101,7 +100,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -124,8 +122,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -163,7 +160,6 @@ import( "context" "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "log" - "net/http" ) func main() { @@ -182,8 +178,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -243,7 +238,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.TransactionsResponse != nil { // handle response } @@ -298,7 +292,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.TransactionResponse != nil { // handle response } @@ -357,7 +350,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.TransactionsCursorResponse != nil { // handle response } @@ -410,7 +402,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.TransactionResponse != nil { // handle response } diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 61d0fcc..5f1160c 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -36,7 +36,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ListUsersResponse != nil { // handle response } @@ -86,7 +85,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ReadUserResponse != nil { // handle response } diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index d24d4b7..be37845 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -37,7 +37,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -58,8 +57,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -114,7 +112,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.CreateBalanceResponse != nil { // handle response } @@ -165,7 +162,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.CreateWalletResponse != nil { // handle response } @@ -201,7 +197,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -232,8 +227,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -292,7 +286,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.DebitWalletResponse != nil { // handle response } @@ -346,7 +339,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.GetBalanceResponse != nil { // handle response } @@ -398,7 +390,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.GetHoldResponse != nil { // handle response } @@ -456,7 +447,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.GetHoldsResponse != nil { // handle response } @@ -512,7 +502,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.GetTransactionsResponse != nil { // handle response } @@ -565,7 +554,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.GetWalletResponse != nil { // handle response } @@ -616,7 +604,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ListBalancesResponse != nil { // handle response } @@ -674,7 +661,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ListWalletsResponse != nil { // handle response } @@ -714,7 +700,6 @@ import( "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations" "context" "log" - "net/http" ) func main() { @@ -732,8 +717,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -769,7 +753,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -785,8 +768,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -833,7 +815,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ServerInfo != nil { // handle response } diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 0b89785..a7acf58 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -44,7 +44,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConfigResponse != nil { // handle response } @@ -103,7 +102,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConfigResponse != nil { // handle response } @@ -155,7 +153,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConfigResponse != nil { // handle response } @@ -191,7 +188,6 @@ import( formancegosdk "github.com/speakeasy-sdks/formance-go-sdk" "context" "log" - "net/http" ) func main() { @@ -207,8 +203,7 @@ func main() { if err != nil { log.Fatal(err) } - - if res.StatusCode == http.StatusOK { + if res != nil { // handle response } } @@ -260,7 +255,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConfigsResponse != nil { // handle response } @@ -325,7 +319,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.ConfigResponse != nil { // handle response } @@ -376,7 +369,6 @@ func main() { if err != nil { log.Fatal(err) } - if res.AttemptResponse != nil { // handle response } diff --git a/formance.go b/formance.go index 9f15958..f8054bd 100644 --- a/formance.go +++ b/formance.go @@ -49,8 +49,7 @@ func Float32(f float32) *float32 { return &f } func Float64(f float64) *float64 { return &f } type sdkConfiguration struct { - DefaultClient HTTPClient - SecurityClient HTTPClient + Client HTTPClient Security func(context.Context) (interface{}, error) ServerURL string ServerIndex int @@ -170,7 +169,7 @@ func WithOrganization(organization string) SDKOption { // WithClient allows the overriding of the default HTTP client used by the SDK func WithClient(client HTTPClient) SDKOption { return func(sdk *Formance) { - sdk.sdkConfiguration.DefaultClient = client + sdk.sdkConfiguration.Client = client } } @@ -209,9 +208,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.9.4", - GenVersion: "2.277.0", - UserAgent: "speakeasy-sdk/go 0.9.4 2.277.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.10.0", + GenVersion: "2.279.1", + UserAgent: "speakeasy-sdk/go 0.10.0 2.279.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { @@ -226,25 +225,17 @@ func New(opts ...SDKOption) *Formance { } // Use WithClient to override the default client if you would like to customize the timeout - if sdk.sdkConfiguration.DefaultClient == nil { - sdk.sdkConfiguration.DefaultClient = &http.Client{Timeout: 60 * time.Second} + if sdk.sdkConfiguration.Client == nil { + sdk.sdkConfiguration.Client = &http.Client{Timeout: 60 * time.Second} } currentServerURL, _ := sdk.sdkConfiguration.GetServerDetails() serverURL := currentServerURL - serverURL, sdk.sdkConfiguration.DefaultClient = sdk.sdkConfiguration.Hooks.SDKInit(currentServerURL, sdk.sdkConfiguration.DefaultClient) + serverURL, sdk.sdkConfiguration.Client = sdk.sdkConfiguration.Hooks.SDKInit(currentServerURL, sdk.sdkConfiguration.Client) if serverURL != currentServerURL { sdk.sdkConfiguration.ServerURL = serverURL } - if sdk.sdkConfiguration.SecurityClient == nil { - if sdk.sdkConfiguration.Security != nil { - sdk.sdkConfiguration.SecurityClient = utils.ConfigureSecurityClient(sdk.sdkConfiguration.DefaultClient, sdk.sdkConfiguration.Security) - } else { - sdk.sdkConfiguration.SecurityClient = sdk.sdkConfiguration.DefaultClient - } - } - sdk.Clients = newClients(sdk.sdkConfiguration) sdk.Scopes = newScopes(sdk.sdkConfiguration) @@ -303,14 +294,16 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -331,11 +324,10 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetServerInfoResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -349,7 +341,7 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ServerInfo if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -357,12 +349,14 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo res.ServerInfo = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -389,14 +383,16 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -417,11 +413,10 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.PaymentsgetServerInfoResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -435,7 +430,7 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ServerInfo if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -443,12 +438,14 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme res.ServerInfo = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -475,14 +472,16 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -503,11 +502,10 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.SearchgetServerInfoResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -521,7 +519,7 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ServerInfo if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -529,12 +527,14 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg res.ServerInfo = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/gen.yaml b/gen.yaml index 3be1dd0..56170bf 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 0.9.4 + version: 0.10.0 additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true @@ -26,3 +26,4 @@ go: maxMethodParams: 4 outputModelSuffix: output packageName: github.com/speakeasy-sdks/formance-go-sdk + responseFormat: envelope diff --git a/go.mod b/go.mod index aa36632..f772bdc 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,6 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/spyzhov/ajson v0.8.0 ) diff --git a/ledger.go b/ledger.go index 6c8f41d..87d86be 100644 --- a/ledger.go +++ b/ledger.go @@ -51,14 +51,16 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -79,11 +81,10 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetLedgerInfoResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -97,7 +98,7 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.LedgerInfoResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -105,7 +106,7 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. res.LedgerInfoResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -113,7 +114,7 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -121,7 +122,7 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/logs.go b/logs.go index adf94f8..1a0348e 100644 --- a/logs.go +++ b/logs.go @@ -52,14 +52,16 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -80,11 +82,10 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListLogsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -98,7 +99,7 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.LogsCursorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -106,7 +107,7 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) res.LogsCursorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -114,7 +115,7 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -122,7 +123,7 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/mapping.go b/mapping.go index e516de8..1dd660a 100644 --- a/mapping.go +++ b/mapping.go @@ -51,14 +51,16 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -79,11 +81,10 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetMappingResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -97,7 +98,7 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.MappingResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -105,7 +106,7 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge res.MappingResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -113,7 +114,7 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -121,7 +122,7 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -160,14 +161,16 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -188,11 +191,10 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateMappingResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -206,7 +208,7 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.MappingResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -214,7 +216,7 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le res.MappingResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -222,7 +224,7 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -230,7 +232,7 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/orchestration.go b/orchestration.go index 3d5a74e..d650a22 100644 --- a/orchestration.go +++ b/orchestration.go @@ -55,14 +55,16 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -83,11 +85,10 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateWorkflowResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -101,7 +102,7 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea switch { case httpRes.StatusCode == 201: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.CreateWorkflowResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -109,7 +110,7 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea res.CreateWorkflowResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -117,7 +118,7 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Error if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -125,7 +126,7 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea res.Error = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -158,14 +159,16 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -186,11 +189,10 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetFlowResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -204,7 +206,7 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.GetWorkflowResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -212,7 +214,7 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations res.GetWorkflowResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -220,7 +222,7 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Error if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -228,7 +230,7 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations res.Error = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -262,14 +264,16 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -290,11 +294,10 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetWorkflowOccurrenceResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -308,7 +311,7 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.GetWorkflowOccurrenceResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -316,7 +319,7 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string res.GetWorkflowOccurrenceResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -324,7 +327,7 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Error if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -332,7 +335,7 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string res.Error = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -361,14 +364,16 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -389,11 +394,10 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListFlowsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -407,7 +411,7 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ListWorkflowsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -415,7 +419,7 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes res.ListWorkflowsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -423,7 +427,7 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Error if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -431,7 +435,7 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes res.Error = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -464,14 +468,16 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -492,11 +498,10 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListRunsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -510,7 +515,7 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ListRunsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -518,7 +523,7 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation res.ListRunsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -526,7 +531,7 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Error if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -534,7 +539,7 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation res.Error = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -562,14 +567,16 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -590,11 +597,10 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.OrchestrationgetServerInfoResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -608,7 +614,7 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ServerInfo if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -616,7 +622,7 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat res.ServerInfo = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -624,7 +630,7 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Error if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -632,7 +638,7 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat res.Error = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -677,14 +683,16 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -705,11 +713,10 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.RunWorkflowResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -723,7 +730,7 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB switch { case httpRes.StatusCode == 201: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.RunWorkflowResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -731,7 +738,7 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB res.RunWorkflowResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -739,7 +746,7 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Error if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -747,7 +754,7 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB res.Error = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/payments.go b/payments.go index 0cefd01..1d4ec37 100644 --- a/payments.go +++ b/payments.go @@ -55,14 +55,16 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -83,11 +85,10 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ConnectorsStripeTransferResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -101,7 +102,7 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.StripeTransferResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -109,12 +110,14 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. res.StripeTransferResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -147,14 +150,16 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -175,11 +180,10 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetConnectorTaskResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -193,7 +197,7 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.TaskResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -201,12 +205,14 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec res.TaskResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -237,14 +243,16 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -265,11 +273,10 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetPaymentResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -283,7 +290,7 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.PaymentResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -291,12 +298,14 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation res.PaymentResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -335,14 +344,16 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -363,11 +374,10 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.InstallConnectorResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -384,6 +394,8 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -411,14 +423,16 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -439,11 +453,10 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListAllConnectorsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -457,7 +470,7 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConnectorsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -465,12 +478,14 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo res.ConnectorsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -498,14 +513,16 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -526,11 +543,10 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListConfigsAvailableConnectorsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -544,7 +560,7 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConnectorsConfigsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -552,12 +568,14 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati res.ConnectorsConfigsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -595,14 +613,16 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -623,11 +643,10 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListConnectorTasksResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -641,7 +660,7 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.TasksCursor if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -649,12 +668,14 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn res.TasksCursor = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -691,14 +712,16 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -719,11 +742,10 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListPaymentsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -737,7 +759,7 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.PaymentsCursor if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -745,12 +767,14 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i res.PaymentsCursor = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -787,14 +811,16 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -815,11 +841,10 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.PaymentslistAccountsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -833,7 +858,7 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.AccountsCursor if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -841,12 +866,14 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag res.AccountsCursor = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -878,14 +905,16 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -906,11 +935,10 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadConnectorConfigResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -924,7 +952,7 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConnectorConfigResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -932,12 +960,14 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con res.ConnectorConfigResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -970,14 +1000,16 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -998,11 +1030,10 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ResetConnectorResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1019,6 +1050,8 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -1050,14 +1083,16 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -1078,11 +1113,10 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UninstallConnectorResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1099,6 +1133,8 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/pkg/utils/security.go b/pkg/utils/security.go index 1baf978..8023225 100644 --- a/pkg/utils/security.go +++ b/pkg/utils/security.go @@ -11,10 +11,6 @@ import ( "strings" ) -type HTTPClient interface { - Do(req *http.Request) (*http.Response, error) -} - const ( securityTagKey = "security" ) @@ -27,73 +23,24 @@ type securityTag struct { SubType string } -type securityConfig struct { - headers map[string]string - queryParams map[string]string -} - -type SecurityClient struct { - HTTPClient - security func(ctx context.Context) (interface{}, error) -} - -func newSecurityClient(client HTTPClient, security func(ctx context.Context) (interface{}, error)) *SecurityClient { - return &SecurityClient{ - HTTPClient: client, - security: security, +func PopulateSecurity(ctx context.Context, req *http.Request, securitySource func(context.Context) (interface{}, error)) error { + if securitySource == nil { + return nil } -} -func (c *SecurityClient) Do(req *http.Request) (*http.Response, error) { - securityCtx, err := c.security(req.Context()) + security, err := securitySource(ctx) if err != nil { - return nil, err - } - - ctx := securityConfig{ - headers: make(map[string]string), - queryParams: make(map[string]string), - } - parseSecurityStruct(&ctx, securityCtx) - - for k, v := range ctx.headers { - req.Header.Set(k, v) - } - - queryParams := req.URL.Query() - - for k, v := range ctx.queryParams { - queryParams.Add(k, v) + return err } - req.URL.RawQuery = queryParams.Encode() - - return c.HTTPClient.Do(req) -} - -func ConfigureSecurityClient(c HTTPClient, security func(ctx context.Context) (interface{}, error)) *SecurityClient { - return newSecurityClient(c, security) -} - -func trueReflectValue(val reflect.Value) reflect.Value { - kind := val.Type().Kind() - for kind == reflect.Interface || kind == reflect.Ptr { - innerVal := val.Elem() - if !innerVal.IsValid() { - break - } - val = innerVal - kind = val.Type().Kind() - } - return val -} + headers := make(map[string]string) + queryParams := make(map[string]string) -func parseSecurityStruct(c *securityConfig, security interface{}) { securityValType := trueReflectValue(reflect.ValueOf(security)) securityStructType := securityValType.Type() if isNil(securityStructType, securityValType) { - return + return nil } if securityStructType.Kind() == reflect.Ptr { @@ -118,20 +65,32 @@ func parseSecurityStruct(c *securityConfig, security interface{}) { secTag := parseSecurityTag(fieldType) if secTag != nil { if secTag.Option { - handleSecurityOption(c, valType.Interface()) + handleSecurityOption(headers, queryParams, valType.Interface()) } else if secTag.Scheme { // Special case for basic auth which could be a flattened struct if secTag.SubType == "basic" && kind != reflect.Struct { - parseSecurityScheme(c, secTag, security) + parseSecurityScheme(headers, queryParams, secTag, security) } else { - parseSecurityScheme(c, secTag, valType.Interface()) + parseSecurityScheme(headers, queryParams, secTag, valType.Interface()) } } } } + + for key, value := range headers { + req.Header.Add(key, value) + } + + query := req.URL.Query() + for key, value := range queryParams { + query.Add(key, value) + } + req.URL.RawQuery = query.Encode() + + return nil } -func handleSecurityOption(c *securityConfig, option interface{}) { +func handleSecurityOption(headers, queryParams map[string]string, option interface{}) { optionValType := trueReflectValue(reflect.ValueOf(option)) optionStructType := optionValType.Type() @@ -145,12 +104,12 @@ func handleSecurityOption(c *securityConfig, option interface{}) { secTag := parseSecurityTag(fieldType) if secTag != nil && secTag.Scheme { - parseSecurityScheme(c, secTag, valType.Interface()) + parseSecurityScheme(headers, queryParams, secTag, valType.Interface()) } } } -func parseSecurityScheme(client *securityConfig, schemeTag *securityTag, scheme interface{}) { +func parseSecurityScheme(headers, queryParams map[string]string, schemeTag *securityTag, scheme interface{}) { schemeVal := trueReflectValue(reflect.ValueOf(scheme)) schemeType := schemeVal.Type() @@ -160,7 +119,7 @@ func parseSecurityScheme(client *securityConfig, schemeTag *securityTag, scheme if schemeType.Kind() == reflect.Struct { if schemeTag.Type == "http" && schemeTag.SubType == "basic" { - handleBasicAuthScheme(client, schemeVal.Interface()) + handleBasicAuthScheme(headers, schemeVal.Interface()) return } @@ -181,36 +140,36 @@ func parseSecurityScheme(client *securityConfig, schemeTag *securityTag, scheme return } - parseSecuritySchemeValue(client, schemeTag, secTag, valType.Interface()) + parseSecuritySchemeValue(headers, queryParams, schemeTag, secTag, valType.Interface()) } } else { - parseSecuritySchemeValue(client, schemeTag, schemeTag, schemeVal.Interface()) + parseSecuritySchemeValue(headers, queryParams, schemeTag, schemeTag, schemeVal.Interface()) } } -func parseSecuritySchemeValue(client *securityConfig, schemeTag *securityTag, secTag *securityTag, val interface{}) { +func parseSecuritySchemeValue(headers, queryParams map[string]string, schemeTag *securityTag, secTag *securityTag, val interface{}) { switch schemeTag.Type { case "apiKey": switch schemeTag.SubType { case "header": - client.headers[secTag.Name] = valToString(val) + headers[secTag.Name] = valToString(val) case "query": - client.queryParams[secTag.Name] = valToString(val) + queryParams[secTag.Name] = valToString(val) case "cookie": - client.headers["Cookie"] = fmt.Sprintf("%s=%s", secTag.Name, valToString(val)) + headers["Cookie"] = fmt.Sprintf("%s=%s", secTag.Name, valToString(val)) default: panic("not supported") } case "openIdConnect": - client.headers[secTag.Name] = prefixBearer(valToString(val)) + headers[secTag.Name] = prefixBearer(valToString(val)) case "oauth2": if schemeTag.SubType != "client_credentials" { - client.headers[secTag.Name] = prefixBearer(valToString(val)) + headers[secTag.Name] = prefixBearer(valToString(val)) } case "http": switch schemeTag.SubType { case "bearer": - client.headers[secTag.Name] = prefixBearer(valToString(val)) + headers[secTag.Name] = prefixBearer(valToString(val)) default: panic("not supported") } @@ -227,7 +186,7 @@ func prefixBearer(authHeaderValue string) string { return fmt.Sprintf("Bearer %s", authHeaderValue) } -func handleBasicAuthScheme(client *securityConfig, scheme interface{}) { +func handleBasicAuthScheme(headers map[string]string, scheme interface{}) { schemeStructType := reflect.TypeOf(scheme) schemeValType := reflect.ValueOf(scheme) @@ -250,7 +209,7 @@ func handleBasicAuthScheme(client *securityConfig, scheme interface{}) { } } - client.headers["Authorization"] = fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", username, password)))) + headers["Authorization"] = fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", username, password)))) } func parseSecurityTag(field reflect.StructField) *securityTag { @@ -296,3 +255,16 @@ func parseSecurityTag(field reflect.StructField) *securityTag { SubType: securitySubType, } } + +func trueReflectValue(val reflect.Value) reflect.Value { + kind := val.Type().Kind() + for kind == reflect.Interface || kind == reflect.Ptr { + innerVal := val.Elem() + if !innerVal.IsValid() { + break + } + val = innerVal + kind = val.Type().Kind() + } + return val +} diff --git a/scopes.go b/scopes.go index 786c5e0..d0c45fd 100644 --- a/scopes.go +++ b/scopes.go @@ -54,14 +54,16 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -82,11 +84,10 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddTransientScopeResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -103,6 +104,8 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -136,14 +139,16 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -164,11 +169,10 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateScopeResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -182,7 +186,7 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq switch { case httpRes.StatusCode == 201: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.CreateScopeResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -190,12 +194,14 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq res.CreateScopeResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -227,14 +233,16 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -255,11 +263,10 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteScopeResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -276,6 +283,8 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -308,14 +317,16 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -336,11 +347,10 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteTransientScopeResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -357,6 +367,8 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -384,14 +396,16 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -412,11 +426,10 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListScopesResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -430,7 +443,7 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ListScopesResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -438,12 +451,14 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse res.ListScopesResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -475,14 +490,16 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -503,11 +520,10 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadScopeResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -521,7 +537,7 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ReadScopeResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -529,12 +545,14 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea res.ReadScopeResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -573,14 +591,16 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -601,11 +621,10 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateScopeResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -619,7 +638,7 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.UpdateScopeResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -627,12 +646,14 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq res.UpdateScopeResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/script.go b/script.go index 3350296..1acde54 100644 --- a/script.go +++ b/script.go @@ -66,14 +66,16 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -94,11 +96,10 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.RunScriptResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -112,7 +113,7 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ScriptResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -120,12 +121,14 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str res.ScriptResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/search.go b/search.go index 5687d1c..d0166b6 100644 --- a/search.go +++ b/search.go @@ -55,14 +55,16 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -83,11 +85,10 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.SearchResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -101,7 +102,7 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.Response if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -109,7 +110,7 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. res.Response = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough diff --git a/server.go b/server.go index 9101538..3eecb64 100644 --- a/server.go +++ b/server.go @@ -48,14 +48,16 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -76,11 +78,10 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetInfoResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -94,7 +95,7 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConfigInfoResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -102,7 +103,7 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro res.ConfigInfoResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -110,7 +111,7 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -118,7 +119,7 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/stats.go b/stats.go index 3b2be2a..53eec9e 100644 --- a/stats.go +++ b/stats.go @@ -52,14 +52,16 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -80,11 +82,10 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadStatsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -98,7 +99,7 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.StatsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -106,7 +107,7 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS res.StatsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -114,7 +115,7 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -122,7 +123,7 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/transactions.go b/transactions.go index 1112e1f..c90cbfb 100644 --- a/transactions.go +++ b/transactions.go @@ -58,14 +58,16 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -86,11 +88,10 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateTransactionsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -104,7 +105,7 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.TransactionsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -112,7 +113,7 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar res.TransactionsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -120,7 +121,7 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -128,7 +129,7 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -168,14 +169,16 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -196,11 +199,10 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.AddMetadataOnTransactionResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -219,7 +221,7 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -227,7 +229,7 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -259,14 +261,16 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -287,11 +291,10 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CountTransactionsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -312,7 +315,7 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -320,7 +323,7 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -364,14 +367,16 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -392,11 +397,10 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateTransactionResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -410,7 +414,7 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.TransactionsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -418,7 +422,7 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh res.TransactionsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -426,7 +430,7 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -434,7 +438,7 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -467,14 +471,16 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -495,11 +501,10 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetTransactionResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -513,7 +518,7 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.TransactionResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -521,7 +526,7 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i res.TransactionResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -529,7 +534,7 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -537,7 +542,7 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -570,14 +575,16 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -598,11 +605,10 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListTransactionsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -616,7 +622,7 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.TransactionsCursorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -624,7 +630,7 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. res.TransactionsCursorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -632,7 +638,7 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -640,7 +646,7 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -673,14 +679,16 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -701,11 +709,10 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.RevertTransactionResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -719,7 +726,7 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.TransactionResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -727,7 +734,7 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi res.TransactionResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -735,7 +742,7 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -743,7 +750,7 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi res.ErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/users.go b/users.go index bbb8303..12164f4 100644 --- a/users.go +++ b/users.go @@ -49,14 +49,16 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -77,11 +79,10 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListUsersResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -95,7 +96,7 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ListUsersResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -103,12 +104,14 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e res.ListUsersResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -140,14 +143,16 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -168,11 +173,10 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ReadUserResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -186,7 +190,7 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ReadUserResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -194,12 +198,14 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs res.ReadUserResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil diff --git a/wallets.go b/wallets.go index be498a2..e42bf69 100644 --- a/wallets.go +++ b/wallets.go @@ -59,14 +59,16 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -87,11 +89,10 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ConfirmHoldResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -110,7 +111,7 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -118,7 +119,7 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -157,14 +158,16 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -185,11 +188,10 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateBalanceResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -203,7 +205,7 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq switch { case httpRes.StatusCode == 201: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.CreateBalanceResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -211,7 +213,7 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq res.CreateBalanceResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -219,7 +221,7 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -227,7 +229,7 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -261,14 +263,16 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -289,11 +293,10 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreateWalletResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -307,7 +310,7 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet switch { case httpRes.StatusCode == 201: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.CreateWalletResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -315,7 +318,7 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet res.CreateWalletResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -323,7 +326,7 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -331,7 +334,7 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -370,14 +373,16 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -398,11 +403,10 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.CreditWalletResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -421,7 +425,7 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -429,7 +433,7 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -468,14 +472,16 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -496,11 +502,10 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DebitWalletResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -514,7 +519,7 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.DebitWalletResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -522,7 +527,7 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest res.DebitWalletResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 204: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: @@ -531,7 +536,7 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -539,7 +544,7 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -572,14 +577,16 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -600,11 +607,10 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetBalanceResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -618,7 +624,7 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.GetBalanceResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -626,7 +632,7 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) res.GetBalanceResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -634,7 +640,7 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -642,7 +648,7 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -674,14 +680,16 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -702,11 +710,10 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetHoldResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -720,7 +727,7 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.GetHoldResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -728,7 +735,7 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo res.GetHoldResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -736,7 +743,7 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -744,7 +751,7 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -783,14 +790,16 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -811,11 +820,10 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetHoldsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -829,7 +837,7 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.GetHoldsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -837,7 +845,7 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat res.GetHoldsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -845,7 +853,7 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -853,7 +861,7 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -890,14 +898,16 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -918,11 +928,10 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetTransactionsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -936,7 +945,7 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.GetTransactionsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -944,7 +953,7 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize res.GetTransactionsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -952,7 +961,7 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -960,7 +969,7 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -992,14 +1001,16 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -1020,11 +1031,10 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetWalletResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1038,7 +1048,7 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.GetWalletResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1046,7 +1056,7 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall res.GetWalletResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 404: fallthrough @@ -1056,7 +1066,7 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1064,7 +1074,7 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -1096,14 +1106,16 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -1124,11 +1136,10 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListBalancesResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1142,7 +1153,7 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ListBalancesResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1150,12 +1161,14 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List res.ListBalancesResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -1193,14 +1206,16 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -1221,11 +1236,10 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ListWalletsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1239,7 +1253,7 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ListWalletsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1247,12 +1261,14 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope res.ListWalletsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -1290,14 +1306,16 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -1318,11 +1336,10 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.UpdateWalletResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1341,7 +1358,7 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1349,7 +1366,7 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -1381,14 +1398,16 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -1409,11 +1428,10 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.VoidHoldResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1432,7 +1450,7 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1440,7 +1458,7 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } @@ -1468,14 +1486,16 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -1496,11 +1516,10 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.WalletsgetServerInfoResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -1514,7 +1533,7 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ServerInfo if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1522,7 +1541,7 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets res.ServerInfo = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough @@ -1530,7 +1549,7 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) default: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.WalletsErrorResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -1538,7 +1557,7 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets res.WalletsErrorResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } } diff --git a/webhooks.go b/webhooks.go index f686e64..47bd8bb 100644 --- a/webhooks.go +++ b/webhooks.go @@ -53,14 +53,16 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -81,11 +83,10 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ActivateConfigResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -99,7 +100,7 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConfigResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -107,13 +108,15 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A res.ConfigResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 304: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -155,14 +158,16 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -183,11 +188,10 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.ChangeConfigSecretResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -201,7 +205,7 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConfigResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -209,12 +213,14 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan res.ConfigResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -246,14 +252,16 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -274,11 +282,10 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeactivateConfigResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -292,7 +299,7 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConfigResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -300,13 +307,15 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations res.ConfigResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 304: case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -338,14 +347,16 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -366,11 +377,10 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.DeleteConfigResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -387,6 +397,8 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -423,14 +435,16 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -451,11 +465,10 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.GetManyConfigsResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -469,7 +482,7 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConfigsResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -477,12 +490,14 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str res.ConfigsResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -524,14 +539,16 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -552,11 +569,10 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.InsertConfigResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -570,7 +586,7 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.ConfigResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -578,7 +594,7 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) res.ConfigResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode == 400: fallthrough @@ -586,6 +602,8 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil @@ -617,14 +635,16 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - client := s.sdkConfiguration.SecurityClient + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } - httpRes, err := client.Do(req) + httpRes, err := s.sdkConfiguration.Client.Do(req) if err != nil || httpRes == nil { if err != nil { err = fmt.Errorf("error sending request: %w", err) @@ -645,11 +665,10 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC return nil, err } } - contentType := httpRes.Header.Get("Content-Type") res := &operations.TestConfigResponse{ StatusCode: httpRes.StatusCode, - ContentType: contentType, + ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, } @@ -663,7 +682,7 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC switch { case httpRes.StatusCode == 200: switch { - case utils.MatchContentType(contentType, `application/json`): + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): var out shared.AttemptResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err @@ -671,12 +690,14 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC res.AttemptResponse = &out default: - return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes) + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: fallthrough case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } return res, nil From 5a87a8ceb05a660d871dbca64b11eb9576ce6dfa Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 8 Mar 2024 00:50:52 +0000 Subject: [PATCH 26/32] chore: update dependencies --- go.mod | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index f772bdc..aa36632 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,5 @@ go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 ) From 263713798bb7844fbe31c504b394c5879e5ef53f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 13 Mar 2024 00:31:33 +0000 Subject: [PATCH 27/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.207.1 --- .speakeasy/gen.lock | 10 +++++----- RELEASES.md | 12 +++++++++++- formance.go | 6 +++--- gen.yaml | 2 +- go.mod | 4 +++- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4480b67..658f594 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 884040e6-e056-469c-81c7-dc3139ef42b6 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.204.1 - generationVersion: 2.279.1 - releaseVersion: 0.10.0 - configChecksum: f8ef15934a669b82079120ba2241cfc4 + speakeasyVersion: 1.207.1 + generationVersion: 2.280.6 + releaseVersion: 0.10.1 + configChecksum: 4ec5e721f033ba0704d7b877cf22289f repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -18,7 +18,7 @@ features: deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.8 - globalServerURLs: 2.82.1 + globalServerURLs: 2.82.2 nameOverrides: 2.81.1 responseFormat: 0.1.0 unions: 2.85.4 diff --git a/RELEASES.md b/RELEASES.md index 7935e62..f1cd535 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -330,4 +330,14 @@ Based on: ### Generated - [go v0.10.0] . ### Releases -- [Go v0.10.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.0 - . \ No newline at end of file +- [Go v0.10.0] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.0 - . + +## 2024-03-13 00:31:18 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.207.1 (2.280.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.10.1] . +### Releases +- [Go v0.10.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.1 - . \ No newline at end of file diff --git a/formance.go b/formance.go index f8054bd..b98aa16 100644 --- a/formance.go +++ b/formance.go @@ -208,9 +208,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.10.0", - GenVersion: "2.279.1", - UserAgent: "speakeasy-sdk/go 0.10.0 2.279.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.10.1", + GenVersion: "2.280.6", + UserAgent: "speakeasy-sdk/go 0.10.1 2.280.6 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index 56170bf..69f9ac2 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 0.10.0 + version: 0.10.1 additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true diff --git a/go.mod b/go.mod index aa36632..0525b00 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ + module github.com/speakeasy-sdks/formance-go-sdk go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/spyzhov/ajson v0.8.0 ) From 0d1994b30e29212289c1ab3bb9660fcc299bf633 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 13 Mar 2024 00:59:57 +0000 Subject: [PATCH 28/32] chore: update dependencies --- go.mod | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0525b00..aa36632 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,8 @@ - module github.com/speakeasy-sdks/formance-go-sdk go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 ) From 653156299554c867381039256f834a21ddbcc8f9 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 20 Mar 2024 00:38:59 +0000 Subject: [PATCH 29/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.213.0 --- .speakeasy/gen.lock | 10 +++++----- RELEASES.md | 12 +++++++++++- accounts.go | 4 ++++ balances.go | 2 ++ clients.go | 9 +++++++++ formance.go | 9 ++++++--- gen.yaml | 2 +- go.mod | 4 +++- internal/hooks/hooks.go | 2 ++ ledger.go | 1 + logs.go | 1 + mapping.go | 2 ++ orchestration.go | 7 +++++++ payments.go | 12 ++++++++++++ scopes.go | 7 +++++++ script.go | 1 + search.go | 1 + server.go | 1 + stats.go | 1 + transactions.go | 7 +++++++ users.go | 2 ++ wallets.go | 15 +++++++++++++++ webhooks.go | 7 +++++++ 23 files changed, 108 insertions(+), 11 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 658f594..0cfa3c4 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 884040e6-e056-469c-81c7-dc3139ef42b6 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.207.1 - generationVersion: 2.280.6 - releaseVersion: 0.10.1 - configChecksum: 4ec5e721f033ba0704d7b877cf22289f + speakeasyVersion: 1.213.0 + generationVersion: 2.283.1 + releaseVersion: 0.10.2 + configChecksum: 48b65badb1317e4562ae3e2d7e93efab repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -17,7 +17,7 @@ features: core: 3.4.4 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.8 + globalSecurity: 2.82.9 globalServerURLs: 2.82.2 nameOverrides: 2.81.1 responseFormat: 0.1.0 diff --git a/RELEASES.md b/RELEASES.md index f1cd535..fc5ccc4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -340,4 +340,14 @@ Based on: ### Generated - [go v0.10.1] . ### Releases -- [Go v0.10.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.1 - . \ No newline at end of file +- [Go v0.10.1] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.1 - . + +## 2024-03-20 00:38:44 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.213.0 (2.283.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.10.2] . +### Releases +- [Go v0.10.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.2 - . \ No newline at end of file diff --git a/accounts.go b/accounts.go index b9c88f8..d4092d9 100644 --- a/accounts.go +++ b/accounts.go @@ -31,6 +31,7 @@ func (s *Accounts) AddMetadataToAccount(ctx context.Context, requestBody map[str hookCtx := hooks.HookContext{ Context: ctx, OperationID: "addMetadataToAccount", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -131,6 +132,7 @@ func (s *Accounts) CountAccounts(ctx context.Context, ledger string, address *st hookCtx := hooks.HookContext{ Context: ctx, OperationID: "countAccounts", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -231,6 +233,7 @@ func (s *Accounts) GetAccount(ctx context.Context, address string, ledger string hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getAccount", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -336,6 +339,7 @@ func (s *Accounts) ListAccounts(ctx context.Context, request operations.ListAcco hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listAccounts", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/balances.go b/balances.go index 0999679..592747a 100644 --- a/balances.go +++ b/balances.go @@ -31,6 +31,7 @@ func (s *Balances) GetBalances(ctx context.Context, request operations.GetBalanc hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getBalances", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -134,6 +135,7 @@ func (s *Balances) GetBalancesAggregated(ctx context.Context, ledger string, add hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getBalancesAggregated", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/clients.go b/clients.go index 46cbbc6..407f2c3 100644 --- a/clients.go +++ b/clients.go @@ -32,6 +32,7 @@ func (s *Clients) AddScopeToClient(ctx context.Context, clientID string, scopeID hookCtx := hooks.HookContext{ Context: ctx, OperationID: "addScopeToClient", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -115,6 +116,7 @@ func (s *Clients) CreateClient(ctx context.Context, request *shared.CreateClient hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createClient", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -210,6 +212,7 @@ func (s *Clients) CreateSecret(ctx context.Context, clientID string, createSecre hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSecret", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -310,6 +313,7 @@ func (s *Clients) DeleteClient(ctx context.Context, clientID string) (*operation hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteClient", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -392,6 +396,7 @@ func (s *Clients) DeleteScopeFromClient(ctx context.Context, clientID string, sc hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteScopeFromClient", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -475,6 +480,7 @@ func (s *Clients) DeleteSecret(ctx context.Context, clientID string, secretID st hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteSecret", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -558,6 +564,7 @@ func (s *Clients) ListClients(ctx context.Context) (*operations.ListClientsRespo hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listClients", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -647,6 +654,7 @@ func (s *Clients) ReadClient(ctx context.Context, clientID string) (*operations. hookCtx := hooks.HookContext{ Context: ctx, OperationID: "readClient", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -740,6 +748,7 @@ func (s *Clients) UpdateClient(ctx context.Context, clientID string, updateClien hookCtx := hooks.HookContext{ Context: ctx, OperationID: "updateClient", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/formance.go b/formance.go index b98aa16..0ce177a 100644 --- a/formance.go +++ b/formance.go @@ -208,9 +208,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.10.1", - GenVersion: "2.280.6", - UserAgent: "speakeasy-sdk/go 0.10.1 2.280.6 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.10.2", + GenVersion: "2.283.1", + UserAgent: "speakeasy-sdk/go 0.10.2 2.283.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { @@ -278,6 +278,7 @@ func (s *Formance) GetServerInfo(ctx context.Context) (*operations.GetServerInfo hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getServerInfo", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -367,6 +368,7 @@ func (s *Formance) PaymentsgetServerInfo(ctx context.Context) (*operations.Payme hookCtx := hooks.HookContext{ Context: ctx, OperationID: "paymentsgetServerInfo", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -456,6 +458,7 @@ func (s *Formance) SearchgetServerInfo(ctx context.Context) (*operations.Searchg hookCtx := hooks.HookContext{ Context: ctx, OperationID: "searchgetServerInfo", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/gen.yaml b/gen.yaml index 69f9ac2..a38e9cc 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 0.10.1 + version: 0.10.2 additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true diff --git a/go.mod b/go.mod index aa36632..0525b00 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ + module github.com/speakeasy-sdks/formance-go-sdk go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/spyzhov/ajson v0.8.0 ) diff --git a/internal/hooks/hooks.go b/internal/hooks/hooks.go index 58e5a4e..ee97182 100644 --- a/internal/hooks/hooks.go +++ b/internal/hooks/hooks.go @@ -78,6 +78,8 @@ func New() *Hooks { afterErrorHook: []afterErrorHook{}, } + initHooks(h) + return h } diff --git a/ledger.go b/ledger.go index 87d86be..d92390a 100644 --- a/ledger.go +++ b/ledger.go @@ -31,6 +31,7 @@ func (s *Ledger) GetLedgerInfo(ctx context.Context, ledger string) (*operations. hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getLedgerInfo", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/logs.go b/logs.go index 1a0348e..cc072ea 100644 --- a/logs.go +++ b/logs.go @@ -32,6 +32,7 @@ func (s *Logs) ListLogs(ctx context.Context, request operations.ListLogsRequest) hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listLogs", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/mapping.go b/mapping.go index 1dd660a..ad2f44b 100644 --- a/mapping.go +++ b/mapping.go @@ -31,6 +31,7 @@ func (s *Mapping) GetMapping(ctx context.Context, ledger string) (*operations.Ge hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getMapping", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -134,6 +135,7 @@ func (s *Mapping) UpdateMapping(ctx context.Context, mapping *shared.Mapping, le hookCtx := hooks.HookContext{ Context: ctx, OperationID: "updateMapping", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/orchestration.go b/orchestration.go index d650a22..1af26a5 100644 --- a/orchestration.go +++ b/orchestration.go @@ -33,6 +33,7 @@ func (s *Orchestration) CreateWorkflow(ctx context.Context, request *shared.Crea hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createWorkflow", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -139,6 +140,7 @@ func (s *Orchestration) GetFlow(ctx context.Context, flowID string) (*operations hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getFlow", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -243,6 +245,7 @@ func (s *Orchestration) GetWorkflowOccurrence(ctx context.Context, flowID string hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getWorkflowOccurrence", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -348,6 +351,7 @@ func (s *Orchestration) ListFlows(ctx context.Context) (*operations.ListFlowsRes hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listFlows", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -448,6 +452,7 @@ func (s *Orchestration) ListRuns(ctx context.Context, flowID string) (*operation hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listRuns", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -551,6 +556,7 @@ func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operat hookCtx := hooks.HookContext{ Context: ctx, OperationID: "orchestrationgetServerInfo", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -651,6 +657,7 @@ func (s *Orchestration) RunWorkflow(ctx context.Context, flowID string, requestB hookCtx := hooks.HookContext{ Context: ctx, OperationID: "runWorkflow", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/payments.go b/payments.go index 1d4ec37..228559b 100644 --- a/payments.go +++ b/payments.go @@ -33,6 +33,7 @@ func (s *Payments) ConnectorsStripeTransfer(ctx context.Context, request shared. hookCtx := hooks.HookContext{ Context: ctx, OperationID: "connectorsStripeTransfer", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -129,6 +130,7 @@ func (s *Payments) GetConnectorTask(ctx context.Context, connector shared.Connec hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getConnectorTask", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -223,6 +225,7 @@ func (s *Payments) GetPayment(ctx context.Context, paymentID string) (*operation hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getPayment", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -317,6 +320,7 @@ func (s *Payments) InstallConnector(ctx context.Context, connectorConfig shared. hookCtx := hooks.HookContext{ Context: ctx, OperationID: "installConnector", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -407,6 +411,7 @@ func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllCo hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listAllConnectors", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -497,6 +502,7 @@ func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operati hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listConfigsAvailableConnectors", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -587,6 +593,7 @@ func (s *Payments) ListConnectorTasks(ctx context.Context, connector shared.Conn hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listConnectorTasks", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -686,6 +693,7 @@ func (s *Payments) ListPayments(ctx context.Context, cursor *string, pageSize *i hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listPayments", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -785,6 +793,7 @@ func (s *Payments) PaymentslistAccounts(ctx context.Context, cursor *string, pag hookCtx := hooks.HookContext{ Context: ctx, OperationID: "paymentslistAccounts", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -885,6 +894,7 @@ func (s *Payments) ReadConnectorConfig(ctx context.Context, connector shared.Con hookCtx := hooks.HookContext{ Context: ctx, OperationID: "readConnectorConfig", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -980,6 +990,7 @@ func (s *Payments) ResetConnector(ctx context.Context, connector shared.Connecto hookCtx := hooks.HookContext{ Context: ctx, OperationID: "resetConnector", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1063,6 +1074,7 @@ func (s *Payments) UninstallConnector(ctx context.Context, connector shared.Conn hookCtx := hooks.HookContext{ Context: ctx, OperationID: "uninstallConnector", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/scopes.go b/scopes.go index d0c45fd..6dfe3ee 100644 --- a/scopes.go +++ b/scopes.go @@ -33,6 +33,7 @@ func (s *Scopes) AddTransientScope(ctx context.Context, scopeID string, transien hookCtx := hooks.HookContext{ Context: ctx, OperationID: "addTransientScope", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -117,6 +118,7 @@ func (s *Scopes) CreateScope(ctx context.Context, request *shared.CreateScopeReq hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createScope", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -213,6 +215,7 @@ func (s *Scopes) DeleteScope(ctx context.Context, scopeID string) (*operations.D hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteScope", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -296,6 +299,7 @@ func (s *Scopes) DeleteTransientScope(ctx context.Context, scopeID string, trans hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteTransientScope", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -380,6 +384,7 @@ func (s *Scopes) ListScopes(ctx context.Context) (*operations.ListScopesResponse hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listScopes", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -470,6 +475,7 @@ func (s *Scopes) ReadScope(ctx context.Context, scopeID string) (*operations.Rea hookCtx := hooks.HookContext{ Context: ctx, OperationID: "readScope", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -564,6 +570,7 @@ func (s *Scopes) UpdateScope(ctx context.Context, scopeID string, updateScopeReq hookCtx := hooks.HookContext{ Context: ctx, OperationID: "updateScope", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/script.go b/script.go index 1acde54..13c0cfe 100644 --- a/script.go +++ b/script.go @@ -34,6 +34,7 @@ func (s *Script) RunScript(ctx context.Context, script shared.Script, ledger str hookCtx := hooks.HookContext{ Context: ctx, OperationID: "runScript", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/search.go b/search.go index d0166b6..b652707 100644 --- a/search.go +++ b/search.go @@ -33,6 +33,7 @@ func (s *Search) Search(ctx context.Context, request shared.Query) (*operations. hookCtx := hooks.HookContext{ Context: ctx, OperationID: "search", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/server.go b/server.go index 3eecb64..4710e4e 100644 --- a/server.go +++ b/server.go @@ -32,6 +32,7 @@ func (s *Server) GetInfo(ctx context.Context) (*operations.GetInfoResponse, erro hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getInfo", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/stats.go b/stats.go index 53eec9e..a7806d6 100644 --- a/stats.go +++ b/stats.go @@ -32,6 +32,7 @@ func (s *Stats) ReadStats(ctx context.Context, ledger string) (*operations.ReadS hookCtx := hooks.HookContext{ Context: ctx, OperationID: "readStats", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/transactions.go b/transactions.go index c90cbfb..f0a5adf 100644 --- a/transactions.go +++ b/transactions.go @@ -31,6 +31,7 @@ func (s *Transactions) CreateTransactions(ctx context.Context, transactions shar hookCtx := hooks.HookContext{ Context: ctx, OperationID: "CreateTransactions", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -141,6 +142,7 @@ func (s *Transactions) AddMetadataOnTransaction(ctx context.Context, ledger stri hookCtx := hooks.HookContext{ Context: ctx, OperationID: "addMetadataOnTransaction", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -241,6 +243,7 @@ func (s *Transactions) CountTransactions(ctx context.Context, request operations hookCtx := hooks.HookContext{ Context: ctx, OperationID: "countTransactions", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -335,6 +338,7 @@ func (s *Transactions) CreateTransaction(ctx context.Context, postTransaction sh hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createTransaction", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -450,6 +454,7 @@ func (s *Transactions) GetTransaction(ctx context.Context, ledger string, txid i hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getTransaction", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -555,6 +560,7 @@ func (s *Transactions) ListTransactions(ctx context.Context, request operations. hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listTransactions", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -658,6 +664,7 @@ func (s *Transactions) RevertTransaction(ctx context.Context, ledger string, txi hookCtx := hooks.HookContext{ Context: ctx, OperationID: "revertTransaction", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/users.go b/users.go index 12164f4..7057b7e 100644 --- a/users.go +++ b/users.go @@ -33,6 +33,7 @@ func (s *Users) ListUsers(ctx context.Context) (*operations.ListUsersResponse, e hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listUsers", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -123,6 +124,7 @@ func (s *Users) ReadUser(ctx context.Context, userID string) (*operations.ReadUs hookCtx := hooks.HookContext{ Context: ctx, OperationID: "readUser", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/wallets.go b/wallets.go index e42bf69..edf947e 100644 --- a/wallets.go +++ b/wallets.go @@ -32,6 +32,7 @@ func (s *Wallets) ConfirmHold(ctx context.Context, holdID string, confirmHoldReq hookCtx := hooks.HookContext{ Context: ctx, OperationID: "confirmHold", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -131,6 +132,7 @@ func (s *Wallets) CreateBalance(ctx context.Context, id string, createBalanceReq hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createBalance", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -241,6 +243,7 @@ func (s *Wallets) CreateWallet(ctx context.Context, request *shared.CreateWallet hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createWallet", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -346,6 +349,7 @@ func (s *Wallets) CreditWallet(ctx context.Context, id string, creditWalletReque hookCtx := hooks.HookContext{ Context: ctx, OperationID: "creditWallet", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -445,6 +449,7 @@ func (s *Wallets) DebitWallet(ctx context.Context, id string, debitWalletRequest hookCtx := hooks.HookContext{ Context: ctx, OperationID: "debitWallet", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -556,6 +561,7 @@ func (s *Wallets) GetBalance(ctx context.Context, balanceName string, id string) hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getBalance", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -660,6 +666,7 @@ func (s *Wallets) GetHold(ctx context.Context, holdID string) (*operations.GetHo hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getHold", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -763,6 +770,7 @@ func (s *Wallets) GetHolds(ctx context.Context, cursor *string, metadata *operat hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getHolds", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -872,6 +880,7 @@ func (s *Wallets) GetTransactions(ctx context.Context, cursor *string, pageSize hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getTransactions", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -981,6 +990,7 @@ func (s *Wallets) GetWallet(ctx context.Context, id string) (*operations.GetWall hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getWallet", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1086,6 +1096,7 @@ func (s *Wallets) ListBalances(ctx context.Context, id string) (*operations.List hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listBalances", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1179,6 +1190,7 @@ func (s *Wallets) ListWallets(ctx context.Context, cursor *string, metadata *ope hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listWallets", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1279,6 +1291,7 @@ func (s *Wallets) UpdateWallet(ctx context.Context, id string, requestBody *oper hookCtx := hooks.HookContext{ Context: ctx, OperationID: "updateWallet", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1378,6 +1391,7 @@ func (s *Wallets) VoidHold(ctx context.Context, holdID string) (*operations.Void hookCtx := hooks.HookContext{ Context: ctx, OperationID: "voidHold", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -1470,6 +1484,7 @@ func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.Wallets hookCtx := hooks.HookContext{ Context: ctx, OperationID: "walletsgetServerInfo", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } diff --git a/webhooks.go b/webhooks.go index 47bd8bb..a22ea61 100644 --- a/webhooks.go +++ b/webhooks.go @@ -33,6 +33,7 @@ func (s *Webhooks) ActivateConfig(ctx context.Context, id string) (*operations.A hookCtx := hooks.HookContext{ Context: ctx, OperationID: "activateConfig", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -131,6 +132,7 @@ func (s *Webhooks) ChangeConfigSecret(ctx context.Context, id string, configChan hookCtx := hooks.HookContext{ Context: ctx, OperationID: "changeConfigSecret", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -232,6 +234,7 @@ func (s *Webhooks) DeactivateConfig(ctx context.Context, id string) (*operations hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deactivateConfig", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -327,6 +330,7 @@ func (s *Webhooks) DeleteConfig(ctx context.Context, id string) (*operations.Del hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteConfig", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -410,6 +414,7 @@ func (s *Webhooks) GetManyConfigs(ctx context.Context, endpoint *string, id *str hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getManyConfigs", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -517,6 +522,7 @@ func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) hookCtx := hooks.HookContext{ Context: ctx, OperationID: "insertConfig", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } @@ -615,6 +621,7 @@ func (s *Webhooks) TestConfig(ctx context.Context, id string) (*operations.TestC hookCtx := hooks.HookContext{ Context: ctx, OperationID: "testConfig", + OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } From 0b27d0a41d3a1544d3c3d38b8f814ae1c0cb2c12 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 20 Mar 2024 00:39:37 +0000 Subject: [PATCH 30/32] chore: update dependencies --- go.mod | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0525b00..aa36632 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,8 @@ - module github.com/speakeasy-sdks/formance-go-sdk go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 ) From 0e6ae0f7c392955b550406ff5459de73a161ba38 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 27 Mar 2024 00:48:50 +0000 Subject: [PATCH 31/32] ci: regenerated with OpenAPI Doc v1.0.0-rc.5, Speakeasy CLI 1.227.0 --- .speakeasy/gen.lock | 10 +++++----- RELEASES.md | 12 +++++++++++- formance.go | 6 +++--- gen.yaml | 2 +- go.mod | 4 +++- pkg/utils/headers.go | 4 +++- 6 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0cfa3c4..9730034 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 884040e6-e056-469c-81c7-dc3139ef42b6 management: docChecksum: e2d62c3257abdb44d60905723bd6484e docVersion: v1.0.0-rc.5 - speakeasyVersion: 1.213.0 - generationVersion: 2.283.1 - releaseVersion: 0.10.2 - configChecksum: 48b65badb1317e4562ae3e2d7e93efab + speakeasyVersion: 1.227.0 + generationVersion: 2.291.0 + releaseVersion: 0.10.3 + configChecksum: b8d350f43ba58deb571b4da15b835e2e repoURL: https://github.com/speakeasy-sdks/formance-go-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/formance-go-sdk @@ -14,7 +14,7 @@ management: features: go: constsAndDefaults: 0.1.4 - core: 3.4.4 + core: 3.4.5 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.9 diff --git a/RELEASES.md b/RELEASES.md index fc5ccc4..4f71106 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -350,4 +350,14 @@ Based on: ### Generated - [go v0.10.2] . ### Releases -- [Go v0.10.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.2 - . \ No newline at end of file +- [Go v0.10.2] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.2 - . + +## 2024-03-27 00:48:35 +### Changes +Based on: +- OpenAPI Doc v1.0.0-rc.5 ./stack.yaml +- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.10.3] . +### Releases +- [Go v0.10.3] https://github.com/speakeasy-sdks/formance-go-sdk/releases/tag/v0.10.3 - . \ No newline at end of file diff --git a/formance.go b/formance.go index 0ce177a..1297615 100644 --- a/formance.go +++ b/formance.go @@ -208,9 +208,9 @@ func New(opts ...SDKOption) *Formance { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "v1.0.0-rc.5", - SDKVersion: "0.10.2", - GenVersion: "2.283.1", - UserAgent: "speakeasy-sdk/go 0.10.2 2.283.1 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", + SDKVersion: "0.10.3", + GenVersion: "2.291.0", + UserAgent: "speakeasy-sdk/go 0.10.3 2.291.0 v1.0.0-rc.5 github.com/speakeasy-sdks/formance-go-sdk", ServerDefaults: []map[string]string{ {}, { diff --git a/gen.yaml b/gen.yaml index a38e9cc..e309297 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 0.10.2 + version: 0.10.3 additionalDependencies: {} clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true diff --git a/go.mod b/go.mod index aa36632..0525b00 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ + module github.com/speakeasy-sdks/formance-go-sdk go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/spyzhov/ajson v0.8.0 ) diff --git a/pkg/utils/headers.go b/pkg/utils/headers.go index 0837022..734f96b 100644 --- a/pkg/utils/headers.go +++ b/pkg/utils/headers.go @@ -10,7 +10,7 @@ import ( "strings" ) -func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}) { +func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}, globals map[string]map[string]map[string]interface{}) { headerParamsStructType := reflect.TypeOf(headers) headerParamsValType := reflect.ValueOf(headers) @@ -18,6 +18,8 @@ func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{} fieldType := headerParamsStructType.Field(i) valType := headerParamsValType.Field(i) + valType = populateFromGlobals(fieldType, valType, "header", globals) + tag := parseParamTag(headerParamTagKey, fieldType, "simple", false) if tag == nil { continue From 6ff76a4400d48f2ffd094f58c31944ab78877774 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 27 Mar 2024 00:55:43 +0000 Subject: [PATCH 32/32] chore: update dependencies --- go.mod | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0525b00..aa36632 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,8 @@ - module github.com/speakeasy-sdks/formance-go-sdk go 1.20 require ( github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/spyzhov/ajson v0.8.0 + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 )