ding_sdk 0.8.19 → 0.8.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 469c23ed40b8718b099cf0f9e236b742ee36b2577f2944e7ca24e15d84083914
4
- data.tar.gz: 6c172b5777ffe97f792a00425740491c60000e2207c23aa654b6a156927a35ea
3
+ metadata.gz: 7d9050612f9bf578cc58f76bd3074615043c27bdf5c5572ebdf9e124bd8e89fa
4
+ data.tar.gz: 02206c3402ef1e24f24e8702a9b31a3e6b404a98efb1477d5ddbbee6cd6f0c6b
5
5
  SHA512:
6
- metadata.gz: '047757781c9d027915fb8751f6aa5b49ef7ede7fd31acb5f399bf43ef16c41eb286ee3180d1900d94a79bad2953b7e3bca2f7e644509577bb6a6eb75cc313a6b'
7
- data.tar.gz: 32103adc1ae7241fd79ef9067dcd41828b4a9e0f1dd10a40149bf1bcf376acb3451085c33439d4a759ecb52feee61fcf56cbe2014e33d935bbcf07b50cf2f5f3
6
+ metadata.gz: 5ea76a4bd3d326b0b4b0b3dee2b6084c53e49c685ac09b927dde97e6be70fe09bd26fadd96993a866244cb2fbae5b349eb933e21ca9c143e15836dc32b6e977b
7
+ data.tar.gz: 4f991cd043d5247324067347627367087e15c62edf4340a2f28f4c4688f8ec591126d64ea5ee9524d35caea11286f58986bd571d5c097f057d2ac24de668ea9d
@@ -21,7 +21,7 @@ module DingSDK
21
21
 
22
22
  sig { params(customer_uuid: ::String, phone_number: ::String).returns(::DingSDK::Operations::LookupResponse) }
23
23
  def lookup(customer_uuid, phone_number)
24
- # lookup - Perform a phone number lookup
24
+ # lookup - Look up for phone number
25
25
  request = ::DingSDK::Operations::LookupRequest.new(
26
26
 
27
27
  customer_uuid: customer_uuid,
@@ -54,7 +54,8 @@ module DingSDK
54
54
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::LookupResponse)
55
55
  res.lookup_response = out
56
56
  end
57
- elsif r.status == 400
57
+ else
58
+
58
59
  if Utils.match_content_type(content_type, 'application/json')
59
60
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
60
61
  res.error_response = out
@@ -0,0 +1,24 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Operations
9
+
10
+
11
+ class GetAuthenticationStatusRequest < ::DingSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :auth_uuid, ::String, { 'path_param': { 'field_name': 'auth_uuid', 'style': 'simple', 'explode': false } }
16
+
17
+
18
+ sig { params(auth_uuid: ::String).void }
19
+ def initialize(auth_uuid: nil)
20
+ @auth_uuid = auth_uuid
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,36 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Operations
9
+
10
+
11
+ class GetAuthenticationStatusResponse < ::DingSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # HTTP response content type for this operation
15
+ field :content_type, ::String
16
+ # Raw HTTP response; suitable for custom response parsing
17
+ field :raw_response, ::Faraday::Response
18
+ # HTTP response status code for this operation
19
+ field :status_code, ::Integer
20
+ # OK
21
+ field :authentication_status_response, T.nilable(::DingSDK::Shared::AuthenticationStatusResponse)
22
+ # Bad Request
23
+ field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
24
+
25
+
26
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, authentication_status_response: T.nilable(::DingSDK::Shared::AuthenticationStatusResponse), error_response: T.nilable(::DingSDK::Shared::ErrorResponse)).void }
27
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, authentication_status_response: nil, error_response: nil)
28
+ @content_type = content_type
29
+ @raw_response = raw_response
30
+ @status_code = status_code
31
+ @authentication_status_response = authentication_status_response
32
+ @error_response = error_response
33
+ end
34
+ end
35
+ end
36
+ end
@@ -8,6 +8,8 @@ module DingSDK
8
8
  autoload :CheckResponse, 'ding_sdk/models/operations/check_response.rb'
9
9
  autoload :CreateAuthenticationResponse, 'ding_sdk/models/operations/create_authentication_response.rb'
10
10
  autoload :FeedbackResponse, 'ding_sdk/models/operations/feedback_response.rb'
11
+ autoload :GetAuthenticationStatusRequest, 'ding_sdk/models/operations/getauthenticationstatus_request.rb'
12
+ autoload :GetAuthenticationStatusResponse, 'ding_sdk/models/operations/getauthenticationstatus_response.rb'
11
13
  autoload :RetryResponse, 'ding_sdk/models/operations/retry_response.rb'
12
14
  autoload :LookupRequest, 'ding_sdk/models/operations/lookup_request.rb'
13
15
  autoload :LookupResponse, 'ding_sdk/models/operations/lookup_response.rb'
@@ -0,0 +1,42 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Shared
9
+
10
+
11
+ class AuthenticationStatusResponse < ::DingSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # A unique, user-defined identifier that will be included in webhook events.
15
+ field :correlation_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('correlation_id') } }
16
+
17
+ field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
18
+ # Represents a collection of events that occur during the authentication process. Each event captures specific actions and outcomes related to the authentication attempts, checks, delivery statuses, and balance updates. The array can contain different types of events, each with its own structure and properties.
19
+ field :events, T.nilable(T::Array[::Object]), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('events') } }
20
+ # An E.164 formatted phone number.
21
+ field :phone_number, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
22
+ # [Signals](/guides/prevent-fraud#signals) are data points used to distinguish between fraudulent and legitimate users.
23
+ field :signals, T.nilable(::DingSDK::Shared::Signals), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('signals') } }
24
+ # The template id associated with the message content variant to be sent.
25
+ field :template_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('template_id') } }
26
+ # The UUID of the corresponding authentication.
27
+ field :uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('uuid') } }
28
+
29
+
30
+ sig { params(correlation_id: T.nilable(::String), created_at: T.nilable(::DateTime), events: T.nilable(T::Array[::Object]), phone_number: T.nilable(::String), signals: T.nilable(::DingSDK::Shared::Signals), template_id: T.nilable(::String), uuid: T.nilable(::String)).void }
31
+ def initialize(correlation_id: nil, created_at: nil, events: nil, phone_number: nil, signals: nil, template_id: nil, uuid: nil)
32
+ @correlation_id = correlation_id
33
+ @created_at = created_at
34
+ @events = events
35
+ @phone_number = phone_number
36
+ @signals = signals
37
+ @template_id = template_id
38
+ @uuid = uuid
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,19 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Shared
9
+
10
+ # AuthenticationStatusResponseDeviceType - The type of device the user is using.
11
+ class AuthenticationStatusResponseDeviceType < T::Enum
12
+ enums do
13
+ IOS = new('IOS')
14
+ ANDROID = new('ANDROID')
15
+ WEB = new('WEB')
16
+ end
17
+ end
18
+ end
19
+ end
@@ -7,7 +7,8 @@
7
7
  module DingSDK
8
8
  module Shared
9
9
 
10
- # CreateCheckResponseStatus - The status of the check. Possible values are:
10
+ # CheckStatus - The status of the check. Possible values are:
11
+ # * `unknown` - The status is unknown.
11
12
  # * `valid` - The code is valid.
12
13
  # * `invalid` - The code is invalid.
13
14
  # * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
@@ -15,8 +16,9 @@ module DingSDK
15
16
  # * `already_validated` - The authentication has already been validated.
16
17
  # * `expired_auth` - The authentication has expired and cannot be checked.
17
18
  #
18
- class CreateCheckResponseStatus < T::Enum
19
+ class CheckStatus < T::Enum
19
20
  enums do
21
+ UNKNOWN = new('unknown')
20
22
  VALID = new('valid')
21
23
  INVALID = new('invalid')
22
24
  WITHOUT_ATTEMPT = new('without_attempt')
@@ -10,27 +10,29 @@ module DingSDK
10
10
  # Code - A machine-readable code that describes the error.
11
11
  class Code < T::Enum
12
12
  enums do
13
- INVALID_PHONE_NUMBER = new('invalid_phone_number')
14
- INTERNAL_SERVER_ERROR = new('internal_server_error')
15
- BAD_REQUEST = new('bad_request')
16
13
  ACCOUNT_INVALID = new('account_invalid')
17
- NEGATIVE_BALANCE = new('negative_balance')
18
- INVALID_LINE = new('invalid_line')
19
- UNSUPPORTED_REGION = new('unsupported_region')
20
- INVALID_AUTH_UUID = new('invalid_auth_uuid')
21
- INVALID_APP_REALM = new('invalid_app_realm')
22
- UNSUPPORTED_APP_REALM_DEVICE_TYPE = new('unsupported_app_realm_device_type')
23
14
  APP_REALM_REQUIRE_DEVICE_TYPE = new('app_realm_require_device_type')
15
+ BAD_REQUEST = new('bad_request')
24
16
  BLOCKED_NUMBER = new('blocked_number')
17
+ DUPLICATED_FEEDBACK_STATUS = new('duplicated_feedback_status')
18
+ INTERNAL_SERVER_ERROR = new('internal_server_error')
19
+ INVALID_APP_REALM = new('invalid_app_realm')
25
20
  INVALID_APP_VERSION = new('invalid_app_version')
26
- INVALID_OS_VERSION = new('invalid_os_version')
27
- INVALID_DEVICE_MODEL = new('invalid_device_model')
21
+ INVALID_AUTH_UUID = new('invalid_auth_uuid')
28
22
  INVALID_DEVICE_ID = new('invalid_device_id')
29
- NO_ASSOCIATED_AUTH_FOUND = new('no_associated_auth_found')
30
- DUPLICATED_FEEDBACK_STATUS = new('duplicated_feedback_status')
23
+ INVALID_DEVICE_MODEL = new('invalid_device_model')
31
24
  INVALID_FEEDBACK_STATUS = new('invalid_feedback_status')
25
+ INVALID_LINE = new('invalid_line')
26
+ INVALID_OS_VERSION = new('invalid_os_version')
27
+ INVALID_PHONE_NUMBER = new('invalid_phone_number')
28
+ INVALID_SENDER_ID = new('invalid_sender_id')
32
29
  INVALID_TEMPLATE_ID = new('invalid_template_id')
30
+ NEGATIVE_BALANCE = new('negative_balance')
31
+ NO_ASSOCIATED_AUTH_FOUND = new('no_associated_auth_found')
33
32
  SUSPENDED_ACCOUNT = new('suspended_account')
33
+ UNAUTHORIZED_SENDER_ID = new('unauthorized_sender_id')
34
+ UNSUPPORTED_APP_REALM_DEVICE_TYPE = new('unsupported_app_realm_device_type')
35
+ UNSUPPORTED_REGION = new('unsupported_region')
34
36
  end
35
37
  end
36
38
  end
@@ -33,14 +33,18 @@ module DingSDK
33
33
  field :ip, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('ip') } }
34
34
  # This signal should do more than just confirm if a user is returning to your app; it should provide a higher level of trust, indicating that the user is genuine. For more details, refer to [Signals](/guides/prevent-fraud#signals).
35
35
  field :is_returning_user, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('is_returning_user') } }
36
+ # A BCP-47 locale indicating the language the SMS should be sent to; if this is not set, the SMS will be sent to the language specified by the country code of the message. If we don't support the language set, the message will be sent in US English (en-US).
37
+ field :locale, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('locale') } }
36
38
  # The version of the user's device operating system.
37
39
  field :os_version, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('os_version') } }
40
+ # The Sender ID to use when sending the message.
41
+ field :sender_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('sender_id') } }
38
42
  # The template id associated with the message content variant to be sent.
39
43
  field :template_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('template_id') } }
40
44
 
41
45
 
42
- sig { params(customer_uuid: ::String, phone_number: ::String, app_realm: T.nilable(::String), app_version: T.nilable(::String), callback_url: T.nilable(::String), correlation_id: 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), template_id: T.nilable(::String)).void }
43
- def initialize(customer_uuid: nil, phone_number: nil, app_realm: nil, app_version: nil, callback_url: nil, correlation_id: nil, device_id: nil, device_model: nil, device_type: nil, ip: nil, is_returning_user: nil, os_version: nil, template_id: nil)
46
+ sig { params(customer_uuid: ::String, phone_number: ::String, app_realm: T.nilable(::String), app_version: T.nilable(::String), callback_url: T.nilable(::String), correlation_id: 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), locale: T.nilable(::String), os_version: T.nilable(::String), sender_id: T.nilable(::String), template_id: T.nilable(::String)).void }
47
+ def initialize(customer_uuid: nil, phone_number: nil, app_realm: nil, app_version: nil, callback_url: nil, correlation_id: nil, device_id: nil, device_model: nil, device_type: nil, ip: nil, is_returning_user: nil, locale: nil, os_version: nil, sender_id: nil, template_id: nil)
44
48
  @customer_uuid = customer_uuid
45
49
  @phone_number = phone_number
46
50
  @app_realm = app_realm
@@ -52,7 +56,9 @@ module DingSDK
52
56
  @device_type = device_type
53
57
  @ip = ip
54
58
  @is_returning_user = is_returning_user
59
+ @locale = locale
55
60
  @os_version = os_version
61
+ @sender_id = sender_id
56
62
  @template_id = template_id
57
63
  end
58
64
  end
@@ -13,18 +13,11 @@ module DingSDK
13
13
 
14
14
  # The UUID of the corresponding authentication.
15
15
  field :authentication_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
16
- # The status of the check. Possible values are:
17
- # * `valid` - The code is valid.
18
- # * `invalid` - The code is invalid.
19
- # * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
20
- # * `rate_limited` - The authentication was rate limited and cannot be checked.
21
- # * `already_validated` - The authentication has already been validated.
22
- # * `expired_auth` - The authentication has expired and cannot be checked.
23
- #
24
- 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) } }
25
-
26
-
27
- sig { params(authentication_uuid: T.nilable(::String), status: T.nilable(::DingSDK::Shared::CreateCheckResponseStatus)).void }
16
+
17
+ field :status, T.nilable(::DingSDK::Shared::CheckStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::CheckStatus, true) } }
18
+
19
+
20
+ sig { params(authentication_uuid: T.nilable(::String), status: T.nilable(::DingSDK::Shared::CheckStatus)).void }
28
21
  def initialize(authentication_uuid: nil, status: nil)
29
22
  @authentication_uuid = authentication_uuid
30
23
  @status = status
@@ -8,19 +8,47 @@ module DingSDK
8
8
  module Shared
9
9
 
10
10
  # LineType - The type of phone line.
11
+ # * `CallingCards` - Numbers that are associated with providers of pre-paid domestic and international calling cards.
12
+ # * `FixedLine` - Landline phone numbers.
13
+ # * `InternetServiceProvider` - Numbers reserved for ISPs.
14
+ # * `LocalRate` - Numbers that can be assigned non-geographically.
15
+ # * `Mobile` - Mobile phone numbers.
16
+ # * `Other` - Other types of services.
17
+ # * `Pager` - Number ranges specifically allocated to paging devices.
18
+ # * `PayPhone` - Allocated numbers for payphone kiosks in some countries.
19
+ # * `PremiumRate` - Landline numbers where the calling party pays more than standard.
20
+ # * `Satellite` - Satellite phone numbers.
21
+ # * `Service` - Automated applications.
22
+ # * `SharedCost` - Specific landline ranges where the cost of making the call is shared between the calling and called party.
23
+ # * `ShortCodesCommercial` - Short codes are memorable, easy-to-use numbers, like the UK's NHS 111, often sold to businesses. Not available in all countries.
24
+ # * `TollFree` - Number where the called party pays for the cost of the call not the calling party.
25
+ # * `UniversalAccess` - Number ranges reserved for Universal Access initiatives.
26
+ # * `Unknown` - Unknown phone number type.
27
+ # * `VPN` - Numbers are used exclusively within a private telecommunications network, connecting the operator's terminals internally and not accessible via the public telephone network.
28
+ # * `VoiceMail` - A specific category of Interactive Voice Response (IVR) services.
29
+ # * `Voip` - Specific ranges for providers of VoIP services to allow incoming calls from the regular telephony network.
30
+ #
11
31
  class LineType < T::Enum
12
32
  enums do
33
+ CALLING_CARDS = new('CallingCards')
13
34
  FIXED_LINE = new('FixedLine')
35
+ INTERNET_SERVICE_PROVIDER = new('InternetServiceProvider')
36
+ LOCAL_RATE = new('LocalRate')
14
37
  MOBILE = new('Mobile')
15
- TOLL_FREE = new('TollFree')
38
+ OTHER = new('Other')
39
+ PAGER = new('Pager')
40
+ PAY_PHONE = new('PayPhone')
16
41
  PREMIUM_RATE = new('PremiumRate')
42
+ SATELLITE = new('Satellite')
43
+ SERVICE = new('Service')
17
44
  SHARED_COST = new('SharedCost')
18
- VOIP = new('Voip')
19
- PAGER = new('Pager')
20
- VOICE_MAIL = new('VoiceMail')
45
+ SHORT_CODES_COMMERCIAL = new('ShortCodesCommercial')
46
+ TOLL_FREE = new('TollFree')
21
47
  UNIVERSAL_ACCESS = new('UniversalAccess')
22
- SERVICE = new('Service')
23
48
  UNKNOWN = new('Unknown')
49
+ VPN = new('VPN')
50
+ VOICE_MAIL = new('VoiceMail')
51
+ VOIP = new('Voip')
24
52
  end
25
53
  end
26
54
  end
@@ -16,6 +16,26 @@ module DingSDK
16
16
  # The ISO 3166-1 alpha-2 country code of the phone number.
17
17
  field :country_code, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('country_code') } }
18
18
  # The type of phone line.
19
+ # * `CallingCards` - Numbers that are associated with providers of pre-paid domestic and international calling cards.
20
+ # * `FixedLine` - Landline phone numbers.
21
+ # * `InternetServiceProvider` - Numbers reserved for ISPs.
22
+ # * `LocalRate` - Numbers that can be assigned non-geographically.
23
+ # * `Mobile` - Mobile phone numbers.
24
+ # * `Other` - Other types of services.
25
+ # * `Pager` - Number ranges specifically allocated to paging devices.
26
+ # * `PayPhone` - Allocated numbers for payphone kiosks in some countries.
27
+ # * `PremiumRate` - Landline numbers where the calling party pays more than standard.
28
+ # * `Satellite` - Satellite phone numbers.
29
+ # * `Service` - Automated applications.
30
+ # * `SharedCost` - Specific landline ranges where the cost of making the call is shared between the calling and called party.
31
+ # * `ShortCodesCommercial` - Short codes are memorable, easy-to-use numbers, like the UK's NHS 111, often sold to businesses. Not available in all countries.
32
+ # * `TollFree` - Number where the called party pays for the cost of the call not the calling party.
33
+ # * `UniversalAccess` - Number ranges reserved for Universal Access initiatives.
34
+ # * `Unknown` - Unknown phone number type.
35
+ # * `VPN` - Numbers are used exclusively within a private telecommunications network, connecting the operator's terminals internally and not accessible via the public telephone network.
36
+ # * `VoiceMail` - A specific category of Interactive Voice Response (IVR) services.
37
+ # * `Voip` - Specific ranges for providers of VoIP services to allow incoming calls from the regular telephony network.
38
+ #
19
39
  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) } }
20
40
  # The mobile country code of the phone number.
21
41
  field :mcc, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('mcc') } }
@@ -0,0 +1,45 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Shared
9
+
10
+ # [Signals](/guides/prevent-fraud#signals) are data points used to distinguish between fraudulent and legitimate users.
11
+ class Signals < ::DingSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # 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.
15
+ field :app_realm, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_realm') } }
16
+ # The version of your application.
17
+ field :app_version, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_version') } }
18
+ # Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
19
+ field :device_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_id') } }
20
+ # The model of the user's device.
21
+ field :device_model, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_model') } }
22
+ # The type of device the user is using.
23
+ field :device_type, T.nilable(::DingSDK::Shared::AuthenticationStatusResponseDeviceType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_type'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::AuthenticationStatusResponseDeviceType, true) } }
24
+ # The IP address of the user's device.
25
+ field :ip, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('ip') } }
26
+ # This signal should do more than just confirm if a user is returning to your app; it should provide a higher level of trust, indicating that the user is genuine. For more details, refer to [Signals](/guides/prevent-fraud#signals).
27
+ field :is_returning_user, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('is_returning_user') } }
28
+ # The version of the user's device operating system.
29
+ field :os_version, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('os_version') } }
30
+
31
+
32
+ sig { params(app_realm: T.nilable(::String), app_version: T.nilable(::String), device_id: T.nilable(::String), device_model: T.nilable(::String), device_type: T.nilable(::DingSDK::Shared::AuthenticationStatusResponseDeviceType), ip: T.nilable(::String), is_returning_user: T.nilable(T::Boolean), os_version: T.nilable(::String)).void }
33
+ def initialize(app_realm: nil, app_version: nil, device_id: nil, device_model: nil, device_type: nil, ip: nil, is_returning_user: nil, os_version: nil)
34
+ @app_realm = app_realm
35
+ @app_version = app_version
36
+ @device_id = device_id
37
+ @device_model = device_model
38
+ @device_type = device_type
39
+ @ip = ip
40
+ @is_returning_user = is_returning_user
41
+ @os_version = os_version
42
+ end
43
+ end
44
+ end
45
+ end
@@ -7,8 +7,8 @@ module DingSDK
7
7
  module Shared
8
8
  autoload :Code, 'ding_sdk/models/shared/code.rb'
9
9
  autoload :ErrorResponse, 'ding_sdk/models/shared/errorresponse.rb'
10
- autoload :CreateCheckResponseStatus, 'ding_sdk/models/shared/createcheckresponse_status.rb'
11
10
  autoload :CreateCheckResponse, 'ding_sdk/models/shared/createcheckresponse.rb'
11
+ autoload :CheckStatus, 'ding_sdk/models/shared/checkstatus.rb'
12
12
  autoload :CreateCheckRequest, 'ding_sdk/models/shared/createcheckrequest.rb'
13
13
  autoload :Status, 'ding_sdk/models/shared/status.rb'
14
14
  autoload :CreateAuthenticationResponse, 'ding_sdk/models/shared/createauthenticationresponse.rb'
@@ -17,6 +17,9 @@ module DingSDK
17
17
  autoload :FeedbackResponse, 'ding_sdk/models/shared/feedbackresponse.rb'
18
18
  autoload :FeedbackRequestStatus, 'ding_sdk/models/shared/feedbackrequest_status.rb'
19
19
  autoload :FeedbackRequest, 'ding_sdk/models/shared/feedbackrequest.rb'
20
+ autoload :AuthenticationStatusResponseDeviceType, 'ding_sdk/models/shared/authenticationstatusresponse_device_type.rb'
21
+ autoload :Signals, 'ding_sdk/models/shared/signals.rb'
22
+ autoload :AuthenticationStatusResponse, 'ding_sdk/models/shared/authenticationstatusresponse.rb'
20
23
  autoload :RetryAuthenticationResponseStatus, 'ding_sdk/models/shared/retryauthenticationresponse_status.rb'
21
24
  autoload :RetryAuthenticationResponse, 'ding_sdk/models/shared/retryauthenticationresponse.rb'
22
25
  autoload :RetryAuthenticationRequest, 'ding_sdk/models/shared/retryauthenticationrequest.rb'
data/lib/ding_sdk/otp.rb CHANGED
@@ -53,7 +53,8 @@ module DingSDK
53
53
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateCheckResponse)
54
54
  res.create_check_response = out
55
55
  end
56
- elsif r.status == 400
56
+ else
57
+
57
58
  if Utils.match_content_type(content_type, 'application/json')
58
59
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
59
60
  res.error_response = out
@@ -97,7 +98,8 @@ module DingSDK
97
98
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateAuthenticationResponse)
98
99
  res.create_authentication_response = out
99
100
  end
100
- elsif r.status == 400
101
+ else
102
+
101
103
  if Utils.match_content_type(content_type, 'application/json')
102
104
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
103
105
  res.error_response = out
@@ -152,6 +154,51 @@ module DingSDK
152
154
  end
153
155
 
154
156
 
157
+ sig { params(auth_uuid: ::String).returns(::DingSDK::Operations::GetAuthenticationStatusResponse) }
158
+ def get_authentication_status(auth_uuid)
159
+ # get_authentication_status - Get authentication status
160
+ request = ::DingSDK::Operations::GetAuthenticationStatusRequest.new(
161
+
162
+ auth_uuid: auth_uuid
163
+ )
164
+ url, params = @sdk_configuration.get_server_details
165
+ base_url = Utils.template_url(url, params)
166
+ url = Utils.generate_url(
167
+ ::DingSDK::Operations::GetAuthenticationStatusRequest,
168
+ base_url,
169
+ '/authentication/{auth_uuid}',
170
+ request
171
+ )
172
+ headers = {}
173
+ headers['Accept'] = 'application/json'
174
+ headers['user-agent'] = @sdk_configuration.user_agent
175
+
176
+ r = @sdk_configuration.client.get(url) do |req|
177
+ req.headers = headers
178
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
179
+ end
180
+
181
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
182
+
183
+ res = ::DingSDK::Operations::GetAuthenticationStatusResponse.new(
184
+ status_code: r.status, content_type: content_type, raw_response: r
185
+ )
186
+ if r.status == 200
187
+ if Utils.match_content_type(content_type, 'application/json')
188
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::AuthenticationStatusResponse)
189
+ res.authentication_status_response = out
190
+ end
191
+ else
192
+
193
+ if Utils.match_content_type(content_type, 'application/json')
194
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
195
+ res.error_response = out
196
+ end
197
+ end
198
+ res
199
+ end
200
+
201
+
155
202
  sig { params(request: T.nilable(::DingSDK::Shared::RetryAuthenticationRequest)).returns(::DingSDK::Operations::RetryResponse) }
156
203
  def retry(request)
157
204
  # retry - Perform a retry
@@ -186,7 +233,8 @@ module DingSDK
186
233
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::RetryAuthenticationResponse)
187
234
  res.retry_authentication_response = out
188
235
  end
189
- elsif r.status == 400
236
+ else
237
+
190
238
  if Utils.match_content_type(content_type, 'application/json')
191
239
  out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
192
240
  res.error_response = out
@@ -38,9 +38,9 @@ module DingSDK
38
38
  @security = security
39
39
  @language = 'ruby'
40
40
  @openapi_doc_version = '1.0.0'
41
- @sdk_version = '0.8.19'
42
- @gen_version = '2.426.2'
43
- @user_agent = 'speakeasy-sdk/ruby 0.8.19 2.426.2 1.0.0 ding_sdk'
41
+ @sdk_version = '0.8.20'
42
+ @gen_version = '2.442.11'
43
+ @user_agent = 'speakeasy-sdk/ruby 0.8.20 2.442.11 1.0.0 ding_sdk'
44
44
  end
45
45
 
46
46
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ding_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.19
4
+ version: 0.8.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ding
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-28 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -149,16 +149,20 @@ files:
149
149
  - lib/ding_sdk/models/operations/check_response.rb
150
150
  - lib/ding_sdk/models/operations/create_authentication_response.rb
151
151
  - lib/ding_sdk/models/operations/feedback_response.rb
152
+ - lib/ding_sdk/models/operations/getauthenticationstatus_request.rb
153
+ - lib/ding_sdk/models/operations/getauthenticationstatus_response.rb
152
154
  - lib/ding_sdk/models/operations/lookup_request.rb
153
155
  - lib/ding_sdk/models/operations/lookup_response.rb
154
156
  - lib/ding_sdk/models/operations/retry_response.rb
155
157
  - lib/ding_sdk/models/shared.rb
158
+ - lib/ding_sdk/models/shared/authenticationstatusresponse.rb
159
+ - lib/ding_sdk/models/shared/authenticationstatusresponse_device_type.rb
160
+ - lib/ding_sdk/models/shared/checkstatus.rb
156
161
  - lib/ding_sdk/models/shared/code.rb
157
162
  - lib/ding_sdk/models/shared/createauthenticationrequest.rb
158
163
  - lib/ding_sdk/models/shared/createauthenticationresponse.rb
159
164
  - lib/ding_sdk/models/shared/createcheckrequest.rb
160
165
  - lib/ding_sdk/models/shared/createcheckresponse.rb
161
- - lib/ding_sdk/models/shared/createcheckresponse_status.rb
162
166
  - lib/ding_sdk/models/shared/device_type.rb
163
167
  - lib/ding_sdk/models/shared/errorresponse.rb
164
168
  - lib/ding_sdk/models/shared/feedbackrequest.rb
@@ -170,6 +174,7 @@ files:
170
174
  - lib/ding_sdk/models/shared/retryauthenticationresponse.rb
171
175
  - lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb
172
176
  - lib/ding_sdk/models/shared/security.rb
177
+ - lib/ding_sdk/models/shared/signals.rb
173
178
  - lib/ding_sdk/models/shared/status.rb
174
179
  - lib/ding_sdk/otp.rb
175
180
  - lib/ding_sdk/sdkconfiguration.rb