Class: Privy::Models::AdvancedSwapPlatformFee

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/advanced_swap_platform_fee.rb,
sig/privy/models/advanced_swap_platform_fee.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(token:, amount:, bps:) ⇒ AdvancedSwapPlatformFee

Platform fee collected on a swap.

Parameters:

  • token (String)

    Token the fee was taken from (output token in v1).

  • amount (String)

    Fee amount in the smallest unit of the fee token.

  • bps (Integer)

    Fee in basis points.

  • token: (String)
  • amount: (String)
  • bps: (Integer)


# File 'lib/privy/models/advanced_swap_platform_fee.rb', line 24

Instance Attribute Details

#amountString

Fee amount in the smallest unit of the fee token.

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/privy/models/advanced_swap_platform_fee.rb', line 16

required :amount, String

#bpsInteger

Fee in basis points.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


22
# File 'lib/privy/models/advanced_swap_platform_fee.rb', line 22

required :bps, Integer

#tokenString

Token the fee was taken from (output token in v1).

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/privy/models/advanced_swap_platform_fee.rb', line 10

required :token, String

Instance Method Details

#to_hash{ token: String, amount: String, bps: Integer }

Returns:

  • ({ token: String, amount: String, bps: Integer })


15
# File 'sig/privy/models/advanced_swap_platform_fee.rbs', line 15

def to_hash: -> { token: String, amount: String, bps: Integer }