Class: BunnyApp::Tenant
- Inherits:
-
Object
- Object
- BunnyApp::Tenant
- Defined in:
- lib/bunny_app/tenant.rb
Class Method Summary collapse
Class Method Details
.create(name:, code:, account_id:, platform_code: 'main') ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/bunny_app/tenant.rb', line 37 def self.create(name:, code:, account_id:, platform_code: 'main') variables = { attributes: { name:, code:, platformCode: platform_code, accountId: account_id } } res = Client.new.query(@tenant_create_mutation, variables) raise ResponseError, res['data']['tenantCreate']['errors'].join(',') if res['data']['tenantCreate']['errors'] res['data']['tenantCreate']['tenant'] end |