Class: Zavudev::Models::IntrospectValidateEmailResponse::Result

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/introspect_validate_email_response.rb,
sig/zavudev/models/introspect_validate_email_response.rbs

Defined Under Namespace

Modules: Reason, Verdict

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(results:, summary:) ⇒ Object

Parameters:



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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/zavudev/models/introspect_validate_email_response.rb', line 24

class Result < Zavudev::Internal::Type::BaseModel
  # @!attribute domain
  #   Domain part of the address. Null when the syntax is invalid.
  #
  #   @return [String, nil]
  required :domain, String, nil?: true

  # @!attribute email
  #   The address exactly as submitted.
  #
  #   @return [String]
  required :email, String

  # @!attribute normalized
  #   Lowercased, trimmed form of the address. Null when the syntax is invalid.
  #
  #   @return [String, nil]
  required :normalized, String, nil?: true

  # @!attribute reasons
  #   Signals behind the verdict. Empty for a clean `deliverable` address.
  #
  #   @return [Array<Symbol, Zavudev::Models::IntrospectValidateEmailResponse::Result::Reason>]
  required :reasons,
           -> { Zavudev::Internal::Type::ArrayOf[enum: Zavudev::Models::IntrospectValidateEmailResponse::Result::Reason] }

  # @!attribute verdict
  #   Validation verdict.
  #
  #   - `deliverable`: nothing suggests the address will bounce.
  #   - `risky`: sendable, but a signal predicts elevated bounce/complaint odds (role
  #     address, disposable domain, MX-less domain, prior soft bounce).
  #   - `undeliverable`: will bounce or is blocked (invalid syntax, dead domain, or
  #     the address is on your suppression list after a hard bounce/complaint).
  #
  #   @return [Symbol, Zavudev::Models::IntrospectValidateEmailResponse::Result::Verdict]
  required :verdict, enum: -> { Zavudev::Models::IntrospectValidateEmailResponse::Result::Verdict }

  # @!method initialize(domain:, email:, normalized:, reasons:, verdict:)
  #   Some parameter documentations has been truncated, see
  #   {Zavudev::Models::IntrospectValidateEmailResponse::Result} for more details.
  #
  #   @param domain [String, nil] Domain part of the address. Null when the syntax is invalid.
  #
  #   @param email [String] The address exactly as submitted.
  #
  #   @param normalized [String, nil] Lowercased, trimmed form of the address. Null when the syntax is invalid.
  #
  #   @param reasons [Array<Symbol, Zavudev::Models::IntrospectValidateEmailResponse::Result::Reason>] Signals behind the verdict. Empty for a clean `deliverable` address.
  #
  #   @param verdict [Symbol, Zavudev::Models::IntrospectValidateEmailResponse::Result::Verdict] Validation verdict.

  module Reason
    extend Zavudev::Internal::Type::Enum

    INVALID_SYNTAX = :invalid_syntax
    DOMAIN_NOT_FOUND = :domain_not_found
    DOMAIN_NO_MX = :domain_no_mx
    DISPOSABLE_DOMAIN = :disposable_domain
    ROLE_ADDRESS = :role_address
    SUPPRESSED_HARD_BOUNCE = :suppressed_hard_bounce
    SUPPRESSED_SOFT_BOUNCE = :suppressed_soft_bounce
    SUPPRESSED_COMPLAINT = :suppressed_complaint
    SUPPRESSED_MANUAL = :suppressed_manual
    SUPPRESSED_UNSUBSCRIBE = :suppressed_unsubscribe

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Validation verdict.
  #
  # - `deliverable`: nothing suggests the address will bounce.
  # - `risky`: sendable, but a signal predicts elevated bounce/complaint odds (role
  #   address, disposable domain, MX-less domain, prior soft bounce).
  # - `undeliverable`: will bounce or is blocked (invalid syntax, dead domain, or
  #   the address is on your suppression list after a hard bounce/complaint).
  #
  # @see Zavudev::Models::IntrospectValidateEmailResponse::Result#verdict
  module Verdict
    extend Zavudev::Internal::Type::Enum

    DELIVERABLE = :deliverable
    RISKY = :risky
    UNDELIVERABLE = :undeliverable

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#domain ⇒ String?

Domain part of the address. Null when the syntax is invalid.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


29
# File 'lib/zavudev/models/introspect_validate_email_response.rb', line 29

required :domain, String, nil?: true

#email ⇒ String

The address exactly as submitted.

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/zavudev/models/introspect_validate_email_response.rb', line 35

required :email, String

#normalized ⇒ String?

Lowercased, trimmed form of the address. Null when the syntax is invalid.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


41
# File 'lib/zavudev/models/introspect_validate_email_response.rb', line 41

required :normalized, String, nil?: true

#reasons ⇒ Array<Symbol, Zavudev::Models::IntrospectValidateEmailResponse::Result::Reason>

Signals behind the verdict. Empty for a clean deliverable address.

Parameters:

  • value (::Array[Zavudev::Models::IntrospectValidateEmailResponse::Result::reason])

Returns:



47
48
# File 'lib/zavudev/models/introspect_validate_email_response.rb', line 47

required :reasons,
-> { Zavudev::Internal::Type::ArrayOf[enum: Zavudev::Models::IntrospectValidateEmailResponse::Result::Reason] }

#verdict ⇒ Symbol, Zavudev::Models::IntrospectValidateEmailResponse::Result::Verdict

Validation verdict.

  • deliverable: nothing suggests the address will bounce.
  • risky: sendable, but a signal predicts elevated bounce/complaint odds (role address, disposable domain, MX-less domain, prior soft bounce).
  • undeliverable: will bounce or is blocked (invalid syntax, dead domain, or the address is on your suppression list after a hard bounce/complaint).

Parameters:

  • value (Zavudev::Models::IntrospectValidateEmailResponse::Result::verdict)

Returns:



60
# File 'lib/zavudev/models/introspect_validate_email_response.rb', line 60

required :verdict, enum: -> { Zavudev::Models::IntrospectValidateEmailResponse::Result::Verdict }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/zavudev/models/introspect_validate_email_response.rb', line 90

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


52
# File 'sig/zavudev/models/introspect_validate_email_response.rbs', line 52

def to_hash: -> {