Class: XTwitterScraper::Models::GuestWalletCreateResponse

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

Overview

See Also:

  • XTwitterScraper::Resources::GuestWallets#create

Defined Under Namespace

Modules: 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:, api_key:, authorization:, checkout_url:, credits:, expires_at:, purchase_id:, status:, wallet_id:, account_required: false, credential_notice: :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.", 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::GuestWalletCreateResponse for more details.

Initial guest wallet response containing the one-time key.

Parameters:

  • amount (XTwitterScraper::Models::GuestWalletAmount)

    Confirmed USD amount for a guest wallet purchase.

  • api_key (String)

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

  • authorization (XTwitterScraper::Models::GuestWalletCreateResponse::Authorization)
  • 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::GuestWalletCreateResponse::Status)
  • wallet_id (String)
  • account_required (Boolean, false) (defaults to: false)
  • credential_notice (Symbol, :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.") (defaults to: :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.")
  • 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_create_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_create_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_create_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:

  • value (String)

Returns:

  • (String)


27
# File 'lib/x_twitter_scraper/models/guest_wallet_create_response.rb', line 27

required :api_key, String

#authorizationXTwitterScraper::Models::GuestWalletCreateResponse::Authorization



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

required :authorization, -> { XTwitterScraper::Models::GuestWalletCreateResponse::Authorization }

#checkout_urlString

Raw Stripe-hosted checkout URL for user interaction.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :checkout_url, String

#credential_noticeSymbol, :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available."

Parameters:

  • value (:"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.")

Returns:

  • (Symbol, :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.")


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

required :credential_notice,
const: :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available."

#creditsString

Credits granted after verified payment.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :credits, String

#expires_atTime

Time when the pending checkout expires.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

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:



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

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)


68
# File 'lib/x_twitter_scraper/models/guest_wallet_create_response.rb', line 68

required :poll_after_seconds, const: 2

#purchase_idString

Parameters:

  • value (String)

Returns:

  • (String)


73
# File 'lib/x_twitter_scraper/models/guest_wallet_create_response.rb', line 73

required :purchase_id, String

#requires_user_interactionBoolean, true

Parameters:

  • value (true)

Returns:

  • (Boolean, true)


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

required :requires_user_interaction, const: true

#statusSymbol, XTwitterScraper::Models::GuestWalletCreateResponse::Status

Parameters:

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

Returns:



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

required :status, enum: -> { XTwitterScraper::Models::GuestWalletCreateResponse::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")


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

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

#wallet_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :wallet_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/x_twitter_scraper/models/guest_wallet_create_response.rb', line 163

Instance Method Details

#to_hash{

Returns:

  • ({)


75
# File 'sig/x_twitter_scraper/models/guest_wallet_create_response.rbs', line 75

def to_hash: -> {