Skip to content

add missing fields in models - #90

Open
cesar-sosa-hol wants to merge 1 commit into
mainfrom
update-models-adding-missing-fields
Open

add missing fields in models#90
cesar-sosa-hol wants to merge 1 commit into
mainfrom
update-models-adding-missing-fields

Conversation

@cesar-sosa-hol

Copy link
Copy Markdown
Collaborator

Models Changes

Summary of model and mapper updates across Android, iOS, and Flutter to better align with the native Mobile Payments SDK APIs.


Android

OnlineCardPaymentDetails

Added the following missing fields:

  • appliedCardSurchargeDetails
  • verificationMethod
  • verificationResults

Added extension methods to convert these values to strings or maps. Updated the Dart models to accept the new fields.

OnlinePayment

Added the following missing fields:

  • capabilities
  • receiptUrl

Added an extension to map capabilities to a map.

Also introduced a type field that discriminates between OnlinePayment and OfflinePayment. On the Dart side, Payment is now a sealed class with OnlinePayment and OfflinePayment variants.

Updated the Dart Payment models to receive the new fields.

For capabilities, added a Dart PaymentCapabilities class with canEditTipDown, canEditTipUp, canEditAmountDown, and canEditAmountUp (following the Android Capabilities pattern).

PaymentProcessingFee

Fixed incorrect mapping: PaymentProcessingFee.Type was passed through without conversion. Added an extension to convert the type to a string.

PaymentParameters

processingMode was incorrectly typed as a number. It should be an enum and must be sent to native as a string.

allowCardSurcharge defaulted to false; per documentation the default should be true.

Added the following missing fields:

  • acceptPartialAuthorization
  • customerId
  • locationId
  • teamMemberId
  • statementDescription

Updated the Dart models: ProcessingMode is now an enum, and PaymentParameters includes the new properties.

ReaderInfo

Added the missing connectionType property and an extension to convert it to a string. Added a new Dart enum ReaderConnectionType.

Replaced the inline firmware info map with a dedicated ReaderFirmwareInfo extension that converts to a map.

Added two missing ReaderFirmwareInfo fields and extensions to convert them to strings:

  • updateStatus
  • updateTime

Updated the Dart models for:

  • connectionType
  • firmwareInfo.updateStatus
  • firmwareInfo.updateTime

iOS

PaymentParameters

Fixed incorrect mapping for delayAction: values were uppercased, but the switch cases remained lowercase.

As on Android, processingMode is now an enum and is sent to native as a string. Added a mapper for the string form of processingMode.

Added the following missing fields:

  • acceptPartialAuthorization
  • allowCardSurcharge
  • customerId
  • locationId
  • teamMemberId
  • statementDescription

OfflinePayment

Added the missing cashDetails field.

Added an extension to map cashDetails to a map. Updated the Dart model to receive the new field.

OnlinePayment

Added the following missing fields:

  • customerID
  • teamMemberID
  • note
  • status
  • cashDetails

Added an extension to convert status to a string. Updated the Dart models to receive the new fields.

CardPaymentDetails

Added the missing appliedCardSurchargeDetails field.

Added an extension to map appliedCardSurchargeDetails to a map. Updated the Dart model to receive the new field.

ReaderInfo

Added the following missing fields:

  • connectionType
  • isRebootable

Added an extension to convert connectionType to a string. Updated the Dart models to receive the new fields.

ReaderStatusInfo

Added the following missing fields:

  • unavailableReasonTitle
  • unavailableReasonDetail

Updated the Dart model to receive the new fields.

ReaderFirmwareInfo

Added the following missing fields:

  • updateStatus
  • updateTime

Added an extension to convert updateStatus to a string. Updated the Dart model to receive the new fields.


Flutter (Dart models)

Enums

New enums:

  • VerificationMethod
  • VerificationResult
  • ProcessingFeeType
  • ReaderConnectionType
  • FirmwareUpdateStatus

AdditionalPaymentMethodType

Added the missing tapToPay value. iOS expects this option in PaymentMapper.getAdditionalPaymentMethod(from:).

PaymentStatus

Added iOS-only values that could be returned from native:

  • initialized
  • pending

Models

New models:

  • CardSurchargeDetails
  • CashPaymentDetails
  • PaymentCapabilities
  • PaymentProcessingFee

Money

amount is now required. It was previously optional, but native APIs expect a non-null amount.

Card

Added the missing bin field (sent by native, previously ignored in Dart).

OfflineCard

Added the missing fields:

  • bin
  • expirationMonth
  • expirationYear

PaymentParameters

Changed acceptPartialAuthorization from int to bool.

@cesar-sosa-hol
cesar-sosa-hol requested a review from Armaxis August 7, 2026 14:34
# Conflicts:
#	CHANGELOG.md
@cesar-sosa-hol
cesar-sosa-hol force-pushed the update-models-adding-missing-fields branch from 0fc5f99 to bb2ef51 Compare August 11, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants