Class: Airwallex::Resources::PaymentIntents
Instance Attribute Summary
Attributes inherited from BaseResource
#client
Instance Method Summary
collapse
#initialize
Instance Method Details
#cancel(id, idempotency_key: nil) ⇒ Object
22
23
24
25
|
# File 'lib/airwallex/resources/payment_intents.rb', line 22
def cancel(id, idempotency_key: nil)
validate_id!(id)
post("/pa/payment_intents/#{id}/cancel", {}, {}, idempotency_key: idempotency_key)
end
|
#create(params = {}, idempotency_key: nil) ⇒ Object
6
7
8
9
|
# File 'lib/airwallex/resources/payment_intents.rb', line 6
def create(params = {}, idempotency_key: nil)
validate_params!(params)
post("/pa/payment_intents/create", params, {}, idempotency_key: idempotency_key)
end
|
#list(params = {}) ⇒ Object
27
28
29
30
|
# File 'lib/airwallex/resources/payment_intents.rb', line 27
def list(params = {})
validate_params!(params)
get("/pa/payment_intents", params)
end
|
#retrieve(id) ⇒ Object
11
12
13
14
|
# File 'lib/airwallex/resources/payment_intents.rb', line 11
def retrieve(id)
validate_id!(id)
get("/pa/payment_intents/#{id}")
end
|
#update(id, params = {}, idempotency_key: nil) ⇒ Object
16
17
18
19
20
|
# File 'lib/airwallex/resources/payment_intents.rb', line 16
def update(id, params = {}, idempotency_key: nil)
validate_id!(id)
validate_params!(params)
post("/pa/payment_intents/#{id}/update", params, {}, idempotency_key: idempotency_key)
end
|