CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 17:42:20 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=b55326ee026b8f287241d5365b011c6a607bc9f809590fe200c5cb9774a69aa7a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22bJSKSEZ59hjJatEnjZmu4gmFp7N_ymS4%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d027470f877679-BLR
past price item - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "RW3PastPriceItem.h"
- #import "RW3AlternativePriceReason.h"
- #import "NSDate+RW3.h"
- #import "NSString+RW3.h"
- @implementation RW3PastPriceItem
- @dynamic upcPadded;
- @dynamic pricePerLb;
- @dynamic scanDate;
- @dynamic regularCount;
- @dynamic regularPrice;
- @dynamic activeCount;
- @dynamic activePrice;
- @dynamic activePriceReason;
- @dynamic tertiaryCount;
- @dynamic tertiaryPrice;
- @dynamic tertiaryPriceReason;
- - (NSNumber *)regularPriceTotal
- {
- double priceValue = [self.regularPrice doubleValue];
- double quantityValue = [self.regularCount doubleValue];
- priceValue = quantityValue ? priceValue / quantityValue : priceValue;
- return @(priceValue);
- }
- - (NSNumber *)activePriceTotal
- {
- double priceValue = [self.activePrice doubleValue];
- double quantityValue = [self.activeCount doubleValue];
- priceValue = quantityValue ? priceValue / quantityValue : priceValue;
- return @(priceValue);
- }
- - (NSNumber *)tertiaryPriceTotal
- {
- double priceValue = [self.tertiaryPrice doubleValue];
- double quantityValue = [self.tertiaryCount doubleValue];
- priceValue = quantityValue ? priceValue / quantityValue : priceValue;
- return @(priceValue);
- }
- #pragma mark - JSON
- - (void)populateWithJSON:(NSDictionary *)JSON alternativePriceReasons:(NSArray *)alternativePriceReasons
- {
- if (JSON[@"Upc"]) self.upcPadded = JSON[@"Upc"];
- self.regularCount = JSON[@"RegularQuantity"] == nil ? @0 : JSON[@"RegularQuantity"];
- self.regularPrice = JSON[@"RegularQuantityPrice"] == nil ? @0 : JSON[@"RegularQuantityPrice"];
- if(JSON[@"RegularPricePerLb"] != nil) self.pricePerLb = [JSON[@"RegularPricePerLb"] boolValue];
- self.activeCount = JSON[@"ActiveQuantity"] == nil ? @0 : JSON[@"ActiveQuantity"];
- self.activePrice = JSON[@"ActiveQuantityPrice"] == nil ? @0 : JSON[@"ActiveQuantityPrice"];
- if(JSON[@"ActivePricePerLb"] != nil) self.pricePerLb = [JSON[@"ActivePricePerLb"] boolValue];
- self.tertiaryCount = JSON[@"TertiaryQuantity"] == nil ? @0 : JSON[@"TertiaryQuantity"];
- self.tertiaryPrice = JSON[@"TertiaryQuantityPrice"] == nil ? @0 : JSON[@"TertiaryQuantityPrice"];
- if(JSON[@"TertiaryPricePerLb"] != nil) self.pricePerLb = [JSON[@"TertiaryPricePerLb"] boolValue];
- if (JSON[@"ScanDate"]) self.scanDate = [JSON[@"ScanDate"] changeDateStringToDate];
- if (JSON[@"PecosActivePriceReasonId"]) {
- NSNumber *activePriceReasonID = JSON[@"PecosActivePriceReasonId"];
- NSPredicate *predicate = [NSPredicate predicateWithFormat:@"id = %@", activePriceReasonID];
- NSArray *filteredAlternateivePriceReasons = [alternativePriceReasons filteredArrayUsingPredicate:predicate];
- self.activePriceReason = [filteredAlternateivePriceReasons firstObject];
- }
- if (JSON[@"PecosTertiaryPriceReasonId"]) {
- NSNumber *tertiaryPriceReasonID = JSON[@"PecosTertiaryPriceReasonId"];
- NSPredicate *predicate = [NSPredicate predicateWithFormat:@"id = %@", tertiaryPriceReasonID];
- NSArray *filteredAlternateivePriceReasons = [alternativePriceReasons filteredArrayUsingPredicate:predicate];
- self.tertiaryPriceReason = [filteredAlternateivePriceReasons firstObject];
- }
- }
- - (NSDictionary *)JSON
- {
- NSMutableDictionary *JSON = [[NSMutableDictionary alloc] init];
- if (self.upcPadded) JSON[@"UpcPadded"] = self.upcPadded;
- if (![self.regularPrice isEqualToNumber:@0])
- {
- JSON[@"RegularQuantityPrice"] = self.regularPrice;
- JSON[@"RegularPricePerLb"] = @(self.pricePerLb);
- JSON[@"RegularQuantity"] = self.regularCount;
- }
- if (![self.activePrice isEqualToNumber:@0])
- {
- JSON[@"ActiveQuantityPrice"] = self.activePrice;
- JSON[@"ActivePricePerLb"] = @(self.pricePerLb);
- JSON[@"ActiveQuantity"] = self.activeCount;
- JSON[@"PecosActivePriceReasonId"] = self.activePriceReason.id;
- }
- if (![self.tertiaryPrice isEqualToNumber:@0])
- {
- JSON[@"TertiaryQuantityPrice"] = self.tertiaryPrice;
- JSON[@"TertiaryPricePerLb"] = @(self.pricePerLb);
- JSON[@"TertiaryQuantity"] = self.tertiaryCount;
- JSON[@"PecosTertiaryPriceReasonId"] = self.tertiaryPriceReason.id;
- }
- if (self.scanDate) JSON[@"ScanDate"] = [self.scanDate toDateTimeString];
- return [JSON copy];
- }
- #pragma mark -
- - (NSString*)stringValue
- {
- NSMutableDictionary *data = [NSMutableDictionary dictionaryWithDictionary:[self JSON]];
- return [NSString stringWithFormat:@"%@", data];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Trading Profit Method ✅ NEVER SEEN BEFORE...
JavaScript | 2 sec ago | 0.24 KB
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 11 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D M⭐⭐
Java | 13 sec ago | 0.10 KB
-
⭐✅ MAKE $2000 INSTANTLY ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 21 sec ago | 0.24 KB
-
⭐⭐⭐Make $1500 in 20 minutes⭐⭐
Java | 25 sec ago | 0.10 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 30 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 39 sec ago | 0.24 KB
-
⭐⭐⭐Make $15OO in 2O minutesV E⭐⭐
Java | 49 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand