public void updateShippingContact() { getApiKey(); conekta.Api.version = "2.0.0"; Customer customer = new conekta.Customer().create(@"{ ""name"": ""Emiliano Cabrera"", ""phone"": ""5575553322"", ""email"": ""*****@*****.**"", ""corporate"": true }"); ShippingContact shipping_contact = customer.createShippingContact(@"{ ""phone"": ""5575553322"", ""receiver"": ""Marvin Fuller"", ""between_streets"": ""Ackerman Crescent"", ""address"": { ""street1"": ""250 Alexis St"", ""street2"": ""fake street"", ""city"": ""Red Deer"", ""state"": ""Alberta"", ""country"": ""CA"", ""postal_code"": ""T4N 0B8"", ""residential"": true } }"); shipping_contact = shipping_contact.update(@"{ ""phone"": ""5575553324"" }"); Assert.AreEqual(shipping_contact.phone, "5575553324"); }
public void createShippingContact() { getApiKey(); conekta.Api.version = "2.0.0"; Customer customer = new conekta.Customer().create(@"{ ""name"": ""Emiliano Cabrera"", ""phone"": ""+5215544443333"", ""email"": ""*****@*****.**"", ""plan_id"": ""gold-plan"", ""corporate"": true, ""payment_sources"": [{ ""token_id"": ""tok_test_visa_4242"", ""type"": ""card"" }], ""shipping_contacts"": [{ ""email"": ""*****@*****.**"", ""phone"": ""+5215555555555"", ""receiver"": ""Marvin Fuller"", ""between_streets"": ""Ackerman Crescent"", ""address"": { ""street1"": ""250 Alexis St"", ""street2"": ""fake street"", ""city"": ""Red Deer"", ""state"": ""Alberta"", ""country"": ""CA"", ""postal_code"": ""T4N 0B8"", ""residential"": true } }], ""account_age"": 300, ""paid_transactions"": 5 }"); ShippingContact shipping_contact = customer.createShippingContact(@"{ ""phone"": ""+5215555555555"", ""receiver"": ""Marvin Fuller"", ""between_streets"": ""Ackerman Crescent"", ""address"": { ""street1"": ""250 Alexis St"", ""street2"": ""fake street"", ""city"": ""Red Deer"", ""state"": ""Alberta"", ""country"": ""CA"", ""postal_code"": ""T4N 0B8"", ""residential"": true } }"); Assert.AreEqual(shipping_contact.phone, "+5215555555555"); }