Skip to content

Conversation

@rmustafin
Copy link
Contributor

@rmustafin rmustafin commented Apr 14, 2023

Intent (What)

XPM updates their API version to v3.1 and unfortunately it affects the v3.0 as well.

They're changing the relation between Contact and Client from 1:1 to 1:many. Yes, multiple Clients can share the same contact. We need to do a couple of small changes in order to support that.

Motivation (Why)

Implementation (How)

  1. Update Contact:

API will response with an error If a Contact belongs to multiple Clients so I allow Client ID param for Contact update action.
It's optional. The API will still perform update without Client ID if Contact belongs to 1 Client.

  1. Delete Contact:

The same logic applies here. Optional Client ID. Error if Contact belongs to multiple Clients and Client ID is not provided.

Consequence

It shouldn't affect any existing users of the gem as Client ID is optional. XPM really should've updated API to v4.0 as it's a non-reversible breaking change

@rmustafin rmustafin changed the title Rb 326/v31 client updates [RB-326] v31 client updates Apr 16, 2023
@rmustafin rmustafin marked this pull request as ready for review April 16, 2023 23:46
@rmustafin rmustafin requested a review from a team as a code owner April 16, 2023 23:46
@jcdeniz jcdeniz requested a review from mehwoot April 17, 2023 00:25
@jcdeniz
Copy link

jcdeniz commented Apr 17, 2023

HI @rmustafin - Please make sure Gareth looks at this before merging.

@rmustafin rmustafin merged commit ee0753c into master Apr 19, 2023
@rmustafin rmustafin deleted the RB-326/v31_client_updates branch April 19, 2023 05:13
lankz pushed a commit that referenced this pull request Jun 10, 2025
lankz pushed a commit that referenced this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants