Class: GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb,
sig/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbs

Defined Under Namespace

Modules: Status

Instance Attribute 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(identifier:, index:, status:, email: nil, message: nil, participant_id: nil) ⇒ Object

Some parameter documentations has been truncated, see GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result for more details.

Parameters:

  • identifier (String)

    The submitted participant ID or email address, echoed back as received.

  • index (Integer)

    Zero-based position of this entry in the submitted participants array.

  • status (Symbol, GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result::Status)

    Per-row outcome. DELETED — the participant was resolved and removed. `NOT_FOU

  • email (String) (defaults to: nil)

    The resolved participant's email address. Present on DELETED rows.

  • message (String) (defaults to: nil)

    Human-readable detail for NOT_FOUND, DUPLICATE, and ERROR rows.

  • participant_id (String) (defaults to: nil)

    The resolved GrowSurf participant ID. Present when the entry resolved to a part



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
# File 'lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb', line 29

class Result < GrowsurfRuby::Internal::Type::BaseModel
  # @!attribute identifier
  #   The submitted participant ID or email address, echoed back as received.
  #
  #   @return [String]
  required :identifier, String

  # @!attribute index
  #   Zero-based position of this entry in the submitted `participants` array.
  #
  #   @return [Integer]
  required :index, Integer

  # @!attribute status
  #   Per-row outcome. `DELETED` — the participant was resolved and removed.
  #   `NOT_FOUND` — no participant matches the ID or email. `DUPLICATE` — the entry
  #   resolves to the same participant as an earlier entry in the same request.
  #   `ERROR` — the lookup or deletion failed for this row.
  #
  #   @return [Symbol, GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result::Status]
  required :status, enum: -> { GrowsurfRuby::Campaign::ParticipantBulkDeleteResponse::Result::Status }

  # @!attribute email
  #   The resolved participant's email address. Present on `DELETED` rows.
  #
  #   @return [String, nil]
  optional :email, String

  # @!attribute message
  #   Human-readable detail for `NOT_FOUND`, `DUPLICATE`, and `ERROR` rows.
  #
  #   @return [String, nil]
  optional :message, String

  # @!attribute participant_id
  #   The resolved GrowSurf participant ID. Present when the entry resolved to a
  #   participant.
  #
  #   @return [String, nil]
  optional :participant_id, String, api_name: :participantId

  # @!method initialize(identifier:, index:, status:, email: nil, message: nil, participant_id: nil)
  #   Some parameter documentations has been truncated, see
  #   {GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result} for
  #   more details.
  #
  #   @param identifier [String] The submitted participant ID or email address, echoed back as received.
  #
  #   @param index [Integer] Zero-based position of this entry in the submitted `participants` array.
  #
  #   @param status [Symbol, GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result::Status] Per-row outcome. `DELETED` — the participant was resolved and removed. `NOT_FOU
  #
  #   @param email [String] The resolved participant's email address. Present on `DELETED` rows.
  #
  #   @param message [String] Human-readable detail for `NOT_FOUND`, `DUPLICATE`, and `ERROR` rows.
  #
  #   @param participant_id [String] The resolved GrowSurf participant ID. Present when the entry resolved to a part

  # Per-row outcome. `DELETED` — the participant was resolved and removed.
  # `NOT_FOUND` — no participant matches the ID or email. `DUPLICATE` — the entry
  # resolves to the same participant as an earlier entry in the same request.
  # `ERROR` — the lookup or deletion failed for this row.
  #
  # @see GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result#status
  module Status
    extend GrowsurfRuby::Internal::Type::Enum

    DELETED = :DELETED
    NOT_FOUND = :NOT_FOUND
    DUPLICATE = :DUPLICATE
    ERROR = :ERROR

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

Instance Attribute Details

#emailString?

The resolved participant's email address. Present on DELETED rows.

Parameters:

  • (String)

Returns:

  • (String, nil)


55
# File 'lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb', line 55

optional :email, String

#identifierString

The submitted participant ID or email address, echoed back as received.

Parameters:

  • value (String)

Returns:

  • (String)


34
# File 'lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb', line 34

required :identifier, String

#indexInteger

Zero-based position of this entry in the submitted participants array.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


40
# File 'lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb', line 40

required :index, Integer

#messageString?

Human-readable detail for NOT_FOUND, DUPLICATE, and ERROR rows.

Parameters:

  • (String)

Returns:

  • (String, nil)


61
# File 'lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb', line 61

optional :message, String

#participant_idString?

The resolved GrowSurf participant ID. Present when the entry resolved to a participant.

Parameters:

  • (String)

Returns:

  • (String, nil)


68
# File 'lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb', line 68

optional :participant_id, String, api_name: :participantId

#statusSymbol, GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result::Status

Per-row outcome. DELETED — the participant was resolved and removed. NOT_FOUND — no participant matches the ID or email. DUPLICATE — the entry resolves to the same participant as an earlier entry in the same request. ERROR — the lookup or deletion failed for this row.

Parameters:

  • value (GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteResponse::Result::status)

Returns:



49
# File 'lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb', line 49

required :status, enum: -> { GrowsurfRuby::Campaign::ParticipantBulkDeleteResponse::Result::Status }

Instance Method Details

#to_hash{

Returns:

  • ({)


63
# File 'sig/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbs', line 63

def to_hash: -> {