Class: Dodopayments::Models::AttachAddon

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/attach_addon.rb,
sig/dodopayments/models/attach_addon.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(addon_id:, quantity:) ⇒ AttachAddon

Returns a new instance of AttachAddon.

Parameters:

  • addon_id (String)
  • quantity (Integer)

    Number of units of this addon.

  • addon_id: (String)
  • quantity: (Integer)


# File 'lib/dodopayments/models/attach_addon.rb', line 17

Instance Attribute Details

#addon_idString

Parameters:

  • value (String)

Returns:

  • (String)


9
# File 'lib/dodopayments/models/attach_addon.rb', line 9

required :addon_id, String

#quantityInteger

Number of units of this addon.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


15
# File 'lib/dodopayments/models/attach_addon.rb', line 15

required :quantity, Integer

Instance Method Details

#to_hash{ addon_id: String, quantity: Integer }

Returns:

  • ({ addon_id: String, quantity: Integer })


12
# File 'sig/dodopayments/models/attach_addon.rbs', line 12

def to_hash: -> { addon_id: String, quantity: Integer }