Class: Pago::V2026_04::Services::Oauth2::Clients::Oauth2
- Defined in:
- lib/pago/v2026_04/services/oauth2.rb,
sig/pago/v2026_04/generated.rbs
Instance Attribute Summary
Attributes inherited from Service
Instance Method Summary collapse
-
#create_client(body: {}) ⇒ Object
Create an OAuth2 client.
-
#delete_client(client_id) ⇒ nil
Delete an OAuth2 client.
-
#get_client(client_id) ⇒ Object
Get an OAuth2 client by Client ID.
-
#update_client(client_id_path, body: {}) ⇒ Object
Update an OAuth2 client.
Methods inherited from Service
Constructor Details
This class inherits a constructor from Pago::Service
Instance Method Details
#create_client(body: {}) ⇒ Object
Create an OAuth2 client.
99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/pago/v2026_04/services/oauth2.rb', line 99 def create_client(body: {}) data = client.request( http_method: "POST", path: "/v1/oauth2/register", path_params: {}, query: {}, body: body, response_type: :json, errors: { 422 => Errors::HTTPValidationError } ) data end |
#delete_client(client_id) ⇒ nil
Delete an OAuth2 client.
156 157 158 159 160 161 162 163 164 165 |
# File 'lib/pago/v2026_04/services/oauth2.rb', line 156 def delete_client(client_id) client.request( http_method: "DELETE", path: "/v1/oauth2/register/{client_id}", path_params: { "client_id" => client_id }, query: {}, response_type: :none, errors: { 422 => Errors::HTTPValidationError } ) end |
#get_client(client_id) ⇒ Object
Get an OAuth2 client by Client ID.
118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/pago/v2026_04/services/oauth2.rb', line 118 def get_client(client_id) data = client.request( http_method: "GET", path: "/v1/oauth2/register/{client_id}", path_params: { "client_id" => client_id }, query: {}, response_type: :json, errors: { 422 => Errors::HTTPValidationError } ) data end |
#update_client(client_id_path, body: {}) ⇒ Object
Update an OAuth2 client.
137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/pago/v2026_04/services/oauth2.rb', line 137 def update_client(client_id_path, body: {}) data = client.request( http_method: "PUT", path: "/v1/oauth2/register/{client_id}", path_params: { "client_id" => client_id_path }, query: {}, body: body, response_type: :json, errors: { 422 => Errors::HTTPValidationError } ) data end |