# 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, T.nilable(Object), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } field :value, T.nilable(Shared::EmploymentValue), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentValue, true) } } sig { params(source_value: T.nilable(Object), value: T.nilable(Shared::EmploymentValue)).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end class EmploymentSchemasValue < T::Enum enums do FULL_TIME = new('full_time') PART_TIME = new('part_time') CONTRACTOR = new('contractor') INTERN = new('intern') PERMANENT = new('permanent') APPRENTICE = new('apprentice') FREELANCE = new('freelance') TERMINATED = new('terminated') TEMPORARY = new('temporary') SEASONAL = new('seasonal') VOLUNTEER = new('volunteer') PROBATION = new('probation') INTERNAL = new('internal') EXTERNAL = new('external') EMPLOYER_OF_RECORD = new('employer_of_record') UNMAPPED_VALUE = new('unmapped_value') end end # The type of employment (e.g., contractor, permanent) class EmploymentEmploymentType < ::StackOne::Utils::FieldAugmented extend T::Sig field :source_value, T.nilable(Object), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } field :value, T.nilable(Shared::EmploymentSchemasValue), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentSchemasValue, true) } } sig { params(source_value: T.nilable(Object), value: T.nilable(Shared::EmploymentSchemasValue)).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end 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') DAILY = new('daily') FIXED = new('fixed') end end # The pay frequency class PayFrequency < ::StackOne::Utils::FieldAugmented extend T::Sig field :source_value, T.nilable(Object), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } field :value, T.nilable(Shared::EmploymentSchemasPayFrequencyValue), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentSchemasPayFrequencyValue, true) } } sig { params(source_value: T.nilable(Object), value: T.nilable(Shared::EmploymentSchemasPayFrequencyValue)).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end 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') UNMAPPED_VALUE = new('unmapped_value') end end # The pay period class PayPeriod < ::StackOne::Utils::FieldAugmented extend T::Sig field :source_value, T.nilable(Object), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } field :value, T.nilable(Shared::EmploymentSchemasPayPeriodValue), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::EmploymentSchemasPayPeriodValue, true) } } sig { params(source_value: T.nilable(Object), value: T.nilable(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::PayFrequency), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('pay_frequency') } } # The pay period field :pay_period, T.nilable(Shared::PayPeriod), { '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::PayFrequency), pay_period: T.nilable(Shared::PayPeriod), 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