Class: PreludeSDK::Models::WatchSendFeedbacksParams::Feedback

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/prelude_sdk/models/watch_send_feedbacks_params.rb

Defined Under Namespace

Modules: Type Classes: Metadata, Target

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(target:, type:, metadata: nil) ⇒ Object

Parameters:



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
114
115
116
117
118
# File 'lib/prelude_sdk/models/watch_send_feedbacks_params.rb', line 26

class Feedback < PreludeSDK::Internal::Type::BaseModel
  # @!attribute target
  #   The feedback target. Only supports phone numbers for now.
  #
  #   @return [PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target]
  required :target, -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Target }

  # @!attribute type
  #   The type of feedback.
  #
  #   @return [Symbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Type]
  required :type, enum: -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Type }

  # @!attribute metadata
  #   The metadata for this feedback.
  #
  #   @return [PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Metadata, nil]
  optional :metadata, -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Metadata }

  # @!method initialize(target:, type:, metadata: nil)
  #   @param target [PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target] The feedback target. Only supports phone numbers for now.
  #
  #   @param type [Symbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Type] The type of feedback.
  #
  #   @param metadata [PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Metadata] The metadata for this feedback.

  # @see PreludeSDK::Models::WatchSendFeedbacksParams::Feedback#target
  class Target < PreludeSDK::Internal::Type::BaseModel
    # @!attribute type
    #   The type of the target. Either "phone_number" or "email_address".
    #
    #   @return [Symbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target::Type]
    required :type, enum: -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Target::Type }

    # @!attribute value
    #   An E.164 formatted phone number or an email address.
    #
    #   @return [String]
    required :value, String

    # @!method initialize(type:, value:)
    #   The feedback target. Only supports phone numbers for now.
    #
    #   @param type [Symbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target::Type] The type of the target. Either "phone_number" or "email_address".
    #
    #   @param value [String] An E.164 formatted phone number or an email address.

    # The type of the target. Either "phone_number" or "email_address".
    #
    # @see PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target#type
    module Type
      extend PreludeSDK::Internal::Type::Enum

      PHONE_NUMBER = :phone_number
      EMAIL_ADDRESS = :email_address

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

  # The type of feedback.
  #
  # @see PreludeSDK::Models::WatchSendFeedbacksParams::Feedback#type
  module Type
    extend PreludeSDK::Internal::Type::Enum

    VERIFICATION_STARTED = :"verification.started"
    VERIFICATION_COMPLETED = :"verification.completed"

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

  # @see PreludeSDK::Models::WatchSendFeedbacksParams::Feedback#metadata
  class Metadata < PreludeSDK::Internal::Type::BaseModel
    # @!attribute correlation_id
    #   A user-defined identifier to correlate this feedback with. It is returned in the
    #   response and any webhook events that refer to this feedback.
    #
    #   @return [String, nil]
    optional :correlation_id, String

    # @!method initialize(correlation_id: nil)
    #   Some parameter documentations has been truncated, see
    #   {PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Metadata} for more
    #   details.
    #
    #   The metadata for this feedback.
    #
    #   @param correlation_id [String] A user-defined identifier to correlate this feedback with. It is returned in the
  end
end

Instance Attribute Details

#metadataPreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Metadata?

The metadata for this feedback.



43
# File 'lib/prelude_sdk/models/watch_send_feedbacks_params.rb', line 43

optional :metadata, -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Metadata }

#targetPreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target

The feedback target. Only supports phone numbers for now.



31
# File 'lib/prelude_sdk/models/watch_send_feedbacks_params.rb', line 31

required :target, -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Target }

#typeSymbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Type

The type of feedback.



37
# File 'lib/prelude_sdk/models/watch_send_feedbacks_params.rb', line 37

required :type, enum: -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/prelude_sdk/models/watch_send_feedbacks_params.rb', line 82