class Stytch::M2M::Clients

def update(

The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +M2MClient+ (+object+).
The M2M Client affected by this operation.
m2m_client::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is nilable +object+.
The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
trusted_metadata::
The type of this field is nilable list of +String+.
An array of scopes assigned to the client.
scopes::
The type of this field is nilable +UpdateRequestStatus+ (string enum).
The status of the client - either `active` or `inactive`.
status::
The type of this field is nilable +String+.
A human-readable description for the client.
client_description::
The type of this field is nilable +String+.
A human-readable name for the client.
client_name::
The type of this field is +String+.
The ID of the client.
client_id::
== Parameters:

To protect more-sensitive routes, pass a lower `max_token_age` value when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token).
**Important:** Deactivating a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones.

Updates an existing M2M Client. You can use this endpoint to activate or deactivate a M2M Client by changing its `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated.
def update(
  client_id:,
  client_name: nil,
  client_description: nil,
  status: nil,
  scopes: nil,
  trusted_metadata: nil
)
  headers = {}
  request = {}
  request[:client_name] = client_name unless client_name.nil?
  request[:client_description] = client_description unless client_description.nil?
  request[:status] = status unless status.nil?
  request[:scopes] = scopes unless scopes.nil?
  request[:trusted_metadata] = trusted_metadata unless trusted_metadata.nil?
  put_request("/v1/m2m/clients/#{client_id}", request, headers)
end