RevolutionPrep/netsuite — pull request #134 by greggroth (2014-10-22 19:04:44+00:00)
Title: Fix Custom Field from mutating input attributes

I ran into an unexpected behavior because `CustomFieldList` and `CustomField` mutate the input attributes. If you set a hash of attributes to a variable, and use that variable in an iteration to initialize new records, the second time around it was coming back with no value. I realized this is because `CustomFieldList` deletes the `:value` key.

I realize now that the pattern we're using in the initialize method is also mutating the input hash:

```ruby
def initialize(attributes = {})
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
initialize_from_attributes_hash(attributes)
end
```

I'll get around to fixing this in the future.