Sha256: f5e0f8d0267fd8b680ca33af6958e06681f985419c58919645d858d79b645dc3

Contents?: true

Size: 582 Bytes

Versions: 1

Compression:

Stored size: 582 Bytes

Contents

module Fastbill
  module Automatic
    module Services
      module Complete
        module ClassMethods

          def complete(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}.complete", attributes)
            response['RESPONSE']['INVOICE_NUMBER']
          end

        end

        def self.included(base)
          base.extend(ClassMethods)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fastbill-automatic-0.0.4 lib/fastbill-automatic/services/complete.rb