Class: Dodopayments::Models::AddonResponse

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

Overview

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: , business_id: , created_at: , currency: , name: , price: , tax_category: , updated_at: , description: nil, image: nil) ⇒ Object

Parameters:

  • id (String) (defaults to: )

    id of the Addon

  • business_id (String) (defaults to: )

    Unique identifier for the business to which the addon belongs.

  • created_at (Time) (defaults to: )

    Created time

  • currency (Symbol, Dodopayments::Models::Currency) (defaults to: )

    Currency of the Addon

  • name (String) (defaults to: )

    Name of the Addon

  • price (Integer) (defaults to: )

    Amount of the addon

  • tax_category (Symbol, Dodopayments::Models::TaxCategory) (defaults to: )

    Tax category applied to this Addon

  • updated_at (Time) (defaults to: )

    Updated time

  • description (String, nil) (defaults to: nil)

    Optional description of the Addon

  • image (String, nil) (defaults to: nil)

    Image of the Addon



# File 'lib/dodopayments/models/addon_response.rb', line 67

Instance Attribute Details

#business_idString

Unique identifier for the business to which the addon belongs.

Returns:

  • (String)


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

required :business_id, String

#created_atTime

Created time

Returns:

  • (Time)


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

required :created_at, Time

#currencySymbol, Dodopayments::Models::Currency

Currency of the Addon

Returns:



29
# File 'lib/dodopayments/models/addon_response.rb', line 29

required :currency, enum: -> { Dodopayments::Currency }

#descriptionString?

Optional description of the Addon

Returns:

  • (String, nil)


59
# File 'lib/dodopayments/models/addon_response.rb', line 59

optional :description, String, nil?: true

#idString

id of the Addon

Returns:

  • (String)


11
# File 'lib/dodopayments/models/addon_response.rb', line 11

required :id, String

#imageString?

Image of the Addon

Returns:

  • (String, nil)


65
# File 'lib/dodopayments/models/addon_response.rb', line 65

optional :image, String, nil?: true

#nameString

Name of the Addon

Returns:

  • (String)


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

required :name, String

#priceInteger

Amount of the addon

Returns:

  • (Integer)


41
# File 'lib/dodopayments/models/addon_response.rb', line 41

required :price, Integer

#tax_categorySymbol, Dodopayments::Models::TaxCategory

Tax category applied to this Addon



47
# File 'lib/dodopayments/models/addon_response.rb', line 47

required :tax_category, enum: -> { Dodopayments::TaxCategory }

#updated_atTime

Updated time

Returns:

  • (Time)


53
# File 'lib/dodopayments/models/addon_response.rb', line 53

required :updated_at, Time