# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'sorbet-runtime' require 'faraday' module StackOne module Shared class EmploymentValue < T::Enum enums do FULL_TIME = new('full_time') SHIFTS = new('shifts') PART_TIME = new('part_time') UNMAPPED_VALUE = new('unmapped_value') end end # The employment work schedule type (e.g., full-time, part-time) class EmploymentEmploymentContractType < ::StackOne::Utils::FieldAugmented extend T::Sig field :source_value, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } field :value, Shared::EmploymentValue, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentValue, false) } } sig { params(source_value: String, value: Shared::EmploymentValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end # EmploymentSchemasValue - The type of the employment. class EmploymentSchemasValue < T::Enum enums do PERMANENT = new('permanent') CONTRACTOR = new('contractor') INTERN = new('intern') APPRENTICE = new('apprentice') FREELANCE = new('freelance') TEMPORARY = new('temporary') SEASONAL = new('seasonal') VOLUNTEER = new('volunteer') UNMAPPED_VALUE = new('unmapped_value') end end # The type of employment (e.g., contractor, permanent) class EmploymentEmploymentType < ::StackOne::Utils::FieldAugmented extend T::Sig # The source value of the employment type. field :source_value, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } # The type of the employment. field :value, Shared::EmploymentSchemasValue, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentSchemasValue, false) } } sig { params(source_value: String, value: Shared::EmploymentSchemasValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end # EmploymentSchemasPayFrequencyValue - The pay frequency of the job postings. class EmploymentSchemasPayFrequencyValue < T::Enum enums do HOURLY = new('hourly') WEEKLY = new('weekly') BI_WEEKLY = new('bi_weekly') FOUR_WEEKLY = new('four_weekly') SEMI_MONTHLY = new('semi_monthly') MONTHLY = new('monthly') BI_MONTHLY = new('bi_monthly') QUARTERLY = new('quarterly') SEMI_ANNUALLY = new('semi_annually') YEARLY = new('yearly') THIRTEEN_MONTHLY = new('thirteen_monthly') PRO_RATA = new('pro_rata') UNMAPPED_VALUE = new('unmapped_value') HALF_YEARLY = new('half_yearly') end end # The pay frequency class EmploymentPayFrequency < ::StackOne::Utils::FieldAugmented extend T::Sig # The source value of the pay frequency. field :source_value, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } # The pay frequency of the job postings. field :value, Shared::EmploymentSchemasPayFrequencyValue, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentSchemasPayFrequencyValue, false) } } sig { params(source_value: String, value: Shared::EmploymentSchemasPayFrequencyValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end # EmploymentSchemasPayPeriodValue - The pay period of the job postings. class EmploymentSchemasPayPeriodValue < T::Enum enums do HOUR = new('hour') DAY = new('day') WEEK = new('week') EVERY_TWO_WEEKS = new('every_two_weeks') MONTH = new('month') QUARTER = new('quarter') EVERY_SIX_MONTHS = new('every_six_months') YEAR = new('year') NONE = new('none') UNMAPPED_VALUE = new('unmapped_value') end end # The pay period class EmploymentPayPeriod < ::StackOne::Utils::FieldAugmented extend T::Sig # The source value of the pay period. field :source_value, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } # The pay period of the job postings. field :value, Shared::EmploymentSchemasPayPeriodValue, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentSchemasPayPeriodValue, false) } } sig { params(source_value: String, value: Shared::EmploymentSchemasPayPeriodValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end class Employment < ::StackOne::Utils::FieldAugmented extend T::Sig # The employee ID associated with this employment field :employee_id, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('employee_id') } } # The created_at date field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } # The effective date of the employment contract field :effective_date, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('effective_date'), 'decoder': Utils.datetime_from_iso_format(true) } } # The employment work schedule type (e.g., full-time, part-time) field :employment_contract_type, T.nilable(Shared::EmploymentEmploymentContractType), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('employment_contract_type') } } # The type of employment (e.g., contractor, permanent) field :employment_type, T.nilable(Shared::EmploymentEmploymentType), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('employment_type') } } # The unique ID of the employment field :id, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('id') } } # The job title of the employee field :job_title, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('job_title') } } # The currency used for pay field :pay_currency, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('pay_currency') } } # The pay frequency field :pay_frequency, T.nilable(Shared::EmploymentPayFrequency), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('pay_frequency') } } # The pay period field :pay_period, T.nilable(Shared::EmploymentPayPeriod), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('pay_period') } } # The pay rate for the employee field :pay_rate, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('pay_rate') } } # The updated_at date field :updated_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } } sig { params(employee_id: String, created_at: T.nilable(DateTime), effective_date: T.nilable(DateTime), employment_contract_type: T.nilable(Shared::EmploymentEmploymentContractType), employment_type: T.nilable(Shared::EmploymentEmploymentType), id: T.nilable(String), job_title: T.nilable(String), pay_currency: T.nilable(String), pay_frequency: T.nilable(Shared::EmploymentPayFrequency), pay_period: T.nilable(Shared::EmploymentPayPeriod), pay_rate: T.nilable(String), updated_at: T.nilable(DateTime)).void } def initialize(employee_id: nil, created_at: nil, effective_date: nil, employment_contract_type: nil, employment_type: nil, id: nil, job_title: nil, pay_currency: nil, pay_frequency: nil, pay_period: nil, pay_rate: nil, updated_at: nil) @employee_id = employee_id @created_at = created_at @effective_date = effective_date @employment_contract_type = employment_contract_type @employment_type = employment_type @id = id @job_title = job_title @pay_currency = pay_currency @pay_frequency = pay_frequency @pay_period = pay_period @pay_rate = pay_rate @updated_at = updated_at end end end end