Sha256: 242bae7f976cecec02caeebcb37e7f207e7f0fa9a2154cd25eeb5f33334caa4e

Contents?: true

Size: 496 Bytes

Versions: 10

Compression:

Stored size: 496 Bytes

Contents

require "omise/object"

module Omise
  class Occurrence < OmiseObject
    self.endpoint = "/occurrences"

    def self.retrieve(id, attributes = {})
      new resource(location(id), attributes).get(attributes)
    end

    def schedule(options = {})
      if !defined?(Schedule)
        require "omise/schedule"
      end

      expand_attribute Schedule, "schedule", options
    end

    def reload(attributes = {})
      assign_attributes resource(attributes).get(attributes)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
omise-0.11.0 lib/omise/occurrence.rb
omise-0.10.1 lib/omise/occurrence.rb
omise-0.10.0 lib/omise/occurrence.rb
omise-0.9.1 lib/omise/occurrence.rb
omise-0.9.0 lib/omise/occurrence.rb
omise-0.7.2 lib/omise/occurrence.rb
omise-0.8.0 lib/omise/occurrence.rb
omise-0.7.1 lib/omise/occurrence.rb
omise-0.7.0 lib/omise/occurrence.rb
omise-0.6.0 lib/omise/occurrence.rb