Class: Payrex::Services::PaymentIntentsService
Constant Summary
collapse
- PATH =
"payment_intents"
Instance Method Summary
collapse
Methods inherited from BaseService
#initialize, #request
Instance Method Details
#capture(id, payload) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/services/payment_intents_service.rb', line 6
def capture(id, payload)
request(
method: :post,
object: Payrex::Entities::PaymentIntent,
path: "#{PATH}/#{id}/capture",
payload: payload
)
end
|
#create(payload) ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/services/payment_intents_service.rb', line 15
def create(payload)
request(
method: :post,
object: Payrex::Entities::PaymentIntent,
path: PATH,
payload: payload
)
end
|
#retrieve(id) ⇒ Object
24
25
26
27
28
29
30
31
|
# File 'lib/services/payment_intents_service.rb', line 24
def retrieve(id)
request(
method: :get,
object: Payrex::Entities::PaymentIntent,
path: "#{PATH}/#{id}",
payload: {}
)
end
|