Sha256: 5ae24c41b4b8a2dc2c657ce211af33af93cb158e9c476405b95a0e5fdfb16c08

Contents?: true

Size: 450 Bytes

Versions: 5

Compression:

Stored size: 450 Bytes

Contents

module Paysio
  module Actions
    module List
      module ClassMethods
        def all
          response = Paysio::Client.request(:get, path)
          Resource.build_from(response)
        end

        def count
          all.count
        end

        def first
          all.first
        end

        def last
          all.last
        end
      end

      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
paysio-1.0.6 lib/paysio/actions/list.rb
paysio-1.0.5 lib/paysio/actions/list.rb
paysio-1.0.4 lib/paysio/actions/list.rb
paysio-1.0.3 lib/paysio/actions/list.rb
paysio-1.0.2 lib/paysio/actions/list.rb