Class: Dodopayments::Models::ProductItemReq::CreditEntitlement

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/product_item_req.rb

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(credit_entitlement_id:, credits_amount:) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::ProductItemReq::CreditEntitlement for more details.

Per-checkout-session override for a single credit entitlement attached to a product.

Parameters:

  • credit_entitlement_id (String)

    ID of the credit entitlement to override. Must already be attached to the produc

  • credits_amount (String)

    Number of credits to grant for this checkout session, overriding the



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/dodopayments/models/product_item_req.rb', line 60

class CreditEntitlement < Dodopayments::Internal::Type::BaseModel
  # @!attribute credit_entitlement_id
  #   ID of the credit entitlement to override. Must already be attached to the
  #   product.
  #
  #   @return [String]
  required :credit_entitlement_id, String

  # @!attribute credits_amount
  #   Number of credits to grant for this checkout session, overriding the
  #   product-level `credits_amount` set on the credit entitlement mapping. Must be
  #   greater than zero.
  #
  #   @return [String]
  required :credits_amount, String

  # @!method initialize(credit_entitlement_id:, credits_amount:)
  #   Some parameter documentations has been truncated, see
  #   {Dodopayments::Models::ProductItemReq::CreditEntitlement} for more details.
  #
  #   Per-checkout-session override for a single credit entitlement attached to a
  #   product.
  #
  #   @param credit_entitlement_id [String] ID of the credit entitlement to override. Must already be attached to the produc
  #
  #   @param credits_amount [String] Number of credits to grant for this checkout session, overriding the
end

Instance Attribute Details

#credit_entitlement_idString

ID of the credit entitlement to override. Must already be attached to the product.

Returns:

  • (String)


66
# File 'lib/dodopayments/models/product_item_req.rb', line 66

required :credit_entitlement_id, String

#credits_amountString

Number of credits to grant for this checkout session, overriding the product-level ‘credits_amount` set on the credit entitlement mapping. Must be greater than zero.

Returns:

  • (String)


74
# File 'lib/dodopayments/models/product_item_req.rb', line 74

required :credits_amount, String