Class: Dodopayments::Models::ProductEntitlementSummary

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/product_entitlement_summary.rb,
sig/dodopayments/models/product_entitlement_summary.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(id:, integration_config:, integration_type:, name:, description: nil) ⇒ Object

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

Summary of an entitlement attached to a product.

integration_config uses [IntegrationConfigResponse] (NOT the persisted [IntegrationConfig]) so digital_files entitlements embed the resolved digital_files object — matching what GET /entitlements/{id} returns. All other variants pass through unchanged via #[serde(untagged)].



# File 'lib/dodopayments/models/product_entitlement_summary.rb', line 35

Instance Attribute Details

#descriptionString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/dodopayments/models/product_entitlement_summary.rb', line 33

optional :description, String, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#integration_configDodopayments::Models::IntegrationConfigResponse::FeatureFlagConfig, ...

Integration-specific configuration on an entitlement read response.

For digital_files entitlements the response includes presigned download URLs for each attached file; other integrations match the shape supplied at creation.



18
# File 'lib/dodopayments/models/product_entitlement_summary.rb', line 18

required :integration_config, union: -> { Dodopayments::IntegrationConfigResponse }

#integration_typeSymbol, Dodopayments::Models::EntitlementIntegrationType

Parameters:

  • value (Dodopayments::Models::entitlement_integration_type)

Returns:



23
# File 'lib/dodopayments/models/product_entitlement_summary.rb', line 23

required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType }

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/dodopayments/models/product_entitlement_summary.rb', line 28

required :name, String

Instance Method Details

#to_hash{

Returns:

  • ({)


31
# File 'sig/dodopayments/models/product_entitlement_summary.rbs', line 31

def to_hash: -> {