diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 169c72d..b5419f3 100755
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -4,31 +4,31 @@ management:
docChecksum: 5e4ef027bc51f54368e8b1607b77c098
docVersion: 1.0.0
speakeasyVersion: internal
- generationVersion: 2.237.2
- releaseVersion: 0.5.3
- configChecksum: 8b7d88ce2f2d3ac2e5f125565fef9062
+ generationVersion: 2.250.2
+ releaseVersion: 0.6.0
+ configChecksum: c613369d863897a4c0aadcd4d627b2cf
repoURL: https://github.com/ding-live/ding-ruby.git
repoSubDirectory: .
installationURL: https://github.com/ding-live/ding-ruby
published: true
features:
ruby:
- core: 3.2.2
+ core: 3.2.3
examples: 2.81.3
flattening: 2.81.1
globalSecurity: 2.81.3
globalServerURLs: 2.82.1
serverIDs: 2.81.1
generatedFiles:
- - lib/ding/sdkconfiguration.rb
- - lib/ding/otp.rb
- - lib/ding/lookup.rb
- - lib/ding/sdk.rb
+ - lib/ding_sdk/sdkconfiguration.rb
+ - lib/ding_sdk/otp.rb
+ - lib/ding_sdk/lookup.rb
+ - lib/ding_sdk/ding.rb
- .rubocop.yml
- Gemfile
- Rakefile
- - lib/ding/utils/metadata_fields.rb
- - lib/ding/utils/utils.rb
+ - lib/ding_sdk/utils/metadata_fields.rb
+ - lib/ding_sdk/utils/utils.rb
- sorbet/config
- sorbet/rbi/annotations/.gitattributes
- sorbet/rbi/annotations/faraday.rbi
@@ -70,20 +70,29 @@ generatedFiles:
- sorbet/tapioca/config.yml
- sorbet/tapioca/require.rb
- ding_sdk.gemspec
- - lib/ding/models/operations/check.rb
- - lib/ding/models/operations/create_autentication.rb
- - lib/ding/models/operations/retry_.rb
- - lib/ding/models/operations/lookup.rb
- - lib/ding/models/shared/errorresponse.rb
- - lib/ding/models/shared/createcheckresponse.rb
- - lib/ding/models/shared/createcheckrequest.rb
- - lib/ding/models/shared/createauthenticationresponse.rb
- - lib/ding/models/shared/createauthenticationrequest.rb
- - lib/ding/models/shared/retryauthenticationresponse.rb
- - lib/ding/models/shared/retryauthenticationrequest.rb
- - lib/ding/models/shared/lookupresponse.rb
- - lib/ding/models/shared/security.rb
+ - lib/ding_sdk/models/operations/check_response.rb
+ - lib/ding_sdk/models/operations/create_autentication_response.rb
+ - lib/ding_sdk/models/operations/retry_response.rb
+ - lib/ding_sdk/models/operations/lookup_request.rb
+ - lib/ding_sdk/models/operations/lookup_response.rb
+ - lib/ding_sdk/models/shared/code.rb
+ - lib/ding_sdk/models/shared/errorresponse.rb
+ - lib/ding_sdk/models/shared/createcheckresponse_status.rb
+ - lib/ding_sdk/models/shared/createcheckresponse.rb
+ - lib/ding_sdk/models/shared/createcheckrequest.rb
+ - lib/ding_sdk/models/shared/status.rb
+ - lib/ding_sdk/models/shared/createauthenticationresponse.rb
+ - lib/ding_sdk/models/shared/device_type.rb
+ - lib/ding_sdk/models/shared/createauthenticationrequest.rb
+ - lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb
+ - lib/ding_sdk/models/shared/retryauthenticationresponse.rb
+ - lib/ding_sdk/models/shared/retryauthenticationrequest.rb
+ - lib/ding_sdk/models/shared/line_type.rb
+ - lib/ding_sdk/models/shared/lookupresponse.rb
+ - lib/ding_sdk/models/shared/security.rb
- lib/ding_sdk.rb
+ - lib/ding_sdk/models/operations.rb
+ - lib/ding_sdk/models/shared.rb
- docs/models/operations/checkresponse.md
- docs/models/operations/createautenticationresponse.md
- docs/models/operations/retryresponse.md
diff --git a/README.md b/README.md
index d44c366..b6e0bc3 100755
--- a/README.md
+++ b/README.md
@@ -26,13 +26,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::CreateAuthenticationRequest.new(
+req = ::DingSDK::Shared::CreateAuthenticationRequest.new(
customer_uuid="eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc",
phone_number="+1234567890",
)
@@ -56,13 +56,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::CreateCheckRequest.new(
+req = ::DingSDK::Shared::CreateCheckRequest.new(
authentication_uuid="e0e7b0e9-739d-424b-922f-1c2cb48ab077",
check_code="123456",
customer_uuid="8f1196d5-806e-4b71-9b24-5f96ec052808",
@@ -87,13 +87,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::RetryAuthenticationRequest.new(
+req = ::DingSDK::Shared::RetryAuthenticationRequest.new(
authentication_uuid="a74ee547-564d-487a-91df-37fb25413a91",
customer_uuid="3c8b3a46-881e-4cdd-93a6-f7f238bf020a",
)
diff --git a/RELEASES.md b/RELEASES.md
index 7373118..ab8bc0d 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -154,4 +154,14 @@ Based on:
### Generated
- [ruby v0.5.3] .
### Releases
-- [Ruby Gems v0.5.3] https://rubygems.org/gems/ding_sdk/versions/0.5.3 - .
\ No newline at end of file
+- [Ruby Gems v0.5.3] https://rubygems.org/gems/ding_sdk/versions/0.5.3 - .
+
+## 2024-02-06 00:14:18
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0
+- Speakeasy CLI 1.167.3 (2.250.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [ruby v0.6.0] .
+### Releases
+- [Ruby Gems v0.6.0] https://rubygems.org/gems/ding_sdk/versions/0.6.0 - .
\ No newline at end of file
diff --git a/USAGE.md b/USAGE.md
index 4b73fc6..1615f1a 100644
--- a/USAGE.md
+++ b/USAGE.md
@@ -10,13 +10,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::CreateAuthenticationRequest.new(
+req = ::DingSDK::Shared::CreateAuthenticationRequest.new(
customer_uuid="eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc",
phone_number="+1234567890",
)
@@ -40,13 +40,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::CreateCheckRequest.new(
+req = ::DingSDK::Shared::CreateCheckRequest.new(
authentication_uuid="e0e7b0e9-739d-424b-922f-1c2cb48ab077",
check_code="123456",
customer_uuid="8f1196d5-806e-4b71-9b24-5f96ec052808",
@@ -71,13 +71,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::RetryAuthenticationRequest.new(
+req = ::DingSDK::Shared::RetryAuthenticationRequest.new(
authentication_uuid="a74ee547-564d-487a-91df-37fb25413a91",
customer_uuid="3c8b3a46-881e-4cdd-93a6-f7f238bf020a",
)
diff --git a/ding_sdk.gemspec b/ding_sdk.gemspec
index 4f40cc0..7b0b456 100644
--- a/ding_sdk.gemspec
+++ b/ding_sdk.gemspec
@@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__)
Gem::Specification.new do |s|
s.name = 'ding_sdk'
- s.version = '0.5.3'
+ s.version = '0.6.0'
s.platform = Gem::Platform::RUBY
s.licenses = ['Apache-2.0']
s.summary = ''
diff --git a/docs/models/operations/checkresponse.md b/docs/models/operations/checkresponse.md
index a5c0a2f..54fb0f3 100644
--- a/docs/models/operations/checkresponse.md
+++ b/docs/models/operations/checkresponse.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
-| `content_type` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
-| `create_check_response` | [T.nilable(Shared::CreateCheckResponse)](../../models/shared/createcheckresponse.md) | :heavy_minus_sign: | OK |
-| `error_response` | [T.nilable(Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
-| `status_code` | *Integer* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
+| `create_check_response` | [T.nilable(::DingSDK::Shared::CreateCheckResponse)](../../models/shared/createcheckresponse.md) | :heavy_minus_sign: | OK |
+| `error_response` | [T.nilable(::DingSDK::Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
+| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
+| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/docs/models/operations/createautenticationresponse.md b/docs/models/operations/createautenticationresponse.md
index 579d337..a8c08b3 100644
--- a/docs/models/operations/createautenticationresponse.md
+++ b/docs/models/operations/createautenticationresponse.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
-| `content_type` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
-| `create_authentication_response` | [T.nilable(Shared::CreateAuthenticationResponse)](../../models/shared/createauthenticationresponse.md) | :heavy_minus_sign: | OK |
-| `error_response` | [T.nilable(Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
-| `status_code` | *Integer* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
+| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
+| `create_authentication_response` | [T.nilable(::DingSDK::Shared::CreateAuthenticationResponse)](../../models/shared/createauthenticationresponse.md) | :heavy_minus_sign: | OK |
+| `error_response` | [T.nilable(::DingSDK::Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
+| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
+| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/docs/models/operations/lookuprequest.md b/docs/models/operations/lookuprequest.md
index ce517af..7483f9b 100644
--- a/docs/models/operations/lookuprequest.md
+++ b/docs/models/operations/lookuprequest.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
-| `customer_uuid` | *String* | :heavy_check_mark: | N/A |
-| `phone_number` | *String* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `customer_uuid` | *::String* | :heavy_check_mark: | N/A |
+| `phone_number` | *::String* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/models/operations/lookupresponse.md b/docs/models/operations/lookupresponse.md
index 9c0be2d..c67951a 100644
--- a/docs/models/operations/lookupresponse.md
+++ b/docs/models/operations/lookupresponse.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description |
-| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| `content_type` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
-| `error_response` | [T.nilable(Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
-| `lookup_response` | [T.nilable(Shared::LookupResponse)](../../models/shared/lookupresponse.md) | :heavy_minus_sign: | OK |
-| `status_code` | *Integer* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
+| `error_response` | [T.nilable(::DingSDK::Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
+| `lookup_response` | [T.nilable(::DingSDK::Shared::LookupResponse)](../../models/shared/lookupresponse.md) | :heavy_minus_sign: | OK |
+| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
+| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/docs/models/operations/retryresponse.md b/docs/models/operations/retryresponse.md
index 10dc3f2..8039007 100644
--- a/docs/models/operations/retryresponse.md
+++ b/docs/models/operations/retryresponse.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description |
-| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
-| `content_type` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
-| `error_response` | [T.nilable(Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
-| `retry_authentication_response` | [T.nilable(Shared::RetryAuthenticationResponse)](../../models/shared/retryauthenticationresponse.md) | :heavy_minus_sign: | OK |
-| `status_code` | *Integer* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
+| Field | Type | Required | Description |
+| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
+| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
+| `error_response` | [T.nilable(::DingSDK::Shared::ErrorResponse)](../../models/shared/errorresponse.md) | :heavy_minus_sign: | Bad Request |
+| `retry_authentication_response` | [T.nilable(::DingSDK::Shared::RetryAuthenticationResponse)](../../models/shared/retryauthenticationresponse.md) | :heavy_minus_sign: | OK |
+| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
+| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/docs/models/shared/createauthenticationrequest.md b/docs/models/shared/createauthenticationrequest.md
index 3898642..3e0767f 100644
--- a/docs/models/shared/createauthenticationrequest.md
+++ b/docs/models/shared/createauthenticationrequest.md
@@ -5,14 +5,14 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `app_realm` | *T.nilable(String)* | :heavy_minus_sign: | The Android SMS Retriever API hash code that identifies your app. This allows you to automatically retrieve and fill the OTP code on Android devices. | |
-| `app_version` | *T.nilable(String)* | :heavy_minus_sign: | The version of your application. | |
-| `callback_url` | *T.nilable(String)* | :heavy_minus_sign: | A webhook URL to which delivery statuses will be sent. | |
-| `customer_uuid` | *String* | :heavy_check_mark: | Your customer UUID, which can be found in the API settings in the dashboard. | |
-| `device_id` | *T.nilable(String)* | :heavy_minus_sign: | Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`. | |
-| `device_model` | *T.nilable(String)* | :heavy_minus_sign: | The model of the user's device. | |
-| `device_type` | [T.nilable(Shared::DeviceType)](../../models/shared/devicetype.md) | :heavy_minus_sign: | The type of device the user is using. | |
-| `ip` | *T.nilable(String)* | :heavy_minus_sign: | The IP address of the user's device. | |
+| `app_realm` | *T.nilable(::String)* | :heavy_minus_sign: | The Android SMS Retriever API hash code that identifies your app. This allows you to automatically retrieve and fill the OTP code on Android devices. | |
+| `app_version` | *T.nilable(::String)* | :heavy_minus_sign: | The version of your application. | |
+| `callback_url` | *T.nilable(::String)* | :heavy_minus_sign: | A webhook URL to which delivery statuses will be sent. | |
+| `customer_uuid` | *::String* | :heavy_check_mark: | Your customer UUID, which can be found in the API settings in the dashboard. | |
+| `device_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`. | |
+| `device_model` | *T.nilable(::String)* | :heavy_minus_sign: | The model of the user's device. | |
+| `device_type` | [T.nilable(::DingSDK::Shared::DeviceType)](../../models/shared/devicetype.md) | :heavy_minus_sign: | The type of device the user is using. | |
+| `ip` | *T.nilable(::String)* | :heavy_minus_sign: | The IP address of the user's device. | |
| `is_returning_user` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the user is a returning user on your app. | |
-| `os_version` | *T.nilable(String)* | :heavy_minus_sign: | The version of the user's device operating system. | |
-| `phone_number` | *String* | :heavy_check_mark: | An E.164 formatted phone number to send the OTP to. | +1234567890 |
\ No newline at end of file
+| `os_version` | *T.nilable(::String)* | :heavy_minus_sign: | The version of the user's device operating system. | |
+| `phone_number` | *::String* | :heavy_check_mark: | An E.164 formatted phone number to send the OTP to. | +1234567890 |
\ No newline at end of file
diff --git a/docs/models/shared/createauthenticationresponse.md b/docs/models/shared/createauthenticationresponse.md
index 9f20976..a8deedf 100644
--- a/docs/models/shared/createauthenticationresponse.md
+++ b/docs/models/shared/createauthenticationresponse.md
@@ -7,7 +7,7 @@ A successful response to an authentication creation request.
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `authentication_uuid` | *T.nilable(String)* | :heavy_minus_sign: | A unique identifier for the authentication that you can use on the /check and /retry endpoints. |
+| `authentication_uuid` | *T.nilable(::String)* | :heavy_minus_sign: | A unique identifier for the authentication that you can use on the /check and /retry endpoints. |
| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A |
| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The time at which the authentication expires and can no longer be checked or retried. |
-| `status` | [T.nilable(Shared::Status)](../../models/shared/status.md) | :heavy_minus_sign: | The status of the authentication. Possible values are:
* `pending` - The OTP code is being sent.
* `rate_limited` - This user is rate-limited and cannot receive another code.
* `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
|
\ No newline at end of file
+| `status` | [T.nilable(::DingSDK::Shared::Status)](../../models/shared/status.md) | :heavy_minus_sign: | The status of the authentication. Possible values are:
* `pending` - The OTP code is being sent.
* `rate_limited` - This user is rate-limited and cannot receive another code.
* `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
|
\ No newline at end of file
diff --git a/docs/models/shared/createcheckrequest.md b/docs/models/shared/createcheckrequest.md
index 76595be..94f32e2 100644
--- a/docs/models/shared/createcheckrequest.md
+++ b/docs/models/shared/createcheckrequest.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
-| `authentication_uuid` | *String* | :heavy_check_mark: | The authentication UUID that was returned when you created the authentication. | |
-| `check_code` | *String* | :heavy_check_mark: | The code that the user entered. | 123456 |
-| `customer_uuid` | *String* | :heavy_check_mark: | Your customer UUID, which can be found in the API settings in the dashboard. | |
\ No newline at end of file
+| `authentication_uuid` | *::String* | :heavy_check_mark: | The authentication UUID that was returned when you created the authentication. | |
+| `check_code` | *::String* | :heavy_check_mark: | The code that the user entered. | 123456 |
+| `customer_uuid` | *::String* | :heavy_check_mark: | Your customer UUID, which can be found in the API settings in the dashboard. | |
\ No newline at end of file
diff --git a/docs/models/shared/createcheckresponse.md b/docs/models/shared/createcheckresponse.md
index 907dad1..6076258 100644
--- a/docs/models/shared/createcheckresponse.md
+++ b/docs/models/shared/createcheckresponse.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `authentication_uuid` | *T.nilable(String)* | :heavy_minus_sign: | The UUID of the corresponding authentication. | |
-| `status` | [T.nilable(Shared::CreateCheckResponseStatus)](../../models/shared/createcheckresponsestatus.md) | :heavy_minus_sign: | The status of the check. Possible values are:
* `valid` - The code is valid.
* `invalid` - The code is invalid.
* `without_attempt` - No attempt was sent yet, so a check cannot be completed.
* `rate_limited` - The authentication was rate limited and cannot be checked.
* `already_validated` - The authentication has already been validated.
* `expired_auth` - The authentication has expired and cannot be checked.
| valid |
\ No newline at end of file
+| `authentication_uuid` | *T.nilable(::String)* | :heavy_minus_sign: | The UUID of the corresponding authentication. | |
+| `status` | [T.nilable(::DingSDK::Shared::CreateCheckResponseStatus)](../../models/shared/createcheckresponsestatus.md) | :heavy_minus_sign: | The status of the check. Possible values are:
* `valid` - The code is valid.
* `invalid` - The code is invalid.
* `without_attempt` - No attempt was sent yet, so a check cannot be completed.
* `rate_limited` - The authentication was rate limited and cannot be checked.
* `already_validated` - The authentication has already been validated.
* `expired_auth` - The authentication has expired and cannot be checked.
| valid |
\ No newline at end of file
diff --git a/docs/models/shared/errorresponse.md b/docs/models/shared/errorresponse.md
index 6d1ea84..03115f8 100644
--- a/docs/models/shared/errorresponse.md
+++ b/docs/models/shared/errorresponse.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `code` | [T.nilable(Shared::Code)](../../models/shared/code.md) | :heavy_minus_sign: | A machine-readable code that describes the error. Possible values are:
* `invalid_phone_number` - This is not a valid E.164 number.
* `internal_server_error` - An internal server error occurred.
* `bad_request` - The request was malformed.
* `account_invalid` - The provided customer UUID is invalid.
* `negative_balance` - You have a negative balance.
* `invalid_line` - Ding does not support this type of phone number.
* `unsupported_region` - Ding does not support this region yet.
* `invalid_auth_uuid` - The provided authentication UUID is invalid.
* `blocked_number` - The phone number is in the blocklist.
* `invalid_app_version` - The provided application version is invalid.
* `invalid_os_version` - The provided OS version is invalid.
* `invalid_device_model` - The provided device model is invalid.
* `invalid_device_id` - The provided device ID is invalid.
| invalid_phone_number |
-| `doc_url` | *T.nilable(String)* | :heavy_minus_sign: | A link to the documentation that describes the error. | https://docs.ding.live/api/error-handling#invalid_phone_number |
-| `message` | *T.nilable(String)* | :heavy_minus_sign: | A human-readable message that describes the error. | +0 is not a valid phone number |
\ No newline at end of file
+| `code` | [T.nilable(::DingSDK::Shared::Code)](../../models/shared/code.md) | :heavy_minus_sign: | A machine-readable code that describes the error. Possible values are:
* `invalid_phone_number` - This is not a valid E.164 number.
* `internal_server_error` - An internal server error occurred.
* `bad_request` - The request was malformed.
* `account_invalid` - The provided customer UUID is invalid.
* `negative_balance` - You have a negative balance.
* `invalid_line` - Ding does not support this type of phone number.
* `unsupported_region` - Ding does not support this region yet.
* `invalid_auth_uuid` - The provided authentication UUID is invalid.
* `blocked_number` - The phone number is in the blocklist.
* `invalid_app_version` - The provided application version is invalid.
* `invalid_os_version` - The provided OS version is invalid.
* `invalid_device_model` - The provided device model is invalid.
* `invalid_device_id` - The provided device ID is invalid.
| invalid_phone_number |
+| `doc_url` | *T.nilable(::String)* | :heavy_minus_sign: | A link to the documentation that describes the error. | https://docs.ding.live/api/error-handling#invalid_phone_number |
+| `message` | *T.nilable(::String)* | :heavy_minus_sign: | A human-readable message that describes the error. | +0 is not a valid phone number |
\ No newline at end of file
diff --git a/docs/models/shared/lookupresponse.md b/docs/models/shared/lookupresponse.md
index 28060ab..557d390 100644
--- a/docs/models/shared/lookupresponse.md
+++ b/docs/models/shared/lookupresponse.md
@@ -3,12 +3,12 @@
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
-| `carrier` | *T.nilable(String)* | :heavy_minus_sign: | The carrier of the phone number. | AT&T |
-| `country_code` | *T.nilable(String)* | :heavy_minus_sign: | The ISO 3166-1 alpha-2 country code of the phone number. | US |
-| `line_type` | [T.nilable(Shared::LineType)](../../models/shared/linetype.md) | :heavy_minus_sign: | The type of phone line. | Mobile |
-| `mcc` | *T.nilable(String)* | :heavy_minus_sign: | The mobile country code of the phone number. | 310 |
-| `mnc` | *T.nilable(String)* | :heavy_minus_sign: | The mobile network code of the phone number. | 410 |
-| `number_ported` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the phone number has been ported. | |
-| `phone_number` | *T.nilable(String)* | :heavy_minus_sign: | An E.164 formatted phone number. | +1234567890 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `carrier` | *T.nilable(::String)* | :heavy_minus_sign: | The carrier of the phone number. | AT&T |
+| `country_code` | *T.nilable(::String)* | :heavy_minus_sign: | The ISO 3166-1 alpha-2 country code of the phone number. | US |
+| `line_type` | [T.nilable(::DingSDK::Shared::LineType)](../../models/shared/linetype.md) | :heavy_minus_sign: | The type of phone line. | Mobile |
+| `mcc` | *T.nilable(::String)* | :heavy_minus_sign: | The mobile country code of the phone number. | 310 |
+| `mnc` | *T.nilable(::String)* | :heavy_minus_sign: | The mobile network code of the phone number. | 410 |
+| `number_ported` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the phone number has been ported. | |
+| `phone_number` | *T.nilable(::String)* | :heavy_minus_sign: | An E.164 formatted phone number. | +1234567890 |
\ No newline at end of file
diff --git a/docs/models/shared/retryauthenticationrequest.md b/docs/models/shared/retryauthenticationrequest.md
index 2630202..06a0d51 100644
--- a/docs/models/shared/retryauthenticationrequest.md
+++ b/docs/models/shared/retryauthenticationrequest.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
-| `authentication_uuid` | *String* | :heavy_check_mark: | The authentication UUID that was returned when you created the authentication. |
-| `customer_uuid` | *String* | :heavy_check_mark: | Your customer UUID, which can be found in the API settings in the dashboard. |
\ No newline at end of file
+| `authentication_uuid` | *::String* | :heavy_check_mark: | The authentication UUID that was returned when you created the authentication. |
+| `customer_uuid` | *::String* | :heavy_check_mark: | Your customer UUID, which can be found in the API settings in the dashboard. |
\ No newline at end of file
diff --git a/docs/models/shared/retryauthenticationresponse.md b/docs/models/shared/retryauthenticationresponse.md
index 4205f54..5d01eb4 100644
--- a/docs/models/shared/retryauthenticationresponse.md
+++ b/docs/models/shared/retryauthenticationresponse.md
@@ -5,8 +5,8 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `authentication_uuid` | *T.nilable(String)* | :heavy_minus_sign: | The UUID of the corresponding authentication. | |
+| `authentication_uuid` | *T.nilable(::String)* | :heavy_minus_sign: | The UUID of the corresponding authentication. | |
| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | |
| `next_retry_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The time at which the next retry will be available. | |
-| `remaining_retry` | *T.nilable(Integer)* | :heavy_minus_sign: | The number of remaining retries. | 3 |
-| `status` | [T.nilable(Shared::RetryAuthenticationResponseStatus)](../../models/shared/retryauthenticationresponsestatus.md) | :heavy_minus_sign: | The status of the retry. Possible values are:
* `approved` - The retry was approved and a new code was sent.
* `denied` - The retry was denied.
* `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
* `rate_limited` - The authentication was rate limited and cannot be retried.
* `expired_auth` - The authentication has expired and cannot be retried.
* `already_validated` - The authentication has already been validated.
| approved |
\ No newline at end of file
+| `remaining_retry` | *T.nilable(::Integer)* | :heavy_minus_sign: | The number of remaining retries. | 3 |
+| `status` | [T.nilable(::DingSDK::Shared::RetryAuthenticationResponseStatus)](../../models/shared/retryauthenticationresponsestatus.md) | :heavy_minus_sign: | The status of the retry. Possible values are:
* `approved` - The retry was approved and a new code was sent.
* `denied` - The retry was denied.
* `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
* `rate_limited` - The authentication was rate limited and cannot be retried.
* `expired_auth` - The authentication has expired and cannot be retried.
* `already_validated` - The authentication has already been validated.
| approved |
\ No newline at end of file
diff --git a/docs/models/shared/security.md b/docs/models/shared/security.md
index a369ced..bd1b555 100644
--- a/docs/models/shared/security.md
+++ b/docs/models/shared/security.md
@@ -5,4 +5,4 @@
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
-| `api_key` | *String* | :heavy_check_mark: | N/A | YOUR_API_KEY |
\ No newline at end of file
+| `api_key` | *::String* | :heavy_check_mark: | N/A | YOUR_API_KEY |
\ No newline at end of file
diff --git a/docs/sdks/lookup/README.md b/docs/sdks/lookup/README.md
index 54ccf4a..e52848d 100644
--- a/docs/sdks/lookup/README.md
+++ b/docs/sdks/lookup/README.md
@@ -21,7 +21,7 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
@@ -39,11 +39,11 @@ end
| Parameter | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
-| `customer_uuid` | *String* | :heavy_check_mark: | N/A |
-| `phone_number` | *String* | :heavy_check_mark: | N/A |
+| `customer_uuid` | *::String* | :heavy_check_mark: | N/A |
+| `phone_number` | *::String* | :heavy_check_mark: | N/A |
### Response
-**[T.nilable(Operations::LookupResponse)](../../models/operations/lookupresponse.md)**
+**[T.nilable(::DingSDK::Operations::LookupResponse)](../../models/operations/lookupresponse.md)**
diff --git a/docs/sdks/otp/README.md b/docs/sdks/otp/README.md
index 331c11e..46c2afb 100644
--- a/docs/sdks/otp/README.md
+++ b/docs/sdks/otp/README.md
@@ -23,13 +23,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::CreateCheckRequest.new(
+req = ::DingSDK::Shared::CreateCheckRequest.new(
authentication_uuid="e0e7b0e9-739d-424b-922f-1c2cb48ab077",
check_code="123456",
customer_uuid="8f1196d5-806e-4b71-9b24-5f96ec052808",
@@ -45,14 +45,14 @@ end
### Parameters
-| Parameter | Type | Required | Description |
-| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
-| `request` | [Shared::CreateCheckRequest](../../models/shared/createcheckrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [::DingSDK::Shared::CreateCheckRequest](../../models/shared/createcheckrequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
-**[T.nilable(Operations::CheckResponse)](../../models/operations/checkresponse.md)**
+**[T.nilable(::DingSDK::Operations::CheckResponse)](../../models/operations/checkresponse.md)**
## create_autentication
@@ -67,13 +67,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::CreateAuthenticationRequest.new(
+req = ::DingSDK::Shared::CreateAuthenticationRequest.new(
customer_uuid="eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc",
phone_number="+1234567890",
)
@@ -88,14 +88,14 @@ end
### Parameters
-| Parameter | Type | Required | Description |
-| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
-| `request` | [Shared::CreateAuthenticationRequest](../../models/shared/createauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| `request` | [::DingSDK::Shared::CreateAuthenticationRequest](../../models/shared/createauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
-**[T.nilable(Operations::CreateAutenticationResponse)](../../models/operations/createautenticationresponse.md)**
+**[T.nilable(::DingSDK::Operations::CreateAutenticationResponse)](../../models/operations/createautenticationresponse.md)**
## retry
@@ -110,13 +110,13 @@ require_relative ding_sdk
s = ::DingSDK::Ding.new
s.config_security(
- security=Shared::Security.new(
+ security=::DingSDK::Shared::Security.new(
api_key="YOUR_API_KEY",
)
)
-req = Shared::RetryAuthenticationRequest.new(
+req = ::DingSDK::Shared::RetryAuthenticationRequest.new(
authentication_uuid="a74ee547-564d-487a-91df-37fb25413a91",
customer_uuid="3c8b3a46-881e-4cdd-93a6-f7f238bf020a",
)
@@ -131,12 +131,12 @@ end
### Parameters
-| Parameter | Type | Required | Description |
-| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
-| `request` | [Shared::RetryAuthenticationRequest](../../models/shared/retryauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
+| `request` | [::DingSDK::Shared::RetryAuthenticationRequest](../../models/shared/retryauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
-**[T.nilable(Operations::RetryResponse)](../../models/operations/retryresponse.md)**
+**[T.nilable(::DingSDK::Operations::RetryResponse)](../../models/operations/retryresponse.md)**
diff --git a/gen.yaml b/gen.yaml
index 6bda877..f40b23d 100644
--- a/gen.yaml
+++ b/gen.yaml
@@ -5,8 +5,9 @@ generation:
optionalPropertyRendering: withExample
fixes:
nameResolutionDec2023: false
+ parameterOrderingFeb2024: false
ruby:
- version: 0.5.3
+ version: 0.6.0
author: Ding
description: Ding Ruby SDK
imports:
diff --git a/lib/ding/models/operations/lookup.rb b/lib/ding/models/operations/lookup.rb
deleted file mode 100644
index 5bab55a..0000000
--- a/lib/ding/models/operations/lookup.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
-
-# typed: true
-# frozen_string_literal: true
-
-require 'sorbet-runtime'
-require 'faraday'
-require_relative '../shared/errorresponse'
-require_relative '../shared/lookupresponse'
-
-module DingSDK
- module Operations
-
- class LookupRequest < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
-
- field :customer_uuid, String, { 'header': { 'field_name': 'customer-uuid', 'style': 'simple', 'explode': false } }
-
- field :phone_number, String, { 'path_param': { 'field_name': 'phone_number', 'style': 'simple', 'explode': false } }
-
-
- sig { params(customer_uuid: String, phone_number: String).void }
- def initialize(customer_uuid: nil, phone_number: nil)
- @customer_uuid = customer_uuid
- @phone_number = phone_number
- end
- end
-
-
- class LookupResponse < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
- # HTTP response content type for this operation
- field :content_type, String
- # Raw HTTP response; suitable for custom response parsing
- field :raw_response, Faraday::Response
- # HTTP response status code for this operation
- field :status_code, Integer
- # Bad Request
- field :error_response, T.nilable(Shared::ErrorResponse)
- # OK
- field :lookup_response, T.nilable(Shared::LookupResponse)
-
-
- sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, error_response: T.nilable(Shared::ErrorResponse), lookup_response: T.nilable(Shared::LookupResponse)).void }
- def initialize(content_type: nil, raw_response: nil, status_code: nil, error_response: nil, lookup_response: nil)
- @content_type = content_type
- @raw_response = raw_response
- @status_code = status_code
- @error_response = error_response
- @lookup_response = lookup_response
- end
- end
- end
-end
diff --git a/lib/ding/models/shared/createauthenticationrequest.rb b/lib/ding/models/shared/createauthenticationrequest.rb
deleted file mode 100644
index 60fb6b5..0000000
--- a/lib/ding/models/shared/createauthenticationrequest.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
-
-# typed: true
-# frozen_string_literal: true
-
-require 'sorbet-runtime'
-require 'faraday'
-
-module DingSDK
- module Shared
- # DeviceType - The type of device the user is using.
- class DeviceType < T::Enum
- enums do
- IOS = new('IOS')
- ANDROID = new('ANDROID')
- WEB = new('WEB')
- end
- end
-
-
-
- class CreateAuthenticationRequest < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
- # Your customer UUID, which can be found in the API settings in the dashboard.
- field :customer_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
- # An E.164 formatted phone number to send the OTP to.
- field :phone_number, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
- # The Android SMS Retriever API hash code that identifies your app. This allows you to automatically retrieve and fill the OTP code on Android devices.
- field :app_realm, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_realm') } }
- # The version of your application.
- field :app_version, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_version') } }
- # A webhook URL to which delivery statuses will be sent.
- field :callback_url, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('callback_url') } }
- # Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
- field :device_id, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_id') } }
- # The model of the user's device.
- field :device_model, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_model') } }
- # The type of device the user is using.
- field :device_type, T.nilable(Shared::DeviceType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_type'), 'decoder': Utils.enum_from_string(Shared::DeviceType, true) } }
- # The IP address of the user's device.
- field :ip, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('ip') } }
- # Whether the user is a returning user on your app.
- field :is_returning_user, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('is_returning_user') } }
- # The version of the user's device operating system.
- field :os_version, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('os_version') } }
-
-
- sig { params(customer_uuid: String, phone_number: String, app_realm: T.nilable(String), app_version: T.nilable(String), callback_url: T.nilable(String), device_id: T.nilable(String), device_model: T.nilable(String), device_type: T.nilable(Shared::DeviceType), ip: T.nilable(String), is_returning_user: T.nilable(T::Boolean), os_version: T.nilable(String)).void }
- def initialize(customer_uuid: nil, phone_number: nil, app_realm: nil, app_version: nil, callback_url: nil, device_id: nil, device_model: nil, device_type: nil, ip: nil, is_returning_user: nil, os_version: nil)
- @customer_uuid = customer_uuid
- @phone_number = phone_number
- @app_realm = app_realm
- @app_version = app_version
- @callback_url = callback_url
- @device_id = device_id
- @device_model = device_model
- @device_type = device_type
- @ip = ip
- @is_returning_user = is_returning_user
- @os_version = os_version
- end
- end
- end
-end
diff --git a/lib/ding/models/shared/createauthenticationresponse.rb b/lib/ding/models/shared/createauthenticationresponse.rb
deleted file mode 100644
index 5d34579..0000000
--- a/lib/ding/models/shared/createauthenticationresponse.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
-
-# typed: true
-# frozen_string_literal: true
-
-require 'sorbet-runtime'
-require 'faraday'
-
-module DingSDK
- module Shared
- # Status - The status of the authentication. Possible values are:
- # * `pending` - The OTP code is being sent.
- # * `rate_limited` - This user is rate-limited and cannot receive another code.
- # * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
- #
- class Status < T::Enum
- enums do
- PENDING = new('pending')
- RATE_LIMITED = new('rate_limited')
- SPAM_DETECTED = new('spam_detected')
- end
- end
-
-
- # A successful response to an authentication creation request.
- class CreateAuthenticationResponse < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
- # A unique identifier for the authentication that you can use on the /check and /retry endpoints.
- field :authentication_uuid, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
-
- field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
- # The time at which the authentication expires and can no longer be checked or retried.
- field :expires_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
- # The status of the authentication. Possible values are:
- # * `pending` - The OTP code is being sent.
- # * `rate_limited` - This user is rate-limited and cannot receive another code.
- # * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
- #
- field :status, T.nilable(Shared::Status), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Shared::Status, true) } }
-
-
- sig { params(authentication_uuid: T.nilable(String), created_at: T.nilable(DateTime), expires_at: T.nilable(DateTime), status: T.nilable(Shared::Status)).void }
- def initialize(authentication_uuid: nil, created_at: nil, expires_at: nil, status: nil)
- @authentication_uuid = authentication_uuid
- @created_at = created_at
- @expires_at = expires_at
- @status = status
- end
- end
- end
-end
diff --git a/lib/ding/models/shared/createcheckresponse.rb b/lib/ding/models/shared/createcheckresponse.rb
deleted file mode 100644
index 6200570..0000000
--- a/lib/ding/models/shared/createcheckresponse.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
-
-# typed: true
-# frozen_string_literal: true
-
-require 'sorbet-runtime'
-require 'faraday'
-
-module DingSDK
- module Shared
- # CreateCheckResponseStatus - The status of the check. Possible values are:
- # * `valid` - The code is valid.
- # * `invalid` - The code is invalid.
- # * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
- # * `rate_limited` - The authentication was rate limited and cannot be checked.
- # * `already_validated` - The authentication has already been validated.
- # * `expired_auth` - The authentication has expired and cannot be checked.
- #
- class CreateCheckResponseStatus < T::Enum
- enums do
- VALID = new('valid')
- INVALID = new('invalid')
- WITHOUT_ATTEMPT = new('without_attempt')
- RATE_LIMITED = new('rate_limited')
- ALREADY_VALIDATED = new('already_validated')
- EXPIRED_AUTH = new('expired_auth')
- end
- end
-
-
-
- class CreateCheckResponse < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
- # The UUID of the corresponding authentication.
- field :authentication_uuid, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
- # The status of the check. Possible values are:
- # * `valid` - The code is valid.
- # * `invalid` - The code is invalid.
- # * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
- # * `rate_limited` - The authentication was rate limited and cannot be checked.
- # * `already_validated` - The authentication has already been validated.
- # * `expired_auth` - The authentication has expired and cannot be checked.
- #
- field :status, T.nilable(Shared::CreateCheckResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Shared::CreateCheckResponseStatus, true) } }
-
-
- sig { params(authentication_uuid: T.nilable(String), status: T.nilable(Shared::CreateCheckResponseStatus)).void }
- def initialize(authentication_uuid: nil, status: nil)
- @authentication_uuid = authentication_uuid
- @status = status
- end
- end
- end
-end
diff --git a/lib/ding/models/shared/lookupresponse.rb b/lib/ding/models/shared/lookupresponse.rb
deleted file mode 100644
index 479d6da..0000000
--- a/lib/ding/models/shared/lookupresponse.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
-
-# typed: true
-# frozen_string_literal: true
-
-require 'sorbet-runtime'
-require 'faraday'
-
-module DingSDK
- module Shared
- # LineType - The type of phone line.
- class LineType < T::Enum
- enums do
- FIXED_LINE = new('FixedLine')
- MOBILE = new('Mobile')
- TOLL_FREE = new('TollFree')
- PREMIUM_RATE = new('PremiumRate')
- SHARED_COST = new('SharedCost')
- VOIP = new('Voip')
- PAGER = new('Pager')
- VOICE_MAIL = new('VoiceMail')
- UNIVERSAL_ACCESS = new('UniversalAccess')
- SERVICE = new('Service')
- UNKNOWN = new('Unknown')
- end
- end
-
-
-
- class LookupResponse < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
- # The carrier of the phone number.
- field :carrier, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('carrier') } }
- # The ISO 3166-1 alpha-2 country code of the phone number.
- field :country_code, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('country_code') } }
- # The type of phone line.
- field :line_type, T.nilable(Shared::LineType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('line_type'), 'decoder': Utils.enum_from_string(Shared::LineType, true) } }
- # The mobile country code of the phone number.
- field :mcc, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('mcc') } }
- # The mobile network code of the phone number.
- field :mnc, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('mnc') } }
- # Whether the phone number has been ported.
- field :number_ported, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('number_ported') } }
- # An E.164 formatted phone number.
- field :phone_number, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
-
-
- sig { params(carrier: T.nilable(String), country_code: T.nilable(String), line_type: T.nilable(Shared::LineType), mcc: T.nilable(String), mnc: T.nilable(String), number_ported: T.nilable(T::Boolean), phone_number: T.nilable(String)).void }
- def initialize(carrier: nil, country_code: nil, line_type: nil, mcc: nil, mnc: nil, number_ported: nil, phone_number: nil)
- @carrier = carrier
- @country_code = country_code
- @line_type = line_type
- @mcc = mcc
- @mnc = mnc
- @number_ported = number_ported
- @phone_number = phone_number
- end
- end
- end
-end
diff --git a/lib/ding/models/shared/retryauthenticationresponse.rb b/lib/ding/models/shared/retryauthenticationresponse.rb
deleted file mode 100644
index 8de2ea0..0000000
--- a/lib/ding/models/shared/retryauthenticationresponse.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
-
-# typed: true
-# frozen_string_literal: true
-
-require 'sorbet-runtime'
-require 'faraday'
-
-module DingSDK
- module Shared
- # RetryAuthenticationResponseStatus - The status of the retry. Possible values are:
- # * `approved` - The retry was approved and a new code was sent.
- # * `denied` - The retry was denied.
- # * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
- # * `rate_limited` - The authentication was rate limited and cannot be retried.
- # * `expired_auth` - The authentication has expired and cannot be retried.
- # * `already_validated` - The authentication has already been validated.
- #
- class RetryAuthenticationResponseStatus < T::Enum
- enums do
- APPROVED = new('approved')
- DENIED = new('denied')
- NO_ATTEMPT = new('no_attempt')
- RATE_LIMITED = new('rate_limited')
- EXPIRED_AUTH = new('expired_auth')
- ALREADY_VALIDATED = new('already_validated')
- end
- end
-
-
-
- class RetryAuthenticationResponse < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
- # The UUID of the corresponding authentication.
- field :authentication_uuid, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
-
- field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
- # The time at which the next retry will be available.
- field :next_retry_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('next_retry_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
- # The number of remaining retries.
- field :remaining_retry, T.nilable(Integer), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('remaining_retry') } }
- # The status of the retry. Possible values are:
- # * `approved` - The retry was approved and a new code was sent.
- # * `denied` - The retry was denied.
- # * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
- # * `rate_limited` - The authentication was rate limited and cannot be retried.
- # * `expired_auth` - The authentication has expired and cannot be retried.
- # * `already_validated` - The authentication has already been validated.
- #
- field :status, T.nilable(Shared::RetryAuthenticationResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Shared::RetryAuthenticationResponseStatus, true) } }
-
-
- sig { params(authentication_uuid: T.nilable(String), created_at: T.nilable(DateTime), next_retry_at: T.nilable(DateTime), remaining_retry: T.nilable(Integer), status: T.nilable(Shared::RetryAuthenticationResponseStatus)).void }
- def initialize(authentication_uuid: nil, created_at: nil, next_retry_at: nil, remaining_retry: nil, status: nil)
- @authentication_uuid = authentication_uuid
- @created_at = created_at
- @next_retry_at = next_retry_at
- @remaining_retry = remaining_retry
- @status = status
- end
- end
- end
-end
diff --git a/lib/ding_sdk.rb b/lib/ding_sdk.rb
index 56743d5..1743c2a 100644
--- a/lib/ding_sdk.rb
+++ b/lib/ding_sdk.rb
@@ -3,25 +3,13 @@
# typed: true
# frozen_string_literal: true
-require_relative 'ding/utils/utils'
-require_relative 'ding/utils/metadata_fields'
-require_relative 'ding/sdk'
-require_relative 'ding/models/shared/errorresponse'
-require_relative 'ding/models/shared/createcheckresponse'
-require_relative 'ding/models/shared/createcheckrequest'
-require_relative 'ding/models/shared/createauthenticationresponse'
-require_relative 'ding/models/shared/createauthenticationrequest'
-require_relative 'ding/models/shared/retryauthenticationresponse'
-require_relative 'ding/models/shared/retryauthenticationrequest'
-require_relative 'ding/models/shared/lookupresponse'
-require_relative 'ding/models/shared/security'
-require_relative 'ding/models/operations/check'
-require_relative 'ding/models/operations/create_autentication'
-require_relative 'ding/models/operations/lookup'
-require_relative 'ding/models/operations/retry_'
-require_relative 'ding/sdkconfiguration'
-require_relative 'ding/otp'
-require_relative 'ding/lookup'
-
+require_relative 'ding_sdk/utils/utils'
+require_relative 'ding_sdk/utils/metadata_fields'
module DingSDK
+ autoload :Ding, 'ding_sdk/ding'
+ autoload :SDKConfiguration, 'ding_sdk/sdkconfiguration'
+ autoload :Shared, 'ding_sdk/models/shared'
+ autoload :Operations, 'ding_sdk/models/operations'
+ autoload :Otp, 'ding_sdk/otp'
+ autoload :Lookup, 'ding_sdk/lookup'
end
diff --git a/lib/ding/sdk.rb b/lib/ding_sdk/ding.rb
similarity index 97%
rename from lib/ding/sdk.rb
rename to lib/ding_sdk/ding.rb
index 5ee5267..83a97c7 100644
--- a/lib/ding/sdk.rb
+++ b/lib/ding_sdk/ding.rb
@@ -74,7 +74,7 @@ def config_server(params)
init_sdks
end
- sig { params(security: Shared::Security).void }
+ sig { params(security: ::DingSDK::Shared::Security).void }
def config_security(security)
@security = security
@sdk_configuration.security = security
diff --git a/lib/ding/lookup.rb b/lib/ding_sdk/lookup.rb
similarity index 79%
rename from lib/ding/lookup.rb
rename to lib/ding_sdk/lookup.rb
index b023a6a..48ddbdb 100644
--- a/lib/ding/lookup.rb
+++ b/lib/ding_sdk/lookup.rb
@@ -10,17 +10,19 @@
module DingSDK
extend T::Sig
class Lookup
- # Retrieve up-to-date metadata about a specific phone number
extend T::Sig
+ # Retrieve up-to-date metadata about a specific phone number
+
sig { params(sdk_config: SDKConfiguration).void }
def initialize(sdk_config)
@sdk_configuration = sdk_config
end
- sig { params(customer_uuid: String, phone_number: String).returns(Utils::FieldAugmented) }
+
+ sig { params(customer_uuid: ::String, phone_number: ::String).returns(Utils::FieldAugmented) }
def lookup(customer_uuid, phone_number)
# lookup - Perform a phone number lookup
- request = Operations::LookupRequest.new(
+ request = ::DingSDK::Operations::LookupRequest.new(
customer_uuid: customer_uuid,
phone_number: phone_number
@@ -28,7 +30,7 @@ def lookup(customer_uuid, phone_number)
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = Utils.generate_url(
- Operations::LookupRequest,
+ ::DingSDK::Operations::LookupRequest,
base_url,
'/lookup/{phone_number}',
request
@@ -44,17 +46,17 @@ def lookup(customer_uuid, phone_number)
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
- res = Operations::LookupResponse.new(
+ res = ::DingSDK::Operations::LookupResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::LookupResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::LookupResponse)
res.lookup_response = out
end
elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ErrorResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
diff --git a/lib/ding_sdk/models/operations.rb b/lib/ding_sdk/models/operations.rb
new file mode 100644
index 0000000..a27a080
--- /dev/null
+++ b/lib/ding_sdk/models/operations.rb
@@ -0,0 +1,14 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+module DingSDK
+ module Operations
+ autoload :CheckResponse, 'ding_sdk/models/operations/check_response.rb'
+ autoload :CreateAutenticationResponse, 'ding_sdk/models/operations/create_autentication_response.rb'
+ autoload :RetryResponse, 'ding_sdk/models/operations/retry_response.rb'
+ autoload :LookupRequest, 'ding_sdk/models/operations/lookup_request.rb'
+ autoload :LookupResponse, 'ding_sdk/models/operations/lookup_response.rb'
+ end
+end
diff --git a/lib/ding/models/operations/check.rb b/lib/ding_sdk/models/operations/check_response.rb
similarity index 57%
rename from lib/ding/models/operations/check.rb
rename to lib/ding_sdk/models/operations/check_response.rb
index d086c62..88d6777 100644
--- a/lib/ding/models/operations/check.rb
+++ b/lib/ding_sdk/models/operations/check_response.rb
@@ -3,30 +3,27 @@
# typed: true
# frozen_string_literal: true
-require 'sorbet-runtime'
-require 'faraday'
-require_relative '../shared/createcheckresponse'
-require_relative '../shared/errorresponse'
module DingSDK
module Operations
+
class CheckResponse < ::DingSDK::Utils::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
- field :content_type, String
+ field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
- field :raw_response, Faraday::Response
+ field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
- field :status_code, Integer
+ field :status_code, ::Integer
# OK
- field :create_check_response, T.nilable(Shared::CreateCheckResponse)
+ field :create_check_response, T.nilable(::DingSDK::Shared::CreateCheckResponse)
# Bad Request
- field :error_response, T.nilable(Shared::ErrorResponse)
+ field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
- sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, create_check_response: T.nilable(Shared::CreateCheckResponse), error_response: T.nilable(Shared::ErrorResponse)).void }
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, create_check_response: T.nilable(::DingSDK::Shared::CreateCheckResponse), error_response: T.nilable(::DingSDK::Shared::ErrorResponse)).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil, create_check_response: nil, error_response: nil)
@content_type = content_type
@raw_response = raw_response
diff --git a/lib/ding/models/operations/create_autentication.rb b/lib/ding_sdk/models/operations/create_autentication_response.rb
similarity index 56%
rename from lib/ding/models/operations/create_autentication.rb
rename to lib/ding_sdk/models/operations/create_autentication_response.rb
index e89b7b9..6cfc245 100644
--- a/lib/ding/models/operations/create_autentication.rb
+++ b/lib/ding_sdk/models/operations/create_autentication_response.rb
@@ -3,30 +3,27 @@
# typed: true
# frozen_string_literal: true
-require 'sorbet-runtime'
-require 'faraday'
-require_relative '../shared/createauthenticationresponse'
-require_relative '../shared/errorresponse'
module DingSDK
module Operations
+
class CreateAutenticationResponse < ::DingSDK::Utils::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
- field :content_type, String
+ field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
- field :raw_response, Faraday::Response
+ field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
- field :status_code, Integer
+ field :status_code, ::Integer
# OK
- field :create_authentication_response, T.nilable(Shared::CreateAuthenticationResponse)
+ field :create_authentication_response, T.nilable(::DingSDK::Shared::CreateAuthenticationResponse)
# Bad Request
- field :error_response, T.nilable(Shared::ErrorResponse)
+ field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
- sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, create_authentication_response: T.nilable(Shared::CreateAuthenticationResponse), error_response: T.nilable(Shared::ErrorResponse)).void }
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, create_authentication_response: T.nilable(::DingSDK::Shared::CreateAuthenticationResponse), error_response: T.nilable(::DingSDK::Shared::ErrorResponse)).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil, create_authentication_response: nil, error_response: nil)
@content_type = content_type
@raw_response = raw_response
diff --git a/lib/ding_sdk/models/operations/lookup_request.rb b/lib/ding_sdk/models/operations/lookup_request.rb
new file mode 100644
index 0000000..e7bf479
--- /dev/null
+++ b/lib/ding_sdk/models/operations/lookup_request.rb
@@ -0,0 +1,27 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Operations
+
+
+ class LookupRequest < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+
+ field :customer_uuid, ::String, { 'header': { 'field_name': 'customer-uuid', 'style': 'simple', 'explode': false } }
+
+ field :phone_number, ::String, { 'path_param': { 'field_name': 'phone_number', 'style': 'simple', 'explode': false } }
+
+
+ sig { params(customer_uuid: ::String, phone_number: ::String).void }
+ def initialize(customer_uuid: nil, phone_number: nil)
+ @customer_uuid = customer_uuid
+ @phone_number = phone_number
+ end
+ end
+ end
+end
diff --git a/lib/ding_sdk/models/operations/lookup_response.rb b/lib/ding_sdk/models/operations/lookup_response.rb
new file mode 100644
index 0000000..7ab0f80
--- /dev/null
+++ b/lib/ding_sdk/models/operations/lookup_response.rb
@@ -0,0 +1,36 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Operations
+
+
+ class LookupResponse < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+ # HTTP response content type for this operation
+ field :content_type, ::String
+ # Raw HTTP response; suitable for custom response parsing
+ field :raw_response, ::Faraday::Response
+ # HTTP response status code for this operation
+ field :status_code, ::Integer
+ # Bad Request
+ field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
+ # OK
+ field :lookup_response, T.nilable(::DingSDK::Shared::LookupResponse)
+
+
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error_response: T.nilable(::DingSDK::Shared::ErrorResponse), lookup_response: T.nilable(::DingSDK::Shared::LookupResponse)).void }
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, error_response: nil, lookup_response: nil)
+ @content_type = content_type
+ @raw_response = raw_response
+ @status_code = status_code
+ @error_response = error_response
+ @lookup_response = lookup_response
+ end
+ end
+ end
+end
diff --git a/lib/ding/models/operations/retry_.rb b/lib/ding_sdk/models/operations/retry_response.rb
similarity index 56%
rename from lib/ding/models/operations/retry_.rb
rename to lib/ding_sdk/models/operations/retry_response.rb
index 2a89463..b33bc29 100644
--- a/lib/ding/models/operations/retry_.rb
+++ b/lib/ding_sdk/models/operations/retry_response.rb
@@ -3,30 +3,27 @@
# typed: true
# frozen_string_literal: true
-require 'sorbet-runtime'
-require 'faraday'
-require_relative '../shared/errorresponse'
-require_relative '../shared/retryauthenticationresponse'
module DingSDK
module Operations
+
class RetryResponse < ::DingSDK::Utils::FieldAugmented
extend T::Sig
# HTTP response content type for this operation
- field :content_type, String
+ field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
- field :raw_response, Faraday::Response
+ field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
- field :status_code, Integer
+ field :status_code, ::Integer
# Bad Request
- field :error_response, T.nilable(Shared::ErrorResponse)
+ field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
# OK
- field :retry_authentication_response, T.nilable(Shared::RetryAuthenticationResponse)
+ field :retry_authentication_response, T.nilable(::DingSDK::Shared::RetryAuthenticationResponse)
- sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, error_response: T.nilable(Shared::ErrorResponse), retry_authentication_response: T.nilable(Shared::RetryAuthenticationResponse)).void }
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error_response: T.nilable(::DingSDK::Shared::ErrorResponse), retry_authentication_response: T.nilable(::DingSDK::Shared::RetryAuthenticationResponse)).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil, error_response: nil, retry_authentication_response: nil)
@content_type = content_type
@raw_response = raw_response
diff --git a/lib/ding_sdk/models/shared.rb b/lib/ding_sdk/models/shared.rb
new file mode 100644
index 0000000..3cfbf7c
--- /dev/null
+++ b/lib/ding_sdk/models/shared.rb
@@ -0,0 +1,24 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+module DingSDK
+ module Shared
+ autoload :Code, 'ding_sdk/models/shared/code.rb'
+ autoload :ErrorResponse, 'ding_sdk/models/shared/errorresponse.rb'
+ autoload :CreateCheckResponseStatus, 'ding_sdk/models/shared/createcheckresponse_status.rb'
+ autoload :CreateCheckResponse, 'ding_sdk/models/shared/createcheckresponse.rb'
+ autoload :CreateCheckRequest, 'ding_sdk/models/shared/createcheckrequest.rb'
+ autoload :Status, 'ding_sdk/models/shared/status.rb'
+ autoload :CreateAuthenticationResponse, 'ding_sdk/models/shared/createauthenticationresponse.rb'
+ autoload :DeviceType, 'ding_sdk/models/shared/device_type.rb'
+ autoload :CreateAuthenticationRequest, 'ding_sdk/models/shared/createauthenticationrequest.rb'
+ autoload :RetryAuthenticationResponseStatus, 'ding_sdk/models/shared/retryauthenticationresponse_status.rb'
+ autoload :RetryAuthenticationResponse, 'ding_sdk/models/shared/retryauthenticationresponse.rb'
+ autoload :RetryAuthenticationRequest, 'ding_sdk/models/shared/retryauthenticationrequest.rb'
+ autoload :LineType, 'ding_sdk/models/shared/line_type.rb'
+ autoload :LookupResponse, 'ding_sdk/models/shared/lookupresponse.rb'
+ autoload :Security, 'ding_sdk/models/shared/security.rb'
+ end
+end
diff --git a/lib/ding/models/shared/errorresponse.rb b/lib/ding_sdk/models/shared/code.rb
similarity index 52%
rename from lib/ding/models/shared/errorresponse.rb
rename to lib/ding_sdk/models/shared/code.rb
index e554bd0..764ed69 100644
--- a/lib/ding/models/shared/errorresponse.rb
+++ b/lib/ding_sdk/models/shared/code.rb
@@ -3,11 +3,10 @@
# typed: true
# frozen_string_literal: true
-require 'sorbet-runtime'
-require 'faraday'
module DingSDK
module Shared
+
# Code - A machine-readable code that describes the error. Possible values are:
# * `invalid_phone_number` - This is not a valid E.164 number.
# * `internal_server_error` - An internal server error occurred.
@@ -44,39 +43,5 @@ class Code < T::Enum
end
end
-
-
- class ErrorResponse < ::DingSDK::Utils::FieldAugmented
- extend T::Sig
-
- # A machine-readable code that describes the error. Possible values are:
- # * `invalid_phone_number` - This is not a valid E.164 number.
- # * `internal_server_error` - An internal server error occurred.
- # * `bad_request` - The request was malformed.
- # * `account_invalid` - The provided customer UUID is invalid.
- # * `negative_balance` - You have a negative balance.
- # * `invalid_line` - Ding does not support this type of phone number.
- # * `unsupported_region` - Ding does not support this region yet.
- # * `invalid_auth_uuid` - The provided authentication UUID is invalid.
- # * `blocked_number` - The phone number is in the blocklist.
- # * `invalid_app_version` - The provided application version is invalid.
- # * `invalid_os_version` - The provided OS version is invalid.
- # * `invalid_device_model` - The provided device model is invalid.
- # * `invalid_device_id` - The provided device ID is invalid.
- #
- field :code, T.nilable(Shared::Code), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('code'), 'decoder': Utils.enum_from_string(Shared::Code, true) } }
- # A link to the documentation that describes the error.
- field :doc_url, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('doc_url') } }
- # A human-readable message that describes the error.
- field :message, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('message') } }
-
-
- sig { params(code: T.nilable(Shared::Code), doc_url: T.nilable(String), message: T.nilable(String)).void }
- def initialize(code: nil, doc_url: nil, message: nil)
- @code = code
- @doc_url = doc_url
- @message = message
- end
- end
end
end
diff --git a/lib/ding_sdk/models/shared/createauthenticationrequest.rb b/lib/ding_sdk/models/shared/createauthenticationrequest.rb
new file mode 100644
index 0000000..8ec9bb1
--- /dev/null
+++ b/lib/ding_sdk/models/shared/createauthenticationrequest.rb
@@ -0,0 +1,54 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+
+ class CreateAuthenticationRequest < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+ # Your customer UUID, which can be found in the API settings in the dashboard.
+ field :customer_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
+ # An E.164 formatted phone number to send the OTP to.
+ field :phone_number, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
+ # The Android SMS Retriever API hash code that identifies your app. This allows you to automatically retrieve and fill the OTP code on Android devices.
+ field :app_realm, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_realm') } }
+ # The version of your application.
+ field :app_version, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_version') } }
+ # A webhook URL to which delivery statuses will be sent.
+ field :callback_url, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('callback_url') } }
+ # Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
+ field :device_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_id') } }
+ # The model of the user's device.
+ field :device_model, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_model') } }
+ # The type of device the user is using.
+ field :device_type, T.nilable(::DingSDK::Shared::DeviceType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_type'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::DeviceType, true) } }
+ # The IP address of the user's device.
+ field :ip, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('ip') } }
+ # Whether the user is a returning user on your app.
+ field :is_returning_user, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('is_returning_user') } }
+ # The version of the user's device operating system.
+ field :os_version, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('os_version') } }
+
+
+ sig { params(customer_uuid: ::String, phone_number: ::String, app_realm: T.nilable(::String), app_version: T.nilable(::String), callback_url: T.nilable(::String), device_id: T.nilable(::String), device_model: T.nilable(::String), device_type: T.nilable(::DingSDK::Shared::DeviceType), ip: T.nilable(::String), is_returning_user: T.nilable(T::Boolean), os_version: T.nilable(::String)).void }
+ def initialize(customer_uuid: nil, phone_number: nil, app_realm: nil, app_version: nil, callback_url: nil, device_id: nil, device_model: nil, device_type: nil, ip: nil, is_returning_user: nil, os_version: nil)
+ @customer_uuid = customer_uuid
+ @phone_number = phone_number
+ @app_realm = app_realm
+ @app_version = app_version
+ @callback_url = callback_url
+ @device_id = device_id
+ @device_model = device_model
+ @device_type = device_type
+ @ip = ip
+ @is_returning_user = is_returning_user
+ @os_version = os_version
+ end
+ end
+ end
+end
diff --git a/lib/ding_sdk/models/shared/createauthenticationresponse.rb b/lib/ding_sdk/models/shared/createauthenticationresponse.rb
new file mode 100644
index 0000000..1aa1139
--- /dev/null
+++ b/lib/ding_sdk/models/shared/createauthenticationresponse.rb
@@ -0,0 +1,37 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+ # A successful response to an authentication creation request.
+ class CreateAuthenticationResponse < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+ # A unique identifier for the authentication that you can use on the /check and /retry endpoints.
+ field :authentication_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
+
+ field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
+ # The time at which the authentication expires and can no longer be checked or retried.
+ field :expires_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
+ # The status of the authentication. Possible values are:
+ # * `pending` - The OTP code is being sent.
+ # * `rate_limited` - This user is rate-limited and cannot receive another code.
+ # * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
+ #
+ field :status, T.nilable(::DingSDK::Shared::Status), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::Status, true) } }
+
+
+ sig { params(authentication_uuid: T.nilable(::String), created_at: T.nilable(::DateTime), expires_at: T.nilable(::DateTime), status: T.nilable(::DingSDK::Shared::Status)).void }
+ def initialize(authentication_uuid: nil, created_at: nil, expires_at: nil, status: nil)
+ @authentication_uuid = authentication_uuid
+ @created_at = created_at
+ @expires_at = expires_at
+ @status = status
+ end
+ end
+ end
+end
diff --git a/lib/ding/models/shared/createcheckrequest.rb b/lib/ding_sdk/models/shared/createcheckrequest.rb
similarity index 57%
rename from lib/ding/models/shared/createcheckrequest.rb
rename to lib/ding_sdk/models/shared/createcheckrequest.rb
index fa2e69e..73f7b83 100644
--- a/lib/ding/models/shared/createcheckrequest.rb
+++ b/lib/ding_sdk/models/shared/createcheckrequest.rb
@@ -3,24 +3,23 @@
# typed: true
# frozen_string_literal: true
-require 'sorbet-runtime'
-require 'faraday'
module DingSDK
module Shared
+
class CreateCheckRequest < ::DingSDK::Utils::FieldAugmented
extend T::Sig
# The authentication UUID that was returned when you created the authentication.
- field :authentication_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
+ field :authentication_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
# The code that the user entered.
- field :check_code, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('check_code') } }
+ field :check_code, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('check_code') } }
# Your customer UUID, which can be found in the API settings in the dashboard.
- field :customer_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
+ field :customer_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
- sig { params(authentication_uuid: String, check_code: String, customer_uuid: String).void }
+ sig { params(authentication_uuid: ::String, check_code: ::String, customer_uuid: ::String).void }
def initialize(authentication_uuid: nil, check_code: nil, customer_uuid: nil)
@authentication_uuid = authentication_uuid
@check_code = check_code
diff --git a/lib/ding_sdk/models/shared/createcheckresponse.rb b/lib/ding_sdk/models/shared/createcheckresponse.rb
new file mode 100644
index 0000000..892d02d
--- /dev/null
+++ b/lib/ding_sdk/models/shared/createcheckresponse.rb
@@ -0,0 +1,34 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+
+ class CreateCheckResponse < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+ # The UUID of the corresponding authentication.
+ field :authentication_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
+ # The status of the check. Possible values are:
+ # * `valid` - The code is valid.
+ # * `invalid` - The code is invalid.
+ # * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
+ # * `rate_limited` - The authentication was rate limited and cannot be checked.
+ # * `already_validated` - The authentication has already been validated.
+ # * `expired_auth` - The authentication has expired and cannot be checked.
+ #
+ field :status, T.nilable(::DingSDK::Shared::CreateCheckResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::CreateCheckResponseStatus, true) } }
+
+
+ sig { params(authentication_uuid: T.nilable(::String), status: T.nilable(::DingSDK::Shared::CreateCheckResponseStatus)).void }
+ def initialize(authentication_uuid: nil, status: nil)
+ @authentication_uuid = authentication_uuid
+ @status = status
+ end
+ end
+ end
+end
diff --git a/lib/ding_sdk/models/shared/createcheckresponse_status.rb b/lib/ding_sdk/models/shared/createcheckresponse_status.rb
new file mode 100644
index 0000000..829a1e3
--- /dev/null
+++ b/lib/ding_sdk/models/shared/createcheckresponse_status.rb
@@ -0,0 +1,30 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+ # CreateCheckResponseStatus - The status of the check. Possible values are:
+ # * `valid` - The code is valid.
+ # * `invalid` - The code is invalid.
+ # * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
+ # * `rate_limited` - The authentication was rate limited and cannot be checked.
+ # * `already_validated` - The authentication has already been validated.
+ # * `expired_auth` - The authentication has expired and cannot be checked.
+ #
+ class CreateCheckResponseStatus < T::Enum
+ enums do
+ VALID = new('valid')
+ INVALID = new('invalid')
+ WITHOUT_ATTEMPT = new('without_attempt')
+ RATE_LIMITED = new('rate_limited')
+ ALREADY_VALIDATED = new('already_validated')
+ EXPIRED_AUTH = new('expired_auth')
+ end
+ end
+
+ end
+end
diff --git a/lib/ding_sdk/models/shared/device_type.rb b/lib/ding_sdk/models/shared/device_type.rb
new file mode 100644
index 0000000..750d8e6
--- /dev/null
+++ b/lib/ding_sdk/models/shared/device_type.rb
@@ -0,0 +1,20 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+ # DeviceType - The type of device the user is using.
+ class DeviceType < T::Enum
+ enums do
+ IOS = new('IOS')
+ ANDROID = new('ANDROID')
+ WEB = new('WEB')
+ end
+ end
+
+ end
+end
diff --git a/lib/ding_sdk/models/shared/errorresponse.rb b/lib/ding_sdk/models/shared/errorresponse.rb
new file mode 100644
index 0000000..1cca5b9
--- /dev/null
+++ b/lib/ding_sdk/models/shared/errorresponse.rb
@@ -0,0 +1,44 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+
+ class ErrorResponse < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+ # A machine-readable code that describes the error. Possible values are:
+ # * `invalid_phone_number` - This is not a valid E.164 number.
+ # * `internal_server_error` - An internal server error occurred.
+ # * `bad_request` - The request was malformed.
+ # * `account_invalid` - The provided customer UUID is invalid.
+ # * `negative_balance` - You have a negative balance.
+ # * `invalid_line` - Ding does not support this type of phone number.
+ # * `unsupported_region` - Ding does not support this region yet.
+ # * `invalid_auth_uuid` - The provided authentication UUID is invalid.
+ # * `blocked_number` - The phone number is in the blocklist.
+ # * `invalid_app_version` - The provided application version is invalid.
+ # * `invalid_os_version` - The provided OS version is invalid.
+ # * `invalid_device_model` - The provided device model is invalid.
+ # * `invalid_device_id` - The provided device ID is invalid.
+ #
+ field :code, T.nilable(::DingSDK::Shared::Code), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('code'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::Code, true) } }
+ # A link to the documentation that describes the error.
+ field :doc_url, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('doc_url') } }
+ # A human-readable message that describes the error.
+ field :message, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('message') } }
+
+
+ sig { params(code: T.nilable(::DingSDK::Shared::Code), doc_url: T.nilable(::String), message: T.nilable(::String)).void }
+ def initialize(code: nil, doc_url: nil, message: nil)
+ @code = code
+ @doc_url = doc_url
+ @message = message
+ end
+ end
+ end
+end
diff --git a/lib/ding_sdk/models/shared/line_type.rb b/lib/ding_sdk/models/shared/line_type.rb
new file mode 100644
index 0000000..4106fa4
--- /dev/null
+++ b/lib/ding_sdk/models/shared/line_type.rb
@@ -0,0 +1,28 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+ # LineType - The type of phone line.
+ class LineType < T::Enum
+ enums do
+ FIXED_LINE = new('FixedLine')
+ MOBILE = new('Mobile')
+ TOLL_FREE = new('TollFree')
+ PREMIUM_RATE = new('PremiumRate')
+ SHARED_COST = new('SharedCost')
+ VOIP = new('Voip')
+ PAGER = new('Pager')
+ VOICE_MAIL = new('VoiceMail')
+ UNIVERSAL_ACCESS = new('UniversalAccess')
+ SERVICE = new('Service')
+ UNKNOWN = new('Unknown')
+ end
+ end
+
+ end
+end
diff --git a/lib/ding_sdk/models/shared/lookupresponse.rb b/lib/ding_sdk/models/shared/lookupresponse.rb
new file mode 100644
index 0000000..51f6fde
--- /dev/null
+++ b/lib/ding_sdk/models/shared/lookupresponse.rb
@@ -0,0 +1,42 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+
+ class LookupResponse < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+ # The carrier of the phone number.
+ field :carrier, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('carrier') } }
+ # The ISO 3166-1 alpha-2 country code of the phone number.
+ field :country_code, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('country_code') } }
+ # The type of phone line.
+ field :line_type, T.nilable(::DingSDK::Shared::LineType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('line_type'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::LineType, true) } }
+ # The mobile country code of the phone number.
+ field :mcc, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('mcc') } }
+ # The mobile network code of the phone number.
+ field :mnc, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('mnc') } }
+ # Whether the phone number has been ported.
+ field :number_ported, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('number_ported') } }
+ # An E.164 formatted phone number.
+ field :phone_number, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
+
+
+ sig { params(carrier: T.nilable(::String), country_code: T.nilable(::String), line_type: T.nilable(::DingSDK::Shared::LineType), mcc: T.nilable(::String), mnc: T.nilable(::String), number_ported: T.nilable(T::Boolean), phone_number: T.nilable(::String)).void }
+ def initialize(carrier: nil, country_code: nil, line_type: nil, mcc: nil, mnc: nil, number_ported: nil, phone_number: nil)
+ @carrier = carrier
+ @country_code = country_code
+ @line_type = line_type
+ @mcc = mcc
+ @mnc = mnc
+ @number_ported = number_ported
+ @phone_number = phone_number
+ end
+ end
+ end
+end
diff --git a/lib/ding/models/shared/retryauthenticationrequest.rb b/lib/ding_sdk/models/shared/retryauthenticationrequest.rb
similarity index 61%
rename from lib/ding/models/shared/retryauthenticationrequest.rb
rename to lib/ding_sdk/models/shared/retryauthenticationrequest.rb
index 768bc39..85a50b8 100644
--- a/lib/ding/models/shared/retryauthenticationrequest.rb
+++ b/lib/ding_sdk/models/shared/retryauthenticationrequest.rb
@@ -3,22 +3,21 @@
# typed: true
# frozen_string_literal: true
-require 'sorbet-runtime'
-require 'faraday'
module DingSDK
module Shared
+
class RetryAuthenticationRequest < ::DingSDK::Utils::FieldAugmented
extend T::Sig
# The authentication UUID that was returned when you created the authentication.
- field :authentication_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
+ field :authentication_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
# Your customer UUID, which can be found in the API settings in the dashboard.
- field :customer_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
+ field :customer_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
- sig { params(authentication_uuid: String, customer_uuid: String).void }
+ sig { params(authentication_uuid: ::String, customer_uuid: ::String).void }
def initialize(authentication_uuid: nil, customer_uuid: nil)
@authentication_uuid = authentication_uuid
@customer_uuid = customer_uuid
diff --git a/lib/ding_sdk/models/shared/retryauthenticationresponse.rb b/lib/ding_sdk/models/shared/retryauthenticationresponse.rb
new file mode 100644
index 0000000..2db366b
--- /dev/null
+++ b/lib/ding_sdk/models/shared/retryauthenticationresponse.rb
@@ -0,0 +1,43 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+
+ class RetryAuthenticationResponse < ::DingSDK::Utils::FieldAugmented
+ extend T::Sig
+
+ # The UUID of the corresponding authentication.
+ field :authentication_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
+
+ field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
+ # The time at which the next retry will be available.
+ field :next_retry_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('next_retry_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
+ # The number of remaining retries.
+ field :remaining_retry, T.nilable(::Integer), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('remaining_retry') } }
+ # The status of the retry. Possible values are:
+ # * `approved` - The retry was approved and a new code was sent.
+ # * `denied` - The retry was denied.
+ # * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
+ # * `rate_limited` - The authentication was rate limited and cannot be retried.
+ # * `expired_auth` - The authentication has expired and cannot be retried.
+ # * `already_validated` - The authentication has already been validated.
+ #
+ field :status, T.nilable(::DingSDK::Shared::RetryAuthenticationResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::RetryAuthenticationResponseStatus, true) } }
+
+
+ sig { params(authentication_uuid: T.nilable(::String), created_at: T.nilable(::DateTime), next_retry_at: T.nilable(::DateTime), remaining_retry: T.nilable(::Integer), status: T.nilable(::DingSDK::Shared::RetryAuthenticationResponseStatus)).void }
+ def initialize(authentication_uuid: nil, created_at: nil, next_retry_at: nil, remaining_retry: nil, status: nil)
+ @authentication_uuid = authentication_uuid
+ @created_at = created_at
+ @next_retry_at = next_retry_at
+ @remaining_retry = remaining_retry
+ @status = status
+ end
+ end
+ end
+end
diff --git a/lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb b/lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb
new file mode 100644
index 0000000..0a1d0d7
--- /dev/null
+++ b/lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb
@@ -0,0 +1,30 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+ # RetryAuthenticationResponseStatus - The status of the retry. Possible values are:
+ # * `approved` - The retry was approved and a new code was sent.
+ # * `denied` - The retry was denied.
+ # * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
+ # * `rate_limited` - The authentication was rate limited and cannot be retried.
+ # * `expired_auth` - The authentication has expired and cannot be retried.
+ # * `already_validated` - The authentication has already been validated.
+ #
+ class RetryAuthenticationResponseStatus < T::Enum
+ enums do
+ APPROVED = new('approved')
+ DENIED = new('denied')
+ NO_ATTEMPT = new('no_attempt')
+ RATE_LIMITED = new('rate_limited')
+ EXPIRED_AUTH = new('expired_auth')
+ ALREADY_VALIDATED = new('already_validated')
+ end
+ end
+
+ end
+end
diff --git a/lib/ding/models/shared/security.rb b/lib/ding_sdk/models/shared/security.rb
similarity index 59%
rename from lib/ding/models/shared/security.rb
rename to lib/ding_sdk/models/shared/security.rb
index 9572694..dee8c81 100644
--- a/lib/ding/models/shared/security.rb
+++ b/lib/ding_sdk/models/shared/security.rb
@@ -3,20 +3,19 @@
# typed: true
# frozen_string_literal: true
-require 'sorbet-runtime'
-require 'faraday'
module DingSDK
module Shared
+
class Security < ::DingSDK::Utils::FieldAugmented
extend T::Sig
- field :api_key, String, { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-api-key' } }
+ field :api_key, ::String, { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-api-key' } }
- sig { params(api_key: String).void }
+ sig { params(api_key: ::String).void }
def initialize(api_key: nil)
@api_key = api_key
end
diff --git a/lib/ding_sdk/models/shared/status.rb b/lib/ding_sdk/models/shared/status.rb
new file mode 100644
index 0000000..64f92fe
--- /dev/null
+++ b/lib/ding_sdk/models/shared/status.rb
@@ -0,0 +1,24 @@
+# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+# typed: true
+# frozen_string_literal: true
+
+
+module DingSDK
+ module Shared
+
+ # Status - The status of the authentication. Possible values are:
+ # * `pending` - The OTP code is being sent.
+ # * `rate_limited` - This user is rate-limited and cannot receive another code.
+ # * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
+ #
+ class Status < T::Enum
+ enums do
+ PENDING = new('pending')
+ RATE_LIMITED = new('rate_limited')
+ SPAM_DETECTED = new('spam_detected')
+ end
+ end
+
+ end
+end
diff --git a/lib/ding/otp.rb b/lib/ding_sdk/otp.rb
similarity index 80%
rename from lib/ding/otp.rb
rename to lib/ding_sdk/otp.rb
index edf20b6..159a0df 100644
--- a/lib/ding/otp.rb
+++ b/lib/ding_sdk/otp.rb
@@ -10,14 +10,16 @@
module DingSDK
extend T::Sig
class Otp
- # Send OTP codes to your users using their phone numbers.
extend T::Sig
+ # Send OTP codes to your users using their phone numbers.
+
sig { params(sdk_config: SDKConfiguration).void }
def initialize(sdk_config)
@sdk_configuration = sdk_config
end
- sig { params(request: T.nilable(Shared::CreateCheckRequest)).returns(Utils::FieldAugmented) }
+
+ sig { params(request: T.nilable(::DingSDK::Shared::CreateCheckRequest)).returns(Utils::FieldAugmented) }
def check(request)
# check - Check a code
url, params = @sdk_configuration.get_server_details
@@ -43,24 +45,25 @@ def check(request)
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
- res = Operations::CheckResponse.new(
+ res = ::DingSDK::Operations::CheckResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CreateCheckResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateCheckResponse)
res.create_check_response = out
end
elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ErrorResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
res
end
- sig { params(request: T.nilable(Shared::CreateAuthenticationRequest)).returns(Utils::FieldAugmented) }
+
+ sig { params(request: T.nilable(::DingSDK::Shared::CreateAuthenticationRequest)).returns(Utils::FieldAugmented) }
def create_autentication(request)
# create_autentication - Send a code
url, params = @sdk_configuration.get_server_details
@@ -86,24 +89,25 @@ def create_autentication(request)
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
- res = Operations::CreateAutenticationResponse.new(
+ res = ::DingSDK::Operations::CreateAutenticationResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CreateAuthenticationResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateAuthenticationResponse)
res.create_authentication_response = out
end
elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ErrorResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
res
end
- sig { params(request: T.nilable(Shared::RetryAuthenticationRequest)).returns(Utils::FieldAugmented) }
+
+ sig { params(request: T.nilable(::DingSDK::Shared::RetryAuthenticationRequest)).returns(Utils::FieldAugmented) }
def retry(request)
# retry - Perform a retry
url, params = @sdk_configuration.get_server_details
@@ -129,17 +133,17 @@ def retry(request)
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
- res = Operations::RetryResponse.new(
+ res = ::DingSDK::Operations::RetryResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::RetryAuthenticationResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::RetryAuthenticationResponse)
res.retry_authentication_response = out
end
elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ErrorResponse)
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
diff --git a/lib/ding/sdkconfiguration.rb b/lib/ding_sdk/sdkconfiguration.rb
similarity index 86%
rename from lib/ding/sdkconfiguration.rb
rename to lib/ding_sdk/sdkconfiguration.rb
index bc58c3b..29bdf29 100644
--- a/lib/ding/sdkconfiguration.rb
+++ b/lib/ding_sdk/sdkconfiguration.rb
@@ -24,7 +24,6 @@ class SDKConfiguration < ::DingSDK::Utils::FieldAugmented
field :client, T.nilable(Faraday::Connection)
field :security, Shared::Security
field :server_url, T.nilable(String)
- field :server, T.nilable(String)
field :language, String
field :openapi_doc_version, String
field :sdk_version, String
@@ -35,12 +34,13 @@ class SDKConfiguration < ::DingSDK::Utils::FieldAugmented
sig { params(client: Faraday::Connection, security: T.nilable(Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer)).void }
def initialize(client, security, server_url, server_idx)
@client = client
- @server = server_url.nil? ? '' : server_url
+ @server_url = server_url
+ @server = ''
@language = 'ruby'
@openapi_doc_version = '1.0.0'
- @sdk_version = '0.5.3'
- @gen_version = '2.237.2'
- @user_agent = 'speakeasy-sdk/ruby 0.5.3 2.237.2 1.0.0 ding_sdk'
+ @sdk_version = '0.6.0'
+ @gen_version = '2.250.2'
+ @user_agent = 'speakeasy-sdk/ruby 0.6.0 2.250.2 1.0.0 ding_sdk'
end
sig { returns([String, T::Hash[Symbol, String]]) }
diff --git a/lib/ding/utils/metadata_fields.rb b/lib/ding_sdk/utils/metadata_fields.rb
similarity index 100%
rename from lib/ding/utils/metadata_fields.rb
rename to lib/ding_sdk/utils/metadata_fields.rb
diff --git a/lib/ding/utils/utils.rb b/lib/ding_sdk/utils/utils.rb
similarity index 100%
rename from lib/ding/utils/utils.rb
rename to lib/ding_sdk/utils/utils.rb