Module: Fastbill::Automatic::Services::Update::ClassMethods

Defined in:
lib/fastbill-automatic/services/update.rb

Instance Method Summary collapse

Instance Method Details

#update_attributes(id, attributes) ⇒ Object



7
8
9
10
11
12
# File 'lib/fastbill-automatic/services/update.rb', line 7

def update_attributes(id, attributes)
  id_attribute = "#{self.class.name.split("::").last.downcase}_id".to_sym
  attributes[id_attribute] = id
  response = Fastbill::Automatic.request("#{self.name.split("::").last.downcase}.update", attributes)
  true
end