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