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

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_create_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_create_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_create_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:

  • value (String)

Returns:

  • (String)


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

required :api_key, String

#authorizationXTwitterScraper::Models::GuestWalletCreateResponse::Authorization



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

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

#checkout_urlString

Raw Stripe-hosted checkout URL for user interaction.

Parameters:

  • value (String)

Returns:

  • (String)


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

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


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

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)


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

required :credits, String

#expires_atTime

Time when the pending checkout expires.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

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:



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

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)


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

required :poll_after_seconds, const: 2

#purchase_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :purchase_id, String

#requires_user_interactionBoolean, true

Parameters:

  • value (true)

Returns:

  • (Boolean, true)


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

required :requires_user_interaction, const: true

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

Parameters:

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

Returns:



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

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


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

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

#wallet_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :wallet_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {