Class: XTwitterScraper::Models::GuestWalletAmount

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

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(amount_minor:, currency: :usd) ⇒ GuestWalletAmount

Confirmed USD amount for a guest wallet purchase.

Parameters:

  • amount_minor (Integer)

    USD amount in cents. Accepted range is $10-$250.

  • currency (Symbol, :usd) (defaults to: :usd)
  • amount_minor: (Integer)
  • currency: (:usd) (defaults to: :usd)


# File 'lib/x_twitter_scraper/models/guest_wallet_amount.rb', line 17

Instance Attribute Details

#amount_minorInteger

USD amount in cents. Accepted range is $10-$250.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


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

required :amount_minor, Integer

#currencySymbol, :usd

Parameters:

  • value (:usd)

Returns:

  • (Symbol, :usd)


15
# File 'lib/x_twitter_scraper/models/guest_wallet_amount.rb', line 15

required :currency, const: :usd

Instance Method Details

#to_hash{ amount_minor: Integer, currency: :usd }

Returns:

  • ({ amount_minor: Integer, currency: :usd })


12
# File 'sig/x_twitter_scraper/models/guest_wallet_amount.rbs', line 12

def to_hash: -> { amount_minor: Integer, currency: :usd }