Class: PostForMe::Models::SocialPostPreview

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

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(caption:, platform:, social_account_id:, configuration: nil, media: nil, social_account_profile_picture_url: nil, social_account_username: nil) ⇒ Object

Parameters:

  • caption (String)

    Caption text for the post

  • platform (String)

    Platform of the post

  • social_account_id (String)

    Id of the social account

  • configuration (Object) (defaults to: nil)

    Additional configuration for this platform

  • media (Array<PostForMe::Models::SocialPostMedia>, nil) (defaults to: nil)

    Array of media URLs associated with the post

  • social_account_profile_picture_url (Object) (defaults to: nil)

    Url of the social account profile picture

  • social_account_username (Object) (defaults to: nil)

    Username of the social account



# File 'lib/post_for_me/models/social_post_preview.rb', line 48

Instance Attribute Details

#captionString

Caption text for the post

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/post_for_me/models/social_post_preview.rb', line 10

required :caption, String

#configurationObject?

Additional configuration for this platform

Parameters:

  • (top)

Returns:

  • (Object, nil)


28
# File 'lib/post_for_me/models/social_post_preview.rb', line 28

optional :configuration, PostForMe::Internal::Type::Unknown

#mediaArray<PostForMe::Models::SocialPostMedia>?

Array of media URLs associated with the post

Parameters:

Returns:



34
# File 'lib/post_for_me/models/social_post_preview.rb', line 34

optional :media, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPostMedia] }, nil?: true

#platformString

Platform of the post

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/post_for_me/models/social_post_preview.rb', line 16

required :platform, String

#social_account_idString

Id of the social account

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/post_for_me/models/social_post_preview.rb', line 22

required :social_account_id, String

#social_account_profile_picture_urlObject?

Url of the social account profile picture

Parameters:

  • (top)

Returns:

  • (Object, nil)


40
# File 'lib/post_for_me/models/social_post_preview.rb', line 40

optional :social_account_profile_picture_url, PostForMe::Internal::Type::Unknown

#social_account_usernameObject?

Username of the social account

Parameters:

  • (top)

Returns:

  • (Object, nil)


46
# File 'lib/post_for_me/models/social_post_preview.rb', line 46

optional :social_account_username, PostForMe::Internal::Type::Unknown

Instance Method Details

#to_hash{

Returns:

  • ({)


45
# File 'sig/post_for_me/models/social_post_preview.rbs', line 45

def to_hash: -> {