Logo
Developer SDK
Version 1.9.632.913d652c-152450467.
BasketAdjustment Class Reference
Inheritance diagram for BasketAdjustment:
CPBaseParcel ICpToJson BaseParcel

Public Member Functions

boolean getIsBasketAdjusted ()
 
void setBasketAdjusted (boolean isBasketAdjusted)
 
void addOffer (Offer offer)
 
void removeOffer (Offer offer)
 
Offer [] getOffers ()
 
ArrayList< OffergetOffersList ()
 
void addOffers (List< Offer > offers)
 
void addDonation (Donation donation)
 
void removeDonation (Donation donation)
 
Donation [] getDonations ()
 
ArrayList< DonationgetDonationsList ()
 
void addDonations (List< Donation > donations)
 
 BasketAdjustment (Parcel in, int parcelVersion)
 
void setParcelVersion (int targetParcelVersion)
 
void writeToParcel (Parcel dest, int flags)
 
JSONObject buildToCpJson ()
 
- Public Member Functions inherited from CPBaseParcel
 CPBaseParcel (Parcel in, int parcelVersion)
 
- Public Member Functions inherited from BaseParcel
 BaseParcel (Parcel in, int parcelVersion)
 
void setParcelVersion (int targetParcelVersion)
 
final int getParcelVersion ()
 
String getClassName ()
 
void writeToParcel (Parcel dest, int flags)
 
int describeContents ()
 

Static Public Attributes

static final Creator< BasketAdjustmentCREATOR
 
- Static Public Attributes inherited from BaseParcel
static final Parcelable.Creator< BaseParcelCREATOR
 

Additional Inherited Members

- Static Public Member Functions inherited from CPBaseParcel
static< CPEntityType extends CPBaseParcel > CPEntityType buildFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @Nullable CPEntityType parentObject)
 
- Protected Member Functions inherited from CPBaseParcel
abstract< CPEntityType extends CPBaseParcel > CPEntityType buildFromCpJson ( @NonNull JSONObject jsonObject, @Nullable CPEntityType parentObject)
 
- Static Protected Member Functions inherited from CPBaseParcel
static< CPEntityType extends CPBaseParcel > ArrayList< CPEntityType > buildListFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @NonNull String targetJsonAlias)
 
- Static Protected Member Functions inherited from BaseParcel
static void safelySetParcelVersion (final int targetParcelVersion, @Nullable BaseParcel item)
 
static void safelySetParcelVersion (final int targetParcelVersion, @Nullable List<? extends BaseParcel > items)
 
static< T extends BaseParcel > void safelySetParcelVersion (final int targetParcelVersion, @Nullable T[] items)
 

Detailed Description

Contains possible changes to the basket in response to the com.verifone.commerce.triggers.BasketAdjustmentRequest. Allows an application to propose changes to the basket using com.verifone.commerce.triggers.BasketAdjustmentResponse. When received in the com.verifone.commerce.payment.BasketAdjustedEvent, allows the recipient to determine which adjustments will actually be applied to the cart.

Definition at line 26 of file BasketAdjustment.java.

Member Function Documentation

◆ addDonation()

void addDonation ( Donation  donation)

Adds a donation.

Definition at line 117 of file BasketAdjustment.java.

◆ addDonations()

void addDonations ( List< Donation donations)

Add list of donations to existed donations or create new list if no donations yet.

Definition at line 154 of file BasketAdjustment.java.

◆ addOffer()

void addOffer ( Offer  offer)

Adds an offer.

Definition at line 66 of file BasketAdjustment.java.

◆ addOffers()

void addOffers ( List< Offer offers)

Add list of offers to existed offers or create new list if no offers yet.

Definition at line 104 of file BasketAdjustment.java.

◆ getDonations()

Donation [] getDonations ( )

Retrieves all of the donations that have been added to this response.

Definition at line 139 of file BasketAdjustment.java.

◆ getDonationsList()

ArrayList<Donation> getDonationsList ( )

Returns the actual list used by the object.

Definition at line 147 of file BasketAdjustment.java.

◆ getIsBasketAdjusted()

boolean getIsBasketAdjusted ( )

Returns true if any donations or offers have been added to the basket by the current application.

Definition at line 50 of file BasketAdjustment.java.

◆ getOffers()

Offer [] getOffers ( )

Retrieves all of the offers that have been added to this response. Creates an array backed by the underlying list.

Definition at line 89 of file BasketAdjustment.java.

◆ getOffersList()

ArrayList<Offer> getOffersList ( )

Returns the actual list used by the object.

Definition at line 97 of file BasketAdjustment.java.

◆ removeDonation()

void removeDonation ( Donation  donation)

Removes a donation from the list if it is present. Only affects donations added by the current application.

Definition at line 129 of file BasketAdjustment.java.

◆ removeOffer()

void removeOffer ( Offer  offer)

Removes an offer from the list if it is present. Only affects offers added by the current application.

Definition at line 78 of file BasketAdjustment.java.

◆ setBasketAdjusted()

void setBasketAdjusted ( boolean  isBasketAdjusted)

Set basket adjusted

Parameters
isBasketAdjustedtrue if basket has adjusted, false - otherwise

Definition at line 59 of file BasketAdjustment.java.

Member Data Documentation

◆ CREATOR

final Creator<BasketAdjustment> CREATOR
static
Initial value:
= new ParcelCreator<BasketAdjustment>() {
@Override
public BasketAdjustment createFromParcel(Parcel source) {
BaseParcel createdObject = super.createFromParcel(source);
if (createdObject == null || !BasketAdjustment.class.isInstance(createdObject)) {
return new BasketAdjustment(source, getRecommendedParcelVersion());
} else {
return (BasketAdjustment) createdObject;
}
}
@Override
public BasketAdjustment[] newArray(int size) {
return new BasketAdjustment[size];
}
}

Definition at line 191 of file BasketAdjustment.java.


The documentation for this class was generated from the following file:

This document is the confidential property of Verifone, Inc. Any reproduction or distribution of this document, in whole or in part, or the disclosure of any of the information contained herein, without the prior written consent of Verifone, Inc. is prohibited. This document and any supplemental material supplied as part of any review must be returned to Verifone, Inc. upon request. Notice: This document may go through material revisions over time. While the Company will make every effort to keep readers updated as changes occur, care must be taken by the reader to make sure they are reading the latest version. Version numbers appear in the title page and revision history page of this document. All rights reserved. Verifone, the Verifone logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. All other trademarks or brand names are properties of their respective holders.