code: public function planCharge()
      {
          return $this->charges()
              ->whereIn('type', [Charge::CHARGE_RECURRING, Charge::CHARGE_ONETIME])
              ->where('plan_id', $this->plan_id)
              ->orderBy('created_at', 'desc')
              ->first();
      }
docs: Gets the last single or recurring charge for the shop.
  
  @return null|\OhMyBrew\ShopifyApp\Models\Charge