Class: Sendara::Resources::Billing
Instance Method Summary
collapse
#initialize
Instance Method Details
#checkout(plan: nil, period: nil) ⇒ Object
10
11
12
13
14
|
# File 'lib/sendara/resources/billing.rb', line 10
def checkout(plan: nil, period: nil)
body = compact_params("plan" => plan, "period" => period)
response = request(:post, "/v1/billing/checkout", body: body) || {}
response["url"].to_s
end
|
#get ⇒ Object
6
7
8
|
# File 'lib/sendara/resources/billing.rb', line 6
def get
request(:get, "/v1/billing") || {}
end
|
#portal ⇒ Object
16
17
18
19
|
# File 'lib/sendara/resources/billing.rb', line 16
def portal
response = request(:post, "/v1/billing/portal") || {}
response["url"].to_s
end
|