Class: Sentdm::Models::APIResponseContact

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/api_response_contact.rb

Overview

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(data: nil, error: nil, meta: nil, success: nil) ⇒ Object

Standard API response envelope for all v3 endpoints

Parameters:

  • data (Sentdm::Models::Contact, nil) (defaults to: nil)

    The response data (null if error)

  • error (Sentdm::Models::APIError, nil) (defaults to: nil)

    Error details (null if successful)

  • meta (Sentdm::Models::APIMeta) (defaults to: nil)

    Metadata about the request and response

  • success (Boolean) (defaults to: nil)

    Indicates whether the request was successful



# File 'lib/sentdm/models/api_response_contact.rb', line 31

Instance Attribute Details

#dataSentdm::Models::Contact?

The response data (null if error)

Returns:



11
# File 'lib/sentdm/models/api_response_contact.rb', line 11

optional :data, -> { Sentdm::Contact }, nil?: true

#errorSentdm::Models::APIError?

Error details (null if successful)

Returns:



17
# File 'lib/sentdm/models/api_response_contact.rb', line 17

optional :error, -> { Sentdm::APIError }, nil?: true

#metaSentdm::Models::APIMeta?

Metadata about the request and response

Returns:



23
# File 'lib/sentdm/models/api_response_contact.rb', line 23

optional :meta, -> { Sentdm::APIMeta }

#successBoolean?

Indicates whether the request was successful

Returns:

  • (Boolean, nil)


29
# File 'lib/sentdm/models/api_response_contact.rb', line 29

optional :success, Sentdm::Internal::Type::Boolean