survival / donation-system

:gem: Gem containing Survival's donation system logic
https://donation-system-staging.herokuapp.com/
MIT License
2 stars 3 forks source link

Implement supporter name split #10

Open octopusinvitro opened 7 years ago

octopusinvitro commented 7 years ago

See our contributing guides.

The field LastName is marked as a required field in our Salesforce setup upstream. We didn't want to implement all at once so we are passing the full name for now until we implement this feature.

The task consists of splitting the name received from the request in data.name and saving it in the relevant fields in the Salesforce supporter table. These are the relevant fields defined there:

FIELD NAME | FIELD LABEL
-------------------------
LastName   | Last Name
FirstName  | First Name
Name       | Full Name

A good place to start is where the fields to be passed to the supporter table are generated.

We don't have to maintain this name-split logic, there are people out there who have solved this problem already, for example namae, whose README I found impressive.