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(amount:, checkout_url:, credits:, expires_at:, purchase_id:, status:, wallet_id:, api_key: nil, authorization: nil, credential_notice: nil, account_required: false, instructions: :"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_seconds: 2, requires_user_interaction: true, status_url: :"https://xquik.com/api/v1/guest-wallets/status") ⇒ Object

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

Pending Stripe checkout and guest wallet purchase details.

Parameters:

  • amount (XTwitterScraper::Models::GuestWalletAmount)

    Confirmed USD amount for a guest wallet purchase.

  • checkout_url (String)

    Raw Stripe-hosted checkout URL for user interaction.

  • credits (String)

    Credits granted after verified payment.

  • expires_at (Time)

    Time when the pending checkout expires.

  • purchase_id (String)
  • status (Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Status)
  • wallet_id (String)
  • api_key (String) (defaults to: nil)

    Paid-read bearer credential returned only by initial creation. Store it as a sec

  • authorization (XTwitterScraper::Models::GuestWalletTopupResponse::Authorization) (defaults to: nil)
  • credential_notice (Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::CredentialNotice) (defaults to: nil)
  • account_required (Boolean, false) (defaults to: false)
  • instructions (Symbol, :"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.") (defaults to: :"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_seconds (Integer, 2) (defaults to: 2)

    Wait at least this long before polling status_url.

  • requires_user_interaction (Boolean, true) (defaults to: true)
  • status_url (Symbol, :"https://xquik.com/api/v1/guest-wallets/status") (defaults to: :"https://xquik.com/api/v1/guest-wallets/status")


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

Instance Attribute Details

#account_requiredBoolean, false

Parameters:

  • value (false)

Returns:

  • (Boolean, false)


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

required :account_required, const: false

#amountXTwitterScraper::Models::GuestWalletAmount

Confirmed USD amount for a guest wallet purchase.



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

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)


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

optional :api_key, String

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



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

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

#checkout_urlString

Raw Stripe-hosted checkout URL for user interaction.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :checkout_url, String

#credential_noticeSymbol, ...



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

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

#creditsString

Credits granted after verified payment.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :credits, String

#expires_atTime

Time when the pending checkout expires.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

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:



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

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)


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

required :poll_after_seconds, const: 2

#purchase_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :purchase_id, String

#requires_user_interactionBoolean, true

Parameters:

  • value (true)

Returns:

  • (Boolean, true)


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

required :requires_user_interaction, const: true

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

Parameters:

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

Returns:



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

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")


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

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

#wallet_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :wallet_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {