Skip to content

Commit ab22783

Browse files
feat(api): api update
1 parent ed8c82c commit ab22783

File tree

4 files changed

+34
-63
lines changed

4 files changed

+34
-63
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f8783c7acb61970583e95ad6d75c8735d2ae5e4344f808957e0b9cc22f2b8c04.yml
3-
openapi_spec_hash: 2baa7719b95befc1553083d5757bd99a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ef0b0fb4ec85648855da514cbc53018cb429fb37bce8570bc6c44254eb32c62f.yml
3+
openapi_spec_hash: 38622a4a3cdef04686053018329616f2
44
config_hash: 6d3585c0032e08d723d077d660fc8448

lib/finch_api/models/hris/pay_statement.rb

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,16 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel
1515
# @!attribute employee_deductions
1616
# The array of deductions objects associated with this pay statement.
1717
#
18-
# @return [Array<FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction, nil>, nil]
18+
# @return [Array<FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction>, nil]
1919
required :employee_deductions,
20-
-> {
21-
FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployeeDeduction,
22-
nil?: true]
23-
},
20+
-> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployeeDeduction] },
2421
nil?: true
2522

2623
# @!attribute employer_contributions
2724
#
28-
# @return [Array<FinchAPI::Models::HRIS::PayStatement::EmployerContribution, nil>, nil]
25+
# @return [Array<FinchAPI::Models::HRIS::PayStatement::EmployerContribution>, nil]
2926
required :employer_contributions,
30-
-> {
31-
FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployerContribution,
32-
nil?: true]
33-
},
27+
-> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployerContribution] },
3428
nil?: true
3529

3630
# @!attribute gross_pay
@@ -58,9 +52,11 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel
5852
# @!attribute taxes
5953
# The array of taxes objects associated with this pay statement.
6054
#
61-
# @return [Array<FinchAPI::Models::HRIS::PayStatement::Tax, nil>, nil]
55+
# @return [Array<FinchAPI::Models::HRIS::PayStatement::Tax>, nil]
6256
required :taxes,
63-
-> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Tax, nil?: true] },
57+
-> {
58+
FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Tax]
59+
},
6460
nil?: true
6561

6662
# @!attribute total_hours
@@ -78,9 +74,9 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel
7874
# @!method initialize(earnings:, employee_deductions:, employer_contributions:, gross_pay:, individual_id:, net_pay:, payment_method:, taxes:, total_hours:, type:)
7975
# @param earnings [Array<FinchAPI::Models::HRIS::PayStatement::Earning, nil>, nil] The array of earnings objects associated with this pay statement
8076
#
81-
# @param employee_deductions [Array<FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction, nil>, nil] The array of deductions objects associated with this pay statement.
77+
# @param employee_deductions [Array<FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction>, nil] The array of deductions objects associated with this pay statement.
8278
#
83-
# @param employer_contributions [Array<FinchAPI::Models::HRIS::PayStatement::EmployerContribution, nil>, nil]
79+
# @param employer_contributions [Array<FinchAPI::Models::HRIS::PayStatement::EmployerContribution>, nil]
8480
#
8581
# @param gross_pay [FinchAPI::Models::Money, nil]
8682
#
@@ -90,7 +86,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel
9086
#
9187
# @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] The payment method.
9288
#
93-
# @param taxes [Array<FinchAPI::Models::HRIS::PayStatement::Tax, nil>, nil] The array of taxes objects associated with this pay statement.
89+
# @param taxes [Array<FinchAPI::Models::HRIS::PayStatement::Tax>, nil] The array of taxes objects associated with this pay statement.
9490
#
9591
# @param total_hours [Float, nil] The number of hours worked for this pay period
9692
#

rbi/finch_api/models/hris/pay_statement.rbi

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,15 @@ module FinchAPI
2222
# The array of deductions objects associated with this pay statement.
2323
sig do
2424
returns(
25-
T.nilable(
26-
T::Array[
27-
T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction)
28-
]
29-
)
25+
T.nilable(T::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction])
3026
)
3127
end
3228
attr_accessor :employee_deductions
3329

3430
sig do
3531
returns(
3632
T.nilable(
37-
T::Array[
38-
T.nilable(FinchAPI::HRIS::PayStatement::EmployerContribution)
39-
]
33+
T::Array[FinchAPI::HRIS::PayStatement::EmployerContribution]
4034
)
4135
)
4236
end
@@ -67,11 +61,7 @@ module FinchAPI
6761
attr_accessor :payment_method
6862

6963
# The array of taxes objects associated with this pay statement.
70-
sig do
71-
returns(
72-
T.nilable(T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)])
73-
)
74-
end
64+
sig { returns(T.nilable(T::Array[FinchAPI::HRIS::PayStatement::Tax])) }
7565
attr_accessor :taxes
7666

7767
# The number of hours worked for this pay period
@@ -95,17 +85,13 @@ module FinchAPI
9585
employee_deductions:
9686
T.nilable(
9787
T::Array[
98-
T.nilable(
99-
FinchAPI::HRIS::PayStatement::EmployeeDeduction::OrHash
100-
)
88+
FinchAPI::HRIS::PayStatement::EmployeeDeduction::OrHash
10189
]
10290
),
10391
employer_contributions:
10492
T.nilable(
10593
T::Array[
106-
T.nilable(
107-
FinchAPI::HRIS::PayStatement::EmployerContribution::OrHash
108-
)
94+
FinchAPI::HRIS::PayStatement::EmployerContribution::OrHash
10995
]
11096
),
11197
gross_pay: T.nilable(FinchAPI::Money::OrHash),
@@ -114,9 +100,7 @@ module FinchAPI
114100
payment_method:
115101
T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol),
116102
taxes:
117-
T.nilable(
118-
T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax::OrHash)]
119-
),
103+
T.nilable(T::Array[FinchAPI::HRIS::PayStatement::Tax::OrHash]),
120104
total_hours: T.nilable(Float),
121105
type: T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol)
122106
).returns(T.attached_class)
@@ -151,17 +135,11 @@ module FinchAPI
151135
),
152136
employee_deductions:
153137
T.nilable(
154-
T::Array[
155-
T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction)
156-
]
138+
T::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction]
157139
),
158140
employer_contributions:
159141
T.nilable(
160-
T::Array[
161-
T.nilable(
162-
FinchAPI::HRIS::PayStatement::EmployerContribution
163-
)
164-
]
142+
T::Array[FinchAPI::HRIS::PayStatement::EmployerContribution]
165143
),
166144
gross_pay: T.nilable(FinchAPI::Money),
167145
individual_id: String,
@@ -170,10 +148,7 @@ module FinchAPI
170148
T.nilable(
171149
FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol
172150
),
173-
taxes:
174-
T.nilable(
175-
T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)]
176-
),
151+
taxes: T.nilable(T::Array[FinchAPI::HRIS::PayStatement::Tax]),
177152
total_hours: T.nilable(Float),
178153
type: T.nilable(FinchAPI::HRIS::PayStatement::Type::TaggedSymbol)
179154
}

sig/finch_api/models/hris/pay_statement.rbs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ module FinchAPI
44
type pay_statement =
55
{
66
earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?,
7-
employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?,
8-
employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?,
7+
employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction]?,
8+
employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution]?,
99
gross_pay: FinchAPI::Money?,
1010
individual_id: String,
1111
net_pay: FinchAPI::Money?,
1212
payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?,
13-
taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?,
13+
taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax]?,
1414
total_hours: Float?,
1515
type: FinchAPI::Models::HRIS::PayStatement::type_?
1616
}
1717

1818
class PayStatement < FinchAPI::Internal::Type::BaseModel
1919
attr_accessor earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?
2020

21-
attr_accessor employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?
21+
attr_accessor employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction]?
2222

23-
attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?
23+
attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution]?
2424

2525
attr_accessor gross_pay: FinchAPI::Money?
2626

@@ -30,34 +30,34 @@ module FinchAPI
3030

3131
attr_accessor payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?
3232

33-
attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?
33+
attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax]?
3434

3535
attr_accessor total_hours: Float?
3636

3737
attr_accessor type: FinchAPI::Models::HRIS::PayStatement::type_?
3838

3939
def initialize: (
4040
earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?,
41-
employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?,
42-
employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?,
41+
employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction]?,
42+
employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution]?,
4343
gross_pay: FinchAPI::Money?,
4444
individual_id: String,
4545
net_pay: FinchAPI::Money?,
4646
payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?,
47-
taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?,
47+
taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax]?,
4848
total_hours: Float?,
4949
type: FinchAPI::Models::HRIS::PayStatement::type_?
5050
) -> void
5151

5252
def to_hash: -> {
5353
earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?,
54-
employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?,
55-
employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?,
54+
employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction]?,
55+
employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution]?,
5656
gross_pay: FinchAPI::Money?,
5757
individual_id: String,
5858
net_pay: FinchAPI::Money?,
5959
payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?,
60-
taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?,
60+
taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax]?,
6161
total_hours: Float?,
6262
type: FinchAPI::Models::HRIS::PayStatement::type_?
6363
}

0 commit comments

Comments
 (0)