### GET /gateway/setup/list Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md Retrieves a list of all configured payment gateway setups. ```APIDOC ## GET /gateway/setup/list ### Description Retrieves a list of all configured payment gateway setups available in the system. This endpoint provides an overview of all active and inactive payment gateways. ### Method GET ### Endpoint /gateway/setup/list ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **code** (integer) - Response code - **msg** (string) - Success message - **data** (array) - A list of payment gateway setup objects. - **gateway_id** (integer) - The unique identifier for the gateway. - **gateway_name** (string) - The name of the payment gateway. - **is_default** (boolean) - Indicates if this is the default gateway. - **status** (string) - The current status of the gateway (e.g., 'active', 'inactive'). #### Response Example ```json { "code": 0, "msg": "Success", "data": [ { "gateway_id": 1, "gateway_name": "Stripe", "is_default": true, "status": "active" }, { "gateway_id": 2, "gateway_name": "PayPal", "is_default": false, "status": "active" } ] } ``` ``` -------------------------------- ### Get Merchant Checkout List with Go Client Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md Shows how to retrieve a list of merchant checkouts using the unibee-go-client. The example initializes the client and uses an optional search key to filter the results before executing the API call. Includes basic error handling. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { searchKey := "searchKey_example" // string | Search checkout id|name|description (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CheckoutSetup.CheckoutListGet(context.Background()).SearchKey(searchKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CheckoutSetup.CheckoutListGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CheckoutListGet`: MerchantCheckoutListGet200Response fmt.Fprintf(os.Stdout, "Response from `CheckoutSetup.CheckoutListGet`: %v\n", resp) } ``` -------------------------------- ### Get Payment Gateway Setup List (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md Provides an example of how to retrieve a list of configured payment gateways for a merchant using the UniBee Go client. It directly calls the `GatewaySetupListGet` method without requiring any parameters. Error logging is included. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Gateway.GatewaySetupListGet(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Gateway.GatewaySetupListGet`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GatewaySetupListGet`: MerchantGatewayEditSortPost200Response fmt.Fprintf(os.Stdout, "Response from `Gateway.GatewaySetupListGet`: %v\n", resp) } ``` -------------------------------- ### GET /merchant/gateway/setup_list Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md Retrieves a list of payment gateway setups. This includes configurations and available options. ```APIDOC ## GET /merchant/gateway/setup_list ### Description Retrieves a list of payment gateway setups. This includes configurations and available options. ### Method GET ### Endpoint /merchant/gateway/setup_list ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **code** (integer) - Response code. - **msg** (string) - Response message. - **data** (object) - Response data containing a list of gateway setups. #### Response Example ```json { "code": 0, "msg": "Success", "data": { "paymentGateways": [ { "gatewayId": 123, "gatewayName": "Stripe", "availableMethods": ["card", "bank_transfer"] } ] } } ``` ``` -------------------------------- ### Setup Track Segment (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md This Go code snippet illustrates how to set up a track segment using the UniBee Go client. It shows the initialization of the API client and the subsequent call to the `TrackSetupSegmentPost` endpoint with a `UnibeeApiMerchantTrackSetupSegmentReq` object. The example includes basic error handling. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { // This is a placeholder for the actual request object // For example: unibeeApiMerchantTrackSetupSegmentReq := *openapiclient.NewUnibeeApiMerchantTrackSetupSegmentReq(...) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) // Assuming a valid request object `unibeeApiMerchantTrackSetupSegmentReq` is created // resp, r, err := apiClient.Track.TrackSetupSegmentPost(context.Background()).UnibeeApiMerchantTrackSetupSegmentReq(unibeeApiMerchantTrackSetupSegmentReq).Execute() // Placeholder for demonstration purposes as the request object creation is not fully defined in the input. fmt.Println("Track setup segment post function called (example is illustrative).") // if err != nil { // fmt.Fprintf(os.Stderr, "Error when calling `Track.TrackSetupSegmentPost``: %v\n", err) // fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) // } // // response from `TrackSetupSegmentPost`: MerchantAuthSsoClearTotpPost200Response // fmt.Fprintf(os.Stdout, "Response from `Track.TrackSetupSegmentPost`: %v\n", resp) } ``` -------------------------------- ### Setup Multi Currencies Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Merchant.md Provides an example of how to set up multi-currency options in UniBee using the Go client. This function requires an instance of `UnibeeApiMerchantProfileSetupMultiCurrenciesReq` and calls the `Merchant.SetupMultiCurrenciesPost` method. The result is a `MerchantSetupMultiCurrenciesPost200Response`. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantProfileSetupMultiCurrenciesReq := *openapiclient.NewUnibeeApiMerchantProfileSetupMultiCurrenciesReq() // UnibeeApiMerchantProfileSetupMultiCurrenciesReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Merchant.SetupMultiCurrenciesPost(context.Background()).UnibeeApiMerchantProfileSetupMultiCurrenciesReq(unibeeApiMerchantProfileSetupMultiCurrenciesReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Merchant.SetupMultiCurrenciesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SetupMultiCurrenciesPost`: MerchantSetupMultiCurrenciesPost200Response fmt.Fprintf(os.Stdout, "Response from `Merchant.SetupMultiCurrenciesPost`: %v\n", resp) } ``` -------------------------------- ### Setup New Credit Configuration using Go Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Credit.md This Go example demonstrates how to set up a new credit configuration using the Unibee Go Client. It sends a POST request to the `CreditNewConfigPost` endpoint, requiring a currency and an integer. The snippet includes error handling and prints the API response. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantCreditNewConfigReq := *openapiclient.NewUnibeeApiMerchantCreditNewConfigReq("Currency_example", int32(123)) // UnibeeApiMerchantCreditNewConfigReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Credit.CreditNewConfigPost(context.Background()).UnibeeApiMerchantCreditNewConfigReq(unibeeApiMerchantCreditNewConfigReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Credit.CreditNewConfigPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreditNewConfigPost`: MerchantCreditEditConfigPost200Response fmt.Fprintf(os.Stdout, "Response from `Credit.CreditNewConfigPost`: %v\n", resp) } ``` -------------------------------- ### Get Merchant Checkout Link with Go Client Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md Demonstrates how to fetch a merchant checkout link using the unibee-go-client. It initializes the client, sets up the request with checkout and plan IDs, and executes the API call. Error handling for the API response is included. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantCheckoutGetLinkReq := *openapiclient.NewUnibeeApiMerchantCheckoutGetLinkReq(int64(123), int64(123)) // UnibeeApiMerchantCheckoutGetLinkReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CheckoutSetup.CheckoutGetLinkPost(context.Background()).UnibeeApiMerchantCheckoutGetLinkReq(unibeeApiMerchantCheckoutGetLinkReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CheckoutSetup.CheckoutGetLinkPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CheckoutGetLinkPost`: MerchantCheckoutGetLinkGet200Response fmt.Fprintf(os.Stdout, "Response from `CheckoutSetup.CheckoutGetLinkPost`: %v\n", resp) } ``` -------------------------------- ### Create New Merchant Checkout using UniBee Go Client Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md This Go code snippet shows how to create a new merchant checkout with the UniBee Go client. It sets up the client, prepares the new checkout request, and executes the API call. The example includes basic error checking and prints the response, which is of type MerchantCheckoutDetailGet200Response. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantCheckoutNewReq := *openapiclient.NewUnibeeApiMerchantCheckoutNewReq() // UnibeeApiMerchantCheckoutNewReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.CheckoutSetup.CheckoutNewCheckoutPost(context.Background()).UnibeeApiMerchantCheckoutNewReq(unibeeApiMerchantCheckoutNewReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CheckoutSetup.CheckoutNewCheckoutPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CheckoutNewCheckoutPost`: MerchantCheckoutDetailGet200Response fmt.Fprintf(os.Stdout, "Response from `CheckoutSetup.CheckoutNewCheckoutPost`: %v\n", resp) } ``` -------------------------------- ### Create Product - Go Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Product.md Provides an example of how to create a new product using the UniBee Go Client. It initializes the client, prepares the product creation request object, and sends it to the API. Error handling for the API call is included. ```Go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantProductNewReq := *openapiclient.NewUnibeeApiMerchantProductNewReq() // UnibeeApiMerchantProductNewReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Product.ProductNewPost(context.Background()).UnibeeApiMerchantProductNewReq(unibeeApiMerchantProductNewReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Product.ProductNewPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ProductNewPost`: MerchantProductCopyPost200Response fmt.Fprintf(os.Stdout, "Response from `Product.ProductNewPost`: %v\n", resp) } ``` -------------------------------- ### Setup Payment Gateway with Go Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md Demonstrates how to set up a payment gateway using the UniBee Go Client. It requires creating a configuration, an API client, and making a POST request to the GatewaySetup endpoint with the necessary gateway details. The response indicates the success or failure of the setup. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantGatewaySetupReq := *openapiclient.NewUnibeeApiMerchantGatewaySetupReq("GatewayName_example") // UnibeeApiMerchantGatewaySetupReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Gateway.GatewaySetupPost(context.Background()).UnibeeApiMerchantGatewaySetupReq(unibeeApiMerchantGatewaySetupReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Gateway.GatewaySetupPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GatewaySetupPost`: MerchantGatewayArchivePost200Response fmt.Fprintf(os.Stdout, "Response from `Gateway.GatewaySetupPost`: %v\n", resp) } ``` -------------------------------- ### GET /merchant/checkout/detail Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md Retrieves the details of a specific merchant checkout. Use this endpoint to get comprehensive information about a particular checkout by its ID. ```APIDOC ## GET /merchant/checkout/detail ### Description Get Merchant Checkout Detail. ### Method GET ### Endpoint /merchant/checkout/detail ### Parameters #### Path Parameters None #### Query Parameters - **checkout_id** (integer) - Required - The ID of the checkout to retrieve. #### Request Body None ### Request Example ```json { "checkout_id": 789 } ``` ### Response #### Success Response (200) - **MerchantCheckoutDetailGet200Response** (MerchantCheckoutDetailGet200Response) - An object containing the detailed information of the specified checkout. #### Response Example ```json { "code": 0, "msg": "success", "data": { "checkout_id": "chk_xyz789", "status": "completed", "amount": { "currency": "USD", "value": 10000 } } } ``` ``` -------------------------------- ### Instantiate UnibeeApiSystemSubscriptionTestClockWalkReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiSystemSubscriptionTestClockWalkReq.md Provides methods to create new instances of UnibeeApiSystemSubscriptionTestClockWalkReq. The 'NewUnibeeApiSystemSubscriptionTestClockWalkReq' constructor requires specific arguments, while 'NewUnibeeApiSystemSubscriptionTestClockWalkReqWithDefaults' uses default values. ```Go func NewUnibeeApiSystemSubscriptionTestClockWalkReq(newTestClock int64, subscriptionId string, ) *UnibeeApiSystemSubscriptionTestClockWalkReq { return &UnibeeApiSystemSubscriptionTestClockWalkReq{NewTestClock: newTestClock, SubscriptionId: subscriptionId} } func NewUnibeeApiSystemSubscriptionTestClockWalkReqWithDefaults() *UnibeeApiSystemSubscriptionTestClockWalkReq { return &UnibeeApiSystemSubscriptionTestClockWalkReq{} } ``` -------------------------------- ### Get and Set CreateTimeStart for UnibeeApiMerchantDiscountUserDiscountListReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantDiscountUserDiscountListReq.md Provides methods to get, check, and set the 'CreateTimeStart' field, which represents the start of the creation time range in UTC seconds. This is an optional field. ```go func (o *UnibeeApiMerchantDiscountUserDiscountListReq) GetCreateTimeStart() int64 { // ... implementation details ... } func (o *UnibeeApiMerchantDiscountUserDiscountListReq) GetCreateTimeStartOk() (*int64, bool) { // ... implementation details ... } func (o *UnibeeApiMerchantDiscountUserDiscountListReq) SetCreateTimeStart(v int64) { // ... implementation details ... } func (o *UnibeeApiMerchantDiscountUserDiscountListReq) HasCreateTimeStart() bool { // ... implementation details ... } ``` -------------------------------- ### Set up VAT Gateway using UniBee Go Client Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/VatGateway.md This Go code snippet demonstrates how to set up a VAT gateway using the UniBee Go Client. It initializes the client, creates a request object with necessary details, and calls the `VatSetupGatewayPost` method to configure the gateway. Error handling for the API call is included, and the response is printed to standard output. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantVatSetupGatewayReq := *openapiclient.NewUnibeeApiMerchantVatSetupGatewayReq("Data_example", "GatewayName_example") // UnibeeApiMerchantVatSetupGatewayReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.VatGateway.VatSetupGatewayPost(context.Background()).UnibeeApiMerchantVatSetupGatewayReq(unibeeApiMerchantVatSetupGatewayReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VatGateway.VatSetupGatewayPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `VatSetupGatewayPost`: MerchantEmailGatewaySetupPost200Response fmt.Fprintf(os.Stdout, "Response from `VatGateway.VatSetupGatewayPost`: %v\n", resp) } ``` -------------------------------- ### GetReportTimeStart and SetReportTimeStart for MerchantInvoiceListReq in Go Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantInvoiceListReq.md Facilitates getting and setting the 'ReportTimeStart' for merchant invoice list requests. GetReportTimeStartOk returns the start report time and a boolean indicating its availability. SetReportTimeStart updates the start report time. HasReportTimeStart verifies if the start report time is set. ```Go func (o *UnibeeApiMerchantInvoiceListReq) GetReportTimeStartOk() (*int64, bool) func (o *UnibeeApiMerchantInvoiceListReq) SetReportTimeStart(v int64) func (o *UnibeeApiMerchantInvoiceListReq) HasReportTimeStart() bool ``` -------------------------------- ### UnibeeApiBeanMerchantBatchTask Constructor Methods Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiBeanMerchantBatchTask.md Information on how to instantiate a new UnibeeApiBeanMerchantBatchTask object using the provided constructor methods. ```APIDOC ## UnibeeApiBeanMerchantBatchTask Constructors ### Description These methods are used to create new instances of the `UnibeeApiBeanMerchantBatchTask` object. ### Methods #### `NewUnibeeApiBeanMerchantBatchTask()` * **Description**: Instantiates a new `UnibeeApiBeanMerchantBatchTask` object. This constructor assigns default values to properties that have them defined and ensures required properties are set. The set of arguments may change if the set of required properties is altered. * **Signature**: `func NewUnibeeApiBeanMerchantBatchTask() *UnibeeApiBeanMerchantBatchTask` #### `NewUnibeeApiBeanMerchantBatchTaskWithDefaults()` * **Description**: Instantiates a new `UnibeeApiBeanMerchantBatchTask` object. This constructor only assigns default values to properties that have them defined, but it does not guarantee that properties required by the API are set. * **Signature**: `func NewUnibeeApiBeanMerchantBatchTaskWithDefaults() *UnibeeApiBeanMerchantBatchTask` ``` -------------------------------- ### Get and Set StartTime for UnibeeApiSystemInvoiceInternalWebhookSyncReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiSystemInvoiceInternalWebhookSyncReq.md Provides methods to get, get with OK status, set, and check for the presence of the StartTime field in the UnibeeApiSystemInvoiceInternalWebhookSyncReq struct. StartTime represents the start time for invoice data synchronization. ```Go func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) GetStartTime() int32 { // ... implementation ... } func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) GetStartTimeOk() (*int32, bool) { // ... implementation ... } func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) SetStartTime(v int32) { // ... implementation ... } func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) HasStartTime() bool { // ... implementation ... } ``` -------------------------------- ### Setup Exchange Rate API (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md Shows how to set up an exchange rate API for a merchant using the UniBee Go client. It initializes a `UnibeeApiMerchantGatewaySetupExchangeApiReq` and invokes the `GatewaySetupExchangeRateApiPost` method. Includes basic error reporting. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantGatewaySetupExchangeApiReq := *openapiclient.NewUnibeeApiMerchantGatewaySetupExchangeApiReq() // UnibeeApiMerchantGatewaySetupExchangeApiReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Gateway.GatewaySetupExchangeRateApiPost(context.Background()).UnibeeApiMerchantGatewaySetupExchangeApiReq(unibeeApiMerchantGatewaySetupExchangeApiReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Gateway.GatewaySetupExchangeRateApiPost`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GatewaySetupExchangeRateApiPost`: MerchantGatewaySetupExchangeRateApiPost200Response fmt.Fprintf(os.Stdout, "Response from `Gateway.GatewaySetupExchangeRateApiPost`: %v\n", resp) } ``` -------------------------------- ### Get and Set StartId for UnibeeApiSystemInvoiceInternalWebhookSyncReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiSystemInvoiceInternalWebhookSyncReq.md Provides methods to get, get with OK status, set, and check for the presence of the StartId field in the UnibeeApiSystemInvoiceInternalWebhookSyncReq struct. StartId represents the start ID for invoice data synchronization. ```Go func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) GetStartId() string { // ... implementation ... } func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) GetStartIdOk() (*string, bool) { // ... implementation ... } func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) SetStartId(v string) { // ... implementation ... } func (o *UnibeeApiSystemInvoiceInternalWebhookSyncReq) HasStartId() bool { // ... implementation ... } ``` -------------------------------- ### Initialize UnibeeApiMerchantSubscriptionCancelReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantSubscriptionCancelReq.md Provides constructors for creating new instances of UnibeeApiMerchantSubscriptionCancelReq. These methods handle default value assignments and ensure required API properties are set. ```go func NewUnibeeApiMerchantSubscriptionCancelReq() *UnibeeApiMerchantSubscriptionCancelReq { // ... implementation details ... } func NewUnibeeApiMerchantSubscriptionCancelReqWithDefaults() *UnibeeApiMerchantSubscriptionCancelReq { // ... implementation details ... } ``` -------------------------------- ### Go: Get and Set Discount Start Time Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantDiscountEditReq.md Functions to access and modify the 'StartTime' field for discount edits. GetStartTimeOk returns the start time and a boolean indicating if it's set. SetStartTime updates the start time, and HasStartTime checks for its existence. ```Go func (o *UnibeeApiMerchantDiscountEditReq) GetStartTime() int32 // GetStartTime returns the StartTime field if non-nil, zero value otherwise. func (o *UnibeeApiMerchantDiscountEditReq) GetStartTimeOk() (*int32, bool) // GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. ``` -------------------------------- ### Setup Payment Gateway Webhook with Go Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md Illustrates how to set up a webhook for a payment gateway using the UniBee Go Client. This involves initializing the client and sending a POST request to the GatewaySetupWebhookPost endpoint with the webhook configuration. The function returns a response indicating the status of the webhook setup. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantGatewaySetupWebhookReq := *openapiclient.NewUnibeeApiMerchantGatewaySetupWebhookReq(int64(123)) // UnibeeApiMerchantGatewaySetupWebhookReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Gateway.GatewaySetupWebhookPost(context.Background()).UnibeeApiMerchantGatewaySetupWebhookReq(unibeeApiMerchantGatewaySetupWebhookReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Gateway.GatewaySetupWebhookPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GatewaySetupWebhookPost`: MerchantGatewaySetupWebhookPost200Response fmt.Fprintf(os.Stdout, "Response from `Gateway.GatewaySetupWebhookPost`: %v\n", resp) } ``` -------------------------------- ### UnibeeInternalLogicMiddlewareLicensePlan Constructors Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeInternalLogicMiddlewareLicensePlan.md Methods for creating new instances of UnibeeInternalLogicMiddlewareLicensePlan. ```APIDOC ## Constructors ### NewUnibeeInternalLogicMiddlewareLicensePlan `func NewUnibeeInternalLogicMiddlewareLicensePlan() *UnibeeInternalLogicMiddlewareLicensePlan` **Description:** Instantiates a new UnibeeInternalLogicMiddlewareLicensePlan object. This constructor assigns default values to properties where defined and ensures required properties are set. The set of arguments may change if the set of required properties is altered. ### NewUnibeeInternalLogicMiddlewareLicensePlanWithDefaults `func NewUnibeeInternalLogicMiddlewareLicensePlanWithDefaults() *UnibeeInternalLogicMiddlewareLicensePlan` **Description:** Instantiates a new UnibeeInternalLogicMiddlewareLicensePlan object. This constructor only assigns default values to properties that have them defined and does not guarantee that properties required by the API are set. ``` -------------------------------- ### Get and Set Payment Country Code Property (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantPaymentListReq.md This Go code example demonstrates the usage of methods to get and set the 'CountryCode' property within the UnibeeApiMerchantPaymentListReq struct. It covers retrieving the value, checking its existence, and updating it. ```go package main import "fmt" func main() { req := NewUnibeeApiMerchantPaymentListReq() // Set the CountryCode property req.SetCountryCode("US") // Get the CountryCode property countryCode := req.GetCountryCode() fmt.Printf("Country Code: %s\n", countryCode) // Get the CountryCode property with a boolean indicating if it was set countryCodeOk, ok := req.GetCountryCodeOk() if ok { fmt.Printf("Country Code (ok): %s\n", *countryCodeOk) } // Check if the CountryCode property has been set hasCountryCode := req.HasCountryCode() fmt.Printf("Has Country Code: %t\n", hasCountryCode) } ``` -------------------------------- ### Get MinimumAmount Property for UnibeeApiMerchantGatewayWireTransferSetupReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantGatewayWireTransferSetupReq.md Provides the method to get the MinimumAmount property from the UnibeeApiMerchantGatewayWireTransferSetupReq struct. MinimumAmount is a required int64 field representing the minimum amount in cents for wire transfers. ```go func (o *UnibeeApiMerchantGatewayWireTransferSetupReq) GetMinimumAmount() int64 { // ... implementation details } ``` -------------------------------- ### Setup Wire Transfer Gateway (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Gateway.md This Go code snippet demonstrates how to set up a wire transfer gateway using the UniBee Go client. It initializes the API client, creates a `UnibeeApiMerchantGatewayWireTransferSetupReq` object, and sends the request to the `GatewayWireTransferSetupPost` endpoint. Error handling for the API call is included. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/UniBee-Billing/unibee-go-client" ) func main() { unibeeApiMerchantGatewayWireTransferSetupReq := *openapiclient.NewUnibeeApiMerchantGatewayWireTransferSetupReq("Currency_example", int64(123)) // UnibeeApiMerchantGatewayWireTransferSetupReq | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.Gateway.GatewayWireTransferSetupPost(context.Background()).UnibeeApiMerchantGatewayWireTransferSetupReq(unibeeApiMerchantGatewayWireTransferSetupReq).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Gateway.GatewayWireTransferSetupPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GatewayWireTransferSetupPost`: MerchantGatewayArchivePost200Response fmt.Fprintf(os.Stdout, "Response from `Gateway.GatewayWireTransferSetupPost`: %v\n", resp) } ``` -------------------------------- ### Create UnibeeApiBeanPlan Object (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiBeanPlan.md Provides constructors for creating new UnibeeApiBeanPlan objects. NewUnibeeApiBeanPlan initializes with default values, while NewUnibeeApiBeanPlanWithDefaults assigns only default values to defined properties. ```go func NewUnibeeApiBeanPlan() *UnibeeApiBeanPlan { // ... implementation ... } func NewUnibeeApiBeanPlanWithDefaults() *UnibeeApiBeanPlan { // ... implementation ... } ``` -------------------------------- ### Unibee Go Client: Get and Set CancelAtTrialEnd for Plan Edit Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantPlanEditReq.md Provides Go code examples for getting and setting the `CancelAtTrialEnd` field in `UnibeeApiMerchantPlanEditReq`. This boolean-like integer (0 for false, 1 for true) determines if a subscription cancels at the end of its first trial period. ```go package main import "fmt" func main() { planEditReq := NewUnibeeApiMerchantPlanEditReq(12345) // Set CancelAtTrialEnd to true (1) planEditReq.SetCancelAtTrialEnd(1) // Get CancelAtTrialEnd cancelStatus := planEditReq.GetCancelAtTrialEnd() fmt.Printf("CancelAtTrialEnd: %d\n", cancelStatus) // Get CancelAtTrialEnd with ok check cancelStatusOk, ok := planEditReq.GetCancelAtTrialEndOk() if ok { fmt.Printf("CancelAtTrialEnd (Ok): %d\n", *cancelStatusOk) } else { fmt.Println("CancelAtTrialEnd not set.") } } // Mock definitions for demonstration purposes type UnibeeApiMerchantPlanEditReq struct { CancelAtTrialEnd *int32 PlanId int64 } func NewUnibeeApiMerchantPlanEditReq(planId int64) *UnibeeApiMerchantPlanEditReq { return &UnibeeApiMerchantPlanEditReq{PlanId: planId} } func (o *UnibeeApiMerchantPlanEditReq) GetCancelAtTrialEnd() int32 { if o.CancelAtTrialEnd != nil { return *o.CancelAtTrialEnd } return 0 // Default value is 0 (false) } func (o *UnibeeApiMerchantPlanEditReq) GetCancelAtTrialEndOk() (*int32, bool) { if o.CancelAtTrialEnd != nil { return o.CancelAtTrialEnd, true } return nil, false } func (o *UnibeeApiMerchantPlanEditReq) SetCancelAtTrialEnd(v int32) { o.CancelAtTrialEnd = &v } ``` -------------------------------- ### GET /api/merchant/checkout/list Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md Retrieves a list of merchant checkouts. This endpoint allows merchants to search and view their checkouts. ```APIDOC ## GET /api/merchant/checkout/list ### Description Retrieves a list of merchant checkouts. This endpoint allows merchants to search and view their checkouts. ### Method GET ### Endpoint /api/merchant/checkout/list ### Parameters #### Path Parameters None #### Query Parameters - **searchKey** (string) - Optional - Search checkout id, name, or description. #### Request Body None ### Request Example ```json { "searchKey": "searchKey_example" } ``` ### Response #### Success Response (200) - **merchantCheckoutListGet200Response** (MerchantCheckoutListGet200Response) - Description of the successful response containing a list of checkouts. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Instantiate UnibeeApiMerchantEmailGatewaySetupReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantEmailGatewaySetupReq.md Provides constructors for creating new instances of UnibeeApiMerchantEmailGatewaySetupReq. NewUnibeeApiMerchantEmailGatewaySetupReq requires essential data, while NewUnibeeApiMerchantEmailGatewaySetupReqWithDefaults allows for instantiation with default values. ```go func NewUnibeeApiMerchantEmailGatewaySetupReq(data string, gatewayName string, ) *UnibeeApiMerchantEmailGatewaySetupReq { // ... implementation details ... } func NewUnibeeApiMerchantEmailGatewaySetupReqWithDefaults() *UnibeeApiMerchantEmailGatewaySetupReq { // ... implementation details ... } ``` -------------------------------- ### Create UnibeeApiMerchantProductDetailReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantProductDetailReq.md Provides constructors for creating new instances of UnibeeApiMerchantProductDetailReq. The first constructor requires a ProductId, while the second uses default values. These are essential for initializing the request object for product detail operations. ```go func NewUnibeeApiMerchantProductDetailReq(productId int64) *UnibeeApiMerchantProductDetailReq { // ... implementation ... } func NewUnibeeApiMerchantProductDetailReqWithDefaults() *UnibeeApiMerchantProductDetailReq { // ... implementation ... } ``` -------------------------------- ### GET /merchant/checkout/get_link Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md Generates a link for a merchant checkout. This endpoint provides a URL that can be shared with customers to complete a checkout. ```APIDOC ## GET /merchant/checkout/get_link ### Description Get Merchant Checkout Link. ### Method GET ### Endpoint /merchant/checkout/get_link ### Parameters #### Path Parameters None #### Query Parameters - **checkout_id** (string) - Required - The ID of the checkout for which to generate a link. #### Request Body None ### Request Example ```json { "checkout_id": "chk_abc123" } ``` ### Response #### Success Response (200) - **GetCheckoutLinkResp** (GetCheckoutLinkResp) - An object containing the generated checkout link. #### Response Example ```json { "code": 0, "msg": "success", "data": { "link": "https://api.unibee.top/checkout/pay?id=chk_abc123" } } ``` ``` -------------------------------- ### Create Product API Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Product.md Creates a new product. ```APIDOC ## POST /api/products/new ### Description Creates a new product. ### Method POST ### Endpoint /api/products/new ### Parameters #### Request Body - **unibeeApiMerchantProductNewReq** (*UnibeeApiMerchantProductNewReq*) - Required - The request body containing the details for the new product. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **merchantProductCopyPost200Response** (*MerchantProductCopyPost200Response*) - An object confirming the creation of the product. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /checkout/link Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md Generates a checkout link for a merchant. This endpoint is used to create a direct link for customers to complete a checkout process. ```APIDOC ## GET /checkout/link ### Description Get Merchant Checkout Link ### Method GET ### Endpoint /checkout/link ### Parameters #### Query Parameters - **checkout_id** (integer) - Required - The ID of the checkout. - **plan_id** (integer) - Required - The ID of the plan associated with the checkout. ### Response #### Success Response (200) - **MerchantCheckoutGetLinkGet200Response** - The generated checkout link and associated details. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /merchant/checkout/list Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/CheckoutSetup.md Retrieves a list of merchant checkouts. This endpoint allows you to fetch a paginated list of checkouts based on various filtering criteria. ```APIDOC ## GET /merchant/checkout/list ### Description Get Merchant Checkout list. ### Method GET ### Endpoint /merchant/checkout/list ### Parameters #### Path Parameters None #### Query Parameters - **limit** (integer) - Optional - The maximum number of checkouts to return per page. - **offset** (integer) - Optional - The number of checkouts to skip before starting to collect the result set. - **status** (string) - Optional - Filter checkouts by their status (e.g., 'pending', 'completed', 'failed'). #### Request Body None ### Request Example ```json { "limit": 10, "offset": 0, "status": "completed" } ``` ### Response #### Success Response (200) - **ListCheckoutResp** (ListCheckoutResp) - A paginated list of checkout objects. #### Response Example ```json { "code": 0, "msg": "success", "data": { "checkouts": [ { "checkout_id": "chk_abc123", "status": "completed", "amount": { "currency": "USD", "value": 10000 } } ], "limit": 10, "offset": 0, "total": 15 } } ``` ``` -------------------------------- ### Get Credit Account List Go Example Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/Credit.md This Go code demonstrates how to retrieve a list of credit accounts using the unibee-go-client. It shows how to set various filter parameters such as user ID, email, sorting options, pagination, and time ranges. The example includes error handling and prints the response. ```go package main import ( "context" "fmt" "os" openapi "github.com/UniBee-Billing/unibee-go-client" ) func main() { userId := int64(789) // int64 | filter id of user (optional) email := "email_example" // string | filter email of user (optional) sortField := "sortField_example" // string | Sort Field,gmt_create|gmt_modify,Default gmt_modify (optional) sortType := "sortType_example" // string | Sort Type,asc|desc,Default desc (optional) page := int32(56) // int32 | Page, Start 0 (optional) count := int32(56) // int32 | Count Of Per Page (optional) createTimeStart := int64(789) // int64 | CreateTimeStart,UTC timestamp,seconds (optional) createTimeEnd := int64(789) // int64 | CreateTimeEnd,UTC timestamp,seconds (optional) configuration := openapi.NewConfiguration() apiClient := openapi.NewAPIClient(configuration) resp, r, err := apiClient.Credit.CreditCreditAccountListGet(context.Background()).UserId(userId).Email(email).SortField(sortField).SortType(sortType).Page(page).Count(count).CreateTimeStart(createTimeStart).CreateTimeEnd(createTimeEnd).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Credit.CreditCreditAccountListGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreditCreditAccountListGet`: MerchantCreditCreditAccountListGet200Response fmt.Fprintf(os.Stdout, "Response from `Credit.CreditCreditAccountListGet`: %v\n", resp) } ``` -------------------------------- ### Create UnibeeApiMerchantProductInactiveReq (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantProductInactiveReq.md Provides constructors for creating new instances of UnibeeApiMerchantProductInactiveReq. NewUnibeeApiMerchantProductInactiveReq requires a ProductId, while NewUnibeeApiMerchantProductInactiveReqWithDefaults can be used when default values are sufficient. ```Go func NewUnibeeApiMerchantProductInactiveReq(productId int64) *UnibeeApiMerchantProductInactiveReq { // ... implementation ... } func NewUnibeeApiMerchantProductInactiveReqWithDefaults() *UnibeeApiMerchantProductInactiveReq { // ... implementation ... } ``` -------------------------------- ### Go: Get StartTime from MerchantDiscountCode Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiBeanMerchantDiscountCode.md The GetStartTime method retrieves the StartTime field from a MerchantDiscountCode object. It returns the start time as an int64. If the field is not set, it returns the zero value. ```go func (o *UnibeeApiBeanMerchantDiscountCode) GetStartTime() int64 { return o.startTime } ``` -------------------------------- ### Get Sort - Go Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiMerchantGatewayWireTransferSetupReq.md Returns the Sort field's value. If the field has not been explicitly set, it returns the zero value for an int32. ```Go func (o *UnibeeApiMerchantGatewayWireTransferSetupReq) GetSort() int32 ``` -------------------------------- ### Access and Set TotpUrl in MerchantMemberGetTotpKeyPost200ResponseData (Go) Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/MerchantMemberGetTotpKeyPost200ResponseData.md Provides methods to get, set, and check the status of the TotpUrl field in MerchantMemberGetTotpKeyPost200ResponseData. This URL is used for generating QR images for TOTP setup. ```go func (o *MerchantMemberGetTotpKeyPost200ResponseData) GetTotpUrl() string { // Implementation details omitted for brevity return "" } func (o *MerchantMemberGetTotpKeyPost200ResponseData) GetTotpUrlOk() (*string, bool) { // Implementation details omitted for brevity return nil, false } func (o *MerchantMemberGetTotpKeyPost200ResponseData) SetTotpUrl(v string) { // Implementation details omitted for brevity } func (o *MerchantMemberGetTotpKeyPost200ResponseData) HasTotpUrl() bool { // Implementation details omitted for brevity return false } ``` -------------------------------- ### Go: Get StartTime and status from MerchantDiscountCode Source: https://github.com/unibee-billing/unibee-go-client/blob/main/docs/UnibeeApiBeanMerchantDiscountCode.md The GetStartTimeOk method returns the StartTime field and a boolean indicating if it has been set. This allows for checking if a start time has been configured for the discount code before accessing its value. ```go func (o *UnibeeApiBeanMerchantDiscountCode) GetStartTimeOk() (*int64, bool) { if !o.IsSetStartTime() { return nil, false } return &o.startTime, true } ```