salesforce

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

*

  • Florence
  • Copyright (C) 2024 hannjosh *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU General Public License for more details. *
  • You should have received a copy of the GNU General Public License
  • along with this program. If not, see <https://www.gnu.org/licenses/>.

*

  • Florence
  • Copyright (C) 2024 hannjosh *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU General Public License for more details. *
  • You should have received a copy of the GNU General Public License
  • along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

View Source
const ApiVersion string = "v61.0"

* Version of the Salesforce REST API to use. * @since 1.0.0

Variables

View Source
var MyDomain string

* My Domain * The subdomain of the Salesforce org. * @since 1.0.0

View Source
var OAuth2AccessToken string

* OAuth 2.0 access token used to authorise the client. * The Salesforce REST API supports the Bearer authentication type. * @since 1.0.0

Functions

func Create added in v1.0.1

func Create(object string, data map[string]interface{}) (string, error)

* Create * @since 1.0.1

func GetOAuth2AccessToken

func GetOAuth2AccessToken(client_id string, client_secret string) (string, error)

* GetAuthorizationToken * Obtains an OAuth 2.0 access token to authorise calls to the Salesforce REST API. * @since 1.0.0

func Query

func Query(soql string) []byte

* Query * @since 1.0.0

Types

type Account added in v1.0.2

type Account struct {
	Name            string  `json:"Name"` // The name of the Account.
	ShippingAddress Address `json:"ShippingAddress"`
}

type Address added in v1.0.2

type Address struct {
	Street     string `json:"street"`
	City       string `json:"city"`
	State      string `json:"state"`
	PostalCode string `json:"postalCode"`
}

type KitItem__c added in v1.0.2

type KitItem__c struct {
	Product  Product2 `json:"Product__r"`  // The Product in the kit.
	Quantity float32  `json:"Quantity__c"` // The Quantity (Number) of the Product in the kit. E.g. 2 x Long sleeve baby grow (0-3 months).
}

type Product2 added in v1.0.2

type Product2 struct {
	Name        string `json:"Name"`                  // The name of the Product.
	Description string `json:"Description,omitempty"` // Description of the Product.
	Family      string `json:"Family"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL