Class: MisarBlog::AccountResource
- Defined in:
- lib/misarblog/client.rb
Overview
── Resource: Account ────────────────────────────────────────────────────────
Instance Method Summary collapse
-
#plan ⇒ Object
GET /plan.
-
#profile ⇒ Object
GET /me.
-
#start_trial(feature: nil, ref: nil) ⇒ Object
POST /trial — start a trial for a gated feature.
-
#trial_status ⇒ Object
GET /trial.
-
#upsell_funnel(days: nil, feature: nil) ⇒ Object
GET /upsell-funnel.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from MisarBlog::Resource
Instance Method Details
#plan ⇒ Object
GET /plan
183 184 185 |
# File 'lib/misarblog/client.rb', line 183 def plan Models::Plan.new(@client.request(:get, "/plan")) end |
#profile ⇒ Object
GET /me
178 179 180 |
# File 'lib/misarblog/client.rb', line 178 def profile Models::Profile.new(@client.request(:get, "/me")) end |
#start_trial(feature: nil, ref: nil) ⇒ Object
POST /trial — start a trial for a gated feature.
193 194 195 196 |
# File 'lib/misarblog/client.rb', line 193 def start_trial(feature: nil, ref: nil) body = compact(feature: feature, ref: ref) @client.request(:post, "/trial", body) end |
#trial_status ⇒ Object
GET /trial
188 189 190 |
# File 'lib/misarblog/client.rb', line 188 def trial_status Models::TrialStatus.new(@client.request(:get, "/trial")) end |
#upsell_funnel(days: nil, feature: nil) ⇒ Object
GET /upsell-funnel
199 200 201 202 |
# File 'lib/misarblog/client.rb', line 199 def upsell_funnel(days: nil, feature: nil) qs = query(days: days, feature: feature) @client.request(:get, "/upsell-funnel#{qs}") end |