Class: WhopSDK::Models::MediaAsset
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::MediaAsset
- Defined in:
- lib/whop_sdk/models/media_asset.rb,
sig/whop_sdk/models/media_asset.rbs
Overview
Defined Under Namespace
Modules: MediaType, Source, Status Classes: File, Generation
Instance Attribute Summary collapse
-
#amount_charged ⇒ Float?
USD amount charged to the account's balance for this generation.
-
#completed_at ⇒ String?
ISO 8601 timestamp when the asset reached a terminal state.
-
#created_at ⇒ String
ISO 8601 timestamp when the generation was requested.
-
#currency ⇒ String
Currency of
amount_charged. -
#error_message ⇒ String?
Why generation failed.
-
#file ⇒ WhopSDK::Models::MediaAsset::File?
The produced file, usable anywhere attachments are accepted.
-
#generation ⇒ WhopSDK::Models::MediaAsset::Generation
The inputs the asset was generated from.
-
#id ⇒ String
Media asset ID, prefixed
media_. -
#media_type ⇒ Symbol, WhopSDK::Models::MediaAsset::MediaType
The kind of media this asset holds.
-
#source ⇒ Symbol, WhopSDK::Models::MediaAsset::Source
How the asset was created.
-
#status ⇒ Symbol, WhopSDK::Models::MediaAsset::Status
Lifecycle state:
processingwhile generation runs,readywhen the file is available,failedwhen generation failed and the charge was refunded.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, url:) ⇒ Object
constructor
The produced file, usable anywhere attachments are accepted.
- #to_hash ⇒ {
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:, url:) ⇒ Object
The produced file, usable anywhere attachments are accepted. null until the
asset is ready.
|
|
# File 'lib/whop_sdk/models/media_asset.rb', line 77
|
Instance Attribute Details
#amount_charged ⇒ Float?
USD amount charged to the account's balance for this generation. null if the
generation wasn't billed.
18 |
# File 'lib/whop_sdk/models/media_asset.rb', line 18 required :amount_charged, Float, nil?: true |
#completed_at ⇒ String?
ISO 8601 timestamp when the asset reached a terminal state. null while
processing.
25 |
# File 'lib/whop_sdk/models/media_asset.rb', line 25 required :completed_at, String, nil?: true |
#created_at ⇒ String
ISO 8601 timestamp when the generation was requested.
31 |
# File 'lib/whop_sdk/models/media_asset.rb', line 31 required :created_at, String |
#currency ⇒ String
Currency of amount_charged. Always usd.
37 |
# File 'lib/whop_sdk/models/media_asset.rb', line 37 required :currency, String |
#error_message ⇒ String?
Why generation failed. null unless status is failed.
43 |
# File 'lib/whop_sdk/models/media_asset.rb', line 43 required :error_message, String, nil?: true |
#file ⇒ WhopSDK::Models::MediaAsset::File?
The produced file, usable anywhere attachments are accepted. null until the
asset is ready.
50 |
# File 'lib/whop_sdk/models/media_asset.rb', line 50 required :file, -> { WhopSDK::MediaAsset::File }, nil?: true |
#generation ⇒ WhopSDK::Models::MediaAsset::Generation
The inputs the asset was generated from.
56 |
# File 'lib/whop_sdk/models/media_asset.rb', line 56 required :generation, -> { WhopSDK::MediaAsset::Generation } |
#id ⇒ String
Media asset ID, prefixed media_.
11 |
# File 'lib/whop_sdk/models/media_asset.rb', line 11 required :id, String |
#media_type ⇒ Symbol, WhopSDK::Models::MediaAsset::MediaType
The kind of media this asset holds.
62 |
# File 'lib/whop_sdk/models/media_asset.rb', line 62 required :media_type, enum: -> { WhopSDK::MediaAsset::MediaType } |
#source ⇒ Symbol, WhopSDK::Models::MediaAsset::Source
How the asset was created. Always generated.
68 |
# File 'lib/whop_sdk/models/media_asset.rb', line 68 required :source, enum: -> { WhopSDK::MediaAsset::Source } |
#status ⇒ Symbol, WhopSDK::Models::MediaAsset::Status
Lifecycle state: processing while generation runs, ready when the file is
available, failed when generation failed and the charge was refunded.
75 |
# File 'lib/whop_sdk/models/media_asset.rb', line 75 required :status, enum: -> { WhopSDK::MediaAsset::Status } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/media_asset.rb', line 178
|
Instance Method Details
#to_hash ⇒ {
55 |
# File 'sig/whop_sdk/models/media_asset.rbs', line 55
def to_hash: -> {
|