Class: Pago::V2026_04::Services::CustomerSessions

Inherits:
Service
  • Object
show all
Defined in:
lib/pago/v2026_04/services/customer_sessions.rb,
sig/pago/v2026_04/generated.rbs

Instance Attribute Summary

Attributes inherited from Service

#client

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Pago::Service

Instance Method Details

#create(body: {}) ⇒ Models::CustomerSession

Create a customer session.

For organizations with member_model_enabled, this will automatically create a member session for the owner member of the customer.

Scopes: customer_sessions:write

Parameters:

Returns:

Raises:



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/pago/v2026_04/services/customer_sessions.rb', line 18

def create(body: {})
  data = client.request(
    http_method: "POST",
    path: "/v1/customer-sessions/",
    path_params: {},
    query: {},
    body: body,
    response_type: :json,
    errors: { 422 => Errors::HTTPValidationError }
  )
  Models::CustomerSession.from_json(data)
end