### Go Client Installation and Usage Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/README.md Instructions for installing the Synctera Go API client, including dependencies and import paths, along with examples for setting up server configurations. ```APIDOC ## Go Client Installation and Configuration ### Installation Install the following dependencies: ```shell go get github.com/stretchr/testify/assert go get golang.org/x/oauth2 go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: ```golang import synctera_client "github.com/GIT_USER_ID/GIT_REPO_ID" ``` To use a proxy, set the environment variable `HTTP_PROXY`: ```golang 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 `sw.ContextServerIndex` of type `int`. ```golang ctx := context.WithValue(context.Background(), synctera_client.ContextServerIndex, 1) ``` #### Templated Server URL Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. ```golang ctx := context.WithValue(context.Background(), synctera_client.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 `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. ``` ctx := context.WithValue(context.Background(), synctera_client.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) ctx = context.WithValue(context.Background(), synctera_client.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, }) ``` ``` -------------------------------- ### CreateApplication Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ApplicationsApi.md Demonstrates how to create a credit application using the Synctera Go client library. It shows the setup of the API client, the creation of an Application object, and the execution of the CreateApplication request. Handles potential errors and prints the response. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { application := *openapiclient.NewApplication(map[string]interface{}("annual_salary":50000,"fico_score":700}), "CustomerId_example", openapiclient.application_type1("LINE_OF_CREDIT")) // Application | Submit application details for a credit account idempotencyKey := "df122e6f-2ba8-48a5-9508-4350bba5f27e" // string | An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ApplicationsApi.CreateApplication(context.Background()).Application(application).IdempotencyKey(idempotencyKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsApi.CreateApplication``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateApplication`: ApplicationResponse fmt.Fprintf(os.Stdout, "Response from `ApplicationsApi.CreateApplication`: %v\n", resp) } ``` -------------------------------- ### Get Gateway Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardsApi.md This Go code snippet shows how to retrieve gateway information using the Synctera Go client library. It takes a `gatewayId` as input and returns a `GatewayResponse`. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { gatewayId := "gatewayId_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CardsApi.GetGateway(context.Background(), gatewayId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CardsApi.GetGateway``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetGateway`: GatewayResponse fmt.Fprintf(os.Stdout, "Response from `CardsApi.GetGateway`: %v\n", resp) } ``` -------------------------------- ### Get Account Template Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/AccountsApi.md Demonstrates how to retrieve an account template using the Synctera Go client library. It requires the account template ID and uses context for authentication and logging. The function returns an AccountTemplateResponse. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { templateId := "72aad5e2-302a-4683-8d33-2510afae6eab" // string | Account Template ID configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.AccountsApi.GetAccountTemplate(context.Background(), templateId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AccountsApi.GetAccountTemplate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetAccountTemplate`: AccountTemplateResponse fmt.Fprintf(os.Stdout, "Response from `AccountsApi.GetAccountTemplate`: %v\n", resp) } ``` -------------------------------- ### Install Go Dependencies Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/README.md Installs necessary dependencies for the Synctera Go API client, including testing utilities and OAuth2 support. ```shell go get github.com/stretchr/testify/assert go get golang.org/x/oauth2 go get golang.org/x/net/context ``` -------------------------------- ### ListBusinesses Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/BusinessesApi.md Provides an example of how to list businesses using the Synctera Go client library. This function supports various query parameters for filtering and pagination, such as ID, entity name, phone number, status, and more. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.BusinessesApi.ListBusinesses(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BusinessesApi.ListBusinesses`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ListBusinesses`: BusinessList fmt.Fprintf(os.Stdout, "Response from `BusinessesApi.ListBusinesses`: %v\n", resp) } ``` -------------------------------- ### Simulate Withdrawal Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardTransactionSimulationsApi.md Illustrates how to simulate an ATM withdrawal using the Synctera Go client library. The example demonstrates creating a WithdrawalRequestModel and calling the SimulateWithdrawal API. The result is returned as a map of string interfaces. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { withdrawalRequestModel := *openapiclient.NewWithdrawalRequestModel(int32(123), "CardId_example", "Mid_example") // WithdrawalRequestModel | ATM withdrawal details configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CardTransactionSimulationsApi.SimulateWithdrawal(context.Background()).WithdrawalRequestModel(withdrawalRequestModel).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CardTransactionSimulationsApi.SimulateWithdrawal`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SimulateWithdrawal`: map[string]interface{} fmt.Fprintf(os.Stdout, "Response from `CardTransactionSimulationsApi.SimulateWithdrawal`: %v\n", resp) } ``` -------------------------------- ### Initialize QuickstartT10 Object Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/QuickstartT10.md Demonstrates how to instantiate a new QuickstartT10 object using the constructor. This ensures required properties are set correctly. ```go model := NewQuickstartT10(123, 456) ``` -------------------------------- ### Get External Account Transactions Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ExternalAccountsApi.md Lists transactions for a given external account. You can filter transactions by specifying start and end dates. ```APIDOC ## GET /external-accounts/{externalAccountId}/transactions ### Description Lists transactions for a given external account. You can filter transactions by specifying start and end dates. ### Method GET ### Endpoint /external-accounts/{externalAccountId}/transactions ### Parameters #### Path Parameters - **externalAccountId** (string) - Required - The unique identifier for the external account. #### Query Parameters - **startDate** (string) - Optional - The start date for filtering transactions (YYYY-MM-DD). - **endDate** (string) - Optional - The end date for filtering transactions (YYYY-MM-DD). ### Response #### Success Response (200) - **ExternalAccountsTransactionList** (object) - A list of transactions for the external account. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Delete External Account Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ExternalAccountsApi.md Provides an example of how to delete an external account using the Synctera Go client library. It includes the necessary setup, the API call to `DeleteExternalAccount` with the `externalAccountId` path parameter, and error handling. The response, if successful, is printed to standard output. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { externalAccountId := "63ea71cb-7f86-44c1-956b-77f6cbd6ecf7" // string | External Account ID configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ExternalAccountsApi.DeleteExternalAccount(context.Background(), externalAccountId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ExternalAccountsApi.DeleteExternalAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteExternalAccount`: DeleteResponse fmt.Fprintf(os.Stdout, "Response from `ExternalAccountsApi.DeleteExternalAccount`: %v\n", resp) } ``` -------------------------------- ### CreateBusiness Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/BusinessesApi.md Demonstrates how to create a new business using the Synctera Go client library. It includes setting business details and an idempotency key for safe retries. The function returns the created Business object. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { business := *openapiclient.NewBusiness(true, "Status_example") // Business | idempotencyKey := "df122e6f-2ba8-48a5-9508-4350bba5f27e" // string | An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.BusinessesApi.CreateBusiness(context.Background()).Business(business).IdempotencyKey(idempotencyKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BusinessesApi.CreateBusiness``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateBusiness`: Business fmt.Fprintf(os.Stdout, "Response from `BusinessesApi.CreateBusiness`: %v\n", resp) } ``` -------------------------------- ### Initialize VerificationVendorInfo Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/VerificationVendorInfo.md Demonstrates how to instantiate a new VerificationVendorInfo object using the constructor or the default constructor. ```go info := NewVerificationVendorInfo("application/json", map[string]interface{}{"key": "value"}, "vendor_name", "") defaultInfo := NewVerificationVendorInfoWithDefaults() ``` -------------------------------- ### Get External Account Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ExternalAccountsApi.md Illustrates how to retrieve details of an external account using the Synctera Go client library. This snippet shows the basic structure for making the `GetExternalAccount` API call, requiring the `externalAccountId` as a path parameter. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { externalAccountId := "63ea71cb-7f86-44c1-956b-77f6cbd6ecf7" // string | External Account ID configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ExternalAccountsApi.GetExternalAccount(context.Background(), externalAccountId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ExternalAccountsApi.GetExternalAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetExternalAccount`: ExternalAccount fmt.Fprintf(os.Stdout, "Response from `ExternalAccountsApi.GetExternalAccount`: %v\n", resp) } ``` -------------------------------- ### Create Customer using Go Synctera Client Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CustomersApi.md Demonstrates how to create a new customer using the Synctera Go client library. It shows the instantiation of the API client, setting customer details and an idempotency key, and executing the CreateCustomer request. Error handling and response processing are included. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { customerInBody := openapiclient.customer_in_body{Customer: openapiclient.NewCustomer("Status_example")} idempotencyKey := "df122e6f-2ba8-48a5-9508-4350bba5f27e" configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CustomersApi.CreateCustomer(context.Background()).CustomerInBody(customerInBody).IdempotencyKey(idempotencyKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.CreateCustomer`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } fmt.Fprintf(os.Stdout, "Response from `CustomersApi.CreateCustomer`: %v\n", resp) } ``` -------------------------------- ### List Accounts with Synctera Go Client Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/AccountsApi.md Demonstrates how to list accounts using the Synctera Go client library. It shows how to instantiate the client, set various optional parameters for filtering (ID, linked account ID, status, customer type, etc.), and execute the request. The example includes error handling and printing the response. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { id := []string{"Inner_example"} // []string | Account ID(s). Multiple IDs can be provided as a comma-separated list. (optional) linkedAccountId := []string{"Inner_example"} // []string | Return only resources that are linked to the specified backing account in balance_floor or balance_ceiling. Multiple IDs can be provided as a comma-separated list. (optional) overdraftAccountId := []string{"Inner_example"} // []string | Overdraft account ID(s). Multiple IDs can be provided as a comma-separated list. This parameter is deprecated and will be removed in a future API version. Use linked_account_id instead. (optional) overflowAccountId := []string{"Inner_example"} // []string | Overflow account ID(s). Multiple IDs can be provided as a comma-separated list. This parameter is deprecated and will be removed in a future API version. Use linked_account_id instead. (optional) accountNumber := []string{"Inner_example"} // []string | Account number(s). Multiple account numbers can be provided as a comma-separated list. When only a single account number is provided, any * characters in the string are wildcards, and match any characters. (optional) status := openapiclient.status("APPLICATION_SUBMITTED") // Status | (optional) interestProductId := "interestProductId_example" // string | Interest product ID that accounts associate with. Multiple IDs can be provided as a comma-separated list. (optional) customerType := openapiclient.customer_type("BUSINESS") // CustomerType | Customer type of the account, BUSINESS or PERSONAL (optional) customerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The customer's unique identifier (optional) businessId := []string{"Inner_example"} // []string | Unique identifier for the business. Multiple IDs can be provided as a comma-separated list. (optional) personId := []string{"Inner_example"} // []string | Unique identifier for the person. Multiple IDs can be provided as a comma-separated list. (optional) firstName := "Alice" // string | (optional) lastName := "Smith" // string | (optional) limit := int32(100) // int32 | (optional) (default to 100) pageToken := "h50ffqz9q5" // string | (optional) sortBy := []string{"SortBy_example"} // []string | Specifies the sort order for the returned accounts. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.AccountsApi.ListAccounts(context.Background()).Id(id).LinkedAccountId(linkedAccountId).OverdraftAccountId(overdraftAccountId).OverflowAccountId(overflowAccountId).AccountNumber(accountNumber).Status(status).InterestProductId(interestProductId).CustomerType(customerType).CustomerId(customerId).BusinessId(businessId).PersonId(personId).FirstName(firstName).LastName(lastName).Limit(limit).PageToken(pageToken).SortBy(sortBy).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AccountsApi.ListAccounts``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ListAccounts`: AccountList fmt.Fprintf(os.Stdout, "Response from `AccountsApi.ListAccounts`: %v\n", resp) } ``` -------------------------------- ### Get Client Single Use Token Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardsApi.md This Go code snippet demonstrates how to generate a single-use token using the Synctera Go client library. It requires a `SingleUseTokenRequest` object containing user token details and returns a `SingleUseTokenResponse`. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { singleUseTokenRequest := *openapiclient.NewSingleUseTokenRequest("9aea04bb-b7c7-46b5-817d-1af05e6b22f2", "e167fa0d-ee40-4a6e-b1ba-f61593fd254e") // SingleUseTokenRequest | User token details configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CardsApi.GetClientSingleUseToken(context.Background()).SingleUseTokenRequest(singleUseTokenRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CardsApi.GetClientSingleUseToken``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetClientSingleUseToken`: SingleUseTokenResponse fmt.Fprintf(os.Stdout, "Response from `CardsApi.GetClientSingleUseToken`: %v\n", resp) } ``` -------------------------------- ### GetApplication Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ApplicationsApi.md Provides an example of how to retrieve a specific credit application using its ID with the Synctera Go client library. It illustrates initializing the client, specifying the application ID, and executing the GetApplication request, including error handling and output. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { applicationId := "2e3304dc-a1c2-427e-ac5a-a2586a95ce1f" // string | Unique identifier for the application. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ApplicationsApi.GetApplication(context.Background(), applicationId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsApi.GetApplication``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetApplication`: ApplicationResponse fmt.Fprintf(os.Stdout, "Response from `ApplicationsApi.GetApplication`: %v\n", resp) } ``` -------------------------------- ### Get External Account Transactions (Go) Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ExternalAccountsApi.md Fetches transactions for a specific external account within a given date range. It initializes the API client, sets the account ID, start date, and end date, then executes the request. Handles potential errors and prints the response. ```go package main import ( "context" "fmt" "os" "time" openapiclient "./openapi" ) func main() { externalAccountId := "63ea71cb-7f86-44c1-956b-77f6cbd6ecf7" // string | External Account ID startDate := time.Now() // string | Date range filtering for transactions. Date is inclusive. Date must be in UTC. endDate := time.Now() // string | Date range filtering for transactions. Date is exclusive. Date must be in UTC. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.ExternalAccountsApi.GetExternalAccountTransactions(context.Background(), externalAccountId).StartDate(startDate).EndDate(endDate).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ExternalAccountsApi.GetExternalAccountTransactions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetExternalAccountTransactions`: ExternalAccountsTransactionList fmt.Fprintf(os.Stdout, "Response from `ExternalAccountsApi.GetExternalAccountTransactions`: %v\n", resp) } ``` -------------------------------- ### Instantiate QuickstartT10Response Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/QuickstartT10Response.md Demonstrates how to create a new instance of the QuickstartT10Response struct using the provided constructor. This ensures all required fields are initialized correctly. ```go func NewQuickstartT10Response(cardProducts []CardProductResponse, cardProgram CardProgramResponse) *QuickstartT10Response { return &QuickstartT10Response{ CardProducts: cardProducts, CardProgram: cardProgram, } } ``` -------------------------------- ### Create Account using Go SDK Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/AccountsApi.md Demonstrates how to initialize the Synctera API client and create a new account. It includes the use of an idempotency key to ensure request safety during retries. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { accountCreation := *openapiclient.NewAccountCreation() idempotencyKey := "df122e6f-2ba8-48a5-9508-4350bba5f27e" configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.AccountsApi.CreateAccount(context.Background()).AccountCreation(accountCreation).IdempotencyKey(idempotencyKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AccountsApi.CreateAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } fmt.Fprintf(os.Stdout, "Response from `AccountsApi.CreateAccount`: %v\n", resp) } ``` -------------------------------- ### CardIssuanceRequest - CustomerId Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, and setting the CustomerId field. ```APIDOC ## CardIssuanceRequest - CustomerId ### Description Provides methods to manage the CustomerId field within a CardIssuanceRequest. ### Methods #### GetCustomerId - **Description**: Returns the CustomerId field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetCustomerId() string` #### GetCustomerIdOk - **Description**: Returns a tuple containing the CustomerId field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetCustomerIdOk() (*string, bool)` #### SetCustomerId - **Description**: Sets the CustomerId field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetCustomerId(v string)` ``` -------------------------------- ### Initialize New Customer Object Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/Customer.md Demonstrates how to instantiate a new Customer object using the provided constructor functions in the Go SDK. ```go import "github.com/synctera/client-libraries-go" // Create a new customer with required status customer := synctera.NewCustomer("ACTIVE") // Create a new customer using default values defaultCustomer := synctera.NewCustomerWithDefaults() ``` -------------------------------- ### CardIssuanceRequest - CardProductId Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, and setting the CardProductId field. ```APIDOC ## CardIssuanceRequest - CardProductId ### Description Provides methods to manage the CardProductId field within a CardIssuanceRequest. ### Methods #### GetCardProductId - **Description**: Returns the CardProductId field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetCardProductId() string` #### GetCardProductIdOk - **Description**: Returns a tuple containing the CardProductId field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetCardProductIdOk() (*string, bool)` #### SetCardProductId - **Description**: Sets the CardProductId field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetCardProductId(v string)` ``` -------------------------------- ### Initialize Synctera Go API Client Source: https://context7.com/synctera/client-libraries-go/llms.txt Demonstrates how to configure the API client, enable debug logging, and set up the authentication context with a Bearer token. This setup is required before making any requests to the Synctera platform. ```go package main import ( "context" "fmt" "log" synctera "github.com/synctera/synctera-client-go/synctera_client" ) func main() { cfg := synctera.NewConfiguration() cfg.Debug = true client := synctera.NewAPIClient(cfg) ctx := context.WithValue(context.Background(), synctera.ContextAccessToken, "YOUR_API_TOKEN") ctx = context.WithValue(ctx, synctera.ContextServerIndex, 1) fmt.Println("Synctera client initialized successfully") } ``` -------------------------------- ### CardIssuanceRequest - AccountId Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, and setting the AccountId field. ```APIDOC ## CardIssuanceRequest - AccountId ### Description Provides methods to manage the AccountId field within a CardIssuanceRequest. ### Methods #### GetAccountId - **Description**: Returns the AccountId field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetAccountId() string` #### GetAccountIdOk - **Description**: Returns a tuple containing the AccountId field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetAccountIdOk() (*string, bool)` #### SetAccountId - **Description**: Sets the AccountId field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetAccountId(v string)` ``` -------------------------------- ### Simulate Authorization Advice - Go Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardTransactionSimulationsApi.md This Go code snippet demonstrates how to simulate an authorization advice request using the Synctera client library. It shows the setup of the request model and the execution of the API call. Dependencies include the Synctera Go client library and standard Go packages. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { // Example: Replace with actual AuthorizationAdviceModel data // authorizationAdviceModel := *openapiclient.NewAuthorizationAdviceModel(...) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CardTransactionSimulationsApi.SimulateAuthorizationAdvice(context.Background()).AuthorizationAdviceModel(authorizationAdviceModel).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CardTransactionSimulationsApi.SimulateAuthorizationAdvice`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SimulateAuthorizationAdvice`: map[string]interface{} fmt.Fprintf(os.Stdout, "Response from `CardTransactionSimulationsApi.SimulateAuthorizationAdvice`: %v\n", resp) } ``` -------------------------------- ### Go: Get and Set Account Type Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/Account.md Contains methods to get the AccountType, get it along with a boolean flag, set a new AccountType, and check if the AccountType has been assigned. This is important for differentiating account classifications. ```go func (o *Account) GetAccountType() AccountType func (o *Account) GetAccountTypeOk() (*AccountType, bool) func (o *Account) SetAccountType(v AccountType) func (o *Account) HasAccountType() bool ``` -------------------------------- ### Go: Get and Set Account Balances Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/Account.md Includes methods to get the list of Balances associated with an account, get them with a boolean flag, set new Balances, and check if Balances have been set. This is critical for financial tracking. ```go func (o *Account) GetBalances() []Balance func (o *Account) GetBalancesOk() (*[]Balance, bool) func (o *Account) SetBalances(v []Balance) func (o *Account) HasBalances() bool ``` -------------------------------- ### Initialize ApplicationListResponse Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ApplicationListResponse.md Methods to instantiate a new ApplicationListResponse object. NewApplicationListResponse requires the list of applications, while NewApplicationListResponseWithDefaults creates an empty instance. ```go func NewApplicationListResponse(externalApplications []ApplicationResponse1) *ApplicationListResponse func NewApplicationListResponseWithDefaults() *ApplicationListResponse ``` -------------------------------- ### Initialize MonitoringSubscriptionList Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/MonitoringSubscriptionList.md Demonstrates how to instantiate a new MonitoringSubscriptionList object using the constructor. This ensures required properties are set correctly. ```go subscriptions := []MonitoringSubscription{} list := NewMonitoringSubscriptionList(subscriptions) ``` -------------------------------- ### Go: Get and Set Account Access Status Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/Account.md Provides methods to get, get with ok check, set, and check for the existence of the AccessStatus field on an Account object. These are essential for managing account access permissions. ```go func (o *Account) GetAccessStatus() AccountAccessStatus func (o *Account) GetAccessStatusOk() (*AccountAccessStatus, bool) func (o *Account) SetAccessStatus(v AccountAccessStatus) func (o *Account) HasAccessStatus() bool ``` -------------------------------- ### Initialize CreateWebhookRequest Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CreateWebhookRequest.md Demonstrates how to instantiate a new CreateWebhookRequest object using the constructor, which ensures required fields are initialized. ```go config := WebhookConfig{} events := []string{"account.created", "transaction.updated"} name := "my-webhook" request := NewCreateWebhookRequest(config, events, name) ``` -------------------------------- ### CardIssuanceRequest - ExpirationMonth Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, setting, and checking for the existence of the ExpirationMonth field. ```APIDOC ## CardIssuanceRequest - ExpirationMonth ### Description Provides methods to manage the ExpirationMonth field within a CardIssuanceRequest. ### Methods #### GetExpirationMonth - **Description**: Returns the ExpirationMonth field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetExpirationMonth() string` #### GetExpirationMonthOk - **Description**: Returns a tuple containing the ExpirationMonth field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetExpirationMonthOk() (*string, bool)` #### SetExpirationMonth - **Description**: Sets the ExpirationMonth field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetExpirationMonth(v string)` #### HasExpirationMonth - **Description**: Returns true if the ExpirationMonth field has been set, false otherwise. - **Signature**: `func (o *CardIssuanceRequest) HasExpirationMonth() bool` ``` -------------------------------- ### CardIssuanceRequest - EmbossName Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, setting, and checking for the existence of the EmbossName field. ```APIDOC ## CardIssuanceRequest - EmbossName ### Description Provides methods to manage the EmbossName field within a CardIssuanceRequest. ### Methods #### GetEmbossName - **Description**: Returns the EmbossName field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetEmbossName() EmbossName` #### GetEmbossNameOk - **Description**: Returns a tuple containing the EmbossName field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetEmbossNameOk() (*EmbossName, bool)` #### SetEmbossName - **Description**: Sets the EmbossName field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetEmbossName(v EmbossName)` #### HasEmbossName - **Description**: Returns true if the EmbossName field has been set, false otherwise. - **Signature**: `func (o *CardIssuanceRequest) HasEmbossName() bool` ``` -------------------------------- ### Instantiate BusinessList Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/BusinessList.md Demonstrates how to create a new instance of the BusinessList model using the provided constructor functions. ```go list := NewBusinessList(businesses) defaultList := NewBusinessListWithDefaults() ``` -------------------------------- ### Create Account Template in Go Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/AccountsApi.md Demonstrates how to initialize the API client and send a request to create a new account template. It includes setting an optional idempotency key to ensure request safety. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { accountTemplate := *openapiclient.NewAccountTemplate(false, "Name_example", openapiclient.template_fields{TemplateFieldsDepository: openapiclient.NewTemplateFieldsDepository(openapiclient.account_type("SAVING"), "US", "USD")}) idempotencyKey := "df122e6f-2ba8-48a5-9508-4350bba5f27e" configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.AccountsApi.CreateAccountTemplate(context.Background()).AccountTemplate(accountTemplate).IdempotencyKey(idempotencyKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AccountsApi.CreateAccountTemplate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } fmt.Fprintf(os.Stdout, "Response from `AccountsApi.CreateAccountTemplate`: %v\n", resp) } ``` -------------------------------- ### CardIssuanceRequest - CreationTime Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, setting, and checking for the existence of the CreationTime field. ```APIDOC ## CardIssuanceRequest - CreationTime ### Description Provides methods to manage the CreationTime field within a CardIssuanceRequest. ### Methods #### GetCreationTime - **Description**: Returns the CreationTime field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetCreationTime() time.Time` #### GetCreationTimeOk - **Description**: Returns a tuple containing the CreationTime field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetCreationTimeOk() (*time.Time, bool)` #### SetCreationTime - **Description**: Sets the CreationTime field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetCreationTime(v time.Time)` #### HasCreationTime - **Description**: Returns true if the CreationTime field has been set, false otherwise. - **Signature**: `func (o *CardIssuanceRequest) HasCreationTime() bool` ``` -------------------------------- ### CardIssuanceRequest - CardBrand Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, setting, and checking for the existence of the CardBrand field. ```APIDOC ## CardIssuanceRequest - CardBrand ### Description Provides methods to manage the CardBrand field within a CardIssuanceRequest. ### Methods #### GetCardBrand - **Description**: Returns the CardBrand field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetCardBrand() CardBrand` #### GetCardBrandOk - **Description**: Returns a tuple containing the CardBrand field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetCardBrandOk() (*CardBrand, bool)` #### SetCardBrand - **Description**: Sets the CardBrand field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetCardBrand(v CardBrand)` #### HasCardBrand - **Description**: Returns true if the CardBrand field has been set, false otherwise. - **Signature**: `func (o *CardIssuanceRequest) HasCardBrand() bool` ``` -------------------------------- ### Initialize WaitlistAnalyticsList Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/WaitlistAnalyticsList.md Demonstrates how to instantiate a new WaitlistAnalyticsList using the standard constructor or the defaults-only constructor. ```go list := NewWaitlistAnalyticsList(analyticsData) defaultList := NewWaitlistAnalyticsListWithDefaults() ``` -------------------------------- ### Initialize CustomerVerifyResponse Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CustomerVerifyResponse.md Demonstrates how to instantiate a new CustomerVerifyResponse object using the constructor, which ensures required fields are initialized. ```go kycStatus := CustomerKycStatus("PASSED") verifications := []CustomerVerificationResult{} response := NewCustomerVerifyResponse(kycStatus, verifications) ``` -------------------------------- ### CardIssuanceRequest - Bin Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardIssuanceRequest.md Methods for getting, getting with ok check, setting, and checking for the existence of the Bin field. ```APIDOC ## CardIssuanceRequest - Bin ### Description Provides methods to manage the Bin field within a CardIssuanceRequest. ### Methods #### GetBin - **Description**: Returns the Bin field if non-nil, otherwise returns the zero value. - **Signature**: `func (o *CardIssuanceRequest) GetBin() string` #### GetBinOk - **Description**: Returns a tuple containing the Bin field and a boolean indicating if it was set. - **Signature**: `func (o *CardIssuanceRequest) GetBinOk() (*string, bool)` #### SetBin - **Description**: Sets the Bin field to the provided value. - **Signature**: `func (o *CardIssuanceRequest) SetBin(v string)` #### HasBin - **Description**: Returns true if the Bin field has been set, false otherwise. - **Signature**: `func (o *CardIssuanceRequest) HasBin() bool` ``` -------------------------------- ### Get and Set DoingBusinessAs - Go Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ApplicationRequest.md Allows getting and setting the DoingBusinessAs field for an ApplicationRequest. GetDoingBusinessAs retrieves the value, and SetDoingBusinessAs updates it. ```go func (o *ApplicationRequest) GetDoingBusinessAs() string { return o.DoingBusinessAs } func (o *ApplicationRequest) SetDoingBusinessAs(v string) { o.DoingBusinessAs = v } ``` -------------------------------- ### Initialize BinAndDebitNetwork Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/BinAndDebitNetwork.md Demonstrates how to instantiate a new BinAndDebitNetwork object using the constructor. This ensures required properties are set. ```go func NewBinAndDebitNetwork(bankNetworkId string, bin Bin, debitNetwork DebitNetwork) *BinAndDebitNetwork { return &BinAndDebitNetwork{ BankNetworkId: bankNetworkId, Bin: bin, DebitNetwork: debitNetwork, } } ``` -------------------------------- ### SimulateAuthorizationAdvice Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardTransactionSimulationsApi.md This Go code snippet demonstrates how to simulate an authorization advice using the Synctera client library. It includes setting up the API client and making the SimulateAuthorizationAdvice call with an AuthorizationAdviceModel. Error handling and response printing are included. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { authorizationAdviceModel := *openapiclient.NewAuthorizationAdviceModel(int32(123), "OriginalTransactionId_example") // AuthorizationAdviceModel | Authorization advice details (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CardTransactionSimulationsApi.SimulateAuthorizationAdvice(context.Background()).AuthorizationAdviceModel(authorizationAdviceModel).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CardTransactionSimulationsApi.SimulateAuthorizationAdvice``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SimulateAuthorizationAdvice`: map[string]interface{} fmt.Fprintf(os.Stdout, "Response from `CardTransactionSimulationsApi.SimulateAuthorizationAdvice`: %v\n", resp) } ``` -------------------------------- ### Set and Get RelationshipType for PatchPersonBusinessRelationshipAllOf Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/PatchPersonBusinessRelationshipAllOf.md Provides methods to set, get, and check for the existence of the 'RelationshipType' field. This is useful for managing the type of relationship. ```go func (o *PatchPersonBusinessRelationshipAllOf) GetRelationshipType() string func (o *PatchPersonBusinessRelationshipAllOf) GetRelationshipTypeOk() (*string, bool) func (o *PatchPersonBusinessRelationshipAllOf) SetRelationshipType(v string) ``` -------------------------------- ### Get and Set FirstName - Go Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ApplicationRequest.md Functions to get and set the first name for an ApplicationRequest. GetFirstName retrieves the first name, and SetFirstName updates it. ```go func (o *ApplicationRequest) GetFirstName() string { return o.FirstName } func (o *ApplicationRequest) SetFirstName(v string) { o.FirstName = v } ``` -------------------------------- ### Initialize CardProductAllOf Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/CardProductAllOf.md Demonstrates how to instantiate a new CardProductAllOf object using the required parameters. This ensures all mandatory fields are set upon creation. ```go import "time" // Create a new instance with required fields cardProduct := NewCardProductAllOf( true, "program-123", "Standard Debit", time.Now(), ) ``` -------------------------------- ### List Watchlist Subscriptions Go Example Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/WatchlistApi.md Shows how to list watchlist monitoring subscriptions for a customer using the Synctera Go client library. This function requires a customer ID and uses the WatchlistApi. The example includes setting up the API client, executing the request, and handling potential errors. ```go package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { customerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The customer's unique identifier configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.WatchlistApi.ListWatchlistSubscriptions(context.Background(), customerId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `WatchlistApi.ListWatchlistSubscriptions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ListWatchlistSubscriptions`: WatchlistSubscriptionList fmt.Fprintf(os.Stdout, "Response from `WatchlistApi.ListWatchlistSubscriptions`: %v\n", resp) } ``` -------------------------------- ### Get and Set Email - Go Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/ApplicationRequest.md Provides functionality to get and set the Email address for an ApplicationRequest. GetEmail returns the email, and SetEmail updates it. ```go func (o *ApplicationRequest) GetEmail() string { return o.Email } func (o *ApplicationRequest) SetEmail(v string) { o.Email = v } ``` -------------------------------- ### Initialize EmploymentList Source: https://github.com/synctera/client-libraries-go/blob/main/synctera_client/docs/EmploymentList.md Demonstrates how to instantiate a new EmploymentList object using the provided constructor. This ensures required fields are initialized correctly. ```go employmentData := []Employment{...} list := NewEmploymentList(employmentData) ```