Repository navigation
chore(ad-hoc): move models to top-level folder and decouple repository requests - #553
Merged
Merged
Conversation
Public PO* models now live in Models/<Concept>/ instead of being split between Repositories and Services depending on who uses them. Internal wire types stay next to the repository or service that uses them. File moves only, no code changes.
File move only, no code changes.
…uest body The locale is already sent as a header; it was also being encoded into the JSON body as locale_identifier.
… and token assignment Invoices and customer tokens repositories now take internal InvoiceAuthorizationRequest and AssignCustomerTokenRequest instead of the public PO* requests, so web authentication properties no longer reach the repository layer. Public request types are unchanged and encoded request bodies are identical.
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the model reorganization and separation of service requests from repository payloads.
No open issues 🎉
What changed in this PR
This PR reorganizes the ProcessOut SDK’s public models by concept and separates service-facing requests from repository payloads, keeping web authentication settings out of repositories.
Changes:
- Moves public models into
Models/, with native alternative payments grouped into requests, responses, and legacy types. - Adds internal invoice authorization and customer token assignment requests, service mappings, and generated coding keys.
- Excludes customer token assignment locale information from JSON while preserving header-based delivery.
Paths below are relative to Sources/ProcessOut/Sources/.
| File | Description |
|---|---|
Services/Invoices/DefaultInvoicesService.swift |
Maps public authorization requests to internal requests. |
Services/CustomerTokens/DefaultCustomerTokensService.swift |
Maps public token assignment requests to internal requests. |
Repositories/Shared/Extensions/POPaginationOptions+QueryItems.swift |
Keeps pagination query conversion in the repository layer. |
Repositories/Invoices/Requests/InvoiceAuthorizationRequest.swift |
Adds the internal authorization payload. |
Repositories/Invoices/InvoicesRepository.swift |
Accepts the internal authorization request. |
Repositories/Invoices/HttpInvoicesRepository.swift |
Uses the internal authorization request for HTTP calls. |
Repositories/CustomerTokens/Requests/AssignCustomerTokenRequest.swift |
Adds the internal token assignment payload. |
Repositories/CustomerTokens/HttpCustomerTokensRepository.swift |
Uses the internal token assignment request. |
Repositories/CustomerTokens/CustomerTokensRepository.swift |
Updates the token assignment contract. |
Models/Transactions/POTransactionStatus.swift |
Relocates transaction status definitions. |
Models/Transactions/POTransaction.swift |
Relocates transaction details. |
Models/Shared/POPaginationOptions.swift |
Relocates public pagination options. |
Models/Shared/POImageRemoteResource.swift |
Relocates shared image resource models. |
Models/Shared/POBillingAddressCollectionMode.swift |
Relocates billing address collection modes. |
Models/Shared/POBarcode.swift |
Relocates the shared barcode model. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentUrlResolutionResponseV2.swift |
Groups URL resolution responses under models. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentTokenizationResponseV2.swift |
Groups tokenization responses under models. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentStateV2.swift |
Relocates payment state definitions. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentRedirectV2.swift |
Relocates redirect response details. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentMethodV2.swift |
Relocates payment method details. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentInvoiceV2.swift |
Relocates payment invoice details. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentInstructionsGroupV2.swift |
Relocates grouped customer instructions. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentFormV2.swift |
Relocates payment forms and parameter definitions. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentElementV2.swift |
Relocates payment display elements. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentCustomerInstructionV2.swift |
Relocates customer instruction models. |
Models/NativeAlternativePayments/Responses/PONativeAlternativePaymentAuthorizationResponseV2.swift |
Groups authorization responses under models. |
Models/NativeAlternativePayments/Requests/PONativeAlternativePaymentUrlResolutionRequestV2.swift |
Groups URL resolution requests under models. |
Models/NativeAlternativePayments/Requests/PONativeAlternativePaymentTokenizationRequestV2.swift |
Groups tokenization requests under models. |
Models/NativeAlternativePayments/Requests/PONativeAlternativePaymentSubmitDataV2.swift |
Relocates submitted payment parameter models. |
Models/NativeAlternativePayments/Requests/PONativeAlternativePaymentRedirectResultV2.swift |
Relocates redirect result payloads. |
Models/NativeAlternativePayments/Requests/PONativeAlternativePaymentConfigurationV2.swift |
Relocates payment configuration models. |
Models/NativeAlternativePayments/Requests/PONativeAlternativePaymentAuthorizationRequestV2.swift |
Groups authorization requests under models. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentMethodTransactionDetailsRequest.swift |
Groups legacy transaction detail requests. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentMethodTransactionDetails.swift |
Groups legacy transaction details. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentMethodState.swift |
Groups legacy payment states. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentMethodResponse.swift |
Groups legacy payment responses. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentMethodRequest.swift |
Groups legacy payment requests. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentMethodParameterValues.swift |
Groups legacy payment parameter values. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentMethodParameter.swift |
Groups legacy payment parameter definitions. |
Models/NativeAlternativePayments/Legacy/PONativeAlternativePaymentCaptureRequest.swift |
Groups legacy capture requests. |
Models/Invoices/POInvoiceRequest.swift |
Relocates invoice retrieval requests. |
Models/Invoices/POInvoiceCreationRequest.swift |
Relocates invoice creation requests. |
Models/Invoices/POInvoiceAuthorizationResponse.swift |
Relocates public authorization responses. |
Models/Invoices/POInvoiceAuthorizationRequest.swift |
Relocates public authorization requests. |
Models/Invoices/POInvoiceAuthorizationOutcome.swift |
Relocates authorization outcomes. |
Models/Invoices/POInvoice.swift |
Relocates the invoice model. |
Models/GatewayConfigurations/POGatewayConfiguration.swift |
Relocates gateway configuration details. |
Models/GatewayConfigurations/POFindGatewayConfigurationRequest.swift |
Relocates gateway lookup requests. |
Models/GatewayConfigurations/POAllGatewayConfigurationsResponse.swift |
Relocates gateway listing responses. |
Models/GatewayConfigurations/POAllGatewayConfigurationsRequest.swift |
Relocates gateway listing requests. |
Models/Failure/POFailureCode+Namespace.swift |
Relocates failure code namespaces. |
Models/Failure/POFailureCode.swift |
Relocates failure code definitions. |
Models/Failure/POFailure+Legacy.swift |
Relocates legacy failure compatibility types. |
Models/Failure/POFailure.swift |
Relocates the public failure model. |
Models/DynamicCheckout/POStringDecodableMerchantCapability.swift |
Relocates merchant capability serialization. |
Models/DynamicCheckout/PODynamicCheckoutPaymentMethod.swift |
Relocates checkout payment method models. |
Models/DynamicCheckout/POCodablePassKitPaymentNetworks.swift |
Relocates payment network serialization. |
Models/DeepLinking/PODeepLinkReceivedEvent.swift |
Relocates the deep-link event model. |
Models/CustomerTokens/PODeleteCustomerTokenRequest.swift |
Relocates token deletion requests. |
Models/CustomerTokens/POCustomerTokenType.swift |
Relocates customer token types. |
Models/CustomerTokens/POCustomerTokenDeletedEvent.swift |
Relocates token deletion events. |
Models/CustomerTokens/POCustomerToken.swift |
Relocates customer token details. |
Models/CustomerTokens/POCreateCustomerTokenRequest.swift |
Relocates token creation requests. |
Models/CustomerTokens/POAssignCustomerTokenRequest.swift |
Excludes locale information from JSON encoding. |
Models/Customers/POCustomerCreationRequest.swift |
Relocates customer creation requests. |
Models/Customers/POCustomer.swift |
Relocates the customer model. |
Models/CustomerActions/PO3DSRedirect.swift |
Relocates legacy 3DS redirect details. |
Models/CustomerActions/PO3DS2ConfigurationCardScheme.swift |
Relocates legacy 3DS2 card scheme definitions. |
Models/CustomerActions/PO3DS2Configuration.swift |
Relocates 3DS2 configuration models. |
Models/CustomerActions/PO3DS2ChallengeResult.swift |
Relocates 3DS2 challenge results. |
Models/CustomerActions/PO3DS2ChallengeParameters.swift |
Relocates 3DS2 challenge parameters. |
Models/CustomerActions/PO3DS2AuthenticationRequestParameters.swift |
Relocates 3DS2 authentication parameters. |
Models/Cards/POContact.swift |
Relocates cardholder contact details. |
Models/Cards/POCardUpdateRequest.swift |
Relocates card update requests. |
Models/Cards/POCardTokenizationRequest.swift |
Relocates card tokenization requests. |
Models/Cards/POCardScheme.swift |
Relocates card scheme definitions. |
Models/Cards/POCardIssuerInformation.swift |
Relocates card issuer details. |
Models/Cards/POCardCvcCheck.swift |
Relocates CVC verification statuses. |
Models/Cards/POCard.swift |
Relocates the card model. |
Models/Cards/POApplePayTokenizationRequest.swift |
Relocates Apple Pay tokenization requests. |
Models/Cards/POApplePayCardTokenizationRequest.swift |
Relocates Apple Pay payment tokenization models. |
Models/AlternativePayments/POAlternativePaymentTokenizationRequest.swift |
Relocates alternative payment tokenization requests. |
Models/AlternativePayments/POAlternativePaymentResponse.swift |
Relocates alternative payment responses. |
Models/AlternativePayments/POAlternativePaymentMethodResponse.swift |
Relocates legacy alternative payment responses. |
Models/AlternativePayments/POAlternativePaymentMethodRequest.swift |
Relocates legacy alternative payment requests. |
Models/AlternativePayments/POAlternativePaymentAuthorizationRequest.swift |
Relocates alternative payment authorization requests. |
Models/AlternativePayments/POAlternativePaymentAuthenticationRequest.swift |
Relocates alternative payment authentication requests. |
Generated/Sourcery+Generated.swift |
Adds coding keys for both internal request types. |
Review effort: Balanced
vitalii-vanziak-cko
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PO*models moved fromRepositories/*andServices/*intoModels/<Concept>/.NativeAlternativePaymentsis split intoRequests/,Responses/andLegacy/. Internal wire types stay next to their repository. File moves only.authorizeInvoiceandassignCustomerTokennow take internalInvoiceAuthorizationRequest/AssignCustomerTokenRequest, so web authentication properties no longer reach repositories. Public types, service logic and encoded request bodies are unchanged.POAssignCustomerTokenRequest.localeIdentifieris no longer encoded into the JSON body; it's still sent as a header, like the other requests.