Class: SolidusGraphqlApi::Queries::Variant::DefaultPriceQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/solidus_graphql_api/queries/variant/default_price_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(variant:) ⇒ DefaultPriceQuery

Returns a new instance of DefaultPriceQuery.



9
10
11
# File 'lib/solidus_graphql_api/queries/variant/default_price_query.rb', line 9

def initialize(variant:)
  @variant = variant
end

Instance Attribute Details

#variantObject (readonly)

Returns the value of attribute variant.



7
8
9
# File 'lib/solidus_graphql_api/queries/variant/default_price_query.rb', line 7

def variant
  @variant
end

Instance Method Details

#callObject



13
14
15
# File 'lib/solidus_graphql_api/queries/variant/default_price_query.rb', line 13

def call
  variant.default_price
end