SCPCartLineItem

Objective-C


@interface SCPCartLineItem : NSObject

Swift

class CartLineItem : NSObject

Represents a single line item in an SCPCart, displayed on the reader’s screen during checkout.

The values here will be shown on the screen as-is. Make sure you’re correctly calculating and setting the SCPCart‘s tax and total – the reader will not calculate tax or total for you. Similarly, make sure the values displayed reflect what the customer is actually charged.

  • The quantity of the line item being purchased.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger quantity;

    Swift

    var quantity: Int { get }
  • The description or name of the item.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull displayName;

    Swift

    var displayName: String { get }
  • The price of the item, provided in the cart’s currency’s smallest unit. The line item will assume the currency of the parent SCPCart.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger amount;

    Swift

    var amount: Int { get }
  • Unavailable

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Declaration

    Objective-C

    + (nonnull instancetype)new;