Esempio n. 1
0
        public async Task CreatePersonFieldData(string personID, Models.PcoFieldDatum data)
        {
            var response = await Post($"people/v2/people/{personID}/field_data", new Models.PcoSingleResponse <Models.PcoFieldDatum>()
            {
                Data = new Models.PcoDataRecord <Models.PcoFieldDatum>()
                {
                    Type       = "FieldDatum",
                    Attributes = data
                }
            });

            response.EnsureSuccessStatusCode();
        }
Esempio n. 2
0
        public async Task UpdatePersonClub(string personID, string clubDatumID, string clubName)
        {
            var datum = new PcoApiClient.Models.PcoFieldDatum()
            {
                FieldDefinitionID = _tenant.ClubFieldDefinitionID,
                Value             = clubName
            };

            if (clubDatumID == null)
            {
                await _pcoClient.CreatePersonFieldData(personID, datum);
            }
            else
            {
                await _pcoClient.UpdatePersonFieldData(personID, clubDatumID, datum);
            }
        }