module Fastbill::Automatic::Services::Sendbypost::ClassMethods

Public Instance Methods

sendbypost(id) click to toggle source
# File lib/fastbill-automatic/services/sendbypost.rb, line 7
def sendbypost(id)
  id_attribute = "#{self.name.split("::").last.downcase}_id".to_sym
  attributes = {}
  attributes[id_attribute] = id
  response = Fastbill::Automatic.request("#{self.name.split("::").last.downcase}.sendbypost", attributes)
  self.new(response["RESPONSE"])
end