Skip to content

Latest commit

 

History

History
142 lines (87 loc) · 3.91 KB

UserAccountsApi.md

File metadata and controls

142 lines (87 loc) · 3.91 KB

\UserAccountsApi

All URIs are relative to https://api.hubapi.com

Method HTTP request Description
UserAccountsArchive Delete /crm/v3/extensions/accounting/user-accounts/{accountId} Delete user account
UserAccountsReplace Put /crm/v3/extensions/accounting/user-accounts Create a user account

UserAccountsArchive

UserAccountsArchive(ctx, accountId).Execute()

Delete user account

Example

package main

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

func main() {
    accountId := "accountId_example" // string | The ID of the user account to delete.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserAccountsApi.UserAccountsArchive(context.Background(), accountId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserAccountsApi.UserAccountsArchive``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountId string The ID of the user account to delete.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

oauth2_legacy, private_apps_legacy

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UserAccountsReplace

UserAccountsReplace(ctx).CreateUserAccountRequestExternal(createUserAccountRequestExternal).Execute()

Create a user account

Example

package main

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

func main() {
    createUserAccountRequestExternal := *openapiclient.NewCreateUserAccountRequestExternal("AccountId_example", "AccountName_example", "CurrencyCode_example") // CreateUserAccountRequestExternal | The external accounting system user account information.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserAccountsApi.UserAccountsReplace(context.Background()).CreateUserAccountRequestExternal(createUserAccountRequestExternal).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserAccountsApi.UserAccountsReplace``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

Name Type Description Notes
createUserAccountRequestExternal CreateUserAccountRequestExternal The external accounting system user account information.

Return type

(empty response body)

Authorization

oauth2_legacy, private_apps_legacy

HTTP request headers

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

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