Class: Payrex::Services::CheckoutSessionsService
Constant Summary
collapse
- PATH =
"checkout_sessions"
Instance Method Summary
collapse
Methods inherited from BaseService
#initialize, #request
Instance Method Details
#create(payload) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/services/checkout_sessions_service.rb', line 6
def create(payload)
request(
method: :post,
object: Payrex::Entities::CheckoutSession,
path: PATH,
payload: payload
)
end
|
#expire(id) ⇒ Object
34
35
36
37
38
39
40
41
|
# File 'lib/services/checkout_sessions_service.rb', line 34
def expire(id)
request(
method: :post,
object: Payrex::Entities::CheckoutSession,
path: "#{PATH}/#{id}/expire",
payload: {}
)
end
|
#list(payload = {}) ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'lib/services/checkout_sessions_service.rb', line 15
def list(payload = {})
request(
is_list: true,
method: :get,
object: Payrex::Entities::CheckoutSession,
path: PATH,
payload: payload
)
end
|
#retrieve(id) ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/services/checkout_sessions_service.rb', line 25
def retrieve(id)
request(
method: :get,
object: Payrex::Entities::CheckoutSession,
path: "#{PATH}/#{id}",
payload: {}
)
end
|