Skip to content

Commit

Permalink
[MBL-1221] Update graphql-schema to prepare for attribution (#1958)
Browse files Browse the repository at this point in the history
* Update graphql-schema

* Fix schema changes
  • Loading branch information
ifosli committed Feb 26, 2024
1 parent 9f6e16a commit 2d47d34
Show file tree
Hide file tree
Showing 6 changed files with 395 additions and 19 deletions.
10 changes: 5 additions & 5 deletions KsApi/GraphAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11012,11 +11012,11 @@ public enum GraphAPI {
/// The raw GraphQL definition of this operation.
public let operationDefinition: String =
"""
query ValidateCheckout($checkoutId: ID!, $paymentSourceId: String, $paymentIntentClientSecret: String!) {
query ValidateCheckout($checkoutId: ID!, $paymentSourceId: String!, $paymentIntentClientSecret: String!) {
checkout(id: $checkoutId) {
__typename
isValidForOnSessionCheckout(
paymentSourceId: $paymentSourceId
stripePaymentMethodId: $paymentSourceId
paymentIntentClientSecret: $paymentIntentClientSecret
) {
__typename
Expand All @@ -11030,10 +11030,10 @@ public enum GraphAPI {
public let operationName: String = "ValidateCheckout"

public var checkoutId: GraphQLID
public var paymentSourceId: String?
public var paymentSourceId: String
public var paymentIntentClientSecret: String

public init(checkoutId: GraphQLID, paymentSourceId: String? = nil, paymentIntentClientSecret: String) {
public init(checkoutId: GraphQLID, paymentSourceId: String, paymentIntentClientSecret: String) {
self.checkoutId = checkoutId
self.paymentSourceId = paymentSourceId
self.paymentIntentClientSecret = paymentIntentClientSecret
Expand Down Expand Up @@ -11078,7 +11078,7 @@ public enum GraphAPI {
public static var selections: [GraphQLSelection] {
return [
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
GraphQLField("isValidForOnSessionCheckout", arguments: ["paymentSourceId": GraphQLVariable("paymentSourceId"), "paymentIntentClientSecret": GraphQLVariable("paymentIntentClientSecret")], type: .nonNull(.object(IsValidForOnSessionCheckout.selections))),
GraphQLField("isValidForOnSessionCheckout", arguments: ["stripePaymentMethodId": GraphQLVariable("paymentSourceId"), "paymentIntentClientSecret": GraphQLVariable("paymentIntentClientSecret")], type: .nonNull(.object(IsValidForOnSessionCheckout.selections))),
]
}

Expand Down
2 changes: 1 addition & 1 deletion KsApi/MockService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@

internal func validateCheckout(
checkoutId _: String,
paymentSourceId _: String?,
paymentSourceId _: String,
paymentIntentClientSecret _: String
) -> SignalProducer<ValidateCheckoutEnvelope, ErrorEnvelope> {
return producer(for: self.validateCheckoutResult)
Expand Down
2 changes: 1 addition & 1 deletion KsApi/Service.swift
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ public struct Service: ServiceType {
*/
public func validateCheckout(
checkoutId: String,
paymentSourceId: String?,
paymentSourceId: String,
paymentIntentClientSecret: String
) -> SignalProducer<ValidateCheckoutEnvelope, ErrorEnvelope> {
return GraphQL.shared.client
Expand Down
2 changes: 1 addition & 1 deletion KsApi/ServiceType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public protocol ServiceType {
/// Validates a Post Campaign Pledge
func validateCheckout(
checkoutId: String,
paymentSourceId: String?,
paymentSourceId: String,
paymentIntentClientSecret: String
) -> SignalProducer<ValidateCheckoutEnvelope, ErrorEnvelope>

Expand Down

0 comments on commit 2d47d34

Please sign in to comment.