Skip to content

Commit

Permalink
Upgrade after onfido-openapi-spec change 7887fd6
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido authored and github-actions[bot] committed Jan 22, 2025
1 parent 7cad17e commit d2c6b83
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "54ce45f",
"long_sha": "54ce45f2138f044cc5cb40f6904dc7bc1a675be6",
"version": "v4.5.0"
"short_sha": "7887fd6",
"long_sha": "7887fd62b32910e929d833c45f4393468e181a89",
"version": "v4.6.0"
},
"release": "v4.5.0"
"release": "v4.6.0"
}
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ group :development, :test do
gem 'rake', '~> 13.0.1'
gem 'pry-byebug'
gem 'rubocop', '~> 0.66.0'
gem 'rubyzip', '~> 2.3.2'
end

gem "faraday-follow_redirects", "~> 0.3.0"
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The official Ruby library for integrating with the Onfido API.

Documentation can be found at <https://documentation.onfido.com>.
Refer to the documentation at <https://documentation.onfido.com>.

This version uses Onfido API v3.6. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details of which client library versions use which versions of the API.

Expand All @@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d
### Installation

```ruby
gem onfido, '~> 4.5.0'
gem onfido, '~> 4.6.0'
```

Configure with your API token, region and optional timeout (default value is 30):
Expand Down Expand Up @@ -42,7 +42,7 @@ applicant = onfido_api.create_applicant(
)
```

Documentation and code examples can be found at https://documentation.onfido.com
Documentation and code examples can be found at <https://documentation.onfido.com>.

## Error Handling

Expand All @@ -65,7 +65,7 @@ end

### Webhook event verification

Webhook events payload needs to be verified before it can be accessed. Library allows to easily decode the payload and verify its signature before returning it as an object for user convenience:
Webhook events payload needs to be verified before it can be accessed. Verifying webhook payloads is crucial for security reasons, as it ensures that the payloads are indeed from Onfido and have not been tampered with. The library allows you to easily decode the payload and verify its signature before returning it as an object for user convenience:

```ruby
require 'onfido/webhook_event_verifier'
Expand All @@ -86,37 +86,39 @@ Webhook events payload needs to be verified before it can be accessed. Library a

## Contributing

This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore all the contributions, except tests files, should target [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository.
This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore, all contributions (except test files) should target the [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository. Please follow the contribution guidelines provided in the OpenAPI specification repository.

For contributions to the tests instead, please follow the steps below:

1. [Fork](https://github.com/onfido/onfido-ruby/fork) repository
1. Fork the [repository](https://github.com/onfido/onfido-ruby/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Make your changes
4. Commit your changes (`git commit -am 'Add some feature'`)
4. Commit your changes (`git commit -am 'Add detailed description of the feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request

## Versioning policy

[Semantic Versioning](https://semver.org) policy is used for library versioning, following guidelines and limitations below:
Versioning helps manage changes and ensures compatibility across different versions of the library.

- MAJOR versions (x.0.0) might:
[Semantic Versioning](https://semver.org) policy is used for library versioning, following the guidelines and limitations outlined below:

- MAJOR versions (x.0.0) may:
- target a new API version
- include non-backward compatible change
- MINOR versions (0.x.0) might:
- MINOR versions (0.x.0) may:
- add a new functionality, non-mandatory parameter or property
- deprecate an old functionality
- include non-backward compatible change to a functionality which is:
- labelled as alpha or beta
- completely broken and not usable
- PATCH version (0.0.x) might:
- PATCH version (0.0.x) will:
- fix a bug
- include backward compatible changes only

## More documentation

More documentation and code examples can be found at <https://documentation.onfido.com>.
Additional documentation and code examples can be found at <https://documentation.onfido.com>.

## Support

Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ApiClient
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
def initialize(config = Configuration.default)
@config = config
@user_agent = "onfido-ruby/4.5.0"
@user_agent = "onfido-ruby/4.6.0"
@default_headers = {
'Content-Type' => 'application/json',
'User-Agent' => @user_agent
Expand Down
4 changes: 2 additions & 2 deletions lib/onfido/models/id_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ def list_invalid_properties
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
type_validator = EnumAttributeValidator.new('String', ["ssn", "social_insurance", "tax_id", "identity_card", "driving_licence", "share_code", "voter_id", "passport", "other", "unknown_default_open_api"])
type_validator = EnumAttributeValidator.new('String', ["ssn", "social_insurance", "tax_id", "identity_card", "driving_license", "driving_licence", "share_code", "voter_id", "passport", "other", "unknown_default_open_api"])
return false unless type_validator.valid?(@type)
true
end

# Custom attribute writer method checking allowed values (enum).
# @param [Object] type Object to be assigned
def type=(type)
validator = EnumAttributeValidator.new('String', ["ssn", "social_insurance", "tax_id", "identity_card", "driving_licence", "share_code", "voter_id", "passport", "other", "unknown_default_open_api"])
validator = EnumAttributeValidator.new('String', ["ssn", "social_insurance", "tax_id", "identity_card", "driving_license", "driving_licence", "share_code", "voter_id", "passport", "other", "unknown_default_open_api"])
unless validator.valid?(type)
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
end
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module Onfido
VERSION = '4.5.0'
VERSION = '4.6.0'
end

0 comments on commit d2c6b83

Please sign in to comment.