Sha256: d396faaae5c681c11273fc43e30f424f2f71cd36971dbe885f971e52d370bf9d

Contents?: true

Size: 959 Bytes

Versions: 2

Compression:

Stored size: 959 Bytes

Contents

require 'onlinesim/Base'

module OnlineSim
  class GetRent < Base
    def get(country: 7, days: 1, extension: false)
      return self._get(:endpoint => '/rent/getRentNum', :params => {country: country,days:days,extension:extension})['item']
    end

    def state
      return self._get(:endpoint => '/rent/getRentState', :params => {pagination: false})['list']
    end

    def stateone(tzid)
      return self._get(:endpoint => '/rent/getRentState', :params => {tzid:tzid, pagination: false})['list'][0]
    end

    def extend(tzid)
      return self._get(:endpoint => '/rent/extendRentState', :params => {tzid:tzid})
    end

    def tariffs
      return self._get(:endpoint => '/rent/tariffsRent')
    end

    def tariffsone(country: 7)
      return self._get(:endpoint => '/rent/tariffsRent', :params => {country:country})
    end

    def close(tzid)
      return self._get(:endpoint => '/rent/closeRentNum', :params => {tzid:tzid})
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
onlinesim-1.0.8 lib/onlinesim/GetRent.rb
onlinesim-1.0.7 lib/onlinesim/GetRent.rb