GraphQLMutationState
class GraphQLMutationState
This class represents the contents of the data sent back to the GraphQL back end for any payment options that were changed during the usage of the SDK. The state is meant to be low maintenance, updating via event listeners, and translating the UI/viewmodel events into the GQL values:
- gqlPayload updates all values
- shippingAddressChanged updates the selectedAddress
- uiCurrencyConversionChanged updates currencyConversion
selectedPlan, preferredFundingOption still need hookups.
Note
this can likely be swapped out with the Codeables that will be used in the mutation-
Billing address that will be passed along with finish transaction call. Only needed when funding instrument does not have one already (like in Venmo case).
Declaration
Swift
var billingAddress: CoarseAddress?
-
The crypto quotes we retrieve from the crypto query request
Declaration
Swift
var cryptocurrencyQuotes: [CryptocurrencyQuote]?
-
Currency conversion type. If nil, no conversion needed
Declaration
Swift
var currencyConversion: CurrencyConversionType?
-
Sets up listeners, which, with lastSuccessful, will fill in values for you.
Declaration
Swift
init()
-
The intended intent for the order. We currently have
AUTHORIZE
,CAPTURE
, andSALE
.Declaration
Swift
var intent: String?
-
Merchant id might be needed for some custom mutations (Venmo custom service API, for example)
Declaration
Swift
var merchantId: String?
-
Default funding option to send
Declaration
Swift
var preferredFundingOption: FundingOption?
-
The shipping method for shipping (not pick up) that was previously selected
Declaration
Swift
var previouslySelectedShippingMethod: ShippingMethod?
-
Address chosen for purchase
Declaration
Swift
var selectedAddress: ShippingAddress?
-
Plan chosen for purchase. For a given FI, there could potentially be multiple funding plans involving either applying a PayPal balance to the purchase or not
Declaration
Swift
var selectedPlan: Plan?
-
Shipping method chosen for purchase
Declaration
Swift
var selectedShippingMethod: ShippingMethod?
-
Pay mode used for a checkout session (Continue, Pay Now)
Declaration
Swift
var userAction: UserAction?