ding_sdk 0.14.2 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/crystalline/metadata_fields.rb +5 -5
- data/lib/crystalline/utils.rb +2 -6
- data/lib/ding_sdk/ding.rb +4 -4
- data/lib/ding_sdk/lookup.rb +17 -18
- data/lib/ding_sdk/models/errors/apierror.rb +38 -0
- data/lib/ding_sdk/models/errors/code.rb +41 -0
- data/lib/ding_sdk/models/errors/errorresponse.rb +41 -0
- data/lib/ding_sdk/models/errors.rb +14 -0
- data/lib/ding_sdk/models/operations/check_response.rb +34 -35
- data/lib/ding_sdk/models/operations/create_authentication_response.rb +34 -35
- data/lib/ding_sdk/models/operations/feedback_response.rb +34 -35
- data/lib/ding_sdk/models/operations/getauthenticationstatus_request.rb +16 -13
- data/lib/ding_sdk/models/operations/getauthenticationstatus_response.rb +34 -35
- data/lib/ding_sdk/models/operations/lookup_request.rb +22 -19
- data/lib/ding_sdk/models/operations/lookup_response.rb +34 -35
- data/lib/ding_sdk/models/operations/retry_response.rb +34 -35
- data/lib/ding_sdk/models/operations/type.rb +7 -5
- data/lib/ding_sdk/models/operations.rb +12 -10
- data/lib/ding_sdk/models/shared/attempt.rb +50 -47
- data/lib/ding_sdk/models/shared/authenticationstatusresponse.rb +46 -43
- data/lib/ding_sdk/models/shared/authenticationstatusresponse_device_type.rb +12 -10
- data/lib/ding_sdk/models/shared/authenticationstatusresponse_schemas_events_type.rb +11 -9
- data/lib/ding_sdk/models/shared/authenticationstatusresponse_schemas_status.rb +18 -16
- data/lib/ding_sdk/models/shared/authenticationstatusresponse_schemas_type.rb +11 -9
- data/lib/ding_sdk/models/shared/authenticationstatusresponse_status.rb +18 -16
- data/lib/ding_sdk/models/shared/authenticationstatusresponse_type.rb +11 -9
- data/lib/ding_sdk/models/shared/balance_update.rb +34 -31
- data/lib/ding_sdk/models/shared/balance_update_type.rb +13 -11
- data/lib/ding_sdk/models/shared/capability.rb +11 -9
- data/lib/ding_sdk/models/shared/check.rb +38 -35
- data/lib/ding_sdk/models/shared/checkstatus.rb +22 -20
- data/lib/ding_sdk/models/shared/createauthenticationrequest.rb +73 -70
- data/lib/ding_sdk/models/shared/createauthenticationresponse.rb +38 -35
- data/lib/ding_sdk/models/shared/createcheckrequest.rb +30 -27
- data/lib/ding_sdk/models/shared/createcheckresponse.rb +20 -17
- data/lib/ding_sdk/models/shared/delivery_status.rb +48 -45
- data/lib/ding_sdk/models/shared/device_type.rb +10 -8
- data/lib/ding_sdk/models/shared/events.rb +12 -9
- data/lib/ding_sdk/models/shared/feedbackrequest.rb +30 -27
- data/lib/ding_sdk/models/shared/feedbackrequest_status.rb +9 -7
- data/lib/ding_sdk/models/shared/feedbackresponse.rb +17 -14
- data/lib/ding_sdk/models/shared/line_type.rb +46 -44
- data/lib/ding_sdk/models/shared/lookupresponse.rb +69 -66
- data/lib/ding_sdk/models/shared/retryauthenticationrequest.rb +26 -23
- data/lib/ding_sdk/models/shared/retryauthenticationresponse.rb +45 -42
- data/lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb +20 -18
- data/lib/ding_sdk/models/shared/security.rb +16 -13
- data/lib/ding_sdk/models/shared/signals.rb +46 -43
- data/lib/ding_sdk/models/shared/status.rb +14 -12
- data/lib/ding_sdk/models/shared/type.rb +11 -9
- data/lib/ding_sdk/models/shared.rb +35 -35
- data/lib/ding_sdk/otp.rb +72 -77
- data/lib/ding_sdk/sdkconfiguration.rb +9 -7
- data/lib/ding_sdk/utils/utils.rb +7 -7
- data/lib/ding_sdk.rb +5 -2
- metadata +6 -4
- data/lib/ding_sdk/models/shared/code.rb +0 -39
- data/lib/ding_sdk/models/shared/errorresponse.rb +0 -38
@@ -5,77 +5,80 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
10
11
|
|
11
|
-
|
12
|
-
|
12
|
+
class LookupResponse
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
16
|
+
# The CNAM (Caller ID Name) associated with the phone number. Contact us if you need to use this functionality. Once enabled, put `cnam` option to `type` query parameter.
|
17
|
+
field :caller_name, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('caller_name') } }
|
18
|
+
# The carrier of the phone number.
|
19
|
+
field :carrier, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('carrier') } }
|
20
|
+
# The ISO 3166-1 alpha-2 country code of the phone number.
|
21
|
+
field :country_code, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('country_code') } }
|
22
|
+
# The type of phone line.
|
23
|
+
# * `CallingCards` - Numbers that are associated with providers of pre-paid domestic and international calling cards.
|
24
|
+
# * `FixedLine` - Landline phone numbers.
|
25
|
+
# * `InternetServiceProvider` - Numbers reserved for ISPs.
|
26
|
+
# * `LocalRate` - Numbers that can be assigned non-geographically.
|
27
|
+
# * `Mobile` - Mobile phone numbers.
|
28
|
+
# * `Other` - Other types of services.
|
29
|
+
# * `Pager` - Number ranges specifically allocated to paging devices.
|
30
|
+
# * `PayPhone` - Allocated numbers for payphone kiosks in some countries.
|
31
|
+
# * `PremiumRate` - Landline numbers where the calling party pays more than standard.
|
32
|
+
# * `Satellite` - Satellite phone numbers.
|
33
|
+
# * `Service` - Automated applications.
|
34
|
+
# * `SharedCost` - Specific landline ranges where the cost of making the call is shared between the calling and called party.
|
35
|
+
# * `ShortCodesCommercial` - Short codes are memorable, easy-to-use numbers, like the UK's NHS 111, often sold to businesses. Not available in all countries.
|
36
|
+
# * `TollFree` - Number where the called party pays for the cost of the call not the calling party.
|
37
|
+
# * `UniversalAccess` - Number ranges reserved for Universal Access initiatives.
|
38
|
+
# * `Unknown` - Unknown phone number type.
|
39
|
+
# * `VPN` - Numbers are used exclusively within a private telecommunications network, connecting the operator's terminals internally and not accessible via the public telephone network.
|
40
|
+
# * `VoiceMail` - A specific category of Interactive Voice Response (IVR) services.
|
41
|
+
# * `Voip` - Specific ranges for providers of VoIP services to allow incoming calls from the regular telephony network.
|
42
|
+
#
|
43
|
+
field :line_type, T.nilable(Models::Shared::LineType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('line_type'), 'decoder': Utils.enum_from_string(Models::Shared::LineType, true) } }
|
44
|
+
# The mobile country code of the phone number.
|
45
|
+
field :mcc, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('mcc') } }
|
46
|
+
# The mobile network code of the phone number.
|
47
|
+
field :mnc, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('mnc') } }
|
48
|
+
# Whether the phone number has been ported.
|
49
|
+
field :number_ported, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('number_ported') } }
|
50
|
+
# An E.164 formatted phone number.
|
51
|
+
field :phone_number, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
|
52
|
+
# Whether the phone number is in our database of disposable, temporary phone numbers
|
53
|
+
field :temporary_phone_number, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('temporary_phone_number') } }
|
52
54
|
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
56
|
+
sig { params(caller_name: T.nilable(::String), carrier: T.nilable(::String), country_code: T.nilable(::String), line_type: T.nilable(Models::Shared::LineType), mcc: T.nilable(::String), mnc: T.nilable(::String), number_ported: T.nilable(T::Boolean), phone_number: T.nilable(::String), temporary_phone_number: T.nilable(T::Boolean)).void }
|
57
|
+
def initialize(caller_name: nil, carrier: nil, country_code: nil, line_type: nil, mcc: nil, mnc: nil, number_ported: nil, phone_number: nil, temporary_phone_number: nil)
|
58
|
+
@caller_name = caller_name
|
59
|
+
@carrier = carrier
|
60
|
+
@country_code = country_code
|
61
|
+
@line_type = line_type
|
62
|
+
@mcc = mcc
|
63
|
+
@mnc = mnc
|
64
|
+
@number_ported = number_ported
|
65
|
+
@phone_number = phone_number
|
66
|
+
@temporary_phone_number = temporary_phone_number
|
67
|
+
end
|
66
68
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
69
|
+
def ==(other)
|
70
|
+
return false unless other.is_a? self.class
|
71
|
+
return false unless @caller_name == other.caller_name
|
72
|
+
return false unless @carrier == other.carrier
|
73
|
+
return false unless @country_code == other.country_code
|
74
|
+
return false unless @line_type == other.line_type
|
75
|
+
return false unless @mcc == other.mcc
|
76
|
+
return false unless @mnc == other.mnc
|
77
|
+
return false unless @number_ported == other.number_ported
|
78
|
+
return false unless @phone_number == other.phone_number
|
79
|
+
return false unless @temporary_phone_number == other.temporary_phone_number
|
80
|
+
true
|
81
|
+
end
|
79
82
|
end
|
80
83
|
end
|
81
84
|
end
|
@@ -5,29 +5,32 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
11
|
+
|
12
|
+
class RetryAuthenticationRequest
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# The authentication UUID that was returned when you created the authentication.
|
17
|
+
field :authentication_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
|
18
|
+
# Your customer UUID, which can be found in the API settings in the dashboard.
|
19
|
+
field :customer_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
|
20
|
+
|
21
|
+
|
22
|
+
sig { params(authentication_uuid: ::String, customer_uuid: ::String).void }
|
23
|
+
def initialize(authentication_uuid: nil, customer_uuid: nil)
|
24
|
+
@authentication_uuid = authentication_uuid
|
25
|
+
@customer_uuid = customer_uuid
|
26
|
+
end
|
27
|
+
|
28
|
+
def ==(other)
|
29
|
+
return false unless other.is_a? self.class
|
30
|
+
return false unless @authentication_uuid == other.authentication_uuid
|
31
|
+
return false unless @customer_uuid == other.customer_uuid
|
32
|
+
true
|
33
|
+
end
|
31
34
|
end
|
32
35
|
end
|
33
36
|
end
|
@@ -5,48 +5,51 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
11
|
+
|
12
|
+
class RetryAuthenticationResponse
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# The UUID of the corresponding authentication.
|
17
|
+
field :authentication_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
|
18
|
+
|
19
|
+
field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
20
|
+
# The time at which the next retry will be available.
|
21
|
+
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) } }
|
22
|
+
# The number of remaining retries.
|
23
|
+
field :remaining_retry, T.nilable(::Integer), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('remaining_retry') } }
|
24
|
+
# The status of the retry. Possible values are:
|
25
|
+
# * `approved` - The retry was approved and a new code was sent.
|
26
|
+
# * `denied` - The retry was denied.
|
27
|
+
# * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
|
28
|
+
# * `rate_limited` - The authentication was rate limited and cannot be retried.
|
29
|
+
# * `expired_auth` - The authentication has expired and cannot be retried.
|
30
|
+
# * `already_validated` - The authentication has already been validated.
|
31
|
+
#
|
32
|
+
field :status, T.nilable(Models::Shared::RetryAuthenticationResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::RetryAuthenticationResponseStatus, true) } }
|
33
|
+
|
34
|
+
|
35
|
+
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(Models::Shared::RetryAuthenticationResponseStatus)).void }
|
36
|
+
def initialize(authentication_uuid: nil, created_at: nil, next_retry_at: nil, remaining_retry: nil, status: nil)
|
37
|
+
@authentication_uuid = authentication_uuid
|
38
|
+
@created_at = created_at
|
39
|
+
@next_retry_at = next_retry_at
|
40
|
+
@remaining_retry = remaining_retry
|
41
|
+
@status = status
|
42
|
+
end
|
43
|
+
|
44
|
+
def ==(other)
|
45
|
+
return false unless other.is_a? self.class
|
46
|
+
return false unless @authentication_uuid == other.authentication_uuid
|
47
|
+
return false unless @created_at == other.created_at
|
48
|
+
return false unless @next_retry_at == other.next_retry_at
|
49
|
+
return false unless @remaining_retry == other.remaining_retry
|
50
|
+
return false unless @status == other.status
|
51
|
+
true
|
52
|
+
end
|
50
53
|
end
|
51
54
|
end
|
52
55
|
end
|
@@ -5,24 +5,26 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
11
|
+
# RetryAuthenticationResponseStatus - The status of the retry. Possible values are:
|
12
|
+
# * `approved` - The retry was approved and a new code was sent.
|
13
|
+
# * `denied` - The retry was denied.
|
14
|
+
# * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
|
15
|
+
# * `rate_limited` - The authentication was rate limited and cannot be retried.
|
16
|
+
# * `expired_auth` - The authentication has expired and cannot be retried.
|
17
|
+
# * `already_validated` - The authentication has already been validated.
|
18
|
+
#
|
19
|
+
class RetryAuthenticationResponseStatus < T::Enum
|
20
|
+
enums do
|
21
|
+
APPROVED = new('approved')
|
22
|
+
DENIED = new('denied')
|
23
|
+
NO_ATTEMPT = new('no_attempt')
|
24
|
+
RATE_LIMITED = new('rate_limited')
|
25
|
+
EXPIRED_AUTH = new('expired_auth')
|
26
|
+
ALREADY_VALIDATED = new('already_validated')
|
27
|
+
end
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
@@ -5,25 +5,28 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
10
11
|
|
11
|
-
|
12
|
-
|
12
|
+
class Security
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
13
15
|
|
14
16
|
|
15
|
-
|
17
|
+
field :api_key, ::String, { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-api-key' } }
|
16
18
|
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
sig { params(api_key: ::String).void }
|
21
|
+
def initialize(api_key: nil)
|
22
|
+
@api_key = api_key
|
23
|
+
end
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
def ==(other)
|
26
|
+
return false unless other.is_a? self.class
|
27
|
+
return false unless @api_key == other.api_key
|
28
|
+
true
|
29
|
+
end
|
27
30
|
end
|
28
31
|
end
|
29
32
|
end
|
@@ -5,53 +5,56 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
11
|
+
# Signals are data points used to distinguish between fraudulent and legitimate users.
|
12
|
+
class Signals
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
16
|
+
# 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.
|
17
|
+
field :app_realm, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_realm') } }
|
18
|
+
# The version of your application.
|
19
|
+
field :app_version, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_version') } }
|
20
|
+
# Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
21
|
+
field :device_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_id') } }
|
22
|
+
# The model of the user's device.
|
23
|
+
field :device_model, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_model') } }
|
24
|
+
# The type of device the user is using.
|
25
|
+
field :device_type, T.nilable(Models::Shared::AuthenticationStatusResponseDeviceType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_type'), 'decoder': Utils.enum_from_string(Models::Shared::AuthenticationStatusResponseDeviceType, true) } }
|
26
|
+
# The IP address of the user's device.
|
27
|
+
field :ip, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('ip') } }
|
28
|
+
# 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](/verify/v2/documentation/prevent-fraud#signals).
|
29
|
+
field :is_returning_user, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('is_returning_user') } }
|
30
|
+
# The version of the user's device operating system.
|
31
|
+
field :os_version, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('os_version') } }
|
30
32
|
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
34
|
+
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(Models::Shared::AuthenticationStatusResponseDeviceType), ip: T.nilable(::String), is_returning_user: T.nilable(T::Boolean), os_version: T.nilable(::String)).void }
|
35
|
+
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)
|
36
|
+
@app_realm = app_realm
|
37
|
+
@app_version = app_version
|
38
|
+
@device_id = device_id
|
39
|
+
@device_model = device_model
|
40
|
+
@device_type = device_type
|
41
|
+
@ip = ip
|
42
|
+
@is_returning_user = is_returning_user
|
43
|
+
@os_version = os_version
|
44
|
+
end
|
43
45
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
def ==(other)
|
47
|
+
return false unless other.is_a? self.class
|
48
|
+
return false unless @app_realm == other.app_realm
|
49
|
+
return false unless @app_version == other.app_version
|
50
|
+
return false unless @device_id == other.device_id
|
51
|
+
return false unless @device_model == other.device_model
|
52
|
+
return false unless @device_type == other.device_type
|
53
|
+
return false unless @ip == other.ip
|
54
|
+
return false unless @is_returning_user == other.is_returning_user
|
55
|
+
return false unless @os_version == other.os_version
|
56
|
+
true
|
57
|
+
end
|
55
58
|
end
|
56
59
|
end
|
57
60
|
end
|
@@ -5,18 +5,20 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
11
|
+
# Status - The status of the authentication. Possible values are:
|
12
|
+
# * `pending` - The OTP code is being sent.
|
13
|
+
# * `rate_limited` - This user is rate-limited and cannot receive another code.
|
14
|
+
# * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
|
15
|
+
#
|
16
|
+
class Status < T::Enum
|
17
|
+
enums do
|
18
|
+
PENDING = new('pending')
|
19
|
+
RATE_LIMITED = new('rate_limited')
|
20
|
+
SPAM_DETECTED = new('spam_detected')
|
21
|
+
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
@@ -5,15 +5,17 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
module DingSDK
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
module Models
|
9
|
+
module Shared
|
10
|
+
|
11
|
+
# Type - The type of the event.
|
12
|
+
class Type < T::Enum
|
13
|
+
enums do
|
14
|
+
ATTEMPT = new('attempt')
|
15
|
+
CHECK = new('check')
|
16
|
+
DELIVERY_STATUS = new('delivery_status')
|
17
|
+
BALANCE_UPDATE = new('balance_update')
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|