Skip to content

Commit

Permalink
fix(currency): currency nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions-bot committed Apr 2, 2024
1 parent 9fb1565 commit 0c4f7c7
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ docs/CoreApi.md
docs/CreateEmployeeRequest.md
docs/CreateEmployeeRequestBankAccount.md
docs/CreateEmployeeRequestManager.md
docs/CurrencyRequest.md
docs/CurrencyNotNullRequest.md
docs/CurrencyResponse.md
docs/DisconnectResponse.md
docs/EmployeeResponse.md
Expand Down Expand Up @@ -69,7 +69,7 @@ lib/openapi_client/models/company_response.rb
lib/openapi_client/models/create_employee_request.rb
lib/openapi_client/models/create_employee_request_bank_account.rb
lib/openapi_client/models/create_employee_request_manager.rb
lib/openapi_client/models/currency_request.rb
lib/openapi_client/models/currency_not_null_request.rb
lib/openapi_client/models/currency_response.rb
lib/openapi_client/models/disconnect_response.rb
lib/openapi_client/models/employee_response.rb
Expand Down Expand Up @@ -119,7 +119,7 @@ spec/models/company_response_spec.rb
spec/models/create_employee_request_bank_account_spec.rb
spec/models/create_employee_request_manager_spec.rb
spec/models/create_employee_request_spec.rb
spec/models/currency_request_spec.rb
spec/models/currency_not_null_request_spec.rb
spec/models/currency_response_spec.rb
spec/models/disconnect_response_spec.rb
spec/models/employee_response_spec.rb
Expand Down
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.48)
affixapi (1.1.49)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Class | Method | HTTP request | Description
- [OpenapiClient::CreateEmployeeRequest](docs/CreateEmployeeRequest.md)
- [OpenapiClient::CreateEmployeeRequestBankAccount](docs/CreateEmployeeRequestBankAccount.md)
- [OpenapiClient::CreateEmployeeRequestManager](docs/CreateEmployeeRequestManager.md)
- [OpenapiClient::CurrencyRequest](docs/CurrencyRequest.md)
- [OpenapiClient::CurrencyNotNullRequest](docs/CurrencyNotNullRequest.md)
- [OpenapiClient::CurrencyResponse](docs/CurrencyResponse.md)
- [OpenapiClient::DisconnectResponse](docs/DisconnectResponse.md)
- [OpenapiClient::EmployeeResponse](docs/EmployeeResponse.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/CurrencyRequest.md → docs/CurrencyNotNullRequest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenapiClient::CurrencyRequest
# OpenapiClient::CurrencyNotNullRequest

## Properties

Expand All @@ -10,6 +10,6 @@
```ruby
require 'openapi_client'

instance = OpenapiClient::CurrencyRequest.new()
instance = OpenapiClient::CurrencyNotNullRequest.new()
```

2 changes: 1 addition & 1 deletion docs/EmploymentNoNullEnumRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| **pay_period** | **String** | | |
| **pay_frequency** | **String** | | |
| **employment_type** | **String** | | |
| **currency** | [**CurrencyRequest**](CurrencyRequest.md) | | |
| **currency** | [**CurrencyNotNullRequest**](CurrencyNotNullRequest.md) | | |
| **effective_date** | **Date** | | |

## Example
Expand Down
2 changes: 1 addition & 1 deletion lib/openapi_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
require 'openapi_client/models/create_employee_request'
require 'openapi_client/models/create_employee_request_bank_account'
require 'openapi_client/models/create_employee_request_manager'
require 'openapi_client/models/currency_request'
require 'openapi_client/models/currency_not_null_request'
require 'openapi_client/models/currency_response'
require 'openapi_client/models/disconnect_response'
require 'openapi_client/models/employee_response'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module OpenapiClient
class CurrencyRequest
class CurrencyNotNullRequest
USD = "usd".freeze
GBP = "gbp".freeze
EUR = "eur".freeze
Expand All @@ -30,8 +30,8 @@ def self.build_from_hash(value)
# @param [String] The enum value in the form of the string
# @return [String] The enum value
def build_from_hash(value)
constantValues = CurrencyRequest.constants.select { |c| CurrencyRequest::const_get(c) == value }
raise "Invalid ENUM value #{value} for class #CurrencyRequest" if constantValues.empty?
constantValues = CurrencyNotNullRequest.constants.select { |c| CurrencyNotNullRequest::const_get(c) == value }
raise "Invalid ENUM value #{value} for class #CurrencyNotNullRequest" if constantValues.empty?
value
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/openapi_client/models/currency_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

module OpenapiClient
class CurrencyResponse
NULL = "null".freeze
USD = "usd".freeze
GBP = "gbp".freeze
EUR = "eur".freeze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def self.openapi_types
:'pay_period' => :'String',
:'pay_frequency' => :'String',
:'employment_type' => :'String',
:'currency' => :'CurrencyRequest',
:'currency' => :'CurrencyNotNullRequest',
:'effective_date' => :'Date'
}
end
Expand Down
6 changes: 1 addition & 5 deletions lib/openapi_client/models/employment_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def self.openapi_nullable
:'pay_period',
:'pay_frequency',
:'employment_type',
:'currency',
:'effective_date'
])
end
Expand Down Expand Up @@ -142,10 +143,6 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @currency.nil?
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
end

invalid_properties
end

Expand All @@ -156,7 +153,6 @@ def valid?
return false unless pay_frequency_validator.valid?(@pay_frequency)
employment_type_validator = EnumAttributeValidator.new('String', ["full_time", "part_time", "contractor", "other", "null"])
return false unless employment_type_validator.valid?(@employment_type)
return false if @currency.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.48'
VERSION = '1.1.49'
end
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
require 'json'
require 'date'

# Unit tests for OpenapiClient::CurrencyRequest
# Unit tests for OpenapiClient::CurrencyNotNullRequest
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::CurrencyRequest do
let(:instance) { OpenapiClient::CurrencyRequest.new }
describe OpenapiClient::CurrencyNotNullRequest do
let(:instance) { OpenapiClient::CurrencyNotNullRequest.new }

describe 'test an instance of CurrencyRequest' do
it 'should create an instance of CurrencyRequest' do
expect(instance).to be_instance_of(OpenapiClient::CurrencyRequest)
describe 'test an instance of CurrencyNotNullRequest' do
it 'should create an instance of CurrencyNotNullRequest' do
expect(instance).to be_instance_of(OpenapiClient::CurrencyNotNullRequest)
end
end
end

0 comments on commit 0c4f7c7

Please sign in to comment.