Decline a trade offer.
@param TradeOffer $tradeOffer
@return bool
550525
public function declineTrade(TradeOffer $tradeOffer)
    {
        if (!$tradeOffer->isOurOffer()) {
            return $this->declineTradeById($tradeOffer->getTradeOfferId());
        }
        return false;
    }
899561
public function removeInteraction(Interaction $interaction){
        $returnValue = false;

        if(!is_null($interaction)){
            $returnValue = $this->getBody()->removeElement($interaction);
        }

        return (bool) $returnValue;
    }
1200116
def ReplaceOffer(self, offer_link, offer):
        
        CosmosClient.__ValidateResource(offer)
        path = base.GetPathFromLink(offer_link)
        offer_id = base.GetResourceIdOrFullNameFromLink(offer_link)
        return self.Replace(offer, path, 'offers', offer_id, None, None)
1265245
public function acceptsValue($value): bool {
		switch ($this->operator) {
			case CriteriaComparator::OPERATOR_NOT_IN:
				if ($value === null) return true;
				return !$this->in($value);
			case CriteriaComparator::OPERATOR_IN:
				if ($value === null) return false;
				return !$this->in($value);
				
			case CriteriaComparator::OPERATOR_CONTAINS_NOT:
				ArgUtils::assertTrue(is_array($value));
				
				foreach ($value as $relationEntry) {
					if ($this->in($relationEntry)) return false;
				}
				
				return true;
			case CriteriaComparator::OPERATOR_CONTAINS:
				ArgUtils::assertTrue(is_array($value));
				
				foreach ($value as $relationEntry) {
					if (!$this->in($relationEntry)) return false;
				}
				
				return true;
		}
	}
217674
public function remove()
    {
        if (!isset($this->_pkValue)) {
            return false;
        }
        if (self::delete($this->_pkValue) > 0) {
            $this->_pkValue = null;
            return true;
        }
        return false;
    }
1128653
public function reject($cb)
    {
        $dstore = new DataStore;
        $dstore->meta($this->metaData);
        foreach ($this->rows as $index=>$row) {
            if ($cb($row, $index)===false) {
                $dstore->append($row);
            }
        }
        return $dstore;
    }
1158801
public function removeOption($option = true)
    {
        if (true === $option) {
            $this->options = [];
        } elseif (is_string($option) && isset($this->options[$option])) {
            unset($this->options[$option]);
        }

        return $this;
    }
383387
async def DestroyOffers(self, force, offer_urls):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='ApplicationOffers',
                   request='DestroyOffers',
                   version=2,
                   params=_params)
        _params['force'] = force
        _params['offer-urls'] = offer_urls
        reply = await self.rpc(msg)
        return reply
1301836
public function destroy($removeCookie = false)
    {
        if ($this->id) {
            if ($removeCookie) {
                $this->removeCookie();
            }
            $this->handler->destroy($this->id);
            $this->handler->close();
            $this->id = '';
            $this->data = null;
            return true;
        }
        return false;
    }
918519
public function acceptTrade(TradeOffer $tradeOffer)
    {
        if (!$tradeOffer->isOurOffer()) {
            $url = 'https://steamcommunity.com/tradeoffer/' . $tradeOffer->getTradeOfferId() . '/accept';
            $referer = 'https://steamcommunity.com/tradeoffer/' . $tradeOffer->getTradeOfferId() . '/';
            $params = [
                'sessionid' => $this->steamCommunity->getSessionId(),
                'serverid' => '1',
                'tradeofferid' => $tradeOffer->getTradeOfferId(),
                'partner' => Helper::toCommunityID($tradeOffer->getOtherAccountId())
            ];
            $response = $this->steamCommunity->cURL($url, $referer, $params);
            $json = json_decode($response, true);
            if (is_null($json)) {
                return false;
            } else {
                return isset($json['tradeid']);
            }
        }
        return false;
    }
672961
public function destroy(UserPolicy $user, PriceList $price_list)
    {
        return $price_list->user_id == user_id() && $price_list->user_type == user_type();
    }
684956
public function allowCancel($order)
    {
        /** @var SalesDependencyClassInterface $dependency */
        foreach ($this->dependencyClasses as $dependency) {
            if (!$dependency->allowCancel($order)) {
                return false;
            }
        }

        return true;
    }
961962
public function closeOrder($out_trade_no)
    {
        $pay = new Order($this->config->get());
        return $pay->close($out_trade_no);
    }
837487
def cancelOrder(self, order: Order) -> Trade:
        
        self.client.cancelOrder(order.orderId)
        now = datetime.datetime.now(datetime.timezone.utc)
        key = self.wrapper.orderKey(
            order.clientId, order.orderId, order.permId)
        trade = self.wrapper.trades.get(key)
        if trade:
            if not trade.isDone():
                status = trade.orderStatus.status
                if (status == OrderStatus.PendingSubmit and not order.transmit
                        or status == OrderStatus.Inactive):
                    newStatus = OrderStatus.Cancelled
                else:
                    newStatus = OrderStatus.PendingCancel
                logEntry = TradeLogEntry(now, newStatus, '')
                trade.log.append(logEntry)
                trade.orderStatus.status = newStatus
                self._logger.info(f'cancelOrder: {trade}')
                trade.cancelEvent.emit(trade)
                trade.statusEvent.emit(trade)
                self.cancelOrderEvent.emit(trade)
                self.orderStatusEvent.emit(trade)
                if newStatus == OrderStatus.Cancelled:
                    trade.cancelledEvent.emit(trade)
        else:
            self._logger.error(f'cancelOrder: Unknown orderId {order.orderId}')
        return trade
1094596
public function Decline($UserID = '', $TransientKey = '') {
      $this->Permission('Garden.Users.Approve');
      $Session = Gdn::Session();
      if ($Session->ValidateTransientKey($TransientKey)) {
         if ($this->HandleApplicant('Decline', $UserID))
            $this->InformMessage(T('Your changes have been saved.'));
      }

      if ($this->_DeliveryType == DELIVERY_TYPE_BOOL) {
         return $this->Form->ErrorCount() == 0 ? TRUE : $this->Form->Errors();
      } else {
         $this->Applicants();
      }
   }
614029
public function lessThan(array $options) {
        if (isset($options['element'])) {
            if (isset($this->data[$options['element']])) {
                $than = ' "' . $this->cleanElement($options['element']) . '"';
                if ($this->elementData < $this->data[$options['element']]) {
                    return true;
                }
            }
        } else if (isset($options['value'])) {
            $than = $options['value'];
            if ($this->elementData < $options['value']) {
                return true;
            }
        }

        $this->addError($this->checkMessage('Value must be less than ' . $than, $options));
        return false;
    }
1359855
public function drop() {
        
        $conn = ConnectionManager::get('default');

        $stmt1 = $conn->execute('TRUNCATE TABLE aros_acos');
        $info1 = $stmt1->errorInfo();
        if ($info1[1] != null) {
            $this->log($info1, LOG_ERR);
            if(!empty($info1)) {
                $this->Flash->error($info1);
            }
        }
        
        $stmt2 = $conn->execute('TRUNCATE TABLE acos');
        $info2 = $stmt2->errorInfo();
        if ($info2[1] != null) {
            $this->log($info2, LOG_ERR);
            if(!empty($info2)) {
                $this->Flash->error($info2);
            }
        }
        
        $stmt3 = $conn->execute('TRUNCATE TABLE aros');
        $info3 = $stmt3->errorInfo();
        if ($info3[1] != null) {
            $this->log($info3, LOG_ERR);
            if(!empty($info3)) {
                $this->Flash->error($info3);
            }
        }

        $this->Flash->success(__("ACOs and AROs have been dropped."));
        $this->redirect(["action" => "index"]);
    }