Skip to content

Commit

Permalink
fix(payslip): allow for nullable fields
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions-bot committed May 26, 2024
1 parent bcde752 commit 0264500
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
affixapi (1.1.79)
affixapi (1.1.80)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand Down
30 changes: 5 additions & 25 deletions lib/openapi_client/models/payslip_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ def self.openapi_types
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:'gross_pay',
:'net_pay',
:'earnings',
:'contributions',
:'deductions',
:'taxes'
])
end

Expand Down Expand Up @@ -226,14 +231,6 @@ def list_invalid_properties
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
end

if @gross_pay.nil?
invalid_properties.push('invalid value for "gross_pay", gross_pay cannot be nil.')
end

if @net_pay.nil?
invalid_properties.push('invalid value for "net_pay", net_pay cannot be nil.')
end

if @start_date.nil?
invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
end
Expand All @@ -246,18 +243,6 @@ def list_invalid_properties
invalid_properties.push('invalid value for "payment_date", payment_date cannot be nil.')
end

if @earnings.nil?
invalid_properties.push('invalid value for "earnings", earnings cannot be nil.')
end

if @deductions.nil?
invalid_properties.push('invalid value for "deductions", deductions cannot be nil.')
end

if @taxes.nil?
invalid_properties.push('invalid value for "taxes", taxes cannot be nil.')
end

invalid_properties
end

Expand All @@ -271,14 +256,9 @@ def valid?
return false if @currency.nil?
currency_validator = EnumAttributeValidator.new('String', ["usd", "eur", "gbp"])
return false unless currency_validator.valid?(@currency)
return false if @gross_pay.nil?
return false if @net_pay.nil?
return false if @start_date.nil?
return false if @end_date.nil?
return false if @payment_date.nil?
return false if @earnings.nil?
return false if @deductions.nil?
return false if @taxes.nil?
true
end

Expand Down
2 changes: 1 addition & 1 deletion lib/openapi_client/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module OpenapiClient
VERSION = '1.1.79'
VERSION = '1.1.80'
end

0 comments on commit 0264500

Please sign in to comment.