Class: Dodopayments::Models::RefundCreateParams::Item

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/refund_create_params.rb,
sig/dodopayments/models/refund_create_params.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(item_id:, amount: nil, tax_inclusive: nil) ⇒ Object

Parameters:

  • item_id (String)

    The id of the item (i.e. product_id or addon_id)

  • amount (Integer, nil) (defaults to: nil)

    The amount to refund. if None the whole item is refunded

  • tax_inclusive (Boolean) (defaults to: nil)

    Specify if tax is inclusive of the refund. Default true.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/dodopayments/models/refund_create_params.rb', line 47

class Item < Dodopayments::Internal::Type::BaseModel
  # @!attribute item_id
  #   The id of the item (i.e. `product_id` or `addon_id`)
  #
  #   @return [String]
  required :item_id, String

  # @!attribute amount
  #   The amount to refund. if None the whole item is refunded
  #
  #   @return [Integer, nil]
  optional :amount, Integer, nil?: true

  # @!attribute tax_inclusive
  #   Specify if tax is inclusive of the refund. Default true.
  #
  #   @return [Boolean, nil]
  optional :tax_inclusive, Dodopayments::Internal::Type::Boolean

  # @!method initialize(item_id:, amount: nil, tax_inclusive: nil)
  #   @param item_id [String] The id of the item (i.e. `product_id` or `addon_id`)
  #
  #   @param amount [Integer, nil] The amount to refund. if None the whole item is refunded
  #
  #   @param tax_inclusive [Boolean] Specify if tax is inclusive of the refund. Default true.
end

Instance Attribute Details

#amountInteger?

The amount to refund. if None the whole item is refunded

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


58
# File 'lib/dodopayments/models/refund_create_params.rb', line 58

optional :amount, Integer, nil?: true

#item_idString

The id of the item (i.e. product_id or addon_id)

Parameters:

  • value (String)

Returns:

  • (String)


52
# File 'lib/dodopayments/models/refund_create_params.rb', line 52

required :item_id, String

#tax_inclusiveBoolean?

Specify if tax is inclusive of the refund. Default true.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


64
# File 'lib/dodopayments/models/refund_create_params.rb', line 64

optional :tax_inclusive, Dodopayments::Internal::Type::Boolean

Instance Method Details

#to_hash{

Returns:

  • ({)


61
# File 'sig/dodopayments/models/refund_create_params.rbs', line 61

def to_hash: -> {