|
3 | 3 | module FinchAPI |
4 | 4 | module Models |
5 | 5 | module HRIS |
6 | | - class BenefitContribution < FinchAPI::Internal::Type::BaseModel |
7 | | - # @!attribute amount |
8 | | - # Contribution amount in cents (if `fixed`) or basis points (if `percent`). |
9 | | - # |
10 | | - # @return [Integer, nil] |
11 | | - required :amount, Integer, nil?: true |
12 | | - |
13 | | - # @!attribute type |
14 | | - # Contribution type. |
15 | | - # |
16 | | - # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] |
17 | | - required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::Type }, nil?: true |
18 | | - |
19 | | - # @!method initialize(amount:, type:) |
20 | | - # @param amount [Integer, nil] Contribution amount in cents (if `fixed`) or basis points (if `percent`). |
21 | | - # |
22 | | - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] Contribution type. |
23 | | - |
24 | | - # Contribution type. |
25 | | - # |
26 | | - # @see FinchAPI::Models::HRIS::BenefitContribution#type |
27 | | - module Type |
28 | | - extend FinchAPI::Internal::Type::Enum |
29 | | - |
30 | | - FIXED = :fixed |
31 | | - PERCENT = :percent |
32 | | - |
33 | | - # @!method self.values |
34 | | - # @return [Array<Symbol>] |
| 6 | + module BenefitContribution |
| 7 | + extend FinchAPI::Internal::Type::Union |
| 8 | + |
| 9 | + variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember0 } |
| 10 | + |
| 11 | + variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember1 } |
| 12 | + |
| 13 | + variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember2 } |
| 14 | + |
| 15 | + class UnionMember0 < FinchAPI::Internal::Type::BaseModel |
| 16 | + # @!attribute amount |
| 17 | + # Contribution amount in cents. |
| 18 | + # |
| 19 | + # @return [Integer] |
| 20 | + required :amount, Integer |
| 21 | + |
| 22 | + # @!attribute type |
| 23 | + # Fixed contribution type. |
| 24 | + # |
| 25 | + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type] |
| 26 | + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember0::Type } |
| 27 | + |
| 28 | + # @!method initialize(amount:, type:) |
| 29 | + # @param amount [Integer] Contribution amount in cents. |
| 30 | + # |
| 31 | + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type] Fixed contribution type. |
| 32 | + |
| 33 | + # Fixed contribution type. |
| 34 | + # |
| 35 | + # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember0#type |
| 36 | + module Type |
| 37 | + extend FinchAPI::Internal::Type::Enum |
| 38 | + |
| 39 | + FIXED = :fixed |
| 40 | + |
| 41 | + # @!method self.values |
| 42 | + # @return [Array<Symbol>] |
| 43 | + end |
35 | 44 | end |
| 45 | + |
| 46 | + class UnionMember1 < FinchAPI::Internal::Type::BaseModel |
| 47 | + # @!attribute amount |
| 48 | + # Contribution amount in basis points (1/100th of a percent). |
| 49 | + # |
| 50 | + # @return [Integer] |
| 51 | + required :amount, Integer |
| 52 | + |
| 53 | + # @!attribute type |
| 54 | + # Percentage contribution type. |
| 55 | + # |
| 56 | + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type] |
| 57 | + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember1::Type } |
| 58 | + |
| 59 | + # @!method initialize(amount:, type:) |
| 60 | + # @param amount [Integer] Contribution amount in basis points (1/100th of a percent). |
| 61 | + # |
| 62 | + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type] Percentage contribution type. |
| 63 | + |
| 64 | + # Percentage contribution type. |
| 65 | + # |
| 66 | + # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember1#type |
| 67 | + module Type |
| 68 | + extend FinchAPI::Internal::Type::Enum |
| 69 | + |
| 70 | + PERCENT = :percent |
| 71 | + |
| 72 | + # @!method self.values |
| 73 | + # @return [Array<Symbol>] |
| 74 | + end |
| 75 | + end |
| 76 | + |
| 77 | + class UnionMember2 < FinchAPI::Internal::Type::BaseModel |
| 78 | + # @!attribute tiers |
| 79 | + # Array of tier objects defining employer match tiers based on employee |
| 80 | + # contribution thresholds. |
| 81 | + # |
| 82 | + # @return [Array<FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Tier>] |
| 83 | + required :tiers, |
| 84 | + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] } |
| 85 | + |
| 86 | + # @!attribute type |
| 87 | + # Tiered contribution type (only valid for company_contribution). |
| 88 | + # |
| 89 | + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type] |
| 90 | + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember2::Type } |
| 91 | + |
| 92 | + # @!method initialize(tiers:, type:) |
| 93 | + # Some parameter documentations has been truncated, see |
| 94 | + # {FinchAPI::Models::HRIS::BenefitContribution::UnionMember2} for more details. |
| 95 | + # |
| 96 | + # @param tiers [Array<FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Tier>] Array of tier objects defining employer match tiers based on employee contributi |
| 97 | + # |
| 98 | + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type] Tiered contribution type (only valid for company_contribution). |
| 99 | + |
| 100 | + class Tier < FinchAPI::Internal::Type::BaseModel |
| 101 | + # @!attribute match |
| 102 | + # |
| 103 | + # @return [Integer] |
| 104 | + required :match, Integer |
| 105 | + |
| 106 | + # @!attribute threshold |
| 107 | + # |
| 108 | + # @return [Integer] |
| 109 | + required :threshold, Integer |
| 110 | + |
| 111 | + # @!method initialize(match:, threshold:) |
| 112 | + # @param match [Integer] |
| 113 | + # @param threshold [Integer] |
| 114 | + end |
| 115 | + |
| 116 | + # Tiered contribution type (only valid for company_contribution). |
| 117 | + # |
| 118 | + # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember2#type |
| 119 | + module Type |
| 120 | + extend FinchAPI::Internal::Type::Enum |
| 121 | + |
| 122 | + TIERED = :tiered |
| 123 | + |
| 124 | + # @!method self.values |
| 125 | + # @return [Array<Symbol>] |
| 126 | + end |
| 127 | + end |
| 128 | + |
| 129 | + # @!method self.variants |
| 130 | + # @return [Array(FinchAPI::Models::HRIS::BenefitContribution::UnionMember0, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2)] |
36 | 131 | end |
37 | 132 | end |
38 | 133 | end |
|
0 commit comments