ding_sdk 0.14.2 → 0.14.4

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,41 +5,40 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Operations
9
-
10
-
11
- class GetAuthenticationStatusResponse < ::Crystalline::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
-
35
- def ==(other)
36
- return false unless other.is_a? self.class
37
- return false unless @content_type == other.content_type
38
- return false unless @raw_response == other.raw_response
39
- return false unless @status_code == other.status_code
40
- return false unless @authentication_status_response == other.authentication_status_response
41
- return false unless @error_response == other.error_response
42
- true
8
+ module Models
9
+ module Operations
10
+
11
+
12
+ class GetAuthenticationStatusResponse
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # HTTP response content type for this operation
17
+ field :content_type, ::String
18
+ # Raw HTTP response; suitable for custom response parsing
19
+ field :raw_response, ::Faraday::Response
20
+ # HTTP response status code for this operation
21
+ field :status_code, ::Integer
22
+ # OK
23
+ field :authentication_status_response, T.nilable(Models::Shared::AuthenticationStatusResponse)
24
+
25
+
26
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, authentication_status_response: T.nilable(Models::Shared::AuthenticationStatusResponse)).void }
27
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, authentication_status_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
+ end
33
+
34
+ def ==(other)
35
+ return false unless other.is_a? self.class
36
+ return false unless @content_type == other.content_type
37
+ return false unless @raw_response == other.raw_response
38
+ return false unless @status_code == other.status_code
39
+ return false unless @authentication_status_response == other.authentication_status_response
40
+ true
41
+ end
43
42
  end
44
43
  end
45
44
  end
@@ -5,33 +5,36 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Operations
9
-
8
+ module Models
9
+ module Operations
10
+
10
11
 
11
- class LookupRequest < ::Crystalline::FieldAugmented
12
- extend T::Sig
12
+ class LookupRequest
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
13
15
 
14
16
 
15
- field :customer_uuid, ::String, { 'header': { 'field_name': 'customer-uuid', 'style': 'simple', 'explode': false } }
17
+ field :customer_uuid, ::String, { 'header': { 'field_name': 'customer-uuid', 'style': 'simple', 'explode': false } }
16
18
 
17
- field :phone_number, ::String, { 'path_param': { 'field_name': 'phone_number', 'style': 'simple', 'explode': false } }
19
+ field :phone_number, ::String, { 'path_param': { 'field_name': 'phone_number', 'style': 'simple', 'explode': false } }
18
20
 
19
- field :type, T.nilable(T::Array[::DingSDK::Operations::Type]), { 'query_param': { 'field_name': 'type', 'style': 'form', 'explode': true } }
21
+ field :type, T.nilable(T::Array[Models::Operations::Type]), { 'query_param': { 'field_name': 'type', 'style': 'form', 'explode': true } }
20
22
 
21
23
 
22
- sig { params(customer_uuid: ::String, phone_number: ::String, type: T.nilable(T::Array[::DingSDK::Operations::Type])).void }
23
- def initialize(customer_uuid: nil, phone_number: nil, type: nil)
24
- @customer_uuid = customer_uuid
25
- @phone_number = phone_number
26
- @type = type
27
- end
24
+ sig { params(customer_uuid: ::String, phone_number: ::String, type: T.nilable(T::Array[Models::Operations::Type])).void }
25
+ def initialize(customer_uuid: nil, phone_number: nil, type: nil)
26
+ @customer_uuid = customer_uuid
27
+ @phone_number = phone_number
28
+ @type = type
29
+ end
28
30
 
29
- def ==(other)
30
- return false unless other.is_a? self.class
31
- return false unless @customer_uuid == other.customer_uuid
32
- return false unless @phone_number == other.phone_number
33
- return false unless @type == other.type
34
- true
31
+ def ==(other)
32
+ return false unless other.is_a? self.class
33
+ return false unless @customer_uuid == other.customer_uuid
34
+ return false unless @phone_number == other.phone_number
35
+ return false unless @type == other.type
36
+ true
37
+ end
35
38
  end
36
39
  end
37
40
  end
@@ -5,41 +5,40 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Operations
9
-
10
-
11
- class LookupResponse < ::Crystalline::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
- # Bad Request
21
- field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
22
- # OK
23
- field :lookup_response, T.nilable(::DingSDK::Shared::LookupResponse)
24
-
25
-
26
- 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 }
27
- def initialize(content_type: nil, raw_response: nil, status_code: nil, error_response: nil, lookup_response: nil)
28
- @content_type = content_type
29
- @raw_response = raw_response
30
- @status_code = status_code
31
- @error_response = error_response
32
- @lookup_response = lookup_response
33
- end
34
-
35
- def ==(other)
36
- return false unless other.is_a? self.class
37
- return false unless @content_type == other.content_type
38
- return false unless @raw_response == other.raw_response
39
- return false unless @status_code == other.status_code
40
- return false unless @error_response == other.error_response
41
- return false unless @lookup_response == other.lookup_response
42
- true
8
+ module Models
9
+ module Operations
10
+
11
+
12
+ class LookupResponse
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # HTTP response content type for this operation
17
+ field :content_type, ::String
18
+ # Raw HTTP response; suitable for custom response parsing
19
+ field :raw_response, ::Faraday::Response
20
+ # HTTP response status code for this operation
21
+ field :status_code, ::Integer
22
+ # OK
23
+ field :lookup_response, T.nilable(Models::Shared::LookupResponse)
24
+
25
+
26
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, lookup_response: T.nilable(Models::Shared::LookupResponse)).void }
27
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, lookup_response: nil)
28
+ @content_type = content_type
29
+ @raw_response = raw_response
30
+ @status_code = status_code
31
+ @lookup_response = lookup_response
32
+ end
33
+
34
+ def ==(other)
35
+ return false unless other.is_a? self.class
36
+ return false unless @content_type == other.content_type
37
+ return false unless @raw_response == other.raw_response
38
+ return false unless @status_code == other.status_code
39
+ return false unless @lookup_response == other.lookup_response
40
+ true
41
+ end
43
42
  end
44
43
  end
45
44
  end
@@ -5,41 +5,40 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Operations
9
-
10
-
11
- class RetryResponse < ::Crystalline::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
- # Bad Request
21
- field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
22
- # OK
23
- field :retry_authentication_response, T.nilable(::DingSDK::Shared::RetryAuthenticationResponse)
24
-
25
-
26
- 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 }
27
- def initialize(content_type: nil, raw_response: nil, status_code: nil, error_response: nil, retry_authentication_response: nil)
28
- @content_type = content_type
29
- @raw_response = raw_response
30
- @status_code = status_code
31
- @error_response = error_response
32
- @retry_authentication_response = retry_authentication_response
33
- end
34
-
35
- def ==(other)
36
- return false unless other.is_a? self.class
37
- return false unless @content_type == other.content_type
38
- return false unless @raw_response == other.raw_response
39
- return false unless @status_code == other.status_code
40
- return false unless @error_response == other.error_response
41
- return false unless @retry_authentication_response == other.retry_authentication_response
42
- true
8
+ module Models
9
+ module Operations
10
+
11
+
12
+ class RetryResponse
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # HTTP response content type for this operation
17
+ field :content_type, ::String
18
+ # Raw HTTP response; suitable for custom response parsing
19
+ field :raw_response, ::Faraday::Response
20
+ # HTTP response status code for this operation
21
+ field :status_code, ::Integer
22
+ # OK
23
+ field :retry_authentication_response, T.nilable(Models::Shared::RetryAuthenticationResponse)
24
+
25
+
26
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, retry_authentication_response: T.nilable(Models::Shared::RetryAuthenticationResponse)).void }
27
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, retry_authentication_response: nil)
28
+ @content_type = content_type
29
+ @raw_response = raw_response
30
+ @status_code = status_code
31
+ @retry_authentication_response = retry_authentication_response
32
+ end
33
+
34
+ def ==(other)
35
+ return false unless other.is_a? self.class
36
+ return false unless @content_type == other.content_type
37
+ return false unless @raw_response == other.raw_response
38
+ return false unless @status_code == other.status_code
39
+ return false unless @retry_authentication_response == other.retry_authentication_response
40
+ true
41
+ end
43
42
  end
44
43
  end
45
44
  end
@@ -5,12 +5,14 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Operations
9
-
8
+ module Models
9
+ module Operations
10
+
10
11
 
11
- class Type < T::Enum
12
- enums do
13
- CNAM = new('cnam')
12
+ class Type < T::Enum
13
+ enums do
14
+ CNAM = new('cnam')
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -4,15 +4,17 @@
4
4
  # frozen_string_literal: true
5
5
 
6
6
  module DingSDK
7
- module Operations
8
- autoload :CheckResponse, 'ding_sdk/models/operations/check_response.rb'
9
- autoload :CreateAuthenticationResponse, 'ding_sdk/models/operations/create_authentication_response.rb'
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'
13
- autoload :LookupRequest, 'ding_sdk/models/operations/lookup_request.rb'
14
- autoload :LookupResponse, 'ding_sdk/models/operations/lookup_response.rb'
15
- autoload :RetryResponse, 'ding_sdk/models/operations/retry_response.rb'
16
- autoload :Type, 'ding_sdk/models/operations/type.rb'
7
+ module Models
8
+ module Operations
9
+ autoload :CheckResponse, 'ding_sdk/models/operations/check_response.rb'
10
+ autoload :CreateAuthenticationResponse, 'ding_sdk/models/operations/create_authentication_response.rb'
11
+ autoload :FeedbackResponse, 'ding_sdk/models/operations/feedback_response.rb'
12
+ autoload :GetAuthenticationStatusRequest, 'ding_sdk/models/operations/getauthenticationstatus_request.rb'
13
+ autoload :GetAuthenticationStatusResponse, 'ding_sdk/models/operations/getauthenticationstatus_response.rb'
14
+ autoload :LookupRequest, 'ding_sdk/models/operations/lookup_request.rb'
15
+ autoload :LookupResponse, 'ding_sdk/models/operations/lookup_response.rb'
16
+ autoload :RetryResponse, 'ding_sdk/models/operations/retry_response.rb'
17
+ autoload :Type, 'ding_sdk/models/operations/type.rb'
18
+ end
17
19
  end
18
20
  end
@@ -5,59 +5,62 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Shared
9
-
8
+ module Models
9
+ module Shared
10
+
10
11
 
11
- class Attempt < ::Crystalline::FieldAugmented
12
- extend T::Sig
12
+ class Attempt
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
13
15
 
14
- # The attempt number.
15
- field :attempt_number, T.nilable(::Integer), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('attempt_number') } }
16
- # The capability of the attempt.
17
- field :capability, T.nilable(::DingSDK::Shared::Capability), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('capability'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::Capability, true) } }
18
- # The content of the attempt.
19
- field :content, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('content') } }
16
+ # The attempt number.
17
+ field :attempt_number, T.nilable(::Integer), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('attempt_number') } }
18
+ # The capability of the attempt.
19
+ field :capability, T.nilable(Models::Shared::Capability), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('capability'), 'decoder': Utils.enum_from_string(Models::Shared::Capability, true) } }
20
+ # The content of the attempt.
21
+ field :content, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('content') } }
20
22
 
21
- field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
22
- # The ID of the attempt.
23
- field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('id') } }
24
- # The sender ID of the attempt.
25
- field :sender_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('sender_id') } }
26
- # The status of the attempt. Possible values are:
27
- # * `pending` - The attempt is pending.
28
- # * `delivered` - The attempt was delivered.
29
- # * `failed` - The attempt failed.
30
- # * `rate_limited` - The authentication was rate limited and cannot be retried.
31
- # * `expired` - The authentication has expired and cannot be retried.
32
- #
33
- field :status, T.nilable(::DingSDK::Shared::AuthenticationStatusResponseSchemasStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::AuthenticationStatusResponseSchemasStatus, true) } }
34
- # The type of the event.
35
- field :type, T.nilable(::DingSDK::Shared::Type), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::Type, true) } }
23
+ field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
24
+ # The ID of the attempt.
25
+ field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('id') } }
26
+ # The sender ID of the attempt.
27
+ field :sender_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('sender_id') } }
28
+ # The status of the attempt. Possible values are:
29
+ # * `pending` - The attempt is pending.
30
+ # * `delivered` - The attempt was delivered.
31
+ # * `failed` - The attempt failed.
32
+ # * `rate_limited` - The authentication was rate limited and cannot be retried.
33
+ # * `expired` - The authentication has expired and cannot be retried.
34
+ #
35
+ field :status, T.nilable(Models::Shared::AuthenticationStatusResponseSchemasStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::AuthenticationStatusResponseSchemasStatus, true) } }
36
+ # The type of the event.
37
+ field :type, T.nilable(Models::Shared::Type), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::Type, true) } }
36
38
 
37
39
 
38
- sig { params(attempt_number: T.nilable(::Integer), capability: T.nilable(::DingSDK::Shared::Capability), content: T.nilable(::String), created_at: T.nilable(::DateTime), id: T.nilable(::String), sender_id: T.nilable(::String), status: T.nilable(::DingSDK::Shared::AuthenticationStatusResponseSchemasStatus), type: T.nilable(::DingSDK::Shared::Type)).void }
39
- def initialize(attempt_number: nil, capability: nil, content: nil, created_at: nil, id: nil, sender_id: nil, status: nil, type: nil)
40
- @attempt_number = attempt_number
41
- @capability = capability
42
- @content = content
43
- @created_at = created_at
44
- @id = id
45
- @sender_id = sender_id
46
- @status = status
47
- @type = type
48
- end
40
+ sig { params(attempt_number: T.nilable(::Integer), capability: T.nilable(Models::Shared::Capability), content: T.nilable(::String), created_at: T.nilable(::DateTime), id: T.nilable(::String), sender_id: T.nilable(::String), status: T.nilable(Models::Shared::AuthenticationStatusResponseSchemasStatus), type: T.nilable(Models::Shared::Type)).void }
41
+ def initialize(attempt_number: nil, capability: nil, content: nil, created_at: nil, id: nil, sender_id: nil, status: nil, type: nil)
42
+ @attempt_number = attempt_number
43
+ @capability = capability
44
+ @content = content
45
+ @created_at = created_at
46
+ @id = id
47
+ @sender_id = sender_id
48
+ @status = status
49
+ @type = type
50
+ end
49
51
 
50
- def ==(other)
51
- return false unless other.is_a? self.class
52
- return false unless @attempt_number == other.attempt_number
53
- return false unless @capability == other.capability
54
- return false unless @content == other.content
55
- return false unless @created_at == other.created_at
56
- return false unless @id == other.id
57
- return false unless @sender_id == other.sender_id
58
- return false unless @status == other.status
59
- return false unless @type == other.type
60
- true
52
+ def ==(other)
53
+ return false unless other.is_a? self.class
54
+ return false unless @attempt_number == other.attempt_number
55
+ return false unless @capability == other.capability
56
+ return false unless @content == other.content
57
+ return false unless @created_at == other.created_at
58
+ return false unless @id == other.id
59
+ return false unless @sender_id == other.sender_id
60
+ return false unless @status == other.status
61
+ return false unless @type == other.type
62
+ true
63
+ end
61
64
  end
62
65
  end
63
66
  end
@@ -5,49 +5,52 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Shared
9
-
10
-
11
- class AuthenticationStatusResponse < ::Crystalline::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[T.any(::DingSDK::Shared::Attempt, ::DingSDK::Shared::Check, ::DingSDK::Shared::DeliveryStatus, ::DingSDK::Shared::BalanceUpdate)]), { '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[T.any(::DingSDK::Shared::Attempt, ::DingSDK::Shared::Check, ::DingSDK::Shared::DeliveryStatus, ::DingSDK::Shared::BalanceUpdate)]), 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
-
41
- def ==(other)
42
- return false unless other.is_a? self.class
43
- return false unless @correlation_id == other.correlation_id
44
- return false unless @created_at == other.created_at
45
- return false unless @events == other.events
46
- return false unless @phone_number == other.phone_number
47
- return false unless @signals == other.signals
48
- return false unless @template_id == other.template_id
49
- return false unless @uuid == other.uuid
50
- true
8
+ module Models
9
+ module Shared
10
+
11
+
12
+ class AuthenticationStatusResponse
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # A unique, user-defined identifier that will be included in webhook events.
17
+ field :correlation_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('correlation_id') } }
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
+ # 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.
21
+ field :events, T.nilable(T::Array[T.any(Models::Shared::Attempt, Models::Shared::Check, Models::Shared::DeliveryStatus, Models::Shared::BalanceUpdate)]), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('events') } }
22
+ # An E.164 formatted phone number.
23
+ field :phone_number, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
24
+ # Signals are data points used to distinguish between fraudulent and legitimate users.
25
+ field :signals, T.nilable(Models::Shared::Signals), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('signals') } }
26
+ # The template id associated with the message content variant to be sent.
27
+ field :template_id, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('template_id') } }
28
+ # The UUID of the corresponding authentication.
29
+ field :uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('uuid') } }
30
+
31
+
32
+ sig { params(correlation_id: T.nilable(::String), created_at: T.nilable(::DateTime), events: T.nilable(T::Array[T.any(Models::Shared::Attempt, Models::Shared::Check, Models::Shared::DeliveryStatus, Models::Shared::BalanceUpdate)]), phone_number: T.nilable(::String), signals: T.nilable(Models::Shared::Signals), template_id: T.nilable(::String), uuid: T.nilable(::String)).void }
33
+ def initialize(correlation_id: nil, created_at: nil, events: nil, phone_number: nil, signals: nil, template_id: nil, uuid: nil)
34
+ @correlation_id = correlation_id
35
+ @created_at = created_at
36
+ @events = events
37
+ @phone_number = phone_number
38
+ @signals = signals
39
+ @template_id = template_id
40
+ @uuid = uuid
41
+ end
42
+
43
+ def ==(other)
44
+ return false unless other.is_a? self.class
45
+ return false unless @correlation_id == other.correlation_id
46
+ return false unless @created_at == other.created_at
47
+ return false unless @events == other.events
48
+ return false unless @phone_number == other.phone_number
49
+ return false unless @signals == other.signals
50
+ return false unless @template_id == other.template_id
51
+ return false unless @uuid == other.uuid
52
+ true
53
+ end
51
54
  end
52
55
  end
53
56
  end
@@ -5,16 +5,18 @@
5
5
 
6
6
 
7
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
- ANDROID = new('ANDROID')
14
- IOS = new('IOS')
15
- IPADOS = new('IPADOS')
16
- TVOS = new('TVOS')
17
- WEB = new('WEB')
8
+ module Models
9
+ module Shared
10
+
11
+ # AuthenticationStatusResponseDeviceType - The type of device the user is using.
12
+ class AuthenticationStatusResponseDeviceType < T::Enum
13
+ enums do
14
+ ANDROID = new('ANDROID')
15
+ IOS = new('IOS')
16
+ IPADOS = new('IPADOS')
17
+ TVOS = new('TVOS')
18
+ WEB = new('WEB')
19
+ end
18
20
  end
19
21
  end
20
22
  end
@@ -5,15 +5,17 @@
5
5
 
6
6
 
7
7
  module DingSDK
8
- module Shared
9
-
10
- # AuthenticationStatusResponseSchemasEventsType - The type of the event.
11
- class AuthenticationStatusResponseSchemasEventsType < 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
+ # AuthenticationStatusResponseSchemasEventsType - The type of the event.
12
+ class AuthenticationStatusResponseSchemasEventsType < 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