lib/app_manager/client/plans.rb in app_manager-1.7.0 vs lib/app_manager/client/plans.rb in app_manager-2.0.0

- old
+ new

@@ -24,10 +24,11 @@ def sync_charge(options = {}) post("/sync-charge", options) end + 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 def get_charge(shop_domain) @@ -40,9 +41,20 @@ 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 + def get_promotional_discount(shop_domain = nil, code_type, code, reinstall) + get("/discount?shop_domain=#{shop_domain}&reinstall=#{reinstall}&code_type=#{code_type}&code=#{code}") + end + + def discount_used(shop_domain, discount_id) + post('/use-discount', {shop_domain: shop_domain, discount_id: discount_id.to_i}) + end + + def sync_discount_usage_log(options = {}) + post("/use-discount-sync", options) + end end end end \ No newline at end of file