lib/netsuite/records/invoice.rb in netsuite-0.0.19 vs lib/netsuite/records/invoice.rb in netsuite-0.0.20

- old
+ new

@@ -52,15 +52,15 @@ else raise RecordNotFound, "#{self} with OPTIONS=#{options.inspect} could not be found" end end - def self.initialize(customer) - response = Actions::Initialize.call(customer) + def self.initialize(object) + response = Actions::Initialize.call(self, object) if response.success? new(response.body) else - raise InitializationError, "#{self}.initialize with #{customer} failed." + raise InitializationError, "#{self}.initialize with #{object} failed." end end def add response = Actions::Add.call(self)