Get a Plan's details
<p>

@param planCode recurly id of plan
@return the plan object as identified by the passed in ID
348640
public Plan getPlan(final String planCode) {
        if (planCode == null || planCode.isEmpty())
            throw new RuntimeException("planCode cannot be empty!");

        return doGET(Plan.PLANS_RESOURCE + "/" + planCode, Plan.class);
    }
217839
def get_plans(self, reference):
        
        response = make_request(
            '{}charm?charm-url={}'.format(self.url,
                                          'cs:' + reference.path()),
            timeout=self.timeout, client=self._client)
        try:
            return tuple(map(lambda plan: Plan(
                url=plan['url'], plan=plan['plan'],
                created_on=datetime.datetime.strptime(
                    plan['created-on'],
                    "%Y-%m-%dT%H:%M:%SZ"
                ),
                description=plan.get('description'),
                price=plan.get('price')), response))
        except Exception as err:
            log.error(
                'cannot process plans: invalid JSON response: {!r}'.format(
                    response))
            raise ServerError(
                'unable to get list of plans for {}: {}'.format(
                    reference.path(), err))
622671
private String getMessage(final String[] codes, final Optional<String> defaultMessage) {
        for(String code : codes) {
            try {
                final Optional<String> message = messageResolver.getMessage(code);
                if(message.isPresent()) {
                    return message.get();
                }
                
            } catch(Throwable e) {
                continue;
            }
        }
        
        if(defaultMessage.isPresent()) {
            return defaultMessage.get();
        }
        
        throw new RuntimeException(String.format("not found message code [%s].", Utils.join(codes, ",")));
    }
309378
public function updatePlan($planCode, $updateData)
    {
        return $this->getPlanModel()->getPlan($planCode)
            ->setUpdateData($updateData)
            ->save();
    }
228690
public CardDetails details() throws StripeException {
    return details((Map<String, Object>) null, (RequestOptions) null);
  }
1172837
public Subscriptions getAccountSubscriptions(final String accountCode) {
        return doGET(Account.ACCOUNT_RESOURCE
                     + "/" + accountCode
                     + Subscriptions.SUBSCRIPTIONS_RESOURCE,
                     Subscriptions.class,
                     new QueryParams());
    }
1302206
public AddOn getAddOn(final String planCode, final String addOnCode) {
        if (addOnCode == null || addOnCode.isEmpty())
            throw new RuntimeException("addOnCode cannot be empty!");

        return doGET(Plan.PLANS_RESOURCE +
                     "/" +
                     planCode +
                     AddOn.ADDONS_RESOURCE +
                     "/" +
                     addOnCode, AddOn.class);
    }
574330
public static CmsReturnLinkInfo internalGetLinkForReturnCode(CmsObject cms, String returnCode) throws CmsException {

        if (CmsUUID.isValidUUID(returnCode)) {
            try {
                CmsResource pageRes = cms.readResource(new CmsUUID(returnCode), CmsResourceFilter.IGNORE_EXPIRATION);
                return new CmsReturnLinkInfo(
                    OpenCms.getLinkManager().substituteLink(cms, pageRes),
                    CmsReturnLinkInfo.Status.ok);
            } catch (CmsVfsResourceNotFoundException e) {
                LOG.debug(e.getLocalizedMessage(), e);
                return new CmsReturnLinkInfo(null, CmsReturnLinkInfo.Status.notfound);
            }
        } else {
            int colonIndex = returnCode.indexOf(':');
            if (colonIndex >= 0) {
                String before = returnCode.substring(0, colonIndex);
                String after = returnCode.substring(colonIndex + 1);

                if (CmsUUID.isValidUUID(before) && CmsUUID.isValidUUID(after)) {
                    try {
                        CmsUUID pageId = new CmsUUID(before);
                        CmsUUID detailId = new CmsUUID(after);
                        CmsResource pageRes = cms.readResource(pageId);
                        CmsResource folder = pageRes.isFolder()
                        ? pageRes
                        : cms.readParentFolder(pageRes.getStructureId());
                        String pageLink = OpenCms.getLinkManager().substituteLink(cms, folder);
                        CmsResource detailRes = cms.readResource(detailId);
                        String detailName = cms.getDetailName(
                            detailRes,
                            cms.getRequestContext().getLocale(),
                            OpenCms.getLocaleManager().getDefaultLocales());
                        String link = CmsFileUtil.removeTrailingSeparator(pageLink) + "/" + detailName;
                        return new CmsReturnLinkInfo(link, CmsReturnLinkInfo.Status.ok);
                    } catch (CmsVfsResourceNotFoundException e) {
                        LOG.debug(e.getLocalizedMessage(), e);
                        return new CmsReturnLinkInfo(null, CmsReturnLinkInfo.Status.notfound);

                    }
                }
            }
            throw new IllegalArgumentException("return code has wrong format");
        }
    }
812390
public Plan findPlanByName(String name) throws WorkerDaoException {
    Stat planStat;
    byte[] planBytes;
    try {
      planStat = framework.getCuratorFramework().checkExists().forPath(PLANS_ZK + "/" + name);
      if (planStat == null) {
        return null;
      }
      planBytes = framework.getCuratorFramework().getData().forPath(PLANS_ZK + "/" + name);
    } catch (Exception e) {
      LOGGER.warn(e);
      throw new WorkerDaoException(e);
    }
    Plan p = null;
    try {
      p = deserializePlan(planBytes);
    } catch (JsonParseException | JsonMappingException e) {
      LOGGER.warn("while parsing plan " + name, e);
    } catch (IOException e) {
      LOGGER.warn("while parsing plan " + name, e);
    }
    return p;
  }
78164
public static Optional<String[]> lookup(long code) {
        String[] desc = DESCRIPTIONS.get(code & 0xFFFF0000);

        return Optional.ofNullable(desc);
    }
233725
public java.util.List<CodingDt> getCode() {  
		if (myCode == null) {
			myCode = new java.util.ArrayList<CodingDt>();
		}
		return myCode;
	}
546448
public String getOptimizerPlanAsJSON(Plan plan) throws Exception {
		synchronized (this.lock) {
			
			// check if we start a session dedicated for this execution
			final boolean shutDownAtEnd;
			if (this.nephele == null) {
				// we start a session just for us now
				shutDownAtEnd = true;
				start();
			} else {
				// we use the existing session
				shutDownAtEnd = false;
			}

			try {
				PactCompiler pc = new PactCompiler(new DataStatistics());
				OptimizedPlan op = pc.compile(plan);
				PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator();
		
				return gen.getOptimizerPlanAsJSON(op);
			}
			finally {
				if (shutDownAtEnd) {
					stop();
				}
			}
		}
	}
271137
public ArrayList<OvhOrder> order_GET(String planCode) throws IOException {
		String qPath = "/cloud/order";
		StringBuilder sb = path(qPath);
		query(sb, "planCode", planCode);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t25);
	}
1070649
@Override
    public DefaultPlan findCurrentPlan(final String name) throws CatalogApiException {
        if (name == null || plans == null) {
            throw new CatalogApiException(ErrorCode.CAT_NO_SUCH_PLAN, name);
        }
        final DefaultPlan result = (DefaultPlan) plans.findByName(name);
        if (result != null) {
            return result;
        }
        throw new CatalogApiException(ErrorCode.CAT_NO_SUCH_PLAN, name);
    }
171792
public Accounts getChildAccounts(final String accountCode) {
        return doGET(Account.ACCOUNT_RESOURCE + "/" + accountCode + "/child_accounts", Accounts.class, new QueryParams());
    }
667124
public String getReturnCode() {

        CmsUUID ownId = CmsCoreProvider.get().getStructureId();
        CmsUUID detailId = m_data.getDetailId();
        if (detailId != null) {
            return "" + ownId + ":" + detailId;
        } else {
            return "" + ownId;
        }
    }
1241128
@Override
  public final String getMsg(final String pKey, final String pLang) {
    try {
      ResourceBundle mb = messagesMap.get(pLang);
      if (mb != null) {
        return mb.getString(pKey);
      } else {
        return getMsg(pKey);
      }
    } catch (Exception e) {
      return "[" + pKey + "]-" + pLang;
    }
  }