-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for business units. #498
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,57 @@ | ||||||
resource "commercetools_business_unit_company" "acme_company" { | ||||||
key = "acme-company" | ||||||
name = "The ACME Company" | ||||||
status = "Active" | ||||||
contact_email = "acme@example.com" | ||||||
|
||||||
store { | ||||||
key = "acme-usa" | ||||||
type_id = "store" | ||||||
} | ||||||
|
||||||
store { | ||||||
key = "acme-germany" | ||||||
type_id = "store" | ||||||
} | ||||||
|
||||||
address { | ||||||
key = "acme-business-unit-address" | ||||||
title = "Acme Business Unit Address" | ||||||
salutation = "Mr." | ||||||
first_name = "John" | ||||||
last_name = "Doe" | ||||||
street_name = "Main Street" | ||||||
street_number = "1" | ||||||
additional_street_info = "Additional Street Info" | ||||||
postal_code = "12345" | ||||||
city = "Berlin" | ||||||
region = "Berlin" | ||||||
country = "DE" | ||||||
company = "Acme" | ||||||
department = "IT" | ||||||
building = "Building" | ||||||
apartment = "Apartment" | ||||||
po_box = "P.O. Box" | ||||||
phone = "123456789" | ||||||
mobile = "987654321" | ||||||
} | ||||||
|
||||||
default_shipping_address_id = "acme-business-unit-address" | ||||||
default_billing_address_id = "acme-business-unit-address" | ||||||
} | ||||||
|
||||||
resource "commercetools_business_unit_division" "acme-willie-coyote" { | ||||||
key = "acme-willie-coyote" | ||||||
name = "Willie Coyote - Traps for Roadrunners" | ||||||
status = "Active" | ||||||
contact_email = "acme-traps@example.com" | ||||||
store_mode = "FromParent" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this one is not actually part of the definition? |
||||||
associate_mode = "ExplicitAndFromParent" | ||||||
|
||||||
// Only available for division business units as the Company | ||||||
// business unit has no parent unit and must always be the Top Level Unit. | ||||||
parent_unit { | ||||||
key = commercetools_business_unit_company.acme-company.key | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
type_id = "company" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The address are also required, might be nice to add it to the example