Sha256: c49aec389b88349cfa4d37599f32b58413acffcf34ddebef0f98b5e37fa26df4

Contents?: true

Size: 371 Bytes

Versions: 6

Compression:

Stored size: 371 Bytes

Contents

module Mbsy
  class Balance < Base
    
    def self.update(mode, params={})
      raise ArgumentError, "You must include :email" unless params[:email]
      raise ArgumentError, "You must include :amount" unless params[:amount]
      case mode
      when :add
        call('add', params)
      when :deduct
        call('deduct', params)
      end
    end
    
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mbsy-1.0.6 lib/mbsy/resources/balance.rb
mbsy-1.0.4 lib/mbsy/resources/balance.rb
mbsy-1.0.3 lib/mbsy/resources/balance.rb
mbsy-1.0.2 lib/mbsy/resources/balance.rb
mbsy-1.0.1 lib/mbsy/resources/balance.rb
mbsy-1.0.0 lib/mbsy/resources/balance.rb