commercetools

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const TypeLocalizedString = schema.TypeMap

TypeLocalizedString defined merely for documentation, it basically is just a normal TypeMap but clarifies in the code that it should be used to store a LocalizedString

Variables

This section is empty.

Functions

func AddressFieldSchema added in v1.3.0

func AddressFieldSchema() *schema.Schema

func CreateAddressFieldDraft added in v1.3.0

func CreateAddressFieldDraft(d *schema.ResourceData) *platform.BaseAddress

func CreateAddressFieldDraftRaw added in v1.3.0

func CreateAddressFieldDraftRaw(data map[string]any) *platform.BaseAddress

func CreateCustomFieldDraft added in v1.3.0

func CreateCustomFieldDraftRaw added in v1.3.0

func CreateCustomFieldDraftRaw(data map[string]any, t *platform.Type) (*platform.CustomFieldsDraft, error)

func CreateTypeFetcher added in v1.19.2

func CreateTypeFetcher(client *platform.ByProjectKeyRequestBuilder) func(ctx context.Context, id string) (*platform.Type, error)

func CustomFieldEncodeType added in v1.19.0

func CustomFieldEncodeType(t *platform.Type, name string, value any) (any, error)

func CustomFieldEncodeValue added in v1.19.0

func CustomFieldEncodeValue(t platform.FieldType, name string, value any) (any, error)

func CustomFieldSchema added in v1.3.0

func CustomFieldSchema() *schema.Schema

func CustomFieldUpdateActions added in v1.3.0

func DiffSlices added in v1.19.0

func DiffSlices(old, new map[string]any) map[string]any

DiffSlices does a diff on two slices and returns the changes. If a field is no longer available then nil is returned.

func GetTypeResource added in v1.19.0

func GetTypeResource(ctx context.Context, getTypeByIdFunc func(ctx context.Context, id string) (*platform.Type, error), typeId string) (*platform.Type, error)

GetTypeResource returns the platform.Type for the type_id in the custom field. The type_id is cached to minimize API calls when multiple resource use the same type

func New added in v1.3.0

func New(version string) func() *schema.Provider

New returns a new terraform.ResourceProvider.

func ValidateCurrencyCode

func ValidateCurrencyCode(val any, key string) (warns []string, errs []error)

ValidateCurrencyCode checks if a currency string is valid according to https://en.wikipedia.org/wiki/ISO_4217

Types

Jump to

Keyboard shortcuts

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