mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-05-19 14:22:23 -04:00
StocardImporter: refactor (#1443)
* StocardImporter: refactor * StocardImporter: trim CSV fields * LoyaltyCard: add .toString() * StocardRecord: add .toString() * StocardImporter: handle usages better * StocardImporter: use label * ImportExportTest: add importStocard2 + stocard2.zip * StocardImporter: iterate over card map in key order * StocardImporter: cleanup, handle label better, use providers file * make spotbugs happy * StocardImporter: can't use providersFileName, list known files, log unknown * StocardImporter: fix regex, log properly, s/Provider/Store/ * StocardImporter: test /usages/ timestamp, nicer if/else flow * StocardImporter: fix label usage * StocardImporter: remove label prefix, improve error
This commit is contained in:
@@ -8,6 +8,7 @@ import java.math.BigDecimal;
|
||||
import java.util.Currency;
|
||||
import java.util.Date;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class LoyaltyCard implements Parcelable {
|
||||
@@ -166,6 +167,31 @@ public class LoyaltyCard implements Parcelable {
|
||||
return id;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format(
|
||||
"LoyaltyCard{%n id=%s,%n store=%s,%n note=%s,%n validFrom=%s,%n expiry=%s,%n"
|
||||
+ " balance=%s,%n balanceType=%s,%n cardId=%s,%n barcodeId=%s,%n barcodeType=%s,%n"
|
||||
+ " headerColor=%s,%n starStatus=%s,%n lastUsed=%s,%n zoomLevel=%s,%n archiveStatus=%s%n}",
|
||||
this.id,
|
||||
this.store,
|
||||
this.note,
|
||||
this.validFrom,
|
||||
this.expiry,
|
||||
this.balance,
|
||||
this.balanceType,
|
||||
this.cardId,
|
||||
this.barcodeId,
|
||||
this.barcodeType != null ? this.barcodeType.format() : null,
|
||||
this.headerColor,
|
||||
this.starStatus,
|
||||
this.lastUsed,
|
||||
this.zoomLevel,
|
||||
this.archiveStatus
|
||||
);
|
||||
}
|
||||
|
||||
public static final Creator<LoyaltyCard> CREATOR = new Creator<LoyaltyCard>() {
|
||||
@Override
|
||||
public LoyaltyCard createFromParcel(Parcel in) {
|
||||
|
||||
Reference in New Issue
Block a user