Sha256: 3cec8d53a730563c08734543a472f2b67f6be7e3255de3e13060e0c23fa3f6e8

Contents?: true

Size: 414 Bytes

Versions: 6

Compression:

Stored size: 414 Bytes

Contents

require 'cloudflair/api/zone/available_plan'

module Cloudflair
  class Zone
    def available_plans
      raw_plans = response connection.get("#{path}/available_plans")

      raw_plans.map do |raw_plan|
        zone = available_plan raw_plan['id']
        zone.data = raw_plan
        zone
      end
    end

    def available_plan(plan_id)
      Cloudflair::AvailablePlan.new zone_id, plan_id
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cloudflair-0.2.5 lib/cloudflair/api/zone__available_plans.rb
cloudflair-0.2.4 lib/cloudflair/api/zone__available_plans.rb
cloudflair-0.2.0 lib/cloudflair/api/zone__available_plans.rb
cloudflair-0.1.0 lib/cloudflair/api/zone__available_plans.rb
cloudflair-0.0.9 lib/cloudflair/api/zone__available_plans.rb
cloudflair-0.0.8 lib/cloudflair/api/zone__available_plans.rb