示例#1
0
        internal static void UpdateAddress(IMundiAPIClient client, string customerId, string addressId)
        {
            var request = AddressBuilders.BuildUpdateAddressRequest();

            try {
                var response = client.Customers.UpdateAddress(customerId, addressId, request);
                FileHelper.SaveResponse(response, "UpdateAddress");
            }
            catch (ErrorException e) {
                FileHelper.SaveApiError(e, "UpdateAddress");
            }
            catch (Exception e) {
                FileHelper.SaveException(e, "UpdateAddress");
            }
        }
示例#2
0
        internal static string CreateAddress(IMundiAPIClient client, string customerId)
        {
            var request = AddressBuilders.BuildCreateAddressRequest();

            try {
                var response = client.Customers.CreateAddress(customerId, request);
                FileHelper.SaveResponse(response, "CreateAddress");
                return(response.Id);
            }
            catch (ErrorException e) {
                FileHelper.SaveApiError(e, "CreateAddress");
                return(null);
            }
            catch (Exception e) {
                FileHelper.SaveException(e, "CreateAddress");
                return(null);
            }
        }