package rules import ( "code.tnxs.net/taxnexus/lib/api/crm/crm_client/accounts" "code.tnxs.net/taxnexus/lib/api/crm/crm_models" "code.tnxs.net/taxnexus/lib/app" "go.temporal.io/sdk/workflow" ) // StoreAccountActivity posts a new lead object to datastore func StoreAccountActivity(ctx workflow.Context, w app.AccountChannelWrapper) error { //nolint:gocritic // what we want postAccountParams := accounts.NewPostAccountsParamsWithTimeout(postTimeout) postAccountParams.AccountRequest = &crm_models.AccountRequest{ Data: []*crm_models.Account{&w.Obj}, } _, err := crmClient.Accounts.PostAccounts(postAccountParams, w.Principal.Auth) if err != nil { return err } sugar.Info("crm.storeAccount: 👍 📤") return nil }