-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from labd/feat/add-support-for-business-units
Feat/add support for business units
- Loading branch information
Showing
39 changed files
with
4,046 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
kind: Added | ||
body: Added resources for associate role and business units and extended project setting | ||
options | ||
time: 2024-08-13T12:18:38.233827008+02:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "commercetools_business_unit_company Resource - terraform-provider-commercetools" | ||
subcategory: "" | ||
description: |- | ||
Business Unit type to represent the top level of a business. Contains specific fields and values that differentiate a company from the generic business unit. | ||
See also the [Business Unit API Documentation](https://docs.commercetools.com/api/projects/business-units | ||
--- | ||
|
||
# commercetools_business_unit_company (Resource) | ||
|
||
Business Unit type to represent the top level of a business. Contains specific fields and values that differentiate a company from the generic business unit. | ||
|
||
See also the [Business Unit API Documentation](https://docs.commercetools.com/api/projects/business-units | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "commercetools_store" "my-store" { | ||
key = "my-store" | ||
name = { | ||
en-US = "My store" | ||
} | ||
countries = ["NL", "BE"] | ||
languages = ["en-GB"] | ||
} | ||
resource "commercetools_business_unit_company" "my-company" { | ||
key = "my-company" | ||
name = "My company" | ||
contact_email = "main@my-company.com" | ||
address { | ||
key = "my-company-address-1" | ||
country = "NL" | ||
state = "Noord-Holland" | ||
city = "Amsterdam" | ||
street_name = "Keizersgracht" | ||
street_number = "3" | ||
additional_street_info = "4th floor" | ||
postal_code = "1015 CJ" | ||
} | ||
address { | ||
key = "my-company-address-2" | ||
country = "NL" | ||
state = "Utrecht" | ||
city = "Utrecht" | ||
street_name = "Oudegracht" | ||
street_number = "1" | ||
postal_code = "3511 AA" | ||
additional_street_info = "Main floor" | ||
} | ||
store { | ||
key = commercetools_store.my-store.key | ||
} | ||
billing_address_keys = ["my-company-address-1"] | ||
shipping_address_keys = ["my-company-address-1", "my-company-address-2"] | ||
default_billing_address_key = "my-company-address-1" | ||
default_shipping_address_key = "my-company-address-1" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `key` (String) User-defined unique key for the company. Must be unique within the project. Updating this value is not supported. | ||
- `name` (String) The name of the company. | ||
|
||
### Optional | ||
|
||
- `address` (Block List) Addresses used by the Business Unit. (see [below for nested schema](#nestedblock--address)) | ||
- `billing_address_keys` (Set of String) Indexes of entries in addresses to set as billing addresses. The billingAddressIds of the [Customer](https://docs.commercetools.com/api/projects/customers) will be replaced by these addresses. | ||
- `contact_email` (String) The email address of the company. | ||
- `default_billing_address_key` (String) Index of the entry in addresses to set as the default billing address. | ||
- `default_shipping_address_key` (String) Index of the entry in addresses to set as the default shipping address. | ||
- `shipping_address_keys` (Set of String) Indexes of entries in addresses to set as shipping addresses. The shippingAddressIds of the [Customer](https://docs.commercetools.com/api/projects/customers) will be replaced by these addresses. | ||
- `status` (String) The status of the company. | ||
- `store` (Block List) Sets the Stores the Business Unit is associated with. | ||
|
||
If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, or Quote Requests must belong to one of the Business Unit's Stores. | ||
|
||
If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, or Quote Requests must not belong to any Store. (see [below for nested schema](#nestedblock--store)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Unique identifier of the company. | ||
- `version` (Number) The current version of the company. | ||
|
||
<a id="nestedblock--address"></a> | ||
### Nested Schema for `address` | ||
|
||
Required: | ||
|
||
- `country` (String) Name of the country | ||
- `key` (String) User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote. | ||
|
||
Optional: | ||
|
||
- `additional_address_info` (String) Further information on the Address | ||
- `additional_street_info` (String) Further information on the street address | ||
- `apartment` (String) Name or number of the apartment | ||
- `building` (String) Name or number of the building | ||
- `city` (String) Name of the city | ||
- `company` (String) Name of the company | ||
- `department` (String) Name of the department | ||
- `email` (String) Email address | ||
- `external_id` (String) ID for the contact used in an external system | ||
- `fax` (String) Fax number | ||
- `first_name` (String) First name of the contact | ||
- `last_name` (String) Last name of the contact | ||
- `mobile` (String) Mobile phone number | ||
- `phone` (String) Phone number | ||
- `po_box` (String) Post office box number | ||
- `postal_code` (String) Postal code | ||
- `region` (String) Name of the region | ||
- `salutation` (String) Salutation of the contact, for example Ms., Mr. | ||
- `state` (String) Name of the state | ||
- `street_name` (String) Name of the street | ||
- `street_number` (String) Street number | ||
- `title` (String) Title of the contact, for example Dr., Prof. | ||
|
||
Read-Only: | ||
|
||
- `id` (String) Unique identifier of the Address | ||
|
||
|
||
<a id="nestedblock--store"></a> | ||
### Nested Schema for `store` | ||
|
||
Optional: | ||
|
||
- `key` (String) User-defined unique identifier of the Store |
Oops, something went wrong.