From 1caf01e63574ca08a8c5c041b8e4907fdf68947e Mon Sep 17 00:00:00 2001 From: maxime ngoe Date: Fri, 1 Dec 2023 14:11:22 +0100 Subject: [PATCH 1/2] fix Object Creation error on graphQl object --- .../network/request/CreateFamilyGraphQLRequest.java | 2 -- .../network/request/CreateInsureeGraphQLRequest.java | 2 -- .../network/request/CreatePolicyGraphQLRequest.java | 2 -- .../network/request/CreatePremiumGraphQLRequest.java | 1 - 4 files changed, 7 deletions(-) diff --git a/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java b/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java index 0e1cf4b6..2903529d 100644 --- a/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java +++ b/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java @@ -20,8 +20,6 @@ public CreateFamilyMutation.Data create(@NonNull Family family) throws Exception Family.Member head = family.getHead(); Response response = makeSynchronous(new CreateFamilyMutation( CreateFamilyMutationInput.builder() - .id(family.getId()) - .uuid(family.getUuid()) .locationId(family.getLocationId()) .poverty(family.isPoor()) .familyTypeId(family.getType()) diff --git a/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java b/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java index 54629ed6..2dbfa0ab 100644 --- a/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java +++ b/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java @@ -21,9 +21,7 @@ public class CreateInsureeGraphQLRequest extends BaseGraphQLRequest { public CreateInsureeMutation.Data create(@NonNull Family.Member member) throws Exception { Response response = makeSynchronous(new CreateInsureeMutation( CreateInsureeMutationInput.builder() - .id(member.getId()) .chfId(member.getChfId()) - .uuid(member.getUuid()) .familyId(member.getFamilyId()) .head(member.isHead()) .passport(member.getIdentificationNumber()) diff --git a/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java b/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java index a857141c..22e2db8c 100644 --- a/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java +++ b/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java @@ -19,8 +19,6 @@ public class CreatePolicyGraphQLRequest extends BaseGraphQLRequest { public CreatePolicyMutation.Data create(@NonNull Family.Policy policy) throws Exception { Response response = makeSynchronous(new CreatePolicyMutation( CreatePolicyMutationInput.builder() - .id(policy.getId()) - .uuid(policy.getUuid()) .familyId(policy.getFamilyId()) .enrollDate(policy.getEnrollDate()) .startDate(policy.getStartDate()) diff --git a/app/src/main/java/org/openimis/imispolicies/network/request/CreatePremiumGraphQLRequest.java b/app/src/main/java/org/openimis/imispolicies/network/request/CreatePremiumGraphQLRequest.java index 0b680b57..cae38848 100644 --- a/app/src/main/java/org/openimis/imispolicies/network/request/CreatePremiumGraphQLRequest.java +++ b/app/src/main/java/org/openimis/imispolicies/network/request/CreatePremiumGraphQLRequest.java @@ -20,7 +20,6 @@ public class CreatePremiumGraphQLRequest extends BaseGraphQLRequest { public CreatePremiumMutation.Data create(@NonNull Family.Policy.Premium premium) throws Exception { Response response = makeSynchronous(new CreatePremiumMutation( CreatePremiumMutationInput.builder() - .id(premium.getId()) .policyUuid(premium.getPolicyUuid()) .amount(premium.getAmount()) .receipt(premium.getReceipt()) From 623966f8ec0ea05d2f7c138281abd25f82987a41 Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Fri, 15 Dec 2023 19:12:56 +0100 Subject: [PATCH 2/2] revert removal uuid --- .../network/request/CreateFamilyGraphQLRequest.java | 2 ++ .../network/request/CreateInsureeGraphQLRequest.java | 1 + .../network/request/CreatePolicyGraphQLRequest.java | 1 + 3 files changed, 4 insertions(+) diff --git a/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java b/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java index 2903529d..0e1cf4b6 100644 --- a/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java +++ b/app/src/main/java/org/openimis/imispolicies/network/request/CreateFamilyGraphQLRequest.java @@ -20,6 +20,8 @@ public CreateFamilyMutation.Data create(@NonNull Family family) throws Exception Family.Member head = family.getHead(); Response response = makeSynchronous(new CreateFamilyMutation( CreateFamilyMutationInput.builder() + .id(family.getId()) + .uuid(family.getUuid()) .locationId(family.getLocationId()) .poverty(family.isPoor()) .familyTypeId(family.getType()) diff --git a/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java b/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java index 2dbfa0ab..cfad5a5f 100644 --- a/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java +++ b/app/src/main/java/org/openimis/imispolicies/network/request/CreateInsureeGraphQLRequest.java @@ -22,6 +22,7 @@ public CreateInsureeMutation.Data create(@NonNull Family.Member member) throws E Response response = makeSynchronous(new CreateInsureeMutation( CreateInsureeMutationInput.builder() .chfId(member.getChfId()) + .uuid(member.getUuid()) .familyId(member.getFamilyId()) .head(member.isHead()) .passport(member.getIdentificationNumber()) diff --git a/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java b/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java index 22e2db8c..de5602fd 100644 --- a/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java +++ b/app/src/main/java/org/openimis/imispolicies/network/request/CreatePolicyGraphQLRequest.java @@ -19,6 +19,7 @@ public class CreatePolicyGraphQLRequest extends BaseGraphQLRequest { public CreatePolicyMutation.Data create(@NonNull Family.Policy policy) throws Exception { Response response = makeSynchronous(new CreatePolicyMutation( CreatePolicyMutationInput.builder() + .uuid(policy.getUuid()) .familyId(policy.getFamilyId()) .enrollDate(policy.getEnrollDate()) .startDate(policy.getStartDate())