Class: SafetyKit::Models::Beta::EventCreateParams::Body::ProductChangedEventRequest::Product

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/safety_kit/models/beta/event_create_params.rb

Overview

See Also:

Defined Under Namespace

Classes: DiscountedPrice, Price

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(amount:, currency:) ⇒ Object

Current listed price of the product.

Parameters:

  • amount (String)

    Price amount as a decimal string.

  • currency (String)

    ISO 4217 currency code.



# File 'lib/safety_kit/models/beta/event_create_params.rb', line 928

Instance Attribute Details

#discounted_priceSafetyKit::Models::Beta::EventCreateParams::Body::ProductChangedEventRequest::Product::DiscountedPrice?

Discounted price of the product, when a discount applies.



918
919
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 918

optional :discounted_price,
-> { SafetyKit::Beta::EventCreateParams::Body::ProductChangedEventRequest::Product::DiscountedPrice }

#priceSafetyKit::Models::Beta::EventCreateParams::Body::ProductChangedEventRequest::Product::Price

Current listed price of the product.



911
912
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 911

required :price,
-> { SafetyKit::Beta::EventCreateParams::Body::ProductChangedEventRequest::Product::Price }

#shipping_infoHash{Symbol=>Object, nil}?

Shipping details for the product, such as cost, regions, and carrier.

Returns:

  • (Hash{Symbol=>Object, nil}, nil)


925
926
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 925

optional :shipping_info,
SafetyKit::Internal::Type::HashOf[SafetyKit::Internal::Type::Unknown, nil?: true]