Class: Osso::GraphQL::Mutations::DeleteEnterpriseAccount
- Inherits:
-
BaseMutation
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Osso::GraphQL::Mutations::DeleteEnterpriseAccount
show all
- Defined in:
- lib/osso/graphql/mutations/delete_enterprise_account.rb
Instance Method Summary
collapse
#account_domain, #admin_ready?, #domain_ready?, #field_errors, #internal_ready?, #provider_domain, #ready?, #response_data, #response_error
Instance Method Details
#domain(**args) ⇒ Object
26
27
28
|
# File 'lib/osso/graphql/mutations/delete_enterprise_account.rb', line 26
def domain(**args)
enterprise_account(**args).domain
end
|
#enterprise_account(id:, **_args) ⇒ Object
14
15
16
|
# File 'lib/osso/graphql/mutations/delete_enterprise_account.rb', line 14
def enterprise_account(id:, **_args)
@enterprise_account ||= Osso::Models::EnterpriseAccount.find(id)
end
|
#resolve(**args) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/osso/graphql/mutations/delete_enterprise_account.rb', line 18
def resolve(**args)
customer = enterprise_account(**args)
return response_data(enterprise_account: nil) if customer.destroy
response_error(customer.errors)
end
|