Skip to content

Latest commit

 

History

History
152 lines (96 loc) · 4.01 KB

BusinessManagementApi.md

File metadata and controls

152 lines (96 loc) · 4.01 KB

WhatsAPI\BusinessManagementApi

All URIs are relative to /api

Method HTTP request Description
FetchCatlog Get /instances/{instance_key}/business/catalog Fetches the catlog.
SendPaymentRequest Post /instances/{instance_key}/business/payment-request Send a payment request.

FetchCatlog

APIResponse FetchCatlog(ctx, instanceKey).Execute()

Fetches the catlog.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    instanceKey := "instanceKey_example" // string | Instance key

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BusinessManagementApi.FetchCatlog(context.Background(), instanceKey).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BusinessManagementApi.FetchCatlog``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `FetchCatlog`: APIResponse
    fmt.Fprintf(os.Stdout, "Response from `BusinessManagementApi.FetchCatlog`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
instanceKey string Instance key

Other Parameters

Other parameters are passed through a pointer to a apiFetchCatlogRequest struct via the builder pattern

Name Type Description Notes

Return type

APIResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendPaymentRequest

APIResponse SendPaymentRequest(ctx, instanceKey).Data(data).Execute()

Send a payment request.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    instanceKey := "instanceKey_example" // string | Instance key
    data := *openapiclient.NewPaymentRequestPayload() // PaymentRequestPayload | Data

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BusinessManagementApi.SendPaymentRequest(context.Background(), instanceKey).Data(data).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BusinessManagementApi.SendPaymentRequest``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SendPaymentRequest`: APIResponse
    fmt.Fprintf(os.Stdout, "Response from `BusinessManagementApi.SendPaymentRequest`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
instanceKey string Instance key

Other Parameters

Other parameters are passed through a pointer to a apiSendPaymentRequestRequest struct via the builder pattern

Name Type Description Notes

data | PaymentRequestPayload | Data |

Return type

APIResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]