Class: Polar::Checkout::Custom
- Inherits:
-
Resource
- Object
- OpenStruct
- Resource
- Polar::Checkout::Custom
show all
- Defined in:
- lib/polar/resources/checkout/custom.rb
Class Method Summary
collapse
Methods inherited from Resource
handle_list, handle_none, handle_one
Class Method Details
.client_confirm(client_secret) ⇒ Object
37
38
39
40
|
# File 'lib/polar/resources/checkout/custom.rb', line 37
def self.client_confirm(client_secret)
response = Client.post_request("/v1/checkouts/custom/client/#{client_secret}/confirm")
handle_one(response, Checkout)
end
|
.client_get(client_secret) ⇒ Object
27
28
29
30
|
# File 'lib/polar/resources/checkout/custom.rb', line 27
def self.client_get(client_secret)
response = Client.get_request("/v1/checkouts/custom/client/#{client_secret}")
handle_one(response, Checkout)
end
|
.client_update(client_secret, params) ⇒ Object
32
33
34
35
|
# File 'lib/polar/resources/checkout/custom.rb', line 32
def self.client_update(client_secret, params)
response = Client.patch_request("/v1/checkouts/custom/client/#{client_secret}", **params)
handle_one(response, Checkout)
end
|
.create(params) ⇒ Object
11
12
13
14
15
|
# File 'lib/polar/resources/checkout/custom.rb', line 11
def self.create(params)
params[:payment_processor] ||= "stripe"
response = Client.post_request("/v1/checkouts/custom/", **params)
handle_one(response, Checkout)
end
|
.get(id) ⇒ Object
17
18
19
20
|
# File 'lib/polar/resources/checkout/custom.rb', line 17
def self.get(id)
response = Client.get_request("/v1/checkouts/custom/#{id}")
handle_one(response, Checkout)
end
|
.list(params = {}) ⇒ Object
6
7
8
9
|
# File 'lib/polar/resources/checkout/custom.rb', line 6
def self.list(params = {})
response = Client.get_request("/v1/checkouts/custom/", **params)
handle_list(response, Checkout)
end
|
.update(id, params) ⇒ Object
22
23
24
25
|
# File 'lib/polar/resources/checkout/custom.rb', line 22
def self.update(id, params)
response = Client.patch_request("/v1/checkouts/custom/#{id}", **params)
handle_one(response, Checkout)
end
|