Module: AppManager::Client::Plans
- Included in:
- AppManager::Client
- Defined in:
- lib/app_manager/client/plans.rb
Instance Method Summary collapse
- #cancel_charge(shop_domain, plan_id) ⇒ Object
- #check_and_activate_global_plan(shop_domain) ⇒ Object
- #discount_used(shop_domain, discount_id) ⇒ Object
- #get_app_bundle_data ⇒ Object
- #get_charge(shop_domain) ⇒ Object
- #get_plan(plan_id, shop_domain = nil) ⇒ Object
- #get_plans(shop_domain, active_plan_id = nil) ⇒ Object
- #get_promotional_discount(shop_domain = nil, code) ⇒ Object
- #get_related_discounted_plans(discount_id) ⇒ Object
- #get_remaining_days(shop_domain, trial_activated_at = nil, plan_id = nil) ⇒ Object
- #get_status(options = {}) ⇒ Object
- #has_plan(shop_domain, plan_id, trial_activated_at, grandfathered) ⇒ Object
- #store_charge(options = {}) ⇒ Object
- #sync_charge(options = {}) ⇒ Object
- #sync_discount_usage_log(options = {}) ⇒ Object
- #update_charge(shop_domain, plan_id) ⇒ Object
Instance Method Details
#cancel_charge(shop_domain, plan_id) ⇒ Object
17 18 19 |
# File 'lib/app_manager/client/plans.rb', line 17 def cancel_charge(shop_domain, plan_id) post("/cancel-charge", {shop_domain: shop_domain, plan_id: plan_id}) end |
#check_and_activate_global_plan(shop_domain) ⇒ Object
50 51 52 |
# File 'lib/app_manager/client/plans.rb', line 50 def check_and_activate_global_plan(shop_domain) post("/activate-global-plan", {shop_domain: shop_domain}) end |
#discount_used(shop_domain, discount_id) ⇒ Object
58 59 60 |
# File 'lib/app_manager/client/plans.rb', line 58 def discount_used(shop_domain, discount_id) post('/use-discount', {shop_domain: shop_domain, discount_id: discount_id.to_i}) end |
#get_app_bundle_data ⇒ Object
46 47 48 |
# File 'lib/app_manager/client/plans.rb', line 46 def get_app_bundle_data get("/app-bundle-data") end |
#get_charge(shop_domain) ⇒ Object
34 35 36 |
# File 'lib/app_manager/client/plans.rb', line 34 def get_charge(shop_domain) get("/get-charge?shop_domain=#{shop_domain}") end |
#get_plan(plan_id, shop_domain = nil) ⇒ Object
9 10 11 |
# File 'lib/app_manager/client/plans.rb', line 9 def get_plan(plan_id, shop_domain = nil) get("/plan?plan_id=#{plan_id}&shop_domain=#{shop_domain}") end |
#get_plans(shop_domain, active_plan_id = nil) ⇒ Object
5 6 7 |
# File 'lib/app_manager/client/plans.rb', line 5 def get_plans(shop_domain, active_plan_id = nil) get("/plans?shop_domain=#{shop_domain}&active_plan_id=#{active_plan_id}") end |
#get_promotional_discount(shop_domain = nil, code) ⇒ Object
54 55 56 |
# File 'lib/app_manager/client/plans.rb', line 54 def get_promotional_discount(shop_domain = nil,code) get("/discount?shop_domain=#{shop_domain}&code=#{code}") end |
#get_related_discounted_plans(discount_id) ⇒ Object
66 67 68 |
# File 'lib/app_manager/client/plans.rb', line 66 def (discount_id) get("/get-related-discounted-plans?discount_id=#{discount_id}") end |
#get_remaining_days(shop_domain, trial_activated_at = nil, plan_id = nil) ⇒ Object
30 31 32 |
# File 'lib/app_manager/client/plans.rb', line 30 def get_remaining_days(shop_domain, trial_activated_at = nil, plan_id = nil) get("/get-remaining-days?shop_domain=#{shop_domain}&trial_activated_at=#{trial_activated_at}&plan_id=#{plan_id}") end |
#get_status(options = {}) ⇒ Object
38 39 40 |
# File 'lib/app_manager/client/plans.rb', line 38 def get_status( = {}) get("/get-status", ) end |
#has_plan(shop_domain, plan_id, trial_activated_at, grandfathered) ⇒ Object
42 43 44 |
# File 'lib/app_manager/client/plans.rb', line 42 def has_plan(shop_domain, plan_id, trial_activated_at, grandfathered) get("/has-plan?shop_domain=#{shop_domain}&plan_id=#{plan_id}&trial_activated_at=#{trial_activated_at}&grandfathered=#{grandfathered}") end |
#store_charge(options = {}) ⇒ Object
13 14 15 |
# File 'lib/app_manager/client/plans.rb', line 13 def store_charge( = {}) post("/store-charge", ) end |
#sync_charge(options = {}) ⇒ Object
25 26 27 |
# File 'lib/app_manager/client/plans.rb', line 25 def sync_charge( = {}) post("/sync-charge", ) end |
#sync_discount_usage_log(options = {}) ⇒ Object
62 63 64 |
# File 'lib/app_manager/client/plans.rb', line 62 def sync_discount_usage_log( = {}) post("/use-discount-sync", ) end |
#update_charge(shop_domain, plan_id) ⇒ Object
21 22 23 |
# File 'lib/app_manager/client/plans.rb', line 21 def update_charge(shop_domain, plan_id) post("/update-charge", {shop_domain: shop_domain, plan_id: plan_id}) end |