Class: SolidusGraphqlApi::Mutations::Checkout::CompleteCheckout
- Inherits:
-
BaseMutation
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- SolidusGraphqlApi::Mutations::Checkout::CompleteCheckout
- Defined in:
- lib/solidus_graphql_api/mutations/checkout/complete_checkout.rb
Instance Method Summary collapse
Instance Method Details
#authorized? ⇒ Boolean
21 22 23 |
# File 'lib/solidus_graphql_api/mutations/checkout/complete_checkout.rb', line 21 def current_order.can_complete? end |
#ready? ⇒ Boolean
25 26 27 |
# File 'lib/solidus_graphql_api/mutations/checkout/complete_checkout.rb', line 25 def ready?(*) current_ability.(:update, current_order, guest_token) end |
#resolve ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/solidus_graphql_api/mutations/checkout/complete_checkout.rb', line 12 def resolve current_order.complete { order: current_order.reload, errors: user_errors("order", current_order.errors) } end |