lib/netsuite/models/customer.rb in netsuite-0.0.2 vs lib/netsuite/models/customer.rb in netsuite-0.0.3
- old
+ new
@@ -4,19 +4,28 @@
def initialize(attributes = {})
@attributes = attributes
end
def self.get(id)
- response = NetSuite::Actions::Customer::Get.call(id)
+ response = NetSuite::Actions::Get.call(id)
if response.success?
new(response.body)
else
raise RecordNotFound, "#{self} with ID=#{id} could not be found"
end
end
- def is_person
- @attributes[:is_person]
+ def add
+ response = NetSuite::Actions::Add.call(@attributes)
+ response.success?
+ end
+
+ def method_missing(m, *args, &block)
+ if @attributes.keys.include?(m.to_sym)
+ @attributes[m.to_sym]
+ else
+ super
+ end
end
end
end