Sha256: 8c0490314649d0b3cf6b331c741095b7da77746a06ed598ee2438609e685b53d

Contents?: true

Size: 761 Bytes

Versions: 12

Compression:

Stored size: 761 Bytes

Contents

module BunnyApp
  class Tenant
    @tenant_create_mutation = <<-'GRAPHQL'
    mutation tenantCreate ($attributes: TenantAttributes!, $subscriptionId: ID!) {
      tenantCreate (attributes: $attributes, subscriptionId: $subscriptionId) {
        tenant {
          code
          id
          name
          platform {
            id
            name
            code
          }
        }
        errors
      }
    }
    GRAPHQL

    def self.create(name:, code:, platform_code: 'main', subscription_id: nil)
      variables = {
        attributes: {
          name:,
          code:,
          platformCode: platform_code
        },
        subscriptionId: subscription_id
      }

      Client.new.query(@tenant_create_mutation, variables)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bunny_app-1.30.0 lib/bunny_app/tenant.rb
bunny_app-1.29.0 lib/bunny_app/tenant.rb
bunny_app-1.27.0 lib/bunny_app/tenant.rb
bunny_app-1.28.0 lib/bunny_app/tenant.rb
bunny_app-1.26.0 lib/bunny_app/tenant.rb
bunny_app-1.25.0 lib/bunny_app/tenant.rb
bunny_app-1.24.0 lib/bunny_app/tenant.rb
bunny_app-1.23.0 lib/bunny_app/tenant.rb
bunny_app-1.22.0 lib/bunny_app/tenant.rb
bunny_app-1.20.0 lib/bunny_app/tenant.rb
bunny_app-1.19.0 lib/bunny_app/tenant.rb
bunny_app-1.18.0 lib/bunny_app/tenant.rb