Class: Telnyx::Models::TermsOfService::TosAgreement

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/terms_of_service/tos_agreement.rb,
sig/telnyx/models/terms_of_service/tos_agreement.rbs

Overview

See Also:

  • Telnyx::Resources::TermsOfService::Agreements#list

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(id: nil, agreed_at: nil, created_at: nil, product_type: nil, terms_version: nil, version: nil) ⇒ Object

A recorded user agreement to a product's Terms of Service. The user_id is intentionally NOT echoed back on this public surface - the caller already knows their own identity.

Parameters:

  • id (String) (defaults to: nil)
  • agreed_at (Time) (defaults to: nil)
  • created_at (Time) (defaults to: nil)
  • product_type (Symbol, Telnyx::Models::TermsOfService::TosProductType) (defaults to: nil)

    Telnyx product the Terms of Service apply to.

  • terms_version (String) (defaults to: nil)
  • version (String) (defaults to: nil)

    Convenience alias of terms_version. Both keys are present on every response.



# File 'lib/telnyx/models/terms_of_service/tos_agreement.rb', line 42

Instance Attribute Details

#agreed_atTime? (readonly)

Returns the value of attribute agreed_at.

Returns:

  • (Time, nil)


29
30
31
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 29

def agreed_at
  @agreed_at
end

#created_atTime? (readonly)

Returns the value of attribute created_at.

Returns:

  • (Time, nil)


33
34
35
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 33

def created_at
  @created_at
end

#idString? (readonly)

Returns the value of attribute id.

Returns:

  • (String, nil)


25
26
27
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 25

def id
  @id
end

#product_typeSymbol, ...

Telnyx product the Terms of Service apply to.



12
# File 'lib/telnyx/models/terms_of_service/tos_agreement.rb', line 12

optional :product_type, enum: -> { Telnyx::TermsOfService::TosProductType }

#terms_versionString?

Parameters:

  • (String)

Returns:

  • (String, nil)


17
# File 'lib/telnyx/models/terms_of_service/tos_agreement.rb', line 17

optional :terms_version, String

#versionString? (readonly)

Returns the value of attribute version.

Returns:

  • (String, nil)


37
38
39
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 37

def version
  @version
end

Instance Method Details

#agreed_at=Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


31
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 31

def agreed_at=: (Time) -> Time

#created_at=Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


35
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 35

def created_at=: (Time) -> Time

#id=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


27
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 27

def id=: (String) -> String

#to_hash{

Returns:

  • ({)


50
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 50

def to_hash: -> {

#version=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


39
# File 'sig/telnyx/models/terms_of_service/tos_agreement.rbs', line 39

def version=: (String) -> String