Class: MisarBlog::AccountResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/misarblog/client.rb

Overview

── Resource: Account ────────────────────────────────────────────────────────

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from MisarBlog::Resource

Instance Method Details

#planObject

GET /plan



183
184
185
# File 'lib/misarblog/client.rb', line 183

def plan
  Models::Plan.new(@client.request(:get, "/plan"))
end

#profileObject

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_statusObject

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