Sha256: 5ca7932055caf27efd7415d76dce532cd75527772a23dcc1fe8c9568e3b8b561

Contents?: true

Size: 351 Bytes

Versions: 8

Compression:

Stored size: 351 Bytes

Contents

module PensioAPI
  module Responses
    class SuccessCallback < Transaction
      extend Forwardable

      def_delegators :new, :captured?

      def each
        [reservation, charge].each { |t| yield t }
      end

      def reservation
        @transactions.first
      end

      def charge
        @transactions.last
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pensio_api-0.3.5 lib/pensio_api/responses/success_callback.rb
pensio_api-0.3.4 lib/pensio_api/responses/success_callback.rb
pensio_api-0.3.3 lib/pensio_api/responses/success_callback.rb
pensio_api-0.3.2 lib/pensio_api/responses/success_callback.rb
pensio_api-0.3.1 lib/pensio_api/responses/success_callback.rb
pensio_api-0.3.0 lib/pensio_api/responses/success_callback.rb
pensio_api-0.2.3 lib/pensio_api/responses/success_callback.rb
pensio_api-0.2.2 lib/pensio_api/responses/success_callback.rb