Sha256: 304c8a7cd4aca02dc03145910c966cffe15afd20c0a86ab35b262db85f813665

Contents?: true

Size: 1004 Bytes

Versions: 5

Compression:

Stored size: 1004 Bytes

Contents

module Ecoportal
  module API
    class GraphQL
      module Builder
        class ContractorEntity
          attr_reader :client

          def initialize(client)
            @client = client
          end

          def create(**kargs, &block)
            createMutation.query(**kargs, &block)
          end

          def update(**kargs, &block)
            updateMutation.query(**kargs, &block)
          end

          def destroy(**kargs, &block)
            destroyMutation.query(**kargs, &block)
          end

          private

          def createMutation
            Ecoportal::API::GraphQL::Mutation::ContractorEntity::Create.new(client)
          end

          def updateMutation
            Ecoportal::API::GraphQL::Mutation::ContractorEntity::Update.new(client)
          end

          def destroyMutation
            Ecoportal::API::GraphQL::Mutation::ContractorEntity::Destroy.new(client)
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.4.3 lib/ecoportal/api/graphql/builder/contractor_entity.rb
ecoportal-api-graphql-0.4.2 lib/ecoportal/api/graphql/builder/contractor_entity.rb
ecoportal-api-graphql-0.4.1 lib/ecoportal/api/graphql/builder/contractor_entity.rb
ecoportal-api-graphql-0.4.0 lib/ecoportal/api/graphql/builder/contractor_entity.rb
ecoportal-api-graphql-0.3.16 lib/ecoportal/api/graphql/builder/contractor_entity.rb