Class: LingutestClient::Candidate

Inherits:
Base
  • Object
show all
Includes:
API::Operations::Create, API::Operations::Delete, API::Operations::Find, API::Operations::Update, API::Resource
Defined in:
lib/lingutest_client/candidate.rb

Constant Summary collapse

CreateSchema =
Dry::Schema.Params do
  required(:fname).filled(:string)
  required(:lname).filled(:string)
  required(:email).filled(:string, format?: URI::MailTo::EMAIL_REGEXP)
  optional(:locale).filled(:string)
  optional(:mobile).filled(:string)
  optional(:gender).filled(Types::Gender)
  optional(:ssn).filled(:string, format?: /\A(\d{10,11}|\d{5,6}|^$)\z/i)
end
UpdateSchema =
Dry::Schema.Params do
  optional(:fname).filled(:string)
  optional(:lname).filled(:string)
  optional(:email).filled(:string, format?: URI::MailTo::EMAIL_REGEXP)
  optional(:locale).filled(:string)
  optional(:mobile).filled(:string)
  optional(:gender).filled(Types::Gender)
  optional(:ssn).filled(:string, format?: /\A(\d{10,11}|\d{5,6}|^$)\z/i)
end
OBJECT_NAME =
:candidate

Method Summary

Methods included from API::Operations::Update

included

Methods included from API::Operations::Delete

included

Methods included from API::Operations::Find

included

Methods included from API::Operations::Create

included

Methods included from API::Resource

included

Methods inherited from Base

#to_hash