Class: XTwitterScraper::Models::GuestWalletTopupResponse

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

Overview

See Also:

  • XTwitterScraper::Resources::GuestWallets#topup

Defined Under Namespace

Modules: CredentialNotice, Status Classes: Authorization

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(header: :Authorization, scheme: :Bearer) ⇒ Object

Parameters:

  • header (Symbol, :Authorization) (defaults to: :Authorization)
  • scheme (Symbol, :Bearer) (defaults to: :Bearer)


# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 91

Instance Attribute Details

#account_requiredBoolean, false

Parameters:

  • value (false)

Returns:

  • (Boolean, false)


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

required :account_required, const: false

#amountXTwitterScraper::Models::GuestWalletAmount

Confirmed USD amount for a guest wallet purchase.



16
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 16

required :amount, -> { XTwitterScraper::GuestWalletAmount }

#api_keyString?

Paid-read bearer credential returned only by initial creation. Store it as a secret. Never place it in a URL or log.

Parameters:

  • (String)

Returns:

  • (String, nil)


78
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 78

optional :api_key, String

#authorizationXTwitterScraper::Models::GuestWalletTopupResponse::Authorization?



83
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 83

optional :authorization, -> { XTwitterScraper::Models::GuestWalletTopupResponse::Authorization }

#checkout_urlString

Raw Stripe-hosted checkout URL for user interaction.

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 22

required :checkout_url, String

#credential_noticeSymbol, ...



88
89
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 88

optional :credential_notice,
enum: -> { XTwitterScraper::Models::GuestWalletTopupResponse::CredentialNotice }

#creditsString

Credits granted after verified payment.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 28

required :credits, String

#expires_atTime

Time when the pending checkout expires.

Parameters:

  • value (Time)

Returns:

  • (Time)


34
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 34

required :expires_at, Time

#instructionsSymbol, :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."

Parameters:

Returns:



39
40
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 39

required :instructions,
const: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending."

#poll_after_secondsInteger, 2

Wait at least this long before polling status_url.

Parameters:

  • value (2)

Returns:

  • (Integer, 2)


46
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 46

required :poll_after_seconds, const: 2

#purchase_idString

Parameters:

  • value (String)

Returns:

  • (String)


51
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 51

required :purchase_id, String

#requires_user_interactionBoolean, true

Parameters:

  • value (true)

Returns:

  • (Boolean, true)


56
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 56

required :requires_user_interaction, const: true

#statusSymbol, XTwitterScraper::Models::GuestWalletTopupResponse::Status

Parameters:

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

Returns:



61
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 61

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

#status_urlSymbol, :"https://xquik.com/api/v1/guest-wallets/status"

Parameters:

  • value (:"https://xquik.com/api/v1/guest-wallets/status")

Returns:

  • (Symbol, :"https://xquik.com/api/v1/guest-wallets/status")


66
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 66

required :status_url, const: :"https://xquik.com/api/v1/guest-wallets/status"

#wallet_idString

Parameters:

  • value (String)

Returns:

  • (String)


71
# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 71

required :wallet_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/x_twitter_scraper/models/guest_wallet_topup_response.rb', line 139

Instance Method Details

#to_hash{

Returns:

  • ({)


81
# File 'sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs', line 81

def to_hash: -> {