Class: PostForMe::Models::SocialAccount

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

Overview

See Also:

  • PostForMe::Resources::SocialAccounts#create

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(id:, access_token:, access_token_expires_at:, external_id:, metadata:, platform:, profile_photo_url:, refresh_token:, refresh_token_expires_at:, status:, user_id:, username:) ⇒ Object

Parameters:

  • id (String)

    The unique identifier of the social account

  • access_token (String)

    The access token of the social account

  • access_token_expires_at (Time)

    The access token expiration date of the social account

  • external_id (String, nil)

    The external id of the social account

  • metadata (Object, nil)

    The metadata of the social account

  • platform (String)

    The platform of the social account

  • profile_photo_url (String, nil)

    The platform's profile photo of the social account

  • refresh_token (String, nil)

    The refresh token of the social account

  • refresh_token_expires_at (Time, nil)

    The refresh token expiration date of the social account

  • status (Symbol, PostForMe::Models::SocialAccount::Status)

    Status of the account

  • user_id (String)

    The platform's id of the social account

  • username (String, nil)

    The platform's username of the social account



# File 'lib/post_for_me/models/social_account.rb', line 79

Instance Attribute Details

#access_tokenString

The access token of the social account

Parameters:

  • value (String)

Returns:

  • (String)


17
# File 'lib/post_for_me/models/social_account.rb', line 17

required :access_token, String

#access_token_expires_atTime

The access token expiration date of the social account

Parameters:

  • value (Time)

Returns:

  • (Time)


23
# File 'lib/post_for_me/models/social_account.rb', line 23

required :access_token_expires_at, Time

#external_idString?

The external id of the social account

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


29
# File 'lib/post_for_me/models/social_account.rb', line 29

required :external_id, String, nil?: true

#idString

The unique identifier of the social account

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/post_for_me/models/social_account.rb', line 11

required :id, String

#metadataObject?

The metadata of the social account

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


35
# File 'lib/post_for_me/models/social_account.rb', line 35

required :metadata, PostForMe::Internal::Type::Unknown, nil?: true

#platformString

The platform of the social account

Parameters:

  • value (String)

Returns:

  • (String)


41
# File 'lib/post_for_me/models/social_account.rb', line 41

required :platform, String

#profile_photo_urlString?

The platform's profile photo of the social account

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


47
# File 'lib/post_for_me/models/social_account.rb', line 47

required :profile_photo_url, String, nil?: true

#refresh_tokenString?

The refresh token of the social account

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


53
# File 'lib/post_for_me/models/social_account.rb', line 53

required :refresh_token, String, nil?: true

#refresh_token_expires_atTime?

The refresh token expiration date of the social account

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


59
# File 'lib/post_for_me/models/social_account.rb', line 59

required :refresh_token_expires_at, Time, nil?: true

#statusSymbol, PostForMe::Models::SocialAccount::Status

Status of the account

Parameters:

  • value (PostForMe::Models::SocialAccount::status)

Returns:



65
# File 'lib/post_for_me/models/social_account.rb', line 65

required :status, enum: -> { PostForMe::SocialAccount::Status }

#user_idString

The platform's id of the social account

Parameters:

  • value (String)

Returns:

  • (String)


71
# File 'lib/post_for_me/models/social_account.rb', line 71

required :user_id, String

#usernameString?

The platform's username of the social account

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


77
# File 'lib/post_for_me/models/social_account.rb', line 77

required :username, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


59
# File 'sig/post_for_me/models/social_account.rbs', line 59

def to_hash: -> {