Class: XTwitterScraper::Models::GuestWalletRetrieveStatusResponse

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

Overview

See Also:

  • XTwitterScraper::Resources::GuestWallets#retrieve_status

Defined Under Namespace

Modules: PollAfterSeconds, Status Classes: LatestPurchase, TopUp

Instance Attribute Summary collapse

Class Method 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(balance:, latest_purchase:, poll_after_seconds:, status:, top_up:, usable:, wallet_id:, scope: :paid_reads) ⇒ Object

Some parameter documentations has been truncated, see XTwitterScraper::Models::GuestWalletRetrieveStatusResponse for more details.

Current balance, usability, and latest guest purchase state.

Parameters:



# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 57

Instance Attribute Details

#balanceString

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 10

required :balance, String

#latest_purchaseXTwitterScraper::Models::GuestWalletRetrieveStatusResponse::LatestPurchase?

Latest guest wallet purchase fulfillment state.



16
17
18
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 16

required :latest_purchase,
-> { XTwitterScraper::Models::GuestWalletRetrieveStatusResponse::LatestPurchase },
nil?: true

#poll_after_secondsInteger, ...

Polling delay while payment is pending. Null means stop.

Parameters:

  • value (XTwitterScraper::Models::GuestWalletRetrieveStatusResponse::poll_after_seconds, nil)

Returns:



24
25
26
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 24

required :poll_after_seconds,
enum: -> { XTwitterScraper::Models::GuestWalletRetrieveStatusResponse::PollAfterSeconds },
nil?: true

#scopeSymbol, :paid_reads

Parameters:

  • value (:paid_reads)

Returns:

  • (Symbol, :paid_reads)


31
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 31

required :scope, const: :paid_reads

#statusSymbol, XTwitterScraper::Models::GuestWalletRetrieveStatusResponse::Status

Combined wallet and pending-checkout state. A pending top-up can coexist with usable true. Terminal expired or failed states require a new guest wallet.

Parameters:

  • value (XTwitterScraper::Models::GuestWalletRetrieveStatusResponse::status)

Returns:



38
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 38

required :status, enum: -> { XTwitterScraper::Models::GuestWalletRetrieveStatusResponse::Status }

#top_upXTwitterScraper::Models::GuestWalletRetrieveStatusResponse::TopUp?

Top-up action when usable and no checkout is pending.



44
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 44

required :top_up, -> { XTwitterScraper::Models::GuestWalletRetrieveStatusResponse::TopUp }, nil?: true

#usableBoolean

Authoritative paid-read readiness. Use instead of status.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


50
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 50

required :usable, XTwitterScraper::Internal::Type::Boolean

#wallet_idString

Parameters:

  • value (String)

Returns:

  • (String)


55
# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 55

required :wallet_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rb', line 141

Instance Method Details

#to_hash{

Returns:

  • ({)


43
# File 'sig/x_twitter_scraper/models/guest_wallet_retrieve_status_response.rbs', line 43

def to_hash: -> {