Sha256: 6965eea83d8a97371cac9f1a6ccf5378efbb159e0702d822d75c217e0cf7f49b

Contents?: true

Size: 412 Bytes

Versions: 5

Compression:

Stored size: 412 Bytes

Contents

require_relative "create_schemas/customer"

module Tangany
  module Customers
    module Contracts
      module Customers
        class Create < ApplicationContract
          schema(CreateSchemas::Customer.schema) { config.validate_keys = true }

          rule(:contracts) do
            key.failure("must contain at least one contract") if value.size == 0
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tangany-0.0.5 lib/tangany/customers/contracts/customers/create.rb
tangany-0.0.4 lib/tangany/customers/contracts/customers/create.rb
tangany-0.0.3 lib/tangany/customers/contracts/customers/create.rb
tangany-0.0.2 lib/tangany/customers/contracts/customers/create.rb
tangany-0.0.1 lib/tangany/customers/contracts/customers/create.rb