Sha256: 0dc10eb2bd668f651a94cf80f77a9df9980940ddf27511c5c68f50e67a1a7d45

Contents?: true

Size: 609 Bytes

Versions: 14

Compression:

Stored size: 609 Bytes

Contents

module Zype
  # This class does not support all, create, update or delete methods.
  # Read more at https://docs.zype.com/v1.0/reference#apps
  #
  # @since 0.6.0
  class Apps < Zype::BaseModel

    %i[all create update delete].each do |mtd|
      send(:define_method, mtd) do
        raise NoMethodError
      end
    end

    # Returns app that matches that app_key used in the authorization
    #
    # @return [Hash] the app returned from the API
    def find
      raise Zype::Client::NoAppKey if Zype.configuration.app_key.to_s.empty?

      client.execute(method: :get, path: '/app')
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
zype-0.20.0 lib/zype/models/apps.rb
zype-0.19.0 lib/zype/models/apps.rb
zype-0.18.0 lib/zype/models/apps.rb
zype-0.17.0 lib/zype/models/apps.rb
zype-0.16.1 lib/zype/models/apps.rb
zype-0.16.0 lib/zype/models/apps.rb
zype-0.15.0 lib/zype/models/apps.rb
zype-0.14.0 lib/zype/models/apps.rb
zype-0.13.0 lib/zype/models/apps.rb
zype-0.12.0 lib/zype/models/apps.rb
zype-0.11.0 lib/zype/models/apps.rb
zype-0.10.0 lib/zype/models/apps.rb
zype-0.9.0 lib/zype/models/apps.rb
zype-0.8.0 lib/zype/models/apps.rb