Sha256: b6d4bb8caed54e2f4b718b4eba03131bcd3d753de1cdd69fc7043f05e83fe3e6

Contents?: true

Size: 533 Bytes

Versions: 2

Compression:

Stored size: 533 Bytes

Contents

module Paid
  class Plan < APIResource

    # attributes :id and :object inherited from APIResource
    attribute :name
    attribute :description
    attribute :interval
    attribute :interval_count
    attribute :amount
    attribute :created_at

    api_class_method :all, :get, :constructor => APIList.constructor(Plan)
    api_class_method :retrieve, :get, ":path/:id", :arguments => [:id]
    api_class_method :create, :post

    def self.path
      "/v0/plans"
    end

    APIClass.register_subclass(self, "plan")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
paid-1.0.1 lib/paid/plan.rb
paid-1.0.0 lib/paid/plan.rb