コード例 #1
0
ファイル: ZohoMapper.cs プロジェクト: timothywlee/headstart
 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);
 }
コード例 #2
0
ファイル: ZohoMapper.cs プロジェクト: timothywlee/headstart
 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}"
     });
 }
コード例 #3
0
 public async Task <HSBuyerLocation> Save(string buyerID, string buyerLocationID, HSBuyerLocation buyerLocation)
 {
     // not being called by seed endpoint - use stored ordercloud client and stored admin token
     return(await Save(buyerID, buyerLocationID, buyerLocation, null, _oc));
 }