private void CreateBillingAddress(RegistrationVM session) { Fusebill.ApiWrapper.Dto.Post.Address postBillingAddress = new Fusebill.ApiWrapper.Dto.Post.Address { CompanyName = session.BillingAddress.CompanyName, Line1 = session.BillingAddress.Line1, Line2 = session.BillingAddress.Line2, City = session.BillingAddress.City, PostalZip = session.BillingAddress.PostalZip, CountryId = session.BillingAddress.CountryId, AddressType = "Billing", CustomerAddressPreferenceId = session.ReturnedCustomer.Id }; //some countries do not have states if (session.BillingAddress.StateId != null) { postBillingAddress.StateId = session.BillingAddress.StateId; } ApiClient.PostAddress(postBillingAddress); }
private void CreateBillingAddress(RegistrationVM session) { Fusebill.ApiWrapper.Dto.Post.Address postBillingAddress = new Fusebill.ApiWrapper.Dto.Post.Address { CompanyName = session.BillingAddress.CompanyName, Line1 = session.BillingAddress.Line1, Line2 = session.BillingAddress.Line2, City = session.BillingAddress.City, PostalZip = session.BillingAddress.PostalZip, CountryId = session.BillingAddress.CountryId, AddressType = "Billing", CustomerAddressPreferenceId = session.ReturnedCustomer.Id }; //some countries do not have states if (session.BillingAddress.StateId != null) { postBillingAddress.StateId = session.BillingAddress.StateId; } ApiClient.PostAddress(postBillingAddress); }
public Address PostAddress(Fusebill.ApiWrapper.Dto.Post.Address address) { var url = RestUriBuilder.BuildUri("addresses"); return(PostEntity <Fusebill.ApiWrapper.Dto.Post.Address, Address>(url, address)); }