The current overage cost for the given item for the given customer.

item_code must be provided if the customer is on a plan with more than one item.

code must be provided if this response contains more than one customer.
516347
def customer_item_quantity_overage_cost(item_code = nil, code = nil)
      item = customer_item(item_code, code)
      return 0 unless item
      overage = customer_item_quantity_overage(item_code, code)
      item[:overageAmount] * overage
    end
113499
def get_item_price_id(core, prices):
        """"""
        price_id = None
        for price in prices:
            if not price['locationGroupId']:
                capacity_min = int(price.get('capacityRestrictionMinimum', -1))
                capacity_max = int(price.get('capacityRestrictionMaximum', -1))
                # return first match if no restirction, or no core to check
                if capacity_min == -1 or core is None:
                    price_id = price['id']
                # this check is mostly to work nicely with preset configs
                elif capacity_min <= int(core) <= capacity_max:
                    price_id = price['id']
        return price_id
155343
def update_configuration(self, new_configuration):
        
        if new_configuration == self.configuration:
            return False
        now = timezone.now()
        if now.month != self.price_estimate.month:
            raise ConsumptionDetailUpdateError('It is possible to update consumption details only for current month.')
        minutes_from_last_update = self._get_minutes_from_last_update(now)
        for consumable_item, usage in self.configuration.items():
            consumed_after_modification = usage * minutes_from_last_update
            self.consumed_before_update[consumable_item] = (
                self.consumed_before_update.get(consumable_item, 0) + consumed_after_modification)
        self.configuration = new_configuration
        self.last_update_time = now
        self.save()
        return True
38205
def eligible_cost(self, column=None, value=None, **kwargs):
        
        return self._resolve_call('GIC_ELIGIBLE_COST', column, value, **kwargs)
463821
function ItemsItem() {
    /**
     * The id value
     * @member
     */
    this.id = null;
    /**
     * The sku value
     * @member
     */
    this.sku = null;
    /**
     * The title value
     * @member
     */
    this.title = null;
    /**
     * The quantity value
     * @member
     */
    this.quantity = null;
    /**
     * The price value
     * @member
     */
    this.price = null;
    /**
     * The formattedPrice value
     * @member
     */
    this.formattedPrice = null;
    /**
     * The currency value
     * @member
     */
    this.currency = null;
    /**
     * The productLink value
     * @member
     */
    this.productLink = null;
    /**
     * The weight value
     * @member
     */
    this.weight = null;
    /**
     * The formattedWeight value
     * @member
     */
    this.formattedWeight = null;
    /**
     * The media of value
     * @member
     * @type { Media }
     */
    this.media = Object.create(Media.prototype);

}
1321796
def reward_item(self, item_type):
        
        assert isinstance(item_type, str)

        if not 'items' in self.mode:
            return
        mode = self.mode['items']
        if mode and mode[item_type] and self.__test_cond(mode[item_type]):
            self.logger.debug("{item_type} consumed".format(item_type=item_type))
            self.player.stats['reward'] += mode[item_type]['reward']
            self.player.stats['score'] += mode[item_type]['reward']

            self.player.game_over = self.player.game_over or mode[item_type]['terminal']
292817
def list(self, request, *args, **kwargs):
        
        return super(PriceListItemViewSet, self).list(request, *args, **kwargs)
1306149
def update(self):
        

        subtotal = float(0)
        total = float(0)
        for product in self.items:
            subtotal += float(product["price"])
        if subtotal > 0:
            total = subtotal + self.extra_amount
        self.subtotal = subtotal
        self.total = total
366020
def get_existing_item(self, item):
        
        params = {
            'project_id': item.project_id,
            'from_user_id': item.from_user_id,
            'to_user_id': item.to_user_id,
        }
        resp = requests.get(self.make_url(item.destination), headers=self.json_headers, params=params)
        self.check_response(resp)
        return resp
1249300
def upcoming_invoice(self, **kwargs):
		
		from .billing import Invoice

		kwargs["customer"] = self
		return Invoice.upcoming(**kwargs)
545133
public UsageInArrearItemsAndNextNotificationDate computeMissingItemsAndNextNotificationDate(final List<InvoiceItem> existingUsage) throws CatalogApiException, InvoiceApiException {

        Preconditions.checkState(isBuilt.get());

        if (transitionTimes.size() < 2) {
            return new UsageInArrearItemsAndNextNotificationDate(ImmutableList.<InvoiceItem>of(), ImmutableSet.of(), computeNextNotificationDate());
        }

        final List<InvoiceItem> result = Lists.newLinkedList();

        final RolledUpUnitsWithTracking allUsageWithTracking = getRolledUpUsage();
        final List<RolledUpUsage> allUsage = allUsageWithTracking.getUsage();

        final Set<TrackingRecordId> allTrackingIds = allUsageWithTracking.getTrackingIds();

        final Set<TrackingRecordId> existingTrackingIds = extractTrackingIds(allExistingTrackingIds);


        final Set<TrackingRecordId> newTrackingIds = Sets.filter(allTrackingIds, new Predicate<TrackingRecordId>() {
            @Override
            public boolean apply(final TrackingRecordId allRecord) {

                return ! Iterables.any(existingTrackingIds, new Predicate<TrackingRecordId>() {
                    @Override
                    public boolean apply(final TrackingRecordId existingRecord) {
                        return existingRecord.isSimilarRecord(allRecord);
                    }
                });
            }
        });


        // Each RolledUpUsage 'ru' is for a specific time period and across all units
        for (final RolledUpUsage ru : allUsage) {

            //
            // Previously billed items:
            //
            // 1. Retrieves current price amount billed for that period of time (and usage section)
            final Iterable<InvoiceItem> billedItems = getBilledItems(ru.getStart(), ru.getEnd(), existingUsage);
            // 2. Verify whether previously built items have the item_details section
            final boolean areAllBilledItemsWithDetails = areAllBilledItemsWithDetails(billedItems);
            // 3. verify if we already billed that period - use to decide whether we should include $0 items when there is nothing to bill for.
            final boolean isPeriodPreviouslyBilled = !Iterables.isEmpty(billedItems);
            // 4. Computes total billed usage amount
            final BigDecimal billedUsage = computeBilledUsage(billedItems);

            final List<RolledUpUnit> rolledUpUnits = ru.getRolledUpUnits();

            final UsageInArrearAggregate toBeBilledUsageDetails = getToBeBilledUsageDetails(rolledUpUnits, billedItems, areAllBilledItemsWithDetails);
            final BigDecimal toBeBilledUsageUnrounded = toBeBilledUsageDetails.getAmount();
            // See https://github.com/killbill/killbill/issues/1124
            final BigDecimal toBeBilledUsage = KillBillMoney.of(toBeBilledUsageUnrounded, getCurrency());
            populateResults(ru.getStart(), ru.getEnd(), billedUsage, toBeBilledUsage, toBeBilledUsageDetails, areAllBilledItemsWithDetails, isPeriodPreviouslyBilled, result);

        }
        final LocalDate nextNotificationDate = computeNextNotificationDate();
        return new UsageInArrearItemsAndNextNotificationDate(result, newTrackingIds, nextNotificationDate);
    }
702506
def _api_value(self, plugin, item, value):
        
        return self._api_itemvalue(plugin, item, value)
562276
def item_prices(pronac, data):
    
    threshold = 0.1

    outlier_info = get_outliers_percentage(pronac)
    outlier_info['is_outlier'] = outlier_info['percentage'] > threshold
    outlier_info['maximum_expected'] = threshold * outlier_info['total_items']

    return outlier_info
377143
def get_existing_item_id(self, api):
        
        resp = api.get_existing_item(self)
        items = resp.json()
        num_items = len(items)
        if num_items == 0:
            return None
        else:
            return items[0]['id']
175896
def get_shipping_costs(params)
      raise ArgumentError unless params[:ItemID]
      response = get_json_response(build_request_url('GetShippingCosts', params))
      return response
    end
539847
def retrieve_customer(customer_id, opts = {})
      data, _status_code, _headers = retrieve_customer_with_http_info(customer_id, opts)
      return data
    end
1106100
def is_true(self, item=None):
        
        if item:
            values = [item]
        else:
            values = []
        self._get_item_and_att_names(*values)
        return self._passes_all