Sha256: 37fd2993d9ff5cf0332501e430410f57c5bf6a9132e3ec3beb7fe6089b35b8cc

Contents?: true

Size: 757 Bytes

Versions: 8

Compression:

Stored size: 757 Bytes

Contents

# frozen_string_literal: true

require_relative '../../resources/authentication_token'

module Desertcart
  class Session
    module Operations
      class Find < Desertcart::Operation::Find
        class Contract < LedgerSync::Ledgers::Contract
          params do
            required(:external_id).maybe(:string)
            required(:ledger_id).filled(:string)
            optional(:login).maybe(:string)
            optional(:password).maybe(:string)
          end
        end

        def deserialized_resource
          Desertcart::AuthenticationToken::Deserializer.new.deserialize(
            hash: response.body['authentication_token'],
            resource: Desertcart::AuthenticationToken.new
          )
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
desertcart-1.2.0 lib/desertcart/session/operations/find.rb
desertcart-1.1.5 lib/desertcart/session/operations/find.rb
desertcart-1.1.4 lib/desertcart/session/operations/find.rb
desertcart-1.1.3 lib/desertcart/session/operations/find.rb
desertcart-1.1.2 lib/desertcart/session/operations/find.rb
desertcart-1.1.1 lib/desertcart/session/operations/find.rb
desertcart-1.1.0 lib/desertcart/session/operations/find.rb
desertcart-1.0.0 lib/desertcart/session/operations/find.rb