Beispiel #1
0
 public static ZohoContact Map(ZohoContact contact, HSBuyer buyer, IList <HSUser> users,
                               ZohoCurrency currency, HSBuyerLocation location)
 {
     contact.company_name     = $"{buyer.Name} - {location.Address?.xp.LocationID}";
     contact.contact_name     = $"{location.Address?.AddressName} - {location.Address?.xp.LocationID}";
     contact.contact_type     = "customer";
     contact.billing_address  = ZohoAddressMapper.Map(location.Address);
     contact.shipping_address = ZohoAddressMapper.Map(location.Address);
     contact.contact_persons  = ZohoContactMapper.Map(users, contact);
     contact.currency_id      = currency.currency_id;
     contact.notes            = $"Franchise ID: {buyer.ID} ~ Location ID: {location.Address?.xp.LocationID}";
     return(contact);
 }
Beispiel #2
0
 public static ZohoContact Map(HSBuyer buyer, IList <HSUser> users, ZohoCurrency currency,
                               HSBuyerLocation location)
 {
     return(new ZohoContact()
     {
         company_name = $"{buyer.Name} - {location.Address?.xp.LocationID}",
         contact_name = $"{location.Address?.AddressName} - {location.Address?.xp.LocationID}",
         contact_type = "customer",
         billing_address = ZohoAddressMapper.Map(location.Address),
         shipping_address = ZohoAddressMapper.Map(location.Address),
         contact_persons = ZohoContactMapper.Map(users),
         currency_id = currency.currency_id,
         notes = $"Franchise ID: {buyer.ID} ~ Location ID: {location.Address?.xp.LocationID}"
     });
 }