SCPCartLineItem

Objective-C

@interface SCPCartLineItem : NSObject

Swift

class SCPCartLineItem : NSObject

Dictates what will be shown on the screen through setReaderDisplay. Represents exactly what will be shown on the screen.

  • The quantity of the line item being purchased.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger quantity;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var displayName: String { get set }
  • The price of the item in cents.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger amount;

    Swift

    var amount: Int { get set }
  • The values set here will be shown on the screen as-is. Make sure you’re correctly calculating and setting the SCPCart’s tax and total – the Verifone P400 will not calculate tax or total for you. Similarly, make sure the values displayed reflect what the customer is actually charged.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDisplayName:(nonnull NSString *)displayName
                                       quantity:(NSInteger)quantity
                                         amount:(NSInteger)amount;

    Swift

    init(displayName: String, quantity: Int, amount: Int)

    Parameters

    displayName

    Description or name of the item

    quantity

    The how many of the item should show in the cart

    amount

    The price in cents, will assume the currency of the SCPCart