Class: Pago::V2026_04::Services::CustomerSeats

Inherits:
Service
  • Object
show all
Defined in:
lib/pago/v2026_04/services/customer_seats.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

#assign_seat(body: {}) ⇒ Models::CustomerSeat

Scopes: customer_seats:write

Parameters:

  • body (Hash, Models::SeatAssign) (defaults to: {})

    the request body.

  • body: (Object) (defaults to: {})

Returns:

Raises:



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/pago/v2026_04/services/customer_seats.rb', line 39

def assign_seat(body: {})
  data = client.request(
    http_method: "POST",
    path: "/v1/customer-seats",
    path_params: {},
    query: {},
    body: body,
    response_type: :json,
    errors: { 400 => Errors::AssignSeat400Error, 401 => Errors::AssignSeat401Error, 403 => Errors::AssignSeat403Error, 404 => Errors::AssignSeat404Error, 422 => Errors::HTTPValidationError }
  )
  Models::CustomerSeat.from_json(data)
end

#claim_seat(body: {}) ⇒ Models::CustomerSeatClaimResponse

Parameters:

  • body (Hash, Models::SeatClaim) (defaults to: {})

    the request body.

  • body: (Object) (defaults to: {})

Returns:

Raises:



120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/pago/v2026_04/services/customer_seats.rb', line 120

def claim_seat(body: {})
  data = client.request(
    http_method: "POST",
    path: "/v1/customer-seats/claim",
    path_params: {},
    query: {},
    body: body,
    response_type: :json,
    errors: { 400 => Errors::ClaimSeat400Error, 403 => Errors::ClaimSeat403Error, 422 => Errors::HTTPValidationError }
  )
  Models::CustomerSeatClaimResponse.from_json(data)
end

#get_claim_info(invitation_token) ⇒ Models::SeatClaimInfo

Parameters:

  • invitation_token (String)

Returns:

Raises:



102
103
104
105
106
107
108
109
110
111
112
# File 'lib/pago/v2026_04/services/customer_seats.rb', line 102

def get_claim_info(invitation_token)
  data = client.request(
    http_method: "GET",
    path: "/v1/customer-seats/claim/{invitation_token}",
    path_params: { "invitation_token" => invitation_token },
    query: {},
    response_type: :json,
    errors: { 400 => Errors::GetClaimInfo400Error, 403 => Errors::GetClaimInfo403Error, 404 => Errors::GetClaimInfo404Error, 422 => Errors::HTTPValidationError }
  )
  Models::SeatClaimInfo.from_json(data)
end

#list_seats(subscription_id: nil, order_id: nil) ⇒ Models::SeatsList

Scopes: customer_seats:read

Parameters:

  • subscription_id (String, nil) (defaults to: nil)
  • order_id (String, nil) (defaults to: nil)
  • subscription_id: (String, nil) (defaults to: nil)
  • order_id: (String, nil) (defaults to: nil)

Returns:

Raises:



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

def list_seats(subscription_id: nil, order_id: nil)
  data = client.request(
    http_method: "GET",
    path: "/v1/customer-seats",
    path_params: {},
    query: { "subscription_id" => subscription_id, "order_id" => order_id },
    response_type: :json,
    errors: { 401 => Errors::ListSeats401Error, 403 => Errors::ListSeats403Error, 404 => Errors::ListSeats404Error, 422 => Errors::HTTPValidationError }
  )
  Models::SeatsList.from_json(data)
end

#resend_invitation(seat_id) ⇒ Models::CustomerSeat

Scopes: customer_seats:write

Parameters:

  • seat_id (String)

Returns:

Raises:



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/pago/v2026_04/services/customer_seats.rb', line 83

def resend_invitation(seat_id)
  data = client.request(
    http_method: "POST",
    path: "/v1/customer-seats/{seat_id}/resend",
    path_params: { "seat_id" => seat_id },
    query: {},
    response_type: :json,
    errors: { 400 => Errors::ResendInvitation400Error, 401 => Errors::ResendInvitation401Error, 403 => Errors::ResendInvitation403Error, 404 => Errors::ResendInvitation404Error, 422 => Errors::HTTPValidationError }
  )
  Models::CustomerSeat.from_json(data)
end

#revoke_seat(seat_id) ⇒ Models::CustomerSeat

Scopes: customer_seats:write

Parameters:

  • seat_id (String)

Returns:

Raises:



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/pago/v2026_04/services/customer_seats.rb', line 61

def revoke_seat(seat_id)
  data = client.request(
    http_method: "DELETE",
    path: "/v1/customer-seats/{seat_id}",
    path_params: { "seat_id" => seat_id },
    query: {},
    response_type: :json,
    errors: { 401 => Errors::RevokeSeat401Error, 403 => Errors::RevokeSeat403Error, 404 => Errors::RevokeSeat404Error, 422 => Errors::HTTPValidationError }
  )
  Models::CustomerSeat.from_json(data)
end