List of contracts signed between you and OVH

REST: GET /me/agreements
@param contractId [required] Filter the value of contractId property (like)
@param agreed [required] Filter the value of agreed property (like)
484480
public ArrayList<Long> agreements_GET(OvhAgreementStateEnum agreed, Long contractId) throws IOException {
		String qPath = "/me/agreements";
		StringBuilder sb = path(qPath);
		query(sb, "agreed", agreed);
		query(sb, "contractId", contractId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t2);
	}
526510
public static sdx_license[] get_filtered(nitro_service service, String filter) throws Exception
	{
		sdx_license obj = new sdx_license();
		options option = new options();
		option.set_filter(filter);
		sdx_license[] response = (sdx_license[]) obj.getfiltered(service, option);
		return response;
	}
638125
def get_service_agreements(storage_path, status='pending'):
    
    conn = sqlite3.connect(storage_path)
    try:
        cursor = conn.cursor()
        return [
            row for row in
            cursor.execute(
                '''
                SELECT id, did, service_definition_id, price, files, start_time, status
                FROM service_agreements 
                WHERE status=?;
                ''',
                (status,))
        ]
    finally:
        conn.close()
64944
function searchForBondedDevice(params)
{
	console.log('Searching for bonded device')
	evothings.ble.getBondedDevices(
		// Success function.
		function(devices)
		{
			for (var i in devices)
			{
				var device = devices[i]
				if (device.name == params.name)
				{
					console.log('Found bonded device: ' + device.name)
					params.onFound(device)
					return // bonded device found
				}
			}
			params.onNotFound()
		},
		// Error function.
		function(error)
		{
			params.onNotFound()
		},
		{ serviceUUIDs: params.serviceUUIDs })
}
697461
public function addOrderRelation($agreementId, $orderId)
    {
        /*
         * needed for subscription module, only available in version >= 1.8
         */
        if (method_exists($this->_getWriteAdapter(), 'insertIgnore')) {
            $this->_getWriteAdapter()->insertIgnore(
                $this->getTable('sales/billing_agreement_order'), array(
                    'agreement_id' => $agreementId,
                    'order_id' => $orderId
                )
            );
        } else {
            // use the default insert for <= 1.7 version
            // @codingStandardsIgnoreStart
            try {
                parent::addOrderRelation($agreementId, $orderId);
            } catch (Exception $e) {
                // do not log this because this is a Integrity constraint violation solved in 1.8 by insertIgnore
            }
            // @codingStandardsIgnoreEnd
        }

        return $this;
    }
688111
public Map<IGuaranteeTerm, GuaranteeTermEvaluationResult> evaluate(IAgreement agreement,
            Map<IGuaranteeTerm, List<IMonitoringMetric>> metricsMap) {

        checkInitialized(false);
        
        Map<IGuaranteeTerm,GuaranteeTermEvaluationResult> result = 
                new HashMap<IGuaranteeTerm,GuaranteeTermEvaluationResult>();
        
        Date now = new Date();
        for (IGuaranteeTerm term : metricsMap.keySet()) {

            List<IMonitoringMetric> metrics = metricsMap.get(term);
            if (metrics.size() > 0) {
                GuaranteeTermEvaluationResult aux = termEval.evaluate(agreement, term, metrics, now);
                result.put(term, aux);
            }
        }

        return result;
    }
540071
private List<ObligationExpression> getFulfilledObligationExpressions(
            List<ObligationExpression> oes,
            DecisionType decision) {

        List<ObligationExpression> fulfilledOEs = new ArrayList<ObligationExpression>();

        if (oes != null && oes.size() > 0) {
            for (ObligationExpression oe : oes) {
                if (oe.isFulfilled(decision)) {
                    fulfilledOEs.add(oe);
                }
            }
        }
        return fulfilledOEs;
    }
1244566
public JSONObject getByContract(String contract, String date, HashMap<String, String> params) throws JSONException {
        return oClient.get("/team/v3/workdiaries/contracts/" + contract + "/" + date, params);
    }
951545
public static void showHMSAgreement() {
    com.huawei.android.hms.agent.HMSAgent.Push.queryAgreement(new com.huawei.android.hms.agent.push.handler.QueryAgreementHandler() {
      @Override
      public void onResult(int rst) {
        LOGGER.d("[HMS] query agreement result: " + rst);
      }
    });
  }
798645
public JSONObject updateByContract(String contractId, String ts, HashMap<String, String> params) throws JSONException {   
        return oClient.put("/team/v3/snapshots/contracts/" + contractId + "/" + ts, params);
    }
292225
private List<Policy> aggregateContractPolicies(ContractSummaryBean contractBean) {
        try {
            List<Policy> policies = new ArrayList<>();
            PolicyType [] types = new PolicyType[] {
                    PolicyType.Client, PolicyType.Plan, PolicyType.Api
            };
            for (PolicyType policyType : types) {
                String org, id, ver;
                switch (policyType) {
                  case Client: {
                      org = contractBean.getClientOrganizationId();
                      id = contractBean.getClientId();
                      ver = contractBean.getClientVersion();
                      break;
                  }
                  case Plan: {
                      org = contractBean.getApiOrganizationId();
                      id = contractBean.getPlanId();
                      ver = contractBean.getPlanVersion();
                      break;
                  }
                  case Api: {
                      org = contractBean.getApiOrganizationId();
                      id = contractBean.getApiId();
                      ver = contractBean.getApiVersion();
                      break;
                  }
                  default: {
                      throw new RuntimeException("Missing case for switch!"); //$NON-NLS-1$
                  }
                }
                List<PolicySummaryBean> clientPolicies = query.getPolicies(org, id, ver, policyType);
                try {
                    storage.beginTx();
                    for (PolicySummaryBean policySummaryBean : clientPolicies) {
                        PolicyBean policyBean = storage.getPolicy(policyType, org, id, ver, policySummaryBean.getId());
                        Policy policy = new Policy();
                        policy.setPolicyJsonConfig(policyBean.getConfiguration());
                        policy.setPolicyImpl(policyBean.getDefinition().getPolicyImpl());
                        policies.add(policy);
                    }
                } finally {
                    storage.rollbackTx();
                }
            }
            return policies;
        } catch (Exception e) {
            throw ExceptionFactory.actionException(
                    Messages.i18n.format("ErrorAggregatingPolicies", contractBean.getClientId() + "->" + contractBean.getApiDescription()), e); //$NON-NLS-1$ //$NON-NLS-2$
        }
    }
317604
public function getContractsItemsData(int $character_id, int $contract_id)
    {

        $assets = $this->getCharacterContractsItems($character_id, $contract_id);

        return view('web::character.contractitems', compact('assets'));
    }
539797
private MultivaluedMapWrapper<String, IGuaranteeTerm> initTermsMap(IAgreement agreement) {
        MultivaluedMapWrapper<String, IGuaranteeTerm> result = new MultivaluedMapWrapper<String, IGuaranteeTerm>();
        
        for (IGuaranteeTerm term : agreement.getGuaranteeTerms()) {
            String variable = constraintEvaluator.getConstraintVariable(term.getServiceLevel());
            result.add(variable, term);
        }
        return result;
    }
784817
public OvhCapabilities offerCapabilities_GET(OvhOfferCapabilitiesEnum offer) throws IOException {
		String qPath = "/hosting/web/offerCapabilities";
		StringBuilder sb = path(qPath);
		query(sb, "offer", offer);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhCapabilities.class);
	}
775975
public Observable<Page<AgreementTermsInner>> listAsync() {
        return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<AgreementTermsInner>>, Page<AgreementTermsInner>>() {
            @Override
            public Page<AgreementTermsInner> call(ServiceResponse<List<AgreementTermsInner>> response) {
                PageImpl<AgreementTermsInner> page = new PageImpl<>();
                page.setItems(response.body());
                return page;
            }
        });
    }
100157
public List<GitlabCommit> getAllCommits(Serializable projectId) throws IOException {
        return getAllCommits(projectId, null, null);
    }
1053822
public ArrayList<Long> payment_transaction_GET(Long paymentMethodId, net.minidev.ovh.api.me.payment.method.transaction.OvhStatus status) throws IOException {
		String qPath = "/me/payment/transaction";
		StringBuilder sb = path(qPath);
		query(sb, "paymentMethodId", paymentMethodId);
		query(sb, "status", status);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t2);
	}