Sha256: 5dcc8f725cbe69dbe82b342defd902f94eb27f79d4f835ca183c41320b4b4610

Contents?: true

Size: 1.12 KB

Versions: 6

Compression:

Stored size: 1.12 KB

Contents

module AppManager
	class Client
			module Plans

			  def get_plans(shop_domain,active_plan_id=nil)
				  get("/plans?shop_domain=#{shop_domain}&active_plan_id=#{active_plan_id}")
			  end

			  def get_plan(plan_id,shop_domain=nil)
				  get("/plan?plan_id=#{plan_id}&shop_domain=#{shop_domain}")
			  end

			  def store_charge(options = {})
			  	  post("/store-charge", options)
			  end

			  def cancel_charge(shop_domain,plan_id)
			  	  post("/cancel-charge", {shop_domain: shop_domain,plan_id: plan_id})
			  end

    		  def update_charge(shop_domain,plan_id)
    		  	  post("/update-charge", {shop_domain: shop_domain,plan_id: plan_id})
    		  end

			  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)
			      get("/get-charge?shop_domain=#{shop_domain}")
			  end

			  def get_status(options = {})
				  get("/get-status", options)
			  end


			end
	end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
app_manager-1.2.5 lib/app_manager/client/plans.rb
app_manager-1.2.4 lib/app_manager/client/plans.rb
app_manager-1.2.3 lib/app_manager/client/plans.rb
app_manager-1.2.2 lib/app_manager/client/plans.rb
app_manager-1.2.1 lib/app_manager/client/plans.rb
app_manager-1.2.0 lib/app_manager/client/plans.rb