Categorygithub.com/FuturHealth/gr4vy-go-sdk
repositorypackage
0.0.0-20250115182255-e132a53026bb
Repository: https://github.com/futurhealth/gr4vy-go-sdk.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go API client for openapi

Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.1.0-beta
  • Package version: 1.0.0
  • Generator version: 7.11.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://gr4vy.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import openapi "github.com/FuturHealth/gr4vy-go-sdk"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value openapi.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices and openapi.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.plantly.gr4vy.app

ClassMethodHTTP requestDescription
APILogsAPIListApiLogsGet /api-logsList API error logs
AccountUpdaterAPINewAccountUpdaterJobPost /account-updater/jobsCreate Account Updater job
AntiFraudServiceDefinitionsAPIGetAntiFraudServiceDefinitionGet /anti-fraud-service-definitions/{anti_fraud_service_definition_id}Get anti fraud service definition
AuditLogsAPIListAuditLogsGet /audit-logsList audit logs
BuyersAPIDeleteBuyerDelete /buyers/{buyer_id}Delete buyer
BuyersAPIDeleteBuyerShippingDetailDelete /buyers/{buyer_id}/shipping-details/{shipping_detail_id}Delete buyer shipping detail
BuyersAPIGetBuyerGet /buyers/{buyer_id}Get buyer
BuyersAPIListBuyerShippingDetailsGet /buyers/{buyer_id}/shipping-detailsList buyer shipping details
BuyersAPIListBuyersGet /buyersList buyers
BuyersAPINewBuyerPost /buyersNew buyer
BuyersAPINewBuyerShippingDetailPost /buyers/{buyer_id}/shipping-detailsNew buyer shipping detail
BuyersAPIUpdateBuyerPut /buyers/{buyer_id}Update buyer
BuyersAPIUpdateBuyerShippingDetailPut /buyers/{buyer_id}/shipping-details/{shipping_detail_id}Update buyer shipping details
CardSchemeDefinitionsAPIListCardSchemeDefinitionsGet /card-scheme-definitionsList card scheme definitions
CheckoutSessionsAPIDeleteCheckoutSessionDelete /checkout/sessions/{checkout_session_id}Delete checkout session
CheckoutSessionsAPIGetCheckoutSessionGet /checkout/sessions/{checkout_session_id}Get checkout session
CheckoutSessionsAPINewCheckoutSessionPost /checkout/sessionsNew checkout session
CheckoutSessionsAPIUpdateCheckoutSessionPut /checkout/sessions/{checkout_session_id}Update checkout session
DigitalWalletsAPIAddDigitalWalletDomainNamePost /digital-wallets/{digital_wallet_id}/domainsAdd digital wallet domain name
DigitalWalletsAPIDeleteDigitalWalletDelete /digital-wallets/{digital_wallet_id}De-register digital wallet
DigitalWalletsAPIDeleteDigitalWalletDomainNameDelete /digital-wallets/{digital_wallet_id}/domainsRemove digital wallet domain name
DigitalWalletsAPIGetDigitalWalletGet /digital-wallets/{digital_wallet_id}Get digital wallet
DigitalWalletsAPIListDigitalWalletsGet /digital-walletsList digital wallets
DigitalWalletsAPINewDigitalWalletPost /digital-walletsRegister digital wallet
DigitalWalletsAPIUpdateDigitalWalletPut /digital-wallets/{digital_wallet_id}Update digital wallet
GiftCardServiceDefinitionsAPIGetGiftCardServiceDefinitionGet /gift-card-service-definitions/{gift_card_service_definition_id}Get gift card service definition
GiftCardServicesAPIDeleteGiftCardServiceDelete /gift-card-services/{gift_card_service_id}Delete gift card service
GiftCardServicesAPIGetGiftCardServiceGet /gift-card-services/{gift_card_service_id}Get gift card service
GiftCardServicesAPINewGiftCardServicePost /gift-card-servicesNew gift card service
GiftCardServicesAPIUpdateGiftCardServicePut /gift-card-services/{gift_card_service_id}Update gift card service
GiftCardServicesAPIVerifyGiftCardServicePost /gift-card-services/verifyVerify gift card service credentials
GiftCardsAPICheckGiftCardBalancesPost /gift-cards/balancesVerify and check gift card balances
GiftCardsAPIDeleteGiftCardDelete /gift-cards/{gift_card_id}Delete gift card
GiftCardsAPIGetGiftCardGet /gift-cards/{gift_card_id}Get gift card
GiftCardsAPIListBuyerGiftCardsGet /buyers/gift-cardsList gift cards for buyer
GiftCardsAPIListGiftCardsGet /gift-cardsList gift cards
GiftCardsAPIStoreGiftCardPost /gift-cardsStore gift card
MerchantAccountsAPIDeleteMerchantAccuontDelete /merchant-accounts/{merchant_account_id}Delete merchant account
MerchantAccountsAPIGetMerchantAccountGet /merchant-accounts/{merchant_account_id}Get merchant account
MerchantAccountsAPIListMerchantAccountsGet /merchant-accountsList merchant accounts
MerchantAccountsAPINewMerchantAccountPost /merchant-accountsNew merchant account
MerchantAccountsAPIUpdateMerchantAccountPut /merchant-accounts/{merchant_account_id}Update merchant account
PaymentMethodDefinitionsAPIListPaymentMethodDefinitionsGet /payment-method-definitionsList payment method definitions
PaymentMethodsAPIDeletePaymentMethodDelete /payment-methods/{payment_method_id}Delete payment method
PaymentMethodsAPIGetPaymentMethodGet /payment-methods/{payment_method_id}Get payment method
PaymentMethodsAPIListBuyerPaymentMethodsGet /buyers/payment-methodsList payment methods for buyer
PaymentMethodsAPIListPaymentMethodsGet /payment-methodsList payment methods
PaymentMethodsAPINewPaymentMethodPost /payment-methodsNew payment method
PaymentOptionsAPIListPaymentOptionsGet /payment-optionsList payment options
PaymentOptionsAPIPostListPaymentOptionsPost /payment-optionsList payment options with POST
PaymentServiceDefinitionsAPICreatePaymentServiceDefinitionSessionPost /payment-service-definitions/{payment_service_definition_id}/sessionsCreate a session for a payment service
PaymentServiceDefinitionsAPIGetPaymentServiceDefinitionGet /payment-service-definitions/{payment_service_definition_id}Get payment service definition
PaymentServiceDefinitionsAPIListPaymentServiceDefinitionsGet /payment-service-definitionsList payment service definitions
PaymentServicesAPICreatePaymentServiceSessionPost /payment-services/{payment_service_id}/sessionsCreate a session for a payment service by ID
PaymentServicesAPIDeletePaymentServiceDelete /payment-services/{payment_service_id}Delete payment service
PaymentServicesAPIGetPaymentServiceGet /payment-services/{payment_service_id}Get payment service
PaymentServicesAPIListPaymentServicesGet /payment-servicesList payment services
PaymentServicesAPINewPaymentServicePost /payment-servicesNew payment service
PaymentServicesAPIUpdatePaymentServicePut /payment-services/{payment_service_id}Update payment service
PayoutsAPIGetSinglePayoutGet /payouts/{payout_id}Get payout
PayoutsAPIListPayoutsGet /payoutsList payouts
PayoutsAPINewPayoutPost /payoutsCreate payout
ReportsAPIGenerateDownloadUrlPost /reports/{report_id}/executions/{report_execution_id}/urlGenerate report download URL
ReportsAPIGetReportGet /reports/{report_id}Get report
ReportsAPIGetReportExecutionGet /report-executions/{report_execution_id}Get report execution
ReportsAPIListAllReportExecutionsGet /report-executionsList all report executions
ReportsAPIListReportExecutionsGet /reports/{report_id}/executionsList executions for report
ReportsAPIListReportsGet /reportsList reports
ReportsAPINewReportPost /reportsNew report
ReportsAPIUpdateReportPut /reports/{report_id}Update report
RolesAPIDeleteRoleAssignmentDelete /roles/assignments/{role_assignment_id}Delete role assignment
RolesAPIListRoleAssignmentsGet /roles/assignmentsList role assignments
RolesAPIListRolesGet /rolesList roles
RolesAPINewRoleAssignmentPost /roles/assignmentsNew role assignment
TokensAPIDeleteNetworkTokenDelete /payment-methods/{payment_method_id}/network-tokens/{network_token_id}Delete network token
TokensAPIDeletePaymentServiceTokenDelete /payment-methods/{payment_method_id}/payment-service-tokens/{payment_service_token_id}Delete payment service token
TokensAPIGetNetworkTokensGet /payment-methods/{payment_method_id}/network-tokensGet network tokens
TokensAPIGetPaymentServiceTokensGet /payment-methods/{payment_method_id}/payment-service-tokensGet payment service tokens
TokensAPIIssueCryptogramPost /payment-methods/{payment_method_id}/network-tokens/{network_token_id}/cryptogramIssue cryptogram
TokensAPIProvisionNetworkTokenPost /payment-methods/{payment_method_id}/network-tokensProvision network token
TokensAPIProvisionPaymentServiceTokenPost /payment-methods/{payment_method_id}/payment-service-tokensProvision payment service token
TokensAPIResumeNetworkTokenPost /payment-methods/{payment_method_id}/network-tokens/{network_token_id}/resumeResume network token
TokensAPISuspendNetworkTokenPost /payment-methods/{payment_method_id}/network-tokens/{network_token_id}/suspendSuspend network token
TransactionsAPICaptureTransactionPost /transactions/{transaction_id}/captureCapture transaction
TransactionsAPIGetRefundGet /transactions/{transaction_id}/refunds/{refund_id}Get refund
TransactionsAPIGetSingleRefundGet /refunds/{refund_id}Get refund
TransactionsAPIGetTransactionGet /transactions/{transaction_id}Get transaction
TransactionsAPIGetTransactionSettlementGet /transactions/{transaction_id}/settlements/{settlement_id}Get settlement
TransactionsAPIGetTransactionSettlementsGet /transactions/{transaction_id}/settlementsList settlements for transaction
TransactionsAPIListTransactionRefundsGet /transactions/{transaction_id}/refundsList refunds
TransactionsAPIListTransactionsGet /transactionsList transactions
TransactionsAPINewRefundPost /transactions/{transaction_id}/refundsRefund transaction
TransactionsAPINewTransactionPost /transactionsNew transaction
TransactionsAPIRefundAllPost /transactions/{transaction_id}/refunds/allRefund all instruments in a transaction
TransactionsAPISyncTransactionPost /transactions/{transaction_id}/syncSync transaction
TransactionsAPIVoidTransactionPost /transactions/{transaction_id}/voidVoid transaction
VaultForwardAPIMakeVaultForwardPost /vault-forwardForward PCI data

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

[email protected]