Chore/rm main entity concept (#7709)
**What** Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate. This pr also includes various fixes in different modules Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Stevche Radevski
Oli Juhl
parent
2895ccfba8
commit
48963f55ef
@@ -29,12 +29,12 @@ medusaIntegrationTestRunner({
|
||||
})
|
||||
|
||||
it("should update a customer address", async () => {
|
||||
const customer = await customerModuleService.create({
|
||||
const customer = await customerModuleService.createCustomers({
|
||||
first_name: "John",
|
||||
last_name: "Doe",
|
||||
})
|
||||
|
||||
const address = await customerModuleService.addAddresses({
|
||||
const address = await customerModuleService.createAddresses({
|
||||
customer_id: customer.id,
|
||||
first_name: "John",
|
||||
last_name: "Doe",
|
||||
@@ -62,11 +62,11 @@ medusaIntegrationTestRunner({
|
||||
})
|
||||
|
||||
it("updates a new address to be default and unsets old one", async () => {
|
||||
const customer = await customerModuleService.create({
|
||||
const customer = await customerModuleService.createCustomers({
|
||||
first_name: "John",
|
||||
last_name: "Doe",
|
||||
})
|
||||
const [, address] = await customerModuleService.addAddresses([
|
||||
const [, address] = await customerModuleService.createAddresses([
|
||||
{
|
||||
customer_id: customer.id,
|
||||
first_name: "John",
|
||||
@@ -104,11 +104,11 @@ medusaIntegrationTestRunner({
|
||||
|
||||
// do the same as above but for billing address
|
||||
it("updates a new address to be default and unsets old one", async () => {
|
||||
const customer = await customerModuleService.create({
|
||||
const customer = await customerModuleService.createCustomers({
|
||||
first_name: "John",
|
||||
last_name: "Doe",
|
||||
})
|
||||
const [, address] = await customerModuleService.addAddresses([
|
||||
const [, address] = await customerModuleService.createAddresses([
|
||||
{
|
||||
customer_id: customer.id,
|
||||
first_name: "John",
|
||||
|
||||
Reference in New Issue
Block a user