module Fastbill::Automatic::Services::Get::ClassMethods

Public Instance Methods

get(options = {}) click to toggle source
# File lib/fastbill-automatic/services/get.rb, line 7
def get(options = {})
  response = Fastbill::Automatic.request("#{self.name.split("::").last.downcase}.get", options)
  results_from(response)
end

Private Instance Methods

results_from(response) click to toggle source
# File lib/fastbill-automatic/services/get.rb, line 13
def results_from(response)
  results = []
  response["RESPONSE"]["#{self.name.split("::").last.upcase}S"].each do |obj|
    results << self.new(obj)
  end
  results
end